diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 386253bb60..3d2c6295f8 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -37,6 +37,7 @@ RUN apt-get update \ valgrind \ docker.io \ iputils-ping \ + icecc \ && : RUN groupadd -g $USER_GID $USERNAME \ @@ -80,3 +81,13 @@ ENV TIZEN_ROOTFS /tizen_rootfs # Fast Model GDB plugins path for debugging support ENV FAST_MODEL_PLUGINS_PATH /opt/FastModelsPortfolio_11.16/plugins/Linux64_GCC-9.3 + +# Set up ccache as a pigweed command launcher when using the scripts/build/build_examples.py +# script. Also, set up icecc as the command prefix for ccache. Such setup allows to benefit +# from compilation caching and distributed compilation at the same time. +# +# NOTE: In order to use distributed compilation with icecc, one should run +# "scripts/icecc.sh start" before starting the build. +ENV CHIP_PW_COMMAND_LAUNCHER ccache +ENV CCACHE_PREFIX icecc +ENV PATH /usr/lib/ccache:$PATH diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 5c24cdec82..a5dee8881f 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -735,6 +735,7 @@ isUpperCase itemName iterable itsfoss +IW JDK jinja JLink @@ -893,6 +894,7 @@ microcontroller microcontrollers MicroSD middleware +MIMXRT minApplicableSoftwareVersion Minicom MinInterval @@ -924,6 +926,7 @@ Multicast multilib Multiprotocol multithreaded +Murata mutex mutexes mv @@ -1006,6 +1009,7 @@ OpenThreadDemo openweave OperationalCredentials operationalDataset +operationalstate opkg OPTIGA optionMask @@ -1451,6 +1455,8 @@ trackFree TransferSession transitionTime TransportMgrBase +triaged +triaging TriggerEffect TRNG trustm diff --git a/.github/issue-labeler.yml b/.github/issue-labeler.yml index 909ef045c0..f47ce85932 100644 --- a/.github/issue-labeler.yml +++ b/.github/issue-labeler.yml @@ -12,8 +12,18 @@ darwin: # (?![a-z]) means "there is no next char in the range a-z". - "/(\\b[Ii][Oo][Ss](?![a-zA-Z])|[Hh][Oo][Mm][Ee][Pp][Oo][Dd]|[Dd][Aa][Rr][Ww][Ii][Nn]|\\bm[Aa][Cc]\\b|\\bMa[Cc]\\b|\\bM[Aa]c\\b|[Mm][Aa][Cc][Oo][Ss])/" -linux: - - "/(linux)/i" + +# NOTE: +# Linux intentionally disabled: most people compile either on linux or darwin and +# as a result a lot of issues get tagged as such even though they are not platform specific +# (e.g. we get test case failures reported as linux even though they are just normal +# test runs) +# +# Linux label should be reserved to platform-specific problems (usually bootstrap/packages +# or integration with wifi/ethernet/bluetootn/etc.) +# +# linux: +# - "/(linux)/i" # Special Keywords for Cert Blockers air purifiers: diff --git a/.github/labeler.yml b/.github/labeler.yml index 7e02fe6d36..68d976ecd5 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -275,14 +275,22 @@ darwin: silabs: - changed-files: - any-glob-to-any-file: + - examples/platform/silabs/* + - examples/platform/silabs/**/* - src/platform/silabs/* - src/platform/silabs/**/* + - src/test_driver/efr32/* + - src/test_driver/efr32/**/* esp32: - changed-files: - any-glob-to-any-file: + - examples/platform/esp32/* + - examples/platform/esp32/**/* - src/platform/ESP32/* - src/platform/ESP32/**/* + - src/test_driver/esp32/* + - src/test_driver/esp32/**/* freeRTOS: - changed-files: @@ -290,23 +298,31 @@ freeRTOS: - src/platform/FreeRTOS/* - src/platform/FreeRTOS/**/* -k32w: +nxp: - changed-files: - any-glob-to-any-file: - - src/platform/K32W/* - - src/platform/K32W/**/* + - examples/platform/nxp/* + - examples/platform/nxp/**/* + - src/platform/nxp/* + - src/platform/nxp/**/* linux: - changed-files: - any-glob-to-any-file: + - examples/platform/linux/* + - examples/platform/linux/**/* - src/platform/Linux/* - src/platform/Linux/**/* nrf connect: - changed-files: - any-glob-to-any-file: + - examples/platform/nrfconnect/* + - examples/platform/nrfconnect/**/* - src/platform/nrfconnect/* - src/platform/nrfconnect/**/* + - src/test_driver/nrfconnect/* + - src/test_driver/nrfconnect/**/* openthread: - changed-files: @@ -323,11 +339,17 @@ zephyr: telink: - changed-files: - any-glob-to-any-file: + - examples/platform/telink/* + - examples/platform/telink/**/* - src/platform/telink/* - src/platform/telink/**/* tizen: - changed-files: - any-glob-to-any-file: + - examples/platform/tizen/* + - examples/platform/tizen/**/* - src/platform/Tizen/* - src/platform/Tizen/**/* + - src/test_driver/tizen/* + - src/test_driver/tizen/**/* diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f14a16f5e0..af102bf96e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -157,6 +157,9 @@ jobs: run: echo "$CONCURRENCY_CONTEXT" - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 2 + persist-credentials: true - name: Try to ensure the directories for core dumping exist and we can write them. run: | @@ -186,6 +189,10 @@ jobs: - name: Clean output run: rm -rf ./out - name: Run Tests with sanitizers + # Sanitizer tests are not likely to find extra issues so running the same tests + # as above repeatedly on every pull request seems extra time. Instead keep this run + # for master only + if: github.event.pull_request.number == null env: LSAN_OPTIONS: detect_leaks=1 run: | @@ -201,17 +208,34 @@ jobs: BUILD_TYPE=sanitizers scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true" --export-compile-commands BUILD_TYPE=sanitizers scripts/tests/gn_tests.sh done + - name: Generate tests with sanitizers (for tidy) + if: github.event.pull_request.number != null + run: | + rm -rf ./out/sanitizers + BUILD_TYPE=sanitizers scripts/build/gn_gen.sh --args="is_clang=true is_asan=true chip_data_model_check_die_on_failure=true" --export-compile-commands - name: Ensure codegen is done for sanitize run: | ./scripts/run_in_build_env.sh "./scripts/run_codegen_targets.sh out/sanitizers" + - name: Find changed files + id: changed-files + uses: tj-actions/changed-files@v45 - name: Clang-tidy validation # NOTE: clang-tidy crashes on CodegenDataModel_Write due to Nullable/std::optional check. # See https://github.com/llvm/llvm-project/issues/97426 + env: + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | + touch out/changed_files.txt + for file in ${ALL_CHANGED_FILES}; do + echo "$file changed and will be considered for tidy" + echo "$file" >>out/changed_files.txt + done + ./scripts/run_in_build_env.sh \ "./scripts/run-clang-tidy-on-compile-commands.py \ --compile-database out/sanitizers/compile_commands.json \ --file-exclude-regex '/(repo|zzz_generated|lwip/standalone)/|-ReadImpl|-InvokeSubscribeImpl|CodegenDataModel_Write|QuieterReporting' \ + --file-list-file out/changed_files.txt \ check \ " - name: Clean output @@ -375,13 +399,16 @@ jobs: scripts/build_python_device.sh --chip_detail_logging true build_darwin: - name: Build on Darwin (clang, python_lib, simulated) + name: Build on Darwin (clang, simulated) runs-on: macos-13 if: github.actor != 'restyled-io[bot]' steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 2 + persist-credentials: true - name: Checkout submodules & Bootstrap uses: ./.github/actions/checkout-submodules-and-bootstrap with: @@ -402,37 +429,42 @@ jobs: CHIP_ROOT_PATH=examples/placeholder/linux CHIP_ROOT_PATH="$CHIP_ROOT_PATH" BUILD_TYPE="$BUILD_TYPE" scripts/build/gn_gen.sh --args="$GN_ARGS" scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" - - name: Setup Build, Run Build and Run Tests + - name: Setup Build, Run Build and Run Tests (asan + target_os=all) # We can't enable leak checking here in LSAN_OPTIONS, because on # Darwin that's only supported with a new enough clang, and we're # not building with the pigweed clang here. + env: + BUILD_TYPE: default run: | - for BUILD_TYPE in default python_lib; do - case $BUILD_TYPE in - # We want to build various standalone example apps - # (similar to what examples-linux-standalone.yaml - # does), so use target_os="all" to get those picked - # up as part of the "unified" build. But then to - # save CI resources we want to exclude the - # "host clang" build, which uses the pigweed - # clang. - "default") GN_ARGS='target_os="all" is_asan=true enable_host_clang_build=false';; - esac - BUILD_TYPE=$BUILD_TYPE scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true" --export-compile-commands - scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" - BUILD_TYPE=$BUILD_TYPE scripts/tests/gn_tests.sh - done - - name: Ensure codegen is done for sanitize + # We want to build various standalone example apps (similar to what examples-linux-standalone.yaml + # does), so use target_os="all" to get those picked up as part of the "unified" build. But then + # to save CI resources we want to exclude the "host clang" build, which uses the pigweed clang. + scripts/build/gn_gen.sh --args='target_os="all" is_asan=true enable_host_clang_build=false chip_data_model_check_die_on_failure=true' --export-compile-commands + scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" + scripts/tests/gn_tests.sh + - name: Ensure codegen is done for default run: | ./scripts/run_in_build_env.sh "./scripts/run_codegen_targets.sh out/default" + - name: Find changed files + id: changed-files + uses: tj-actions/changed-files@v45 - name: Clang-tidy validation # NOTE: clang-tidy crashes on CodegenDataModel_Write due to Nullable/std::optional check. # See https://github.com/llvm/llvm-project/issues/97426 + env: + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | + touch out/changed_files.txt + for file in ${ALL_CHANGED_FILES}; do + echo "$file changed and will be considered for tidy" + echo "$file" >>out/changed_files.txt + done + ./scripts/run_in_build_env.sh \ "./scripts/run-clang-tidy-on-compile-commands.py \ --compile-database out/default/compile_commands.json \ --file-exclude-regex '/(repo|zzz_generated|lwip/standalone)/|CodegenDataModel_Write|QuieterReporting' \ + --file-list-file out/changed_files.txt \ check \ " - name: Uploading diagnostic logs diff --git a/.github/workflows/cancel_workflows_for_pr.yaml b/.github/workflows/cancel_workflows_for_pr.yaml new file mode 100644 index 0000000000..caba07bedf --- /dev/null +++ b/.github/workflows/cancel_workflows_for_pr.yaml @@ -0,0 +1,52 @@ +# Copyright (c) 2024 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: Cancel workflows on failing CI +on: + workflow_dispatch: + schedule: + - cron: "*/10 * * * *" + +jobs: + cancel_workflow: + name: Cancel CI on failing pull requests + + runs-on: ubuntu-latest + + # Don't run on forked repos + if: github.repository_owner == 'project-chip' + + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Setup pip modules we use + run: | + pip install \ + click \ + coloredlogs \ + python-dateutil \ + pygithub \ + && echo "DONE installint python prerequisites" + - name: Cancel runs + run: | + scripts/tools/cancel_workflows_for_pr.py \ + --gh-api-token "${{ secrets.GITHUB_TOKEN }}" \ + --require "Restyled" \ + --require "Lint Code Base" \ + --require "ZAP" \ + --require "Run misspell" \ + --max-pr-age-minutes 20 diff --git a/.github/workflows/cert_test_checks.yaml b/.github/workflows/cert_test_checks.yaml index 44d545a663..3f8f54dcf2 100644 --- a/.github/workflows/cert_test_checks.yaml +++ b/.github/workflows/cert_test_checks.yaml @@ -18,6 +18,8 @@ on: pull_request: paths: - "src/app/tests/suites/certification/**" +permissions: + contents: read jobs: check-certification-tests: @@ -30,6 +32,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Run checks run: | python3 scripts/tests/matter_yaml_linter.py diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml index 1ddc9e9fbc..2d46de23cf 100644 --- a/.github/workflows/darwin-tests.yaml +++ b/.github/workflows/darwin-tests.yaml @@ -73,6 +73,10 @@ jobs: platform: darwin bootstrap-log-name: bootstrap-logs-darwin-${{ matrix.build_variant }} + - name: Build iOS Darwin Framework Tool Build Debug + working-directory: src/darwin/Framework + run: xcodebuild -target "darwin-framework-tool" -sdk iphoneos -configuration Debug AD_HOC_CODE_SIGNING_ALLOWED=YES + - name: Run macOS Darwin Framework Tool Build Debug working-directory: src/darwin/Framework run: xcodebuild -target "darwin-framework-tool" -sdk macosx -configuration Debug diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index 9a6989881e..9a51b612a1 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -58,25 +58,15 @@ jobs: run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target bouffalolab-bl602dk-light-easyflash \ - --target bouffalolab-bl602dk-light-mfd-littlefs \ - --target bouffalolab-bl602dk-light-rpc-115200-littlefs \ + --target bouffalolab-bl602dk-light-mfd-littlefs-rpc-115200 \ build \ --copy-artifacts-to out/artifacts \ " - name: Prepare some bloat report from the previous builds run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl602 bl602 lighting-app \ - out/artifacts/bouffalolab-bl602dk-light-easyflash/chip-bl602-lighting-example.out \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl602 bl602+mfd lighting-app \ - out/artifacts/bouffalolab-bl602dk-light-mfd-littlefs/chip-bl602-lighting-example.out \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl602 bl602+rpc lighting-app \ - out/artifacts/bouffalolab-bl602dk-light-rpc-115200-littlefs/chip-bl602-lighting-example.out \ + bl602 bl602+mfd+littlefs+rpc lighting-app \ + out/artifacts/bouffalolab-bl602dk-light-mfd-littlefs-rpc-115200/chip-bl602-lighting-example.out \ /tmp/bloat_reports/ - name: Clean out build output run: rm -rf ./out @@ -85,35 +75,25 @@ jobs: run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target bouffalolab-bl706dk-light-easyflash \ - --target bouffalolab-bl706dk-light-mfd-littlefs \ - --target bouffalolab-bl706dk-light-ethernet-littlefs \ + --target bouffalolab-bl706dk-light-ethernet-easyflash \ --target bouffalolab-bl706dk-light-wifi-littlefs \ - --target bouffalolab-bl706dk-light-rpc-115200-littlefs \ + --target bouffalolab-bl706dk-light-mfd-rpc-littlefs-115200 \ build \ --copy-artifacts-to out/artifacts \ " - name: Prepare some bloat report from the previous builds run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl702 bl702 lighting-app \ - out/artifacts/bouffalolab-bl706dk-light-easyflash/chip-bl702-lighting-example.out \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl702 bl702+mfd lighting-app \ - out/artifacts/bouffalolab-bl706dk-light-mfd-littlefs/chip-bl702-lighting-example.out \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl702 bl706-eth lighting-app \ - out/artifacts/bouffalolab-bl706dk-light-ethernet-littlefs/chip-bl702-lighting-example.out \ + bl702 bl702+eth lighting-app \ + out/artifacts/bouffalolab-bl706dk-light-ethernet-easyflash/chip-bl702-lighting-example.out \ /tmp/bloat_reports/ .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl702 bl706-wifi lighting-app \ + bl702 bl702+wifi lighting-app \ out/artifacts/bouffalolab-bl706dk-light-wifi-littlefs/chip-bl702-lighting-example.out \ /tmp/bloat_reports/ .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl702 bl702+rpc lighting-app \ - out/artifacts/bouffalolab-bl706dk-light-rpc-115200-littlefs/chip-bl702-lighting-example.out \ + bl702 bl706+mfd+rpc+littlefs lighting-app \ + out/artifacts/bouffalolab-bl706dk-light-mfd-rpc-littlefs-115200/chip-bl702-lighting-example.out \ /tmp/bloat_reports/ - name: Clean out build output run: rm -rf ./out @@ -123,7 +103,6 @@ jobs: run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target bouffalolab-bl704ldk-light-easyflash \ --target bouffalolab-bl704ldk-light-mfd-littlefs \ build \ --copy-artifacts-to out/artifacts \ @@ -131,11 +110,7 @@ jobs: - name: Prepare some bloat report from the previous builds run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl702l bl702l lighting-app \ - out/artifacts/bouffalolab-bl704ldk-light-easyflash/chip-bl702l-lighting-example.out \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - bl702l bl702l+mfd lighting-app \ + bl702l bl702l+mfd+littlefs lighting-app \ out/artifacts/bouffalolab-bl704ldk-light-mfd-littlefs/chip-bl702l-lighting-example.out \ /tmp/bloat_reports/ - name: Clean out build output @@ -145,4 +120,4 @@ jobs: uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - platform-name: BouffaloLab + platform-name: BouffaloLab \ No newline at end of file diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 6d28635597..b0b4fef50e 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -41,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-efr32:81 + image: ghcr.io/project-chip/chip-build-efr32:85 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -68,8 +68,7 @@ jobs: ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ --enable-flashbundle \ - --target efr32-brd4187c-thermostat-openthread-mtd \ - --target efr32-brd4187c-air-quality-sensor-app-openthread-mtd \ + --target efr32-brd4187c-thermostat-use-ot-lib \ --target efr32-brd4187c-switch-shell-use-ot-coap-lib \ --target efr32-brd4187c-unit-test \ build \ @@ -82,29 +81,17 @@ jobs: ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ --enable-flashbundle \ - --target efr32-brd4187c-light-use-ot-lib \ - --target efr32-brd4187c-pump \ - --target efr32-brd4187c-lock-shell-heap-monitoring \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Clean out build output - run: rm -rf ./out - - name: Build BRD4187C variants (3) - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --enable-flashbundle \ + --target efr32-brd4187c-lock-rpc \ + --target efr32-brd4187c-air-quality-sensor-app-shell-heap-monitoring \ --target efr32-brd4187c-window-covering-additional-data-advertising \ - --target efr32-brd4187c-light-rpc \ build \ --copy-artifacts-to out/artifacts \ " - name: Prepare some bloat report from the previous builds run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - efr32 BRD4187C lighting-app \ - out/efr32-brd4187c-light-rpc/matter-silabs-lighting-example.out \ + efr32 BRD4187C lock-app \ + out/efr32-brd4187c-lock-rpc/matter-silabs-lock-example.out \ /tmp/bloat_reports/ .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ efr32 BRD4187C window-app \ @@ -112,12 +99,12 @@ jobs: /tmp/bloat_reports/ - name: Clean out build output run: rm -rf ./out - - name: Build BRD4338A WiFi Soc variants + - name: Build some WiFi Soc variants run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ --enable-flashbundle \ - --target efr32-brd4338a-light-skip-rps-generation \ + --target efr32-brd2605a-light-skip-rps-generation \ --target efr32-brd4338a-lock-skip-rps-generation \ build \ --copy-artifacts-to out/artifacts \ @@ -130,24 +117,6 @@ jobs: /tmp/bloat_reports/ - name: Clean out build output run: rm -rf ./out - - name: Build BRD2605A WiFi Soc variants - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --enable-flashbundle \ - --target efr32-brd2605a-light-skip-rps-generation \ - --target efr32-brd2605a-lock-skip-rps-generation \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Prepare bloat report for brd2605a lock app - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - efr32 BRD2605a lock-app \ - out/efr32-brd2605a-lock-skip-rps-generation/matter-silabs-lock-example.out \ - /tmp/bloat_reports/ - - name: Clean out build output - run: rm -rf ./out - name: Build EFR32 with WiFi NCP run: | ./scripts/run_in_build_env.sh \ diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index a2dca96dc6..b3a6ed24e6 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -105,14 +105,11 @@ jobs: example_binaries/esp32-build/chip-all-clusters-app.elf \ /tmp/bloat_reports/ - - name: Build example Pigweed App - run: scripts/examples/esp_example.sh pigweed-app sdkconfig.defaults - - name: Build example Lighting App (Target:ESP32H2) run: scripts/examples/esp_example.sh lighting-app sdkconfig.defaults.esp32h2 esp32h2 - - name: Build example Lock App (Target:ESP32C6) - run: scripts/examples/esp_example.sh lock-app sdkconfig.defaults.esp32c6 esp32c6 + - name: Build example Lighting App (Target:ESP32C6) + run: scripts/examples/esp_example.sh lighting-app sdkconfig.defaults.esp32c6 esp32c6 - name: Uploading Size Reports uses: ./.github/actions/upload-size-reports @@ -124,7 +121,7 @@ jobs: name: ESP32_1 runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' + if: github.actor != 'restyled-io[bot]' && github.repository_owner == 'espressif' container: image: ghcr.io/project-chip/chip-build-esp32:81 @@ -168,3 +165,9 @@ jobs: - name: Build example LIT ICD App (Target:ESP32H2) run: scripts/examples/esp_example.sh lit-icd-app sdkconfig.defaults esp32h2 + + - name: Build example Pigweed App + run: scripts/examples/esp_example.sh pigweed-app sdkconfig.defaults + + - name: Build example Lock App (Target:ESP32C6) + run: scripts/examples/esp_example.sh lock-app sdkconfig.defaults.esp32c6 esp32c6 diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index ee226b12dc..78a1c8dea8 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -65,11 +65,12 @@ jobs: --target linux-arm64-chip-tool-nodeps-ipv6only \ --target linux-arm64-lock-clang \ --target linux-arm64-minmdns-clang \ - --target linux-arm64-light-rpc-ipv6only-clang \ + --target linux-arm64-light-data-model-enabled-rpc-ipv6only-clang \ --target linux-arm64-thermostat-no-ble-clang \ --target linux-arm64-lit-icd-no-ble-clang \ --target linux-arm64-fabric-admin-clang-rpc \ --target linux-arm64-fabric-bridge-no-ble-clang-rpc \ + --target linux-arm64-fabric-sync-no-ble-clang \ build \ " - name: Bloat report - chip-tool diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 83b82369ba..2bed5acd82 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -219,6 +219,16 @@ jobs: linux debug fabric-bridge-app \ out/linux-x64-fabric-bridge-no-ble-rpc/fabric-bridge-app \ /tmp/bloat_reports/ + - name: Build example Fabric Sync + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-x64-fabric-sync-no-ble \ + build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + linux debug fabric-sync \ + out/linux-x64-fabric-sync-no-ble/fabric-sync \ + /tmp/bloat_reports/ - name: Uploading Size Reports uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} diff --git a/.github/workflows/examples-nxp.yaml b/.github/workflows/examples-nxp.yaml index 6354718f25..c4b6eb148a 100644 --- a/.github/workflows/examples-nxp.yaml +++ b/.github/workflows/examples-nxp.yaml @@ -30,17 +30,17 @@ env: CHIP_NO_LOG_TIMESTAMPS: true jobs: - k32w0: - name: K32W0 + FreeRTOS: + name: FREERTOS env: - BUILD_TYPE: gn_k32w + BUILD_TYPE: gn_FreeRTOS runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nxp:80 + image: ghcr.io/project-chip/chip-build-nxp:81 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -50,6 +50,15 @@ jobs: uses: ./.github/actions/checkout-submodules-and-bootstrap with: platform: nxp + extra-submodule-parameters: --recursive + + - name: Detect changed paths + uses: dorny/paths-filter@v3 + id: changed_paths + with: + filters: | + nxp: + - '**/nxp/**' - name: Set up environment for size reports uses: ./.github/actions/setup-size-reports @@ -57,222 +66,173 @@ jobs: with: gh-context: ${{ toJson(github) }} - - name: Build examples + - name: Build K32W0 examples run: | scripts/run_in_build_env.sh "\ ./scripts/build/build_examples.py \ - --target nxp-k32w0-freertos-lighting \ --target nxp-k32w0-freertos-lighting-factory \ - --target nxp-k32w0-freertos-lighting-rotating-id \ - --target nxp-k32w0-freertos-contact-sensor \ - --target nxp-k32w0-freertos-contact-sensor-low-power \ --target nxp-k32w0-freertos-contact-sensor-low-power-factory \ build \ --copy-artifacts-to out/artifacts \ " - - name: Get lighting app size stats + - name: Get K32W0 lighting app size stats run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nxp k32w0+release light \ - out/artifacts/nxp-k32w0-freertos-lighting/chip-k32w0x-light-example.elf \ + out/artifacts/nxp-k32w0-freertos-lighting-factory/chip-k32w0x-light-example.elf \ /tmp/bloat_reports/ - - name: Get contact sensor size stats + - name: Get K32W0 contact sensor size stats run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nxp k32w0+release contact \ - out/artifacts/nxp-k32w0-freertos-contact-sensor-low-power/chip-k32w0x-contact-example.elf \ + out/artifacts/nxp-k32w0-freertos-contact-sensor-low-power-factory/chip-k32w0x-contact-example.elf \ /tmp/bloat_reports/ - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: K32W0 - k32w1: - name: K32W1 - - env: - BUILD_TYPE: gn_k32w - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-nxp:81 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: nxp - extra-submodule-parameters: --recursive - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} + - name: clean build + run: rm -rf ./out - - name: Build examples + - name: Build K32W1 examples run: | scripts/run_in_build_env.sh "\ ./scripts/build/build_examples.py \ --target nxp-k32w1-freertos-lighting \ - --target nxp-k32w1-freertos-contact-sensor-low-power \ - --target nxp-k32w1-freertos-lock-app \ build \ --copy-artifacts-to out/artifacts \ " - - name: Get lighting app size stats + - name: Get K32W1 lighting app size stats run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nxp k32w1+release light \ out/artifacts/nxp-k32w1-freertos-lighting/chip-k32w1-light-example.elf \ /tmp/bloat_reports/ - - name: Get contact sensor size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nxp k32w1+release contact \ - out/artifacts/nxp-k32w1-freertos-contact-sensor-low-power/chip-k32w1-contact-example.elf \ - /tmp/bloat_reports/ - - name: Get lock app size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nxp k32w1+release lock \ - out/artifacts/nxp-k32w1-freertos-lock-app/chip-k32w1-lock-example.elf \ - /tmp/bloat_reports/ - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: K32W1 - mcxw71: - name: MCXW71 - env: - BUILD_TYPE: gn_k32w + - name: clean build + run: rm -rf ./out - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-nxp:81 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: nxp - extra-submodule-parameters: --recursive - - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Build examples + - name: Build MCXW71 examples run: | scripts/run_in_build_env.sh "\ ./scripts/build/build_examples.py \ - --target nxp-mcxw71-freertos-lighting \ --target nxp-mcxw71-freertos-contact-sensor-low-power \ --target nxp-mcxw71-freertos-lock-app \ build \ --copy-artifacts-to out/artifacts \ " - - name: Get lighting app size stats - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - nxp mcxw71+release light \ - out/artifacts/nxp-mcxw71-freertos-lighting/chip-mcxw71-light-example.elf \ - /tmp/bloat_reports/ - - name: Get contact sensor size stats + - name: Get MCXW71 contact sensor size stats run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nxp mcxw71+release contact \ out/artifacts/nxp-mcxw71-freertos-contact-sensor-low-power/chip-mcxw71-contact-example.elf \ /tmp/bloat_reports/ - - name: Get lock app size stats + - name: Get MCXW71 lock app size stats run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ nxp mcxw71+release lock \ out/artifacts/nxp-mcxw71-freertos-lock-app/chip-mcxw71-lock-example.elf \ /tmp/bloat_reports/ - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: MCXW71 - rw61x: - name: RW61X - env: - BUILD_TYPE: gn_rw61x + - name: clean build + run: rm -rf ./out - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' + - name: Build RT1060 all clusters example app + run: | + scripts/run_in_build_env.sh "\ + ./scripts/build/build_examples.py \ + --target nxp-rt1060-freertos-all-clusters-wifi-iw416 \ + --target nxp-rt1060-freertos-all-clusters-wifi-w8801 \ + --target nxp-rt1060-freertos-all-clusters-wifi-ota-evkc-iwx12 \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Build RT1060 thermostat example app + if: github.event_name == 'push' || steps.changed_paths.outputs.nxp == 'true' + run: | + scripts/run_in_build_env.sh "\ + ./scripts/build/build_examples.py \ + --target nxp-rt1060-freertos-thermostat-thread-wifi-evkc-iwx12 \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Build RT1060 laundry-washer example app + if: github.event_name == 'push' || steps.changed_paths.outputs.nxp == 'true' + run: | + scripts/run_in_build_env.sh "\ + ./scripts/build/build_examples.py \ + --target nxp-rt1060-freertos-laundry-washer-wifi-evkc-iwx12 \ + --target nxp-rt1060-freertos-laundry-washer-thread-evkc-iwx12 \ + build \ + --copy-artifacts-to out/artifacts \ + " - container: - image: ghcr.io/project-chip/chip-build-nxp:81 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: nxp - extra-submodule-parameters: --recursive + - name: clean build + run: rm -rf ./out - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} + - name: Build RT1170 all clusters example app + if: github.event_name == 'push' || steps.changed_paths.outputs.nxp == 'true' + run: | + scripts/run_in_build_env.sh "\ + ./scripts/build/build_examples.py \ + --target nxp-rt1170-freertos-all-clusters-wifi-iwx12 \ + --target nxp-rt1170-freertos-all-clusters-wifi-ota-iwx12 \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Build RT1170 thermostat example app + run: | + scripts/run_in_build_env.sh "\ + ./scripts/build/build_examples.py \ + --target nxp-rt1170-freertos-thermostat-thread-wifi-iwx12 \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Build RT1170 laundry-washer example app + if: github.event_name == 'push' || steps.changed_paths.outputs.nxp == 'true' + run: | + scripts/run_in_build_env.sh "\ + ./scripts/build/build_examples.py \ + --target nxp-rt1170-freertos-laundry-washer-thread-iwx12 \ + build \ + --copy-artifacts-to out/artifacts \ + " + + - name: clean build + run: rm -rf ./out - name: Build RW61X all clusters example app run: | scripts/run_in_build_env.sh "\ ./scripts/build/build_examples.py \ --target nxp-rw61x-freertos-all-clusters-wifi \ - --target nxp-rw61x-freertos-all-clusters-thread \ --target nxp-rw61x-freertos-all-clusters-wifi-ota-cmake \ build \ --copy-artifacts-to out/artifacts \ " - - name: Build RW61X thermostat example app run: | scripts/run_in_build_env.sh "\ ./scripts/build/build_examples.py \ - --target nxp-rw61x-freertos-thermostat-wifi \ - --target nxp-rw61x-freertos-thermostat-thread \ --target nxp-rw61x-freertos-thermostat-thread-wifi \ build \ --copy-artifacts-to out/artifacts \ " - - name: Build RW61X laundry-washer example app + if: github.event_name == 'push' || steps.changed_paths.outputs.nxp == 'true' run: | scripts/run_in_build_env.sh "\ ./scripts/build/build_examples.py \ --target nxp-rw61x-freertos-laundry-washer-wifi \ - --target nxp-rw61x-freertos-laundry-washer-thread \ build \ --copy-artifacts-to out/artifacts \ " + + - name: clean build + run: rm -rf ./out + - name: Uploading Size Reports uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - platform-name: RW61X + platform-name: NXP-FREERTOS zephyr: name: ZEPHYR @@ -289,8 +249,15 @@ jobs: uses: ./.github/actions/checkout-submodules-and-bootstrap with: platform: nxp - + - name: Detect changed paths + uses: dorny/paths-filter@v3 + id: changed_paths + with: + filters: | + nxp: + - '**/nxp/**' - name: Build NXP Zephyr examples + if: github.event_name == 'push' || steps.changed_paths.outputs.nxp == 'true' run: | scripts/run_in_build_env.sh "\ ./scripts/build/build_examples.py \ diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 64b3d6bb7c..a1d7244ab8 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -61,6 +61,8 @@ jobs: # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 3ed7686a9378de6be1368c912f9a42f998bbfb18" - name: Build example Telink (B92 retention) Air Quality Sensor App + # Run test for master and s07641069 PRs + if: github.event.pull_request.number == null || github.event.pull_request.head.repo.full_name == 's07641069/connectedhomeip' run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9528a_retention-air-quality-sensor' build" @@ -73,6 +75,8 @@ jobs: run: rm -rf ./out - name: Build example Telink (W91) All Clusters App + # Run test for master and s07641069 PRs + if: github.event.pull_request.number == null || github.event.pull_request.head.repo.full_name == 's07641069/connectedhomeip' continue-on-error: true run: | ./scripts/run_in_build_env.sh \ @@ -86,6 +90,8 @@ jobs: run: rm -rf ./out - name: Build example Telink (B92) All Clusters Minimal App + # Run test for master and s07641069 PRs + if: github.event.pull_request.number == null || github.event.pull_request.head.repo.full_name == 's07641069/connectedhomeip' run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9528a-all-clusters-minimal' build" @@ -98,6 +104,7 @@ jobs: run: rm -rf ./out - name: Build example Telink (B95) Bridge App + # Run test for master and all PRs run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9258a-bridge' build" @@ -110,6 +117,7 @@ jobs: run: rm -rf ./out - name: Build example Telink (B92 retention) Contact Sensor App + # Run test for master and all PRs run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9528a_retention-contact-sensor' build" @@ -122,6 +130,7 @@ jobs: run: rm -rf ./out - name: Build tools required for Factory Data + # Run test for master and all PRs run: | ./scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux ./scripts/build/gn_gen.sh @@ -132,6 +141,7 @@ jobs: run: rm -rf ./out/telink* - name: Build example Telink (W91) Lighting App with OTA, Factory Data + # Run test for master and all PRs continue-on-error: true run: | ./scripts/run_in_build_env.sh \ @@ -145,6 +155,7 @@ jobs: run: rm -rf ./out/telink* - name: Build example Telink (B91) Lighting App with OTA, RPC, Factory Data and 4Mb flash + # Run test for master and all PRs run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-light-ota-rpc-factory-data-4mb' build" @@ -157,6 +168,7 @@ jobs: run: rm -rf ./out/telink* - name: Build example Telink (B92) Light Switch App with OTA, Shell, Factory Data + # Run test for master and all PRs run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9528a-light-switch-ota-shell-factory-data' build" @@ -169,6 +181,8 @@ jobs: run: rm -rf ./out - name: Build example Telink (B92) Lock App with DFU + # Run test for master and s07641069 PRs + if: github.event.pull_request.number == null || github.event.pull_request.head.repo.full_name == 's07641069/connectedhomeip' run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9528a-lock-dfu' build" @@ -181,6 +195,8 @@ jobs: run: rm -rf ./out - name: Build example Telink (B95) OTA Requestor App + # Run test for master and s07641069 PRs + if: github.event.pull_request.number == null || github.event.pull_request.head.repo.full_name == 's07641069/connectedhomeip' run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9258a-ota-requestor' build" @@ -193,6 +209,8 @@ jobs: run: rm -rf ./out - name: Build example Telink (B91 USB) Pump App + # Run test for master and s07641069 PRs + if: github.event.pull_request.number == null || github.event.pull_request.head.repo.full_name == 's07641069/connectedhomeip' run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-pump-usb' build" @@ -205,6 +223,8 @@ jobs: run: rm -rf ./out - name: Build example Telink (B91) Pump Controller App + # Run test for master and s07641069 PRs + if: github.event.pull_request.number == null || github.event.pull_request.head.repo.full_name == 's07641069/connectedhomeip' run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-pump-controller' build" @@ -217,6 +237,8 @@ jobs: run: rm -rf ./out - name: Build example Telink (B91) Shell App + # Run test for master and s07641069 PRs + if: github.event.pull_request.number == null || github.event.pull_request.head.repo.full_name == 's07641069/connectedhomeip' run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-shell' build" @@ -229,6 +251,8 @@ jobs: run: rm -rf ./out - name: Build example Telink (B92 retention) Smoke CO Alarm App + # Run test for master and s07641069 PRs + if: github.event.pull_request.number == null || github.event.pull_request.head.repo.full_name == 's07641069/connectedhomeip' run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9528a_retention-smoke-co-alarm' build" @@ -241,6 +265,8 @@ jobs: run: rm -rf ./out - name: Build example Telink (B91 Mars) Temperature Measurement App with OTA + # Run test for master and s07641069 PRs + if: github.event.pull_request.number == null || github.event.pull_request.head.repo.full_name == 's07641069/connectedhomeip' run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-temperature-measurement-mars-ota' build" @@ -253,6 +279,8 @@ jobs: run: rm -rf ./out - name: Build example Telink (B91) Thermostat App + # Run test for master and s07641069 PRs + if: github.event.pull_request.number == null || github.event.pull_request.head.repo.full_name == 's07641069/connectedhomeip' run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-thermostat' build" @@ -265,6 +293,8 @@ jobs: run: rm -rf ./out - name: Build example Telink (W91) Window Covering App + # Run test for master and s07641069 PRs + if: github.event.pull_request.number == null || github.event.pull_request.head.repo.full_name == 's07641069/connectedhomeip' continue-on-error: true run: | ./scripts/run_in_build_env.sh \ diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index b3115f2ff3..783c46ef41 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -38,7 +38,7 @@ jobs: BUILD_TYPE: esp32-qemu runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' + if: github.actor != 'restyled-io[bot]' && github.repository_owner == 'espressif' container: image: ghcr.io/project-chip/chip-build-esp32-qemu:81 diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 22cf6b335e..54997b6efa 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -64,7 +64,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-efr32:81 + image: ghcr.io/project-chip/chip-build-efr32:85 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/restyled.yml b/.github/workflows/restyled.yml new file mode 100644 index 0000000000..9174483ecb --- /dev/null +++ b/.github/workflows/restyled.yml @@ -0,0 +1,35 @@ +name: Restyled + +on: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + restyled: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: restyled-io/actions/setup@v4 + - id: restyler + uses: restyled-io/actions/run@v4 + with: + fail-on-differences: true + + - if: | + !cancelled() && + steps.restyler.outputs.success == 'true' && + github.event.pull_request.head.repo.full_name == github.repository + uses: peter-evans/create-pull-request@v6 + with: + base: ${{ steps.restyler.outputs.restyled-base }} + branch: ${{ steps.restyler.outputs.restyled-head }} + title: ${{ steps.restyler.outputs.restyled-title }} + body: ${{ steps.restyler.outputs.restyled-body }} + labels: "restyled" + reviewers: ${{ github.event.pull_request.user.login }} + delete-branch: true diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml index a9953e69b0..5adf4f408e 100644 --- a/.github/workflows/stale.yaml +++ b/.github/workflows/stale.yaml @@ -16,27 +16,17 @@ jobs: with: stale-issue-message: "This issue has been automatically marked as stale because - it has not had recent activity. It will be closed if no - further activity occurs. Remove stale label or comment or - this will be closed in 30 days." + it has not had recent activity." stale-pr-message: "This pull request has been automatically marked as stale - because it has not had recent activity. It will be closed - if no further activity occurs. Remove stale label or - comment or this will be closed in 10 days." + because it has not had recent activity." close-issue-message: "This stale issue has been automatically closed. Thank you for your contributions." close-pr-message: "This stale pull request has been automatically closed. Thank you for your contributions." - days-before-issue-stale: 30 - days-before-issue-close: -1 # Don't close them for now - days-before-pr-stale: 90 - days-before-pr-close: 10 - exempt-issue-labels: - "security,blocked,cert blocker,build issue,Spec XML - align,CI/CD improvements,memory" - exempt-pr-labels: - "security,blocked,cert blocker,build issue,Spec XML - align,CI/CD improvements,memory" + days-before-issue-stale: 180 + days-before-issue-close: -1 # Don't close stale issues + days-before-pr-stale: 180 + days-before-pr-close: -1 # Don't close stale PRs diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 04aa91020a..63957b64d8 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -111,6 +111,7 @@ jobs: src/app/zap-templates/zcl/data-model/chip/boolean-state-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/actions-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml \ + src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/chip-ota.xml \ src/app/zap-templates/zcl/data-model/chip/chip-types.xml \ src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml \ @@ -199,6 +200,7 @@ jobs: src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/webrtc-requestor-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml \ @@ -209,6 +211,7 @@ jobs: src/app/zap-templates/zcl/data-model/chip/sample-mei-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/zone-management-cluster.xml \ " - name: Build Apps run: | @@ -594,7 +597,7 @@ jobs: " - name: Run Tests run: | - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/darwin-x64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --quiet --app-args "--discriminator 3840 --interface-id -1" --script-args "-t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/darwin-x64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factory-reset --quiet --app-args "--discriminator 3840 --interface-id -1" --script-args "-t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"' - name: Uploading core files uses: actions/upload-artifact@v4 if: ${{ failure() && !env.ACT }} diff --git a/.gitmodules b/.gitmodules index ed472c937c..824bd9954e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -213,17 +213,17 @@ [submodule "third_party/silabs/simplicity_sdk"] path = third_party/silabs/simplicity_sdk url = https://github.com/SiliconLabs/simplicity_sdk.git - branch = v2024.6.1-0 + branch = v2024.6.2 platforms = silabs [submodule "third_party/silabs/wiseconnect-wifi-bt-sdk"] path = third_party/silabs/wiseconnect-wifi-bt-sdk url = https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git - branch = 2.10.0 + branch = 2.10.3 platforms = silabs [submodule "third_party/silabs/wifi_sdk"] path = third_party/silabs/wifi_sdk url = https://github.com/SiliconLabs/wiseconnect.git - branch = v3.3.2 + branch = v3.3.3 platforms = silabs [submodule "editline"] path = third_party/editline/repo @@ -329,6 +329,9 @@ path = third_party/infineon/psoc6/psoc6_sdk/libs/lwip-network-interface-integration url = https://github.com/Infineon/lwip-network-interface-integration.git platforms = infineon +[submodule "third_party/lwip/repo"] + path = third_party/lwip/repo + url = https://github.com/lwip-tcpip/lwip.git [submodule "third_party/abseil-cpp/src"] path = third_party/abseil-cpp/src url = https://github.com/abseil/abseil-cpp.git @@ -340,7 +343,7 @@ [submodule "third_party/googletest"] path = third_party/googletest url = https://github.com/google/googletest - platforms = linux,darwin + platforms = linux,android,darwin,tizen [submodule "third_party/re2/src"] path = third_party/re2/src url = https://github.com/google/re2.git diff --git a/.gn b/.gn index f844fd20e9..07b5accb51 100644 --- a/.gn +++ b/.gn @@ -13,6 +13,7 @@ # limitations under the License. import("//build_overrides/build.gni") +import("//build_overrides/googletest.gni") import("//build_overrides/pigweed.gni") # The location of the build configuration file. @@ -33,6 +34,11 @@ default_args = { # GN target to use for the default Python build venv. pw_build_PYTHON_BUILD_VENV = "//:matter_build_venv" + # Use the GoogleTest backend for unit tests running on host. + pw_unit_test_BACKEND = "$dir_pw_unit_test:googletest" + pw_unit_test_MAIN = "$dir_pigweed/third_party/googletest:gmock_main" + dir_pw_third_party_googletest = "$dir_googletest" + # Required for pw_unit_test pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" pw_assert_BACKEND = "$dir_pw_assert_log" diff --git a/.pullapprove.yml b/.pullapprove.yml index 83d7b70b34..81267526ee 100644 --- a/.pullapprove.yml +++ b/.pullapprove.yml @@ -8,257 +8,250 @@ github_api_version: "shadow-cat-preview" ############################################################ overrides: - - if: "'hotfix' in labels" - status: success - explanation: "Hotfix label added, bypassing reviews" + - if: "'hotfix' in labels" + status: success + explanation: "Hotfix label added, bypassing reviews" - ############################################################ - # Draft PRs - ############################################################ - - if: "draft" - status: pending - explanation: "PR is draft, pending review" + ############################################################ + # Draft PRs + ############################################################ + - if: "draft" + status: pending + explanation: "PR is draft, pending review" - ############################################################ - # License Checks - ############################################################ - - if: "'*license/cla*' not in statuses.successful" - status: pending - explanation: "CLA must be agreed to by all contributors" + ############################################################ + # License Checks + ############################################################ + - if: "'*license/cla*' not in statuses.successful" + status: pending + explanation: "CLA must be agreed to by all contributors" - ############################################################ - # Conditions to Skip Review - ############################################################ - - if: "base.ref != 'master'" - status: success - explanation: "Review not required unless merging to master" + ############################################################ + # Conditions to Skip Review + ############################################################ + - if: "base.ref != 'master'" + status: success + explanation: "Review not required unless merging to master" - ############################################################ - # Required status checks - ############################################################ - - if: "'*restyle*' not in statuses.successful" - status: failure - explanation: "Style must be inline before reviewing can be complete" + ############################################################ + # Require Issues + ############################################################ + # disabling until we have PRs up to date + # - if: "'*issue*' not in statuses.successful" + # status: failure + # explanation: "An issue is required for all PRs" - ############################################################ - # Require Issues - ############################################################ - # disabling until we have PRs up to date - # - if: "'*issue*' not in statuses.successful" - # status: failure - # explanation: "An issue is required for all PRs" - - ############################################################ - # Fast tracking - ############################################################ - - if: "'fast track' in labels" - status: success - explanation: "PR has been fast tracked, bypassing reviews" + ############################################################ + # Fast tracking + ############################################################ + - if: "'fast track' in labels" + status: success + explanation: "PR has been fast tracked, bypassing reviews" ############################################################ # Notifications ############################################################ notifications: - ############################################################ - # New contributors - ############################################################ - - when: pull_request.opened - if: "author_association == 'FIRST_TIME_CONTRIBUTOR'" - comment: | - Hey @{{ author }}, thanks for the PR! The review will start once - the tests and CI checks have passed. If they don't, please review - the logs and try to fix the issues (ask for help if you can't - figure it out). A reviewer will be assigned once the tests are - passing and they'll walk you through getting the PR finished - and merged. + ############################################################ + # New contributors + ############################################################ + - when: pull_request.opened + if: "author_association == 'FIRST_TIME_CONTRIBUTOR'" + comment: | + Hey @{{ author }}, thanks for the PR! The review will start once + the tests and CI checks have passed. If they don't, please review + the logs and try to fix the issues (ask for help if you can't + figure it out). A reviewer will be assigned once the tests are + passing and they'll walk you through getting the PR finished + and merged. groups: - ############################################################ - # Shared Reviewer Groups - ############################################################ - shared-reviewers-amazon: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-amazon] - reviews: - request: 0 # Do not auto-add - shared-reviewers-apple: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-apple] - reviews: - request: 0 # Do not auto-add - shared-reviewers-bosch: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-bosch] - reviews: - request: 0 # Do not auto-add - shared-reviewers-comcast: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-comcast] - reviews: - request: 0 # Do not auto-add - shared-reviewers-dyson: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-dyson] - reviews: - request: 0 # Do not auto-add - shared-reviewers-espressif: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-espressif] - reviews: - request: 0 # Do not auto-add - shared-reviewers-google: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-google] - reviews: - request: 0 # Do not auto-add - shared-reviewers-grundfos: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-grundfos] - reviews: - request: 0 # Do not auto-add - shared-reviewers-irobot: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-irobot] - reviews: - request: 0 # Do not auto-add - shared-reviewers-lg: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-lg] - reviews: - request: 0 # Do not auto-add - shared-reviewers-logitech: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-logitech] - reviews: - request: 0 # Requested to be only on demand - shared-reviewers-nordic: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-nordic] - reviews: - request: 0 # Do not auto-add - shared-reviewers-nxp: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-nxp] - reviews: - request: 0 # Do not auto-add - shared-reviewers-samsung: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-samsung] - reviews: - request: 0 # Do not auto-add - shared-reviewers-eve: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-eve] - reviews: - request: 0 # Do not auto-add - # shared-reviewers-signify disabled for now, because the reviewers-signify - # team is empty and pullapprove seems to mis-handle that badly and treats - # _all_ reviewers as being in this group. - # - # See https://github.com/dropseed/pullapprove/issues/71 - # - # shared-reviewers-signify: - # type: optional - # conditions: - # - files.include('*') - # reviewers: - # teams: [reviewers-signify] - # reviews: - # request: 0 # Do not auto-add - shared-reviewers-silabs: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-silabs] - reviews: - request: 0 # Do not auto-add - shared-reviewers-somfy: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-somfy] - reviews: - request: 0 # Do not auto-add - shared-reviewers-tcl: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-tcl] - reviews: - request: 0 # Do not auto-add - shared-reviewers-qorvo: - type: optional - conditions: - - files.include('*') - reviewers: - teams: [reviewers-qorvo] - reviews: - request: 0 # Do not auto-add + ############################################################ + # Shared Reviewer Groups + ############################################################ + shared-reviewers-amazon: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-amazon] + reviews: + request: 0 # Do not auto-add + shared-reviewers-apple: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-apple] + reviews: + request: 0 # Do not auto-add + shared-reviewers-bosch: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-bosch] + reviews: + request: 0 # Do not auto-add + shared-reviewers-comcast: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-comcast] + reviews: + request: 0 # Do not auto-add + shared-reviewers-dyson: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-dyson] + reviews: + request: 0 # Do not auto-add + shared-reviewers-espressif: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-espressif] + reviews: + request: 0 # Do not auto-add + shared-reviewers-google: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-google] + reviews: + request: 0 # Do not auto-add + shared-reviewers-grundfos: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-grundfos] + reviews: + request: 0 # Do not auto-add + shared-reviewers-irobot: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-irobot] + reviews: + request: 0 # Do not auto-add + shared-reviewers-lg: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-lg] + reviews: + request: 0 # Do not auto-add + shared-reviewers-logitech: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-logitech] + reviews: + request: 0 # Requested to be only on demand + shared-reviewers-nordic: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-nordic] + reviews: + request: 0 # Do not auto-add + shared-reviewers-nxp: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-nxp] + reviews: + request: 0 # Do not auto-add + shared-reviewers-samsung: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-samsung] + reviews: + request: 0 # Do not auto-add + shared-reviewers-eve: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-eve] + reviews: + request: 0 # Do not auto-add + # shared-reviewers-signify disabled for now, because the reviewers-signify + # team is empty and pullapprove seems to mis-handle that badly and treats + # _all_ reviewers as being in this group. + # + # See https://github.com/dropseed/pullapprove/issues/71 + # + # shared-reviewers-signify: + # type: optional + # conditions: + # - files.include('*') + # reviewers: + # teams: [reviewers-signify] + # reviews: + # request: 0 # Do not auto-add + shared-reviewers-silabs: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-silabs] + reviews: + request: 0 # Do not auto-add + shared-reviewers-somfy: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-somfy] + reviews: + request: 0 # Do not auto-add + shared-reviewers-tcl: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-tcl] + reviews: + request: 0 # Do not auto-add + shared-reviewers-qorvo: + type: optional + conditions: + - files.include('*') + reviewers: + teams: [reviewers-qorvo] + reviews: + request: 0 # Do not auto-add - ############################################################ - # Base Required Reviewers - ############################################################ - required-reviewers: - description: > - [Required - Reviewers](https://github.com/project-chip/connectedhomeip/blob/master/CONTRIBUTING.md#review-requirements) - This is the main group of required reviews for general pull - requests. - type: required - requirements: - - len(groups.approved.include('shared-reviewers-*')) >= 2 - reviews: - required: 0 - labels: - approved: "review - approved" - pending: "review - pending" - rejected: "review - changed requested" + ############################################################ + # Base Required Reviewers + ############################################################ + required-reviewers: + description: > + [Required + Reviewers](https://github.com/project-chip/connectedhomeip/blob/master/CONTRIBUTING.md#review-requirements) + This is the main group of required reviews for general pull + requests. + type: required + requirements: + - len(groups.approved.include('shared-reviewers-*')) >= 2 + reviews: + required: 0 + labels: + approved: "review - approved" + pending: "review - pending" + rejected: "review - changed requested" diff --git a/.spellcheck.yml b/.spellcheck.yml index 7313f64ebd..757034586b 100644 --- a/.spellcheck.yml +++ b/.spellcheck.yml @@ -65,7 +65,7 @@ matrix: # converts markdown to HTML - pyspelling.filters.markdown: sources: - - '**/*.md|!third_party/**|!examples/common/**/repo/**|!docs/ERROR_CODES.md|!docs/clusters.md|!docs/testing/yaml_schema.md|!docs/testing/yaml_pseudocluster.md | !docs/testing/python.md | !docs/testing/ChipDeviceCtrlAPI.md' + - '**/*.md|!third_party/**|!examples/common/**/repo/**|!docs/ERROR_CODES.md|!docs/clusters.md|!docs/testing/yaml_schema.md|!docs/testing/yaml_pseudocluster.md|!docs/testing/python.md|!docs/testing/ChipDeviceCtrlAPI.md|!docs/issue_triage.md' aspell: ignore-case: true camel-case: true diff --git a/.vscode/launch.json b/.vscode/launch.json index 898defc9c6..fc821c76eb 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -419,6 +419,14 @@ "cwd": "${workspaceFolder}" }, + { + "name": "Fabric Sync (Linux)", + "type": "lldb", + "request": "launch", + "program": "${workspaceFolder}/out/debug/standalone/fabric-sync", + "cwd": "${workspaceFolder}" + }, + { "name": "OTA Requestor App (Linux)", "type": "lldb", diff --git a/build/toolchain/pw_fuzzer/BUILD.gn b/build/toolchain/pw_fuzzer/BUILD.gn index 385e57cc81..468a615448 100644 --- a/build/toolchain/pw_fuzzer/BUILD.gn +++ b/build/toolchain/pw_fuzzer/BUILD.gn @@ -13,6 +13,7 @@ # limitations under the License. import("//build_overrides/build.gni") +import("//build_overrides/googletest.gni") import("//build_overrides/pigweed.gni") import("$dir_pigweed/targets/host/target_toolchains.gni") @@ -61,7 +62,7 @@ gcc_toolchain("chip_pw_fuzztest") { dir_pw_third_party_abseil_cpp = "//third_party/abseil-cpp/src" dir_pw_third_party_fuzztest = "//third_party/fuzztest" - dir_pw_third_party_googletest = "//third_party/googletest" + dir_pw_third_party_googletest = "$dir_googletest" # TODO: Seems that re2 support within FuzzTest was deprecated, keeping it defined is triggering warning # Remove if re2 is indeed not needed diff --git a/build_overrides/googletest.gni b/build_overrides/googletest.gni new file mode 100644 index 0000000000..c06354b399 --- /dev/null +++ b/build_overrides/googletest.gni @@ -0,0 +1,18 @@ +# Copyright (c) 2024 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. + +declare_args() { + # Location of the GoogleTest repository. + dir_googletest = "//third_party/googletest" +} diff --git a/config/ios/args.gni b/config/darwin/args.gni similarity index 82% rename from config/ios/args.gni rename to config/darwin/args.gni index b4426a61a4..0e97318840 100644 --- a/config/ios/args.gni +++ b/config/darwin/args.gni @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Project CHIP Authors +# Copyright (c) 2024 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. @@ -14,9 +14,9 @@ import("//build_overrides/chip.gni") -chip_system_config_clock = "gettimeofday" chip_device_platform = "darwin" -chip_project_config_include_dirs = [ "${chip_root}/config/ios" ] +chip_project_config_include = "" +chip_system_project_config_include = "" pw_build_PIP_CONSTRAINTS = [ "${chip_root}/scripts/setup/constraints.txt" ] diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index f7685cf760..fde62765dd 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -143,9 +143,6 @@ endif() if(CONFIG_ENABLE_ICD_SERVER) chip_gn_arg_append("chip_enable_icd_server" "true") - if(CONFIG_ICD_ENFORCE_SIT_SLOW_POLL_LIMIT) - chip_gn_arg_append("icd_enforce_sit_slow_poll_limit" "true") - endif() if(CONFIG_ICD_REPORT_ON_ACTIVE_MODE) chip_gn_arg_append("chip_icd_report_on_active_mode" "true") endif() diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index 5c36284f07..c61ac770a6 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -32,7 +32,7 @@ menu "CHIP Core" default 8 help The maximum number of simultaneously active CHIP exchange contexts. - + An exchange context object is used to track the state of an ongoing CHIP message exchange (conversation) with a peer, e.g. a cloud service, a mobile application, or another device. @@ -410,13 +410,6 @@ menu "CHIP Device Layer" help Enables or Disables ICD server - config ICD_ENFORCE_SIT_SLOW_POLL_LIMIT - bool "Enforce SIT Slow Polling Max value to 15 seconds" - depends on ENABLE_ICD_SERVER - default n - help - Set to true to enforce SIT Slow Polling Max value to 15seconds - config ICD_REPORT_ON_ACTIVE_MODE bool "Emit a report on entering active mode" depends on ENABLE_ICD_SERVER diff --git a/config/esp32/components/chip/idf_component.yml b/config/esp32/components/chip/idf_component.yml index aeffec708d..2e7415827f 100644 --- a/config/esp32/components/chip/idf_component.yml +++ b/config/esp32/components/chip/idf_component.yml @@ -7,7 +7,7 @@ dependencies: - if: "target != esp32h2" espressif/esp_secure_cert_mgr: - version: "^2.3.0" + version: "^2.5.0" rules: - if: "idf_version >=4.3" @@ -26,6 +26,14 @@ dependencies: - if: "idf_version >=5.0" - if: "target != esp32h2" + # This matches the dependency of esp_insights + espressif/esp_diag_data_store: + version: "1.0.1" + require: public + rules: + - if: "idf_version >=5.0" + - if: "target != esp32h2" + espressif/esp_rcp_update: version: "1.2.0" rules: diff --git a/config/ios/CHIPProjectConfig.h b/config/ios/CHIPProjectConfig.h deleted file mode 100644 index dfa35f7cfd..0000000000 --- a/config/ios/CHIPProjectConfig.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * - * Copyright (c) 2020-2022 Project CHIP Authors - * Copyright (c) 2016-2017 Nest Labs, Inc. - * Copyright (c) 2019-2020 Google LLC. - * 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 - * Project-specific configuration file for iOS builds. - * - */ -#ifndef CHIPPROJECTCONFIG_H -#define CHIPPROJECTCONFIG_H - -// Enable UDP listening on demand in the CHIPDeviceController -#define CHIP_CONFIG_DEVICE_CONTROLLER_DEMAND_ENABLE_UDP 1 - -#define INET_CONFIG_OVERRIDE_SYSTEM_TCP_USER_TIMEOUT 0 - -// Uncomment this for a large Tunnel MTU. -//#define CHIP_CONFIG_TUNNEL_INTERFACE_MTU (9000) - -#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 0 - -#define CHIP_CONFIG_DATA_MANAGEMENT_CLIENT_EXPERIMENTAL 1 - -#define CHIP_CONFIG_MAX_SOFTWARE_VERSION_LENGTH 128 - -#ifndef CHIP_CONFIG_KVS_PATH -#define CHIP_CONFIG_KVS_PATH "chip.store" -#endif - -// The session pool size limits how many subscriptions we can have live at -// once. Home supports up to 1000 accessories, and we subscribe to all of them, -// so we need to make sure the pool is big enough for that. -#define CHIP_CONFIG_SECURE_SESSION_POOL_SIZE 1000 - -#endif /* CHIPPROJECTCONFIG_H */ diff --git a/config/nrfconnect/chip-module/CMakeLists.txt b/config/nrfconnect/chip-module/CMakeLists.txt index 3896ed6be7..b3180fdc1b 100644 --- a/config/nrfconnect/chip-module/CMakeLists.txt +++ b/config/nrfconnect/chip-module/CMakeLists.txt @@ -156,7 +156,6 @@ if (CONFIG_CHIP_ENABLE_ICD_SUPPORT) matter_add_gn_arg_bool ("chip_enable_icd_checkin" CONFIG_CHIP_ICD_CHECK_IN_SUPPORT) matter_add_gn_arg_bool ("chip_enable_icd_user_active_mode_trigger" CONFIG_CHIP_ICD_UAT_SUPPORT) matter_add_gn_arg_bool ("chip_enable_icd_dsls" CONFIG_CHIP_ICD_DSLS_SUPPORT) - matter_add_gn_arg_bool ("icd_enforce_sit_slow_poll_limit" TRUE) endif() if (CONFIG_CHIP_FACTORY_DATA OR CONFIG_CHIP_FACTORY_DATA_CUSTOM_BACKEND) diff --git a/config/nxp/chip-module/Kconfig.defaults b/config/nxp/chip-module/Kconfig.defaults index 3d0fcf08d7..cd2dd74b91 100644 --- a/config/nxp/chip-module/Kconfig.defaults +++ b/config/nxp/chip-module/Kconfig.defaults @@ -336,6 +336,9 @@ choice NXP_ENET_DRIVER default ETH_NXP_ENET endchoice +config NET_SOCKETS_POLL_MAX + default 7 + endif # Configure MBEDTLS lib diff --git a/config/nxp/chip-module/Kconfig.features b/config/nxp/chip-module/Kconfig.features index 9c388a20f9..50f72eb016 100644 --- a/config/nxp/chip-module/Kconfig.features +++ b/config/nxp/chip-module/Kconfig.features @@ -95,6 +95,8 @@ config CHIP_ETHERNET select NET_TCP select DNS_RESOLVER select MDNS_RESOLVER + select MDNS_RESPONDER + select DNS_SD select MBEDTLS_PKCS5_C select MBEDTLS_HKDF_C select MBEDTLS_ECDSA_C diff --git a/config/telink/chip-module/Kconfig.defaults b/config/telink/chip-module/Kconfig.defaults index ed8172b182..835b14c181 100644 --- a/config/telink/chip-module/Kconfig.defaults +++ b/config/telink/chip-module/Kconfig.defaults @@ -137,7 +137,7 @@ config BT_BUF_ACL_TX_SIZE default 251 config BT_RX_STACK_SIZE - default 810 if BT_B9X + default 1352 if BT_B9X default 2048 if BT_W91 config BT_HCI_TX_STACK_SIZE diff --git a/data_model/1.4/clusters/DemandResponseLoadControl.xml b/data_model/1.4/clusters/DemandResponseLoadControl.xml deleted file mode 100644 index 1acd1ea26c..0000000000 --- a/data_model/1.4/clusters/DemandResponseLoadControl.xml +++ /dev/null @@ -1,453 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/data_model/1.4/clusters/DeviceEnergyManagement.xml b/data_model/1.4/clusters/DeviceEnergyManagement.xml index 776a06f20b..3b95a7b8d4 100644 --- a/data_model/1.4/clusters/DeviceEnergyManagement.xml +++ b/data_model/1.4/clusters/DeviceEnergyManagement.xml @@ -65,9 +65,7 @@ Davis, CA 95616, USA - - - + @@ -566,7 +564,6 @@ Davis, CA 95616, USA - @@ -580,7 +577,6 @@ Davis, CA 95616, USA - @@ -604,7 +600,6 @@ Davis, CA 95616, USA - @@ -619,7 +614,6 @@ Davis, CA 95616, USA - diff --git a/data_model/1.4/clusters/DiagnosticsGeneral.xml b/data_model/1.4/clusters/DiagnosticsGeneral.xml index 44b891fbcd..1266705ba6 100644 --- a/data_model/1.4/clusters/DiagnosticsGeneral.xml +++ b/data_model/1.4/clusters/DiagnosticsGeneral.xml @@ -263,7 +263,6 @@ Davis, CA 95616, USA - diff --git a/data_model/1.4/clusters/DiagnosticsThread.xml b/data_model/1.4/clusters/DiagnosticsThread.xml index a55412d7fd..a712cebc8f 100644 --- a/data_model/1.4/clusters/DiagnosticsThread.xml +++ b/data_model/1.4/clusters/DiagnosticsThread.xml @@ -669,12 +669,18 @@ Davis, CA 95616, USA - + + + + - + + + + diff --git a/data_model/1.4/clusters/DoorLock.xml b/data_model/1.4/clusters/DoorLock.xml index 46d659da94..932532c768 100644 --- a/data_model/1.4/clusters/DoorLock.xml +++ b/data_model/1.4/clusters/DoorLock.xml @@ -66,7 +66,7 @@ Davis, CA 95616, USA - @@ -600,9 +600,6 @@ Davis, CA 95616, USA - - - diff --git a/data_model/1.4/clusters/bridge-clusters-EcosystemInformationCluster.xml b/data_model/1.4/clusters/EcosystemInformationCluster.xml similarity index 100% rename from data_model/1.4/clusters/bridge-clusters-EcosystemInformationCluster.xml rename to data_model/1.4/clusters/EcosystemInformationCluster.xml diff --git a/data_model/1.4/clusters/EnergyCalendar.xml b/data_model/1.4/clusters/EnergyCalendar.xml deleted file mode 100644 index 2ba9320361..0000000000 --- a/data_model/1.4/clusters/EnergyCalendar.xml +++ /dev/null @@ -1,287 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/data_model/1.4/clusters/EnergyEVSE.xml b/data_model/1.4/clusters/EnergyEVSE.xml index a4c865c309..352ac7e24a 100644 --- a/data_model/1.4/clusters/EnergyEVSE.xml +++ b/data_model/1.4/clusters/EnergyEVSE.xml @@ -69,10 +69,7 @@ Davis, CA 95616, USA - - - - + @@ -240,7 +237,6 @@ Davis, CA 95616, USA - diff --git a/data_model/1.4/clusters/Humidistat.xml b/data_model/1.4/clusters/Humidistat.xml deleted file mode 100644 index 1af5469848..0000000000 --- a/data_model/1.4/clusters/Humidistat.xml +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/data_model/1.4/clusters/ICDManagement.xml b/data_model/1.4/clusters/ICDManagement.xml index b6f76f48e2..d9cb7397da 100644 --- a/data_model/1.4/clusters/ICDManagement.xml +++ b/data_model/1.4/clusters/ICDManagement.xml @@ -70,7 +70,6 @@ Davis, CA 95616, USA - @@ -79,7 +78,6 @@ Davis, CA 95616, USA - @@ -87,18 +85,12 @@ Davis, CA 95616, USA - - - - + - - - - - - + + + @@ -227,12 +219,9 @@ Davis, CA 95616, USA - - - - - - + + + @@ -242,12 +231,9 @@ Davis, CA 95616, USA - - - - - - + + + diff --git a/data_model/1.4/clusters/LevelControl.xml b/data_model/1.4/clusters/LevelControl.xml index 404b1250e9..1a034d5802 100644 --- a/data_model/1.4/clusters/LevelControl.xml +++ b/data_model/1.4/clusters/LevelControl.xml @@ -165,7 +165,6 @@ Davis, CA 95616, USA - diff --git a/data_model/1.4/clusters/Mode_DeviceEnergyManagement.xml b/data_model/1.4/clusters/Mode_DeviceEnergyManagement.xml index 48cf6df495..9fca7f31ca 100644 --- a/data_model/1.4/clusters/Mode_DeviceEnergyManagement.xml +++ b/data_model/1.4/clusters/Mode_DeviceEnergyManagement.xml @@ -63,9 +63,7 @@ Davis, CA 95616, USA - - - + diff --git a/data_model/1.4/clusters/Mode_Dishwasher.xml b/data_model/1.4/clusters/Mode_Dishwasher.xml index 1c3a99b9e3..ca14d02672 100644 --- a/data_model/1.4/clusters/Mode_Dishwasher.xml +++ b/data_model/1.4/clusters/Mode_Dishwasher.xml @@ -57,10 +57,11 @@ Davis, CA 95616, USA :xrefstyle: basic --> - + + diff --git a/data_model/1.4/clusters/Mode_EVSE.xml b/data_model/1.4/clusters/Mode_EVSE.xml index 025e9de988..863a2b7d64 100644 --- a/data_model/1.4/clusters/Mode_EVSE.xml +++ b/data_model/1.4/clusters/Mode_EVSE.xml @@ -60,7 +60,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/1.4/clusters/Mode_LaundryWasher.xml b/data_model/1.4/clusters/Mode_LaundryWasher.xml index b5f557a4b4..a13253304d 100644 --- a/data_model/1.4/clusters/Mode_LaundryWasher.xml +++ b/data_model/1.4/clusters/Mode_LaundryWasher.xml @@ -57,10 +57,11 @@ Davis, CA 95616, USA :xrefstyle: basic --> - + + diff --git a/data_model/1.4/clusters/Mode_MicrowaveOven.xml b/data_model/1.4/clusters/Mode_MicrowaveOven.xml index 24d682feca..371b294849 100644 --- a/data_model/1.4/clusters/Mode_MicrowaveOven.xml +++ b/data_model/1.4/clusters/Mode_MicrowaveOven.xml @@ -57,9 +57,10 @@ Davis, CA 95616, USA :xrefstyle: basic --> - + + diff --git a/data_model/1.4/clusters/Mode_Oven.xml b/data_model/1.4/clusters/Mode_Oven.xml index a3e3323fe9..071f70d277 100644 --- a/data_model/1.4/clusters/Mode_Oven.xml +++ b/data_model/1.4/clusters/Mode_Oven.xml @@ -57,9 +57,10 @@ Davis, CA 95616, USA :xrefstyle: basic --> - + + diff --git a/data_model/1.4/clusters/Mode_Refrigerator.xml b/data_model/1.4/clusters/Mode_Refrigerator.xml index 2728ac0f42..692740e090 100644 --- a/data_model/1.4/clusters/Mode_Refrigerator.xml +++ b/data_model/1.4/clusters/Mode_Refrigerator.xml @@ -57,10 +57,11 @@ Davis, CA 95616, USA :xrefstyle: basic --> - + + diff --git a/data_model/1.4/clusters/OccupancySensing.xml b/data_model/1.4/clusters/OccupancySensing.xml index 7ca0d3631d..7400dde084 100644 --- a/data_model/1.4/clusters/OccupancySensing.xml +++ b/data_model/1.4/clusters/OccupancySensing.xml @@ -173,7 +173,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/1.4/clusters/OperationalState.xml b/data_model/1.4/clusters/OperationalState.xml index 354efa2400..d02635cf65 100644 --- a/data_model/1.4/clusters/OperationalState.xml +++ b/data_model/1.4/clusters/OperationalState.xml @@ -203,10 +203,7 @@ Davis, CA 95616, USA - - - - + diff --git a/data_model/1.4/clusters/OperationalState_Oven.xml b/data_model/1.4/clusters/OperationalState_Oven.xml index 710dea9806..e743fbf1d7 100644 --- a/data_model/1.4/clusters/OperationalState_Oven.xml +++ b/data_model/1.4/clusters/OperationalState_Oven.xml @@ -57,9 +57,10 @@ Davis, CA 95616, USA :xrefstyle: basic --> - + + diff --git a/data_model/1.4/clusters/OperationalState_RVC.xml b/data_model/1.4/clusters/OperationalState_RVC.xml index 9b83bc4dfd..fb9fea9d5d 100644 --- a/data_model/1.4/clusters/OperationalState_RVC.xml +++ b/data_model/1.4/clusters/OperationalState_RVC.xml @@ -117,10 +117,7 @@ Davis, CA 95616, USA - - - - + \ No newline at end of file diff --git a/data_model/1.4/clusters/PumpConfigurationControl.xml b/data_model/1.4/clusters/PumpConfigurationControl.xml index 9b7e4ab56d..2be5a44371 100644 --- a/data_model/1.4/clusters/PumpConfigurationControl.xml +++ b/data_model/1.4/clusters/PumpConfigurationControl.xml @@ -373,11 +373,8 @@ Davis, CA 95616, USA - - - + - diff --git a/data_model/1.4/clusters/Scenes.xml b/data_model/1.4/clusters/Scenes.xml index 1479d3ffd7..3de80abbc5 100644 --- a/data_model/1.4/clusters/Scenes.xml +++ b/data_model/1.4/clusters/Scenes.xml @@ -373,14 +373,16 @@ Davis, CA 95616, USA - + + - + + diff --git a/data_model/1.4/clusters/ThermostatUserInterfaceConfiguration.xml b/data_model/1.4/clusters/ThermostatUserInterfaceConfiguration.xml index d6a5224828..8b33ccedbd 100644 --- a/data_model/1.4/clusters/ThermostatUserInterfaceConfiguration.xml +++ b/data_model/1.4/clusters/ThermostatUserInterfaceConfiguration.xml @@ -106,17 +106,14 @@ Davis, CA 95616, USA - - - \ No newline at end of file diff --git a/data_model/1.4/clusters/WaterHeaterManagement.xml b/data_model/1.4/clusters/WaterHeaterManagement.xml index 96dcc2b112..49cdf1eeb2 100644 --- a/data_model/1.4/clusters/WaterHeaterManagement.xml +++ b/data_model/1.4/clusters/WaterHeaterManagement.xml @@ -168,7 +168,6 @@ Davis, CA 95616, USA - @@ -182,7 +181,6 @@ Davis, CA 95616, USA - diff --git a/data_model/1.4/clusters/cluster_ids.json b/data_model/1.4/clusters/cluster_ids.json index 9de2f243b3..687bbc3229 100644 --- a/data_model/1.4/clusters/cluster_ids.json +++ b/data_model/1.4/clusters/cluster_ids.json @@ -64,11 +64,9 @@ "144": "Electrical Power Measurement", "145": "Electrical Energy Measurement", "148": "Water Heater Management", - "150": "Demand Response Load Control", "151": "Messages", "152": "Device Energy Management", "153": "Energy EVSE", - "154": "Energy Calendar", "155": "Energy Preference", "156": "Power Topology", "157": "Energy EVSE Mode", @@ -81,7 +79,6 @@ "513": "Thermostat", "514": "Fan Control", "516": "Thermostat User Interface Configuration", - "517": "Humidistat", "768": "Color Control", "769": "Ballast Configuration", "1024": "Illuminance Measurement", diff --git a/data_model/1.4/device_types/DeviceEnergyManagement.xml b/data_model/1.4/device_types/DeviceEnergyManagement.xml index 86efccc02f..0a90a21edb 100644 --- a/data_model/1.4/device_types/DeviceEnergyManagement.xml +++ b/data_model/1.4/device_types/DeviceEnergyManagement.xml @@ -63,10 +63,7 @@ Davis, CA 95616, USA - - - - + @@ -77,7 +74,6 @@ Davis, CA 95616, USA - diff --git a/data_model/1.4/device_types/EnergyTariff.xml b/data_model/1.4/device_types/EnergyTariff.xml deleted file mode 100644 index 887bfa420d..0000000000 --- a/data_model/1.4/device_types/EnergyTariff.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/data_model/1.4/device_types/EnergyTariffCalendar.xml b/data_model/1.4/device_types/EnergyTariffCalendar.xml deleted file mode 100644 index 70d74b7239..0000000000 --- a/data_model/1.4/device_types/EnergyTariffCalendar.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/data_model/1.4/device_types/HeatPump.xml b/data_model/1.4/device_types/HeatPump.xml index 61f556c6ed..012060e034 100644 --- a/data_model/1.4/device_types/HeatPump.xml +++ b/data_model/1.4/device_types/HeatPump.xml @@ -65,7 +65,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/1.4/device_types/HumidifierDehumidifier.xml b/data_model/1.4/device_types/HumidifierDehumidifier.xml deleted file mode 100644 index 973919635f..0000000000 --- a/data_model/1.4/device_types/HumidifierDehumidifier.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/data_model/1.4/device_types/RootNodeDeviceType.xml b/data_model/1.4/device_types/RootNodeDeviceType.xml index 13473e44ca..99ce8fc319 100644 --- a/data_model/1.4/device_types/RootNodeDeviceType.xml +++ b/data_model/1.4/device_types/RootNodeDeviceType.xml @@ -160,16 +160,16 @@ Davis, CA 95616, USA - + + + + - - - - - - + + + diff --git a/data_model/1.4/spec_sha b/data_model/1.4/spec_sha index 094141d3c0..b48b447d73 100644 --- a/data_model/1.4/spec_sha +++ b/data_model/1.4/spec_sha @@ -1 +1 @@ -2760ea4338a4b612ac025bfa5677e6918041c1d4 +3d8fc9ae05045a53fdaffd7e3593f92a48b10e30 diff --git a/docs/README.md b/docs/README.md index e5aad317e6..e96ab29f04 100644 --- a/docs/README.md +++ b/docs/README.md @@ -15,6 +15,11 @@ [Visual Studio Code](https://code.visualstudio.com/) can be found in [the development guide](./VSCODE_DEVELOPMENT.md) +## Issue triage + +Project issues are triaged and maintained according to the +[issue triage](./issue_triage.md) guide. + ## Platform Guides - Various guides are available [here](./guides/README.md) that cover platform diff --git a/docs/cluster_and_device_type_dev/cluster_and_device_type_dev.md b/docs/cluster_and_device_type_dev/cluster_and_device_type_dev.md index e2460ff5a0..a19336a593 100644 --- a/docs/cluster_and_device_type_dev/cluster_and_device_type_dev.md +++ b/docs/cluster_and_device_type_dev/cluster_and_device_type_dev.md @@ -1,4 +1,4 @@ -# New Clusters & Device Types +# Implementing New Clusters & Device Types The goal of new cluster and device type development is to diff --git a/docs/cluster_and_device_type_dev/how_to_add_new_dts_and_clusters.md b/docs/cluster_and_device_type_dev/how_to_add_new_dts_and_clusters.md index 90d82c6031..3e3704699d 100644 --- a/docs/cluster_and_device_type_dev/how_to_add_new_dts_and_clusters.md +++ b/docs/cluster_and_device_type_dev/how_to_add_new_dts_and_clusters.md @@ -1,4 +1,4 @@ -# How to Add New Device Types & Clusters +# Adding new clusters and device types to the codegen This document outlines the process needed to add a new Matter device type and related clusters. Obviously, the steps below assume that the related Matter diff --git a/docs/cluster_and_device_type_dev/index.md b/docs/cluster_and_device_type_dev/index.md index cf43d02651..0ec65df347 100644 --- a/docs/cluster_and_device_type_dev/index.md +++ b/docs/cluster_and_device_type_dev/index.md @@ -13,5 +13,5 @@ types in the SDK. ``` - [Cluster and device type development](./cluster_and_device_type_dev.md) -- [How To Add New Device Types & Clusters](how_to_add_new_dts_and_clusters.md) +- [How To Add New Device Types & Clusters](./how_to_add_new_dts_and_clusters.md) - [Cluster Server design](./unit_testing_clusters.md) diff --git a/docs/guides/repl/Matter_Access_Control.ipynb b/docs/development_controllers/chip-repl/Matter_Access_Control.ipynb similarity index 100% rename from docs/guides/repl/Matter_Access_Control.ipynb rename to docs/development_controllers/chip-repl/Matter_Access_Control.ipynb diff --git a/docs/guides/repl/Matter_Basic_Interactions.ipynb b/docs/development_controllers/chip-repl/Matter_Basic_Interactions.ipynb similarity index 100% rename from docs/guides/repl/Matter_Basic_Interactions.ipynb rename to docs/development_controllers/chip-repl/Matter_Basic_Interactions.ipynb diff --git a/docs/guides/repl/Matter_Multi_Fabric_Commissioning.ipynb b/docs/development_controllers/chip-repl/Matter_Multi_Fabric_Commissioning.ipynb similarity index 100% rename from docs/guides/repl/Matter_Multi_Fabric_Commissioning.ipynb rename to docs/development_controllers/chip-repl/Matter_Multi_Fabric_Commissioning.ipynb diff --git a/docs/guides/repl/Matter_REPL_Intro.ipynb b/docs/development_controllers/chip-repl/Matter_REPL_Intro.ipynb similarity index 100% rename from docs/guides/repl/Matter_REPL_Intro.ipynb rename to docs/development_controllers/chip-repl/Matter_REPL_Intro.ipynb diff --git a/docs/development_controllers/chip-repl/index.md b/docs/development_controllers/chip-repl/index.md new file mode 100644 index 0000000000..b17962ab66 --- /dev/null +++ b/docs/development_controllers/chip-repl/index.md @@ -0,0 +1,15 @@ +# chip-repl + +```{toctree} +:glob: +:maxdepth: 1 +:hidden: + +* +``` + +- [Matter REPL](./matter-repl.md) +- [Intro](./Matter_REPL_Intro.ipynb) +- [Access Control](./Matter_Access_Control.ipynb) +- [Basic interactions](./Matter_Basic_Interactions.ipynb) +- [Fabric Commissioning](./Matter_Multi_Fabric_Commissioning.ipynb) diff --git a/docs/guides/matter-repl.md b/docs/development_controllers/chip-repl/matter-repl.md similarity index 97% rename from docs/guides/matter-repl.md rename to docs/development_controllers/chip-repl/matter-repl.md index e7ebba5b3e..9bb3e60916 100644 --- a/docs/guides/matter-repl.md +++ b/docs/development_controllers/chip-repl/matter-repl.md @@ -244,8 +244,8 @@ Some tests provides the option to exclude them. For example, you can use It is recommended to use the test wrapper to run mobile-device-test.py, for example, you can run: -``` -./scripts/tests/run_python_test.py --app chip-all-clusters-app --factoryreset +```shell +./scripts/tests/run_python_test.py --app chip-all-clusters-app --factory-reset ``` It provides some extra options, for example: @@ -254,7 +254,7 @@ It provides some extra options, for example: optional arguments: -h, --help show this help message and exit --app APP Path to local application to use, omit to use external apps. - --factoryreset Remove app config and repl configs (/tmp/chip* and /tmp/repl*) before running the tests. + --factory-reset Remove app config and repl configs (/tmp/chip* and /tmp/repl*) before running the tests. --app-args APP_ARGS The extra parameters passed to the device side app. --script SCRIPT Path to the test script to use, omit to use the default test script (mobile-device-test.py). --script-args SCRIPT_ARGS Arguments for the REPL test script @@ -263,8 +263,8 @@ optional arguments: You can pass your own flags for mobile-device-test.py by appending them to the command line with two dashes, for example: -``` -./scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-no-ble-no-wifi-tsan-clang/chip-all-clusters-app --factoryreset --script-args "-t 90 --disable-test ClusterObjectTests.TestTimedRequestTimeout" +```shell +./scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-no-ble-no-wifi-tsan-clang/chip-all-clusters-app --factory-reset --script-args "-t 90 --disable-test ClusterObjectTests.TestTimedRequestTimeout" ``` will pass `-t 90 --disable-test ClusterObjectTests.TestTimedRequestTimeout` to diff --git a/docs/guides/python_chip_controller_advanced_usage.md b/docs/development_controllers/chip-repl/python_chip_controller_advanced_usage.md similarity index 100% rename from docs/guides/python_chip_controller_advanced_usage.md rename to docs/development_controllers/chip-repl/python_chip_controller_advanced_usage.md diff --git a/docs/guides/python_chip_controller_building.md b/docs/development_controllers/chip-repl/python_chip_controller_building.md similarity index 98% rename from docs/guides/python_chip_controller_building.md rename to docs/development_controllers/chip-repl/python_chip_controller_building.md index 8a7acc884a..aa49adad24 100644 --- a/docs/guides/python_chip_controller_building.md +++ b/docs/development_controllers/chip-repl/python_chip_controller_building.md @@ -39,7 +39,7 @@ Linux (amd64 / aarch64) or macOS. To build and run the Python CHIP controller: 1. Install all necessary packages and prepare the build system. For more - details, see the [Building Matter](BUILDING.md) documentation: + details, see the [Building Matter](../../guides/BUILDING.md) documentation: ``` sudo apt-get update @@ -77,7 +77,8 @@ To build and run the Python CHIP controller: 5. Build and install the Python CHIP controller: ``` - scripts/build_python.sh -m platform -i separate + scripts/build_python.sh -m platform -i out/python_env + source out/python_env/bin/activate ``` > Note: This builds the Python CHIP Controller along with the CHIP REPL as diff --git a/docs/guides/chip_tool_guide.md b/docs/development_controllers/chip-tool/chip_tool_guide.md similarity index 98% rename from docs/guides/chip_tool_guide.md rename to docs/development_controllers/chip-tool/chip_tool_guide.md index 31aa29353c..81000368a4 100644 --- a/docs/guides/chip_tool_guide.md +++ b/docs/development_controllers/chip-tool/chip_tool_guide.md @@ -9,36 +9,33 @@ the setup payload or performing discovery actions.
-## Source files +## Installation -You can find source files of the CHIP Tool in the `examples/chip-tool` -directory. - -> **Note:** The CHIP Tool caches the configuration state in the -> `/tmp/chip_tool_config.ini` file. Deleting this and other `.ini` files in the -> `/tmp` directory can sometimes resolve issues related to stale configuration. +On Linux distributions +[running snapd](https://snapcraft.io/docs/installing-snapd), such as Ubuntu, the +CHIP Tool can be installed using the +[chip-tool snap](https://snapcraft.io/chip-tool). To do this, run: -> **Note:** To make the configuration persistent (since `/tmp` directory might -> be flushed at each reboot) you can change the directory where CHIP Tool caches -> its configuration by using the option `--storage-directory` +``` +sudo snap install chip-tool +``` -
+## Building from source -## Building and running the CHIP Tool +The source files of the CHIP Tool are available in the `examples/chip-tool` +directory. -Before you can use the CHIP Tool, you must compile it from source on Linux -(amd64/aarch64) or macOS. If you want to run it on Raspberry Pi, it must use a -64-bit OS. +The source can be compiled on Linux (amd64/aarch64) or macOS. If you want to run +it on Raspberry Pi, you must use a 64-bit OS. > **Note:** To ensure compatibility, always build the CHIP Tool and the Matter > device from the same revision of the `connectedhomeip` repository. -### Building the CHIP Tool - -To build and run the CHIP Tool: +To build the CHIP Tool: 1. Install all required packages for Matter and prepare the source code and the - build system. Read the [Building Matter](BUILDING.md) guide for instructions. + build system. Read the [Building Matter](../../guides/BUILDING.md) guide for + instructions. 2. Open a command prompt in the `connectedhomeip` directory. 3. Run the following command: @@ -49,10 +46,16 @@ To build and run the CHIP Tool: In this command, `BUILD_PATH` specifies where the target binaries are to be placed. -### Running the CHIP Tool +## Running the CHIP Tool + +If you installed the CHIP Tool as a snap, the command to run it would be: + +``` +$ chip-tool +``` -To check if the CHIP Tool runs correctly, execute the following command from the -`BUILD_PATH` directory: +If you compiled the CHIP Tool from source, it can be executed with the following +command from the `BUILD_PATH` directory: ``` $ ./chip-tool @@ -67,6 +70,13 @@ more complex command by appending it with sub-commands. Examples of specific commands and their use cases are described in the [Supported commands and options](#supported-commands-and-options) section. +> **Note:** The CHIP Tool caches the configuration state in the +> `/tmp/chip_tool_config.ini` file. Deleting this and other `.ini` files in the +> `/tmp` directory can sometimes resolve issues related to stale configuration. +> To make the configuration persistent you can change the directory where CHIP +> Tool caches its configuration by using the command line option +> `--storage-directory` +
## CHIP Tool modes diff --git a/docs/development_controllers/chip-tool/index.md b/docs/development_controllers/chip-tool/index.md new file mode 100644 index 0000000000..69dc7dcd68 --- /dev/null +++ b/docs/development_controllers/chip-tool/index.md @@ -0,0 +1,11 @@ +# chip-tool + +```{toctree} +:glob: +:maxdepth: 1 +:hidden: + +* +``` + +- [chip-tool guide](./chip_tool_guide.md) diff --git a/docs/development_controllers/index.md b/docs/development_controllers/index.md new file mode 100644 index 0000000000..dfc6b330b1 --- /dev/null +++ b/docs/development_controllers/index.md @@ -0,0 +1,13 @@ +# Development Controllers + +```{toctree} +:glob: +:maxdepth: 1 +:hidden: + +chip-repl/index +chip-tool/index +``` + +- [chip-tool](./chip-tool) +- [chip-repl](./chip-repl) diff --git a/docs/examples/air_purifier.md b/docs/examples/air_purifier.md new file mode 100644 index 0000000000..fbac74357f --- /dev/null +++ b/docs/examples/air_purifier.md @@ -0,0 +1,8 @@ +## Air Purifier + +```{toctree} +:glob: +:maxdepth: 1 + +air-purifier-app/**/README +``` diff --git a/docs/examples/air_quality.md b/docs/examples/air_quality.md new file mode 100644 index 0000000000..2f6e43a778 --- /dev/null +++ b/docs/examples/air_quality.md @@ -0,0 +1,8 @@ +## Air Quality + +```{toctree} +:glob: +:maxdepth: 1 + +air-quality-sensor-app/**/README +``` diff --git a/docs/examples/all_clusters.md b/docs/examples/all_clusters.md new file mode 100644 index 0000000000..f16a2723e8 --- /dev/null +++ b/docs/examples/all_clusters.md @@ -0,0 +1,8 @@ +## All clusters + +```{toctree} +:glob: +:maxdepth: 1 + +all-clusters-app/**/README +``` diff --git a/docs/examples/all_clusters_minimal.md b/docs/examples/all_clusters_minimal.md new file mode 100644 index 0000000000..0000772c76 --- /dev/null +++ b/docs/examples/all_clusters_minimal.md @@ -0,0 +1,8 @@ +## All clusters minimal + +```{toctree} +:glob: +:maxdepth: 1 + +all-clusters-minimal-app/**/README +``` diff --git a/docs/examples/bridge.md b/docs/examples/bridge.md new file mode 100644 index 0000000000..fe4655da58 --- /dev/null +++ b/docs/examples/bridge.md @@ -0,0 +1,8 @@ +## Bridge + +```{toctree} +:glob: +:maxdepth: 1 + +bridge-app/**/README +``` diff --git a/docs/examples/chef.md b/docs/examples/chef.md new file mode 100644 index 0000000000..e17ea88b64 --- /dev/null +++ b/docs/examples/chef.md @@ -0,0 +1,9 @@ +## CHEF + +```{toctree} +:glob: +:maxdepth: 1 + +chef/README* +chef/**/README +``` diff --git a/docs/examples/chip_tool.md b/docs/examples/chip_tool.md new file mode 100644 index 0000000000..8c9b74deab --- /dev/null +++ b/docs/examples/chip_tool.md @@ -0,0 +1,8 @@ +## CHIP Tool example + +```{toctree} +:glob: +:maxdepth: 1 + +chip-tool/README +``` diff --git a/docs/examples/contact_sensor.md b/docs/examples/contact_sensor.md new file mode 100644 index 0000000000..1daca03f00 --- /dev/null +++ b/docs/examples/contact_sensor.md @@ -0,0 +1,8 @@ +## Contact Sensor + +```{toctree} +:glob: +:maxdepth: 1 + +contact-sensor-app/**/README +``` diff --git a/docs/examples/darwin.md b/docs/examples/darwin.md new file mode 100644 index 0000000000..f16fca866a --- /dev/null +++ b/docs/examples/darwin.md @@ -0,0 +1,8 @@ +## CHIP Tool Darwin + +```{toctree} +:glob: +:maxdepth: 1 + +darwin-framework-tool/README +``` diff --git a/docs/examples/dishwasher.md b/docs/examples/dishwasher.md new file mode 100644 index 0000000000..7ceaa98791 --- /dev/null +++ b/docs/examples/dishwasher.md @@ -0,0 +1,8 @@ +## Dishwasher + +```{toctree} +:glob: +:maxdepth: 1 + +dishwasher-app/**/README +``` diff --git a/docs/examples/energy_management.md b/docs/examples/energy_management.md new file mode 100644 index 0000000000..dfec14dd68 --- /dev/null +++ b/docs/examples/energy_management.md @@ -0,0 +1,8 @@ +## Energy Management + +```{toctree} +:glob: +:maxdepth: 1 + +energy-management-app/**/README +``` diff --git a/docs/examples/fabric_admin.md b/docs/examples/fabric_admin.md new file mode 100644 index 0000000000..fa47159c50 --- /dev/null +++ b/docs/examples/fabric_admin.md @@ -0,0 +1,8 @@ +## Fabric Admin + +```{toctree} +:glob: +:maxdepth: 1 + +fabric-admin/README +``` diff --git a/docs/examples/fabric_bridge.md b/docs/examples/fabric_bridge.md new file mode 100644 index 0000000000..de08b59318 --- /dev/null +++ b/docs/examples/fabric_bridge.md @@ -0,0 +1,8 @@ +## Fabric Bridge + +```{toctree} +:glob: +:maxdepth: 1 + +fabric-bridge-app/**/README +``` diff --git a/docs/examples/fabric_sync.md b/docs/examples/fabric_sync.md new file mode 100644 index 0000000000..269448f8cf --- /dev/null +++ b/docs/examples/fabric_sync.md @@ -0,0 +1,8 @@ +## Fabric Sync + +```{toctree} +:glob: +:maxdepth: 1 + +fabric-sync/README +``` diff --git a/docs/examples/index.md b/docs/examples/index.md index 67dcfcf36b..75118fa933 100644 --- a/docs/examples/index.md +++ b/docs/examples/index.md @@ -1,390 +1,11 @@ # Examples -The Matter SDK provides examples of Matter devices for different development -platforms. - -## Air Quality Sensor example - -```{toctree} -:glob: -:maxdepth: 1 - -air-quality-sensor-app/**/README -``` - -## All clusters example - -```{toctree} -:glob: -:maxdepth: 1 - -all-clusters-app/**/README -``` - -## All clusters minimal example - -```{toctree} -:glob: -:maxdepth: 1 - -all-clusters-minimal-app/**/README -``` - -## Bridge example - -```{toctree} -:glob: -:maxdepth: 1 - -bridge-app/**/README -``` - -## Contact Sensor Example - -```{toctree} -:glob: -:maxdepth: 1 - -contact-sensor-app/**/README -``` - -## CHEF example - -```{toctree} -:glob: -:maxdepth: 1 - -chef/README* -chef/**/README -``` - -## CHIP Tool example - -```{toctree} -:glob: -:maxdepth: 1 - -chip-tool/README -``` - -## CHIP Tool Darwin example - -```{toctree} -:glob: -:maxdepth: 1 - -darwin-framework-tool/README -``` - -## Energy Management example - -```{toctree} -:glob: -:maxdepth: 1 - -energy-management-app/**/README -``` - -## Fabric Admin example - -```{toctree} -:glob: -:maxdepth: 1 - -fabric-admin/README -``` - -## Fabric Bridge example - -```{toctree} -:glob: -:maxdepth: 1 - -fabric-bridge-app/**/README -``` - -## Java matter controller example - -```{toctree} -:glob: -:maxdepth: 1 - -java-matter-controller/README -``` - -## Kotlin matter controller example - -```{toctree} -:glob: -:maxdepth: 1 - -kotlin-matter-controller/README -``` - -## Virtual Device App example - -```{toctree} -:glob: -:maxdepth: 1 - -virtual-device-app/**/README -``` - -## Laundry washer example - -```{toctree} -:glob: -:maxdepth: 1 - -laundry-washer-app/**/README -``` - -## Lighting example - ```{toctree} :glob: -:maxdepth: 1 +:maxdepth: 2 -lighting-app/**/README -lighting-app/qpg/APPLICATION +* ``` -## Lighting example without unique id - -```{toctree} -:glob: -:maxdepth: 1 - -lighting-app-data-mode-no-unique-id/**/README -``` - -## Light switch example - -```{toctree} -:glob: -:maxdepth: 1 - -light-switch-app/**/README -light-switch-app/qpg/APPLICATION -``` - -## Lock example - -```{toctree} -:glob: -:maxdepth: 1 - -lock-app/**/README -lock-app/qpg/APPLICATION -``` - -## Log source example - -```{toctree} -:glob: -:maxdepth: 1 - -log-source-app/**/README -``` - -## Minimal MDNS example - -```{toctree} -:glob: -:maxdepth: 1 - -minimal-mdns/README -``` - -## OTA Provider example - -```{toctree} -:glob: -:maxdepth: 1 - -ota-provider-app/**/README -``` - -## OTA Requestor example - -```{toctree} -:glob: -:maxdepth: 1 - -ota-requestor-app/**/README -``` - -## Persistent storage example - -```{toctree} -:glob: -:maxdepth: 1 - -persistent-storage/**/README -persistent-storage/**/APPLICATION -``` - -## Pigweed example - -```{toctree} -:glob: -:maxdepth: 1 - -pigweed-app/**/README -``` - -## Pump example - -```{toctree} -:glob: -:maxdepth: 1 - -pump-app/**/README -``` - -## Pump controller example - -```{toctree} -:glob: -:maxdepth: 1 - -pump-controller-app/**/README -``` - -## Refrigerator example - -```{toctree} -:glob: -:maxdepth: 1 - -refrigerator-app/**/README -``` - -## Shell example - -```{toctree} -:glob: -:maxdepth: 1 - -shell/README* -shell/**/README -``` - -## Smoke CO Alarm example - -```{toctree} -:glob: -:maxdepth: 1 - -smoke-co-alarm-app/**/README -``` - -## Dishwasher example - -```{toctree} -:glob: -:maxdepth: 1 - -dishwasher-app/**/README -``` - -## Microwave oven example - -```{toctree} -:glob: -:maxdepth: 1 - -microwave-oven-app/**/README -``` - -## Temperature measurement example - -```{toctree} -:glob: -:maxdepth: 1 - -temperature-measurement-app/**/README -``` - -## Thermostat example - -```{toctree} -:glob: -:maxdepth: 1 - -thermostat/**/README -thermostat/qpg/APPLICATION -``` - -## TV example - -```{toctree} -:glob: -:maxdepth: 1 - -tv-app/**/README -``` - -## TV casting example - -```{toctree} -:glob: -:maxdepth: 1 - -tv-casting-app/**/README -tv-casting-app/APIs.md -``` - -## Window example - -```{toctree} -:glob: -:maxdepth: 1 - -window-app/**/README -``` - -## RVC example - -```{toctree} -:glob: -:maxdepth: 1 - -rvc-app/README -``` - -## Air Purifier Example - -```{toctree} -:glob: -:maxdepth: 1 - -air-purifier-app/**/README -``` - -## Network Infrastructure Manager example - -```{toctree} -:glob: -:maxdepth: 1 - -network-manager-app/README -``` - -## Lit ICD example - -```{toctree} -:glob: -:maxdepth: 1 - -lit-icd-app/**/README -``` - -## Thread Border Router example - -```{toctree} -:glob: -:maxdepth: 1 - -thread-br-app/**/README -``` +The Matter SDK provides examples of Matter devices for different development +platforms. diff --git a/docs/examples/java_matter_controller.md b/docs/examples/java_matter_controller.md new file mode 100644 index 0000000000..58af7cbf26 --- /dev/null +++ b/docs/examples/java_matter_controller.md @@ -0,0 +1,8 @@ +## Java matter controller + +```{toctree} +:glob: +:maxdepth: 1 + +java-matter-controller/README +``` diff --git a/docs/examples/kotlin_matter_controller.md b/docs/examples/kotlin_matter_controller.md new file mode 100644 index 0000000000..9241a1ef18 --- /dev/null +++ b/docs/examples/kotlin_matter_controller.md @@ -0,0 +1,8 @@ +## Kotlin matter controller + +```{toctree} +:glob: +:maxdepth: 1 + +kotlin-matter-controller/README +``` diff --git a/docs/examples/laundry_washer.md b/docs/examples/laundry_washer.md new file mode 100644 index 0000000000..3a522c8f82 --- /dev/null +++ b/docs/examples/laundry_washer.md @@ -0,0 +1,8 @@ +## Laundry washer + +```{toctree} +:glob: +:maxdepth: 1 + +laundry-washer-app/**/README +``` diff --git a/docs/examples/light_switch.md b/docs/examples/light_switch.md new file mode 100644 index 0000000000..1a887fc6b4 --- /dev/null +++ b/docs/examples/light_switch.md @@ -0,0 +1,9 @@ +## Light switch + +```{toctree} +:glob: +:maxdepth: 1 + +light-switch-app/**/README +light-switch-app/qpg/APPLICATION +``` diff --git a/docs/examples/lighting.md b/docs/examples/lighting.md new file mode 100644 index 0000000000..8870e50372 --- /dev/null +++ b/docs/examples/lighting.md @@ -0,0 +1,9 @@ +## Lighting + +```{toctree} +:glob: +:maxdepth: 1 + +lighting-app/**/README +lighting-app/qpg/APPLICATION +``` diff --git a/docs/examples/lighting_no_unique_id.md b/docs/examples/lighting_no_unique_id.md new file mode 100644 index 0000000000..a71f9df522 --- /dev/null +++ b/docs/examples/lighting_no_unique_id.md @@ -0,0 +1,8 @@ +## Lighting without unique id + +```{toctree} +:glob: +:maxdepth: 1 + +lighting-app-data-mode-no-unique-id/**/README +``` diff --git a/docs/examples/lit_icd.md b/docs/examples/lit_icd.md new file mode 100644 index 0000000000..8678c44fcd --- /dev/null +++ b/docs/examples/lit_icd.md @@ -0,0 +1,8 @@ +## Lit ICD + +```{toctree} +:glob: +:maxdepth: 1 + +lit-icd-app/**/README +``` diff --git a/docs/examples/lock.md b/docs/examples/lock.md new file mode 100644 index 0000000000..16ab19dc64 --- /dev/null +++ b/docs/examples/lock.md @@ -0,0 +1,9 @@ +## Lock + +```{toctree} +:glob: +:maxdepth: 1 + +lock-app/**/README +lock-app/qpg/APPLICATION +``` diff --git a/docs/examples/log_source.md b/docs/examples/log_source.md new file mode 100644 index 0000000000..caec22654d --- /dev/null +++ b/docs/examples/log_source.md @@ -0,0 +1,8 @@ +## Log source + +```{toctree} +:glob: +:maxdepth: 1 + +log-source-app/**/README +``` diff --git a/docs/examples/microwave.md b/docs/examples/microwave.md new file mode 100644 index 0000000000..c5f659f873 --- /dev/null +++ b/docs/examples/microwave.md @@ -0,0 +1,8 @@ +## Microwave ovens + +```{toctree} +:glob: +:maxdepth: 1 + +microwave-oven-app/**/README +``` diff --git a/docs/examples/minimal_mdns.md b/docs/examples/minimal_mdns.md new file mode 100644 index 0000000000..9d65b4dab2 --- /dev/null +++ b/docs/examples/minimal_mdns.md @@ -0,0 +1,8 @@ +## Minimal MDNS + +```{toctree} +:glob: +:maxdepth: 1 + +minimal-mdns/README +``` diff --git a/docs/examples/network_infrastructure_manager.md b/docs/examples/network_infrastructure_manager.md new file mode 100644 index 0000000000..bcc0591037 --- /dev/null +++ b/docs/examples/network_infrastructure_manager.md @@ -0,0 +1,8 @@ +## Network Infrastructure Manager + +```{toctree} +:glob: +:maxdepth: 1 + +network-manager-app/README +``` diff --git a/docs/examples/ota_provider.md b/docs/examples/ota_provider.md new file mode 100644 index 0000000000..3470d9fe07 --- /dev/null +++ b/docs/examples/ota_provider.md @@ -0,0 +1,8 @@ +## OTA Provider + +```{toctree} +:glob: +:maxdepth: 1 + +ota-provider-app/**/README +``` diff --git a/docs/examples/ota_requestor.md b/docs/examples/ota_requestor.md new file mode 100644 index 0000000000..9cf5a75fea --- /dev/null +++ b/docs/examples/ota_requestor.md @@ -0,0 +1,8 @@ +## OTA Requestor + +```{toctree} +:glob: +:maxdepth: 1 + +ota-requestor-app/**/README +``` diff --git a/docs/examples/persistent_storage.md b/docs/examples/persistent_storage.md new file mode 100644 index 0000000000..5f5f5d1758 --- /dev/null +++ b/docs/examples/persistent_storage.md @@ -0,0 +1,9 @@ +## Persistent storage + +```{toctree} +:glob: +:maxdepth: 1 + +persistent-storage/**/README +persistent-storage/**/APPLICATION +``` diff --git a/docs/examples/pigweed.md b/docs/examples/pigweed.md new file mode 100644 index 0000000000..bf670bebd0 --- /dev/null +++ b/docs/examples/pigweed.md @@ -0,0 +1,8 @@ +## Pigweed + +```{toctree} +:glob: +:maxdepth: 1 + +pigweed-app/**/README +``` diff --git a/docs/examples/pump.md b/docs/examples/pump.md new file mode 100644 index 0000000000..001a7df3fc --- /dev/null +++ b/docs/examples/pump.md @@ -0,0 +1,8 @@ +## Pump + +```{toctree} +:glob: +:maxdepth: 1 + +pump-app/**/README +``` diff --git a/docs/examples/pump_controler.md b/docs/examples/pump_controler.md new file mode 100644 index 0000000000..ff7f51f5ec --- /dev/null +++ b/docs/examples/pump_controler.md @@ -0,0 +1,8 @@ +## Pump controller + +```{toctree} +:glob: +:maxdepth: 1 + +pump-controller-app/**/README +``` diff --git a/docs/examples/refrigerator.md b/docs/examples/refrigerator.md new file mode 100644 index 0000000000..455e8fe703 --- /dev/null +++ b/docs/examples/refrigerator.md @@ -0,0 +1,8 @@ +## Refrigerator + +```{toctree} +:glob: +:maxdepth: 1 + +refrigerator-app/**/README +``` diff --git a/docs/examples/rvc.md b/docs/examples/rvc.md new file mode 100644 index 0000000000..e0d033c447 --- /dev/null +++ b/docs/examples/rvc.md @@ -0,0 +1,8 @@ +## RVC + +```{toctree} +:glob: +:maxdepth: 1 + +rvc-app/README +``` diff --git a/docs/examples/shell.md b/docs/examples/shell.md new file mode 100644 index 0000000000..3a0536a3dc --- /dev/null +++ b/docs/examples/shell.md @@ -0,0 +1,9 @@ +## Shell + +```{toctree} +:glob: +:maxdepth: 1 + +shell/README* +shell/**/README +``` diff --git a/docs/examples/smoke_co.md b/docs/examples/smoke_co.md new file mode 100644 index 0000000000..9144276c7a --- /dev/null +++ b/docs/examples/smoke_co.md @@ -0,0 +1,8 @@ +## Smoke CO Alarm example + +```{toctree} +:glob: +:maxdepth: 1 + +smoke-co-alarm-app/**/README +``` diff --git a/docs/examples/tbr.md b/docs/examples/tbr.md new file mode 100644 index 0000000000..512a113222 --- /dev/null +++ b/docs/examples/tbr.md @@ -0,0 +1,8 @@ +## Thread Border Router + +```{toctree} +:glob: +:maxdepth: 1 + +thread-br-app/**/README +``` diff --git a/docs/examples/temperature_measurement.md b/docs/examples/temperature_measurement.md new file mode 100644 index 0000000000..cf8235b1d4 --- /dev/null +++ b/docs/examples/temperature_measurement.md @@ -0,0 +1,8 @@ +## Temperature measurement + +```{toctree} +:glob: +:maxdepth: 1 + +temperature-measurement-app/**/README +``` diff --git a/docs/examples/thermostat.md b/docs/examples/thermostat.md new file mode 100644 index 0000000000..8eb87892be --- /dev/null +++ b/docs/examples/thermostat.md @@ -0,0 +1,9 @@ +## Thermostat + +```{toctree} +:glob: +:maxdepth: 1 + +thermostat/**/README +thermostat/qpg/APPLICATION +``` diff --git a/docs/examples/tv.md b/docs/examples/tv.md new file mode 100644 index 0000000000..ee97387402 --- /dev/null +++ b/docs/examples/tv.md @@ -0,0 +1,8 @@ +## TV + +```{toctree} +:glob: +:maxdepth: 1 + +tv-app/**/README +``` diff --git a/docs/examples/tv_casting.md b/docs/examples/tv_casting.md new file mode 100644 index 0000000000..caeedf9e6d --- /dev/null +++ b/docs/examples/tv_casting.md @@ -0,0 +1,9 @@ +## TV casting + +```{toctree} +:glob: +:maxdepth: 1 + +tv-casting-app/**/README +tv-casting-app/APIs.md +``` diff --git a/docs/examples/virtual_device.md b/docs/examples/virtual_device.md new file mode 100644 index 0000000000..0b50f14503 --- /dev/null +++ b/docs/examples/virtual_device.md @@ -0,0 +1,8 @@ +## Virtual Device App + +```{toctree} +:glob: +:maxdepth: 1 + +virtual-device-app/**/README +``` diff --git a/docs/examples/window.md b/docs/examples/window.md new file mode 100644 index 0000000000..2b4993641c --- /dev/null +++ b/docs/examples/window.md @@ -0,0 +1,8 @@ +## Window + +```{toctree} +:glob: +:maxdepth: 1 + +window-app/**/README +``` diff --git a/docs/getting_started/SDKBasics.md b/docs/getting_started/SDKBasics.md index 7f2c81f285..eaad3baac8 100644 --- a/docs/getting_started/SDKBasics.md +++ b/docs/getting_started/SDKBasics.md @@ -1,4 +1,4 @@ -# SDK Basics +# SDK Architecture Overview ## Getting Started diff --git a/docs/getting_started/changing_examples.md b/docs/getting_started/changing_examples.md new file mode 100644 index 0000000000..611610ce43 --- /dev/null +++ b/docs/getting_started/changing_examples.md @@ -0,0 +1,64 @@ +# Changing Examples + +The composition of most examples in the SDK is static and code generated. + +The tool used to describe and change the composition of an example is called +ZAP. More information about ZAP and a walk-through of the tool can be found in +the [ZAP introduction](./zap.md). The composition of the device is captured in a +.zap file, which is readable by the ZAP tool. This is then compiled into a +human-readable .matter file, which is used to build the static features of the +example. + +To change the composition of a device example, you need to + +1. Change the zap file to implement your desired changes +2. Run the code generation tool to generate the .matter file +3. Re-build the example + +## Changing the zap file in an example + +Most examples in the SDK keep the .zap file in a sub-directory called +example-name-common (ex. lighting-common). To load an existing .zap file into +the ZAP tool, from the chip-root use + +``` +./scripts/tools/zap/run_zaptool.sh +``` + +For example, to make changes to the lighting app, use: + +``` +./scripts/tools/zap/run_zaptool.sh examples/lighting-app/lighting-common/lighting-app.zap +``` + +This will open the ZAP GUI tool, which can be used to change the endpoint +composition, clusters, features, attributes, commands and events exposed by the +device. + +Details of how to use the tool can be found in the [ZAP Introduction](./zap.md). + +## Running code generation + +To compile the .matter file for use in building, use: + +``` +./scripts/tools/zap/generate.py +``` + +For example, for changes to the lighting app, use: + +``` +./scripts/tools/zap/generate.py examples/lighting-app/lighting-common/lighting-app.zap +``` + +If there are changes to many .zap files, the following script can be used to +recompile the .zap files for all the examples and the controller. + +``` + ./scripts/tools/zap_regen_all.py +``` + +## Rebuilding the example + +After generating the .matter file, re-build the example. Instructions for +building examples are given in [Building your first example](./first_example.md) diff --git a/docs/getting_started/first_example.md b/docs/getting_started/first_example.md index 89ab7d493d..d75d9e7b1a 100644 --- a/docs/getting_started/first_example.md +++ b/docs/getting_started/first_example.md @@ -1,4 +1,4 @@ -# An SDK example +# Compiling, Running, and Controlling Matter examples The SDK provides a number of example devices and controllers that can be used to familiarize yourself with the SDK and the Matter ecosystem. @@ -26,7 +26,7 @@ for testing. [chip-tool](../../examples/chip-tool/) is a C++ command line controller with an interactive shell. More information on chip-tool can be found in the -[chip-tool guide](../guides/chip_tool_guide.md). +[chip-tool guide](../development_controllers/chip-tool/chip_tool_guide.md). [chip-repl](../../src/controller/python/chip-repl.py) is a shell for the python controller. The chip-repl is part of the python controller framework, often used diff --git a/docs/getting_started/index.md b/docs/getting_started/index.md index ea881141ff..1bfbe3f57c 100644 --- a/docs/getting_started/index.md +++ b/docs/getting_started/index.md @@ -7,10 +7,14 @@ The following docs are a brief introduction to SDK development. :maxdepth: 1 :hidden: -* +first_example +changing_examples +SDKBasics +zap ``` - [Running your first example](./first_example.md) -- [SDK Basics](./SDKBasics.md) -- [ZAP](./zap.md) +- [Changing examples](./changing_examples.md) +- [SDK Architecture Overview](./SDKBasics.md) +- [ZAP Introduction](./zap.md) diff --git a/docs/guides/darwin.md b/docs/guides/darwin.md index 00165e6fca..4692c0b065 100644 --- a/docs/guides/darwin.md +++ b/docs/guides/darwin.md @@ -292,17 +292,17 @@ Example: - [ESP32 Lighting](/examples/lighting-app/esp32/README.md) - [ESP32 Temperature Sensor](/examples/temperature-measurement-app/esp32/README.md) - [mbedOS](/examples/all-clusters-app/mbed/README.md) -- [nRF Connect All Clusters](./nrfconnect_examples_configuration.md) +- [nRF Connect All Clusters](../platforms/nrf/nrfconnect_examples_configuration.md) - [nRF Connect Pump](/examples/pump-app/nrfconnect/README.md) -- [NXP Examples](./nxp/nxp_imx8m_linux_examples.md) +- [NXP Examples](../platforms/nxp/nxp_imx8m_linux_examples.md) - [NXP](/examples/all-clusters-app/nxp/mw320/README.md) - [Infineon CYW30739 Lighting](/examples/lighting-app/infineon/cyw30739/README.md) - [Infineon PSoC6](/examples/all-clusters-app/infineon/psoc6/README.md) - [Qorvo](/examples/lighting-app/qpg/README.md) -- [Silicon Labs](./silabs_getting_started.md) +- [Silicon Labs](../platforms/silabs/silabs_getting_started.md) - [Simulated Linux](./simulated_device_linux.md) - [Telink](/examples/lighting-app/telink/README.md) -- [TI Platform](./ti/ti_matter_overview.md) +- [TI Platform](../platforms/ti/ti_matter_overview.md) - [Tizen](/examples/lighting-app/tizen/README.md) ## Providing Feedback to Apple diff --git a/docs/guides/index.md b/docs/guides/index.md index 14d9caf7e2..97167c84ae 100644 --- a/docs/guides/index.md +++ b/docs/guides/index.md @@ -9,54 +9,13 @@ and features. :hidden: * -esp32/README -nxp/README -ti/ti_matter_overview ``` ## Build Guides - [Building](./BUILDING.md) -## Platform Guides - -- [Android - Building](./android_building.md) -- [Apple - Testing with iPhone, iPad, macOS, Apple TV, HomePod, Watch, etc](./darwin.md) -- [ASR - Getting Started Guide](./asr_getting_started_guide.md) -- [Espressif (ESP32) - Getting Started Guide](./esp32/README.md) -- [Infineon PSoC6 - Software Update](./infineon_psoc6_software_update.md) -- [Linux - Simulated Devices](./simulated_device_linux.md) -- [mbedOS - Adding a new target](./mbedos_add_new_target.md) -- [mbedOS - Commissioning](./mbedos_commissioning.md) -- [mbedOS - Platform Overview](./mbedos_platform_overview.md) -- [nRF Connect - Android Commissioning](./nrfconnect_android_commissioning.md) -- [nRF Connect - CLI Guide](./nrfconnect_examples_cli.md) -- [nRF Connect - Configuration](./nrfconnect_examples_configuration.md) -- [nRF Connect - Factory Data Configuration](./nrfconnect_factory_data_configuration.md) -- [nRF Connect - Platform Overview](./nrfconnect_platform_overview.md) -- [nRF Connect - Software Update](./nrfconnect_examples_software_update.md) -- [NXP - Getting Started Guide](./nxp/README.md) -- [Silicon Labs - Documentation](https://siliconlabs.github.io/matter/latest/index.html) -- [Silicon Labs - Getting Started](./silabs_getting_started.md) -- [Silicon Labs - Software Update](./silabs_efr32_software_update.md) -- [Silicon Labs - CLI Guide](./silabs_cli_guide.md) -- [TI - Platform Overview](./ti/ti_matter_overview.md) - -## Tool Guides - -- [CHIP Tool](./chip_tool_guide.md) -- [Python Matter-Repl](./matter-repl.md) -- [python-chip-controller - Advanced](./python_chip_controller_advanced_usage.md) -- [python-chip-controller - Building](./python_chip_controller_building.md) -- [CHEF test devices](../../examples/chef/README.md) - - [New device type adding](../../examples/chef/NEW_CHEF_DEVICES.md) - ## Development Guides - [Access Control](./access-control-guide.md) - [Matter IDL tooling and validation](./matter_idl_tooling.md) - -## Setup Guides - -- [Open Thread - Hardware suggestions](./openthread_rcp_nrf_dongle.md) -- [Open Thread - Setting up a Raspberry Pi as a Border Router](./openthread_border_router_pi.md) diff --git a/docs/guides/nxp/README.md b/docs/guides/nxp/README.md deleted file mode 100644 index be225ac938..0000000000 --- a/docs/guides/nxp/README.md +++ /dev/null @@ -1,14 +0,0 @@ -```{toctree} -:glob: -:maxdepth: 1 - -* -``` - -# NXP Getting Started Guide - -- [NXP - Android Commissioning](nxp_k32w_android_commissioning.md) -- [NXP - Linux Examples](nxp_imx8m_linux_examples.md) -- [NXP - Manufacturing Data](nxp_manufacturing_flow.md) -- [NXP - RW61x OTA Software Update Guide](nxp_rw61x_ota_software_update.md) -- [NXP - Zephyr OTA Software Update Guide](nxp_zephyr_ota_software_update.md) diff --git a/docs/index.md b/docs/index.md index f4b4062271..89e4661e2a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -# Welcome to Matter's documentation! +# Welcome to Matter's documentation ```{toctree} :maxdepth: 2 @@ -8,9 +8,11 @@ PROJECT_FLOW VSCODE_DEVELOPMENT ci-cd/index +development_controllers/index getting_started/index cluster_and_device_type_dev/index guides/index +platforms/index style/index examples/index product_considerations/index @@ -23,6 +25,7 @@ zap_clusters spec_clusters upgrading ERROR_CODES +issue_triage ``` diff --git a/docs/issue_triage.md b/docs/issue_triage.md new file mode 100644 index 0000000000..891bfca471 --- /dev/null +++ b/docs/issue_triage.md @@ -0,0 +1,146 @@ +# Project issues + +General issues are listed at + . + +In order to be able to effectively follow up on these issues, they are separated +into groups for further review and fixing based on current maintainers on +specific areas of the code. The separation is done via `labels`. + +Issues that still need triaging are labeled as `needs triage`: + + + +## Non-SDK issues + +In some cases the issue is integrating with ecosystems or environments are not +supported. In these cases, issues can be re-directed to specific support pages +rather than the SDK GitHub issues. + +### Google Integration + +- General integration link: +- Support via the communities areas: + - Stack overflow: + + - Google Nest Community: + + +### Apple Integration + +This applies if there is an issue with Home interacting with a device (as +opposed to an issue with Matter.framework or the SDK that is encountered by code +actually running on darwin). + +General instructions available at [here](./guides/darwin.md) in the +`Providing feedback to Apple` section. + +Once a Feedback Assistant ticket is filed, the ticket ID can be sent to Boris +Zbkarsky to ensure it is noticed by the right people + +### Environments not currently supported / not maintained + +Some items are explicitly not maintained currently + +- Windows integration: no official maintainer for this so currently not + supported +- Old compiler support: CHIP requires a C++17 or higher compiler. + +## Platform maintainers + +This level of separation is generally for platform-specific issues (e.g. failure +to commission for one specific platform, failure to run on some specific +operating system). + +Contact is generally done on slack. E-mail addresses are not added here on +purpose in order to avoid spam. + +| Platform | Contact | Label | Note(s) | +| ------------ | --------------------------------------- | -------------------------------------------------------------------------------------------------------- | ------- | +| Android | Andrei Litvin, Yunhan Wang, Yufeng Wang | [android](https://github.com/project-chip/connectedhomeip/issues?q=is%3Aopen+is%3Aissue+label%3Aandroid) | | +| Darwin | Boris Zbarsky, Justin Wood | [darwin](https://github.com/project-chip/connectedhomeip/issues?q=is%3Aopen+is%3Aissue+label%3Adarwin) | | +| Espressif | Hrishikesh Dhayagude | [esp32](https://github.com/project-chip/connectedhomeip/issues?q=is%3Aopen+is%3Aissue+label%3Aesp32) | | +| Linux | Andrei Litvin | [linux](https://github.com/project-chip/connectedhomeip/issues?q=is%3Aopen+is%3Aissue+label%3Alinux) | | +| Nordic | Lucasz Duda | [nrf](https://github.com/project-chip/connectedhomeip/issues?q=is%3Aopen+is%3Aissue+label%3Anrf) | | +| NXP | Doru Gucea | [nxp](https://github.com/project-chip/connectedhomeip/issues?q=is%3Aopen+is%3Aissue+label%3Anxp) | | +| Silabs/EFR32 | Jean Francois Penven, Junior Martinez | [efr32](https://github.com/project-chip/connectedhomeip/issues?q=is%3Aopen+is%3Aissue+label%3Aefr32) | | + +## Code areas + +The following people can be contacted about issues in specific area of code are +affected that are not platform-specific. + +| Code area | Contact | Label | Note(s) | +| ------------------------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| ARM cross-compile | Andrei Litvin | N/A | Some support for cross-compiling on x64 linux for arm64 linux (like Raspberry PI) | +| Build system (darwin, xcode) | Boris Zbarsky, Justin Wood | N/A | darwin specific builds, xcode connector | +| Build system (gn, ninja) | Andrei Litvin | N/A | General build system questions and gn support, generally on Linux | +| MatterIDL | Andrei Litvin | N/A | General .matter files and code generation based on it | +| Minimal MDNS | Andrei Litvin | N/A | mdns specfic. Note that platformdns also exists and issues are often "DNSSD" rather than minmdns specific | +| Python testing infrastructure/helpers | Cecille Freeman | N/A | Writing tests cases in python. **NOTE** this is for test infrastrure and NOT for individual test issues. Test case failures are associated with test applications or the test case script. | +| ZAP Code Generation | Boris Zbarsky, Bharat Raju Dandu | [zap](https://github.com/project-chip/connectedhomeip/issues?q=is%3Aopen+is%3Aissue+label%3Azap) | Some issues may be in the zap project itself. This is for generic code generation issues and help, often regarding `.zapt` templates | +| src/crypto, src/credentials | Tennessee Carmel-Veilleux | N/A | | + +## Example maintenance + +Examples often correspond to specific device types. We have split the contact +per device type regardless of example (e.g. all-clusters will contain all device +types or functionality) as well as individual examples. + +### Per device type + +| Device Type(s) | Contact | Label | Note(s) | +| -------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------ | ------- | +| Fabric Bridge, Fabric Sync | Yufeng Wang, Terence Hampson | [fabric-sync](https://github.com/project-chip/connectedhomeip/pulls?q=is%3Aopen+is%3Apr+label%3Afabric-sync) | | + +### Per example + +| Example path | Contact | Note(s) | +| ---------------------------------------------- | ---------------------------- | ------------ | +| `examples/air-purifier-app` | | UNMAINTAINED | +| `examples/air-quality-sensor-app` | | UNMAINTAINED | +| `examples/all-clusters-app` | | UNMAINTAINED | +| `examples/all-clusters-minimal-app` | | UNMAINTAINED | +| `examples/android` | Yunhan Wang | | +| `examples/bridge-app` | | UNMAINTAINED | +| `examples/build_overrides` | | UNMAINTAINED | +| `examples/chef` | Andrei Litvin | | +| `examples/chip-tool` | | UNMAINTAINED | +| `examples/contact-sensor-app` | | UNMAINTAINED | +| `examples/darwin-framework-tool` | Boris Zbarsky | | +| `examples/dishwasher-app` | | UNMAINTAINED | +| `examples/energy-management-app` | James Harrow | | +| `examples/fabric-admin` | Yufeng Wang, Terence Hampson | | +| `examples/fabric-bridge-app` | Yufeng Wang, Terence Hampson | | +| `examples/java-matter-controller` | Yunhan Wang, Yufeng Wang | | +| `examples/kotlin-matter-controller` | Yunhan Wang, Yufeng Wang | | +| `examples/laundry-washer-app` | | UNMAINTAINED | +| `examples/lighting-app` | Junior Martinez | | +| `examples/lighting-app-data-mode-no-unique-id` | | UNMAINTAINED | +| `examples/light-switch-app` | | UNMAINTAINED | +| `examples/lit-icd-app` | Yunhan Wang | | +| `examples/lock-app` | | UNMAINTAINED | +| `examples/log-source-app` | | UNMAINTAINED | +| `examples/microwave-oven-app` | Rob Bultman | | +| `examples/minimal-mdns` | Andrei Litvin | | +| `examples/network-manager-app` | Thomas Lea | | +| `examples/ota-provider-app` | | UNMAINTAINED | +| `examples/ota-requestor-app` | | UNMAINTAINED | +| `examples/persistent-storage` | | UNMAINTAINED | +| `examples/pigweed-app` | | UNMAINTAINED | +| `examples/placeholder` | | UNMAINTAINED | +| `examples/providers` | | UNMAINTAINED | +| `examples/pump-app` | | UNMAINTAINED | +| `examples/pump-controller-app` | | UNMAINTAINED | +| `examples/refrigerator-app` | | UNMAINTAINED | +| `examples/resource-monitoring-app` | | UNMAINTAINED | +| `examples/rvc-app` | | UNMAINTAINED | +| `examples/smoke-co-alarm-app` | | UNMAINTAINED | +| `examples/temperature-measurement-app` | | UNMAINTAINED | +| `examples/thermostat` | | UNMAINTAINED | +| `examples/thread-br-app` | | UNMAINTAINED | +| `examples/tv-app` | Chris DeCenzo, Lazar Kovacic | | +| `examples/tv-casting-app` | Chris DeCenzo, Lazar Kovacic | | +| `examples/virtual-device-app` | | UNMAINTAINED | +| `examples/water-leak-detector-app` | | UNMAINTAINED | +| `examples/window-app` | | UNMAINTAINED | diff --git a/docs/guides/android_building.md b/docs/platforms/android/android_building.md similarity index 100% rename from docs/guides/android_building.md rename to docs/platforms/android/android_building.md diff --git a/docs/platforms/android/index.md b/docs/platforms/android/index.md new file mode 100644 index 0000000000..a8bdd37290 --- /dev/null +++ b/docs/platforms/android/index.md @@ -0,0 +1,11 @@ +# Android + +```{toctree} +:glob: +:maxdepth: 1 +:hidden: + +* +``` + +[Android - Building](./android_building.md) diff --git a/docs/guides/asr_getting_started_guide.md b/docs/platforms/asr/asr_getting_started_guide.md similarity index 97% rename from docs/guides/asr_getting_started_guide.md rename to docs/platforms/asr/asr_getting_started_guide.md index e47cc554ef..e5a4bac6e2 100644 --- a/docs/guides/asr_getting_started_guide.md +++ b/docs/platforms/asr/asr_getting_started_guide.md @@ -33,7 +33,7 @@ to speed up development. You can find them in the samples with `/asr` subfolder. ## Building the Example Application -- [Setup Matter Environment](./BUILDING.md) +- [Setup Matter Environment](../../guides/BUILDING.md) - Setup toolchain - for ASR582X and ASR550X @@ -140,7 +140,7 @@ There are two commissioning modes supported by ASR platform: `build_examples.py` script. For example: `./scripts/build/build_examples.py --target asr-$ASR_BOARD-lighting-ota build` 2. For more usage details, please refer to the - [OTA example](../../examples/ota-requestor-app/asr/README.md) + [OTA example](../../../examples/ota-requestor-app/asr/README.md) ## Factory diff --git a/docs/platforms/asr/index.md b/docs/platforms/asr/index.md new file mode 100644 index 0000000000..f4748a4c70 --- /dev/null +++ b/docs/platforms/asr/index.md @@ -0,0 +1,11 @@ +# ASR + +```{toctree} +:glob: +:maxdepth: 1 +:hidden: + +* +``` + +[ASR - Getting Started Guide](./asr_getting_started_guide.md) diff --git a/docs/platforms/bouffalolab/index.md b/docs/platforms/bouffalolab/index.md new file mode 100644 index 0000000000..bacc0e63ca --- /dev/null +++ b/docs/platforms/bouffalolab/index.md @@ -0,0 +1,11 @@ +# Bouffalolab + +```{toctree} +:glob: +:maxdepth: 1 +:hidden: + +* +``` + +[Bouffalo Lab - Matter factory data generation](./matter_factory_data.md) diff --git a/docs/platforms/bouffalolab/matter_factory_data.md b/docs/platforms/bouffalolab/matter_factory_data.md new file mode 100644 index 0000000000..9021cd80f6 --- /dev/null +++ b/docs/platforms/bouffalolab/matter_factory_data.md @@ -0,0 +1,249 @@ +# Introduction to Matter factory data + +Each Matter device should have it own unique factory data manufactured. + +This guide demonstrates what `Bouffalo Lab` provides to support factory data: + +- credential factory data protected by hardware security engine +- reference tool to generate factory data +- tool/method to program factory data + +# Matter factory data + +## How to enable + +One dedicate flash region allocates for factory data as below which is read-only +for firmware. + +```toml +name = "MFD" +address0 = 0x3FE000 +size0 = 0x1000 +``` + +To enable matter factory data feature, please append `-mfd` option at end of +target name. Take BL602 Wi-Fi Matter Light as example. + +``` +./scripts/build/build_examples.py --target bouffalolab-bl602dk-light-littlefs-mfd build +``` + +## Factory data + +This flash region is divided to two parts: + +- One is plain text data, such as Vendor ID, Product ID, Serial number and so + on. + + > For development/test purpose, all data can put in plain text data. + +- Other is cipher text data, such as private key for device attestation data. + + `Bouffalo Lab` provides hardware security engine to decrypt this part data + with **only hardware access** efuse key. + +Current supported data + +- DAC certificate and private key +- PAI certificate +- Certificate declaration + +- Discriminator ID +- Pass Code +- Spake2p iteration count, salt and verifier +- Vendor ID and name +- Product ID and name +- Product part number and product label +- Manufacturing date +- Hardware version and version string +- Serial Number +- Unique identifier + +> Note, it is available to add customer/product own information in factory data, +> please reference to `bl_mfd.h`/`bl_mfd.c` in SDK and reference generation +> script +> [generate_factory_data.py](../../../scripts/tools/bouffalolab/generate_factory_data.py) + +# Generate Matter factory data + +Script tool +[generate_factory_data.py](../../../scripts/tools/bouffalolab/generate_factory_data.py) +call `chip-cert` to generate test certificates and verify certificates. + +Please run below command to compile `chip-cert` tool under `connnectedhomeip` +repo. + +```shell +./scripts/build/build_examples.py --target linux-x64-chip-cert build +``` + +## Command options + +- `--cd`, certificate declare + + If not specified, `Chip-Test-CD-Signing-Cert.pem` and + `Chip-Test-CD-Signing-Key.pem` will sign a test certificate declare for + development and test purpose + +- `--pai_cert` and `--pai-key`, PAI certificate and PAI private key + + If not specified, `Chip-Test-PAI-FFF1-8000-Cert.pem` and + `Chip-Test-PAI-FFF1-8000-Key.pem` will be used for development and test + purpose. + +- `--dac_cert` and `--dac_key`, DAC certificate and DAC private key. + + If not specified, script will use PAI certificate and key specified + by`--pai_cert` and `--pai-key` to generate DAC certificate and private key + for development and test purpose. + +- `--discriminator`, discriminator ID + + If not specified, script will generate for user. + +- `--passcode`, passcode + + If not specified, script will generate for user. + +- `--spake2p_it` and `--spake2p_salt` + + If not specified, script will generate and calculate verifier for user. + +Please reference to `--help` for more detail. + +## Generate with default test certificates + +- Run following command to generate all plain text factory data + + Please create output folder first. Here takes `out/test-cert` as example. + + ```shell + ./scripts/tools/bouffalolab/generate_factory_data.py --output out/test-cert + ``` + +- Run following command to generate factory data which encrypt private of + device attestation data + + ```shell + ./scripts/tools/bouffalolab/generate_factory_data.py --output out/test-cert --key + ``` + + > An example of hex string of 16 bytes: 12345678123456781234567812345678 + +After command executes successfully, the output folder will has files as below: + +- Test certificate declare file which file name ends with `cd.der` + + If user wants to reuse CD generated before, please specify CD with option + `--cd` as below. + + ```shell + ./scripts/tools/bouffalolab/generate_factory_data.py --output out/test-cert --cd + ``` + +- Test DAC certificate and DAC certificate key which file names ends with + `dac_cert.pem` and `dac_key.pem` separately. + +- QR code picture which file name ends with `onboard.png` +- On board information which file name ends with `onboard.txt` +- Matter factory data which file name ends with `mfd.bin`. + +## Generate with self-defined PAA/PAI certificates + +Self-defined PAA/PAI certificates may use in development and test scenario. But, +user should know it has limit to work with real ecosystem. + +- Export environment variables in terminal for easy operations + + ``` + export TEST_CERT_VENDOR_ID=130D # Vendor ID hex string + export TEST_CERT_CN=BFLB # Common Name + ``` + +- Generate PAA certificate and key to `out/cert` folder. + + ```shell + mkdir out/test-cert + ./out/linux-x64-chip-cert/chip-cert gen-att-cert --type a --subject-cn "${TEST_CERT_CN} PAA 01" --valid-from "2020-10-15 14:23:43" --lifetime 7305 --out-key out/test-cert/Chip-PAA-Key-${TEST_CERT_VENDOR_ID}.pem --out out/test-cert/Chip-PAA-Cert-${TEST_CERT_VENDOR_ID}.pem --subject-vid ${TEST_CERT_VENDOR_ID} + ``` + +- Convert PAA PEM format file to PAA DER format file + + ```shell + ./out/linux-x64-chip-cert/chip-cert convert-cert -d out/test-cert/Chip-PAA-Cert-${TEST_CERT_VENDOR_ID}.pem out/test-cert/Chip-PAA-Cert-${TEST_CERT_VENDOR_ID}.der + ``` + + > Please save this PAA DER format file which will be used by `chip-tool` + > during commissioning. + +- Generate PAI certificate and key: + + ```shell + ./out/linux-x64-chip-cert/chip-cert gen-att-cert --type i --subject-cn "${TEST_CERT_CN} PAI 01" --subject-vid ${TEST_CERT_VENDOR_ID} --valid-from "2020-10-15 14:23:43" --lifetime 7305 --ca-key out/test-cert/Chip-PAA-Key-${TEST_CERT_VENDOR_ID}.pem --ca-cert out/test-cert/Chip-PAA-Cert-${TEST_CERT_VENDOR_ID}.pem --out-key out/test-cert/Chip-PAI-Key-${TEST_CERT_VENDOR_ID}.pem --out out/test-cert/Chip-PAI-Cert-${TEST_CERT_VENDOR_ID}.pem + ``` + +- Generate `MFD` in plain text data + + ```shell + ./scripts/tools/bouffalolab/generate_factory_data.py --output out/test-cert --paa_cert out/test-cert/Chip-PAA-Cert-${TEST_CERT_VENDOR_ID}.pem --paa_key out/test-cert/Chip-PAA-Key-${TEST_CERT_VENDOR_ID}.pem --pai_cert out/test-cert/Chip-PAI-Cert-${TEST_CERT_VENDOR_ID}.pem --pai_key out/test-cert/Chip-PAI-Key-${TEST_CERT_VENDOR_ID}.pem + ``` + + > Appending `--key ` option to enable encrypt + > private key of attestation device data. + +## Generate with self-defined DAC certificate and key + +Self-defined DAC certificates may use in development and test scenario. But, +user should know it has limit to work with real ecosystem. + +- Export environment variables in terminal for easy operations + + ``` + export TEST_CERT_VENDOR_ID=130D # Vendor ID hex string + export TEST_CERT_PRODUCT_ID=1001 # Vendor ID hex string + export TEST_CERT_CN=BFLB # Common Name + ``` + +- Generate DAC certificate and key + + ```shell + out/linux-x64-chip-cert/chip-cert gen-att-cert --type d --subject-cn "${TEST_CERT_CN} PAI 01" --subject-vid ${TEST_CERT_VENDOR_ID} --subject-pid ${TEST_CERT_VENDOR_ID} --valid-from "2020-10-16 14:23:43" --lifetime 5946 --ca-key out/test-cert/Chip-PAI-Key-${TEST_CERT_VENDOR_ID}.pem --ca-cert out/test-cert/Chip-PAI-Cert-${TEST_CERT_VENDOR_ID}.pem --out-key out/test-cert/Chip-DAC-Key-${TEST_CERT_VENDOR_ID}-${TEST_CERT_PRODUCT_ID}.pem --out out/test-cert/Chip-DAC-Cert-${TEST_CERT_VENDOR_ID}-${TEST_CERT_PRODUCT_ID}.pem + ``` + + > **Note**, `--valid-from` and `--lifetime` should be in `--valid-from` and + > `--lifetime` of PAI certificate. + +- Generate `MFD` in plain text data + + ```shell + ./scripts/tools/bouffalolab/generate_factory_data.py --output out/test-cert --pai_cert out/test-cert/Chip-PAI-Cert-${TEST_CERT_VENDOR_ID}.pem --dac_cert out/test-cert/Chip-DAC-Cert-${TEST_CERT_VENDOR_ID}-${TEST_CERT_PRODUCT_ID}.pem --dac_key out/test-cert/Chip-DAC-Key-${TEST_CERT_VENDOR_ID}-${TEST_CERT_PRODUCT_ID}.pem + ``` + + > Appending `--key ` option to enable encrypt + > private key of attestation device data. + +# Program factory data + +After each target built successfully, a flash programming python script will be +generated under out folder. + +Take BL616 Wi-Fi Matter Light as example, `chip-bl616-lighting-example.flash.py` +is using to program firmware, and also for factory data and factory decryption +key. + +```shell +/out/bouffalolab-bl616dk-light-wifi-mfd/chip-bl616-lighting-example.flash.py --port --mfd out/test-cert/ +``` + +> If `MFD` file has cipher text data, please append +> `--key ` option to program to this key to efuse. + +- Limits on BL IOT SDK + + If developer would like to program `MFD` with all plain text data, option + `--key ` needs pass to script, otherwise, flash tool + will raise an error. And SoC BL602, BL702 and BL702L use BL IOT SDK for + Matter Application. + +Please free contact to `Bouffalo Lab` for DAC provider service and higher +security solution, such as SoC inside certificate requesting. diff --git a/docs/guides/esp32/ble_settings.md b/docs/platforms/esp32/ble_settings.md similarity index 100% rename from docs/guides/esp32/ble_settings.md rename to docs/platforms/esp32/ble_settings.md diff --git a/docs/guides/esp32/build_app_and_commission.md b/docs/platforms/esp32/build_app_and_commission.md similarity index 98% rename from docs/guides/esp32/build_app_and_commission.md rename to docs/platforms/esp32/build_app_and_commission.md index 942cb6add8..df295cc493 100644 --- a/docs/guides/esp32/build_app_and_commission.md +++ b/docs/platforms/esp32/build_app_and_commission.md @@ -168,7 +168,7 @@ $ out/debug/chip-tool pairing ble-wifi 12345 MY_SSID MY_PASSWORD 20202021 3840 #### Commissioning the Thread device (ESP32H2) - For ESP32-H2, firstly start OpenThread Border Router, you can either use - [Raspberry Pi OpenThread Border Router](../openthread_border_router_pi.md) + [Raspberry Pi OpenThread Border Router](../openthread/openthread_border_router_pi.md) OR [ESP32 OpenThread Border Router](../../../examples/thread-br-app/esp32/README.md) diff --git a/docs/guides/esp32/config_options.md b/docs/platforms/esp32/config_options.md similarity index 100% rename from docs/guides/esp32/config_options.md rename to docs/platforms/esp32/config_options.md diff --git a/docs/guides/esp32/factory_data.md b/docs/platforms/esp32/factory_data.md similarity index 100% rename from docs/guides/esp32/factory_data.md rename to docs/platforms/esp32/factory_data.md diff --git a/docs/guides/esp32/flash_nvs_encryption.md b/docs/platforms/esp32/flash_nvs_encryption.md similarity index 100% rename from docs/guides/esp32/flash_nvs_encryption.md rename to docs/platforms/esp32/flash_nvs_encryption.md diff --git a/docs/guides/esp32/README.md b/docs/platforms/esp32/index.md similarity index 100% rename from docs/guides/esp32/README.md rename to docs/platforms/esp32/index.md diff --git a/docs/guides/esp32/ota.md b/docs/platforms/esp32/ota.md similarity index 100% rename from docs/guides/esp32/ota.md rename to docs/platforms/esp32/ota.md diff --git a/docs/guides/esp32/providers.md b/docs/platforms/esp32/providers.md similarity index 100% rename from docs/guides/esp32/providers.md rename to docs/platforms/esp32/providers.md diff --git a/docs/guides/esp32/rpc_console.md b/docs/platforms/esp32/rpc_console.md similarity index 100% rename from docs/guides/esp32/rpc_console.md rename to docs/platforms/esp32/rpc_console.md diff --git a/docs/guides/esp32/secure_cert_partition.md b/docs/platforms/esp32/secure_cert_partition.md similarity index 100% rename from docs/guides/esp32/secure_cert_partition.md rename to docs/platforms/esp32/secure_cert_partition.md diff --git a/docs/guides/esp32/setup_idf_chip.md b/docs/platforms/esp32/setup_idf_chip.md similarity index 100% rename from docs/guides/esp32/setup_idf_chip.md rename to docs/platforms/esp32/setup_idf_chip.md diff --git a/docs/guides/esp32/vs_code_development.md b/docs/platforms/esp32/vs_code_development.md similarity index 100% rename from docs/guides/esp32/vs_code_development.md rename to docs/platforms/esp32/vs_code_development.md diff --git a/docs/platforms/index.md b/docs/platforms/index.md new file mode 100644 index 0000000000..4011f2e4c2 --- /dev/null +++ b/docs/platforms/index.md @@ -0,0 +1,35 @@ +# Platform Guides + +```{toctree} +:glob: +:maxdepth: 1 +:hidden: + +android/index +asr/index +bouffalolab/index +esp32/index +infineon/index +mbedos/index +nrf/index +nxp/index +openiotsdk/index +openthread/index +silabs/index +stm32/index +ti/index +``` + +- [Android](./android/) +- [ASR](./asr/) +- [Bouffalo Lab](./bouffalolab) +- [ESP32](./esp32/) +- [Infineon](./infineon/) +- [MbedOS](./mbedos/) +- [NRF](./nrf/) +- [NXP](./nxp/) +- [OpenIoTSDK](./openiotsdk/) +- [OpenThread](./openthread/) +- [Silabs](./silabs/) +- [STM32](./stm32/) +- [TI](./ti/) diff --git a/docs/platforms/infineon/index.md b/docs/platforms/infineon/index.md new file mode 100644 index 0000000000..7784db777f --- /dev/null +++ b/docs/platforms/infineon/index.md @@ -0,0 +1,12 @@ +# Infineon + +```{toctree} +:glob: +:maxdepth: 1 +:hidden: + +* +``` + +[Provisioning](./infineon_psoc6_software_update.md) +[Software update](./infineon_psoc6_software_update.md) diff --git a/docs/guides/infineon_psoc6_software_update.md b/docs/platforms/infineon/infineon_psoc6_software_update.md similarity index 100% rename from docs/guides/infineon_psoc6_software_update.md rename to docs/platforms/infineon/infineon_psoc6_software_update.md diff --git a/docs/guides/infineon_trustm_provisioning.md b/docs/platforms/infineon/infineon_trustm_provisioning.md similarity index 100% rename from docs/guides/infineon_trustm_provisioning.md rename to docs/platforms/infineon/infineon_trustm_provisioning.md diff --git a/docs/guides/images/matter_mbedos_overview_simplified.png b/docs/platforms/mbedos/images/matter_mbedos_overview_simplified.png similarity index 100% rename from docs/guides/images/matter_mbedos_overview_simplified.png rename to docs/platforms/mbedos/images/matter_mbedos_overview_simplified.png diff --git a/docs/platforms/mbedos/index.md b/docs/platforms/mbedos/index.md new file mode 100644 index 0000000000..5c29ab774d --- /dev/null +++ b/docs/platforms/mbedos/index.md @@ -0,0 +1,13 @@ +# MbedOS + +```{toctree} +:glob: +:maxdepth: 1 +:hidden: + +* +``` + +[Add new target](./mbedos_add_new_target.md) +[Commissioning](./mbedos_commissioning.md) +[Platform overview](./mbedos_platform_overview.md) diff --git a/docs/guides/mbedos_add_new_target.md b/docs/platforms/mbedos/mbedos_add_new_target.md similarity index 100% rename from docs/guides/mbedos_add_new_target.md rename to docs/platforms/mbedos/mbedos_add_new_target.md diff --git a/docs/guides/mbedos_commissioning.md b/docs/platforms/mbedos/mbedos_commissioning.md similarity index 96% rename from docs/guides/mbedos_commissioning.md rename to docs/platforms/mbedos/mbedos_commissioning.md index 8b6987878a..1d6dc7243c 100644 --- a/docs/guides/mbedos_commissioning.md +++ b/docs/platforms/mbedos/mbedos_commissioning.md @@ -58,7 +58,7 @@ To make provisioning possible and to control the Matter device from your Android based smartphone, you must first build and install the CHIPTool application. To build the CHIPTool application for your smartphone, read -[Android building guide](android_building.md). +[Android building guide](../android/android_building.md). After building, install the application by completing the following steps: @@ -154,7 +154,7 @@ brightness between 0-255. If **Lighting LED** is available then brightness change can be observed. > For more details about Android CHIPTool please visit -> [CHIPTool](../../examples/android/CHIPTool/README.md) +> [CHIPTool](../../../examples/android/CHIPTool/README.md) ## POSIX CLI CHIPTool @@ -164,7 +164,7 @@ To make provisioning possible and to control the Matter device from Linux-based device, you can build and run the Matter Client example application on it. To build the POSIX CLI CHIPTool application check the guide -[POSIX CLI guide](../../examples/chip-tool/README.md). +[POSIX CLI guide](../../../examples/chip-tool/README.md). ### Device commissioning for CLI @@ -196,7 +196,7 @@ For example: The client will send a single command packet and then exit. > For more details about POSIX CLI CHIPTool please visit -> [POSIX CLI CHIPTool](../../examples/chip-tool/README.md) +> [POSIX CLI CHIPTool](../../../examples/chip-tool/README.md) ## Python Device Controller @@ -206,7 +206,7 @@ To make provisioning possible and to control the Matter device with Python application, you can build and run the Python CHIP controller. To build and install the Python Device Controller application check the guide -[Python Device Controller guide](python_chip_controller_building.md). +[Python Device Controller guide](../../development_controllers/chip-repl/python_chip_controller_building.md). ### Device commissioning for Python Device Controller diff --git a/docs/guides/mbedos_platform_overview.md b/docs/platforms/mbedos/mbedos_platform_overview.md similarity index 95% rename from docs/guides/mbedos_platform_overview.md rename to docs/platforms/mbedos/mbedos_platform_overview.md index b70d5ed89c..8cdce2c20c 100644 --- a/docs/guides/mbedos_platform_overview.md +++ b/docs/platforms/mbedos/mbedos_platform_overview.md @@ -85,11 +85,11 @@ needed to perform communication through the Matter stack. Sample Matter applications are provided for the Mbed OS platform. They can be used to speed up development: -- [shell](../../examples/shell/mbed/README.md) -- [all-clusters-app](../../examples/all-clusters-app/mbed/README.md) -- [lock-app](../../examples/lock-app/mbed/README.md) -- [lighting-app](../../examples/lighting-app/mbed/README.md) -- [pigweed-app](../../examples/pigweed-app/mbed/README.md) +- [shell](../../../examples/shell/mbed/README.md) +- [all-clusters-app](../../../examples/all-clusters-app/mbed/README.md) +- [lock-app](../../../examples/lock-app/mbed/README.md) +- [lighting-app](../../../examples/lighting-app/mbed/README.md) +- [pigweed-app](../../../examples/pigweed-app/mbed/README.md) ### Example configuration diff --git a/docs/guides/images/CHIPTool_device_commissioned.png b/docs/platforms/nrf/images/CHIPTool_device_commissioned.png similarity index 100% rename from docs/guides/images/CHIPTool_device_commissioned.png rename to docs/platforms/nrf/images/CHIPTool_device_commissioned.png diff --git a/docs/guides/images/matter_nrfconnect_overview_simplified_ncs.svg b/docs/platforms/nrf/images/matter_nrfconnect_overview_simplified_ncs.svg similarity index 100% rename from docs/guides/images/matter_nrfconnect_overview_simplified_ncs.svg rename to docs/platforms/nrf/images/matter_nrfconnect_overview_simplified_ncs.svg diff --git a/docs/guides/images/nrfconnect_android_connectivity.png b/docs/platforms/nrf/images/nrfconnect_android_connectivity.png similarity index 100% rename from docs/guides/images/nrfconnect_android_connectivity.png rename to docs/platforms/nrf/images/nrfconnect_android_connectivity.png diff --git a/docs/platforms/nrf/index.md b/docs/platforms/nrf/index.md new file mode 100644 index 0000000000..bf74c43fcc --- /dev/null +++ b/docs/platforms/nrf/index.md @@ -0,0 +1,16 @@ +# NRF + +```{toctree} +:glob: +:maxdepth: 1 +:hidden: + +* +``` + +[Android Commissioning](./nrfconnect_android_commissioning.md) +[Examples CLI](./nrfconnect_examples_cli.md) +[Examples configuration](./nrfconnect_examples_configuration.md) +[Examples Software update](./nrfconnect_examples_software_update.md) +[Factory data](./nrfconnect_factory_data_configuration.md) +[Platform overview](./nrfconnect_platform_overview.md) diff --git a/docs/guides/nrfconnect_android_commissioning.md b/docs/platforms/nrf/nrfconnect_android_commissioning.md similarity index 94% rename from docs/guides/nrfconnect_android_commissioning.md rename to docs/platforms/nrf/nrfconnect_android_commissioning.md index 0c93f45792..9c6358d501 100644 --- a/docs/guides/nrfconnect_android_commissioning.md +++ b/docs/platforms/nrf/nrfconnect_android_commissioning.md @@ -1,7 +1,7 @@ # Commissioning nRF Connect Accessory using Android CHIPTool -You can use [CHIPTool](android_building.md) for Android smartphones to -commission a Nordic Semiconductor's development kit programmed with a Matter +You can use [CHIPTool](../android/android_building.md) for Android smartphones +to commission a Nordic Semiconductor's development kit programmed with a Matter example for the nRF Connect platform into a Matter fabric. This guide references the nRF52840 DK and Matter nRF Connect Lighting Example @@ -86,9 +86,10 @@ accessory using Android CHIPTool: > _Note:_ This step is only needed if you're testing a Thread device. Skip it if > the tested device operates in a Wi-Fi network. -Follow the [OpenThread Border Router](openthread_border_router_pi.md) article to -set up OpenThread Border Router on the Raspberry Pi, with either the nRF52840 DK -or the nRF52840 Dongle acting as the +Follow the +[OpenThread Border Router](../openthread/openthread_border_router_pi.md) article +to set up OpenThread Border Router on the Raspberry Pi, with either the nRF52840 +DK or the nRF52840 Dongle acting as the [OpenThread Radio Co-Processor](https://openthread.io/platforms/co-processor). During the setup, make sure that the Raspberry Pi is connected to your Wi-Fi Access Point. @@ -107,7 +108,7 @@ Application to learn how to build and program the example onto an nRF52840 DK. ## Building and installing Android CHIPTool To build the CHIPTool application for your smartphone, read the -[Building Android](android_building.md) guide. +[Building Android](../android/android_building.md) guide. After building, install the application by completing the following steps: diff --git a/docs/guides/nrfconnect_examples_cli.md b/docs/platforms/nrf/nrfconnect_examples_cli.md similarity index 100% rename from docs/guides/nrfconnect_examples_cli.md rename to docs/platforms/nrf/nrfconnect_examples_cli.md diff --git a/docs/guides/nrfconnect_examples_configuration.md b/docs/platforms/nrf/nrfconnect_examples_configuration.md similarity index 100% rename from docs/guides/nrfconnect_examples_configuration.md rename to docs/platforms/nrf/nrfconnect_examples_configuration.md diff --git a/docs/guides/nrfconnect_examples_software_update.md b/docs/platforms/nrf/nrfconnect_examples_software_update.md similarity index 99% rename from docs/guides/nrfconnect_examples_software_update.md rename to docs/platforms/nrf/nrfconnect_examples_software_update.md index d295bae476..5f3ab2055d 100644 --- a/docs/guides/nrfconnect_examples_software_update.md +++ b/docs/platforms/nrf/nrfconnect_examples_software_update.md @@ -17,7 +17,7 @@ protocols: > **_NOTE:_** The procedure presented below requires that you have OpenThread > Border Router (OTBR) set up either in Docker or on a Raspberry Pi. Read -> [Setup OpenThread Border Router on Raspberry Pi](openthread_border_router_pi.md) +> [Setup OpenThread Border Router on Raspberry Pi](../openthread/openthread_border_router_pi.md) > to learn how to install the OTBR on a Raspberry Pi. The DFU over Matter involves two kinds of nodes: @@ -94,7 +94,6 @@ To test the DFU over Matter, you need to complete the following steps: 10. Initiate the DFU procedure in one of the following ways: - - If you have built the device firmware with `-DCONFIG_CHIP_LIB_SHELL=y` option, which enables Matter shell commands, run the following command on the device shell: diff --git a/docs/guides/nrfconnect_factory_data_configuration.md b/docs/platforms/nrf/nrfconnect_factory_data_configuration.md similarity index 99% rename from docs/guides/nrfconnect_factory_data_configuration.md rename to docs/platforms/nrf/nrfconnect_factory_data_configuration.md index 886acc9b30..0c3f6c1d47 100644 --- a/docs/guides/nrfconnect_factory_data_configuration.md +++ b/docs/platforms/nrf/nrfconnect_factory_data_configuration.md @@ -813,8 +813,8 @@ Alternatively, you can add the relevant Kconfig option lines to the example's You can edit all configuration options using the interactive Kconfig interface. See the -[Configuring nRF Connect examples](../guides/nrfconnect_examples_configuration.md) -page for information about how to configure Kconfig options. +[Configuring nRF Connect examples](./nrfconnect_examples_configuration.md) page +for information about how to configure Kconfig options. In the configuration window, expand the items `Modules -> connectedhomeip (/home/arbl/matter/connectedhomeip/config/nrfconnect/chip-module) -> Connected Home over IP protocol stack`. diff --git a/docs/guides/nrfconnect_platform_overview.md b/docs/platforms/nrf/nrfconnect_platform_overview.md similarity index 100% rename from docs/guides/nrfconnect_platform_overview.md rename to docs/platforms/nrf/nrfconnect_platform_overview.md diff --git a/docs/platforms/nxp/index.md b/docs/platforms/nxp/index.md new file mode 100644 index 0000000000..844dc40194 --- /dev/null +++ b/docs/platforms/nxp/index.md @@ -0,0 +1,15 @@ +# NXP + +```{toctree} +:glob: +:maxdepth: 1 +:hidden: + +* +``` + +- [NXP - Android Commissioning](./nxp_k32w_android_commissioning.md) +- [NXP - Linux Examples](./nxp_imx8m_linux_examples.md) +- [NXP - Manufacturing Data](./nxp_manufacturing_flow.md) +- [NXP - RTs OTA Software Update Guide](./nxp_RTs_ota_software_update.md) +- [NXP - Zephyr OTA Software Update Guide](./nxp_zephyr_ota_software_update.md diff --git a/docs/guides/nxp/nxp_rw61x_ota_software_update.md b/docs/platforms/nxp/nxp_RTs_ota_software_update.md similarity index 68% rename from docs/guides/nxp/nxp_rw61x_ota_software_update.md rename to docs/platforms/nxp/nxp_RTs_ota_software_update.md index af67b1419d..696f5078c1 100644 --- a/docs/guides/nxp/nxp_rw61x_ota_software_update.md +++ b/docs/platforms/nxp/nxp_RTs_ota_software_update.md @@ -1,13 +1,19 @@ -# Matter Over-The-Air Software Update with NXP RW61x example applications +# Matter Over-The-Air Software Update with NXP RTs example applications ## Overview +This document describes OTA feature on NXP devices: + +- RW61x +- RT1060_EVK-C +- RT1170_EVK-B + The OTA Requestor feature enables the device to be informed of, download and apply a software update from an OTA Provider. -This section explains how to perform an OTA Software Update with NXP RW61x -example applications. Throughout this guide, the all-clusters application is -used as an example. +This section explains how to perform an OTA Software Update with NXP RTs example +applications. Throughout this guide, the all-clusters application is used as an +example. In general, the Over-The-Air Software Update process consists of the following steps : @@ -24,10 +30,9 @@ steps : ### Flash Memory Layout -The RW61x Flash is divided into different regions as follow : +The RTs Flash is divided into different regions as follow : -- Bootloader : MCUBoot resides at the base of the flash and occupies 0x20000 - (128 kB). +- Bootloader : MCUBoot resides at the base of the flash. - Primary application partition : The example application which would be run by the bootloader (active application). The size reserved for this partition is 4.4 MB. @@ -36,11 +41,12 @@ The RW61x Flash is divided into different regions as follow : Notes : -- The CPU1/CPU2 firmware are embedded in the CPU3 example application. +- For RW61x: The CPU1/CPU2 firmware are embedded in the CPU3 example + application. - The sizes of the primary and secondary applications are provided as an example (currently 4.4 MB is reserved for each partition). The size can be changed by modifying the `m_app_max_sectors` value in the linker script of - the application (`RW610_flash.ld`). + the application . ### MCUBoot Bootloader @@ -48,11 +54,11 @@ MCUBoot is an open-source secure bootloader used by RW61x to apply the self-upgrade. For more details, please refer to the [MCUBoot documentation](https://github.com/mcu-tools/mcuboot/blob/main/docs/design.md). -For RW61x platform, the bootloader is configured to use the flash remapping +For RTs platform, the bootloader is configured to use the flash remapping mechanism by default, in order to perform the image upgrade. This is achieved by using the `MCUBoot DIRECT-XIP` upgrade mode. -## OTA Software Update process for RW61x example application +## OTA Software Update process for RTs example application ### Flashing the bootloader @@ -71,9 +77,11 @@ $ JLink Run the following commands : -``` +Connect J-Link debugger to device: + +```sh J-Link > connect -Device> ? # you will be presented with a dialog -> select `RW612` +Device> ? # you will be presented with a dialog -> select `RW612` for RW61x, `MIMXRT1062XXX6B` for RT1060, `MIMXRT1176xxxA_M7` for RT1170 Please specify target interface: J) JTAG (Default) S) SWD @@ -81,34 +89,60 @@ T) cJTAG TIF> S Specify target interface speed [kHz]. : 4000 kHz Speed> # +``` + +Erase flash: + +``` J-Link > exec EnableEraseAllFlashBanks +``` + +For RW61x + +``` J-Link > erase 0x8000000, 0x88a0000 ``` -- MCUBoot application can be built with SDK installed, using instructions +For RT1060-EVK-C - below. +``` +J-Link > erase 0x60000000, 0x61000000 +``` -- Retrieve the mcuboot directory with : +For RT1170-EVK-B ``` -user@ubuntu: cd ~/Desktop/connectedhomeip/third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/examples//ota_examples/mcuboot_opensource/armgcc +J-Link > erase 0x30000000, 0x34000000 ``` -``: Supported rw612 boards are: `rdrw612bga` or `frdmrw612` +- MCUBoot application can be built with SDK installed, using instructions + below. +- Retrieve the mcuboot directory located at + _'/third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/examples/`RTboard`1/ota_examples/`mcuboot_opensource/armgcc`'_ + +_1 `rdrw612bga` or `frdmrw612` for RW61x, +`evkcmimxrt1060` for RT1060-EVK-C, `evkbmimxrt1170` for RT1170-EVK-B_ + +``` +user@ubuntu: cd ~/Desktop/connectedhomeip/third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/examples//ota_examples/mcuboot_opensource/armgcc +``` -- Build the mcuboot application : +- Build the mcuboot application with running + `build_script`2 ``` -user@ubuntu: chmod +x build_flash_release.sh +user@ubuntu: chmod +x user@ubuntu: export ARMGCC_DIR=/opt/gcc-arm-none-eabi-10.3-2021.10 # with ARMGCC_DIR referencing the compiler path -user@ubuntu: ./build_flash_release.sh +user@ubuntu: ./ ``` +_2 `build_flash_release.sh` for RW61x, +`build_flexspi_nor_release.sh` for RT1060 and RT1170_ + - Program the generated binary to the target board. ``` -J-Link > loadbin ~/Desktop/connectedhomeip/third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/examples//ota_examples/mcuboot_opensource/armgcc/flash_release/mcuboot_opensource.elf +J-Link > loadbin /mcuboot_opensource.elf ``` - If it runs successfully, the following logs will be displayed on the @@ -126,10 +160,11 @@ Unable to find bootable image Note : By default, mcuboot application considers the primary and secondary partitions to be the size of 4.4 MB. If the size is to be changed, the partition -addresses should be modified in the flash_partitioning.h accordingly. For more +addresses should be modified in the `flash_partitioning.h` accordingly. For more information about the flash partitioning with mcuboot, please refer to the -dedicated readme.txt located in -"`/third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/examples//ota_examples/mcuboot_opensource/`". +dedicated `readme.txt` located in + +> _/third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/examples/`RTboard`1/ota_examples/`mcuboot_opensource`/._ ### Generating and flashing the signed application image @@ -143,15 +178,25 @@ The image must have the following format : signature, the upgrade type, the swap status... The all-clusters application can be generated using the instructions from the -[README.md 'Building'](../../../examples/all-clusters-app/nxp/rt/rw61x/README.md#building) -section. The application is automatically linked to be executed from the primary -image partition, taking into consideration the offset imposed by mcuboot. -The resulting executable file found in out/debug/chip-rw61x-all-cluster-example +README.md3'Building' section. The +application is automatically linked to be executed from the primary image +partition, taking into consideration the offset imposed by mcuboot. + +_3 +[RW61x README.md 'Building'](../../../examples/all-clusters-app/nxp/rt/rw61x/README.md#building), +[RT1060 README.md 'Building'](../../../examples/all-clusters-app/nxp/rt/rt1060/README.md#building), +[RT1170 README.md 'Building'](../../../examples/all-clusters-app/nxp/rt/rt1170/README.md#building)_ + +The resulting executable file found in +out/release/chip-`board`4-all-cluster-example needs to be converted into raw binary format as shown below. -``` -arm-none-eabi-objcopy -R .flash_config -R .NVM -O binary chip-rw61x-all-cluster-example chip-rw61x-all-cluster-example.bin +_4 `rw61x` for RW61x, `rt1060` for +RT1060-EVK-C, `rt1170` for RT1170-EVK-B_ + +```sh +arm-none-eabi-objcopy -R .flash_config -R .NVM -O binary chip-<"board">-all-cluster-example chip-<"board">-all-cluster-example.bin ``` To sign the image and wrap the raw binary of the application with the header and @@ -161,10 +206,10 @@ trailer, "`imgtool`" is provided in the SDK and can be found in The following commands can be run (make sure to replace the /path/to/file/binary with the adequate files): -``` +```sh user@ubuntu: cd ~/Desktop//third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/middleware/mcuboot_opensource/scripts/ -user@ubuntu: python3 imgtool.py sign --key ~/Desktop//third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/examples//ota_examples/mcuboot_opensource/keys/sign-rsa2048-priv.pem --align 4 --header-size 0x1000 --pad-header --pad --confirm --slot-size 0x440000 --max-sectors 1088 --version "1.0" ~/Desktop/connectedhomeip/examples/all-clusters-app/nxp/rt/rw61x/out/debug/chip-rw61x-all-cluster-example.bin ~/Desktop/connectedhomeip/examples/all-clusters-app/nxp/rt/rw61x/out/debug/chip-rw61x-all-cluster-example_SIGNED.bin +user@ubuntu: python3 imgtool.py sign --key ~/Desktop//third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/examples//ota_examples/mcuboot_opensource/keys/sign-rsa2048-priv.pem --align 4 --header-size 0x1000 --pad-header --pad --confirm --slot-size 0x440000 --max-sectors 1088 --version "1.0" ~/Desktop/connectedhomeip/examples/all-clusters-app/nxp/rt/<"rt_board">/out/debug/chip-<"rt_board">-all-cluster-example.bin ~/Desktop/connectedhomeip/examples/all-clusters-app/nxp/rt/<"rt_board">/out/debug/chip-<"rt_board">-all-cluster-example_SIGNED.bin ``` Notes : @@ -176,7 +221,7 @@ Notes : adjusted accordingly. - In this example, the image is signed with the private key provided by the SDK as an example - (`/third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/examples//ota_examples/mcuboot_opensource/keys/sign-rsa2048-priv.pem`), + (`/third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/examples//ota_examples/mcuboot_opensource/keys/sign-rsa2048-priv.pem`), MCUBoot is built with its corresponding public key which would be used to verify the integrity of the image. It is possible to generate a new pair of keys using the following commands. This procedure should be done prior to @@ -195,18 +240,31 @@ user@ubuntu: python3 imgtool.py getpub -k priv_key.pem ``` - The extracted public key can then be copied to the - `/third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/examples//ota_examples/mcuboot_opensource/keys/sign-rsa2048-pub.c`, + `/third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/examples//ota_examples/mcuboot_opensource/keys/sign-rsa2048-pub.c`, given as a value to the rsa_pub_key[] array. The resulting output is the signed binary of the application version "1.0". -JLink can be used to flash the application at the address 0x8020000, using the -command : +JLink can be used to flash the application using the command : + +For RW61x ``` J-Link > loadbin chip-rw61x-all-cluster-example_SIGNED.bin 0x8020000 ``` +For RT1060-EVK-C + +``` +J-Link > loadbin chip-rt1060-all-cluster-example_SIGNED.bin 0x60040000 +``` + +For RT1170-EVK-B + +``` +J-Link > loadbin chip-rt1170-all-cluster-example_SIGNED.bin 0x30040000 +``` + The bootloader should then be able to jump directly to the start of the application and run it. @@ -226,8 +284,8 @@ When the signed binary of the update is generated, the file should be converted into OTA format. To do so, the ota_image_tool is provided in the repo and can be used to convert a binary file into an .ota file. -``` -user@ubuntu:~/connectedhomeip$ : ./src/app/ota_image_tool.py create -v 0xDEAD -p 0xBEEF -vn 2 -vs "2.0" -da sha256 chip-rw61x-all-cluster-example_SIGNED.bin chip-rw61x-all-cluster-example.ota +```sh +user@ubuntu:~/connectedhomeip$ : ./src/app/ota_image_tool.py create -v 0xDEAD -p 0xBEEF -vn 2 -vs "2.0" -da sha256 chip-<"rt_board">-all-cluster-example_SIGNED.bin chip-rw61x-all-cluster-example.ota ``` The generated OTA file can be used to perform the OTA Software Update. The @@ -240,7 +298,7 @@ Setup example : - [Chip-tool](../../../examples/chip-tool/README.md) application running on the RPi. - OTA Provider application built on the same RPi (as explained below). -- RW61x board programmed with the example application (with the instructions +- RT board programmed with the example application (with the instructions above). Before starting the OTA process, the Linux OTA Provider application can be built @@ -248,9 +306,11 @@ on the RPi (if not already present in the pre-installed apps) : ``` user@ubuntu:~/connectedhomeip$ : ./scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/ota-provider-app chip_config_network_layer_ble=false - user@ubuntu:~/connectedhomeip$ : rm -rf /tmp/chip_* -user@ubuntu:~/connectedhomeip$ : ./out/ota-provider-app/chip-ota-provider-app -f chip-rw61x-all-cluster-example.ota +``` + +```sh +user@ubuntu:~/connectedhomeip$ : ./out/ota-provider-app/chip-ota-provider-app -f chip-<"rt_board">-all-cluster-example.ota ``` The OTA Provider should first be provisioned with chip-tool by assigning it the diff --git a/docs/guides/nxp/nxp_imx8m_linux_examples.md b/docs/platforms/nxp/nxp_imx8m_linux_examples.md similarity index 100% rename from docs/guides/nxp/nxp_imx8m_linux_examples.md rename to docs/platforms/nxp/nxp_imx8m_linux_examples.md diff --git a/docs/guides/nxp/nxp_k32w0_ota_guide.md b/docs/platforms/nxp/nxp_k32w0_ota_guide.md similarity index 100% rename from docs/guides/nxp/nxp_k32w0_ota_guide.md rename to docs/platforms/nxp/nxp_k32w0_ota_guide.md diff --git a/docs/guides/nxp/nxp_k32w_android_commissioning.md b/docs/platforms/nxp/nxp_k32w_android_commissioning.md similarity index 100% rename from docs/guides/nxp/nxp_k32w_android_commissioning.md rename to docs/platforms/nxp/nxp_k32w_android_commissioning.md diff --git a/docs/guides/nxp/nxp_manufacturing_flow.md b/docs/platforms/nxp/nxp_manufacturing_flow.md similarity index 100% rename from docs/guides/nxp/nxp_manufacturing_flow.md rename to docs/platforms/nxp/nxp_manufacturing_flow.md diff --git a/docs/guides/nxp/nxp_mcxw71_ota_guide.md b/docs/platforms/nxp/nxp_mcxw71_ota_guide.md similarity index 100% rename from docs/guides/nxp/nxp_mcxw71_ota_guide.md rename to docs/platforms/nxp/nxp_mcxw71_ota_guide.md diff --git a/docs/guides/nxp/nxp_otbr_guide.md b/docs/platforms/nxp/nxp_otbr_guide.md similarity index 100% rename from docs/guides/nxp/nxp_otbr_guide.md rename to docs/platforms/nxp/nxp_otbr_guide.md diff --git a/docs/guides/nxp/nxp_zephyr_ota_software_update.md b/docs/platforms/nxp/nxp_zephyr_ota_software_update.md similarity index 100% rename from docs/guides/nxp/nxp_zephyr_ota_software_update.md rename to docs/platforms/nxp/nxp_zephyr_ota_software_update.md diff --git a/docs/platforms/openiotsdk/index.md b/docs/platforms/openiotsdk/index.md new file mode 100644 index 0000000000..8bd73c46e1 --- /dev/null +++ b/docs/platforms/openiotsdk/index.md @@ -0,0 +1,15 @@ +# OpenIoTSDK + +```{toctree} +:glob: +:maxdepth: 1 +:hidden: + +* +``` + +[Commissioning](./openiotsdk_commissioning.md) +[Examples software update](./openiotsdk_examples_software_update.md) +[Examples](./openiotsdk_examples.md) +[Platform overview](./openiotsdk_platform_overview.md) +[Unit tests](./openiotsdk_unit_tests.md) diff --git a/docs/guides/openiotsdk_commissioning.md b/docs/platforms/openiotsdk/openiotsdk_commissioning.md similarity index 90% rename from docs/guides/openiotsdk_commissioning.md rename to docs/platforms/openiotsdk/openiotsdk_commissioning.md index 520cff033d..969b304228 100644 --- a/docs/guides/openiotsdk_commissioning.md +++ b/docs/platforms/openiotsdk/openiotsdk_commissioning.md @@ -9,11 +9,11 @@ connected to the IP network and do not require credentials provisioning. ## Building Matter controller -The [Matter controller](../../src/controller/README.md) is a client application -that allows commission and control of the Matter node. +The [Matter controller](../../../src/controller/README.md) is a client +application that allows commission and control of the Matter node. -The [POSIX CLI chip-tool](../../examples/chip-tool/README.md) is the recommended -Matter controller to use with Open IoT SDK devices. +The [POSIX CLI chip-tool](../../../examples/chip-tool/README.md) is the +recommended Matter controller to use with Open IoT SDK devices. To build `chip-tool` execute command: diff --git a/docs/guides/openiotsdk_examples.md b/docs/platforms/openiotsdk/openiotsdk_examples.md similarity index 98% rename from docs/guides/openiotsdk_examples.md rename to docs/platforms/openiotsdk/openiotsdk_examples.md index b80ce6304f..c91863a1b7 100644 --- a/docs/guides/openiotsdk_examples.md +++ b/docs/platforms/openiotsdk/openiotsdk_examples.md @@ -22,7 +22,7 @@ You can use these examples as a reference for creating your own applications. The VSCode devcontainer has all the dependencies pre-installed. It is the recommended way to build, run and develop with the Open IoT SDK port of the Matter Project. Please read this -[VSCode development guide](../VSCODE_DEVELOPMENT.md) for more information. +[VSCode development guide](../../VSCODE_DEVELOPMENT.md) for more information. Before building the examples, check out the Matter repository and sync Open IoT SDK submodules using the following command: @@ -347,11 +347,11 @@ provides the `-K,--kvsfile` option to use the persistence options listed above. Open IoT SDK port supports two crypto backend implementations: -- [Mbed TLS](../guides/openiotsdk_platform_overview.md#mbed-tls) - it's the - default option +- [Mbed TLS](./openiotsdk_platform_overview.md#mbed-tls) - it's the default + option - [PSA crypto service](https://tf-m-user-guide.trustedfirmware.org/integration_guide/services/tfm_crypto_integration_guide.html) from the - [TrustedFirmware-M (TF-M)](../guides/openiotsdk_platform_overview.md#trusted-firmware-m) + [TrustedFirmware-M (TF-M)](./openiotsdk_platform_overview.md#trusted-firmware-m) component The CMake variable `CONFIG_CHIP_CRYPTO` controls how cryptographic operations diff --git a/docs/guides/openiotsdk_examples_software_update.md b/docs/platforms/openiotsdk/openiotsdk_examples_software_update.md similarity index 95% rename from docs/guides/openiotsdk_examples_software_update.md rename to docs/platforms/openiotsdk/openiotsdk_examples_software_update.md index 73129b84e5..686d95b8b7 100644 --- a/docs/guides/openiotsdk_examples_software_update.md +++ b/docs/platforms/openiotsdk/openiotsdk_examples_software_update.md @@ -19,12 +19,12 @@ The last required element is a Matter controller. This application controls both nodes and manages the entire software update process. In the procedure described below, the `OTA Provider` will be a -[Linux application](../../examples/ota-provider-app/linux/README.md) and the +[Linux application](../../../examples/ota-provider-app/linux/README.md) and the Open IoT SDK example with [DFU support](./openiotsdk_examples.md#device-firmware-update) will work as the -OTA Requestor. The [chip-tool](../../examples/chip-tool/README.md) application -used as the Matter controller. Each application should be launched in a separate -terminal. +OTA Requestor. The [chip-tool](../../../examples/chip-tool/README.md) +application used as the Matter controller. Each application should be launched +in a separate terminal. List of `OIS` examples that currently support the `DFU` over Matter: @@ -41,7 +41,7 @@ List of `OIS` examples that currently support the `DFU` over Matter: ``` More details about the `OTA provider` application can be found - [here](../../examples/ota-provider-app/linux/README.md). + [here](../../../examples/ota-provider-app/linux/README.md). 3. Build `chip-tool`: @@ -50,7 +50,7 @@ List of `OIS` examples that currently support the `DFU` over Matter: ``` More details about the `chip-tool` application can be found - [here](../../examples/chip-tool/README.md). + [here](../../../examples/chip-tool/README.md). 4. Build `OIS` example application diff --git a/docs/guides/openiotsdk_platform_overview.md b/docs/platforms/openiotsdk/openiotsdk_platform_overview.md similarity index 100% rename from docs/guides/openiotsdk_platform_overview.md rename to docs/platforms/openiotsdk/openiotsdk_platform_overview.md diff --git a/docs/guides/openiotsdk_unit_tests.md b/docs/platforms/openiotsdk/openiotsdk_unit_tests.md similarity index 100% rename from docs/guides/openiotsdk_unit_tests.md rename to docs/platforms/openiotsdk/openiotsdk_unit_tests.md diff --git a/docs/platforms/openthread/index.md b/docs/platforms/openthread/index.md new file mode 100644 index 0000000000..a4926817e2 --- /dev/null +++ b/docs/platforms/openthread/index.md @@ -0,0 +1,12 @@ +# OpenThread + +```{toctree} +:glob: +:maxdepth: 1 +:hidden: + +* +``` + +[Border Router](./openthread_border_router_pi.md) +[NRF dongle](./openthread_rcp_nrf_dongle.md) diff --git a/docs/guides/openthread_border_router_pi.md b/docs/platforms/openthread/openthread_border_router_pi.md similarity index 100% rename from docs/guides/openthread_border_router_pi.md rename to docs/platforms/openthread/openthread_border_router_pi.md diff --git a/docs/guides/openthread_rcp_nrf_dongle.md b/docs/platforms/openthread/openthread_rcp_nrf_dongle.md similarity index 100% rename from docs/guides/openthread_rcp_nrf_dongle.md rename to docs/platforms/openthread/openthread_rcp_nrf_dongle.md diff --git a/docs/guides/images/silabs_logo.png b/docs/platforms/silabs/images/silabs_logo.png similarity index 100% rename from docs/guides/images/silabs_logo.png rename to docs/platforms/silabs/images/silabs_logo.png diff --git a/docs/platforms/silabs/index.md b/docs/platforms/silabs/index.md new file mode 100644 index 0000000000..3e743df0cb --- /dev/null +++ b/docs/platforms/silabs/index.md @@ -0,0 +1,14 @@ +# Silabs + +```{toctree} +:glob: +:maxdepth: 1 +:hidden: + +* +``` + +[CLI guide](./silabs_cli_guide.md) +[Common app behavior](./silabs_common_app_behavior.md) +[EFR32 software update](./silabs_efr32_software_update.md) +[Getting Started](./silabs_getting_started.md) diff --git a/docs/guides/silabs_cli_guide.md b/docs/platforms/silabs/silabs_cli_guide.md similarity index 100% rename from docs/guides/silabs_cli_guide.md rename to docs/platforms/silabs/silabs_cli_guide.md diff --git a/docs/guides/silabs_common_app_behavior.md b/docs/platforms/silabs/silabs_common_app_behavior.md similarity index 100% rename from docs/guides/silabs_common_app_behavior.md rename to docs/platforms/silabs/silabs_common_app_behavior.md diff --git a/docs/guides/silabs_efr32_software_update.md b/docs/platforms/silabs/silabs_efr32_software_update.md similarity index 98% rename from docs/guides/silabs_efr32_software_update.md rename to docs/platforms/silabs/silabs_efr32_software_update.md index 9f94753aa7..6bdce3d40d 100644 --- a/docs/guides/silabs_efr32_software_update.md +++ b/docs/platforms/silabs/silabs_efr32_software_update.md @@ -118,7 +118,7 @@ to 2). Starting the ota-provider-app with the --otaImageList command line option allows the user to supply a JSON file specifying the Software Version, Vendor and Product ID that identify the image served by the Provider, see -[ota-provider-app](../../examples/ota-provider-app/linux/README.md) +[ota-provider-app](../../../examples/ota-provider-app/linux/README.md) Example provider configuration file: diff --git a/docs/guides/silabs_getting_started.md b/docs/platforms/silabs/silabs_getting_started.md similarity index 100% rename from docs/guides/silabs_getting_started.md rename to docs/platforms/silabs/silabs_getting_started.md diff --git a/docs/platforms/stm32/index.md b/docs/platforms/stm32/index.md new file mode 100644 index 0000000000..7b0d56ce3e --- /dev/null +++ b/docs/platforms/stm32/index.md @@ -0,0 +1,11 @@ +# ESP32 + +```{toctree} +:glob: +:maxdepth: 1 +:hidden: + +* +``` + +[Getting Started Guide](./stm32_getting_started_guide.md) diff --git a/docs/guides/stm32_getting_started_guide.md b/docs/platforms/stm32/stm32_getting_started_guide.md similarity index 98% rename from docs/guides/stm32_getting_started_guide.md rename to docs/platforms/stm32/stm32_getting_started_guide.md index 55f856cbc0..954dde35c0 100644 --- a/docs/guides/stm32_getting_started_guide.md +++ b/docs/platforms/stm32/stm32_getting_started_guide.md @@ -28,7 +28,7 @@ subfolder. ## Building the Example Application -- [Set Up Matter Environment](./BUILDING.md) +- [Set Up Matter Environment](../../guides/BUILDING.md) - Set up STLINK tools diff --git a/docs/guides/images/matter_ti_overview_simplified.png b/docs/platforms/ti/images/matter_ti_overview_simplified.png similarity index 100% rename from docs/guides/images/matter_ti_overview_simplified.png rename to docs/platforms/ti/images/matter_ti_overview_simplified.png diff --git a/docs/guides/images/matter_ti_overview_wifi.png b/docs/platforms/ti/images/matter_ti_overview_wifi.png similarity index 100% rename from docs/guides/images/matter_ti_overview_wifi.png rename to docs/platforms/ti/images/matter_ti_overview_wifi.png diff --git a/docs/platforms/ti/index.md b/docs/platforms/ti/index.md new file mode 100644 index 0000000000..aa49ab94d1 --- /dev/null +++ b/docs/platforms/ti/index.md @@ -0,0 +1,17 @@ +# TI + +```{toctree} +:glob: +:maxdepth: 1 +:hidden: + +* +matter-migration-guide/* +matter-syscfg/* +matter-users-guide/* +``` + +- [Overview](./ti_matter_overview.md) +- [Matter migration guide](./matter-migration-guide/) +- [Syscfg](./matter-syscfg/) +- [User guide](./matter-users-guide/) diff --git a/docs/guides/ti/matter-migration-guide/matter_cc2674_migration.md b/docs/platforms/ti/matter-migration-guide/matter_cc2674_migration.md similarity index 100% rename from docs/guides/ti/matter-migration-guide/matter_cc2674_migration.md rename to docs/platforms/ti/matter-migration-guide/matter_cc2674_migration.md diff --git a/docs/guides/ti/matter-syscfg/getting-started.md b/docs/platforms/ti/matter-syscfg/getting-started.md similarity index 100% rename from docs/guides/ti/matter-syscfg/getting-started.md rename to docs/platforms/ti/matter-syscfg/getting-started.md diff --git a/docs/guides/ti/matter-syscfg/images/board_view.png b/docs/platforms/ti/matter-syscfg/images/board_view.png similarity index 100% rename from docs/guides/ti/matter-syscfg/images/board_view.png rename to docs/platforms/ti/matter-syscfg/images/board_view.png diff --git a/docs/guides/ti/matter-syscfg/images/generated_files_ble.png b/docs/platforms/ti/matter-syscfg/images/generated_files_ble.png similarity index 100% rename from docs/guides/ti/matter-syscfg/images/generated_files_ble.png rename to docs/platforms/ti/matter-syscfg/images/generated_files_ble.png diff --git a/docs/guides/ti/matter-syscfg/images/hardware_view.png b/docs/platforms/ti/matter-syscfg/images/hardware_view.png similarity index 100% rename from docs/guides/ti/matter-syscfg/images/hardware_view.png rename to docs/platforms/ti/matter-syscfg/images/hardware_view.png diff --git a/docs/guides/ti/matter-syscfg/images/reserve-gpio.png b/docs/platforms/ti/matter-syscfg/images/reserve-gpio.png similarity index 100% rename from docs/guides/ti/matter-syscfg/images/reserve-gpio.png rename to docs/platforms/ti/matter-syscfg/images/reserve-gpio.png diff --git a/docs/guides/ti/matter-syscfg/images/reserve-peripheral-panel.png b/docs/platforms/ti/matter-syscfg/images/reserve-peripheral-panel.png similarity index 100% rename from docs/guides/ti/matter-syscfg/images/reserve-peripheral-panel.png rename to docs/platforms/ti/matter-syscfg/images/reserve-peripheral-panel.png diff --git a/docs/guides/ti/matter-syscfg/images/show_generated_files_tab.png b/docs/platforms/ti/matter-syscfg/images/show_generated_files_tab.png similarity index 100% rename from docs/guides/ti/matter-syscfg/images/show_generated_files_tab.png rename to docs/platforms/ti/matter-syscfg/images/show_generated_files_tab.png diff --git a/docs/guides/ti/matter-syscfg/sysconfig-board.md b/docs/platforms/ti/matter-syscfg/sysconfig-board.md similarity index 100% rename from docs/guides/ti/matter-syscfg/sysconfig-board.md rename to docs/platforms/ti/matter-syscfg/sysconfig-board.md diff --git a/docs/guides/ti/matter-users-guide/enabling_icd_on_ti_devices.md b/docs/platforms/ti/matter-users-guide/enabling_icd_on_ti_devices.md similarity index 94% rename from docs/guides/ti/matter-users-guide/enabling_icd_on_ti_devices.md rename to docs/platforms/ti/matter-users-guide/enabling_icd_on_ti_devices.md index 50495a601e..b024b90b40 100644 --- a/docs/guides/ti/matter-users-guide/enabling_icd_on_ti_devices.md +++ b/docs/platforms/ti/matter-users-guide/enabling_icd_on_ti_devices.md @@ -24,9 +24,6 @@ Trigger Support, set the following parameter to true: chip_enable_icd_lit = true ``` -TI examples have only been tested with the ICD Server configuration. To enable -the client configuration, set `chip_enable_icd_client` to true. - Persistent subscriptions allow devices to attempt resuming existing subscriptions following a device reset. To enable persistent subscriptions, set the following parameter to true: diff --git a/docs/guides/ti/matter-users-guide/images/cc13x4_memmap.png b/docs/platforms/ti/matter-users-guide/images/cc13x4_memmap.png similarity index 100% rename from docs/guides/ti/matter-users-guide/images/cc13x4_memmap.png rename to docs/platforms/ti/matter-users-guide/images/cc13x4_memmap.png diff --git a/docs/guides/ti/matter-users-guide/images/factory_data_overview.png b/docs/platforms/ti/matter-users-guide/images/factory_data_overview.png similarity index 100% rename from docs/guides/ti/matter-users-guide/images/factory_data_overview.png rename to docs/platforms/ti/matter-users-guide/images/factory_data_overview.png diff --git a/docs/guides/ti/matter-users-guide/ti_factory_data_user_guide.md b/docs/platforms/ti/matter-users-guide/ti_factory_data_user_guide.md similarity index 100% rename from docs/guides/ti/matter-users-guide/ti_factory_data_user_guide.md rename to docs/platforms/ti/matter-users-guide/ti_factory_data_user_guide.md diff --git a/docs/guides/ti/matter-users-guide/ti_openthread_library_usage.md b/docs/platforms/ti/matter-users-guide/ti_openthread_library_usage.md similarity index 100% rename from docs/guides/ti/matter-users-guide/ti_openthread_library_usage.md rename to docs/platforms/ti/matter-users-guide/ti_openthread_library_usage.md diff --git a/docs/guides/ti/ti_matter_overview.md b/docs/platforms/ti/ti_matter_overview.md similarity index 99% rename from docs/guides/ti/ti_matter_overview.md rename to docs/platforms/ti/ti_matter_overview.md index 44943fa46b..176ea26d95 100644 --- a/docs/guides/ti/ti_matter_overview.md +++ b/docs/platforms/ti/ti_matter_overview.md @@ -103,7 +103,7 @@ by the platform implementation files. Below are several resources available for Matter development: - [Matter Protocol Overview](https://handbook.buildwithmatter.com/howitworks/roles/) -- [Matter Build Guide](../BUILDING.md) +- [Matter Build Guide](../../guides/BUILDING.md) - [Matter over Thread Getting Started](https://dev.ti.com/tirex/explore/node?node=A__AciOYyNq9gli.nsvJzBtQg__com.ti.SIMPLELINK_ACADEMY_CC13XX_CC26XX_SDK__AfkT0vQ__LATEST) - [TI Matter over Wi-Fi Getting Started](https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/1122413/faq-cc3235sf-matter----getting-started-guide) - [TI Matter Application Development](https://dev.ti.com/tirex/explore/node?node=A__AXNOPYikmtBCHJ-L6eRivA__com.ti.SIMPLELINK_ACADEMY_CC13XX_CC26XX_SDK__AfkT0vQ__LATEST) diff --git a/docs/testing/python.md b/docs/testing/python.md index a186e9bf20..4541871dcb 100644 --- a/docs/testing/python.md +++ b/docs/testing/python.md @@ -25,7 +25,7 @@ Python tests located in src/python_testing section should include various parameters and their respective values, which will guide the test runner on how to execute the tests. - All test classes inherit from `MatterBaseTest` in - [matter_testing_support.py](https://github.com/project-chip/connectedhomeip/blob/master/src/python_testing/matter_testing_support.py) + [matter_testing.py](https://github.com/project-chip/connectedhomeip/blob/master/src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py) - Support for commissioning using the python controller - Default controller (`self.default_controller`) of type `ChipDeviceCtrl` - `MatterBaseTest` inherits from the Mobly BaseTestClass @@ -38,7 +38,7 @@ Python tests located in src/python_testing decorated with the @async_test_body decorator - Use `ChipDeviceCtrl` to interact with the DUT - Controller API is in `ChipDeviceCtrl.py` (see API doc in file) - - Some support methods in `matter_testing_support.py` + - Some support methods in `matter_testing.py` - Use Mobly assertions for failing tests - `self.step()` along with a `steps_*` method to mark test plan steps for cert tests @@ -61,7 +61,7 @@ Python tests located in src/python_testing # --passcode 20202021 # --trace-to json:${TRACE_TEST_JSON}.json # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto -# factoryreset: true +# factory-reset: true # quiet: true # === END CI TEST ARGUMENTS === @@ -379,7 +379,7 @@ pai = await dev_ctrl.SendCommand(nodeid, 0, Clusters.OperationalCredentials.Comm ## Mobly helpers The test system is based on Mobly, and the -[matter_testing_support.py](https://github.com/project-chip/connectedhomeip/blob/master/src/python_testing/matter_testing_support.py) +[matter_testing.py](https://github.com/project-chip/connectedhomeip/blob/master/src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py) class provides some helpers for Mobly integration. - `default_matter_test_main` @@ -561,11 +561,11 @@ these steps to set this up: ## Other support utilities -- `basic_composition_support` +- `basic_composition` - wildcard read, whole device analysis - `CommissioningFlowBlocks` - various commissioning support for core tests -- `spec_parsing_support` +- `spec_parsing` - parsing data model XML into python readable format # Running tests locally @@ -594,7 +594,7 @@ Next build the python wheels and create / activate a venv (called `pyenv` here, but any name may be used) ``` -./scripts/build_python.sh -i pyenv +./scripts/build_python.sh -i out/python_env source pyenv/bin/activate ``` @@ -627,7 +627,9 @@ for the CI). These arguments can be passed as sets of key/value pairs using the `./scripts/tests/run_python_test.py` is a convenient script that starts an example DUT on the host and includes factory reset support -`./scripts/tests/run_python_test.py --factoryreset --app --app-args "whatever" --script --script-args "whatever"` +```shell +./scripts/tests/run_python_test.py --factory-reset --app --app-args "whatever" --script --script-args "whatever" +``` # Running tests in CI @@ -678,7 +680,7 @@ for that run, e.g.: # app: ${TYPE_OF_APP} # app-args: # script-args: -# factoryreset: +# factory-reset: # quiet: # === END CI TEST ARGUMENTS === ``` @@ -692,7 +694,7 @@ for that run, e.g.: - Example: `${TYPE_OF_APP}` -- `factoryreset`: Determines whether a factory reset should be performed +- `factory-reset`: Determines whether a factory reset should be performed before the test. - Example: `true` diff --git a/docs/testing/yaml.md b/docs/testing/yaml.md index 9f65b1fed4..e3736d6272 100644 --- a/docs/testing/yaml.md +++ b/docs/testing/yaml.md @@ -334,7 +334,7 @@ Next build the python wheels and create a venv (called `py` here, but any name may be used) ``` -./scripts/build_python.sh -i py +./scripts/build_python.sh -i out/python_env source py/bin/activate ``` diff --git a/docs/zap_clusters.md b/docs/zap_clusters.md index 1250a60b71..b37e8b2b8b 100644 --- a/docs/zap_clusters.md +++ b/docs/zap_clusters.md @@ -129,7 +129,10 @@ Generally regenerate using one of: | 1294 | 0x50E | AccountLogin | | 1295 | 0x50F | ContentControl | | 1296 | 0x510 | ContentAppObserver | +| 1360 | 0x550 | ZoneManagement | +| 1361 | 0x551 | CameraAvStreamManagement | | 1363 | 0x553 | WebRTCTransportProvider | +| 1364 | 0x554 | WebRTCTransportRequestor | | 1366 | 0x556 | Chime | | 1872 | 0x750 | EcosystemInformation | | 1873 | 0x751 | CommissionerControl | diff --git a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter index dbcd306f44..8b8743c6b6 100644 --- a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter +++ b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter @@ -739,6 +739,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2770,7 +2771,6 @@ endpoint 1 { 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; @@ -2786,7 +2786,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2801,7 +2800,6 @@ endpoint 1 { callback attribute replacementProductList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -2818,7 +2816,6 @@ endpoint 1 { callback attribute replacementProductList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -2841,7 +2838,6 @@ endpoint 1 { ram attribute airflowDirection default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 4; @@ -2858,7 +2854,6 @@ endpoint 2 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2873,7 +2868,6 @@ endpoint 2 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2883,7 +2877,6 @@ endpoint 2 { callback attribute airQuality; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -2903,7 +2896,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2923,7 +2915,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2943,7 +2934,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2963,7 +2953,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2983,7 +2972,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -3003,7 +2991,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -3023,7 +3010,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -3043,7 +3029,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -3063,7 +3048,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -3083,7 +3067,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -3098,7 +3081,6 @@ endpoint 3 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -3114,7 +3096,6 @@ endpoint 3 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -3127,7 +3108,6 @@ endpoint 3 { ram attribute tolerance default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -3142,7 +3122,6 @@ endpoint 4 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -3158,7 +3137,6 @@ endpoint 4 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -3171,7 +3149,6 @@ endpoint 4 { ram attribute tolerance; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -3186,7 +3163,6 @@ endpoint 5 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -3202,7 +3178,6 @@ endpoint 5 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -3218,7 +3193,6 @@ endpoint 5 { ram attribute thermostatRunningState default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 6; diff --git a/examples/air-purifier-app/linux/README.md b/examples/air-purifier-app/linux/README.md index 2d771bdf5b..377d53a096 100644 --- a/examples/air-purifier-app/linux/README.md +++ b/examples/air-purifier-app/linux/README.md @@ -11,7 +11,7 @@ Temperature Sensor and Endpoint 5 is a Thermostat. To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini** **EVK**, see the associated -[README document](../../../docs/guides/nxp/nxp_imx8m_linux_examples.md) for +[README document](../../../docs/platforms/nxp/nxp_imx8m_linux_examples.md) for details.
diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter index dd9a87d59d..896a27edd0 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter @@ -739,6 +739,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2620,7 +2621,6 @@ endpoint 1 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2635,7 +2635,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2645,7 +2644,6 @@ endpoint 1 { callback attribute airQuality; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -2657,7 +2655,6 @@ endpoint 1 { ram attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2669,7 +2666,6 @@ endpoint 1 { ram attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -2681,7 +2677,6 @@ endpoint 1 { callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2693,7 +2688,6 @@ endpoint 1 { callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2705,7 +2699,6 @@ endpoint 1 { callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2717,7 +2710,6 @@ endpoint 1 { callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2729,7 +2721,6 @@ endpoint 1 { callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2741,7 +2732,6 @@ endpoint 1 { callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2753,7 +2743,6 @@ endpoint 1 { callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2765,7 +2754,6 @@ endpoint 1 { callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2777,7 +2765,6 @@ endpoint 1 { callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2789,7 +2776,6 @@ endpoint 1 { callback attribute maxMeasuredValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; diff --git a/examples/air-quality-sensor-app/linux/README.md b/examples/air-quality-sensor-app/linux/README.md index ef90a4bd23..158cd0d2de 100644 --- a/examples/air-quality-sensor-app/linux/README.md +++ b/examples/air-quality-sensor-app/linux/README.md @@ -7,7 +7,7 @@ for Raspberry Pi Desktop 20.10 (aarch64)** To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini** **EVK**, see the associated -[README document](../../../docs/guides/nxp/nxp_imx8m_linux_examples.md) for +[README document](../../../docs/platforms/nxp/nxp_imx8m_linux_examples.md) for details.
diff --git a/examples/air-quality-sensor-app/silabs/README.md b/examples/air-quality-sensor-app/silabs/README.md index d0e89d363d..7279e23457 100644 --- a/examples/air-quality-sensor-app/silabs/README.md +++ b/examples/air-quality-sensor-app/silabs/README.md @@ -330,7 +330,7 @@ tracking code inside the `trackAlloc` and `trackFree` function For the description of Software Update process with EFR32 example applications see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) +[EFR32 OTA Software Update](../../../docs/platforms/silabs/silabs_efr32_software_update.md) ## Building options 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 2d5c20aee4..fb770209b9 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 @@ -1642,6 +1642,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4708,13 +4709,13 @@ provisional cluster DeviceEnergyManagement = 152 { command ModifyForecastRequest(ModifyForecastRequestRequest): DefaultSuccess = 5; /** Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. */ command RequestConstraintBasedForecast(RequestConstraintBasedForecastRequest): DefaultSuccess = 6; - /** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command */ + /** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command. */ command CancelRequest(): DefaultSuccess = 7; } /** Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. */ cluster EnergyEvse = 153 { - revision 4; + revision 3; enum EnergyTransferStoppedReasonEnum : enum8 { kEVStopped = 0; @@ -4879,9 +4880,9 @@ cluster EnergyEvse = 153 { /** Allows a client to disable the EVSE from charging and discharging. */ timed command Disable(): DefaultSuccess = 1; - /** This command allows a client to enable the EVSE to charge an EV, */ + /** This command allows a client to enable the EVSE to charge an EV, and to provide or update the maximum and minimum charge current. */ timed command EnableCharging(EnableChargingRequest): DefaultSuccess = 2; - /** Upon receipt, this SHALL allow a client to enable the discharge of an EV, */ + /** Upon receipt, this SHALL allow a client to enable the discharge of an EV, and to provide or update the maximum discharge current. */ timed command EnableDischarging(EnableDischargingRequest): DefaultSuccess = 3; /** Allows a client to put the EVSE into a self-diagnostics mode. */ timed command StartDiagnostics(): DefaultSuccess = 4; @@ -4950,7 +4951,7 @@ cluster PowerTopology = 156 { /** Attributes and commands for selecting a mode from a list of supported options. */ cluster EnergyEvseMode = 157 { - revision 1; + revision 2; enum ModeTag : enum16 { kAuto = 0; @@ -4966,6 +4967,7 @@ cluster EnergyEvseMode = 157 { kManual = 16384; kTimeOfUse = 16385; kSolarCharging = 16386; + kV2X = 16387; } bitmap Feature : bitmap32 { @@ -4985,8 +4987,6 @@ cluster EnergyEvseMode = 157 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u startUpMode = 2; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5003,8 +5003,7 @@ cluster EnergyEvseMode = 157 { optional char_string<64> statusText = 1; } - /** This command is used to change device modes. - On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + /** This command is used to change device modes. */ command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } @@ -5045,8 +5044,6 @@ cluster WaterHeaterMode = 158 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u startUpMode = 2; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5060,17 +5057,16 @@ cluster WaterHeaterMode = 158 { response struct ChangeToModeResponse = 1 { enum8 status = 0; - optional char_string statusText = 1; + optional char_string<64> statusText = 1; } - /** This command is used to change device modes. - On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + /** This command is used to change device modes. */ command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } /** Attributes and commands for selecting a mode from a list of supported options. */ provisional cluster DeviceEnergyManagementMode = 159 { - revision 1; + revision 2; enum ModeTag : enum16 { kAuto = 0; @@ -5106,8 +5102,6 @@ provisional cluster DeviceEnergyManagementMode = 159 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u startUpMode = 2; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5124,8 +5118,7 @@ provisional cluster DeviceEnergyManagementMode = 159 { optional char_string<64> statusText = 1; } - /** This command is used to change device modes. - On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + /** This command is used to change device modes. */ command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } @@ -7586,7 +7579,6 @@ endpoint 0 { callback attribute tagList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -7608,7 +7600,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision; @@ -7642,7 +7633,6 @@ endpoint 0 { callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -7667,7 +7657,6 @@ endpoint 0 { callback attribute supportedLocales; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -7679,7 +7668,6 @@ endpoint 0 { callback attribute supportedCalendarTypes; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -7689,7 +7677,6 @@ endpoint 0 { persist attribute temperatureUnit default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x1; ram attribute clusterRevision default = 1; @@ -7711,7 +7698,6 @@ endpoint 0 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 2; @@ -7725,7 +7711,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -7752,7 +7737,6 @@ endpoint 0 { callback attribute threadVersion; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -7771,7 +7755,6 @@ endpoint 0 { server cluster DiagnosticLogs { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -7796,7 +7779,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -7967,7 +7949,6 @@ endpoint 0 { callback attribute adminVendorId; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -7986,7 +7967,6 @@ endpoint 0 { callback attribute currentFabricIndex; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -8012,7 +7992,6 @@ endpoint 0 { callback attribute maxGroupKeysPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -8067,7 +8046,6 @@ endpoint 1 { 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; @@ -8080,7 +8058,6 @@ endpoint 1 { 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; @@ -8105,7 +8082,6 @@ endpoint 1 { persist attribute startUpOnOff default = 0xFF; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0001; ram attribute clusterRevision default = 6; @@ -8154,7 +8130,6 @@ endpoint 1 { callback attribute tagList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -8185,7 +8160,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 2; @@ -8228,7 +8202,6 @@ endpoint 1 { callback attribute operationalError; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -8245,7 +8218,6 @@ endpoint 1 { ram attribute currentMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -8259,7 +8231,6 @@ endpoint 1 { ram attribute selectedDrynessLevel; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -8319,7 +8290,6 @@ endpoint 1 { callback attribute supportedRinses; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 1; @@ -8330,7 +8300,6 @@ endpoint 1 { callback attribute currentMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -8344,7 +8313,6 @@ endpoint 1 { callback attribute currentMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -8453,7 +8421,6 @@ endpoint 1 { callback attribute currentMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -8492,7 +8459,6 @@ endpoint 1 { callback attribute operationalError; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -8509,7 +8475,6 @@ endpoint 1 { callback attribute fabricSceneInfo; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -8576,7 +8541,6 @@ endpoint 1 { ram attribute sensorFault default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0F; ram attribute clusterRevision default = 1; @@ -8601,7 +8565,6 @@ endpoint 1 { ram attribute levelStep default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 1; @@ -8633,7 +8596,6 @@ endpoint 1 { callback attribute neutralCurrent; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -8650,7 +8612,6 @@ endpoint 1 { callback attribute cumulativeEnergyReset; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -8665,7 +8626,6 @@ endpoint 1 { callback attribute boostState; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -8689,7 +8649,6 @@ endpoint 1 { callback attribute optOutState; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -8730,7 +8689,6 @@ endpoint 1 { callback attribute sessionEnergyCharged; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 2; @@ -8753,7 +8711,6 @@ endpoint 1 { ram attribute currentLowPowerModeSensitivity; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 1; @@ -8764,7 +8721,6 @@ endpoint 1 { callback attribute activeEndpoints; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -8773,11 +8729,8 @@ endpoint 1 { server cluster EnergyEvseMode { callback attribute supportedModes; callback attribute currentMode; - ram attribute startUpMode; - ram attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -8789,11 +8742,8 @@ endpoint 1 { server cluster WaterHeaterMode { callback attribute supportedModes; callback attribute currentMode; - ram attribute startUpMode; - ram attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -8805,11 +8755,8 @@ endpoint 1 { server cluster DeviceEnergyManagementMode { callback attribute supportedModes; callback attribute currentMode; - ram attribute startUpMode; - ram attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -8912,7 +8859,6 @@ endpoint 1 { ram attribute setpointHoldExpiryTimestamp; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0123; ram attribute clusterRevision default = 7; @@ -9450,7 +9396,6 @@ endpoint 2 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -9463,7 +9408,6 @@ endpoint 2 { 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; @@ -9488,7 +9432,6 @@ endpoint 2 { ram attribute startUpOnOff; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0001; ram attribute clusterRevision default = 6; @@ -9509,7 +9452,6 @@ endpoint 2 { callback attribute tagList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -9525,7 +9467,6 @@ endpoint 2 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 2; @@ -9537,7 +9478,6 @@ endpoint 2 { callback attribute fabricSceneInfo; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -9658,7 +9598,6 @@ endpoint 65534 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -9675,7 +9614,6 @@ endpoint 65534 { callback attribute lastConnectErrorValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap default = 0; callback attribute clusterRevision default = 1; 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 f8e3dbd880..c3586287ea 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 @@ -1,6 +1,6 @@ { "fileFormat": 2, - "featureLevel": 103, + "featureLevel": 104, "creator": "zap", "keyValuePairs": [ { @@ -41,20 +41,23 @@ "code": 17, "profileId": 259, "label": "MA-powersource", - "name": "MA-powersource" + "name": "MA-powersource", + "deviceTypeOrder": 0 }, "deviceTypes": [ { "code": 17, "profileId": 259, "label": "MA-powersource", - "name": "MA-powersource" + "name": "MA-powersource", + "deviceTypeOrder": 0 }, { "code": 22, "profileId": 259, "label": "MA-rootdevice", - "name": "MA-rootdevice" + "name": "MA-rootdevice", + "deviceTypeOrder": 1 } ], "deviceVersions": [ @@ -329,22 +332,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -573,22 +560,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -1047,22 +1018,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -1389,22 +1344,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -1543,22 +1482,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -1665,22 +1588,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -1941,22 +1848,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -2177,22 +2068,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -2533,22 +2408,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -2657,22 +2516,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -2949,22 +2792,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -5192,22 +5019,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -5492,22 +5303,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -5712,22 +5507,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -6102,20 +5881,23 @@ "code": 256, "profileId": 259, "label": "MA-onofflight", - "name": "MA-onofflight" + "name": "MA-onofflight", + "deviceTypeOrder": 0 }, "deviceTypes": [ { "code": 256, "profileId": 259, "label": "MA-onofflight", - "name": "MA-onofflight" + "name": "MA-onofflight", + "deviceTypeOrder": 0 }, { "code": 17, "profileId": 259, "label": "MA-powersource", - "name": "MA-powersource" + "name": "MA-powersource", + "deviceTypeOrder": 1 } ], "deviceVersions": [ @@ -6220,22 +6002,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -6424,22 +6190,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -6694,22 +6444,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -7212,22 +6946,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -7579,24 +7297,8 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "type": "array", @@ -8088,22 +7790,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -8260,22 +7946,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -8398,22 +8068,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -9124,22 +8778,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -9280,22 +8918,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -9436,22 +9058,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -10651,22 +10257,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -11131,22 +10721,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -11424,22 +10998,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -12068,22 +11626,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -12384,22 +11926,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -12810,22 +12336,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -13021,22 +12531,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -13258,22 +12752,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -13559,22 +13037,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -14033,22 +13495,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -14264,22 +13710,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -14402,22 +13832,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -14488,71 +13902,39 @@ "name": "ChangeToModeResponse", "code": 1, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "SupportedModes", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentMode", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ { - "name": "StartUpMode", - "code": 2, + "name": "SupportedModes", + "code": 0, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OnMode", - "code": 3, + "name": "CurrentMode", + "code": 1, "mfgCode": null, "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -14590,22 +13972,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -14714,38 +14080,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "StartUpMode", - "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": "OnMode", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "GeneratedCommandList", "code": 65528, @@ -14778,22 +14112,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -14903,38 +14221,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "StartUpMode", - "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": "OnMode", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "GeneratedCommandList", "code": 65528, @@ -14967,22 +14253,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -16425,22 +15695,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -23363,20 +22617,23 @@ "code": 256, "profileId": 259, "label": "MA-onofflight", - "name": "MA-onofflight" + "name": "MA-onofflight", + "deviceTypeOrder": 0 }, "deviceTypes": [ { "code": 256, "profileId": 259, "label": "MA-onofflight", - "name": "MA-onofflight" + "name": "MA-onofflight", + "deviceTypeOrder": 0 }, { "code": 17, "profileId": 259, "label": "MA-powersource", - "name": "MA-powersource" + "name": "MA-powersource", + "deviceTypeOrder": 1 } ], "deviceVersions": [ @@ -23481,22 +22738,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -23685,22 +22926,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -23921,22 +23146,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -24107,22 +23316,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -24325,22 +23518,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -24602,22 +23779,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -24815,14 +23976,16 @@ "code": 15, "profileId": 259, "label": "MA-genericswitch", - "name": "MA-genericswitch" + "name": "MA-genericswitch", + "deviceTypeOrder": 0 }, "deviceTypes": [ { "code": 15, "profileId": 259, "label": "MA-genericswitch", - "name": "MA-genericswitch" + "name": "MA-genericswitch", + "deviceTypeOrder": 0 } ], "deviceVersions": [ @@ -25274,14 +24437,16 @@ "code": 15, "profileId": 259, "label": "MA-genericswitch", - "name": "MA-genericswitch" + "name": "MA-genericswitch", + "deviceTypeOrder": 0 }, "deviceTypes": [ { "code": 15, "profileId": 259, "label": "MA-genericswitch", - "name": "MA-genericswitch" + "name": "MA-genericswitch", + "deviceTypeOrder": 0 } ], "deviceVersions": [ @@ -25685,14 +24850,16 @@ "code": 25, "profileId": 259, "label": "MA-secondary-network-interface", - "name": "MA-secondary-network-interface" + "name": "MA-secondary-network-interface", + "deviceTypeOrder": 0 }, "deviceTypes": [ { "code": 25, "profileId": 259, "label": "MA-secondary-network-interface", - "name": "MA-secondary-network-interface" + "name": "MA-secondary-network-interface", + "deviceTypeOrder": 0 } ], "deviceVersions": [ @@ -25809,22 +24976,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, @@ -26117,22 +25268,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "AttributeList", "code": 65531, diff --git a/examples/all-clusters-app/asr/README.md b/examples/all-clusters-app/asr/README.md index bde062feab..6e31c18ac2 100755 --- a/examples/all-clusters-app/asr/README.md +++ b/examples/all-clusters-app/asr/README.md @@ -15,7 +15,7 @@ control on ASR platform. ## Building and Commissioning Please refer -[Building and Commissioning](../../../docs/guides/asr_getting_started_guide.md#building-the-example-application) +[Building and Commissioning](../../../docs/platforms/asr/asr_getting_started_guide.md#building-the-example-application) guides to get started ``` diff --git a/examples/all-clusters-app/esp32/README.md b/examples/all-clusters-app/esp32/README.md index 0a3145dbc2..8e6ef5a61d 100644 --- a/examples/all-clusters-app/esp32/README.md +++ b/examples/all-clusters-app/esp32/README.md @@ -4,16 +4,16 @@ A prototype application that demonstrates device commissioning and cluster control. Please -[setup ESP-IDF and CHIP Environment](../../../docs/guides/esp32/setup_idf_chip.md) +[setup ESP-IDF and CHIP Environment](../../../docs/platforms/esp32/setup_idf_chip.md) and refer -[building and commissioning](../../../docs/guides/esp32/build_app_and_commission.md) +[building and commissioning](../../../docs/platforms/esp32/build_app_and_commission.md) guides to get started. --- - [Cluster control](#cluster-control) -- [Matter OTA guide](../../../docs/guides/esp32/ota.md) -- [RPC console and Device Tracing](../../../docs/guides/esp32/rpc_console.md) +- [Matter OTA guide](../../../docs/platforms/esp32/ota.md) +- [RPC console and Device Tracing](../../../docs/platforms/esp32/rpc_console.md) - [Multiple Network Interfaces](#multiple-network-interfaces) --- diff --git a/examples/all-clusters-app/infineon/psoc6/README.md b/examples/all-clusters-app/infineon/psoc6/README.md index 138f132f7a..b4faa2e9ea 100644 --- a/examples/all-clusters-app/infineon/psoc6/README.md +++ b/examples/all-clusters-app/infineon/psoc6/README.md @@ -126,4 +126,4 @@ commands. These power cycle the BlueTooth hardware and disable BR/EDR mode. For the description of Software Update process with infineon PSoC6 example applications see -[Infineon PSoC6 OTA Software Update](../../../../docs/guides/infineon_psoc6_software_update.md) +[Infineon PSoC6 OTA Software Update](../../../../docs/platforms/infineon/infineon_psoc6_software_update.md) diff --git a/examples/all-clusters-app/mbed/README.md b/examples/all-clusters-app/mbed/README.md index 0952e18914..f5d0a78b29 100644 --- a/examples/all-clusters-app/mbed/README.md +++ b/examples/all-clusters-app/mbed/README.md @@ -225,7 +225,8 @@ the terminal. #### CHIP Tools -Read the [MbedCommissioning](../../../docs/guides/mbedos_commissioning.md) to +Read the +[MbedCommissioning](../../../docs/platforms/mbedos/mbedos_commissioning.md) to see how to use different CHIP tools to commission and control the application within a WiFi network. @@ -239,7 +240,7 @@ within a WiFi network. - More details and guidelines about porting new hardware into the Matter project with Mbed OS can be found in - [MbedNewTarget](../../../docs/guides/mbedos_add_new_target.md) + [MbedNewTarget](../../../docs/platforms/mbedos/mbedos_add_new_target.md) - Some useful information about HW platform specific settings can be found in `all-clusters-app/mbed/mbed_app.json`. Information about this file syntax and its meaning in mbed-os project can be found here: diff --git a/examples/all-clusters-app/nrfconnect/README.md b/examples/all-clusters-app/nrfconnect/README.md index 3a58e448d7..4c51e52a1f 100644 --- a/examples/all-clusters-app/nrfconnect/README.md +++ b/examples/all-clusters-app/nrfconnect/README.md @@ -43,7 +43,7 @@ This example is running on the nRF Connect platform, which is based on Nordic Semiconductor's [nRF Connect SDK](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/index.html) and [Zephyr RTOS](https://zephyrproject.org/). Visit Matter's -[nRF Connect platform overview](../../../docs/guides/nrfconnect_platform_overview.md) +[nRF Connect platform overview](../../../docs/platforms/nrf/nrfconnect_platform_overview.md) to read more about the platform structure and dependencies. By default, the Matter accessory device has IPv6 networking disabled. You must @@ -183,7 +183,7 @@ following states are possible: **SEGGER J-Link USB port** can be used to get logs from the device or communicate with it using the -[command line interface](../../../docs/guides/nrfconnect_examples_cli.md). +[command line interface](../../../docs/platforms/nrf/nrfconnect_examples_cli.md).
@@ -379,7 +379,7 @@ depending on the selected board: those platforms support the DFU. For more information, see the -[Configuring nRF Connect SDK examples](../../../docs/guides/nrfconnect_examples_configuration.md) +[Configuring nRF Connect SDK examples](../../../docs/platforms/nrf/nrfconnect_examples_configuration.md) page.
@@ -414,19 +414,20 @@ to read more about flashing on the nRF52840 Dongle. ## Testing the example -Check the [CLI tutorial](../../../docs/guides/nrfconnect_examples_cli.md) to -learn how to use command-line interface of the application. +Check the [CLI tutorial](../../../docs/platforms/nrf/nrfconnect_examples_cli.md) +to learn how to use command-line interface of the application. ### Testing using Linux CHIPTool -Read the [CHIP Tool user guide](../../../docs/guides/chip_tool_guide.md) to see -how to use [CHIP Tool for Linux or mac OS](../../chip-tool/README.md) to +Read the +[CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md) +to see how to use [CHIP Tool for Linux or mac OS](../../chip-tool/README.md) to commission and control the application within a Matter-enabled Thread network. ### Testing using Android CHIPTool Read the -[Android commissioning guide](../../../docs/guides/nrfconnect_android_commissioning.md) +[Android commissioning guide](../../../docs/platforms/nrf/nrfconnect_android_commissioning.md) to see how to use [CHIPTool](../../../examples/android/CHIPTool/README.md) for Android smartphones to commission and control the application within a Matter-enabled Thread network. diff --git a/examples/all-clusters-app/nxp/common/main/main.cpp b/examples/all-clusters-app/nxp/common/main/main.cpp index b2aadab98c..26772e9e60 100644 --- a/examples/all-clusters-app/nxp/common/main/main.cpp +++ b/examples/all-clusters-app/nxp/common/main/main.cpp @@ -32,7 +32,7 @@ uint8_t __attribute__((section(".heap"))) ucHeap[configTOTAL_HEAP_SIZE]; using namespace ::chip::DeviceLayer; -extern "C" int main(int argc, char * argv[]) +int main(int argc, char * argv[]) { TaskHandle_t taskHandle; diff --git a/examples/all-clusters-app/nxp/linux-imx/imx8m/README.md b/examples/all-clusters-app/nxp/linux-imx/imx8m/README.md index e20ff1065d..01941f58e7 100644 --- a/examples/all-clusters-app/nxp/linux-imx/imx8m/README.md +++ b/examples/all-clusters-app/nxp/linux-imx/imx8m/README.md @@ -1,4 +1,4 @@ To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini** **EVK**, see the associated -[README document](../../../../../docs/guides/nxp/nxp_imx8m_linux_examples.md) +[README document](../../../../../docs/platforms/nxp/nxp_imx8m_linux_examples.md) for details. diff --git a/examples/all-clusters-app/nxp/rt/rt1060/.gn b/examples/all-clusters-app/nxp/rt/rt1060/.gn new file mode 100644 index 0000000000..0985ed955a --- /dev/null +++ b/examples/all-clusters-app/nxp/rt/rt1060/.gn @@ -0,0 +1,35 @@ +# 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/build.gni") +import("//build_overrides/chip.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 = { + target_cpu = "arm" + target_os = "freertos" + + import("//args.gni") + + # Import common example GN args + import("${chip_root}/examples/platform/nxp/common/gn/args.gni") + + # Import default platform configs + import("${chip_root}/src/platform/nxp/rt/rt1060/args.gni") +} diff --git a/examples/all-clusters-app/nxp/rt/rt1060/BUILD.gn b/examples/all-clusters-app/nxp/rt/rt1060/BUILD.gn new file mode 100644 index 0000000000..16e0b03e01 --- /dev/null +++ b/examples/all-clusters-app/nxp/rt/rt1060/BUILD.gn @@ -0,0 +1,284 @@ +# Copyright (c) 2021-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. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/nxp_sdk.gni") +import("//build_overrides/openthread.gni") +import("${chip_root}/src/platform/device.gni") + +#allows to get common NXP SDK gn options +import("${nxp_sdk_build_root}/nxp_sdk.gni") + +# Allows to get various RT gn options +import("${nxp_sdk_build_root}/${nxp_sdk_name}/rt_sdk.gni") + +import("${chip_root}/src/platform/nxp/${nxp_platform}/args.gni") +import( + "${nxp_sdk_build_root}/${nxp_sdk_name}/${rt_platform}/${rt_platform}.gni") +import("${nxp_sdk_build_root}/${nxp_sdk_name}/nxp_executable.gni") + +assert(current_os == "freertos") +assert(target_os == "freertos") +assert(nxp_platform == "rt/rt1060") + +declare_args() { + # Allows to enable to ota_provider support + enable_ota_provider = false + + # Allows to connect to a predefine Wi-Fi network at boot + wifi_auto_connect_at_boot = false + wifi_auto_connect_at_boot_ssid = "" + wifi_auto_connect_at_boot_password = "" + + # Setup discriminator as argument + setup_discriminator = 3840 +} + +example_platform_dir = + "${nxp_sdk_matter_support_root}/examples/platform/${nxp_platform}" +common_example_dir = "${chip_root}/examples/platform/nxp/common" + +app_common_folder = "all-clusters-app/all-clusters-common" + +# Create here the SDK instance. +# Particular sources/defines/includes could be added/changed depending on the target application. +rt_sdk("sdk") { + defines = [] + + cflags = [] + public_deps = [] + public_configs = [] + sources = [] + include_dirs = [] + + # Indicate paths to default board files + include_dirs += [ "${example_platform_dir}/board/" ] + + # RT1060 rev A use same pin mux as rev B + # If user needs different pin mux files for rev A and rev B boards, the source and include from below needs to be updated accordingly + if (evkname == "evkmimxrt1060") { + include_dirs += [ "${example_platform_dir}/board/evkbmimxrt1060/" ] + sources += [ "${example_platform_dir}/board/evkbmimxrt1060/pin_mux.c" ] + } else { + include_dirs += [ "${example_platform_dir}/board/${evkname}/" ] + sources += [ "${example_platform_dir}/board/${evkname}/pin_mux.c" ] + } + + sources += [ "${example_platform_dir}/board/hardware_init.c" ] + sources += [ "${example_platform_dir}/board/clock_config.c" ] + sources += [ "${example_platform_dir}/board/board.c" ] + sources += [ "${example_platform_dir}/board/peripherals.c" ] + + # Indicate the path to CHIPProjectConfig.h + include_dirs += [ "include/config" ] + + # Indicate the default path to FreeRTOSConfig.h + include_dirs += [ "${example_platform_dir}/app/project_include/freeRTOS" ] + + # Indicate the default path to OpenThreadConfig.h + include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ] + + # For matter with BR feature, increase FreeRTOS heap size + if (chip_enable_wifi && chip_enable_openthread) { + defines += [ "configTOTAL_HEAP_SIZE=(size_t)(170 * 1024)" ] + } + + defines += [ + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}", + ] +} + +# Create the SDK driver instance. +# Particular sources/defines/includes could be added to add other drivers not available in the default sdk driver template +rt1060_sdk_drivers("sdk_driver") { +} + +rt_executable("all_cluster_app") { + output_name = "chip-rt1060-all-cluster-example" + + defines = [ + "CONFIG_RENDEZVOUS_MODE=7", + "CONFIG_APP_FREERTOS_OS=1", + ] + + if (chip_enable_openthread) { + defines += [ "CONFIG_NET_L2_OPENTHREAD=1" ] + } + + include_dirs = [ + "../../common/main/include", + "../../common/main", + "${chip_root}/examples/all-clusters-app/all-clusters-common/include", + "${chip_root}/examples/providers/", + ] + + sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", + "${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp", + "../../common/main/AppTask.cpp", + "../../common/main/DeviceCallbacks.cpp", + "../../common/main/ZclCallbacks.cpp", + "../../common/main/include/AppEvent.h", + "../../common/main/include/AppTask.h", + "../../common/main/include/DeviceCallbacks.h", + "../../common/main/main.cpp", + ] + + # App common files + include_dirs += [ + "${common_example_dir}/icd/include", + "${common_example_dir}/matter_cli/include", + "${common_example_dir}/device_manager/include", + "${common_example_dir}/device_callbacks/include", + "${common_example_dir}/matter_button/include", + "${common_example_dir}/factory_data/include", + "${common_example_dir}/app_task/include", + ] + + sources += [ + "${chip_root}/examples/platform/nxp/${nxp_platform}/factory_data/source/AppFactoryDataExample.cpp", + "${common_example_dir}/app_task/source/AppTaskBase.cpp", + "${common_example_dir}/app_task/source/AppTaskFreeRTOS.cpp", + "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", + "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/icd/source/ICDUtil.cpp", + "${common_example_dir}/matter_button/source/ButtonDefault.cpp", + "${common_example_dir}/matter_button/source/ButtonManager.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationDefault.cpp", + ] + + deps = [ "${chip_root}/examples/${app_common_folder}" ] + + sources += [ + "${chip_root}/examples/${app_common_folder}/src/bridged-actions-stub.cpp", + "${chip_root}/examples/${app_common_folder}/src/smco-stub.cpp", + "${chip_root}/examples/${app_common_folder}/src/static-supported-modes-manager.cpp", + ] + + if (chip_enable_matter_cli) { + defines += [ "ENABLE_CHIP_SHELL" ] + deps += [ + "${chip_root}/examples/shell/shell_common:shell_common", + "${chip_root}/src/lib/shell:shell", + ] + sources += [ + "${common_example_dir}/matter_cli/source/AppCLIBase.cpp", + "${common_example_dir}/matter_cli/source/AppCLIFreeRTOS.cpp", + ] + } + + if (chip_enable_ota_requestor) { + include_dirs += [ "${common_example_dir}/ota_requestor/include" ] + sources += [ + "${common_example_dir}/ota_requestor/source/OTARequestorInitiator.cpp", + "${common_example_dir}/ota_requestor/source/OTARequestorInitiatorCommon.cpp", + ] + } + + if (wifi_auto_connect_at_boot) { + assert(wifi_auto_connect_at_boot_ssid != "" && + wifi_auto_connect_at_boot_password != "", + "WiFi SSID and password must be specified at build time!") + + defines += [ + "CONFIG_CHIP_APP_WIFI_CONNECT_AT_BOOT=1", + "CONFIG_CHIP_APP_WIFI_SSID=\"${wifi_auto_connect_at_boot_ssid}\"", + "CONFIG_CHIP_APP_WIFI_PASSWORD=\"${wifi_auto_connect_at_boot_password}\"", + ] + + include_dirs += [ "${common_example_dir}/wifi_connect/include" ] + sources += [ "${common_example_dir}/wifi_connect/source/WifiConnect.cpp" ] + } + + if (enable_ota_provider) { + defines += [ "CONFIG_CHIP_OTA_PROVIDER=1" ] + + include_dirs += [ + "${common_example_dir}/ota_provider/include", + "${common_example_dir}/ota_provider/ota-provider-common", + ] + + sources += [ + "${common_example_dir}/ota_provider/ota-provider-common/RTBdxOtaSender.cpp", + "${common_example_dir}/ota_provider/ota-provider-common/RTOTAProviderExample.cpp", + "${common_example_dir}/ota_provider/source/OTAProvider.cpp", + ] + + deps += [ + "${chip_root}/src/app/server", + "${chip_root}/src/protocols/bdx", + "${chip_root}/third_party/jsoncpp", + ] + } + + # In case a dedicated assert function needs to be supported the flag sdk_fsl_assert_support should be set to false + # The would add to the build a dedicated application assert implementation. + if (!sdk_fsl_assert_support) { + sources += [ "${common_example_dir}/app_assert/source/AppAssert.cpp" ] + } + + cflags = [ "-Wconversion" ] + + ldscript = + "${example_platform_dir}/app/ldscripts/MIMXRT1062xxxxx_flexspi_nor.ld" + + inputs = [ ldscript ] + + ldflags = [ + "-T" + rebase_path(ldscript, root_build_dir), + "-fno-common", + "-Wl,--defsym=__stack_size__=2048", + "-ffreestanding", + "-fno-builtin", + "-mapcs", + "-u qspiflash_config", + "-u image_vector_table", + "-u boot_data", + "-u dcd_data", + "-Wl,-print-memory-usage", + "-Wl,--no-warn-rwx-segments", + ] + + if (evkname == "evkcmimxrt1060") { + ldflags += [ "-Wl,--defsym=gEVKCFlashSize_d=0x1000000" ] + } + + if (enable_ota_provider) { + # As the OTA file will be stored in the littlefs file system, it is required to increase the size of the file system + # To be able to store an OTA file with a MAX size of 640K, + # it recommended to size the file system with: + # 161 sectors of 4K => reserved for the OTA file + # 32 sectors of 4K => reserved for Matter/OT/BLE settings storage + ldflags += [ "-Wl,--defsym=gNVMSectorCountLink_d=193" ] + } + + if (chip_enable_ota_requestor) { + # If OTA build flag is enabled, + # we would need to reserve enough space for the bootloader (MCUBoot) + # MCUBoot requires 0x11000 Bytes to be reserved at the base of the flash + # Consequently, some sections will need to be shifted + ldflags += [ "-Wl,--defsym=__m_mcuboot_size__=0x40000" ] + } + + output_dir = root_out_dir +} + +group("rt1060") { + deps = [ ":all_cluster_app" ] +} + +group("default") { + deps = [ ":rt1060" ] +} diff --git a/examples/all-clusters-app/nxp/rt/rt1060/README.md b/examples/all-clusters-app/nxp/rt/rt1060/README.md new file mode 100644 index 0000000000..558ae4127f --- /dev/null +++ b/examples/all-clusters-app/nxp/rt/rt1060/README.md @@ -0,0 +1,723 @@ +# CHIP RT1060 All-clusters Application + +The all-clusters example implements a server which can be accessed by a CHIP +controller and can accept basic cluster commands. + +The example is based on +[Project CHIP](https://github.com/project-chip/connectedhomeip) and the NXP +RT1060 SDK, and provides a prototype application that demonstrates device +commissioning and different cluster control. + +
+ +- [CHIP RT1060 All-clusters Application](#chip-rt1060-all-clusters-application) + - [Introduction](#introduction) + - [Configurations supported](#configurations-supported) + - [Hardware requirements RT1060 + transceiver](#hardware-requirements-rt1060--transceiver) + - [Hardware requirements RT1060+IW416](#hardware-requirements-rt1060iw416) + - [Hardware requirements RT1060+88W8801](#hardware-requirements-rt106088w8801) + - [Hardware requirements RT1060 + K32W0](#hardware-requirements-rt1060--k32w0) + - [Hardware requirements RT1060-EVK-C+IW612](#hardware-requirements-rt1060-evk-ciw612) + - [Hardware requirements RT1060 + 88W8801 + K32W0x1DK6](#hardware-requirements-rt1060--88w8801--k32w0x1dk6) + - [Building](#building) + - [Building with Matter over Wifi configuration on RT1060 + transceiver](#building-with-matter-over-wifi-configuration-on-rt1060--transceiver) + - [Build with Matter over Thread configuration on RT1060 + transceiver](#build-with-matter-over-thread-configuration-on-rt1060--transceiver) + - [Build with Matter over Thread configuration on RT1060 + K32W0](#build-with-matter-over-thread-configuration-on-rt1060--k32w0) + - [Build with Matter over Thread configuration on RT1060-EVK-C + IW612](#build-with-matter-over-thread-configuration-on-rt1060-evk-c--iw612) + - [Build with Matter over Wi-Fi + OpenThread Border Router configuration on RT1060 + 88W8801 + K32W0x1DK6](#build-with-matter-over-wi-fi--openthread-border-router-configuration-on-rt1060--88w8801--k32w0x1dk6) + - [General Information](#general-information) + - [Manufacturing data](#manufacturing-data) + - [Flashing and debugging](#flashing-and-debugging) + - [Testing the example](#testing-the-example) + - [Matter over wifi configuration :](#matter-over-wifi-configuration-) + - [Matter over thread configuration :](#matter-over-thread-configuration-) + - [Matter over wifi with openthread border router configuration :](#matter-over-wifi-with-openthread-border-router-configuration-) + - [Testing the all-clusters application without Matter CLI:](#testing-the-all-clusters-application-without-matter-cli) + - [Testing the all-clusters application with Matter CLI enabled:](#testing-the-all-clusters-application-with-matter-cli-enabled) + - [Thread Border Router overview](#thread-border-router-overview) +
+ + + +## Introduction + +![RT1060 EVK-B](../../../../platform/nxp/rt/rt1060/doc/images/MIMXRT1060-EVKB-TOP.png) + +The RT1060 all-cluster application provides a working demonstration of the +RT1060 board integration, built using the Project CHIP codebase and the NXP +RT1060 SDK. + +The example supports: + +- Matter over Wi-Fi +- Matter over Openthread +- Matter over Wi-Fi with Openthread Border Router support + +The example targets the +[NXP MIMXRT1060-EVK-B](https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/mimxrt1060-evk-i-mx-rt1060-evaluation-kit:MIMXRT1060-EVK) +board by default. It is also possible to use the older MIMXRT1060-EVK board, +build and board setup instructions differ in some steps. + +### Configurations supported + +Here are listed configurations supported on RT1060. + +Matter over Wi-Fi : + +- RT1060 + IW416 (Wi-Fi + BLE) +- RT1060 + 88W8801 (Wi-Fi) +- **Experimental:** _RT1060-EVK-C + IW612 (Wi-fi +BLE)_ + +Matter over Thread : + +- RT1060 + K32W0 (15.4 + BLE) +- **Experimental:** _RT1060-EVK-C + IW612 (15.4 + BLE)_ + +Matter over Wi-Fi with Openthread Border Router support : + +- RT1060 + 88W8801 + K32W0x1DK6 + +### Hardware requirements RT1060 + transceiver + +#### Hardware requirements RT1060+IW416 + +Host part: + +- 1 MIMXRT1060-EVK-B or MIMXRT1060-EVK board +- external 5V supply + +Transceiver part: + +- 1 AzureWave AW-AM510-uSD evaluation board + +Jumper settings for MIMXRT1060-EVK-B (enables external 5V supply): + +- remove J40 5-6 +- connect J40 1-2 +- connect J45 with external power (controlled by SW6 - position 3) + +Jumper settings for MIMXRT1060-EVK (enables external 5V supply): + +- remove J1 5-6 +- connect J1 1-2 +- connect J2 with external power (enabled by SW1 - position 3) + +The hardware should be reworked according to the chapter _Hardware Rework Guide +for MIMXRT1060-EVK-B and AW-AM510-uSD_ or the chapter _Hardware Rework Guide for +MIMXRT1060-EVK and AW-AM510-uSD_ in the document +_`Hardware Rework Guide for EdgeFast BT PAL`_ which can be found in the NXP +RT1060 SDK (_docs/wireless/bluetooth/`edgefast_bluetooth`/Hardware Rework Guide +for EdgeFast BT PAL.pdf_): + +- Make sure resistors R368/R376/R347/R349/R365/R363/R193/R186 are removed. + +Only the SDK package downloaded from https://mcuxpresso.nxp.com contains the PDF +document mentioned above, it is not present in the SDK downloaded from GitHub +using the west tool. + +Jumper settings for AzureWave AW-AM510-uSD Module: + +- J4 1-2: `VIO` 1.8V (Voltage level of SD-IO pins is 1.8V) +- J2 1-2: 3.3V `VIO_uSD` (Power Supply from uSD connector) +- The pin 1 of J4 is not marked on the board. Please note that pin numbering + of J4 is opposite to J2. + +Plug AW-AM510-uSD into uSD connector J22 on MIMXRT1060-EVK-B or J39 on +MIMXRT1060-EVK. + +Connect the following pins between RT1060 and AW-AM510-uSD to enable Bluetooth +HCI UART: + +| PIN NAME | AW-AM510-uSD | MIMXRT1060-EVK-B | MIMXRT1060-EVK | PIN NAME OF RT1060 | GPIO NAME OF RT1060 | +| :--------: | :-----------: | :--------------: | :------------: | :----------------: | :-----------------: | +| `UART_TXD` | `J10 (pin 4)` | `J16 (pin 1)` | `J22 (pin 1)` | `LPUART3_RXD` | `GPIO_AD_B1_07` | +| `UART_RXD` | `J10 (pin 2)` | `J16 (pin 2)` | `J22 (pin 2)` | `LPUART3_TXD` | `GPIO_AD_B1_06` | +| `UART_RTS` | `J10 (pin 6)` | `J33 (pin 3)` | `J23 (pin 3)` | `LPUART3_CTS` | `GPIO_AD_B1_04` | +| `UART_CTS` | `J10 (pin 8)` | `J33 (pin 4)` | `J23 (pin 4)` | `LPUART3_RTS` | `GPIO_AD_B1_05` | +| `GND` | `J6 (pin 7)` | `J32 (pin 7)` | `J25 (pin 7)` | `GND` | `GND` | + +Attach external antenna into connector on AW-AM510-uSD. + +Additional information about the AW-AM510-uSD can be found in the user manual +_UM11441 - Getting Started with NXP-based Wireless Modules and i.MX RT Platform +Running RTOS_, which can be found in the NXP RT1060 SDK +(docs/wireless/UM11441-Getting-Started-with-NXP-based-Wireless-Modules-and-i.MX-RT-Platform-Running-on-RTOS.pdf). +Only the SDK package downloaded from https://mcuxpresso.nxp.com contains the PDF +document, it is not present in the SDK downloaded from GitHub using the west +tool. + +#### Hardware requirements RT1060+88W8801 + +Host part: + +- 1 MIMXRT1060-EVK-B + +Transceiver part : + +- 1 88W8801 2DS M.2 Module (rev A) +- 1 Murata uSD-M.2 Adapter (rev B1) + +The 88W8801 2DS M.2 Module should be inserted into the Murata uSD-M.2 Adapter +and inserted in the uSD slot J22 of MIMXRT1060-EVK-B. The Murata uSD-M.2 Adapter +can be powered up using uSD pins. For that, set the J1 jumper of Murata uSD-M.2 +to position 2-3 (Position 2-3: `VBAT supply`, typical 3.1 ~ 3.3V, from microSD +connector). + +Note: as the 88W8801 module supports only the 2.4 GHz Wi-Fi band, it is +mandatory to connect it to a Wi-Fi access point on the 2.4 GHz band. + +#### Hardware requirements RT1060 + K32W0 + +Host part: + +- 1 MIMXRT1060-EVK-B or MIMXRT1060-EVK board + +Transceiver part: + +- 1 OM15076-3 Carrier Board (DK6 board) +- 1 K32W0 Module to be plugged on the Carrier Board + +**Board settings** + +The below table explains pin settings (UART settings) to connect the +MIMXRT1060-EVK-B (host) to a k32w061 transceiver (rcp). + +| PIN NAME | DK6 (K32W061) | MIMXRT1060-EVK-B | MIMXRT1060-EVK | PIN NAME OF RT1060 | GPIO NAME OF RT1060 | +| :--------------: | :-----------: | :--------------: | :------------: | :----------------: | :-----------------: | +| `UART_TXD` | `PIO, pin 8` | `J16, pin 1` | `J22, pin 1` | `LPUART3_RXD` | `GPIO_AD_B1_07` | +| `UART_RXD` | `PIO, pin 9` | `J16, pin 2` | `J22, pin 2` | `LPUART3_TXD` | `GPIO_AD_B1_06` | +| `UART_RTS` | `PIO, pin 6` | `J33, pin 3` | `J23, pin 3` | `LPUART3_CTS` | `GPIO_AD_B1_04` | +| `UART_CTS` | `PIO, pin 7` | `J33, pin 4` | `J23, pin 4` | `LPUART3_RTS` | `GPIO_AD_B1_05` | +| `GND` | `J3, pin 1` | `J32, pin 7` | `J25, pin 7` | `XX` | `XX` | +| `RESET` | `RSTN` | `J33, pin 2` | `J23, pin 2` | `GPIO_AD_B1_11` | `GPIO_AD_B1_11` | +| `DIO5/ISP Entry` | `PIO, pin 5` | `J33, pin 1` | `J23, pin 1` | `GPIO_AD_B1_10` | `GPIO_AD_B1_10` | + +The below picture shows pins connections for the MIMXRT1060-EVK. + +![rt1060_k32w061_pin_settings](../../../../platform/nxp/rt/rt1060/doc/images/rt1060_k32w061_pin_settings.jpg) + +#### Hardware requirements RT1060-EVK-C+IW612 + +Host part: + +- 1 MIMXRT1060-EVK-C + + Hardware should be reworked as below: + + - populate R93, R96, R2155, R2156, R2157, R2158, R2159 with 0Ohm resistors + - J76 and J107 jumpers in 2-3 position. + - J109 and J110 jumpers in 1-2 position. + - disconnect pin15 of component U9 + +![rt1060_evkc_IW612_hw_rework](../../../../platform/nxp/rt/rt1060/doc/images/rt1060_evkc_IW612_hw_rework.jpg) + +![rt1060_evkc_IW612_hw_rework_detail](../../../../platform/nxp/rt/rt1060/doc/images/rt1060_evkc_IW612_hw_rework_detail.jpg) + +Transceiver part : + +- 1 + [2EL M2 A1 IW612 Secure Module](https://www.nxp.com/products/wireless/wi-fi-plus-bluetooth-plus-802-15-4/2-4-5-ghz-dual-band-1x1-wi-fi-6-802-11ax-plus-bluetooth-5-2-plus-802-15-4-tri-radio-solution:IW612) + +![](../../../../platform/nxp/rt/rt1170/doc/images/iwx612_2EL.jpg) + +#### Hardware requirements RT1060 + 88W8801 + K32W0x1DK6 + +- i.MX RT1060 EVK-A or EVK-B board +- 88W8801 module (for Wi-Fi connection), for example 88W8801 2DS M.2 Module + (rev A) and Murata uSD-M.2 Adapter (rev B1) +- K32W0x1 mezzanine module (for Thread connection) +- `IOT_ZTB-DK006` carrier board for the K32W0x1 module (referenced as DK6 + carrier board) + + + +## Building + +In order to build the Project CHIP example, we recommend using a Linux +distribution. Supported Operating Systems are listed in +[BUILDING.md](../../../../../docs/guides/BUILDING.md). + +- Make sure that below prerequisites are correctly installed, as described in + [BUILDING.md](../../../../../docs/guides/BUILDING.md). + +``` +sudo apt-get install git gcc g++ pkg-config libssl-dev libdbus-1-dev \ + libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev \ + python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev +``` + +- Step 1: checkout NXP specific submodules only + +``` +user@ubuntu:~/Desktop/git/connectedhomeip$ scripts/checkout_submodules.py --shallow --platform nxp --recursive +``` + +- Step 2: activate local environment + +``` +user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/activate.sh +``` + +If the script says the environment is out of date, you can update it by running +the following command: + +``` +user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/bootstrap.sh +``` + +- Step 3: Init NXP SDK(s) + +``` +user@ubuntu:~/Desktop/git/connectedhomeip$ third_party/nxp/nxp_matter_support/scripts/update_nxp_sdk.py --platform common +``` + +Note: By default update_nxp_sdk.py will try to initialize all NXP SDKs. Arg "-- +help" could be used to view all available options. + +- Start building the application. + +### Building with Matter over Wifi configuration on RT1060 + transceiver + +- Build the Wi-fi configuration for **MIMXRT1060-EVK-B board + IW416 + transceiver** (with BLE for commissioning). + +``` +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ gn gen --args="chip_enable_wifi=true iw416_transceiver=true" out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ ninja -C out/debug +``` + +- Build the Wi-fi configuration for **MIMXRT1060-EVK-B board + 88W8801 + transceiver** with Matter-over-Wifi configuration and only onnetwork + commissioning (without BLE, the WiFi network credentials are provided at + build-time which will enable the device to join the Wi-Fi AP at startup): + +``` +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ export ssid_name= && export ssid_password= && gn gen --args="chip_enable_wifi=true w8801_transceiver=true chip_config_network_layer_ble=false wifi_auto_connect_at_boot=true wifi_auto_connect_at_boot_ssid=\"${ssid_name}\" wifi_auto_connect_at_boot_password=\"${ssid_password}\"" out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ ninja -C out/debug +``` + +- Build the Wi-fi configuration for **MIMXRT1060-EVK-C board + IW612 + transceiver** (with BLE for commissioning). + +``` +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ gn gen --args="chip_enable_wifi=true iwx12_transceiver=true evkname=\"evkcmimxrt1060\" " out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ ninja -C out/debug +``` + +- Build the Wi-fi configuration for **MIMXRT1060-EVK-C board + IW612 + transceiver** with Matter-over-Wifi configuration and only onnetwork + commissioning (without BLE, the WiFi network credentials are provided at + build-time which will enable the device to join the Wi-Fi AP at startup): + +``` +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ gn gen --args="chip_enable_wifi=true iwx12_transceiver=true evkname=\"evkcmimxrt1060\" chip_config_network_layer_ble=false tcp_download=true wifi_ssid=\"your_wifi_ssid\" wifi_password=\"your_wifi_password\"" out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ ninja -C out/debug +``` + +### Build with Matter over Thread configuration on RT1060 + transceiver + +#### Build with Matter over Thread configuration on RT1060 + K32W0 + +For this configuration a K32W0 RCP image is required and must support in a +single image the openthread RCP configuration and the BLE HCI BB configuration. +Messages between the host and the K32W0 transceiver are transferred on a single +UART with flow control support. For that the HDLC-Lite framing protocol is used +to transfer spinel and hci frames. In addition, hci and spinel frames can be +distinguished by using the Spinel convention which is line compatible with +BT/BLE HCI. + +Before building the Matter host application, it is required to generate the +K32W0 image supporting features as described above. To build this binary the +target `ot_rcp_ble_hci_bb_single_uart_fc` should be built by following the +[Readme.md][ot_rcp_ble_hci_bb_k32w0_readme]. After a successful build, a `".h"` +file will be generated and would contain the K32W0 RCP binary. As described in +the [Readme.md][ot_rcp_ble_hci_bb_k32w0_readme], the application binaries will +be generated in +`ot_nxp/build_k32w061/ot_rcp_ble_hci_bb_single_uart_fc/bin/ot-rcp-ble-hci-bb-k32w061.elf.bin.h`. + +The generate K32W0 transceiver binary `".h"` file path must be indicated to the +host Matter application build. In fact the Matter host application is in charge +of storing the K32W0 firmware in its flash to be able to use the +`The Over The Wire (OTW) protocol (over UART)` to download (at host startup) the +k32w0 transceiver image from the host to the K32W0 internal flash. For more +information on the k32w0 `OTW` protocol, user can consult the doxygen header of +the file located in +`/third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/middleware/wireless/framework/OTW/k32w0_transceiver/fwk_otw.c`. + +Here is a summary of the k32w0 _gn gen_ arguments that are mandatory or +optional: + +- Mandatory: `k32w0_transceiver=true` +- Mandatory: `hci_spinel_single_uart=true` +- Optional: + `k32w0_transceiver_bin_path=\"/home/ot-nxp/build_k32w061/ot_rcp_ble_hci_bb_single_uart_fc/bin/ot-rcp-ble-hci-bb-k32w061.elf.bin.h\"` + This argument is optional, by default, if not set, the binary file located + in + "\${chip_root}/third_party/openthread/ot_nxp/build_k32w061/ot_rcp_ble_hci_bb_single_uart_fc/bin/ot-rcp-ble-hci-bb-k32w061.elf.bin.h" + will be used. If the K32W061 transceiver binary is saved at another location + an absolute path of its location should be given. +- Optional: `otw_logs_enabled=true` This argument is optional, by default + being set to false. If set to true, RT logging will print the `OTW` logs. + +[ot_rcp_ble_hci_bb_k32w0_readme]: + https://github.com/NXP/ot-nxp/blob/v1.0.0.2-tag-nxp/examples/hybrid/ot_rcp_ble_hci_bb/k32w061/README.md#building-the-examples + +Below is presented an example of _gn gen_ argument that could be used to +generate the host matter application with a k32w0 transceiver. + +``` +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ gn gen --args="chip_enable_openthread=true k32w0_transceiver=true k32w0_transceiver_bin_path=\"/home/ot-nxp/build_k32w061/ot_rcp_ble_hci_bb_single_uart_fc/bin/ot-rcp-ble-hci-bb-k32w061.elf.bin.h\" hci_spinel_single_uart=true chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=true" out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ ninja -C out/debug +``` + +#### Build with Matter over Thread configuration on RT1060-EVK-C + IW612 + +Build the OpenThread configuration for MIMXRT1060-EVK-C board + IW612 +transceiver (with BLE for commissioning). + +``` +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ gn gen --args="chip_enable_openthread=true iwx12_transceiver=true evkname=\"evkcmimxrt1060\" chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=true" " out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ ninja -C out/debug +``` + +### Build with Matter over Wi-Fi + OpenThread Border Router configuration on RT1060 + 88W8801 + K32W0x1DK6 + +This configuration supports the Thread Border Router management cluster to +provision the Thread credentials. Enabling the Matter CLI in order to control +the Thread network on the Border Router is optional but recommended for other +features like the Thread credential sharing. + +Note that the Thread Border Router management cluster is only supported on the +thermostat application for now. + +- Build Matter with Border Router configuration with ble-wifi commissioning: + +``` +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ gn gen --args="chip_enable_wifi=true w8801_transceiver=true chip_enable_matter_cli=true chip_config_network_layer_ble=true chip_enable_openthread=true k32w0_transceiver=true k32w0_transceiver_bin_path=\"/path/to/ot-rcp/ot-rcp-ble-hci-bb-k32w061.elf.bin.h\" hci_spinel_single_uart=true" out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ ninja -C out/debug +``` + +- Build Matter with Border Router configuration with onnetwork commissioning: + +``` +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ gn gen --args="chip_enable_wifi=true w8801_transceiver=true chip_enable_matter_cli=true chip_config_network_layer_ble=false wifi_auto_connect_at_boot=true wifi_auto_connect_at_boot_ssid=\"your_wifi_ssid\" wifi_auto_connect_at_boot_password=\"your_wifi_password\" chip_enable_openthread=true k32w0_transceiver=true k32w0_transceiver_bin_path=\"/path/to/ot-rcp/ot-rcp-ble-hci-bb-k32w061.elf.bin.h\"" out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1060$ ninja -C out/debug +``` + +### General Information + +The resulting output file can be found in +out/debug/chip-rt1060-all-cluster-example. + +Optional GN options that can be added when building an application: + +- To enable the + [secondary network commissioning interface](../../../../../docs/platforms/nxp/nxp_otbr_guide.md#using-the-secondary-network-commissioning-interface), + the arguments `chip_enable_secondary_nwk_if=true` and + `chip_device_config_thread_network_endpoint_id=3` must be added to the _gn + gen_ command. Note that this is only supported when building the Matter over + Wifi + OpenThread Border Router configuration. Note that is only supported + on the on the thermostat application for now. +- To enable the [matter CLI](README.md#matter-shell), the argument + `chip_enable_matter_cli=true` must be added to the _gn gen_ command. +- To build the application in debug mode, the argument + `is_debug=true optimize_debug=false` must be added to the _gn gen_ command. +- By default, the MIMXRT1060-EVK-B will be chosen. To switch to an + MIMXRT1060-EVK, the argument `evkname=\"evkmimxrt1060\"` must be added to + the _gn gen_ command. +- To build with the option to have Matter certificates/keys pre-loaded in a + specific flash area the argument `chip_with_factory_data=1` must be added to + the _gn gen_ command. For more information, see + [Guide for writing manufacturing data on NXP devices](../../../../../docs/platforms/nxp/nxp_manufacturing_flow.md) + + + +## Manufacturing data + +See +[Guide for writing manufacturing data on NXP devices](../../../../../docs/platforms/nxp/nxp_manufacturing_flow.md) + +Other comments: + +The RT1060 all cluster app demonstrates the usage of encrypted Matter +manufacturing data storage. Matter manufacturing data should be encrypted before +flashing them to the RT1060 flash. + +For development purpose the RT1060 all cluster app code could use the hardcoded +AES 128 software key. This software key should be used only during development +stage. + +For production usage, it is recommended to use the `OTP key` which needs to be +fused in the RT1060 SW_GP2. The application note AN12800 should be followed to +get more information. In this case the all cluster app should be updated to +indicate to the `DCP` module to use the `OTP key` instead of the software key. +For that the call to `FactoryDataPrvdImpl().SetAes128Key()` should be changed to +`FactoryDataPrvdImpl().SetKeySelected(KeySelect::)` with the arg value +specifying where the `OTP key` is stored (`kDCP_OCOTPKeyLow` for [127:0] of +SW_GP2 or `kDCP_OCOTPKeyHigh` for [255:128] of SW_GP2). For more information the +RT1060 `FactoryDataProviderImpl` class description should be checked. + + + +## Flashing and debugging + +In order to flash the application we recommend using +[MCUXpresso IDE (version >= 11.6.0)](https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE). + +- Import the previously downloaded NXP SDK into MCUXpresso IDE. + +Right click the empty space in the MCUXpresso IDE "Installed SDKs" tab to show +the menu, select the "Import local SDK Git repository" menu item. + +![Import local SDK Git repository](../../../../platform/nxp/rt/rt1060/doc/images/import-local-repository.png) + +The "Import SDK Git" window will open. The "Repository location" text field +should point to the west workspace +(third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo subfolder of the +Matter repository). The "Manifest(s) folder" text field should point to its core +subfolder (third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/core +subfolder of the Matter repository). Click "OK" and wait for MCUXpresso IDE to +import the SDK. + +![Import SDK Git](../../../../platform/nxp/rt/rt1060/doc/images/import-sdk-git.png) + +Finally select the desired board's SDK manifest in the "Installed SDKs" tab. + +![Select SDK](../../../../platform/nxp/rt/rt1060/doc/images/select-sdk.png) + +- Import the connectedhomeip repo in MCUXpresso IDE as Makefile Project. Use + _none_ as _Toolchain for Indexer Settings_: + +``` +File -> Import -> C/C++ -> Existing Code as Makefile Project +``` + +- Configure MCU Settings: + +``` +Right click on the Project -> Properties -> C/C++ Build -> MCU Settings -> Select MIMXRT1060 -> Apply & Close +``` + +![MCU_Set](../../../../platform/nxp/rt/rt1060/doc/images/mcu-set.png) + +Sometimes when the MCU is selected it will not initialize all the memory regions +(usually the `BOARD_FLASH`, `BOARD_SDRAM` and `NCACHE_REGION`) so it is required +that this regions are added manually like in the image above. In addition to +that on the `BOARD_FLASH` line, in the driver tab: + +``` +click inside the tab and on the right side a button with three horizontal dots will appear +click on the button and an window will show +form the dropdown menu select the MIMXRT1060_SFDP_QSPI driver +``` + +![flash_driver](../../../../platform/nxp/rt/rt1060/doc/images/flash_driver.png) + +- Configure the toolchain editor: + +``` +Right click on the Project -> C/C++ Build-> Tool Chain Editor -> NXP MCU Tools -> Apply & Close +``` + +![toolchain](../../../../platform/nxp/rt/rt1060/doc/images/toolchain.JPG) + +- Create a debug configuration: + +``` +Right click on the Project -> Debug -> As->MCUXpresso IDE LinkServer (inc. CMSIS-DAP) probes -> OK -> Select elf file +``` + +![debug_0](../../../../platform/nxp/rt/rt1060/doc/images/debug0.png) + +![debug_1](../../../../platform/nxp/rt/rt1060/doc/images/debug1.png) + +- Set the _Connect script_ for the debug configuration to _RT1060_connect.scp_ + from the dropdown list: + +``` +Right click on the Project -> Debug As -> Debug configurations... -> LinkServer Debugger +``` + +![connect](../../../../platform/nxp/rt/rt1060/doc/images/gdbdebugger.png) + +- Set the _Initialization Commands_ to: + +``` +Right click on the Project -> Debug As -> Debug configurations... -> Startup + +set non-stop on +set pagination off +set mi-async +set remotetimeout 60000 +##target_extended_remote## +set mem inaccessible-by-default ${mem.access} +mon ondisconnect ${ondisconnect} +set arm force-mode thumb +${load} +``` + +![init](../../../../platform/nxp/rt/rt1060/doc/images/startup.png) + +- Set the _vector.catch_ value to _false_ inside the .launch file: + +``` +Right click on the Project -> Utilities -> Open Directory Browser here -> edit *.launch file: + + + +``` + +- Debug using the newly created configuration file: + + + +## Testing the example + +To know how to commission a device over BLE, follow the instructions from +[chip-tool's README.md 'Commission a device over +BLE'][readme_ble_commissioning_section]. + +[readme_ble_commissioning_section]: + ../../../../chip-tool/README.md#commission-a-device-over-ble + +To know how to commissioning a device over IP, follow the instructions from +[chip-tool's README.md 'Pair a device over +IP'][readme_pair_ip_commissioning_section] + +[readme_pair_ip_commissioning_section]: + ../../../../chip-tool/README.md#pair-a-device-over-ip + +#### Matter over wifi configuration : + +The "ble-wifi" pairing method can be used in order to commission the device. + +#### Matter over thread configuration : + +The "ble-thread" pairing method can be used in order to commission the device. + +#### Matter over wifi with openthread border router configuration : + +In order to create or join a Thread network on the Matter Border Router, the TBR +management cluster or the `otcli` commands from the matter CLI can be used. For +more information about using the TBR management cluster follow instructions from +['Using the TBR management cluster'](../../../../../docs/platforms/nxp/nxp_otbr_guide.md#using-the-thread-border-router-management-cluster). +For more information about using the matter shell, follow instructions from +['Testing the all-clusters application with Matter CLI'](#testing-the-all-clusters-application-with-matter-cli-enabled). + +In this configuration, the device can be commissioned over Wi-Fi with the +'ble-wifi' or 'onnetwork' pairing method. + +### Testing the all-clusters application without Matter CLI: + +1. Prepare the board with the flashed `All-cluster application` (as shown + above). +2. The All-cluster example uses UART1 to print logs while running the server. To + view raw UART output, start a terminal emulator like PuTTY and connect to the + used COM port with the following UART settings: + + - Baud rate: 115200 + - 8 data bits + - 1 stop bit + - No parity + - No flow control + +3. Open a terminal connection on the board and watch the printed logs. + +4. On the client side, start sending commands using the chip-tool application as + it is described + [here](../../../../chip-tool/README.md#using-the-client-to-send-matter-commands). + +### Testing the all-clusters application with Matter CLI enabled: + +The Matter CLI can be enabled with the all-clusters application. + +For more information about the Matter CLI default commands, you can refer to the +dedicated [ReadMe](../../../../shell/README.md). + +The All-clusters application supports additional commands : + +``` +> help +[...] +mattercommissioning Open/close the commissioning window. Usage : mattercommissioning [on|off] +matterfactoryreset Perform a factory reset on the device +matterreset Reset the device +``` + +- `matterfactoryreset` command erases the file system completely (all Matter + settings are erased). +- `matterreset` enables the device to reboot without erasing the settings. + +Here are described steps to use the all-cluster-app with the Matter CLI enabled + +1. Prepare the board with the flashed `All-cluster application` (as shown + above). +2. The matter CLI is accessible in UART1. For that, start a terminal emulator + like PuTTY and connect to the used COM port with the following UART settings: + + - Baud rate: 115200 + - 8 data bits + - 1 stop bit + - No parity + - No flow control + +3. The All-cluster example uses UART2 to print logs while running the server. To + view raw UART output, a pin should be plugged to an USB to UART adapter + (connector J16 pin 7 in case of MIMXRT1060-EVK-B board or connector J22 pin 7 + in case of MIMXRT1060-EVK board), then start a terminal emulator like PuTTY + and connect to the used COM port with the following UART settings: + + - Baud rate: 115200 + - 8 data bits + - 1 stop bit + - No parity + - No flow control + +4. On the client side, start sending commands using the chip-tool application as + it is described + [here](../../../../chip-tool/README.md#using-the-client-to-send-matter-commands). + +For Matter with OpenThread Border Router support, the matter CLI can be used to +start/join the Thread network, using the following ot-cli commands. (Note that +setting channel, panid, and network key is not enough anymore because of an Open +Thread stack update. We first need to initialize a new dataset.) + +``` +> otcli dataset init new +Done +> otcli dataset +Active Timestamp: 1 +Channel: 25 +Channel Mask: 0x07fff800 +Ext PAN ID: 42af793f623aab54 +Mesh Local Prefix: fd6e:c358:7078:5a8d::/64 +Network Key: f824658f79d8ca033fbb85ecc3ca91cc +Network Name: OpenThread-b870 +PAN ID: 0xb870 +PSKc: f438a194a5e968cc43cc4b3a6f560ca4 +Security Policy: 672 onrc 0 +Done +> otcli dataset panid 0xabcd +Done +> otcli dataset channel 25 +Done +> otcli dataset commit active +Done +> otcli ifconfig up +Done +> otcli thread start +Done +> otcli state +leader +Done +``` + + + +## Thread Border Router overview + +To enable Thread Border Router support see the [build](README.md#building) +section. + +The complete Border Router guide is located +[here](../../../../../docs/platforms/nxp/nxp_otbr_guide.md). diff --git a/examples/all-clusters-app/nxp/rt/rt1060/args.gni b/examples/all-clusters-app/nxp/rt/rt1060/args.gni new file mode 100644 index 0000000000..c2d91a5db7 --- /dev/null +++ b/examples/all-clusters-app/nxp/rt/rt1060/args.gni @@ -0,0 +1,19 @@ +# 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. + +import("//build_overrides/chip.gni") + +# SDK target definitions +nxp_sdk_target = get_label_info(":sdk", "label_no_toolchain") +nxp_sdk_driver_target = get_label_info(":sdk_driver", "label_no_toolchain") diff --git a/examples/all-clusters-app/nxp/rt/rt1060/build_overrides b/examples/all-clusters-app/nxp/rt/rt1060/build_overrides new file mode 120000 index 0000000000..f10867042f --- /dev/null +++ b/examples/all-clusters-app/nxp/rt/rt1060/build_overrides @@ -0,0 +1 @@ +../../../../build_overrides \ No newline at end of file diff --git a/examples/all-clusters-app/nxp/rt/rt1060/include/config/CHIPProjectConfig.h b/examples/all-clusters-app/nxp/rt/rt1060/include/config/CHIPProjectConfig.h new file mode 100644 index 0000000000..dd73c6c9ea --- /dev/null +++ b/examples/all-clusters-app/nxp/rt/rt1060/include/config/CHIPProjectConfig.h @@ -0,0 +1,216 @@ +/* + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020 Google LLC. + * 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 + +/* + * Tells to the platform Factory Data Provider whether to use the example configuration or real/provisioned data. + */ +#ifndef CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA +#define CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA 0 +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID + * + * 0xFFF1: Test vendor. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID + * + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8005 + +#if !CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA +// Use a default pairing code if one hasn't been provisioned in flash. +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif + +// Use a default pairing code if one hasn't been provisioned in flash. +#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" + +/** + * CHIP_DEVICE_CONFIG_USE_TEST_SERIAL_NUMBER + * + * Enables the use of a hard-coded default serial number if none + * is found in CHIP NV storage. + */ +#define CHIP_DEVICE_CONFIG_USE_TEST_SERIAL_NUMBER "DUMMY_SN" + +#endif /* !CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA */ + +/** + * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION + * + * The hardware version number assigned to device or product by the device vendor. This + * number is scoped to the device product id, and typically corresponds to a revision of the + * physical device, a change to its packaging, and/or a change to its marketing presentation. + * This value is generally *not* incremented for device software versions. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 100 + +#ifndef CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING "v0.1.0" +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING + * + * A string identifying the software version running on the device. + * CHIP currently expects the software version to be in the format + * {MAJOR_VERSION}.0d{MINOR_VERSION} + */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING NXP_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION NXP_CONFIG_DEVICE_SOFTWARE_VERSION +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME "NXP Semiconductors" +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME "NXP Demo App" +#endif + +#ifndef CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION +//-> format_version = 1 +//-> vendor_id = 0xFFF1 +//-> product_id_array = [ 0x8000, 0x8001, 0x8002, 0x8003, 0x8004, 0x8005, 0x8006, 0x8007, 0x8008, 0x8009, 0x800A, 0x800B, +// 0x800C, 0x800D, 0x800E, 0x800F, 0x8010, 0x8011, 0x8012, 0x8013, 0x8014, 0x8015, 0x8016, 0x8017, 0x8018, 0x8019, 0x801A, +// 0x801B, 0x801C, 0x801D, 0x801E, 0x801F, 0x8020, 0x8021, 0x8022, 0x8023, 0x8024, 0x8025, 0x8026, 0x8027, 0x8028, 0x8029, +// 0x802A, 0x802B, 0x802C, 0x802D, 0x802E, 0x802F, 0x8030, 0x8031, 0x8032, 0x8033, 0x8034, 0x8035, 0x8036, 0x8037, 0x8038, +// 0x8039, 0x803A, 0x803B, 0x803C, 0x803D, 0x803E, 0x803F, 0x8040, 0x8041, 0x8042, 0x8043, 0x8044, 0x8045, 0x8046, 0x8047, +// 0x8048, 0x8049, 0x804A, 0x804B, 0x804C, 0x804D, 0x804E, 0x804F, 0x8050, 0x8051, 0x8052, 0x8053, 0x8054, 0x8055, 0x8056, +// 0x8057, 0x8058, 0x8059, 0x805A, 0x805B, 0x805C, 0x805D, 0x805E, 0x805F, 0x8060, 0x8061, 0x8062, 0x8063 ] +//-> device_type_id = 0x0016 +//-> certificate_id = "ZIG20142ZB330003-24" +//-> security_level = 0 +//-> security_information = 0 +//-> version_number = 0x2694 +//-> certification_type = 0 +//-> dac_origin_vendor_id is not present +//-> dac_origin_product_id is not present +#define CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION \ + { \ + 0x30, 0x82, 0x02, 0x19, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, 0x82, 0x02, 0x0a, 0x30, \ + 0x82, 0x02, 0x06, 0x02, 0x01, 0x03, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, \ + 0x02, 0x01, 0x30, 0x82, 0x01, 0x71, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x82, \ + 0x01, 0x62, 0x04, 0x82, 0x01, 0x5e, 0x15, 0x24, 0x00, 0x01, 0x25, 0x01, 0xf1, 0xff, 0x36, 0x02, 0x05, 0x00, 0x80, \ + 0x05, 0x01, 0x80, 0x05, 0x02, 0x80, 0x05, 0x03, 0x80, 0x05, 0x04, 0x80, 0x05, 0x05, 0x80, 0x05, 0x06, 0x80, 0x05, \ + 0x07, 0x80, 0x05, 0x08, 0x80, 0x05, 0x09, 0x80, 0x05, 0x0a, 0x80, 0x05, 0x0b, 0x80, 0x05, 0x0c, 0x80, 0x05, 0x0d, \ + 0x80, 0x05, 0x0e, 0x80, 0x05, 0x0f, 0x80, 0x05, 0x10, 0x80, 0x05, 0x11, 0x80, 0x05, 0x12, 0x80, 0x05, 0x13, 0x80, \ + 0x05, 0x14, 0x80, 0x05, 0x15, 0x80, 0x05, 0x16, 0x80, 0x05, 0x17, 0x80, 0x05, 0x18, 0x80, 0x05, 0x19, 0x80, 0x05, \ + 0x1a, 0x80, 0x05, 0x1b, 0x80, 0x05, 0x1c, 0x80, 0x05, 0x1d, 0x80, 0x05, 0x1e, 0x80, 0x05, 0x1f, 0x80, 0x05, 0x20, \ + 0x80, 0x05, 0x21, 0x80, 0x05, 0x22, 0x80, 0x05, 0x23, 0x80, 0x05, 0x24, 0x80, 0x05, 0x25, 0x80, 0x05, 0x26, 0x80, \ + 0x05, 0x27, 0x80, 0x05, 0x28, 0x80, 0x05, 0x29, 0x80, 0x05, 0x2a, 0x80, 0x05, 0x2b, 0x80, 0x05, 0x2c, 0x80, 0x05, \ + 0x2d, 0x80, 0x05, 0x2e, 0x80, 0x05, 0x2f, 0x80, 0x05, 0x30, 0x80, 0x05, 0x31, 0x80, 0x05, 0x32, 0x80, 0x05, 0x33, \ + 0x80, 0x05, 0x34, 0x80, 0x05, 0x35, 0x80, 0x05, 0x36, 0x80, 0x05, 0x37, 0x80, 0x05, 0x38, 0x80, 0x05, 0x39, 0x80, \ + 0x05, 0x3a, 0x80, 0x05, 0x3b, 0x80, 0x05, 0x3c, 0x80, 0x05, 0x3d, 0x80, 0x05, 0x3e, 0x80, 0x05, 0x3f, 0x80, 0x05, \ + 0x40, 0x80, 0x05, 0x41, 0x80, 0x05, 0x42, 0x80, 0x05, 0x43, 0x80, 0x05, 0x44, 0x80, 0x05, 0x45, 0x80, 0x05, 0x46, \ + 0x80, 0x05, 0x47, 0x80, 0x05, 0x48, 0x80, 0x05, 0x49, 0x80, 0x05, 0x4a, 0x80, 0x05, 0x4b, 0x80, 0x05, 0x4c, 0x80, \ + 0x05, 0x4d, 0x80, 0x05, 0x4e, 0x80, 0x05, 0x4f, 0x80, 0x05, 0x50, 0x80, 0x05, 0x51, 0x80, 0x05, 0x52, 0x80, 0x05, \ + 0x53, 0x80, 0x05, 0x54, 0x80, 0x05, 0x55, 0x80, 0x05, 0x56, 0x80, 0x05, 0x57, 0x80, 0x05, 0x58, 0x80, 0x05, 0x59, \ + 0x80, 0x05, 0x5a, 0x80, 0x05, 0x5b, 0x80, 0x05, 0x5c, 0x80, 0x05, 0x5d, 0x80, 0x05, 0x5e, 0x80, 0x05, 0x5f, 0x80, \ + 0x05, 0x60, 0x80, 0x05, 0x61, 0x80, 0x05, 0x62, 0x80, 0x05, 0x63, 0x80, 0x18, 0x24, 0x03, 0x16, 0x2c, 0x04, 0x13, \ + 0x5a, 0x49, 0x47, 0x32, 0x30, 0x31, 0x34, 0x32, 0x5a, 0x42, 0x33, 0x33, 0x30, 0x30, 0x30, 0x33, 0x2d, 0x32, 0x34, \ + 0x24, 0x05, 0x00, 0x24, 0x06, 0x00, 0x25, 0x07, 0x94, 0x26, 0x24, 0x08, 0x00, 0x18, 0x31, 0x7d, 0x30, 0x7b, 0x02, \ + 0x01, 0x03, 0x80, 0x14, 0x62, 0xfa, 0x82, 0x33, 0x59, 0xac, 0xfa, 0xa9, 0x96, 0x3e, 0x1c, 0xfa, 0x14, 0x0a, 0xdd, \ + 0xf5, 0x04, 0xf3, 0x71, 0x60, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, \ + 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x04, 0x47, 0x30, 0x45, 0x02, 0x20, 0x24, 0xe5, \ + 0xd1, 0xf4, 0x7a, 0x7d, 0x7b, 0x0d, 0x20, 0x6a, 0x26, 0xef, 0x69, 0x9b, 0x7c, 0x97, 0x57, 0xb7, 0x2d, 0x46, 0x90, \ + 0x89, 0xde, 0x31, 0x92, 0xe6, 0x78, 0xc7, 0x45, 0xe7, 0xf6, 0x0c, 0x02, 0x21, 0x00, 0xf8, 0xaa, 0x2f, 0xa7, 0x11, \ + 0xfc, 0xb7, 0x9b, 0x97, 0xe3, 0x97, 0xce, 0xda, 0x66, 0x7b, 0xae, 0x46, 0x4e, 0x2b, 0xd3, 0xff, 0xdf, 0xc3, 0xcc, \ + 0xed, 0x7a, 0xa8, 0xca, 0x5f, 0x4c, 0x1a, 0x7c \ + } +#endif + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC + * + * Enables synchronizing the device's real time clock with a remote CHIP Time service + * using the CHIP Time Sync protocol. + */ +// #define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 1 + +/** + * CHIP_CONFIG_MAX_BINDINGS + * + * Maximum number of simultaneously active bindings per ChipExchangeManager + * 1 (Time Sync) + 2 (Two 1-way subscriptions) + 1 (Software Update) = 4 + * in the worst case. Keeping another 4 as buffer. + */ +#define CHIP_CONFIG_MAX_BINDINGS 6 + +/** + * CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD + * + * Select the ability to offload event logs to any interested subscribers using WDM. + */ +#define CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD 1 + +/** + * CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE + * + * A size, in bytes, of the individual debug event logging buffer. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) + +/** + * CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE + * + * For a development build, set the default importance of events to be logged as Debug. + * Since debug is the lowest importance level, this means all standard, critical, info and + * debug importance level vi events get logged. + */ +#if BUILD_RELEASE +#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Production +#else +#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Debug +#endif // BUILD_RELEASE + +/* Increasing the retransmission interval of the MRP messages after subsequent failures */ +#ifndef CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL +#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL (2000_ms32) +#endif diff --git a/examples/all-clusters-app/nxp/rt/rt1060/third_party/connectedhomeip b/examples/all-clusters-app/nxp/rt/rt1060/third_party/connectedhomeip new file mode 120000 index 0000000000..305f2077ff --- /dev/null +++ b/examples/all-clusters-app/nxp/rt/rt1060/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../../.. \ No newline at end of file diff --git a/examples/all-clusters-app/nxp/rt/rt1170/.gn b/examples/all-clusters-app/nxp/rt/rt1170/.gn new file mode 100644 index 0000000000..59dcfeb229 --- /dev/null +++ b/examples/all-clusters-app/nxp/rt/rt1170/.gn @@ -0,0 +1,35 @@ +# 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/build.gni") +import("//build_overrides/chip.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 = { + target_cpu = "arm" + target_os = "freertos" + + import("//args.gni") + + # Import common example GN args + import("${chip_root}/examples/platform/nxp/common/gn/args.gni") + + # Import default platform configs + import("${chip_root}/src/platform/nxp/rt/rt1170/args.gni") +} diff --git a/examples/all-clusters-app/nxp/rt/rt1170/BUILD.gn b/examples/all-clusters-app/nxp/rt/rt1170/BUILD.gn new file mode 100644 index 0000000000..724a6e89ec --- /dev/null +++ b/examples/all-clusters-app/nxp/rt/rt1170/BUILD.gn @@ -0,0 +1,241 @@ +# Copyright (c) 2021-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. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/nxp_sdk.gni") +import("//build_overrides/openthread.gni") +import("${chip_root}/src/platform/device.gni") + +#allows to get common NXP SDK gn options +import("${nxp_sdk_build_root}/nxp_sdk.gni") + +# Allows to get various RT gn options +import("${nxp_sdk_build_root}/${nxp_sdk_name}/rt_sdk.gni") + +import("${chip_root}/src/platform/nxp/${nxp_platform}/args.gni") +import( + "${nxp_sdk_build_root}/${nxp_sdk_name}/${rt_platform}/${rt_platform}.gni") +import("${nxp_sdk_build_root}/${nxp_sdk_name}/nxp_executable.gni") + +assert(current_os == "freertos") +assert(target_os == "freertos") +assert(nxp_platform == "rt/rt1170") + +declare_args() { + # Allows to connect to a predefine Wi-Fi network at boot + wifi_auto_connect_at_boot = false + wifi_auto_connect_at_boot_ssid = "" + wifi_auto_connect_at_boot_password = "" + + # Setup discriminator as argument + setup_discriminator = 3840 +} + +example_platform_dir = + "${nxp_sdk_matter_support_root}/examples/platform/${nxp_platform}" +common_example_dir = "${chip_root}/examples/platform/nxp/common" + +app_common_folder = "all-clusters-app/all-clusters-common" + +# Create here the SDK instance. +# Particular sources/defines/includes could be added/changed depending on the target application. +rt_sdk("sdk") { + defines = [] + + cflags = [] + public_deps = [] + public_configs = [] + sources = [] + include_dirs = [] + + # Indicate paths to default board files + include_dirs += [ "${example_platform_dir}/board/" ] + sources += [ "${example_platform_dir}/board/pin_mux.c" ] + sources += [ "${example_platform_dir}/board/hardware_init.c" ] + sources += [ "${example_platform_dir}/board/clock_config.c" ] + sources += [ "${example_platform_dir}/board/board.c" ] + sources += [ "${example_platform_dir}/board/peripherals.c" ] + sources += [ "${example_platform_dir}/board/sdmmc_config.c" ] + + # Indicate the path to CHIPProjectConfig.h + include_dirs += [ "include/config" ] + + # Indicate the default path to FreeRTOSConfig.h + include_dirs += [ "${example_platform_dir}/app/project_include/freeRTOS" ] + + # Indicate the default path to OpenThreadConfig.h + include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ] + + # For matter with BR feature, increase FreeRTOS heap size + if (chip_enable_wifi && chip_enable_openthread) { + defines += [ "configTOTAL_HEAP_SIZE=(size_t)(170 * 1024)" ] + } + + defines += [ + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}", + ] +} + +# Create the SDK driver instance. +# Particular sources/defines/includes could be added to add other drivers not available in the default sdk driver template +rt1170_sdk_drivers("sdk_driver") { +} + +rt_executable("all_cluster_app") { + output_name = "chip-rt1170-all-cluster-example" + + defines = [ + "CONFIG_RENDEZVOUS_MODE=7", + "CONFIG_APP_FREERTOS_OS=1", + ] + + if (chip_enable_openthread) { + defines += [ "CONFIG_NET_L2_OPENTHREAD=1" ] + } + + include_dirs = [ + "../../common/main/include", + "../../common/main", + "${chip_root}/examples/all-clusters-app/all-clusters-common/include", + "${chip_root}/examples/providers/", + ] + + sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", + "${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp", + "../../common/main/AppTask.cpp", + "../../common/main/DeviceCallbacks.cpp", + "../../common/main/ZclCallbacks.cpp", + "../../common/main/include/AppEvent.h", + "../../common/main/include/AppTask.h", + "../../common/main/include/DeviceCallbacks.h", + "../../common/main/main.cpp", + ] + + # App common files + include_dirs += [ + "${common_example_dir}/icd/include", + "${common_example_dir}/matter_button/include", + "${common_example_dir}/matter_cli/include", + "${common_example_dir}/device_manager/include", + "${common_example_dir}/device_callbacks/include", + "${common_example_dir}/factory_data/include", + "${common_example_dir}/app_task/include", + ] + + sources += [ + "${common_example_dir}/app_task/source/AppTaskBase.cpp", + "${common_example_dir}/app_task/source/AppTaskFreeRTOS.cpp", + "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", + "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/factory_data/source/AppFactoryDataDefaultImpl.cpp", + "${common_example_dir}/icd/source/ICDUtil.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationEmpty.cpp", + ] + + deps = [ "${chip_root}/examples/${app_common_folder}" ] + + sources += [ + "${chip_root}/examples/${app_common_folder}/src/bridged-actions-stub.cpp", + "${chip_root}/examples/${app_common_folder}/src/smco-stub.cpp", + "${chip_root}/examples/${app_common_folder}/src/static-supported-modes-manager.cpp", + ] + + if (chip_enable_matter_cli) { + defines += [ "ENABLE_CHIP_SHELL" ] + deps += [ + "${chip_root}/examples/shell/shell_common:shell_common", + "${chip_root}/src/lib/shell:shell", + ] + sources += [ + "${common_example_dir}/matter_cli/source/AppCLIBase.cpp", + "${common_example_dir}/matter_cli/source/AppCLIFreeRTOS.cpp", + ] + } + + if (chip_enable_ota_requestor) { + include_dirs += [ "${common_example_dir}/ota_requestor/include" ] + sources += [ + "${common_example_dir}/ota_requestor/source/OTARequestorInitiator.cpp", + "${common_example_dir}/ota_requestor/source/OTARequestorInitiatorCommon.cpp", + ] + } + + if (wifi_auto_connect_at_boot) { + assert(wifi_auto_connect_at_boot_ssid != "" && + wifi_auto_connect_at_boot_password != "", + "WiFi SSID and password must be specified at build time!") + + defines += [ + "CONFIG_CHIP_APP_WIFI_CONNECT_AT_BOOT=1", + "CONFIG_CHIP_APP_WIFI_SSID=\"${wifi_auto_connect_at_boot_ssid}\"", + "CONFIG_CHIP_APP_WIFI_PASSWORD=\"${wifi_auto_connect_at_boot_password}\"", + ] + + include_dirs += [ "${common_example_dir}/wifi_connect/include" ] + sources += [ "${common_example_dir}/wifi_connect/source/WifiConnect.cpp" ] + } + + # In case a dedicated assert function needs to be supported the flag sdk_fsl_assert_support should be set to false + # The would add to the build a dedicated application assert implementation. + if (!sdk_fsl_assert_support) { + sources += [ "${common_example_dir}/app_assert/source/AppAssert.cpp" ] + } + + cflags = [ "-Wconversion" ] + + ldscript = + "${example_platform_dir}/app/ldscripts/MIMXRT1176xxxxx_cm7_flexspi_nor.ld" + + inputs = [ ldscript ] + + ldflags = [ + "-T" + rebase_path(ldscript, root_build_dir), + "-fno-common", + "-Wl,--defsym=__stack_size__=2048", + "-ffreestanding", + "-fno-builtin", + "-mapcs", + "-u qspiflash_config", + "-u image_vector_table", + "-u boot_data", + "-u dcd_data", + "-Wl,-print-memory-usage", + "-Wl,--no-warn-rwx-segments", + ] + + if (chip_enable_ota_requestor) { + if (no_mcuboot) { + # If "no_mcuboot" is set to true, the application will be linked at the base of the flash. + print( + "Warning : The OTA Requestor is enabled without MCUBoot. This will prevent the application from applying software updates.") + } else { + # we need to reserve enough space for the bootloader (MCUBoot) + # MCUBoot requires 0x40000 Bytes to be reserved at the base of the flash + # Consequently, some sections will need to be shifted + ldflags += [ "-Wl,--defsym=__m_mcuboot_size__=0x40000" ] + } + } + + output_dir = root_out_dir +} + +group("rt1170") { + deps = [ ":all_cluster_app" ] +} + +group("default") { + deps = [ ":rt1170" ] +} diff --git a/examples/all-clusters-app/nxp/rt/rt1170/README.md b/examples/all-clusters-app/nxp/rt/rt1170/README.md new file mode 100644 index 0000000000..7ff91872a4 --- /dev/null +++ b/examples/all-clusters-app/nxp/rt/rt1170/README.md @@ -0,0 +1,505 @@ +# CHIP RT1170 All-clusters Application + +The all-clusters example implements a server which can be accessed by a CHIP +controller and can accept basic cluster commands. + +The example is based on +[Project CHIP](https://github.com/project-chip/connectedhomeip) and the NXP +RT1170 SDK, and provides a prototype application that demonstrates device +commissioning and different cluster control. + +
+ +- [CHIP RT1170 All-clusters Application](#chip-rt1170-all-clusters-application) + - [Introduction](#introduction) + - [Configuration(s) supported](#configurations-supported) + - [Hardware requirements for RT1170 + IW612](#hardware-requirements-for-rt1170--iw612) + - [Hardware rework for SPI support on MIMXRT1170-EVK-B](#hardware-rework-for-spi-support-on-mimxrt1170-evk-b) + - [Board settings (Spinel over SPI, I2C, BLE over UART)](#board-settings-spinel-over-spi-i2c-ble-over-uart) + - [Building](#building) + - [Building with Matter over Wifi configuration on RT1170 + IW612](#building-with-matter-over-wifi-configuration-on-rt1170--iw612) + - [Building with Matter over Thread configuration on RT1170 + IW612](#building-with-matter-over-thread-configuration-on-rt1170--iw612) + - [Building with Matter over Wifi + OpenThread Border Router configuration on RT1170 + IW612](#building-with-matter-over-wifi--openthread-border-router-configuration-on-rt1170--iw612) + - [General information](#general-information) + - [Manufacturing data](#manufacturing-data) + - [Flashing and debugging](#flashing-and-debugging) + - [Testing the example](#testing-the-example) + - [Matter over wifi configuration :](#matter-over-wifi-configuration-) + - [Matter over thread configuration :](#matter-over-thread-configuration-) + - [Matter over wifi with openthread border router configuration :](#matter-over-wifi-with-openthread-border-router-configuration-) + - [Testing the all-clusters application without Matter CLI:](#testing-the-all-clusters-application-without-matter-cli) + - [Testing the all-clusters application with Matter CLI enabled:](#testing-the-all-clusters-application-with-matter-cli-enabled) + - [Thread Border Router overview](#thread-border-router-overview) +
+ +## Introduction + +![RT1170 EVK](../../../../platform/nxp/rt/rt1170/doc/images/IMX-RT1170-EVK-TOP.jpg) + +The RT1170 all-cluster application provides a working demonstration of the +RT1170 board integration, built using the Project CHIP codebase and the NXP +RT1170 SDK. + +The example supports: + +- Matter over Wi-Fi +- Matter over Openthread +- Matter over Wi-Fi with Openthread Border Router support + +The example targets the +[NXP MIMXRT1170-EVKB](https://www.nxp.com/part/MIMXRT1170-EVKB#/) board by +default. + +### Configuration(s) supported + +Here are listed configurations that allow to support Matter over Wi-Fi & Matter +over Thread on RT1170 : + +- RT1170 + IW612 (Wi-Fi + BLE + 15.4) + +### Hardware requirements for RT1170 + IW612 + +Host part: + +- 1 MIMXRT1170-EVK-B + +Transceiver part : + +- 1 + [2EL M2 A1 IW612 Secure Module](https://www.nxp.com/products/wireless/wi-fi-plus-bluetooth-plus-802-15-4/2-4-5-ghz-dual-band-1x1-wi-fi-6-802-11ax-plus-bluetooth-5-2-plus-802-15-4-tri-radio-solution:IW612) + +![](../../../../platform/nxp/rt/rt1170/doc/images/iwx612_2EL.jpg) + +- 1 + [Murata uSD to M2 adapter revC](https://www.murata.com/en-eu/products/connectivitymodule/wi-fi-bluetooth/overview/lineup/usd-m2-adapter-2we-2wf) + +![](../../../../platform/nxp/rt/rt1170/doc/images/murata_usd-M2_adapter.jpg) + +- Male to female Burg cables + +#### Hardware rework for SPI support on MIMXRT1170-EVK-B + +To support SPI on the MIMXRT1170-EVK-B board, it is required to remove 0Ω +resistors R404,R406,R2015. + +#### Board settings (Spinel over SPI, I2C, BLE over UART) + +Plug IW612 module to M.2 connector on Murata uSD to M2 adapter + +The Murata uSD-M2 adapter should be plugged to the RT1170 via SD-IO. + +The below tables explain pin settings (SPI settings) to connect the +MIMXRT1170-EVK-B (host) to a IW612 transceiver (rcp). + +- Murata uSD to M2 adapter connections description: + +![](../../../../platform/nxp/rt/rt1170/doc/images/murata_usd-m2_connections_1.jpg) + +![](../../../../platform/nxp/rt/rt1170/doc/images/murata_usd-m2_connections_2.jpg) + +- Jumpers positions on Murata uSD to M2 adapter: + + Use USB-C power supply | Jumper | Position| | :----: | :-----: | | J1 | 1-2 + | | J12 | 1-2 | | J13 | 1-2 | | J14 | 1-2 | | JP1.1 (back side)| ON | + +- Jumpers positions on MIMXRT1170-EVK-B: + + | Jumper | Position | + | :----: | :------: | + | `J56` | `2-3` | + +- I2C connection to program `IO_Expander` on the IW612 module + + | MIMXRT1170-EVK-B | uSD-M2 adapter | + | :----------------: | :------------: | + | `I2C_SDA (J10.18)` | `J5.2` | + | `I2C_SDL (J10.20)` | `J5.4` | + +- SPI connection between RT1170 and uSD-M2 adapter + + | MIMXRT1170-EVK-B | uSD-M2 adapter | + | :-----------------: | :------------: | + | `SPI_MOSI (J10.8)` | `J5.10` | + | `SPI_MISO (J10.10)` | `J9.7` | + | `SPI_CLK (J10.12)` | `J9.8` | + | `SPI_CS (J10.6)` | `J5.8` | + | `SPI_INT (J26.4)` | `J5.6` | + | `GND (J10.14)` | `J5.15` | + +- UART BLE and Reset connections between RT1170 and uSD-M2 adapter + + | MIMXRT1170-EVK-B | uSD-M2 adapter | + | :-----------------: | :------------: | + | `RESET (J26.2)` | `J9.3` | + | `UART_RXD (J25.13)` | `J9.1` | + | `UART_TXD (J25.15)` | `J9.2` | + | `UART_CTS (J25.9)` | `J8.4` | + | `UART_RTS (J25.11)` | `J8.3` | + | `GND (J26.1)` | `J7.6` | + +## Building + +In order to build the Project CHIP example, we recommend using a Linux +distribution. Supported Operating Systems are listed in +[BUILDING.md](../../../../../docs/guides/BUILDING.md). + +- Make sure that below prerequisites are correctly installed, as described in + [BUILDING.md](../../../../../docs/guides/BUILDING.md). + +``` +sudo apt-get install git gcc g++ pkg-config libssl-dev libdbus-1-dev \ + libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev \ + python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev +``` + +- Step 1: checkout NXP specific submodules only + +``` +user@ubuntu:~/Desktop/git/connectedhomeip$ scripts/checkout_submodules.py --shallow --platform nxp --recursive +``` + +- Step 2: activate local environment + +``` +user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/activate.sh +``` + +If the script says the environment is out of date, you can update it by running +the following command: + +``` +user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/bootstrap.sh +``` + +- Step 3: Init NXP SDK(s) + +``` +user@ubuntu:~/Desktop/git/connectedhomeip$ third_party/nxp/nxp_matter_support/scripts/update_nxp_sdk.py --platform common +``` + +Note: By default update_nxp_sdk.py will try to initialize all NXP SDKs. Arg "-- +help" could be used to view all available options. + +``` +user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/all-cluster-app/nxp/rt/rt1170/ +``` + +### Building with Matter over Wifi configuration on RT1170 + IW612 + +- Build the Wi-fi configuration for MIMXRT1170 board + IW612 transceiver (with + BLE for commissioning). + +``` +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1170$ gn gen --args="chip_enable_wifi=true iwx12_transceiver=true chip_config_network_layer_ble=true chip_enable_ble=true " out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1170$ ninja -C out/debug +``` + +### Building with Matter over Thread configuration on RT1170 + IW612 + +- Build the Openthread configuration for MIMXRT1170 board + IW612 transceiver + (with BLE for commissioning). + +``` +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-cluster/nxp/rt/rt1170$ gn gen --args="chip_enable_openthread=true iwx12_transceiver=true chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=true" out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-cluster/nxp/rt/rt1170/$ ninja -C out/debug +``` + +### Building with Matter over Wifi + OpenThread Border Router configuration on RT1170 + IW612 + +This configuration supports the Thread Border Router management cluster to +provision the Thread credentials. Enabling the Matter CLI in order to control +the Thread network on the Border Router is optional but recommended for other +features like the Thread credential sharing. + +Note that the Thread Border Router management cluster is only supported on the +thermostat application for now. + +- Build Matter with Border Router configuration with BLE commissioning + (ble-wifi) : + +``` +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt11170$ gn gen --args="chip_enable_wifi=true iwx12_transceiver=true chip_config_network_layer_ble=true chip_enable_ble=true chip_enable_openthread=true chip_enable_matter_cli=true" out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rt1170$ ninja -C out/debug +``` + +### General information + +The resulting output file can be found in +out/debug/chip-rt1170-all-cluster-example. + +Optional GN options that can be added when building an application: + +- To enable the + [secondary network commissioning interface](../../../../../docs/platforms/nxp/nxp_otbr_guide.md#using-the-secondary-network-commissioning-interface), + the arguments `chip_enable_secondary_nwk_if=true` and + `chip_device_config_thread_network_endpoint_id=3` must be added to the _gn + gen_ command. Note that this is only supported when building the Matter over + Wifi + OpenThread Border Router configuration. Note that is only supported + on the on the thermostat application for now. +- To enable the + [matter CLI](#testing-the-all-clusters-application-with-matter-cli-enabled), + the argument `chip_enable_matter_cli=true` must be added to the _gn gen_ + command. +- To build the application in debug mode, the argument + `is_debug=true optimize_debug=false` must be added to the _gn gen_ command. +- To build with the option to have Matter certificates/keys pre-loaded in a + specific flash area the argument `chip_with_factory_data=1` must be added to + the _gn gen_ command. For more information, see + [Guide for writing manufacturing data on NXP devices](../../../../../docs/platforms/nxp/nxp_manufacturing_flow.md) +- To build the application with the OTA Requestor enabled, the arguments + `chip_enable_ota_requestor=true no_mcuboot=false` must be added to the _gn + gen_ command. More information about the OTA Requestor feature in + [OTA Requestor README](../../../../../docs/platforms/nxp/nxp_RTs_ota_software_update.md). + +## Manufacturing data + +See +[Guide for writing manufacturing data on NXP devices](../../../../../docs/platforms/nxp/nxp_manufacturing_flow.md) + +Other comments: + +The all cluster app demonstrates the usage of encrypted Matter manufacturing +data storage. Matter manufacturing data should be encrypted using an AES 128 +software key before flashing them to the device flash. + +## Flashing and debugging + +In order to flash the application we recommend using +[MCUXpresso IDE (version >= 11.5.0)](https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE). + +- Import the previously downloaded NXP SDK into MCUXpresso IDE. This can be + done by drag-and-dropping the SDK archive into MCUXpresso IDE "Installed + SDKs" tab; + ![Select SDK](../../../../platform/nxp/rt/rt1170/doc/images/select-sdk.png) +- Import the connectedhomeip repo in MCUXpresso IDE as Makefile Project. Use + _none_ as _Toolchain for Indexer Settings_: + +``` +File -> Import -> C/C++ -> Existing Code as Makefile Project +``` + +- Configure MCU Settings: + +``` +Right click on the Project -> Properties -> C/C++ Build -> MCU Settings -> Select MIMXRT1170 -> Apply & Close +``` + +![MCU_Sett](../../../../platform/nxp/rt/rt1170/doc/images/mcu-set.png) + +Sometimes when the MCU is selected it will not initialize all the memory regions +(usually the `BOARD_FLASH`, `BOARD_SDRAM` and `NCACHE_REGION`) so it is required +that this regions are added manually like in the image above. In addition to +that on the `BOARD_FLASH` line, in the driver tab: + +``` +click inside the tab and on the right side a button with three horizontal dots will appear +click on the button and an window will show +form the dropdown menu select the MIMXRT1170_SFDP_QSPI driver +``` + +![flash_driver](../../../../platform/nxp/rt/rt1170/doc/images/flash_driver.png) + +- Configure the toolchain editor: + +``` +Right click on the Project -> C/C++ Build-> Tool Chain Editor -> NXP MCU Tools -> Apply & Close +``` + +![toolchain](../../../../platform/nxp/rt/rt1170/doc/images/toolchain.JPG) + +- Create a debug configuration: + + MIMXRT1170-EVK-B board supports CMSIS-DAP debug protocol by default. It + should be switched to JLink. + + - download and install + [MCU-LINK_INSTALLER 2.263](https://www.nxp.com/webapp/Download?colCode=MCU-LINK_INSTALLER_2.263_LIN) + - connect jumper JP3 to get board in ISP mode when powered + - connect board and run installed MCU-LINK, follow steps to flash JLINK + firmware + - remove jumper JP3 and reboot board + +``` +Right click on the Project -> Debug -> As->SEGGER J-Link probes -> OK -> Select elf file +``` + +![debug_0](../../../../platform/nxp/rt/rt1170/doc/images/debug0.png) + +- Set the _Initialization Commands_ to: + +``` +Right click on the Project -> Debug As -> Debug configurations... -> Startup + +set non-stop on +set pagination off +set mi-async +set remotetimeout 60000 +##target_extended_remote## +set mem inaccessible-by-default ${mem.access} +mon ondisconnect ${ondisconnect} +set arm force-mode thumb +${load} +``` + +![init](../../../../platform/nxp/rt/rt1170/doc/images/startup.png) + +- Set the _vector.catch_ value to _false_ inside the .launch file: + +``` +Right click on the Project -> Utilities -> Open Directory Browser here -> edit .launch file: + + + +``` + +- Debug using the newly created configuration file: + +## Testing the example + +To know how to commission a device over BLE, follow the instructions from +[chip-tool's README.md 'Commission a device over +BLE'][readme_ble_commissioning_section]. + +[readme_ble_commissioning_section]: + ../../../../chip-tool/README.md#commission-a-device-over-ble + +To know how to commissioning a device over IP, follow the instructions from +[chip-tool's README.md 'Pair a device over +IP'][readme_pair_ip_commissioning_section] + +[readme_pair_ip_commissioning_section]: + ../../../../chip-tool/README.md#pair-a-device-over-ip + +#### Matter over wifi configuration : + +The "ble-wifi" pairing method can be used in order to commission the device. + +#### Matter over thread configuration : + +The "ble-thread" pairing method can be used in order to commission the device. + +#### Matter over wifi with openthread border router configuration : + +In order to create or join a Thread network on the Matter Border Router, the TBR +management cluster or the `otcli` commands from the matter CLI can be used. For +more information about using the TBR management cluster follow instructions from +['Using the TBR management cluster'](../../../../../docs/platforms/nxp/nxp_otbr_guide.md#using-the-thread-border-router-management-cluster). +For more information about using the matter shell, follow instructions from +['Testing the all-clusters application with Matter CLI'](#testing-the-all-clusters-application-with-matter-cli-enabled). + +In this configuration, the device can be commissioned over Wi-Fi with the +'ble-wifi' pairing method. + +### Testing the all-clusters application without Matter CLI: + +1. Prepare the board with the flashed `All-cluster application` (as shown + above). +2. The All-cluster example uses UART1 to print logs while running the server. To + view raw UART output, start a terminal emulator like PuTTY and connect to the + used COM port with the following UART settings: + + - Baud rate: 115200 + - 8 data bits + - 1 stop bit + - No parity + - No flow control + +3. Open a terminal connection on the board and watch the printed logs. + +4. On the client side, start sending commands using the chip-tool application as + it is described + [here](../../../../chip-tool/README.md#using-the-client-to-send-matter-commands). + +### Testing the all-clusters application with Matter CLI enabled: + +Testing the all-clusters application with Matter CLI enabled: + +The Matter CLI can be enabled with the all-clusters application. + +For more information about the Matter CLI default commands, you can refer to the +dedicated [ReadMe](../../../../shell/README.md). + +The All-clusters application supports additional commands : + +``` +> help +[...] +mattercommissioning Open/close the commissioning window. Usage : mattercommissioning [on|off] +matterfactoryreset Perform a factory reset on the device +matterreset Reset the device +``` + +- `matterfactoryreset` command erases the file system completely (all Matter + settings are erased). +- `matterreset` enables the device to reboot without erasing the settings. + +Here are described steps to use the all-cluster-app with the Matter CLI enabled + +1. Prepare the board with the flashed `All-cluster application` (as shown + above). +2. The matter CLI is accessible in UART1. For that, start a terminal emulator + like PuTTY and connect to the used COM port with the following UART settings: + + - Baud rate: 115200 + - 8 data bits + - 1 stop bit + - No parity + - No flow control + +3. The All-cluster example uses UART2 to print logs while running the server. To + view raw UART output, a pin should be plugged to an USB to UART adapter + (connector J9 pin 4), then start a terminal emulator like PuTTY and connect + to the used COM port with the following UART settings: + + - Baud rate: 115200 + - 8 data bits + - 1 stop bit + - No parity + - No flow control + +4. On the client side, start sending commands using the chip-tool application as + it is described + [here](../../../../chip-tool/README.md#using-the-client-to-send-matter-commands). + +For Matter with OpenThread Border Router support, the matter CLI can be used to +start/join the Thread network, using the following ot-cli commands. (Note that +setting channel, panid, and network key is not enough anymore because of an Open +Thread stack update. We first need to initialize a new dataset.) + +``` +> otcli dataset init new +Done +> otcli dataset +Active Timestamp: 1 +Channel: 25 +Channel Mask: 0x07fff800 +Ext PAN ID: 42af793f623aab54 +Mesh Local Prefix: fd6e:c358:7078:5a8d::/64 +Network Key: f824658f79d8ca033fbb85ecc3ca91cc +Network Name: OpenThread-b870 +PAN ID: 0xb870 +PSKc: f438a194a5e968cc43cc4b3a6f560ca4 +Security Policy: 672 onrc 0 +Done +> otcli dataset panid 0xabcd +Done +> otcli dataset channel 25 +Done +> otcli dataset commit active +Done +> otcli ifconfig up +Done +> otcli thread start +Done +> otcli state +leader +Done +``` + +## Thread Border Router overview + +To enable Thread Border Router support see the [build](README.md#building) +section. + +The complete Border Router guide is located +[here](../../../../../docs/platforms/nxp/nxp_otbr_guide.md). diff --git a/examples/all-clusters-app/nxp/rt/rt1170/args.gni b/examples/all-clusters-app/nxp/rt/rt1170/args.gni new file mode 100644 index 0000000000..c2d91a5db7 --- /dev/null +++ b/examples/all-clusters-app/nxp/rt/rt1170/args.gni @@ -0,0 +1,19 @@ +# 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. + +import("//build_overrides/chip.gni") + +# SDK target definitions +nxp_sdk_target = get_label_info(":sdk", "label_no_toolchain") +nxp_sdk_driver_target = get_label_info(":sdk_driver", "label_no_toolchain") diff --git a/examples/all-clusters-app/nxp/rt/rt1170/build_overrides b/examples/all-clusters-app/nxp/rt/rt1170/build_overrides new file mode 120000 index 0000000000..f10867042f --- /dev/null +++ b/examples/all-clusters-app/nxp/rt/rt1170/build_overrides @@ -0,0 +1 @@ +../../../../build_overrides \ No newline at end of file diff --git a/examples/all-clusters-app/nxp/rt/rt1170/include/config/CHIPProjectConfig.h b/examples/all-clusters-app/nxp/rt/rt1170/include/config/CHIPProjectConfig.h new file mode 100644 index 0000000000..dd73c6c9ea --- /dev/null +++ b/examples/all-clusters-app/nxp/rt/rt1170/include/config/CHIPProjectConfig.h @@ -0,0 +1,216 @@ +/* + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020 Google LLC. + * 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 + +/* + * Tells to the platform Factory Data Provider whether to use the example configuration or real/provisioned data. + */ +#ifndef CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA +#define CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA 0 +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID + * + * 0xFFF1: Test vendor. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID + * + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8005 + +#if !CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA +// Use a default pairing code if one hasn't been provisioned in flash. +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif + +// Use a default pairing code if one hasn't been provisioned in flash. +#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" + +/** + * CHIP_DEVICE_CONFIG_USE_TEST_SERIAL_NUMBER + * + * Enables the use of a hard-coded default serial number if none + * is found in CHIP NV storage. + */ +#define CHIP_DEVICE_CONFIG_USE_TEST_SERIAL_NUMBER "DUMMY_SN" + +#endif /* !CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA */ + +/** + * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION + * + * The hardware version number assigned to device or product by the device vendor. This + * number is scoped to the device product id, and typically corresponds to a revision of the + * physical device, a change to its packaging, and/or a change to its marketing presentation. + * This value is generally *not* incremented for device software versions. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 100 + +#ifndef CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING "v0.1.0" +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING + * + * A string identifying the software version running on the device. + * CHIP currently expects the software version to be in the format + * {MAJOR_VERSION}.0d{MINOR_VERSION} + */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING NXP_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION NXP_CONFIG_DEVICE_SOFTWARE_VERSION +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME "NXP Semiconductors" +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME "NXP Demo App" +#endif + +#ifndef CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION +//-> format_version = 1 +//-> vendor_id = 0xFFF1 +//-> product_id_array = [ 0x8000, 0x8001, 0x8002, 0x8003, 0x8004, 0x8005, 0x8006, 0x8007, 0x8008, 0x8009, 0x800A, 0x800B, +// 0x800C, 0x800D, 0x800E, 0x800F, 0x8010, 0x8011, 0x8012, 0x8013, 0x8014, 0x8015, 0x8016, 0x8017, 0x8018, 0x8019, 0x801A, +// 0x801B, 0x801C, 0x801D, 0x801E, 0x801F, 0x8020, 0x8021, 0x8022, 0x8023, 0x8024, 0x8025, 0x8026, 0x8027, 0x8028, 0x8029, +// 0x802A, 0x802B, 0x802C, 0x802D, 0x802E, 0x802F, 0x8030, 0x8031, 0x8032, 0x8033, 0x8034, 0x8035, 0x8036, 0x8037, 0x8038, +// 0x8039, 0x803A, 0x803B, 0x803C, 0x803D, 0x803E, 0x803F, 0x8040, 0x8041, 0x8042, 0x8043, 0x8044, 0x8045, 0x8046, 0x8047, +// 0x8048, 0x8049, 0x804A, 0x804B, 0x804C, 0x804D, 0x804E, 0x804F, 0x8050, 0x8051, 0x8052, 0x8053, 0x8054, 0x8055, 0x8056, +// 0x8057, 0x8058, 0x8059, 0x805A, 0x805B, 0x805C, 0x805D, 0x805E, 0x805F, 0x8060, 0x8061, 0x8062, 0x8063 ] +//-> device_type_id = 0x0016 +//-> certificate_id = "ZIG20142ZB330003-24" +//-> security_level = 0 +//-> security_information = 0 +//-> version_number = 0x2694 +//-> certification_type = 0 +//-> dac_origin_vendor_id is not present +//-> dac_origin_product_id is not present +#define CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION \ + { \ + 0x30, 0x82, 0x02, 0x19, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, 0x82, 0x02, 0x0a, 0x30, \ + 0x82, 0x02, 0x06, 0x02, 0x01, 0x03, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, \ + 0x02, 0x01, 0x30, 0x82, 0x01, 0x71, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x82, \ + 0x01, 0x62, 0x04, 0x82, 0x01, 0x5e, 0x15, 0x24, 0x00, 0x01, 0x25, 0x01, 0xf1, 0xff, 0x36, 0x02, 0x05, 0x00, 0x80, \ + 0x05, 0x01, 0x80, 0x05, 0x02, 0x80, 0x05, 0x03, 0x80, 0x05, 0x04, 0x80, 0x05, 0x05, 0x80, 0x05, 0x06, 0x80, 0x05, \ + 0x07, 0x80, 0x05, 0x08, 0x80, 0x05, 0x09, 0x80, 0x05, 0x0a, 0x80, 0x05, 0x0b, 0x80, 0x05, 0x0c, 0x80, 0x05, 0x0d, \ + 0x80, 0x05, 0x0e, 0x80, 0x05, 0x0f, 0x80, 0x05, 0x10, 0x80, 0x05, 0x11, 0x80, 0x05, 0x12, 0x80, 0x05, 0x13, 0x80, \ + 0x05, 0x14, 0x80, 0x05, 0x15, 0x80, 0x05, 0x16, 0x80, 0x05, 0x17, 0x80, 0x05, 0x18, 0x80, 0x05, 0x19, 0x80, 0x05, \ + 0x1a, 0x80, 0x05, 0x1b, 0x80, 0x05, 0x1c, 0x80, 0x05, 0x1d, 0x80, 0x05, 0x1e, 0x80, 0x05, 0x1f, 0x80, 0x05, 0x20, \ + 0x80, 0x05, 0x21, 0x80, 0x05, 0x22, 0x80, 0x05, 0x23, 0x80, 0x05, 0x24, 0x80, 0x05, 0x25, 0x80, 0x05, 0x26, 0x80, \ + 0x05, 0x27, 0x80, 0x05, 0x28, 0x80, 0x05, 0x29, 0x80, 0x05, 0x2a, 0x80, 0x05, 0x2b, 0x80, 0x05, 0x2c, 0x80, 0x05, \ + 0x2d, 0x80, 0x05, 0x2e, 0x80, 0x05, 0x2f, 0x80, 0x05, 0x30, 0x80, 0x05, 0x31, 0x80, 0x05, 0x32, 0x80, 0x05, 0x33, \ + 0x80, 0x05, 0x34, 0x80, 0x05, 0x35, 0x80, 0x05, 0x36, 0x80, 0x05, 0x37, 0x80, 0x05, 0x38, 0x80, 0x05, 0x39, 0x80, \ + 0x05, 0x3a, 0x80, 0x05, 0x3b, 0x80, 0x05, 0x3c, 0x80, 0x05, 0x3d, 0x80, 0x05, 0x3e, 0x80, 0x05, 0x3f, 0x80, 0x05, \ + 0x40, 0x80, 0x05, 0x41, 0x80, 0x05, 0x42, 0x80, 0x05, 0x43, 0x80, 0x05, 0x44, 0x80, 0x05, 0x45, 0x80, 0x05, 0x46, \ + 0x80, 0x05, 0x47, 0x80, 0x05, 0x48, 0x80, 0x05, 0x49, 0x80, 0x05, 0x4a, 0x80, 0x05, 0x4b, 0x80, 0x05, 0x4c, 0x80, \ + 0x05, 0x4d, 0x80, 0x05, 0x4e, 0x80, 0x05, 0x4f, 0x80, 0x05, 0x50, 0x80, 0x05, 0x51, 0x80, 0x05, 0x52, 0x80, 0x05, \ + 0x53, 0x80, 0x05, 0x54, 0x80, 0x05, 0x55, 0x80, 0x05, 0x56, 0x80, 0x05, 0x57, 0x80, 0x05, 0x58, 0x80, 0x05, 0x59, \ + 0x80, 0x05, 0x5a, 0x80, 0x05, 0x5b, 0x80, 0x05, 0x5c, 0x80, 0x05, 0x5d, 0x80, 0x05, 0x5e, 0x80, 0x05, 0x5f, 0x80, \ + 0x05, 0x60, 0x80, 0x05, 0x61, 0x80, 0x05, 0x62, 0x80, 0x05, 0x63, 0x80, 0x18, 0x24, 0x03, 0x16, 0x2c, 0x04, 0x13, \ + 0x5a, 0x49, 0x47, 0x32, 0x30, 0x31, 0x34, 0x32, 0x5a, 0x42, 0x33, 0x33, 0x30, 0x30, 0x30, 0x33, 0x2d, 0x32, 0x34, \ + 0x24, 0x05, 0x00, 0x24, 0x06, 0x00, 0x25, 0x07, 0x94, 0x26, 0x24, 0x08, 0x00, 0x18, 0x31, 0x7d, 0x30, 0x7b, 0x02, \ + 0x01, 0x03, 0x80, 0x14, 0x62, 0xfa, 0x82, 0x33, 0x59, 0xac, 0xfa, 0xa9, 0x96, 0x3e, 0x1c, 0xfa, 0x14, 0x0a, 0xdd, \ + 0xf5, 0x04, 0xf3, 0x71, 0x60, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, \ + 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x04, 0x47, 0x30, 0x45, 0x02, 0x20, 0x24, 0xe5, \ + 0xd1, 0xf4, 0x7a, 0x7d, 0x7b, 0x0d, 0x20, 0x6a, 0x26, 0xef, 0x69, 0x9b, 0x7c, 0x97, 0x57, 0xb7, 0x2d, 0x46, 0x90, \ + 0x89, 0xde, 0x31, 0x92, 0xe6, 0x78, 0xc7, 0x45, 0xe7, 0xf6, 0x0c, 0x02, 0x21, 0x00, 0xf8, 0xaa, 0x2f, 0xa7, 0x11, \ + 0xfc, 0xb7, 0x9b, 0x97, 0xe3, 0x97, 0xce, 0xda, 0x66, 0x7b, 0xae, 0x46, 0x4e, 0x2b, 0xd3, 0xff, 0xdf, 0xc3, 0xcc, \ + 0xed, 0x7a, 0xa8, 0xca, 0x5f, 0x4c, 0x1a, 0x7c \ + } +#endif + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC + * + * Enables synchronizing the device's real time clock with a remote CHIP Time service + * using the CHIP Time Sync protocol. + */ +// #define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 1 + +/** + * CHIP_CONFIG_MAX_BINDINGS + * + * Maximum number of simultaneously active bindings per ChipExchangeManager + * 1 (Time Sync) + 2 (Two 1-way subscriptions) + 1 (Software Update) = 4 + * in the worst case. Keeping another 4 as buffer. + */ +#define CHIP_CONFIG_MAX_BINDINGS 6 + +/** + * CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD + * + * Select the ability to offload event logs to any interested subscribers using WDM. + */ +#define CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD 1 + +/** + * CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE + * + * A size, in bytes, of the individual debug event logging buffer. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) + +/** + * CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE + * + * For a development build, set the default importance of events to be logged as Debug. + * Since debug is the lowest importance level, this means all standard, critical, info and + * debug importance level vi events get logged. + */ +#if BUILD_RELEASE +#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Production +#else +#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Debug +#endif // BUILD_RELEASE + +/* Increasing the retransmission interval of the MRP messages after subsequent failures */ +#ifndef CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL +#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL (2000_ms32) +#endif diff --git a/examples/all-clusters-app/nxp/rt/rt1170/third_party/connectedhomeip b/examples/all-clusters-app/nxp/rt/rt1170/third_party/connectedhomeip new file mode 120000 index 0000000000..305f2077ff --- /dev/null +++ b/examples/all-clusters-app/nxp/rt/rt1170/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../../.. \ No newline at end of file diff --git a/examples/all-clusters-app/nxp/rt/rw61x/README.md b/examples/all-clusters-app/nxp/rt/rw61x/README.md index 61d3f00869..9b19031c00 100644 --- a/examples/all-clusters-app/nxp/rt/rw61x/README.md +++ b/examples/all-clusters-app/nxp/rt/rw61x/README.md @@ -149,7 +149,7 @@ out/debug/chip-rw61x-all-cluster-example. Optional GN options that can be added when building an application: - To enable the - [secondary network commissioning interface](../../../../../docs/guides/nxp/nxp_otbr_guide.md#using-the-secondary-network-commissioning-interface), + [secondary network commissioning interface](../../../../../docs/platforms/nxp/nxp_otbr_guide.md#using-the-secondary-network-commissioning-interface), the arguments `chip_enable_secondary_nwk_if=true` and `chip_device_config_thread_network_endpoint_id=2` must be added to the _gn gen_ command. Note that this is only supported when building the Matter over @@ -167,16 +167,16 @@ Optional GN options that can be added when building an application: - To build with the option to have Matter certificates/keys pre-loaded in a specific flash area the argument `chip_with_factory_data=1` must be added to the _gn gen_ command. (for more information see - [Guide for writing manufacturing data on NXP devices](../../../../../docs/guides/nxp/nxp_manufacturing_flow.md). + [Guide for writing manufacturing data on NXP devices](../../../../../docs/platforms/nxp/nxp_manufacturing_flow.md). - To build the application with the OTA Requestor enabled, the arguments `chip_enable_ota_requestor=true no_mcuboot=false` must be added to the _gn gen_ command. (More information about the OTA Requestor feature in - [OTA Requestor README](../../../../../docs/guides/nxp/nxp_rw61x_ota_software_update.md) + [OTA Requestor README](../../../../../docs/platforms/nxp/nxp_RTs_ota_software_update.md) ## Manufacturing data See -[Guide for writing manufacturing data on NXP devices](../../../../../docs/guides/nxp/nxp_manufacturing_flow.md) +[Guide for writing manufacturing data on NXP devices](../../../../../docs/platforms/nxp/nxp_manufacturing_flow.md) Other comments: @@ -252,7 +252,7 @@ Right click on the Project -> Debug -> As->SEGGER JLink probes -> OK -> Select e CHIP Tool is a Matter controller which can be used to commission a Matter device into the network. For more information regarding how to use the CHIP Tool controller, please refer to the -[CHIP Tool guide](../../../../../docs/guides/chip_tool_guide.md). +[CHIP Tool guide](../../../../../docs/development_controllers/chip-tool/chip_tool_guide.md). To know how to commission a device over BLE, follow the instructions from [chip-tool's README.md 'Commission a device over @@ -281,7 +281,7 @@ The "ble-thread" pairing method can be used in order to commission the device. In order to create or join a Thread network on the Matter Border Router, the TBR management cluster or the `otcli` commands from the matter CLI can be used. For more information about using the TBR management cluster follow instructions from -['Using the TBR management cluster'](../../../../../docs/guides/nxp/nxp_otbr_guide.md#using-the-thread-border-router-management-cluster). +['Using the TBR management cluster'](../../../../../docs/platforms/nxp/nxp_otbr_guide.md#using-the-thread-border-router-management-cluster). For more information about using the matter shell, follow instructions from ['Testing the all-clusters application with Matter CLI'](#testing-the-all-clusters-application-with-matter-cli-enabled). @@ -407,7 +407,7 @@ Done Over-The-Air software updates are supported with the RW61x all-clusters example. The process to follow in order to perform a software update is described in the dedicated guide -['Matter Over-The-Air Software Update with NXP RW61x example applications'](../../../../../docs/guides/nxp/nxp_rw61x_ota_software_update.md). +['Matter Over-The-Air Software Update with NXP RW61x example applications'](../../../../../docs/platforms/nxp/nxp_RTs_ota_software_update.md). @@ -417,4 +417,4 @@ To enable Thread Border Router support see the [build](README.md#building) section. The complete Border Router guide is located -[here](../../../../../docs/guides/nxp/nxp_otbr_guide.md). +[here](../../../../../docs/platforms/nxp/nxp_otbr_guide.md). diff --git a/examples/all-clusters-app/nxp/zephyr/README.md b/examples/all-clusters-app/nxp/zephyr/README.md index 54a06c62c6..d9038b02dd 100644 --- a/examples/all-clusters-app/nxp/zephyr/README.md +++ b/examples/all-clusters-app/nxp/zephyr/README.md @@ -201,14 +201,14 @@ the partition address: please refer to `factory_partition` defined in #### Manually See -[Guide for writing manufacturing data on NXP devices](../../../../docs/guides/nxp/nxp_manufacturing_flow.md) +[Guide for writing manufacturing data on NXP devices](../../../../docs/platforms/nxp/nxp_manufacturing_flow.md) ## OTA Software Update See -[Guide for OTA Software Update on NXP devices using Zephyr SDK](../../../../docs/guides/nxp/nxp_zephyr_ota_software_update.md) +[Guide for OTA Software Update on NXP devices using Zephyr SDK](../../../../docs/platforms/nxp/nxp_zephyr_ota_software_update.md) diff --git a/examples/all-clusters-app/openiotsdk/README.md b/examples/all-clusters-app/openiotsdk/README.md index 269411f9f5..661c331f37 100644 --- a/examples/all-clusters-app/openiotsdk/README.md +++ b/examples/all-clusters-app/openiotsdk/README.md @@ -11,7 +11,7 @@ You can use this example as a reference for creating your own application. For information on how to build, run, test and debug this example and further information about the platform it is run on see -[Open IoT SDK examples](../../../docs/guides/openiotsdk_examples.md). +[Open IoT SDK examples](../../../docs/platforms/openiotsdk/openiotsdk_examples.md). The example name to use in the scripts is `all-clusters-app`. @@ -31,7 +31,7 @@ follow traces in the terminal. ### Commissioning Read the -[Open IoT SDK commissioning guide](../../../docs/guides/openiotsdk_commissioning.md) +[Open IoT SDK commissioning guide](../../../docs/platforms/openiotsdk/openiotsdk_commissioning.md) to see how to use the Matter controller to commission and control the application. diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 3fa32d226a..ae50904721 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -1557,6 +1557,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -6274,7 +6275,6 @@ endpoint 0 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -6295,7 +6295,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision; @@ -6320,7 +6319,6 @@ endpoint 0 { callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -6345,7 +6343,6 @@ endpoint 0 { callback attribute supportedLocales; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6355,7 +6352,6 @@ endpoint 0 { persist attribute hourFormat default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6364,7 +6360,6 @@ endpoint 0 { server cluster UnitLocalization { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6377,7 +6372,6 @@ endpoint 0 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; @@ -6391,7 +6385,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6418,7 +6411,6 @@ endpoint 0 { callback attribute threadVersion; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -6448,7 +6440,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -6519,7 +6510,6 @@ endpoint 0 { callback attribute adminVendorId; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6537,7 +6527,6 @@ endpoint 0 { callback attribute currentFabricIndex; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6563,7 +6552,6 @@ endpoint 0 { callback attribute maxGroupKeysPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -6606,7 +6594,6 @@ endpoint 1 { 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; @@ -6619,7 +6606,6 @@ endpoint 1 { 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; @@ -6644,7 +6630,6 @@ endpoint 1 { persist attribute startUpOnOff default = 0xFF; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; @@ -6683,7 +6668,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -6709,7 +6693,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; @@ -6772,7 +6755,6 @@ endpoint 1 { callback attribute fabricSceneInfo; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -7180,7 +7162,6 @@ endpoint 2 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -7193,7 +7174,6 @@ endpoint 2 { 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; @@ -7218,7 +7198,6 @@ endpoint 2 { ram attribute startUpOnOff; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0000; ram attribute clusterRevision default = 5; @@ -7238,7 +7217,6 @@ endpoint 2 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -7251,7 +7229,6 @@ endpoint 2 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; @@ -7263,7 +7240,6 @@ endpoint 2 { callback attribute fabricSceneInfo; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -7302,7 +7278,6 @@ endpoint 65534 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -7319,7 +7294,6 @@ endpoint 65534 { callback attribute lastConnectErrorValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap default = 0; callback attribute clusterRevision default = 1; diff --git a/examples/all-clusters-minimal-app/asr/README.md b/examples/all-clusters-minimal-app/asr/README.md index 5160ef5d4d..2a411c728a 100755 --- a/examples/all-clusters-minimal-app/asr/README.md +++ b/examples/all-clusters-minimal-app/asr/README.md @@ -14,7 +14,7 @@ control on ASR platform. ## Building and Commissioning Please refer -[Building and Commissioning](../../../docs/guides/asr_getting_started_guide.md#building-the-example-application) +[Building and Commissioning](../../../docs/platforms/asr/asr_getting_started_guide.md#building-the-example-application) guides to get started ``` diff --git a/examples/all-clusters-minimal-app/esp32/README.md b/examples/all-clusters-minimal-app/esp32/README.md index 6cb3f9093d..4b5ca4ea72 100644 --- a/examples/all-clusters-minimal-app/esp32/README.md +++ b/examples/all-clusters-minimal-app/esp32/README.md @@ -4,16 +4,16 @@ A prototype application that demonstrates device commissioning and cluster control. Please -[setup ESP-IDF and CHIP Environment](../../../docs/guides/esp32/setup_idf_chip.md) +[setup ESP-IDF and CHIP Environment](../../../docs/platforms/esp32/setup_idf_chip.md) and refer -[building and commissioning](../../../docs/guides/esp32/build_app_and_commission.md) +[building and commissioning](../../../docs/platforms/esp32/build_app_and_commission.md) guides to get started. --- - [Cluster control](#cluster-control) -- [Matter OTA guide](../../../docs/guides/esp32/ota.md) -- [RPC console and Device Tracing](../../../docs/guides/esp32/rpc_console.md) +- [Matter OTA guide](../../../docs/platforms/esp32/ota.md) +- [RPC console and Device Tracing](../../../docs/platforms/esp32/rpc_console.md) --- diff --git a/examples/all-clusters-minimal-app/infineon/psoc6/README.md b/examples/all-clusters-minimal-app/infineon/psoc6/README.md index 80b8e1ceb6..7dc9fccf00 100644 --- a/examples/all-clusters-minimal-app/infineon/psoc6/README.md +++ b/examples/all-clusters-minimal-app/infineon/psoc6/README.md @@ -126,4 +126,4 @@ commands. These power cycle the BlueTooth hardware and disable BR/EDR mode. For the description of Software Update process with infineon PSoC6 example applications see -[Infineon PSoC6 OTA Software Update](../../../../docs/guides/infineon_psoc6_software_update.md) +[Infineon PSoC6 OTA Software Update](../../../../docs/platforms/infineon/infineon_psoc6_software_update.md) diff --git a/examples/all-clusters-minimal-app/mbed/README.md b/examples/all-clusters-minimal-app/mbed/README.md index d4096cbde2..86226548a9 100644 --- a/examples/all-clusters-minimal-app/mbed/README.md +++ b/examples/all-clusters-minimal-app/mbed/README.md @@ -225,7 +225,8 @@ traces in the terminal. ### CHIP Tools -Read the [MbedCommissioning](../../../docs/guides/mbedos_commissioning.md) to +Read the +[MbedCommissioning](../../../docs/platforms/mbedos/mbedos_commissioning.md) to see how to use different CHIP tools to commission and control the application within a WiFi network. @@ -239,7 +240,7 @@ within a WiFi network. - More details and guidelines about porting new hardware into the Matter project with Mbed OS can be found in - [MbedNewTarget](../../../docs/guides/mbedos_add_new_target.md) + [MbedNewTarget](../../../docs/platforms/mbedos/mbedos_add_new_target.md) - Some useful information about HW platform specific settings can be found in `all-clusters-minimal-app/mbed/mbed_app.json`. Information about this file syntax and its meaning in mbed-os project can be diff --git a/examples/all-clusters-minimal-app/nrfconnect/README.md b/examples/all-clusters-minimal-app/nrfconnect/README.md index 932db10a2f..b9d44a889f 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/README.md +++ b/examples/all-clusters-minimal-app/nrfconnect/README.md @@ -41,7 +41,7 @@ This example is running on the nRF Connect platform, which is based on Nordic Semiconductor's [nRF Connect SDK](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/index.html) and [Zephyr RTOS](https://zephyrproject.org/). Visit Matter's -[nRF Connect platform overview](../../../docs/guides/nrfconnect_platform_overview.md) +[nRF Connect platform overview](../../../docs/platforms/nrf/nrfconnect_platform_overview.md) to read more about the platform structure and dependencies. By default, the Matter accessory device has IPv6 networking disabled. You must @@ -144,7 +144,7 @@ for the predefined period of time (15 minutes by default). **SEGGER J-Link USB port** can be used to get logs from the device or communicate with it using the -[command line interface](../../../docs/guides/nrfconnect_examples_cli.md). +[command line interface](../../../docs/platforms/nrf/nrfconnect_examples_cli.md).
@@ -371,7 +371,7 @@ depending on the selected board: those platforms support the DFU. For more information, see the -[Configuring nRF Connect SDK examples](../../../docs/guides/nrfconnect_examples_configuration.md) +[Configuring nRF Connect SDK examples](../../../docs/platforms/nrf/nrfconnect_examples_configuration.md) page.
@@ -406,19 +406,20 @@ to read more about flashing on the nRF52840 Dongle. ## Testing the example -Check the [CLI tutorial](../../../docs/guides/nrfconnect_examples_cli.md) to -learn how to use command-line interface of the application. +Check the [CLI tutorial](../../../docs/platforms/nrf/nrfconnect_examples_cli.md) +to learn how to use command-line interface of the application. ### Testing using Linux CHIPTool -Read the [CHIP Tool user guide](../../../docs/guides/chip_tool_guide.md) to see -how to use [CHIP Tool for Linux or mac OS](../../chip-tool/README.md) to +Read the +[CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md) +to see how to use [CHIP Tool for Linux or mac OS](../../chip-tool/README.md) to commission and control the application within a Matter-enabled Thread network. ### Testing using Android CHIPTool Read the -[Android commissioning guide](../../../docs/guides/nrfconnect_android_commissioning.md) +[Android commissioning guide](../../../docs/platforms/nrf/nrfconnect_android_commissioning.md) to see how to use [CHIPTool](../../../examples/android/CHIPTool/README.md) for Android smartphones to commission and control the application within a Matter-enabled Thread network. diff --git a/examples/all-clusters-minimal-app/nxp/linux-imx/imx8m/README.md b/examples/all-clusters-minimal-app/nxp/linux-imx/imx8m/README.md index e20ff1065d..01941f58e7 100644 --- a/examples/all-clusters-minimal-app/nxp/linux-imx/imx8m/README.md +++ b/examples/all-clusters-minimal-app/nxp/linux-imx/imx8m/README.md @@ -1,4 +1,4 @@ To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini** **EVK**, see the associated -[README document](../../../../../docs/guides/nxp/nxp_imx8m_linux_examples.md) +[README document](../../../../../docs/platforms/nxp/nxp_imx8m_linux_examples.md) for details. diff --git a/examples/all-clusters-minimal-app/tizen/BUILD.gn b/examples/all-clusters-minimal-app/tizen/BUILD.gn deleted file mode 100644 index 99f857e863..0000000000 --- a/examples/all-clusters-minimal-app/tizen/BUILD.gn +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright (c) 2020 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build_overrides/chip.gni") -import("//build_overrides/tizen.gni") - -import("${chip_root}/build/chip/tools.gni") -import("${chip_root}/src/app/common_flags.gni") - -import("${tizen_sdk_build_root}/tizen_sdk.gni") -assert(chip_build_tools) - -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", - ] - - deps = [ - "${chip_root}/examples/all-clusters-minimal-app/all-clusters-common", - "${chip_root}/examples/platform/tizen:app-main", - "${chip_root}/src/lib/shell:shell_core", - ] - - include_dirs = - [ "${chip_root}/examples/all-clusters-app/all-clusters-common/include" ] -} - -executable("chip-all-clusters-minimal-app") { - sources = [ - "include/CHIPProjectAppConfig.h", - "src/main.cpp", - ] - - deps = [ - ":chip-all-clusters-common", - "${chip_root}/examples/all-clusters-minimal-app/all-clusters-common", - "${chip_root}/examples/platform/tizen:app-main", - "${chip_root}/src/lib", - ] - - include_dirs = [ - "${chip_root}/examples/all-clusters-app/all-clusters-common/include", - "include", - ] - - output_dir = root_out_dir -} - -tizen_sdk_package("chip-all-clusters-minimal-app:tpk") { - deps = [ - ":chip-all-clusters-minimal-app", - "${chip_root}/examples/platform/tizen:author-certificate-CHIP", - ] - manifest = "tizen-manifest.xml" - sign_security_profile = "CHIP" -} - -group("tizen") { - deps = [ ":chip-all-clusters-minimal-app" ] -} - -group("tizen:tpk") { - deps = [ ":chip-all-clusters-minimal-app:tpk" ] -} - -group("default") { - deps = [ ":tizen" ] -} diff --git a/examples/all-clusters-minimal-app/tizen/src/main.cpp b/examples/all-clusters-minimal-app/tizen/src/main.cpp deleted file mode 100644 index 2d37747fe8..0000000000 --- a/examples/all-clusters-minimal-app/tizen/src/main.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - * - * 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 -#include - -#include -#include - -using namespace chip; -using namespace chip::app; -using namespace chip::DeviceLayer; - -// Network commissioning -namespace { -constexpr EndpointId kNetworkCommissioningEndpointMain = 0; -constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE; - -NetworkCommissioning::TizenEthernetDriver sEthernetDriver; -Clusters::ModeSelect::StaticSupportedModesManager sStaticSupportedModesManager; -Clusters::NetworkCommissioning::Instance sEthernetNetworkCommissioningInstance(kNetworkCommissioningEndpointMain, &sEthernetDriver); -} // namespace - -void ApplicationInit() -{ - // Enable secondary endpoint only when we need it. - emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false); - - sEthernetNetworkCommissioningInstance.Init(); - Clusters::ModeSelect::setSupportedModesManager(&sStaticSupportedModesManager); -} - -void ApplicationShutdown(){}; - -int main(int argc, char * argv[]) -{ - TizenServiceAppMain app; - VerifyOrDie(app.Init(argc, argv) == 0); - - VerifyOrDie(InitBindingHandlers() == CHIP_NO_ERROR); - - return app.RunMainLoop(); -} diff --git a/examples/all-clusters-minimal-app/tizen/tizen-manifest.xml b/examples/all-clusters-minimal-app/tizen/tizen-manifest.xml deleted file mode 100644 index cbd365aec7..0000000000 --- a/examples/all-clusters-minimal-app/tizen/tizen-manifest.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - http://tizen.org/privilege/bluetooth - http://tizen.org/privilege/internet - http://tizen.org/privilege/network.get - http://tizen.org/privilege/network.set - http://tizen.org/privilege/network.profile - - true - true - true - true - true - diff --git a/examples/android/CHIPTool/README.md b/examples/android/CHIPTool/README.md index cbd0caa598..415dc467d8 100644 --- a/examples/android/CHIPTool/README.md +++ b/examples/android/CHIPTool/README.md @@ -15,4 +15,5 @@ CHIPTool offers the following features: > pairing is implemented. For information about how to build the application, see the -[Building Android CHIPTool](../../../docs/guides/android_building.md) guide. +[Building Android CHIPTool](../../../docs/platforms/android/android_building.md) +guide. diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/DeviceProvisioningFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/DeviceProvisioningFragment.kt index 97b2576827..f7049b68ea 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/DeviceProvisioningFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/DeviceProvisioningFragment.kt @@ -289,7 +289,7 @@ class DeviceProvisioningFragment : Fragment() { override fun onICDRegistrationInfoRequired() { Log.d(TAG, "onICDRegistrationInfoRequired") deviceController.updateCommissioningICDRegistrationInfo( - ICDRegistrationInfo.newBuilder().build() + ICDRegistrationInfo.newBuilder().setICDStayActiveDurationMsec(30000L).build() ) } diff --git a/examples/bridge-app/asr/README.md b/examples/bridge-app/asr/README.md index 1986037085..1d29b4f5e3 100755 --- a/examples/bridge-app/asr/README.md +++ b/examples/bridge-app/asr/README.md @@ -26,7 +26,7 @@ cluster have been added as endpoints ## Building and Commissioning Please refer -[Building and Commissioning](../../../docs/guides/asr_getting_started_guide.md#building-the-example-application) +[Building and Commissioning](../../../docs/platforms/asr/asr_getting_started_guide.md#building-the-example-application) guides to get started ``` diff --git a/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp b/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp index 3508068c48..776c4e4349 100644 --- a/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp +++ b/examples/bridge-app/asr/subdevice/SubDeviceManager.cpp @@ -156,8 +156,8 @@ Protocols::InteractionModel::Status HandleWriteOnOffAttribute(SubDevice * dev, c { ChipLogProgress(DeviceLayer, "HandleWriteOnOffAttribute: attrId=%" PRIu32, attributeId); - ReturnErrorCodeIf((attributeId != OnOff::Attributes::OnOff::Id) || (!dev->IsReachable()), - Protocols::InteractionModel::Status::Failure); + VerifyOrReturnError((attributeId == OnOff::Attributes::OnOff::Id) && dev->IsReachable(), + Protocols::InteractionModel::Status::Failure); dev->SetOnOff(*buffer == 1); return Protocols::InteractionModel::Status::Success; } diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 89941b6f60..6241e8c635 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -1192,6 +1192,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2677,7 +2678,7 @@ endpoint 2 { } server cluster LevelControl { - persist attribute currentLevel default = 0x00; + persist attribute currentLevel default = 0xFE; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 5b820fd57c..bf78875444 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -5079,7 +5079,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/bridge-app/esp32/README.md b/examples/bridge-app/esp32/README.md index ac22c7f8b3..1d34ac6da4 100644 --- a/examples/bridge-app/esp32/README.md +++ b/examples/bridge-app/esp32/README.md @@ -1,9 +1,9 @@ # Matter ESP32 Bridge App Example Please -[setup ESP-IDF and Matter Environment](../../../docs/guides/esp32/setup_idf_chip.md) +[setup ESP-IDF and Matter Environment](../../../docs/platforms/esp32/setup_idf_chip.md) and refer -[building and commissioning](../../../docs/guides/esp32/build_app_and_commission.md) +[building and commissioning](../../../docs/platforms/esp32/build_app_and_commission.md) guides to get started. --- diff --git a/examples/bridge-app/esp32/main/main.cpp b/examples/bridge-app/esp32/main/main.cpp index 016b75803c..d1075385ce 100644 --- a/examples/bridge-app/esp32/main/main.cpp +++ b/examples/bridge-app/esp32/main/main.cpp @@ -268,8 +268,8 @@ Protocols::InteractionModel::Status HandleWriteOnOffAttribute(Device * dev, chip { ChipLogProgress(DeviceLayer, "HandleWriteOnOffAttribute: attrId=%" PRIu32, attributeId); - ReturnErrorCodeIf((attributeId != OnOff::Attributes::OnOff::Id) || (!dev->IsReachable()), - Protocols::InteractionModel::Status::Failure); + VerifyOrReturnError((attributeId == OnOff::Attributes::OnOff::Id) && dev->IsReachable(), + Protocols::InteractionModel::Status::Failure); dev->SetOnOff(*buffer == 1); return Protocols::InteractionModel::Status::Success; } diff --git a/examples/bridge-app/telink/src/AppTask.cpp b/examples/bridge-app/telink/src/AppTask.cpp index e080e40eb5..79644c2860 100644 --- a/examples/bridge-app/telink/src/AppTask.cpp +++ b/examples/bridge-app/telink/src/AppTask.cpp @@ -298,8 +298,8 @@ Protocols::InteractionModel::Status HandleWriteOnOffAttribute(Device * dev, chip { ChipLogProgress(DeviceLayer, "HandleWriteOnOffAttribute: attrId=%" PRIu32, attributeId); - ReturnErrorCodeIf((attributeId != Clusters::OnOff::Attributes::OnOff::Id) || (!dev->IsReachable()), - Protocols::InteractionModel::Status::Failure); + VerifyOrReturnError((attributeId == Clusters::OnOff::Attributes::OnOff::Id) && dev->IsReachable(), + Protocols::InteractionModel::Status::Failure); dev->SetOnOff(*buffer == 1); return Protocols::InteractionModel::Status::Success; } diff --git a/examples/build_overrides/googletest.gni b/examples/build_overrides/googletest.gni new file mode 100644 index 0000000000..71ce464272 --- /dev/null +++ b/examples/build_overrides/googletest.gni @@ -0,0 +1,18 @@ +# Copyright (c) 2024 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. + +declare_args() { + # Location of the GoogleTest repository. + dir_googletest = "//third_party/connectedhomeip/third_party/googletest" +} diff --git a/examples/chef/common/chef-concentration-measurement.cpp b/examples/chef/common/chef-concentration-measurement.cpp index d168b797b9..a23e66561d 100644 --- a/examples/chef/common/chef-concentration-measurement.cpp +++ b/examples/chef/common/chef-concentration-measurement.cpp @@ -76,17 +76,8 @@ Protocols::InteractionModel::Status chefConcentrationMeasurementWriteCallback( if (attributeId == measuredValueId) { - float newValue = 0; - uint16_t tlvLen = *(uint16_t *) buffer; - chip::TLV::TLVReader reader; - reader.Init(buffer + sizeof(uint16_t), tlvLen); - reader.Next(); - reader.Get(newValue); - - ChipLogDetail(DeviceLayer, "TLV Type %d, Length %d \n", static_cast(reader.GetType()), tlvLen); - // 2 bytes buf length + 5 bytes TLV for float - ChipLogDetail(DeviceLayer, "buffer: %02x%02x%02x%02x%02x%02x%02x \n", buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], - buffer[5], buffer[6]); + float newValue; + std::memcpy(&newValue, buffer, sizeof(float)); // Copy buffer content to float CHIP_ERROR err = clusterInstance->SetMeasuredValue(MakeNullable(newValue)); if (CHIP_NO_ERROR == err) diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index b2a08e643c..9a91b17a2a 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1034,6 +1034,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2270,7 +2271,7 @@ endpoint 1 { } server cluster LevelControl { - ram attribute currentLevel default = 0x01; + ram attribute currentLevel default = 0xFE; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index 5f2e2bd0eb..c72734d55c 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -4206,7 +4206,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter index c6d30a8265..dc4334462e 100644 --- a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter +++ b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter @@ -811,6 +811,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1928,7 +1929,6 @@ endpoint 1 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -1940,7 +1940,6 @@ endpoint 1 { persist attribute onOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 6; @@ -1957,7 +1956,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -1972,7 +1970,6 @@ endpoint 1 { callback attribute replacementProductList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -1989,7 +1986,6 @@ endpoint 1 { callback attribute replacementProductList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -2012,7 +2008,6 @@ endpoint 1 { ram attribute airflowDirection default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x3F; ram attribute clusterRevision default = 4; diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter index 0069c9881f..7c5232970d 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -662,6 +662,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2679,7 +2680,6 @@ endpoint 1 { 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; @@ -2692,7 +2692,6 @@ endpoint 1 { 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; @@ -2716,7 +2715,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2731,7 +2729,6 @@ endpoint 1 { callback attribute replacementProductList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -2748,7 +2745,6 @@ endpoint 1 { callback attribute replacementProductList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -2771,7 +2767,6 @@ endpoint 1 { ram attribute airflowDirection default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x3F; ram attribute clusterRevision default = 4; @@ -2788,7 +2783,6 @@ endpoint 2 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2803,7 +2797,6 @@ endpoint 2 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2813,7 +2806,6 @@ endpoint 2 { callback attribute airQuality; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -2833,7 +2825,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2853,7 +2844,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2873,7 +2863,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2893,7 +2882,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2913,7 +2901,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2933,7 +2920,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2953,7 +2939,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2973,7 +2958,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2993,7 +2977,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -3013,7 +2996,6 @@ endpoint 2 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -3028,7 +3010,6 @@ endpoint 3 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -3044,7 +3025,6 @@ endpoint 3 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -3057,7 +3037,6 @@ endpoint 3 { persist attribute tolerance default = 10; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -3072,7 +3051,6 @@ endpoint 4 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -3088,7 +3066,6 @@ endpoint 4 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -3101,7 +3078,6 @@ endpoint 4 { ram attribute tolerance default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -3116,7 +3092,6 @@ endpoint 5 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -3132,7 +3107,6 @@ endpoint 5 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -3150,7 +3124,6 @@ endpoint 5 { persist attribute systemMode default = 4; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 6; diff --git a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter index e810c5332a..ac2265df8d 100644 --- a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter +++ b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter @@ -998,6 +998,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2563,7 +2564,6 @@ endpoint 1 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2578,7 +2578,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2603,7 +2602,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x06; ram attribute clusterRevision default = 1; @@ -2613,7 +2611,6 @@ endpoint 1 { callback attribute airQuality; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -2626,7 +2623,6 @@ endpoint 1 { persist attribute tolerance default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2639,7 +2635,6 @@ endpoint 1 { persist attribute tolerance; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -2659,7 +2654,6 @@ endpoint 1 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2679,7 +2673,6 @@ endpoint 1 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2699,7 +2692,6 @@ endpoint 1 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2719,7 +2711,6 @@ endpoint 1 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2739,7 +2730,6 @@ endpoint 1 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2759,7 +2749,6 @@ endpoint 1 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2779,7 +2768,6 @@ endpoint 1 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2799,7 +2787,6 @@ endpoint 1 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2819,7 +2806,6 @@ endpoint 1 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2839,7 +2825,6 @@ endpoint 1 { callback attribute levelValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index 20a5e81798..f9b32f989d 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -936,6 +936,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2504,7 +2505,6 @@ endpoint 1 { persist attribute onOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 6; @@ -2521,7 +2521,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2531,7 +2530,6 @@ endpoint 1 { ram attribute MACAddress; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2543,7 +2541,6 @@ endpoint 1 { callback attribute currentChannel; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 1; @@ -2560,7 +2557,6 @@ endpoint 1 { persist attribute currentTarget default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2580,7 +2576,6 @@ endpoint 1 { ram attribute seekRangeStart; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 1; @@ -2604,7 +2599,6 @@ endpoint 1 { persist attribute currentInput default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -2618,7 +2612,6 @@ endpoint 1 { server cluster LowPower { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2629,7 +2622,6 @@ endpoint 1 { server cluster KeypadInput { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 7; ram attribute clusterRevision default = 1; @@ -2643,7 +2635,6 @@ endpoint 1 { persist attribute currentOutput default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -2661,7 +2652,6 @@ endpoint 2 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2674,7 +2664,6 @@ endpoint 2 { persist attribute onOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 6; @@ -2692,7 +2681,6 @@ endpoint 2 { ram attribute onLevel default = 0xFE; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 6; @@ -2714,7 +2702,6 @@ endpoint 2 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 871fc21daa..5f0c6496f8 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -1013,6 +1013,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2299,7 +2300,7 @@ endpoint 1 { } server cluster LevelControl { - persist attribute currentLevel default = 0x00; + persist attribute currentLevel default = 0xFE; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x1; ram attribute maxLevel default = 0xFE; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index 24f3246bce..fc2f45d22b 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -2885,7 +2885,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter index 772daa2010..8c08a4e154 100644 --- a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter +++ b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter @@ -998,6 +998,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2468,7 +2469,6 @@ endpoint 1 { 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 = 2; @@ -2506,7 +2506,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x06; ram attribute clusterRevision default = 1; diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index a25cc32ae1..1d5b585620 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -1096,6 +1096,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2107,7 +2108,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0A; ram attribute clusterRevision default = 1; @@ -2117,7 +2117,6 @@ endpoint 1 { ram attribute stateValue 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/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index 62df14dd5c..57166f3ba4 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1034,6 +1034,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2081,7 +2082,7 @@ endpoint 1 { } server cluster LevelControl { - persist attribute currentLevel default = 0x01; + persist attribute currentLevel default = 0xFE; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index 78ea7d8764..2e215aa472 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -2943,7 +2943,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter index 788fdf8d74..cc875bbd19 100644 --- a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter +++ b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter @@ -1034,6 +1034,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2190,7 +2191,6 @@ endpoint 1 { 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; @@ -2203,7 +2203,6 @@ endpoint 1 { ram attribute nameSupport default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2228,7 +2227,6 @@ endpoint 1 { persist attribute startUpOnOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 6; @@ -2242,7 +2240,7 @@ endpoint 1 { } server cluster LevelControl { - persist attribute currentLevel default = 0x01; + persist attribute currentLevel default = 0xFE; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; @@ -2251,7 +2249,6 @@ endpoint 1 { persist attribute startUpCurrentLevel default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 5; @@ -2273,7 +2270,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2284,7 +2280,6 @@ endpoint 1 { callback attribute fabricSceneInfo; 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/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.zap b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.zap index 4fa09375fd..3ba91647fa 100644 --- a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.zap +++ b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.zap @@ -2991,7 +2991,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter index fdbb4868a3..d730676d92 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter @@ -700,6 +700,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1670,7 +1671,6 @@ endpoint 0 { callback attribute supportedLocales; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1858,7 +1858,6 @@ endpoint 1 { ram attribute onOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 6; @@ -1887,7 +1886,6 @@ endpoint 1 { ram attribute step default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 5; ram attribute clusterRevision default = 1; @@ -1900,7 +1898,6 @@ endpoint 1 { callback attribute currentMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 2; @@ -1917,7 +1914,6 @@ endpoint 1 { ram attribute supported default = 0x3F; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 4655c61d4d..6aa1625267 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -998,6 +998,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2585,7 +2586,6 @@ endpoint 1 { 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 = 2; @@ -2601,7 +2601,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2623,7 +2622,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0A; ram attribute clusterRevision default = 2; @@ -2665,7 +2663,6 @@ endpoint 1 { ram attribute requirePINforRemoteOperation default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x1DB3; ram attribute clusterRevision default = 7; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 95ba0c27de..71363c84a7 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -1034,6 +1034,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2342,7 +2343,7 @@ endpoint 1 { } server cluster LevelControl { - persist attribute currentLevel default = 0x01; + persist attribute currentLevel default = 0xFE; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index 19288d4d83..c5008df0c2 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -2911,7 +2911,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index de277d25e7..78e524d7eb 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -816,6 +816,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1887,7 +1888,6 @@ endpoint 1 { persist attribute airflowDirection default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x3F; ram attribute clusterRevision default = 1; diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index ce817d5365..466dbe2c41 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -837,6 +837,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter index 88f1d2389d..0ae39923c1 100644 --- a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter +++ b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter @@ -844,6 +844,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1747,7 +1748,6 @@ endpoint 1 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -1764,7 +1764,6 @@ endpoint 1 { callback attribute tagList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -1786,7 +1785,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0A; ram attribute clusterRevision default = 1; @@ -1801,7 +1799,6 @@ endpoint 1 { persist attribute currentPosition default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0xE; ram attribute clusterRevision default = 2; diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter index 18764919ac..6a66018ef4 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter @@ -844,6 +844,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1747,7 +1748,6 @@ endpoint 1 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -1764,7 +1764,6 @@ endpoint 1 { callback attribute tagList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -1786,7 +1785,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0A; ram attribute clusterRevision default = 1; @@ -1798,7 +1796,6 @@ endpoint 1 { persist attribute currentPosition default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 2; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 32e64fc401..36a655d47d 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1034,6 +1034,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 11390f7cc5..e633b0f2be 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -837,6 +837,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_laundrydryer_01796fe396.matter b/examples/chef/devices/rootnode_laundrydryer_01796fe396.matter index 4c5010e278..bb05b243f8 100644 --- a/examples/chef/devices/rootnode_laundrydryer_01796fe396.matter +++ b/examples/chef/devices/rootnode_laundrydryer_01796fe396.matter @@ -700,6 +700,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1561,7 +1562,6 @@ endpoint 0 { callback attribute supportedLocales; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1749,7 +1749,6 @@ endpoint 1 { ram attribute onOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 6; @@ -1766,7 +1765,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -1777,7 +1775,6 @@ endpoint 1 { callback attribute supportedTemperatureLevels; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -1796,7 +1793,6 @@ endpoint 1 { callback attribute operationalError; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter index 4ab9ad0064..f38dd8f3df 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter @@ -561,6 +561,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1656,7 +1657,6 @@ endpoint 1 { callback attribute currentMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 2; @@ -1672,7 +1672,6 @@ endpoint 1 { callback attribute supportedRinses; 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/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index fdeb9a209c..32528515cf 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -837,6 +837,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index bb47238f4c..04cf5fb646 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -837,6 +837,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index f755ba75a5..c4cc8357d9 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -1034,6 +1034,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2014,7 +2015,7 @@ endpoint 13 { } server cluster LevelControl { - persist attribute currentLevel default = 0x01; + persist attribute currentLevel default = 0xFE; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index d77eca38e6..36b41b59f1 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -2911,7 +2911,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.matter b/examples/chef/devices/rootnode_onofflight_samplemei.matter index 3fa6833ee3..32b351b6e8 100644 --- a/examples/chef/devices/rootnode_onofflight_samplemei.matter +++ b/examples/chef/devices/rootnode_onofflight_samplemei.matter @@ -1034,6 +1034,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2046,7 +2047,7 @@ endpoint 1 { } server cluster LevelControl { - persist attribute currentLevel default = 0x01; + persist attribute currentLevel default = 0xFE; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; @@ -2086,7 +2087,6 @@ endpoint 1 { ram attribute flipFlop default = false; 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/chef/devices/rootnode_onofflight_samplemei.zap b/examples/chef/devices/rootnode_onofflight_samplemei.zap index bf7bb8efdf..23543f053d 100644 --- a/examples/chef/devices/rootnode_onofflight_samplemei.zap +++ b/examples/chef/devices/rootnode_onofflight_samplemei.zap @@ -2911,7 +2911,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index 8eeb66e2e5..81fb81958f 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -909,6 +909,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 7251ede5ed..94414ae316 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -909,6 +909,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 993bc43a5a..43e8de7b5f 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -837,6 +837,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.matter b/examples/chef/devices/rootnode_pump_5f904818cc.matter index aee0aa7b2e..8cd43edf19 100644 --- a/examples/chef/devices/rootnode_pump_5f904818cc.matter +++ b/examples/chef/devices/rootnode_pump_5f904818cc.matter @@ -683,6 +683,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1732,7 +1733,6 @@ endpoint 1 { ram attribute maxMeasuredValue default = 32767; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1744,7 +1744,6 @@ endpoint 1 { ram attribute maxMeasuredValue default = 32767; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -1756,7 +1755,6 @@ endpoint 1 { ram attribute maxMeasuredValue default = 65534; 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/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index 84d57e7d21..5b2371526d 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -683,6 +683,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter index 00bf68f859..bfbd486f6e 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter @@ -561,6 +561,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1634,7 +1635,6 @@ endpoint 1 { callback attribute currentMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 2; @@ -1650,7 +1650,6 @@ endpoint 1 { ram attribute supported default = 0x1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1693,7 +1692,6 @@ endpoint 2 { ram attribute maxMeasuredValue default = 2000; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -1736,7 +1734,6 @@ endpoint 3 { ram attribute maxMeasuredValue default = 2000; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index 1306114cc1..dbc56cd15e 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -921,6 +921,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1974,7 +1975,6 @@ endpoint 1 { 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 = 2; @@ -1987,7 +1987,6 @@ endpoint 1 { ram attribute nameSupport; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -2011,7 +2010,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2027,7 +2025,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2038,7 +2035,6 @@ endpoint 1 { callback attribute currentMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2052,7 +2048,6 @@ endpoint 1 { callback attribute currentMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -2072,7 +2067,6 @@ endpoint 1 { callback attribute operationalError; 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/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index 4910c3b699..467ad0c462 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -734,6 +734,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2083,7 +2084,6 @@ endpoint 1 { 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 = 2; @@ -2116,7 +2116,6 @@ endpoint 1 { persist attribute onOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 5; @@ -2133,7 +2132,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2156,7 +2154,6 @@ endpoint 1 { persist attribute ACLouverPosition default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 7; @@ -2174,7 +2171,6 @@ endpoint 1 { ram attribute airflowDirection default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 37; ram attribute clusterRevision default = 1; @@ -2187,7 +2183,6 @@ endpoint 1 { ram attribute keypadLockout default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; @@ -2202,7 +2197,6 @@ endpoint 2 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2218,7 +2212,6 @@ endpoint 2 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2230,7 +2223,6 @@ endpoint 2 { ram attribute maxMeasuredValue default = 4500; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -2245,7 +2237,6 @@ endpoint 3 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2261,7 +2252,6 @@ endpoint 3 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2273,7 +2263,6 @@ endpoint 3 { ram attribute maxMeasuredValue default = 10000; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter index b685a6740f..b7e31f0bdc 100644 --- a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter @@ -921,6 +921,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1880,7 +1881,6 @@ endpoint 1 { 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 = 2; @@ -1916,7 +1916,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -1933,7 +1932,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 2; @@ -1966,7 +1964,6 @@ endpoint 1 { ram attribute expiryDate default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 1; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index c2b2056aae..c5a1ccc522 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -957,6 +957,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 64a2449991..6199388887 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -837,6 +837,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 8303eef5ee..7993032488 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -898,6 +898,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter index a2cf704eaa..1ea6c421ab 100644 --- a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter +++ b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter @@ -921,6 +921,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1844,7 +1845,6 @@ endpoint 1 { 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 = 2; @@ -1857,7 +1857,6 @@ endpoint 1 { ram attribute nameSupport; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -1881,7 +1880,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -1903,7 +1901,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x06; ram attribute clusterRevision default = 1; @@ -1913,7 +1910,6 @@ endpoint 1 { ram attribute stateValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1922,7 +1918,6 @@ endpoint 1 { server cluster BooleanStateConfiguration { 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/chef/devices/rootnode_waterleakdetector_0b067acfa3.zap b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.zap index 11ebd3c2e3..34e2b90f20 100644 --- a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.zap +++ b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.zap @@ -3062,4 +3062,4 @@ "parentEndpointIdentifier": 0 } ] -} +} \ No newline at end of file diff --git a/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter b/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter index 139d5dc6a2..0e4ffe5dc8 100644 --- a/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter +++ b/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter @@ -861,6 +861,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1651,7 +1652,6 @@ endpoint 0 { callback attribute supportedLocales; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1786,7 +1786,6 @@ endpoint 1 { 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 = 2; @@ -1802,7 +1801,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -1825,7 +1823,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1839,7 +1836,6 @@ endpoint 1 { ram attribute targetState; 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/chef/devices/rootnode_watervalve_6bb39f1f67.zap b/examples/chef/devices/rootnode_watervalve_6bb39f1f67.zap index 6650dbe1d5..ba64c26fcf 100644 --- a/examples/chef/devices/rootnode_watervalve_6bb39f1f67.zap +++ b/examples/chef/devices/rootnode_watervalve_6bb39f1f67.zap @@ -2983,4 +2983,4 @@ "parentEndpointIdentifier": 0 } ] -} +} \ No newline at end of file diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index 62c95a2df6..0f1d25c571 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -837,6 +837,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/chef/sample_app_util/test_files/sample_zap_file.zap b/examples/chef/sample_app_util/test_files/sample_zap_file.zap index 7ad3cf5148..421ab3e37c 100644 --- a/examples/chef/sample_app_util/test_files/sample_zap_file.zap +++ b/examples/chef/sample_app_util/test_files/sample_zap_file.zap @@ -4522,7 +4522,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4554,7 +4554,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x01", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chip-tool/README.md b/examples/chip-tool/README.md index f702e202ac..b9d5f148df 100644 --- a/examples/chip-tool/README.md +++ b/examples/chip-tool/README.md @@ -599,4 +599,4 @@ Usage: To learn more about the tool, how to build it, use its commands and advanced features, read the following guide: -- [Working with the CHIP Tool](https://github.com/project-chip/connectedhomeip/tree/master/docs/guides/chip_tool_guide.md) +- [Working with the CHIP Tool](https://github.com/project-chip/connectedhomeip/tree/master/docs/development_controllers/chip-tool/chip_tool_guide.md) diff --git a/examples/chip-tool/commands/clusters/ComplexArgument.h b/examples/chip-tool/commands/clusters/ComplexArgument.h index 6f92256ff7..695af2f764 100644 --- a/examples/chip-tool/commands/clusters/ComplexArgument.h +++ b/examples/chip-tool/commands/clusters/ComplexArgument.h @@ -181,7 +181,12 @@ class ComplexArgumentParser // - 11 is the maximum length of a %d (-2147483648, 2147483647) // - 2 is the length for the "[" and "]" characters. snprintf(labelWithIndex, sizeof(labelWithIndex), "%.241s[%d]", label, i); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithIndex, content[i], value[i])); + auto error = ComplexArgumentParser::Setup(labelWithIndex, content[i], value[i]); + if (CHIP_NO_ERROR != error) + { + chip::Platform::MemoryFree(content); + return error; + } } request = chip::app::DataModel::List(content, value.size()); @@ -415,7 +420,14 @@ class TypedComplexArgument : public ComplexArgument return ComplexArgumentParser::Setup(label, *mRequest, value); } - void Reset() { *mRequest = T(); } + void Reset() + { + if (mRequest != nullptr) + { + ComplexArgumentParser::Finalize(*mRequest); + *mRequest = T(); + } + } private: T * mRequest; diff --git a/examples/chip-tool/commands/common/Commands.h b/examples/chip-tool/commands/common/Commands.h index e6a392cbee..e514e34321 100644 --- a/examples/chip-tool/commands/common/Commands.h +++ b/examples/chip-tool/commands/common/Commands.h @@ -29,7 +29,7 @@ class Commands { public: - using CommandsVector = ::std::vector>; + using CommandsVector = std::vector>; void RegisterCluster(const char * clusterName, commands_list commandsList) { diff --git a/examples/chip-tool/commands/delay/WaitForCommissioneeCommand.cpp b/examples/chip-tool/commands/delay/WaitForCommissioneeCommand.cpp index 486e9f1204..2634c78e99 100644 --- a/examples/chip-tool/commands/delay/WaitForCommissioneeCommand.cpp +++ b/examples/chip-tool/commands/delay/WaitForCommissioneeCommand.cpp @@ -23,7 +23,7 @@ using namespace chip; CHIP_ERROR WaitForCommissioneeCommand::RunCommand() { chip::FabricIndex fabricIndex = CurrentCommissioner().GetFabricIndex(); - ReturnErrorCodeIf(fabricIndex == chip::kUndefinedFabricIndex, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(fabricIndex != chip::kUndefinedFabricIndex, CHIP_ERROR_INCORRECT_STATE); if (mExpireExistingSession.ValueOr(true)) { diff --git a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py index 68effa7bb3..733672dc79 100644 --- a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py +++ b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py @@ -155,6 +155,7 @@ class Converter(): def __init__(self, specifications): self.__specs = specifications self.__converters = [ + DarwinAnyFormatConverter(), StructFieldsNameConverter(), FloatConverter(), OctetStringConverter() @@ -252,6 +253,43 @@ def maybe_convert(self, typename: str, value): return value +class DarwinAnyFormatConverter(BaseConverter): + """ + Darwin payloads format for *ById commands is different from the base + format used for other commands. + """ + + def run(self, specs, value, cluster_name: str, typename: str, array: bool): + if isinstance(value, list) and len(value) >= 1 and isinstance(value[0], dict) and value[0].get('data') is not None: + value = [self.__convert(item_value) for item_value in value] + return value + + def __convert(self, value): + if not isinstance(value, dict): + return value + + data = value.get('data') + if not isinstance(data, dict): + return value + + value = data.get('value') + if not isinstance(value, list): + return value + + value_type = data.get('type') + + if value_type == 'Structure': + struct = {} + for field in value: + context_tag = field.get('contextTag') + struct[str(context_tag)] = self.__convert(field) + value = struct + elif value_type == 'Array': + value = [self.__convert(item_value) for item_value in value] + + return value + + class FloatConverter(BaseConverter): """ Jsoncpp stores floats as double. @@ -348,7 +386,14 @@ def run(self, specs, value, cluster_name: str, typename: str, array: bool): del value[key_name] elif isinstance(value, list) and array: - value = [self.run(specs, v, cluster_name, typename, False) + # Instead of using `False` for the last parameter (array), `isinstance(v, list)` is used. + # While the data model specification does not include lists of lists, the format returned + # by the Matter.framework for *ById APIs may contain them. + # For example, the command: + # darwin-framework-tool any read-by-id 29 0 0x12344321 65535 + # returns value such as: + # [[{'DeviceType': 17, 'Revision': 1}, {'DeviceType': 22, 'Revision': 1}], ...] + value = [self.run(specs, v, cluster_name, typename, isinstance(v, list)) for v in value] return value 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 252d23c037..6b1bf1a6e0 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 @@ -510,7 +510,16 @@ def __get_alias(self, cluster_name: str, command_name: str = None, argument_name if aliases is None or aliases.get(argument_name) is None: return None - return aliases.get(argument_name) + value = aliases.get(argument_name) + + if cluster_name == '*' and self.__is_darwin_framework_tool: + if argument_name == 'AttributeId': + return 'attribute-id' + elif argument_name == 'ClusterId': + return 'cluster-id' + elif argument_name == 'Value': + return 'attribute-value' + return value def _supports_endpoint(self, request): return self._has_support(request, 'has_endpoint') diff --git a/examples/common/pigweed/protos/attributes_service.proto b/examples/common/pigweed/protos/attributes_service.proto index 927f10a8aa..ef34448f93 100644 --- a/examples/common/pigweed/protos/attributes_service.proto +++ b/examples/common/pigweed/protos/attributes_service.proto @@ -219,6 +219,7 @@ message AttributeData { int32 data_int8 = 6; int32 data_int16 = 7; int32 data_int32 = 8; + float data_single = 10; }; optional bytes tlv_data = 9; } diff --git a/examples/common/pigweed/protos/fabric_bridge_service.proto b/examples/common/pigweed/protos/fabric_bridge_service.proto index 4e01d4ec5c..f1312f22ea 100644 --- a/examples/common/pigweed/protos/fabric_bridge_service.proto +++ b/examples/common/pigweed/protos/fabric_bridge_service.proto @@ -34,9 +34,15 @@ message AdministratorCommissioningChanged { optional uint32 opener_vendor_id = 4; } +message ReachabilityChanged { + ScopedNode id = 1; + bool reachability = 2; +} + service FabricBridge { rpc AddSynchronizedDevice(SynchronizedDevice) returns (pw.protobuf.Empty){} rpc RemoveSynchronizedDevice(SynchronizedDevice) returns (pw.protobuf.Empty){} rpc ActiveChanged(KeepActiveChanged) returns (pw.protobuf.Empty){} rpc AdminCommissioningAttributeChanged(AdministratorCommissioningChanged) returns (pw.protobuf.Empty){} + rpc DeviceReachableChanged(ReachabilityChanged) returns (pw.protobuf.Empty){} } diff --git a/examples/common/pigweed/rpc_services/Attributes.h b/examples/common/pigweed/rpc_services/Attributes.h index e246c5361b..e4ced64a51 100644 --- a/examples/common/pigweed/rpc_services/Attributes.h +++ b/examples/common/pigweed/rpc_services/Attributes.h @@ -22,6 +22,7 @@ #include "pigweed/rpc_services/internal/StatusUtils.h" #include +#include #include #include #include @@ -32,6 +33,13 @@ #include #include +#if CHIP_CONFIG_USE_DATA_MODEL_INTERFACE +#include +#include +#include +#include +#endif + namespace chip { namespace rpc { @@ -70,6 +78,9 @@ class Attributes : public pw_rpc::nanopb::Attributes::Service case chip_rpc_AttributeData_data_bytes_tag: data = &request.data.data.data_bytes; break; + case chip_rpc_AttributeData_data_single_tag: + data = &request.data.data.data_single; + break; default: return pw::Status::InvalidArgument(); } @@ -125,6 +136,10 @@ class Attributes : public pw_rpc::nanopb::Attributes::Service PW_TRY(TlvBufferGetData(tlvBuffer, TLV::kTLVType_SignedInteger, response.data.data_int32)); response.which_data = chip_rpc_AttributeData_data_int32_tag; break; + case chip_rpc_AttributeType_ZCL_SINGLE_ATTRIBUTE_TYPE: + PW_TRY(TlvBufferGetData(tlvBuffer, TLV::kTLVType_FloatingPointNumber, response.data.data_single)); + response.which_data = chip_rpc_AttributeData_data_single_tag; + break; case chip_rpc_AttributeType_ZCL_BITMAP8_ATTRIBUTE_TYPE: case chip_rpc_AttributeType_ZCL_BITMAP16_ATTRIBUTE_TYPE: case chip_rpc_AttributeType_ZCL_BITMAP32_ATTRIBUTE_TYPE: @@ -140,7 +155,6 @@ class Attributes : public pw_rpc::nanopb::Attributes::Service case chip_rpc_AttributeType_ZCL_INT48S_ATTRIBUTE_TYPE: case chip_rpc_AttributeType_ZCL_INT56S_ATTRIBUTE_TYPE: case chip_rpc_AttributeType_ZCL_INT64S_ATTRIBUTE_TYPE: - case chip_rpc_AttributeType_ZCL_SINGLE_ATTRIBUTE_TYPE: case chip_rpc_AttributeType_ZCL_DOUBLE_ATTRIBUTE_TYPE: case chip_rpc_AttributeType_ZCL_OCTET_STRING_ATTRIBUTE_TYPE: case chip_rpc_AttributeType_ZCL_CHAR_STRING_ATTRIBUTE_TYPE: @@ -202,7 +216,37 @@ class Attributes : public pw_rpc::nanopb::Attributes::Service writer.Init(tlvBuffer); PW_TRY(ChipErrorToPwStatus(writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, outer))); PW_TRY(ChipErrorToPwStatus(attributeReports.Init(&writer, kReportContextTag))); + +#if CHIP_CONFIG_USE_DATA_MODEL_INTERFACE + // TODO: this assumes a singleton data model provider + app::DataModel::Provider * provider = app::InteractionModelEngine::GetInstance()->GetDataModelProvider(); + + app::DataModel::ReadAttributeRequest request; + request.path = path; + request.operationFlags.Set(app::DataModel::OperationFlags::kInternal); + request.subjectDescriptor = subjectDescriptor; + + std::optional info = provider->GetClusterInfo(path); + if (!info.has_value()) + { + return ::pw::Status::NotFound(); + } + + app::AttributeValueEncoder encoder(attributeReports, subjectDescriptor, path, info->dataVersion, + false /* isFabricFiltered */, nullptr /* attributeEncodingState */); + app::DataModel::ActionReturnStatus result = provider->ReadAttribute(request, encoder); + + if (!result.IsSuccess()) + { + app::DataModel::ActionReturnStatus::StringStorage storage; + ChipLogError(Support, "Failed to read data: %s", result.c_str(storage)); + return ::pw::Status::Internal(); + } + +#else PW_TRY(ChipErrorToPwStatus(app::ReadSingleClusterData(subjectDescriptor, false, path, attributeReports, nullptr))); +#endif + attributeReports.EndOfContainer(); PW_TRY(ChipErrorToPwStatus(writer.EndContainer(outer))); PW_TRY(ChipErrorToPwStatus(writer.Finalize())); diff --git a/examples/common/pigweed/rpc_services/FabricBridge.h b/examples/common/pigweed/rpc_services/FabricBridge.h index 9bd520278c..9a1dee017e 100644 --- a/examples/common/pigweed/rpc_services/FabricBridge.h +++ b/examples/common/pigweed/rpc_services/FabricBridge.h @@ -54,6 +54,11 @@ class FabricBridge : public pw_rpc::nanopb::FabricBridge::Service { return pw::Status::Unimplemented(); } + + virtual pw::Status DeviceReachableChanged(const chip_rpc_ReachabilityChanged & request, pw_protobuf_Empty & response) + { + return pw::Status::Unimplemented(); + } }; } // namespace rpc diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index 38c1707110..55820ca537 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -816,6 +816,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/contact-sensor-app/linux/README.md b/examples/contact-sensor-app/linux/README.md index e71ea89feb..ca5ca7b63a 100644 --- a/examples/contact-sensor-app/linux/README.md +++ b/examples/contact-sensor-app/linux/README.md @@ -7,7 +7,7 @@ document is tested on **Ubuntu for Raspberry Pi Server 20.04 LTS (aarch64)** and To cross-compile this example on an x64 host and run it on **NXP i.MX 8M Mini** **EVK**, see the associated -[README document](../../../docs/guides/nxp/nxp_imx8m_linux_examples.md) for +[README document](../../../docs/platforms/nxp/nxp_imx8m_linux_examples.md) for details.
diff --git a/examples/contact-sensor-app/nxp/README.md b/examples/contact-sensor-app/nxp/README.md index 20474bea76..803f067ce3 100644 --- a/examples/contact-sensor-app/nxp/README.md +++ b/examples/contact-sensor-app/nxp/README.md @@ -136,7 +136,7 @@ corresponding to data model target. Use `chip_with_factory_data=1` in the gn build command to enable factory data. For a full guide on manufacturing flow, please see -[Guide for writing manufacturing data on NXP devices](../../../docs/guides/nxp/nxp_manufacturing_flow.md). +[Guide for writing manufacturing data on NXP devices](../../../docs/platforms/nxp/nxp_manufacturing_flow.md). ### Long Idle Time ICD Support diff --git a/examples/contact-sensor-app/nxp/common/main.cpp b/examples/contact-sensor-app/nxp/common/main.cpp index d9672b5402..ee19392791 100644 --- a/examples/contact-sensor-app/nxp/common/main.cpp +++ b/examples/contact-sensor-app/nxp/common/main.cpp @@ -30,7 +30,7 @@ extern "C" void main_task(void const * argument) chip::NXP::App::GetAppTask().Start(); } #else -extern "C" int main(int argc, char * argv[]) +int main(int argc, char * argv[]) { chip::DeviceLayer::PlatformMgrImpl().HardwareInit(); chip::NXP::App::GetAppTask().Start(); diff --git a/examples/contact-sensor-app/nxp/k32w0/README.md b/examples/contact-sensor-app/nxp/k32w0/README.md index 305aa0b176..bc39009afc 100644 --- a/examples/contact-sensor-app/nxp/k32w0/README.md +++ b/examples/contact-sensor-app/nxp/k32w0/README.md @@ -351,7 +351,7 @@ Please use the following build args: ## Manufacturing data See -[Guide for writing manufacturing data on NXP devices](../../../../docs/guides/nxp/nxp_manufacturing_flow.md). +[Guide for writing manufacturing data on NXP devices](../../../../docs/platforms/nxp/nxp_manufacturing_flow.md). There are factory data generated binaries available in `third_party/nxp/nxp_matter_support/examples/platform/k32w0/scripts/demo_generated_factory_data` @@ -618,7 +618,7 @@ internal flash space can be found in the The steps for building the SSBL binary with appropriate configuration and writing to the board the binary and other OTA related configurations are described in the -[K32W0x1 OTA guide](../../../../docs/guides/nxp/nxp_k32w0_ota_guide.md). +[K32W0x1 OTA guide](../../../../docs/platforms/nxp/nxp_k32w0_ota_guide.md). Note that the application needs to be built using the `chip_enable_ota_requestor=true` option. This is enabled in the configuration by diff --git a/examples/contact-sensor-app/nxp/k32w0/args.gni b/examples/contact-sensor-app/nxp/k32w0/args.gni index 1709f1da73..f4b68ae740 100644 --- a/examples/contact-sensor-app/nxp/k32w0/args.gni +++ b/examples/contact-sensor-app/nxp/k32w0/args.gni @@ -28,7 +28,6 @@ chip_generate_link_map_file = true chip_enable_icd_server = true chip_enable_icd_lit = false -icd_enforce_sit_slow_poll_limit = true chip_persist_subscriptions = true chip_subscription_timeout_resumption = true diff --git a/examples/contact-sensor-app/nxp/k32w1/README.md b/examples/contact-sensor-app/nxp/k32w1/README.md index 5f47979e2d..20feba0c01 100644 --- a/examples/contact-sensor-app/nxp/k32w1/README.md +++ b/examples/contact-sensor-app/nxp/k32w1/README.md @@ -165,4 +165,4 @@ Run -> Debug Configurations... -> C/C++ Application ## OTA Please see -[k32w1 OTA guide](../../../../docs/guides/nxp/nxp_mcxw71_ota_guide.md). +[k32w1 OTA guide](../../../../docs/platforms/nxp/nxp_mcxw71_ota_guide.md). diff --git a/examples/contact-sensor-app/nxp/k32w1/args.gni b/examples/contact-sensor-app/nxp/k32w1/args.gni index 98372f4b82..e5654bdbc7 100644 --- a/examples/contact-sensor-app/nxp/k32w1/args.gni +++ b/examples/contact-sensor-app/nxp/k32w1/args.gni @@ -32,7 +32,6 @@ chip_with_lwip = false chip_enable_icd_server = true chip_enable_icd_lit = false chip_enable_icd_dsls = false -icd_enforce_sit_slow_poll_limit = true chip_persist_subscriptions = true chip_subscription_timeout_resumption = true diff --git a/examples/contact-sensor-app/nxp/mcxw71/README.md b/examples/contact-sensor-app/nxp/mcxw71/README.md index 50d33e10e1..d5b1927722 100644 --- a/examples/contact-sensor-app/nxp/mcxw71/README.md +++ b/examples/contact-sensor-app/nxp/mcxw71/README.md @@ -191,4 +191,4 @@ Run -> Debug Configurations... -> C/C++ Application ## OTA Please see -[mcxw71 OTA guide](../../../../docs/guides/nxp/nxp_mcxw71_ota_guide.md). +[mcxw71 OTA guide](../../../../docs/platforms/nxp/nxp_mcxw71_ota_guide.md). diff --git a/examples/contact-sensor-app/nxp/mcxw71/args.gni b/examples/contact-sensor-app/nxp/mcxw71/args.gni index 72634a2308..6e6015933d 100644 --- a/examples/contact-sensor-app/nxp/mcxw71/args.gni +++ b/examples/contact-sensor-app/nxp/mcxw71/args.gni @@ -30,7 +30,6 @@ chip_with_lwip = false chip_enable_icd_server = true chip_enable_icd_lit = false -icd_enforce_sit_slow_poll_limit = true chip_persist_subscriptions = true chip_subscription_timeout_resumption = true diff --git a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter index aeb4a47927..dd5f9ab061 100644 --- a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter +++ b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter @@ -739,6 +739,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1745,7 +1746,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision; @@ -1772,7 +1772,6 @@ endpoint 0 { callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -1800,7 +1799,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1826,7 +1824,6 @@ endpoint 0 { ram attribute threadVersion; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 2; @@ -1844,7 +1841,6 @@ endpoint 0 { server cluster DiagnosticLogs { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1862,7 +1858,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -1946,7 +1941,6 @@ endpoint 0 { callback attribute activeNetworkFaultsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x000F; ram attribute clusterRevision default = 2; @@ -2018,7 +2012,6 @@ endpoint 0 { callback attribute maximumCheckInBackOff; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x000F; ram attribute clusterRevision default = 3; @@ -2064,7 +2057,6 @@ endpoint 1 { ram attribute stateValue 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/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap index f2e73f974c..dfbd44ad6e 100644 --- a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap +++ b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap @@ -4315,4 +4315,4 @@ "parentEndpointIdentifier": null } ] -} +} \ No newline at end of file diff --git a/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter b/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter index bbf9333d9b..1cd10f3571 100644 --- a/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter +++ b/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter @@ -739,6 +739,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1745,7 +1746,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision; @@ -1772,7 +1772,6 @@ endpoint 0 { callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -1800,7 +1799,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1826,7 +1824,6 @@ endpoint 0 { ram attribute threadVersion; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 2; @@ -1844,7 +1841,6 @@ endpoint 0 { server cluster DiagnosticLogs { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1862,7 +1858,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -1946,7 +1941,6 @@ endpoint 0 { callback attribute activeNetworkFaultsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x000F; ram attribute clusterRevision default = 2; @@ -2011,7 +2005,6 @@ endpoint 0 { callback attribute activeModeThreshold; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0000; ram attribute clusterRevision default = 3; @@ -2051,7 +2044,6 @@ endpoint 1 { ram attribute stateValue 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/darwin-framework-tool/BUILD.gn b/examples/darwin-framework-tool/BUILD.gn index 665dccf484..0d1e142f10 100644 --- a/examples/darwin-framework-tool/BUILD.gn +++ b/examples/darwin-framework-tool/BUILD.gn @@ -43,6 +43,9 @@ declare_args() { # Disable generating compiler database by default generate_compilation_database = false + + # Enable automatic leak checks before the application exits + enable_leak_checking = false } sdk = "macosx" @@ -187,10 +190,16 @@ executable("darwin-framework-tool") { "commands/common/CHIPCommandBridge.mm", "commands/common/CHIPCommandStorageDelegate.mm", "commands/common/CHIPToolKeypair.mm", + "commands/common/CertificateIssuer.h", + "commands/common/CertificateIssuer.mm", + "commands/common/ControllerStorage.h", + "commands/common/ControllerStorage.mm", "commands/common/MTRDevice_Externs.h", "commands/common/MTRError.mm", "commands/common/MTRError_Utils.h", "commands/common/MTRLogging.h", + "commands/common/PreferencesStorage.h", + "commands/common/PreferencesStorage.mm", "commands/common/RemoteDataModelLogger.h", "commands/common/RemoteDataModelLogger.mm", "commands/configuration/Commands.h", @@ -206,6 +215,11 @@ executable("darwin-framework-tool") { "commands/discover/Commands.h", "commands/discover/DiscoverCommissionablesCommand.h", "commands/discover/DiscoverCommissionablesCommand.mm", + "commands/memory/Commands.h", + "commands/memory/DumpMemoryGraphCommand.h", + "commands/memory/DumpMemoryGraphCommand.mm", + "commands/memory/LeaksTool.h", + "commands/memory/LeaksTool.mm", "commands/pairing/Commands.h", "commands/pairing/DeviceControllerDelegateBridge.mm", "commands/pairing/GetCommissionerNodeIdCommand.h", @@ -219,6 +233,7 @@ executable("darwin-framework-tool") { "commands/provider/OTASoftwareUpdateInteractive.mm", "commands/storage/Commands.h", "commands/storage/StorageManagementCommand.mm", + "debug/LeakChecker.mm", "logging/logging.mm", "main.mm", ] @@ -280,6 +295,10 @@ executable("darwin-framework-tool") { defines += [ "MTR_ENABLE_PROVISIONAL=1" ] } + if (enable_leak_checking) { + defines += [ "DFT_ENABLE_LEAK_CHECKING=1" ] + } + public_configs = [ ":config" ] output_dir = root_out_dir diff --git a/examples/darwin-framework-tool/args.gni b/examples/darwin-framework-tool/args.gni index 6f0f1010a0..4af7d4a7d1 100644 --- a/examples/darwin-framework-tool/args.gni +++ b/examples/darwin-framework-tool/args.gni @@ -14,15 +14,4 @@ import("//build_overrides/chip.gni") -import("${chip_root}/config/standalone/args.gni") - -chip_crypto = "boringssl" - -chip_device_project_config_include = - "${chip_root}/examples/darwin-framework-tool/include/CHIPProjectAppConfig.h" -chip_project_config_include = - "${chip_root}/examples/darwin-framework-tool/include/CHIPProjectAppConfig.h" - -chip_project_config_include_dirs = - [ "${chip_root}/examples/darwin-framework-tool/include" ] -chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] +import("${chip_root}/config/darwin/args.gni") diff --git a/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h b/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h index 4512bf219a..50b9cfed5d 100644 --- a/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h +++ b/examples/darwin-framework-tool/commands/clusters/ClusterCommandBridge.h @@ -47,22 +47,8 @@ class ClusterCommand : public ModelCommand { CHIP_ERROR SendCommand(MTRBaseDevice * _Nonnull device, chip::EndpointId endpointId) override { - chip::TLV::TLVWriter writer; - chip::TLV::TLVReader reader; - - mData = static_cast(chip::Platform::MemoryCalloc(sizeof(uint8_t), mDataMaxLen)); - VerifyOrReturnError(mData != nullptr, CHIP_ERROR_NO_MEMORY); - - writer.Init(mData, mDataMaxLen); - - ReturnErrorOnFailure(mPayload.Encode(writer, chip::TLV::AnonymousTag())); - reader.Init(mData, writer.GetLengthWritten()); - ReturnErrorOnFailure(reader.Next()); - - id commandFields = NSObjectFromCHIPTLV(&reader); - if (commandFields == nil) { - return CHIP_ERROR_INTERNAL; - } + id commandFields; + ReturnErrorOnFailure(GetCommandFields(&commandFields)); return ClusterCommand::SendCommand(device, endpointId, mClusterId, mCommandId, commandFields); } @@ -73,10 +59,13 @@ class ClusterCommand : public ModelCommand { uint16_t __block responsesNeeded = repeatCount; dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); + __auto_type * endpoint = @(endpointId); + __auto_type * cluster = @(clusterId); + __auto_type * command = @(commandId); while (repeatCount--) { - [device invokeCommandWithEndpointID:[NSNumber numberWithUnsignedShort:endpointId] - clusterID:[NSNumber numberWithUnsignedInteger:clusterId] - commandID:[NSNumber numberWithUnsignedInteger:commandId] + [device invokeCommandWithEndpointID:endpoint + clusterID:cluster + commandID:command commandFields:commandFields timedInvokeTimeout:mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] @@ -88,6 +77,9 @@ class ClusterCommand : public ModelCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(endpoint, cluster, command, error); + } else { + RemoteDataModelLogger::LogCommandAsJSON(endpoint, cluster, command, values); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -130,6 +122,35 @@ class ClusterCommand : public ModelCommand { NSError * _Nullable mError = nil; private: + CHIP_ERROR GetCommandFields(id _Nonnull * _Nonnull outCommandFields) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVWriter writer; + chip::TLV::TLVReader reader; + + mData = static_cast(chip::Platform::MemoryCalloc(sizeof(uint8_t), mDataMaxLen)); + VerifyOrExit(mData != nullptr, err = CHIP_ERROR_NO_MEMORY); + + writer.Init(mData, mDataMaxLen); + + err = mPayload.Encode(writer, chip::TLV::AnonymousTag()); + SuccessOrExit(err); + + reader.Init(mData, writer.GetLengthWritten()); + err = reader.Next(); + SuccessOrExit(err); + + *outCommandFields = NSObjectFromCHIPTLV(&reader); + VerifyOrDo(nil != *outCommandFields, err = CHIP_ERROR_INTERNAL); + + exit: + if (nullptr != mData) { + chip::Platform::MemoryFree(mData); + mData = nullptr; + } + return err; + } + chip::ClusterId mClusterId; chip::CommandId mCommandId; diff --git a/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h b/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h index c0cbdab840..1a2612b7e3 100644 --- a/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h +++ b/examples/darwin-framework-tool/commands/clusters/ReportCommandBridge.h @@ -57,20 +57,26 @@ class ReadAttribute : public ModelCommand { if (mFabricFiltered.HasValue()) { params.filterByFabric = mFabricFiltered.Value(); } + + __auto_type * endpoint = @(endpointId); + __auto_type * cluster = @(mClusterId); + __auto_type * attribute = @(mAttributeId); [device - readAttributesWithEndpointID:[NSNumber numberWithUnsignedShort:endpointId] - clusterID:[NSNumber numberWithUnsignedInteger:mClusterId] - attributeID:[NSNumber numberWithUnsignedInteger:mAttributeId] + readAttributesWithEndpointID:endpoint + clusterID:cluster + attributeID:attribute params:params queue:callbackQueue completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { if (error != nil) { LogNSError("Error reading attribute", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(endpoint, cluster, attribute, error); } if (values) { for (id item in values) { NSLog(@"Response Item: %@", [item description]); } + RemoteDataModelLogger::LogAttributeAsJSON(endpoint, cluster, attribute, values); } SetCommandExitStatus(error); }]; @@ -137,16 +143,23 @@ class SubscribeAttribute : public ModelCommand { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [device subscribeToAttributesWithEndpointID:[NSNumber numberWithUnsignedShort:endpointId] - clusterID:[NSNumber numberWithUnsignedInteger:mClusterId] - attributeID:[NSNumber numberWithUnsignedInteger:mAttributeId] + __auto_type * endpoint = @(endpointId); + __auto_type * cluster = @(mClusterId); + __auto_type * attribute = @(mAttributeId); + [device subscribeToAttributesWithEndpointID:endpoint + clusterID:cluster + attributeID:attribute params:params queue:callbackQueue reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + if (error != nil) { + RemoteDataModelLogger::LogAttributeErrorAsJSON(endpoint, cluster, attribute, error); + } if (values) { for (id item in values) { NSLog(@"Response Item: %@", [item description]); } + RemoteDataModelLogger::LogAttributeAsJSON(endpoint, cluster, attribute, values); } SetCommandExitStatus(error); } diff --git a/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h b/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h index e771316adf..f274ea21aa 100644 --- a/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h +++ b/examples/darwin-framework-tool/commands/clusters/WriteAttributeCommandBridge.h @@ -49,23 +49,8 @@ class WriteAttribute : public ModelCommand { CHIP_ERROR SendCommand(MTRBaseDevice * _Nonnull device, chip::EndpointId endpointId) override { - chip::TLV::TLVWriter writer; - chip::TLV::TLVReader reader; - - mData = static_cast(chip::Platform::MemoryCalloc(sizeof(uint8_t), mDataMaxLen)); - VerifyOrReturnError(mData != nullptr, CHIP_ERROR_NO_MEMORY); - - writer.Init(mData, mDataMaxLen); - - ReturnErrorOnFailure(mAttributeValue.Encode(writer, chip::TLV::AnonymousTag())); - reader.Init(mData, writer.GetLengthWritten()); - ReturnErrorOnFailure(reader.Next()); - - id value = NSObjectFromCHIPTLV(&reader); - if (value == nil) { - return CHIP_ERROR_INTERNAL; - } - + id value; + ReturnErrorOnFailure(GetValue(&value)); return WriteAttribute::SendCommand(device, endpointId, mClusterId, mAttributeId, value); } @@ -74,10 +59,13 @@ class WriteAttribute : public ModelCommand { { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); + __auto_type * endpoint = @(endpointId); + __auto_type * cluster = @(mClusterId); + __auto_type * attribute = @(mAttributeId); [device - writeAttributeWithEndpointID:[NSNumber numberWithUnsignedShort:endpointId] - clusterID:[NSNumber numberWithUnsignedInteger:clusterId] - attributeID:[NSNumber numberWithUnsignedInteger:attributeId] + writeAttributeWithEndpointID:endpoint + clusterID:cluster + attributeID:attribute value:value timedWriteTimeout:mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] @@ -86,11 +74,13 @@ class WriteAttribute : public ModelCommand { completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { if (error != nil) { LogNSError("Error writing attribute", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(endpoint, cluster, attribute, error); } if (values) { for (id item in values) { NSLog(@"Response Item: %@", [item description]); } + RemoteDataModelLogger::LogAttributeAsJSON(endpoint, cluster, attribute, values); } SetCommandExitStatus(error); }]; @@ -117,6 +107,35 @@ class WriteAttribute : public ModelCommand { chip::Optional mDataVersion; private: + CHIP_ERROR GetValue(id _Nonnull * _Nonnull outValue) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVWriter writer; + chip::TLV::TLVReader reader; + + mData = static_cast(chip::Platform::MemoryCalloc(sizeof(uint8_t), mDataMaxLen)); + VerifyOrExit(mData != nullptr, err = CHIP_ERROR_NO_MEMORY); + + writer.Init(mData, mDataMaxLen); + + err = mAttributeValue.Encode(writer, chip::TLV::AnonymousTag()); + SuccessOrExit(err); + + reader.Init(mData, writer.GetLengthWritten()); + err = reader.Next(); + SuccessOrExit(err); + + *outValue = NSObjectFromCHIPTLV(&reader); + VerifyOrDo(nil != *outValue, err = CHIP_ERROR_INTERNAL); + + exit: + if (nullptr != mData) { + chip::Platform::MemoryFree(mData); + mData = nullptr; + } + return err; + } + chip::ClusterId mClusterId; chip::AttributeId mAttributeId; CHIP_ERROR mError = CHIP_NO_ERROR; diff --git a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.h b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.h index 9458d304db..f58251bff4 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.h +++ b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.h @@ -41,6 +41,8 @@ class CHIPCommandBridge : public Command { "Sets the commissioner node ID of the given " "commissioner-name. Interactive mode will only set a single commissioner on the inital command. " "The commissioner node ID will be persisted until a different one is specified."); + AddArgument("commissioner-shared-storage", 0, 1, &mCommissionerSharedStorage, + "Use a shared storage instance instead of individual storage for each commissioner. Default is true."); AddArgument("paa-trust-store-path", &mPaaTrustStorePath, "Path to directory holding PAA certificate information. Can be absolute or relative to the current working " "directory."); @@ -87,6 +89,7 @@ class CHIPCommandBridge : public Command { // This method returns the commissioner instance to be used for running the command. MTRDeviceController * CurrentCommissioner(); + NSNumber * CurrentCommissionerFabricId(); MTRDeviceController * GetCommissioner(const char * identity); @@ -130,6 +133,8 @@ class CHIPCommandBridge : public Command { void StopWaiting(); CHIP_ERROR MaybeSetUpStack(); + CHIP_ERROR SetUpStackWithSharedStorage(NSArray * productAttestationAuthorityCertificates); + CHIP_ERROR SetUpStackWithPerControllerStorage(NSArray * productAttestationAuthorityCertificates); void MaybeTearDownStack(); CHIP_ERROR GetPAACertsFromFolder(NSArray * __autoreleasing * paaCertsResult); @@ -140,6 +145,9 @@ class CHIPCommandBridge : public Command { // The current controller; the one the current command should be using. MTRDeviceController * mCurrentController; + static bool sUseSharedStorage; + chip::Optional mCommissionerSharedStorage; + std::condition_variable cvWaitingForResponse; std::mutex cvWaitingForResponseMutex; chip::Optional mCommissionerName; @@ -148,4 +156,5 @@ class CHIPCommandBridge : public Command { static dispatch_queue_t mOTAProviderCallbackQueue; chip::Optional mPaaTrustStorePath; chip::Optional mCommissionerVendorId; + std::string mCurrentIdentity; }; diff --git a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm index 8b9a5d3e9f..724a9a20c3 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm @@ -23,7 +23,11 @@ #include #include +#include // for chip::kTestControllerNodeId +#import "CHIPCommandStorageDelegate.h" +#import "CertificateIssuer.h" +#import "ControllerStorage.h" #include "MTRError_Utils.h" #include @@ -34,37 +38,45 @@ std::map CHIPCommandBridge::mControllers; dispatch_queue_t CHIPCommandBridge::mOTAProviderCallbackQueue; OTAProviderDelegate * CHIPCommandBridge::mOTADelegate; +bool CHIPCommandBridge::sUseSharedStorage = true; constexpr char kTrustStorePathVariable[] = "PAA_TRUST_STORE_PATH"; -CHIPToolKeypair * gNocSigner = [[CHIPToolKeypair alloc] init]; - CHIP_ERROR CHIPCommandBridge::Run() { - ChipLogProgress(chipTool, "Running Command"); - ReturnErrorOnFailure(MaybeSetUpStack()); - SetIdentity(mCommissionerName.HasValue() ? mCommissionerName.Value() : kIdentityAlpha); + // In interactive mode, we want to avoid memory accumulating in the main autorelease pool, + // so we clear it after each command. + @autoreleasepool { + ChipLogProgress(chipTool, "Running Command"); + // Although the body of `Run` is within its own autorelease pool, this code block is further wrapped + // in an additional autorelease pool. This ensures that when the memory dump graph command is used directly, + // we can verify there’s no additional noise from the autorelease pools—a kind of sanity check. + @autoreleasepool { + ReturnErrorOnFailure(MaybeSetUpStack()); + } + SetIdentity(mCommissionerName.HasValue() ? mCommissionerName.Value() : kIdentityAlpha); - { - std::lock_guard lk(cvWaitingForResponseMutex); - mWaitingForResponse = YES; - } + { + std::lock_guard lk(cvWaitingForResponseMutex); + mWaitingForResponse = YES; + } - ReturnLogErrorOnFailure(RunCommand()); + ReturnLogErrorOnFailure(RunCommand()); - auto err = StartWaiting(GetWaitDuration()); + auto err = StartWaiting(GetWaitDuration()); - bool deferCleanup = (IsInteractive() && DeferInteractiveCleanup()); + bool deferCleanup = (IsInteractive() && DeferInteractiveCleanup()); - Shutdown(); + Shutdown(); - if (deferCleanup) { - sDeferredCleanups.insert(this); - } else { - Cleanup(); - } - MaybeTearDownStack(); + if (deferCleanup) { + sDeferredCleanups.insert(this); + } else { + Cleanup(); + } + MaybeTearDownStack(); - return err; + return err; + } } CHIP_ERROR CHIPCommandBridge::GetPAACertsFromFolder(NSArray * __autoreleasing * paaCertsResult) @@ -111,61 +123,113 @@ CHIP_ERROR CHIPCommandBridge::MaybeSetUpStack() { - if (IsInteractive()) { - return CHIP_NO_ERROR; - } - NSData * ipk; - gNocSigner = [[CHIPToolKeypair alloc] init]; - storage = [[CHIPToolPersistentStorageDelegate alloc] init]; + VerifyOrReturnError(!IsInteractive(), CHIP_NO_ERROR); mOTADelegate = [[OTAProviderDelegate alloc] init]; + storage = [[CHIPToolPersistentStorageDelegate alloc] init]; - auto factory = [MTRDeviceControllerFactory sharedInstance]; - if (factory == nil) { - ChipLogError(chipTool, "Controller factory is nil"); - return CHIP_ERROR_INTERNAL; + NSError * error; + __auto_type * certificateIssuer = [CertificateIssuer sharedInstance]; + [certificateIssuer startWithStorage:storage error:&error]; + VerifyOrReturnError(nil == error, MTRErrorToCHIPErrorCode(error), ChipLogError(chipTool, "Can not start the certificate issuer: %@", error)); + + NSArray * productAttestationAuthorityCertificates = nil; + ReturnLogErrorOnFailure(GetPAACertsFromFolder(&productAttestationAuthorityCertificates)); + if ([productAttestationAuthorityCertificates count] == 0) { + productAttestationAuthorityCertificates = nil; } - auto params = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; - params.shouldStartServer = YES; - params.otaProviderDelegate = mOTADelegate; - NSArray * paaCertResults; - ReturnLogErrorOnFailure(GetPAACertsFromFolder(&paaCertResults)); - if ([paaCertResults count] > 0) { - params.productAttestationAuthorityCertificates = paaCertResults; + sUseSharedStorage = mCommissionerSharedStorage.ValueOr(true); + if (sUseSharedStorage) { + return SetUpStackWithSharedStorage(productAttestationAuthorityCertificates); } - NSError * error; - if ([factory startControllerFactory:params error:&error] == NO) { - ChipLogError(chipTool, "Controller factory startup failed"); - return MTRErrorToCHIPErrorCode(error); + return SetUpStackWithPerControllerStorage(productAttestationAuthorityCertificates); +} + +CHIP_ERROR CHIPCommandBridge::SetUpStackWithPerControllerStorage(NSArray * productAttestationAuthorityCertificates) +{ + __auto_type * certificateIssuer = [CertificateIssuer sharedInstance]; + + constexpr const char * identities[] = { kIdentityAlpha, kIdentityBeta, kIdentityGamma }; + std::string commissionerName = mCommissionerName.HasValue() ? mCommissionerName.Value() : kIdentityAlpha; + for (size_t i = 0; i < ArraySize(identities); ++i) { + __auto_type * uuidString = [NSString stringWithFormat:@"%@%@", @"8DCADB14-AF1F-45D0-B084-00000000000", @(i)]; + __auto_type * controllerId = [[NSUUID alloc] initWithUUIDString:uuidString]; + __auto_type * vendorId = @(mCommissionerVendorId.ValueOr(chip::VendorId::TestVendor1)); + __auto_type * fabricId = @(i + 1); + __auto_type * nodeId = @(chip::kTestControllerNodeId); + + if (commissionerName.compare(identities[i]) == 0 && mCommissionerNodeId.HasValue()) { + nodeId = @(mCommissionerNodeId.Value()); + } + + __auto_type * controllerStorage = [[ControllerStorage alloc] initWithControllerID:controllerId]; + + NSError * error; + __auto_type * operationalKeypair = [certificateIssuer issueOperationalKeypairWithControllerStorage:controllerStorage error:&error]; + __auto_type * operational = [certificateIssuer issueOperationalCertificateForNodeID:nodeId + fabricID:fabricId + publicKey:operationalKeypair.publicKey + error:&error]; + VerifyOrReturnError(nil == error, MTRErrorToCHIPErrorCode(error), ChipLogError(chipTool, "Can not issue an operational certificate: %@", error)); + + __auto_type * controllerStorageQueue = dispatch_queue_create("com.chip.storage", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); + __auto_type * params = [[MTRDeviceControllerExternalCertificateParameters alloc] initWithStorageDelegate:controllerStorage + storageDelegateQueue:controllerStorageQueue + uniqueIdentifier:controllerId + ipk:certificateIssuer.ipk + vendorID:vendorId + operationalKeypair:operationalKeypair + operationalCertificate:operational + intermediateCertificate:nil + rootCertificate:certificateIssuer.rootCertificate]; + [params setOperationalCertificateIssuer:certificateIssuer queue:controllerStorageQueue]; + params.productAttestationAuthorityCertificates = productAttestationAuthorityCertificates; + + __auto_type * controller = [[MTRDeviceController alloc] initWithParameters:params error:&error]; + VerifyOrReturnError(nil != controller, MTRErrorToCHIPErrorCode(error), ChipLogError(chipTool, "Controller startup failure: %@", error)); + mControllers[identities[i]] = controller; } - ReturnLogErrorOnFailure([gNocSigner createOrLoadKeys:storage]); + return CHIP_NO_ERROR; +} + +CHIP_ERROR CHIPCommandBridge::SetUpStackWithSharedStorage(NSArray * productAttestationAuthorityCertificates) +{ + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + VerifyOrReturnError(nil != factory, CHIP_ERROR_INTERNAL, ChipLogError(chipTool, "Controller factory is nil")); + + auto factoryParams = [[MTRDeviceControllerFactoryParams alloc] initWithStorage:storage]; + factoryParams.shouldStartServer = YES; + factoryParams.otaProviderDelegate = mOTADelegate; + factoryParams.productAttestationAuthorityCertificates = productAttestationAuthorityCertificates; - ipk = [gNocSigner getIPK]; + NSError * error; + auto started = [factory startControllerFactory:factoryParams error:&error]; + VerifyOrReturnError(started, MTRErrorToCHIPErrorCode(error), ChipLogError(chipTool, "Controller factory startup failed")); + + __auto_type * certificateIssuer = [CertificateIssuer sharedInstance]; constexpr const char * identities[] = { kIdentityAlpha, kIdentityBeta, kIdentityGamma }; std::string commissionerName = mCommissionerName.HasValue() ? mCommissionerName.Value() : kIdentityAlpha; for (size_t i = 0; i < ArraySize(identities); ++i) { - auto controllerParams = [[MTRDeviceControllerStartupParams alloc] initWithIPK:ipk fabricID:@(i + 1) nocSigner:gNocSigner]; - + __auto_type * fabricId = @(i + 1); + __auto_type * params = [[MTRDeviceControllerStartupParams alloc] initWithIPK:certificateIssuer.ipk + fabricID:fabricId + nocSigner:certificateIssuer.signingKey]; if (commissionerName.compare(identities[i]) == 0 && mCommissionerNodeId.HasValue()) { - controllerParams.nodeId = @(mCommissionerNodeId.Value()); + params.nodeId = @(mCommissionerNodeId.Value()); } - // We're not sure whether we're creating a new fabric or using an - // existing one, so just try both. - auto controller = [factory createControllerOnExistingFabric:controllerParams error:&error]; + + // We're not sure whether we're creating a new fabric or using an existing one, so just try both. + auto controller = [factory createControllerOnExistingFabric:params error:&error]; if (controller == nil) { // Maybe we didn't have this fabric yet. - controllerParams.vendorID = @(mCommissionerVendorId.ValueOr(chip::VendorId::TestVendor1)); - controller = [factory createControllerOnNewFabric:controllerParams error:&error]; + params.vendorID = @(mCommissionerVendorId.ValueOr(chip::VendorId::TestVendor1)); + controller = [factory createControllerOnNewFabric:params error:&error]; } - if (controller == nil) { - ChipLogError(chipTool, "Controller startup failure."); - return MTRErrorToCHIPErrorCode(error); - } - + VerifyOrReturnError(nil != controller, MTRErrorToCHIPErrorCode(error), ChipLogError(chipTool, "Controller startup failure: %@", error)); mControllers[identities[i]] = controller; } @@ -188,11 +252,29 @@ kIdentityBeta, kIdentityGamma); chipDie(); } + mCurrentIdentity = name; mCurrentController = mControllers[name]; } MTRDeviceController * CHIPCommandBridge::CurrentCommissioner() { return mCurrentController; } +NSNumber * CHIPCommandBridge::CurrentCommissionerFabricId() +{ + if (mCurrentIdentity.compare(kIdentityAlpha) == 0) { + return @(1); + } else if (mCurrentIdentity.compare(kIdentityBeta) == 0) { + return @(2); + } else if (mCurrentIdentity.compare(kIdentityGamma) == 0) { + return @(3); + } else { + ChipLogError(chipTool, "Unknown commissioner name: %s. Supported names are [%s, %s, %s]", mCurrentIdentity.c_str(), kIdentityAlpha, + kIdentityBeta, kIdentityGamma); + chipDie(); + } + + return @(0); // This should never happens. +} + MTRDeviceController * CHIPCommandBridge::GetCommissioner(const char * identity) { return mControllers[identity]; } MTRBaseDevice * CHIPCommandBridge::BaseDeviceWithNodeId(chip::NodeId nodeId) @@ -214,15 +296,25 @@ { StopCommissioners(); - auto factory = [MTRDeviceControllerFactory sharedInstance]; - NSData * ipk = [gNocSigner getIPK]; + if (sUseSharedStorage) { + auto factory = [MTRDeviceControllerFactory sharedInstance]; - constexpr const char * identities[] = { kIdentityAlpha, kIdentityBeta, kIdentityGamma }; - for (size_t i = 0; i < ArraySize(identities); ++i) { - auto controllerParams = [[MTRDeviceControllerStartupParams alloc] initWithIPK:ipk fabricID:@(i + 1) nocSigner:gNocSigner]; + constexpr const char * identities[] = { kIdentityAlpha, kIdentityBeta, kIdentityGamma }; + for (size_t i = 0; i < ArraySize(identities); ++i) { + __auto_type * certificateIssuer = [CertificateIssuer sharedInstance]; + auto controllerParams = [[MTRDeviceControllerStartupParams alloc] initWithIPK:certificateIssuer.ipk fabricID:@(i + 1) nocSigner:certificateIssuer.signingKey]; - auto controller = [factory createControllerOnExistingFabric:controllerParams error:nil]; - mControllers[identities[i]] = controller; + auto controller = [factory createControllerOnExistingFabric:controllerParams error:nil]; + mControllers[identities[i]] = controller; + } + } else { + NSArray * productAttestationAuthorityCertificates = nil; + ReturnOnFailure(GetPAACertsFromFolder(&productAttestationAuthorityCertificates)); + if ([productAttestationAuthorityCertificates count] == 0) { + productAttestationAuthorityCertificates = nil; + } + + ReturnOnFailure(SetUpStackWithPerControllerStorage(productAttestationAuthorityCertificates)); } } diff --git a/examples/darwin-framework-tool/commands/common/CHIPCommandStorageDelegate.h b/examples/darwin-framework-tool/commands/common/CHIPCommandStorageDelegate.h index d5f743d576..1da1b6b105 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPCommandStorageDelegate.h +++ b/examples/darwin-framework-tool/commands/common/CHIPCommandStorageDelegate.h @@ -1,8 +1,28 @@ +/* + * Copyright (c) 2024 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 #import NS_ASSUME_NONNULL_BEGIN +extern NSString * const kDarwinFrameworkToolCertificatesDomain; + @interface CHIPToolPersistentStorageDelegate : NSObject - (nullable NSData *)storageDataForKey:(NSString *)key; - (BOOL)setStorageData:(NSData *)value forKey:(NSString *)key; diff --git a/examples/darwin-framework-tool/commands/common/CHIPCommandStorageDelegate.mm b/examples/darwin-framework-tool/commands/common/CHIPCommandStorageDelegate.mm index 7cbdce8500..3ec3dda55e 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPCommandStorageDelegate.mm +++ b/examples/darwin-framework-tool/commands/common/CHIPCommandStorageDelegate.mm @@ -1,89 +1,70 @@ +/* + * Copyright (c) 2024 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 "CHIPCommandStorageDelegate.h" #import -#define LOG_DEBUG_PERSISTENT_STORAGE_DELEGATE 0 - -NSString * const kCHIPToolDefaultsDomain = @"com.apple.chiptool"; +#import "PreferencesStorage.h" -id MTRGetDomainValueForKey(NSString * domain, NSString * key) -{ - id value = (id) CFBridgingRelease(CFPreferencesCopyAppValue((CFStringRef) key, (CFStringRef) domain)); - if (value) { - return value; - } - return nil; -} +NSString * const kDarwinFrameworkToolCertificatesDomain = @"com.apple.chiptool"; -BOOL MTRSetDomainValueForKey(NSString * domain, NSString * key, id value) -{ - CFPreferencesSetAppValue((CFStringRef) key, (__bridge CFPropertyListRef _Nullable)(value), (CFStringRef) domain); - return CFPreferencesAppSynchronize((CFStringRef) domain) == true; -} +@interface CHIPToolPersistentStorageDelegate () +@property (nonatomic, readonly) PreferencesStorage * storage; +@end -BOOL MTRRemoveDomainValueForKey(NSString * domain, NSString * key) -{ - CFPreferencesSetAppValue((CFStringRef) key, nullptr, (CFStringRef) domain); - return CFPreferencesAppSynchronize((CFStringRef) domain) == true; -} +@implementation CHIPToolPersistentStorageDelegate -id CHIPGetDomainKeyList(NSString * domain) +- (instancetype)init { - id value - = (id) CFBridgingRelease(CFPreferencesCopyKeyList((CFStringRef) domain, kCFPreferencesCurrentUser, kCFPreferencesAnyHost)); - if (value) { - return value; + if (!(self = [super init])) { + return nil; } - return nil; -} -BOOL CHIPClearAllDomain(NSString * domain) -{ - - NSArray * allKeys = CHIPGetDomainKeyList(domain); -#if LOG_DEBUG_PERSISTENT_STORAGE_DELEGATE - NSLog(@"Removing keys: %@ %@", allKeys, domain); -#endif - for (id key in allKeys) { -#if LOG_DEBUG_PERSISTENT_STORAGE_DELEGATE - NSLog(@"Removing key: %@", key); -#endif - if (!MTRRemoveDomainValueForKey(domain, (NSString *) key)) { - return NO; - } - } - return YES; + _storage = [[PreferencesStorage alloc] initWithDomain:kDarwinFrameworkToolCertificatesDomain]; + return self; } -@implementation CHIPToolPersistentStorageDelegate - - (BOOL)deleteAllStorage { - return CHIPClearAllDomain(kCHIPToolDefaultsDomain); + return [_storage reset]; } // MARK: CHIPPersistentStorageDelegate - (nullable NSData *)storageDataForKey:(NSString *)key { - NSData * value = MTRGetDomainValueForKey(kCHIPToolDefaultsDomain, key); -#if LOG_DEBUG_PERSISTENT_STORAGE_DELEGATE - NSLog(@"CHIPPersistentStorageDelegate Get Value for Key: %@, value %@", key, value); -#endif - return value; + return _storage[key]; } - (BOOL)setStorageData:(NSData *)value forKey:(NSString *)key { - return MTRSetDomainValueForKey(kCHIPToolDefaultsDomain, key, value); + _storage[key] = value; + return YES; } - (BOOL)removeStorageDataForKey:(NSString *)key { - if (MTRGetDomainValueForKey(kCHIPToolDefaultsDomain, key) == nil) { + if (_storage[key] == nil) { return NO; } - return MTRRemoveDomainValueForKey(kCHIPToolDefaultsDomain, key); + _storage[key] = nil; + return YES; } @end diff --git a/examples/darwin-framework-tool/commands/common/CHIPToolKeypair.h b/examples/darwin-framework-tool/commands/common/CHIPToolKeypair.h index a58d2e8e70..f0ee3f8db6 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPToolKeypair.h +++ b/examples/darwin-framework-tool/commands/common/CHIPToolKeypair.h @@ -1,4 +1,21 @@ -#include "CHIPCommandStorageDelegate.h" +/* + * Copyright (c) 2024 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 #include @@ -8,7 +25,7 @@ - (SecKeyRef)publicKey; - (CHIP_ERROR)Serialize:(chip::Crypto::P256SerializedKeypair &)output; - (CHIP_ERROR)Deserialize:(chip::Crypto::P256SerializedKeypair &)input; -- (CHIP_ERROR)createOrLoadKeys:(CHIPToolPersistentStorageDelegate *)storage; +- (CHIP_ERROR)createOrLoadKeys:(id)storage; - (NSData *)getIPK; @end diff --git a/examples/darwin-framework-tool/commands/common/CHIPToolKeypair.mm b/examples/darwin-framework-tool/commands/common/CHIPToolKeypair.mm index 4d6f53de9a..ce0ef5819b 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPToolKeypair.mm +++ b/examples/darwin-framework-tool/commands/common/CHIPToolKeypair.mm @@ -1,3 +1,21 @@ +/* + * Copyright (c) 2024 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 "CHIPToolKeypair.h" #import #include @@ -5,6 +23,9 @@ #include #include +#import "CHIPCommandStorageDelegate.h" +#import "ControllerStorage.h" + #define CHIPPlugin_CAKeyTag "com.apple.matter.commissioner.ca.issuer.id" #define Public_KeySize "256" @@ -76,12 +97,10 @@ - (NSData *)getIPK return _ipk; } -- (CHIP_ERROR)createOrLoadKeys:(CHIPToolPersistentStorageDelegate *)storage +- (CHIP_ERROR)createOrLoadKeys:(id)storage { chip::ASN1::ASN1UniversalTime effectiveTime; chip::Crypto::P256SerializedKeypair serializedKey; - NSData * value; - CHIP_ERROR err = CHIP_NO_ERROR; // Initializing the default start validity to start of 2021. The default validity duration is 10 years. CHIP_ZERO_AT(effectiveTime); @@ -90,8 +109,8 @@ - (CHIP_ERROR)createOrLoadKeys:(CHIPToolPersistentStorageDelegate *)storage effectiveTime.Day = 1; ReturnErrorOnFailure(chip::Credentials::ASN1ToChipEpochTime(effectiveTime, _mNow)); - value = [storage storageDataForKey:kOperationalCredentialsIssuerKeypairStorage]; - err = [self initSerializedKeyFromValue:value serializedKey:serializedKey]; + __auto_type * value = [self _getValueForKeyWithStorage:storage key:kOperationalCredentialsIssuerKeypairStorage]; + __auto_type err = [self initSerializedKeyFromValue:value serializedKey:serializedKey]; if (err != CHIP_NO_ERROR) { // Storage doesn't have an existing keypair. Let's create one and add it to the storage. @@ -101,12 +120,12 @@ - (CHIP_ERROR)createOrLoadKeys:(CHIPToolPersistentStorageDelegate *)storage ReturnErrorOnFailure([self Serialize:serializedKey]); NSData * valueData = [NSData dataWithBytes:serializedKey.Bytes() length:serializedKey.Length()]; - [storage setStorageData:valueData forKey:kOperationalCredentialsIssuerKeypairStorage]; + [self _setValueForKeyWithStorage:storage key:kOperationalCredentialsIssuerKeypairStorage value:valueData]; } else { ReturnErrorOnFailure([self Deserialize:serializedKey]); } - NSData * ipk = [storage storageDataForKey:kOperationalCredentialsIPK]; + NSData * ipk = [self _getValueForKeyWithStorage:storage key:kOperationalCredentialsIPK]; if (ipk == nil) { err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; } @@ -116,7 +135,7 @@ - (CHIP_ERROR)createOrLoadKeys:(CHIPToolPersistentStorageDelegate *)storage ReturnLogErrorOnFailure(chip::Crypto::DRBG_get_bytes(tempIPK, sizeof(tempIPK))); _ipk = [NSData dataWithBytes:tempIPK length:sizeof(tempIPK)]; - [storage setStorageData:_ipk forKey:kOperationalCredentialsIPK]; + [self _setValueForKeyWithStorage:storage key:kOperationalCredentialsIPK value:_ipk]; } else { _ipk = ipk; } @@ -124,6 +143,25 @@ - (CHIP_ERROR)createOrLoadKeys:(CHIPToolPersistentStorageDelegate *)storage return CHIP_NO_ERROR; } +- (NSData *)_getValueForKeyWithStorage:(id)storage key:(NSString *)key +{ + if ([storage isKindOfClass:[CHIPToolPersistentStorageDelegate class]]) { + return [storage storageDataForKey:key]; + } else if ([storage isKindOfClass:[ControllerStorage class]]) { + return [storage valueForKey:key]; + } + return nil; +} + +- (void)_setValueForKeyWithStorage:(id)storage key:(NSString *)key value:(NSData *)value +{ + if ([storage isKindOfClass:[CHIPToolPersistentStorageDelegate class]]) { + [storage setStorageData:value forKey:key]; + } else if ([storage isKindOfClass:[ControllerStorage class]]) { + [storage storeValue:value forKey:key]; + } +} + - (CHIP_ERROR)initSerializedKeyFromValue:(NSData *)value serializedKey:(chip::Crypto::P256SerializedKeypair &)serializedKey { if (value == nil) { diff --git a/examples/darwin-framework-tool/commands/common/CertificateIssuer.h b/examples/darwin-framework-tool/commands/common/CertificateIssuer.h new file mode 100644 index 0000000000..0034f28be2 --- /dev/null +++ b/examples/darwin-framework-tool/commands/common/CertificateIssuer.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2024 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 + +#import "ControllerStorage.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface CertificateIssuer : NSObject +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + ++ (CertificateIssuer *)sharedInstance; + +- (void)startWithStorage:(id)storage + error:(NSError * _Nullable __autoreleasing * _Nonnull)error; + +- (id)issueOperationalKeypairWithControllerStorage:(ControllerStorage *)storage error:(NSError * _Nullable __autoreleasing * _Nonnull)error; + +- (MTRCertificateDERBytes _Nullable)issueOperationalCertificateForNodeID:(NSNumber *)nodeID + fabricID:(NSNumber *)fabricID + publicKey:(SecKeyRef)publicKey + error:(NSError * _Nullable __autoreleasing * _Nonnull)error; + +@property (nonatomic, readonly) MTRCertificateDERBytes rootCertificate; +@property (nonatomic, readonly) id signingKey; +@property (nonatomic, readonly) NSData * ipk; + +@property (nonatomic, nullable) NSNumber * fabricID; +@property (nonatomic, nullable) NSNumber * nextNodeID; +@property (nonatomic, readonly) BOOL shouldSkipAttestationCertificateValidation; + +@end + +NS_ASSUME_NONNULL_END diff --git a/examples/darwin-framework-tool/commands/common/CertificateIssuer.mm b/examples/darwin-framework-tool/commands/common/CertificateIssuer.mm new file mode 100644 index 0000000000..bd12878c6a --- /dev/null +++ b/examples/darwin-framework-tool/commands/common/CertificateIssuer.mm @@ -0,0 +1,158 @@ +/* + * Copyright (c) 2024 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 "CertificateIssuer.h" +#import "CHIPToolKeypair.h" + +#include + +@interface CertificateIssuer () +- (MTRCertificateDERBytes _Nullable)issueOperationalCertificateForNodeID:(NSNumber *)nodeID + fabricID:(NSNumber *)fabricID + publicKey:(SecKeyRef)publicKey + error:(NSError * _Nullable __autoreleasing * _Nonnull)error; +@end + +@implementation CertificateIssuer + ++ (CertificateIssuer *)sharedInstance +{ + static CertificateIssuer * certificateIssuer = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + certificateIssuer = [[CertificateIssuer alloc] init]; + }); + return certificateIssuer; +} + +- (instancetype)init +{ + if (!(self = [super init])) { + return nil; + } + + _rootCertificate = nil; + _ipk = nil; + _signingKey = nil; + _fabricID = nil; + _nextNodeID = nil; + _shouldSkipAttestationCertificateValidation = NO; + + return self; +} + +- (void)startWithStorage:(id)storage + error:(NSError * _Nullable __autoreleasing * _Nonnull)error +{ + __auto_type * signingKey = [[CHIPToolKeypair alloc] init]; + + __auto_type err = [signingKey createOrLoadKeys:storage]; + if (CHIP_NO_ERROR != err) { + *error = [NSError errorWithDomain:@"Error" code:0 userInfo:@{ @"reason" : @"Error creating or loading keys" }]; + return; + } + + __auto_type * rootCertificate = [MTRCertificates createRootCertificate:signingKey issuerID:nil fabricID:nil error:error]; + if (nil == rootCertificate) { + *error = [NSError errorWithDomain:@"Error" code:0 userInfo:@{ @"reason" : @"Error creating root certificate" }]; + return; + } + + _rootCertificate = rootCertificate; + _signingKey = signingKey; + _ipk = [signingKey getIPK]; +} + +- (id)issueOperationalKeypairWithControllerStorage:(ControllerStorage *)storage error:(NSError * _Nullable __autoreleasing * _Nonnull)error +{ + __auto_type * keypair = [[CHIPToolKeypair alloc] init]; + + __auto_type err = [keypair createOrLoadKeys:storage]; + if (CHIP_NO_ERROR != err) { + *error = [NSError errorWithDomain:@"Error" code:0 userInfo:@{ @"reason" : @"Error creating or loading keys" }]; + return nil; + } + + return keypair; +} + +- (void)issueOperationalCertificateForRequest:(MTROperationalCSRInfo *)csrInfo + attestationInfo:(MTRDeviceAttestationInfo *)attestationInfo + controller:(MTRDeviceController *)controller + completion:(void (^)(MTROperationalCertificateChain * _Nullable info, + NSError * _Nullable error))completion +{ + NSError * error = nil; + + if (self.nextNodeID == nil) { + error = [NSError errorWithDomain:@"Error" code:0 userInfo:@{ @"reason" : @"nextNodeID is nil" }]; + completion(nil, error); + return; + } + + __auto_type * csr = csrInfo.csr; + __auto_type * rawPublicKey = [MTRCertificates publicKeyFromCSR:csr error:&error]; + if (error != nil) { + completion(nil, error); + return; + } + + NSDictionary * attributes = @{ + (__bridge NSString *) kSecAttrKeyType : (__bridge NSString *) kSecAttrKeyTypeECSECPrimeRandom, + (__bridge NSString *) kSecAttrKeyClass : (__bridge NSString *) kSecAttrKeyClassPublic + }; + CFErrorRef keyCreationError = NULL; + SecKeyRef publicKey + = SecKeyCreateWithData((__bridge CFDataRef) rawPublicKey, (__bridge CFDictionaryRef) attributes, &keyCreationError); + + __auto_type * operationalCert = [self issueOperationalCertificateForNodeID:self.nextNodeID + fabricID:self.fabricID + publicKey:publicKey + error:&error]; + + // Release no-longer-needed key before we do anything else. + CFRelease(publicKey); + + if (error != nil) { + completion(nil, error); + return; + } + + __auto_type * certChain = [[MTROperationalCertificateChain alloc] initWithOperationalCertificate:operationalCert + intermediateCertificate:nil + rootCertificate:self.rootCertificate + adminSubject:nil]; + completion(certChain, nil); +} + +- (MTRCertificateDERBytes _Nullable)issueOperationalCertificateForNodeID:(NSNumber *)nodeID + fabricID:(NSNumber *)fabricID + publicKey:(SecKeyRef)publicKey + error:(NSError * _Nullable __autoreleasing * _Nonnull)error +{ + __auto_type * operationalCert = [MTRCertificates createOperationalCertificate:self.signingKey + signingCertificate:self.rootCertificate + operationalPublicKey:publicKey + fabricID:fabricID + nodeID:nodeID + caseAuthenticatedTags:nil + error:error]; + return operationalCert; +} + +@end diff --git a/examples/darwin-framework-tool/commands/common/ControllerStorage.h b/examples/darwin-framework-tool/commands/common/ControllerStorage.h new file mode 100644 index 0000000000..f70081fee0 --- /dev/null +++ b/examples/darwin-framework-tool/commands/common/ControllerStorage.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2024 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 + +NS_ASSUME_NONNULL_BEGIN + +extern NSString * const kDarwinFrameworkToolControllerDomain; + +@interface ControllerStorage : NSObject +- (instancetype)initWithControllerID:(NSUUID *)controllerID; +@property (nonatomic, readonly) NSUUID * controllerID; + +- (nullable id)controller:(MTRDeviceController *)controller + valueForKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType; +- (BOOL)controller:(MTRDeviceController *)controller + storeValue:(id)value + forKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType; +- (BOOL)controller:(MTRDeviceController *)controller + removeValueForKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType; +- (NSDictionary> *)valuesForController:(MTRDeviceController *)controller securityLevel:(MTRStorageSecurityLevel)securityLevel sharingType:(MTRStorageSharingType)sharingType; +- (BOOL)controller:(MTRDeviceController *)controller storeValues:(NSDictionary> *)values securityLevel:(MTRStorageSecurityLevel)securityLevel sharingType:(MTRStorageSharingType)sharingType; + +- (NSData *)valueForKey:(NSString *)key; +- (void)storeValue:(NSData *)value forKey:key; +@end + +NS_ASSUME_NONNULL_END diff --git a/examples/darwin-framework-tool/commands/common/ControllerStorage.mm b/examples/darwin-framework-tool/commands/common/ControllerStorage.mm new file mode 100644 index 0000000000..058f00a6b3 --- /dev/null +++ b/examples/darwin-framework-tool/commands/common/ControllerStorage.mm @@ -0,0 +1,160 @@ +/* + * Copyright (c) 2024 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 "ControllerStorage.h" +#import "PreferencesStorage.h" + +#include + +NSString * const kDarwinFrameworkToolControllerDomain = @"com.apple.darwin-framework-tool.controller"; + +@interface ControllerStorage () +@property (nonatomic, readonly) PreferencesStorage * storage; +@property (nonatomic, readonly) NSString * keyScopingPrefix; + +- (NSString *)_keyToControllerScopedKey:(NSString *)key; +- (NSString *)_controllerScopedKeyToKey:(NSString *)controllerKey; +- (BOOL)_isControllerScopedKey:(NSString *)controllerKey; +@end + +@implementation ControllerStorage +- (instancetype)initWithControllerID:(NSUUID *)controllerID +{ + if (!(self = [super init])) { + return nil; + } + + _storage = [[PreferencesStorage alloc] initWithDomain:kDarwinFrameworkToolControllerDomain]; + _controllerID = controllerID; + _keyScopingPrefix = [NSString stringWithFormat:@"%@/", [_controllerID UUIDString]]; + return self; +} + +- (nullable id)controller:(MTRDeviceController *)controller + valueForKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType +{ +#ifdef LOG_DEBUG_CONTROLLER_STORAGE + ChipLogError(chipTool, "Controller(%@) Storage - Get value for %@", controller, key); +#endif // LOG_DEBUG_CONTROLLER_STORAGE + + __auto_type * controllerKey = [self _keyToControllerScopedKey:key]; + __auto_type * data = self.storage[controllerKey]; + if (data == nil) { + return data; + } + + NSError * error; + id value = [NSKeyedUnarchiver unarchivedObjectOfClasses:MTRDeviceControllerStorageClasses() fromData:data error:&error]; + return value; +} + +- (BOOL)controller:(MTRDeviceController *)controller + storeValue:(id)value + forKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType +{ +#ifdef LOG_DEBUG_CONTROLLER_STORAGE + ChipLogError(chipTool, "Controller(%@) Storage - Set value for %@", controller, key); +#endif // LOG_DEBUG_CONTROLLER_STORAGE + NSError * error; + NSData * data = [NSKeyedArchiver archivedDataWithRootObject:value requiringSecureCoding:YES error:&error]; + + __auto_type * controllerKey = [self _keyToControllerScopedKey:key]; + self.storage[controllerKey] = data; + return YES; +} + +- (BOOL)controller:(MTRDeviceController *)controller + removeValueForKey:(NSString *)key + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType +{ +#ifdef LOG_DEBUG_CONTROLLER_STORAGE + ChipLogError(chipTool, "Controller(%@) Storage - Remove value for %@", controller, key); +#endif // LOG_DEBUG_CONTROLLER_STORAGE + + __auto_type * controllerKey = [self _keyToControllerScopedKey:key]; + self.storage[controllerKey] = nil; + return YES; +} + +- (NSDictionary> *)valuesForController:(MTRDeviceController *)controller securityLevel:(MTRStorageSecurityLevel)securityLevel sharingType:(MTRStorageSharingType)sharingType +{ +#ifdef LOG_DEBUG_CONTROLLER_STORAGE + ChipLogError(chipTool, "Controller(%@) Storage - Get all values", controller); +#endif // LOG_DEBUG_CONTROLLER_STORAGE + + NSMutableDictionary * valuesToReturn = [NSMutableDictionary dictionary]; + for (NSString * controllerKey in self.storage) { + if (![self _isControllerScopedKey:controllerKey]) { + continue; + } + __auto_type * key = [self _controllerScopedKeyToKey:controllerKey]; + valuesToReturn[key] = [self controller:controller valueForKey:key securityLevel:securityLevel sharingType:sharingType]; + } + + if (!valuesToReturn.count) { + return nil; + } + + return valuesToReturn; +} + +- (BOOL)controller:(MTRDeviceController *)controller storeValues:(NSDictionary> *)values securityLevel:(MTRStorageSecurityLevel)securityLevel sharingType:(MTRStorageSharingType)sharingType +{ +#ifdef LOG_DEBUG_CONTROLLER_STORAGE + ChipLogError(chipTool, "Controller(%@) Storage - store values", controller); +#endif // LOG_DEBUG_CONTROLLER_STORAGE + + for (NSString * key in values) { + [self controller:controller storeValue:values[key] forKey:key securityLevel:securityLevel sharingType:sharingType]; + } + + return YES; +} + +- (NSData *)valueForKey:(NSString *)key +{ + __auto_type * controllerKey = [self _keyToControllerScopedKey:key]; + return self.storage[controllerKey]; +} + +- (void)storeValue:(NSData *)value forKey:key +{ + __auto_type * controllerKey = [self _keyToControllerScopedKey:key]; + self.storage[controllerKey] = value; +} + +- (NSString *)_keyToControllerScopedKey:(NSString *)key +{ + return [NSString stringWithFormat:@"%@%@", _keyScopingPrefix, key]; +} + +- (NSString *)_controllerScopedKeyToKey:(NSString *)controllerKey +{ + return [controllerKey substringFromIndex:_keyScopingPrefix.length]; +} + +- (BOOL)_isControllerScopedKey:(NSString *)controllerKey +{ + return [controllerKey hasPrefix:_keyScopingPrefix]; +} +@end diff --git a/examples/darwin-framework-tool/commands/common/PreferencesStorage.h b/examples/darwin-framework-tool/commands/common/PreferencesStorage.h new file mode 100644 index 0000000000..85c1203276 --- /dev/null +++ b/examples/darwin-framework-tool/commands/common/PreferencesStorage.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2024 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 + +@interface PreferencesStorage : NSObject + +@property (nonatomic, strong) NSString * domain; + +- (instancetype)initWithDomain:(NSString *)domain; +- (NSData *)objectForKeyedSubscript:(NSString *)key; +- (void)setObject:(id)obj forKeyedSubscript:(NSString *)key; +- (NSArray *)allKeys; +- (bool)reset; +- (void)print; + +@end diff --git a/examples/darwin-framework-tool/commands/common/PreferencesStorage.mm b/examples/darwin-framework-tool/commands/common/PreferencesStorage.mm new file mode 100644 index 0000000000..e7ddba1313 --- /dev/null +++ b/examples/darwin-framework-tool/commands/common/PreferencesStorage.mm @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2024 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 "PreferencesStorage.h" + +@implementation PreferencesStorage +- (instancetype)initWithDomain:(NSString *)domain +{ + self = [super init]; + if (self) { + _domain = domain; + } + + return self; +} + +- (NSData *)objectForKeyedSubscript:(NSString *)key +{ + __auto_type domainRef = (__bridge CFStringRef) self.domain; + __auto_type keyRef = (__bridge CFStringRef) key; + __auto_type value = CFPreferencesCopyAppValue(keyRef, domainRef); + if (value) { + id obj = (__bridge_transfer id) value; + return obj; + } + return nil; +} + +- (void)setObject:(id)obj forKeyedSubscript:(NSString *)key +{ + __auto_type domainRef = (__bridge CFStringRef) self.domain; + __auto_type keyRef = (__bridge CFStringRef) key; + __auto_type value = (__bridge CFPropertyListRef) obj; + + CFPreferencesSetAppValue(keyRef, value, domainRef); + CFPreferencesAppSynchronize(domainRef); +} + +- (NSArray *)allKeys +{ + __auto_type domainRef = (__bridge CFStringRef) self.domain; + __auto_type keys = CFPreferencesCopyKeyList(domainRef, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); + + if (!keys) { + return @[]; + } + + return (__bridge_transfer NSArray *) keys; +} + +- (bool)reset +{ + __auto_type * keys = [self allKeys]; + __auto_type domainRef = (__bridge CFStringRef) self.domain; + + for (NSString * key in keys) { + __auto_type keyRef = (__bridge CFStringRef) key; + CFPreferencesSetAppValue(keyRef, NULL, domainRef); + } + + return CFPreferencesAppSynchronize(domainRef); +} + +- (void)print +{ + NSLog(@"%@:", self.domain); + NSArray * keys = [self allKeys]; + for (NSString * key in keys) { + __auto_type * data = [self objectForKeyedSubscript:key]; + NSLog(@" * %@: %@", key, data); + } +} + +#pragma mark - NSFastEnumeration + +- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id _Nullable __unsafe_unretained[])buffer count:(NSUInteger)len +{ + __auto_type * keys = [self allKeys]; + if (state->state >= keys.count) { + return 0; + } + + state->itemsPtr = buffer; + state->mutationsPtr = &state->extra[0]; + + NSUInteger count = 0; + while (state->state < keys.count && count < len) { + buffer[count] = keys[state->state]; + state->state++; + count++; + } + return count; +} + +@end diff --git a/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.mm b/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.mm index ff12cdc022..50d446b780 100644 --- a/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.mm +++ b/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.mm @@ -27,6 +27,8 @@ #include +constexpr char kAttributePathKey[] = "attributePath"; +constexpr char kCommandPathKey[] = "commandPath"; constexpr char kClusterIdKey[] = "clusterId"; constexpr char kEndpointIdKey[] = "endpointId"; constexpr char kAttributeIdKey[] = "attributeId"; @@ -142,8 +144,45 @@ CHIP_ERROR LogAttributeAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNum Json::Value jsonValue; VerifyOrDie(CHIP_NO_ERROR == AsJsonValue(result, jsonValue)); - value[kValueKey] = jsonValue; + // When using the *-by-id commands, the return format is always encapsulated + // within an array. If the attribute itself is an empty array, the result will + // appear as follows: + // + //[ + // { + // attributePath = ""; + // data = { + // type = Array; + // value = ( + // ); + // }; + // } + //] + bool hasData = false; + if (jsonValue.isArray() && !jsonValue.empty()) { + for (Json::ArrayIndex i = 0; i < jsonValue.size(); i++) { + if (jsonValue[i].isObject()) { + if (jsonValue[i].isMember(kAttributePathKey)) { + jsonValue[i].removeMember(kAttributePathKey); + } + + if (!jsonValue[i].empty()) { + hasData = true; + } + } else { + hasData = true; + } + } + } else { + hasData = true; + } + + if (!hasData) { + return CHIP_NO_ERROR; + } + + value[kValueKey] = jsonValue; auto valueStr = JsonToString(value); return gDelegate->LogJSON(valueStr.c_str()); } @@ -159,8 +198,31 @@ CHIP_ERROR LogCommandAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumbe Json::Value jsonValue; VerifyOrDie(CHIP_NO_ERROR == AsJsonValue(result, jsonValue)); - value[kValueKey] = jsonValue; + bool hasData = false; + if (jsonValue.isArray()) { + for (Json::ArrayIndex i = 0; i < jsonValue.size(); i++) { + if (jsonValue[i].isObject()) { + if (jsonValue[i].isMember(kCommandPathKey)) { + jsonValue[i].removeMember(kCommandPathKey); + } + + if (!jsonValue[i].empty()) { + hasData = true; + } + } else { + hasData = true; + } + } + } else { + hasData = true; + } + + if (!hasData) { + return CHIP_NO_ERROR; + } + + value[kValueKey] = jsonValue; auto valueStr = JsonToString(value); return gDelegate->LogJSON(valueStr.c_str()); } diff --git a/examples/darwin-framework-tool/commands/memory/Commands.h b/examples/darwin-framework-tool/commands/memory/Commands.h new file mode 100644 index 0000000000..d58d62db1c --- /dev/null +++ b/examples/darwin-framework-tool/commands/memory/Commands.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2024 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 "commands/common/Commands.h" +#include "commands/memory/DumpMemoryGraphCommand.h" + +void registerCommandsMemory(Commands & commands) +{ + const char * clusterName = "memory"; + commands_list clusterCommands = { + make_unique(), + }; + + commands.RegisterCommandSet(clusterName, clusterCommands, "Commands for inspecting program memory."); +} diff --git a/examples/darwin-framework-tool/commands/memory/DumpMemoryGraphCommand.h b/examples/darwin-framework-tool/commands/memory/DumpMemoryGraphCommand.h new file mode 100644 index 0000000000..a4eedfe617 --- /dev/null +++ b/examples/darwin-framework-tool/commands/memory/DumpMemoryGraphCommand.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2024 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 "../common/CHIPCommandBridge.h" + +#include + +/** + * This command dump the memory graph of the program. + */ + +class DumpMemoryGraphCommand : public CHIPCommandBridge +{ +public: + DumpMemoryGraphCommand() : CHIPCommandBridge("dump-graph") + { + AddArgument("filepath", &mFilePath, + "An optional filepath to save the memory graph to. Defaults to 'darwin-framework-tool.memgraph"); + } + + /////////// CHIPCommandBridge Interface ///////// + CHIP_ERROR RunCommand() override; + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Milliseconds32(0); } + +private: + chip::Optional mFilePath; +}; diff --git a/examples/darwin-framework-tool/commands/memory/DumpMemoryGraphCommand.mm b/examples/darwin-framework-tool/commands/memory/DumpMemoryGraphCommand.mm new file mode 100644 index 0000000000..15bb462f4c --- /dev/null +++ b/examples/darwin-framework-tool/commands/memory/DumpMemoryGraphCommand.mm @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2024 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 "DumpMemoryGraphCommand.h" + +#include "LeaksTool.h" + +CHIP_ERROR DumpMemoryGraphCommand::RunCommand() +{ + auto err = DumpMemoryGraph(mFilePath); + SetCommandExitStatus(err); + return err; +} diff --git a/examples/darwin-framework-tool/commands/memory/LeaksTool.h b/examples/darwin-framework-tool/commands/memory/LeaksTool.h new file mode 100644 index 0000000000..101b437932 --- /dev/null +++ b/examples/darwin-framework-tool/commands/memory/LeaksTool.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2024 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 + +CHIP_ERROR DumpMemoryGraph(chip::Optional filePath); +CHIP_ERROR PrintPools(); diff --git a/examples/darwin-framework-tool/commands/memory/LeaksTool.mm b/examples/darwin-framework-tool/commands/memory/LeaksTool.mm new file mode 100644 index 0000000000..394a9083f5 --- /dev/null +++ b/examples/darwin-framework-tool/commands/memory/LeaksTool.mm @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2024 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 "LeaksTool.h" + +#import +#include // For getpid() + +constexpr const char * kDefaultOutputGraphPath = "darwin-framework-tool.memgraph"; + +@interface LeaksTool : NSObject +- (BOOL)runWithArguments:(NSArray * _Nullable)arguments; +@end + +@implementation LeaksTool + +- (BOOL)runWithArguments:(NSArray * _Nullable)arguments +{ +#if TARGET_OS_OSX + pid_t pid = getpid(); + __auto_type * pidString = [NSString stringWithFormat:@"%d", pid]; + + __auto_type * task = [[NSTask alloc] init]; + task.launchPath = @"/usr/bin/leaks"; + task.arguments = @[ pidString ]; + if (arguments) { + task.arguments = [task.arguments arrayByAddingObjectsFromArray:arguments]; + } + + __auto_type * pipe = [NSPipe pipe]; + task.standardOutput = pipe; + task.standardError = pipe; + + __auto_type * fileHandle = [pipe fileHandleForReading]; + [task launch]; + [task waitUntilExit]; + + int exitCode = [task terminationStatus]; + if (exitCode != EXIT_SUCCESS) { + return NO; + } + + __auto_type * data = [fileHandle readDataToEndOfFile]; + __auto_type * output = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + NSLog(@"%@", output); + + return YES; +#else + NSLog(@"Running leaks as a task is supported on this platform."); + return NO; +#endif // TARGET_OS_OSX +} + +@end + +CHIP_ERROR DumpMemoryGraph(chip::Optional filePath) +{ + NSMutableString * outputGraphArgument = [NSMutableString stringWithFormat:@"--outputGraph=%s", kDefaultOutputGraphPath]; + if (filePath.HasValue()) { + outputGraphArgument = [NSMutableString stringWithFormat:@"--outputGraph=%s", filePath.Value()]; + } + + __auto_type * leaksTool = [[LeaksTool alloc] init]; + if (![leaksTool runWithArguments:@[ outputGraphArgument ]]) { + return CHIP_ERROR_INTERNAL; + } + + return CHIP_NO_ERROR; +} diff --git a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm index 1a060819b5..3ec4aee9e2 100644 --- a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm @@ -19,6 +19,7 @@ #import #include "../common/CHIPCommandBridge.h" +#include "../common/CertificateIssuer.h" #include "DeviceControllerDelegateBridge.h" #include "PairingCommandBridge.h" #include @@ -52,6 +53,12 @@ - (void)deviceAttestationCompletedForController:(MTRDeviceController *)controlle [deviceControllerDelegate setCommandBridge:this]; [deviceControllerDelegate setDeviceID:mNodeId]; + // With per-controller storage, the certificate issuer creates the operational certificate. + // When using shared storage, this step is a no-op. + auto * certificateIssuer = [CertificateIssuer sharedInstance]; + certificateIssuer.nextNodeID = @(mNodeId); + certificateIssuer.fabricID = CurrentCommissionerFabricId(); + if (mCommissioningType != CommissioningType::None) { MTRCommissioningParameters * params = [[MTRCommissioningParameters alloc] init]; switch (mCommissioningType) { diff --git a/examples/darwin-framework-tool/commands/storage/Commands.h b/examples/darwin-framework-tool/commands/storage/Commands.h index 65534272b8..983fb22f46 100644 --- a/examples/darwin-framework-tool/commands/storage/Commands.h +++ b/examples/darwin-framework-tool/commands/storage/Commands.h @@ -25,7 +25,10 @@ void registerCommandsStorage(Commands & commands) { const char * clusterName = "storage"; - commands_list clusterCommands = { make_unique() }; + commands_list clusterCommands = { + make_unique(), // + make_unique(), // + }; commands.RegisterCommandSet(clusterName, clusterCommands, "Commands for managing persistent data stored by darwin-framework-tool."); diff --git a/examples/darwin-framework-tool/commands/storage/StorageManagementCommand.h b/examples/darwin-framework-tool/commands/storage/StorageManagementCommand.h index c2abddf18d..8c3ed69184 100644 --- a/examples/darwin-framework-tool/commands/storage/StorageManagementCommand.h +++ b/examples/darwin-framework-tool/commands/storage/StorageManagementCommand.h @@ -29,3 +29,11 @@ class StorageClearAll : public Command CHIP_ERROR Run() override; }; + +class StorageViewAll : public Command +{ +public: + StorageViewAll() : Command("view-all") {} + + CHIP_ERROR Run() override; +}; diff --git a/examples/darwin-framework-tool/commands/storage/StorageManagementCommand.mm b/examples/darwin-framework-tool/commands/storage/StorageManagementCommand.mm index e0c1b18ec8..007d2821bd 100644 --- a/examples/darwin-framework-tool/commands/storage/StorageManagementCommand.mm +++ b/examples/darwin-framework-tool/commands/storage/StorageManagementCommand.mm @@ -17,18 +17,43 @@ */ #include "../common/CHIPCommandStorageDelegate.h" +#include "../common/ControllerStorage.h" +#include "../common/PreferencesStorage.h" #include "StorageManagementCommand.h" #import -static CHIPToolPersistentStorageDelegate * storage = nil; +namespace { +NSArray * GetDomains() +{ + __auto_type * domains = @[ + kDarwinFrameworkToolCertificatesDomain, + kDarwinFrameworkToolControllerDomain + ]; + + return domains; +} +} CHIP_ERROR StorageClearAll::Run() { - storage = [[CHIPToolPersistentStorageDelegate alloc] init]; - if (![storage deleteAllStorage]) { - return CHIP_ERROR_INTERNAL; + __auto_type * domains = GetDomains(); + for (NSString * domain in domains) { + __auto_type * storage = [[PreferencesStorage alloc] initWithDomain:domain]; + VerifyOrReturnError([storage reset], CHIP_ERROR_INTERNAL); } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR StorageViewAll::Run() +{ + __auto_type * domains = GetDomains(); + for (NSString * domain in domains) { + __auto_type * storage = [[PreferencesStorage alloc] initWithDomain:domain]; + [storage print]; + } + return CHIP_NO_ERROR; } diff --git a/examples/darwin-framework-tool/debug/LeakChecker.h b/examples/darwin-framework-tool/debug/LeakChecker.h new file mode 100644 index 0000000000..c83ed64910 --- /dev/null +++ b/examples/darwin-framework-tool/debug/LeakChecker.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2024 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 + +/* + * This function performs a memory leak check if the build flag `enable_leak_checking` is set to true + * If leaks are detected, it overrides the provided exit code with `EXIT_FAILURE`. + * + * @param exitCode The initial exit code to return if no leaks are detected or if leak checking is disabled. + * @return `EXIT_FAILURE` if leaks are detected and leak checking is enabled; otherwise, the original `exitCode`. + */ +int ConditionalLeaksCheck(int exitCode); diff --git a/examples/darwin-framework-tool/debug/LeakChecker.mm b/examples/darwin-framework-tool/debug/LeakChecker.mm new file mode 100644 index 0000000000..e8d69739c5 --- /dev/null +++ b/examples/darwin-framework-tool/debug/LeakChecker.mm @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2024 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 "LeakChecker.h" + +#import +#include // For getpid() + +@interface LeakChecker : NSObject +- (BOOL)hasMemoryLeaks; +@end + +@implementation LeakChecker + +- (BOOL)hasMemoryLeaks +{ +#if TARGET_OS_OSX + pid_t pid = getpid(); + auto * pidString = [NSString stringWithFormat:@"%d", pid]; + + auto * task = [[NSTask alloc] init]; + task.launchPath = @"/usr/bin/leaks"; + task.arguments = @[ pidString ]; + + auto * pipe = [NSPipe pipe]; + task.standardOutput = pipe; + task.standardError = pipe; + + NSFileHandle * fileHandle = [pipe fileHandleForReading]; + [task launch]; + [task waitUntilExit]; + + int exitCode = [task terminationStatus]; + if (exitCode) { + NSData * data = [fileHandle readDataToEndOfFile]; + NSString * output = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + NSLog(@"%@", output); + return YES; + } +#else + NSLog(@"Running leaks as a task is supported on this platform."); +#endif // TARGET_OS_OSX + + return NO; +} + +@end + +int ConditionalLeaksCheck(int exitCode) +{ +#ifdef DFT_ENABLE_LEAK_CHECKING + @autoreleasepool { + auto * leakChecker = [[LeakChecker alloc] init]; + if ([leakChecker hasMemoryLeaks]) { + return EXIT_FAILURE; + } + } +#endif // DFT_ENABLE_LEAK_CHECKING + + return exitCode; +} diff --git a/examples/darwin-framework-tool/main.mm b/examples/darwin-framework-tool/main.mm index 5f31cb6abf..e0c6e94224 100644 --- a/examples/darwin-framework-tool/main.mm +++ b/examples/darwin-framework-tool/main.mm @@ -18,6 +18,7 @@ #import +#import "debug/LeakChecker.h" #import "logging/logging.h" #include "commands/bdx/Commands.h" @@ -26,6 +27,7 @@ #include "commands/delay/Commands.h" #include "commands/discover/Commands.h" #include "commands/interactive/Commands.h" +#include "commands/memory/Commands.h" #include "commands/pairing/Commands.h" #include "commands/payload/Commands.h" #include "commands/provider/Commands.h" @@ -35,6 +37,7 @@ int main(int argc, const char * argv[]) { + int exitCode = EXIT_SUCCESS; @autoreleasepool { dft::logging::Setup(); @@ -44,11 +47,13 @@ int main(int argc, const char * argv[]) registerCommandsDelay(commands); registerCommandsDiscover(commands); registerCommandsInteractive(commands); + registerCommandsMemory(commands); registerCommandsPayload(commands); registerClusterOtaSoftwareUpdateProviderInteractive(commands); registerCommandsStorage(commands); registerCommandsConfiguration(commands); registerClusters(commands); - return commands.Run(argc, (char **) argv); + exitCode = commands.Run(argc, (char **) argv); } + return ConditionalLeaksCheck(exitCode); } diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index d71eb6e367..6ee107a38f 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -709,6 +709,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/dishwasher-app/linux/README.md b/examples/dishwasher-app/linux/README.md index 6b84961709..29432d43e8 100644 --- a/examples/dishwasher-app/linux/README.md +++ b/examples/dishwasher-app/linux/README.md @@ -7,7 +7,7 @@ for Raspberry Pi Desktop 20.10 (aarch64)** To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini** **EVK**, see the associated -[README document](../../../docs/guides/nxp/nxp_imx8m_linux_examples.md) for +[README document](../../../docs/platforms/nxp/nxp_imx8m_linux_examples.md) for details.
diff --git a/examples/dishwasher-app/silabs/.gn b/examples/dishwasher-app/silabs/.gn new file mode 100644 index 0000000000..b05216fc9d --- /dev/null +++ b/examples/dishwasher-app/silabs/.gn @@ -0,0 +1,29 @@ +# 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/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 = { + target_cpu = "arm" + target_os = "freertos" + chip_openthread_ftd = true + + import("//openthread.gni") +} diff --git a/examples/dishwasher-app/silabs/BUILD.gn b/examples/dishwasher-app/silabs/BUILD.gn new file mode 100644 index 0000000000..d024a5da95 --- /dev/null +++ b/examples/dishwasher-app/silabs/BUILD.gn @@ -0,0 +1,255 @@ +# 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/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/efr32_sdk.gni") +import("//build_overrides/pigweed.gni") + +import("${build_root}/config/defaults.gni") +import("${efr32_sdk_build_root}/silabs_executable.gni") + +import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") +import("${chip_root}/src/platform/device.gni") +import("${chip_root}/third_party/silabs/silabs_board.gni") + +if (chip_enable_pw_rpc) { + import("//build_overrides/pigweed.gni") + import("$dir_pw_build/target_types.gni") +} + +assert(current_os == "freertos") + +silabs_project_dir = "${chip_root}/examples/dishwasher-app/silabs" +examples_common_plat_dir = "${chip_root}/examples/platform/silabs" +example_enegy_management_dir = "${chip_root}/examples/energy-management-app" + +if (wifi_soc) { + import("${chip_root}/third_party/silabs/SiWx917_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917" +} else { + import("${efr32_sdk_build_root}/efr32_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32" +} + +import("${examples_common_plat_dir}/args.gni") + +declare_args() { + # Dump memory usage at link time. + 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}", + rebase_path(slc_gen_path), + ], + "list lines")) +} + +if (wifi_soc) { + siwx917_sdk("sdk") { + sources = [ + "${examples_common_plat_dir}/FreeRTOSConfig.h", + "${silabs_project_dir}/include/CHIPProjectConfig.h", + ] + + include_dirs = [ + "${chip_root}/src/platform/silabs/SiWx917", + "${silabs_project_dir}/include", + "${examples_plat_dir}", + "${chip_root}/src/lib", + "${examples_common_plat_dir}", + ] + + defines = [] + if (chip_enable_pw_rpc) { + defines += [ + "HAL_VCOM_ENABLE=1", + "PW_RPC_ENABLED", + ] + } + } +} else { + efr32_sdk("sdk") { + sources = [ + "${examples_common_plat_dir}/FreeRTOSConfig.h", + "${silabs_project_dir}/include/CHIPProjectConfig.h", + ] + + include_dirs = [ + "${chip_root}/src/platform/silabs/efr32", + "${silabs_project_dir}/include", + "${examples_plat_dir}", + "${chip_root}/src/lib", + "${examples_common_plat_dir}", + ] + + if (use_wf200) { + # TODO efr32_sdk should not need a header from this location + include_dirs += [ "${examples_plat_dir}/wf200" ] + } + + if (chip_enable_ble_rs911x) { + # TODO efr32_sdk should not need a header from this location + include_dirs += [ + "${examples_plat_dir}/rs911x", + "${examples_plat_dir}/rs911x/hal", + ] + } + + defines = [] + if (chip_enable_pw_rpc) { + defines += [ + "HAL_VCOM_ENABLE=1", + "PW_RPC_ENABLED", + ] + } + } +} +silabs_executable("dishwasher_app") { + output_name = "matter-silabs-dishwasher-example.out" + defines = [] + include_dirs = [ + "include", + "${example_enegy_management_dir}/energy-management-common/device-energy-management/include", + "${example_enegy_management_dir}/energy-management-common/energy-reporting/include", + "${example_enegy_management_dir}/energy-management-common/common/include", + ] + + if (silabs_board == "BRD2704A") { + defines += [ "SL_STATUS_LED=0" ] + } + + sources = [ + "${example_enegy_management_dir}/energy-management-common/common/src/EnergyTimeUtils.cpp", + "${example_enegy_management_dir}/energy-management-common/device-energy-management/src/DEMTestEventTriggers.cpp", + "${example_enegy_management_dir}/energy-management-common/device-energy-management/src/DeviceEnergyManagementDelegateImpl.cpp", + "${example_enegy_management_dir}/energy-management-common/device-energy-management/src/DeviceEnergyManagementManager.cpp", + "${example_enegy_management_dir}/energy-management-common/device-energy-management/src/device-energy-management-mode.cpp", + "${example_enegy_management_dir}/energy-management-common/energy-reporting/src/ElectricalPowerMeasurementDelegate.cpp", + "${example_enegy_management_dir}/energy-management-common/energy-reporting/src/EnergyReportingEventTriggers.cpp", + "${example_enegy_management_dir}/energy-management-common/energy-reporting/src/FakeReadings.cpp", + "${example_enegy_management_dir}/energy-management-common/energy-reporting/src/PowerTopologyDelegate.cpp", + "${examples_common_plat_dir}/main.cpp", + "src/AppTask.cpp", + "src/DataModelHelper.cpp", + "src/DeviceEnergyManager.cpp", + "src/DishwasherManager.cpp", + "src/ElectricalEnergyMeasurementInstance.cpp", + "src/ElectricalSensorManager.cpp", + "src/PowerTopologyDelegateImpl.cpp", + "src/ZclCallbacks.cpp", + "src/operational-state-delegate-impl.cpp", + ] + + deps = [ + ":sdk", + "${chip_root}/src/platform/logging:default", + app_data_model, + ] + + if (wifi_soc) { + deps += [ "${examples_plat_dir}:siwx917-common" ] + } else { + deps += [ "${examples_plat_dir}:efr32-common" ] + } + + if (chip_enable_pw_rpc) { + defines += [ + "PW_RPC_ENABLED", + "PW_RPC_ATTRIBUTE_SERVICE=1", + "PW_RPC_BUTTON_SERVICE=1", + "PW_RPC_DESCRIPTOR_SERVICE=1", + "PW_RPC_DEVICE_SERVICE=1", + "PW_RPC_OTCLI_SERVICE=1", + "PW_RPC_THREAD_SERVICE=1", + "PW_RPC_TRACING_SERVICE=1", + ] + + sources += [ + "${chip_root}/examples/common/pigweed/RpcService.cpp", + "${chip_root}/examples/common/pigweed/efr32/PigweedLoggerMutex.cpp", + "${examples_common_plat_dir}/PigweedLogger.cpp", + "${examples_common_plat_dir}/Rpc.cpp", + ] + + deps += [ + "$dir_pw_hdlc:default_addresses", + "$dir_pw_hdlc:rpc_channel_output", + "$dir_pw_stream:sys_io_stream", + "$dir_pw_trace", + "$dir_pw_trace_tokenized", + "$dir_pw_trace_tokenized:trace_rpc_service", + "${chip_root}/config/efr32/lib/pw_rpc:pw_rpc", + "${chip_root}/examples/common/pigweed:attributes_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:button_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:descriptor_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:ot_cli_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:thread_service.nanopb_rpc", + ] + + if (wifi_soc) { + deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ] + } else { + deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ] + } + + deps += pw_build_LINK_DEPS + + include_dirs += [ + "${chip_root}/examples/common", + "${chip_root}/examples/common/pigweed/efr32", + ] + } + + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" + + inputs = [ ldscript ] + + ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ] + + if (chip_print_memory_usage) { + ldflags += [ + "-Wl,--print-memory-usage", + "-fstack-usage", + ] + } + + # WiFi Settings + if (chip_enable_wifi) { + ldflags += [ + "-Wl,--defsym", + "-Wl,SILABS_WIFI=1", + ] + } + + output_dir = root_out_dir +} + +group("silabs") { + deps = [ ":dishwasher_app" ] +} + +group("default") { + deps = [ ":silabs" ] +} diff --git a/examples/dishwasher-app/silabs/README.md b/examples/dishwasher-app/silabs/README.md new file mode 100644 index 0000000000..9a8a102cbd --- /dev/null +++ b/examples/dishwasher-app/silabs/README.md @@ -0,0 +1,236 @@ +# Matter Silabs dishwasher Example + +An example showing the use of Matter on the Silicon Labs EFR32 MG24 boards. + +
+ +- [Matter Silabs dishwasher Example](#matter-silabs-dishwasher-example) + - [Introduction](#introduction) + - [Building](#building) + - [Flashing the Application](#flashing-the-application) + - [Viewing Logging Output](#viewing-logging-output) + - [Running the Complete Example](#running-the-complete-example) + +
+ +> **NOTE:** Silicon Laboratories now maintains a public matter GitHub repo with +> frequent releases thoroughly tested and validated. Developers looking to +> develop matter products with silabs hardware are encouraged to use our latest +> release with added tools and documentation. +> [Silabs Matter Github](https://github.com/SiliconLabs/matter/releases) + +## Introduction + +The Silabs dishwasher example provides a baseline demonstration of a dishwasher +control device, built using Matter and the Silicon Labs gecko SDK. It can be +controlled by a Chip controller over an Openthread or Wifi network.. + +The Silabs device can be commissioned over Bluetooth Low Energy where the device +and the Chip controller will exchange security information with the Rendez-vous +procedure. If using Thread, Thread Network credentials are then provided to the +Silabs device which will then join the Thread network. + +If the LCD is enabled, the LCD on the Silabs WSTK shows a QR Code containing the +needed commissioning information for the BLE connection and starting the +Rendez-vous procedure. + +The dishwasher example is intended to serve both as a means to explore the +workings of Matter as well as a template for creating real products based on the +Silicon Labs platform. + +## Building + +- Download the + [Simplicity Commander](https://www.silabs.com/mcu/programming-options) + command line tool, and ensure that `commander` is your shell search path. + (For Mac OS X, `commander` is located inside + `Commander.app/Contents/MacOS/`.) + +- Download and install a suitable ARM gcc tool chain: + [GNU Arm Embedded Toolchain 9-2019-q4-major](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads) + +- Install some additional tools (likely already present for CHIP developers): + + - Linux: `sudo apt-get install git ninja-build` + + - Mac OS X: `brew install ninja` + +- Supported hardware: + + - > For the latest supported hardware please refer to the + > [Hardware Requirements](https://github.com/SiliconLabs/matter/blob/latest/docs/silabs/general/HARDWARE_REQUIREMENTS.md) + > in the Silicon Labs Matter Github Repo + + MG21 boards: Currently not supported due to RAM limitation. + + - BRD4180A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + + MG24 boards : + + - BRD2601B / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm + - BRD2703A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm + - BRD4186C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm + - BRD4187C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + - BRD2703A / MG24 Explorer Kit + - BRD2704A / SparkFun Thing Plus MGM240P board + +- Build the example application: + + cd ~/connectedhomeip + ./scripts/examples/gn_silabs_example.sh ./silabs_examples/dishwasher-app/silabs/ ./out/dishwasher-app BRD4187C + +* To delete generated executable, libraries and object files use: + + $ cd ~/connectedhomeip + $ rm -rf ./out/ + + OR use GN/Ninja directly + + $ cd ~/connectedhomeip/silabs_examples/dishwasher-app/silabs + $ git submodule update --init + $ source third_party/connectedhomeip/scripts/activate.sh + $ export SILABS_BOARD=BRD4187C + $ gn gen out/dishwasher-app + $ ninja -C out/dishwasher-app + +* To delete generated executable, libraries and object files use: + + $ cd ~/connectedhomeip/silabs_examples/dishwasher-app/silabs + $ rm -rf out/ + +For more build options, help is provided when running the build script without +arguments + + ./scripts/examples/gn_silabs_example.sh + +## Flashing the Application + +- On the command line: + + $ python3 out/dishwasher-app/matter-silabs-dishwasher-example.flash.py + +- Or with the Ozone debugger, just load the .out file. + +All Silabs boards require a bootloader, see Silicon Labs documentation for more +info. Pre-built bootloader binaries are available in the Assets section of the +Releases page on +[Silabs Matter Github](https://github.com/SiliconLabs/matter/releases) . + +## Viewing Logging Output + +The example application is built to use the SEGGER Real Time Transfer (RTT) +facility for log output. RTT is a feature built-in to the J-Link Interface MCU +on the WSTK development board. It allows bi-directional communication with an +embedded application without the need for a dedicated UART. + +Using the RTT facility requires downloading and installing the _SEGGER J-Link +Software and Documentation Pack_ +([web site](https://www.segger.com/downloads/jlink#J-LinkSoftwareAndDocumentationPack)). + +Alternatively, SEGGER Ozone J-Link debugger can be used to view RTT logs too +after flashing the .out file. + +- Download the J-Link installer by navigating to the appropriate URL and + agreeing to the license agreement. + +- [JLink_Linux_x86_64.deb](https://www.segger.com/downloads/jlink/JLink_Linux_x86_64.deb) +- [JLink_MacOSX.pkg](https://www.segger.com/downloads/jlink/JLink_MacOSX.pkg) + +* Install the J-Link software + + $ cd ~/Downloads + $ sudo dpkg -i JLink_Linux_V*_x86_64.deb + +* In Linux, grant the logged in user the ability to talk to the development + hardware via the linux tty device (/dev/ttyACMx) by adding them to the + dialout group. + + $ sudo usermod -a -G dialout ${USER} + +Once the above is complete, log output can be viewed using the JLinkExe tool in +combination with JLinkRTTClient as follows: + +- Run the JLinkExe tool with arguments to autoconnect to the WSTK board: + + For MG24 use: + + $ JLinkExe -device EFR32MG24AXXXF1024 -if SWD -speed 4000 -autoconnect 1 + +- In a second terminal, run the JLinkRTTClient to view logs: + + $ JLinkRTTClient + +## Running the Complete Example + +- It is assumed here that you already have an OpenThread border router + configured and running. If not see the following guide + [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) + for more information on how to setup a border router on a raspberryPi. + + Take note that the RCP code is available directly through + [Simplicity Studio 5](https://www.silabs.com/products/development-tools/software/simplicity-studio/simplicity-studio-5) + under File->New->Project Wizard->Examples->Thread : ot-rcp + +- User interface : **LCD** The LCD on Silabs WSTK shows a QR Code. This QR + Code is be scanned by the CHIP Tool app For the Rendez-vous procedure over + BLE + + * On devices that do not have or support the LCD Display like the BRD4166A Thunderboard Sense 2, + a URL can be found in the RTT logs. + + [SVR] Copy/paste the below URL in a browser to see the QR Code: + [SVR] https://project-chip.github.io/connectedhomeip/qrcode.html?data=CH%3AI34NM%20-00%200C9SS0 + + **LED 0** shows the overall state of the device and its connectivity. The + following states are possible: + + - _Short Flash On (50 ms on/950 ms off)_ ; The device is in the + unprovisioned (unpaired) state and is waiting for a commissioning + application to connect. + + - _Rapid Even Flashing_ ; (100 ms on/100 ms off)_ — The device is in the + unprovisioned state and a commissioning application is connected through + Bluetooth LE. + + - _Short Flash Off_ ; (950ms on/50ms off)_ — The device is fully + provisioned, but does not yet have full Thread network or service + connectivity. + + - _Solid On_ ; The device is fully provisioned and has full Thread + network and service connectivity. + + **LED 1** Shows the dishwasher working state following states are possible: + + - _Solid On_ ; dishwasher is running + - _Slow_Blink_ ; dishwasher is paused + - _Off_ ; dishwasher is stopped + - _Fast_Blink_ ; dishwasher has encountered an error + + **Push Button 0** + + - _Press and Release_ : Start, or restart, BLE advertisement in fast mode. It will advertise in this mode + for 30 seconds. The device will then switch to a slower interval advertisement. + After 15 minutes, the advertisement stops. + + - _Pressed and hold for 6 s_ : Initiates the factory reset of the device. + Releasing the button within the 6-second window cancels the factory reset + procedure. **LEDs** blink in unison when the factory reset procedure is + initiated. + + **Push Button 1** Cycle the dishwasher operational states + Running/Paused/Stopped + +### Commissioning + +You can provision and control the Matter device using the python controller, +`chip-tool` standalone, Android, or iOS app. + +Silabs provides `chip-tool` as a wrapper function and more user-friendly method +of using [chip-tool](../../chip-tool/README.md) within the pre-built Raspberry +Pi image. For more info on using `chip-tool`, see +[Chiptool](../../../docs/development_controllers/chip-tool/chip_tool_guide.md). + +Here is an example using `chip-tool`: + + $ chip-tool pairing ble-thread 1 hex:0e080000000000010000000300001335060004001fffe002084fe76e9a8b5edaf50708fde46f999f0698e20510d47f5027a414ffeebaefa92285cc84fa030f4f70656e5468726561642d653439630102e49c0410b92f8c7fbb4f9f3e08492ee3915fbd2f0c0402a0fff8 20202021 3840 --ble-adapter 0 + $ chip-tool operationalstate start 1 1 diff --git a/examples/dishwasher-app/silabs/build_for_wifi_args.gni b/examples/dishwasher-app/silabs/build_for_wifi_args.gni new file mode 100644 index 0000000000..7e52816578 --- /dev/null +++ b/examples/dishwasher-app/silabs/build_for_wifi_args.gni @@ -0,0 +1,24 @@ +# 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}/config/standalone/args.gni") + +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") +chip_enable_openthread = false +import("${chip_root}/src/platform/silabs/wifi_args.gni") + +sl_enable_test_event_trigger = true +chip_enable_ota_requestor = true +app_data_model = + "${chip_root}/examples/dishwasher-app/silabs/data_model:silabs-dishwasher" diff --git a/examples/dishwasher-app/silabs/build_for_wifi_gnfile.gn b/examples/dishwasher-app/silabs/build_for_wifi_gnfile.gn new file mode 100644 index 0000000000..d391814190 --- /dev/null +++ b/examples/dishwasher-app/silabs/build_for_wifi_gnfile.gn @@ -0,0 +1,28 @@ +# 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/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 = { + target_cpu = "arm" + target_os = "freertos" + chip_enable_wifi = true + import("//build_for_wifi_args.gni") +} diff --git a/examples/dishwasher-app/silabs/build_overrides b/examples/dishwasher-app/silabs/build_overrides new file mode 120000 index 0000000000..f2758328a7 --- /dev/null +++ b/examples/dishwasher-app/silabs/build_overrides @@ -0,0 +1 @@ +../../../examples/build_overrides \ No newline at end of file diff --git a/examples/dishwasher-app/silabs/data_model/BUILD.gn b/examples/dishwasher-app/silabs/data_model/BUILD.gn new file mode 100644 index 0000000000..d1ade242d1 --- /dev/null +++ b/examples/dishwasher-app/silabs/data_model/BUILD.gn @@ -0,0 +1,27 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("${chip_root}/src/app/chip_data_model.gni") +import("${chip_root}/src/platform/device.gni") + +chip_data_model("silabs-dishwasher") { + if (chip_enable_wifi) { + zap_file = "dishwasher-wifi-app.zap" + } else { + zap_file = "dishwasher-thread-app.zap" + } + + is_server = true +} diff --git a/examples/dishwasher-app/silabs/data_model/dishwasher-thread-app.matter b/examples/dishwasher-app/silabs/data_model/dishwasher-thread-app.matter new file mode 100644 index 0000000000..93222a8580 --- /dev/null +++ b/examples/dishwasher-app/silabs/data_model/dishwasher-thread-app.matter @@ -0,0 +1,2794 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + +enum TestGlobalEnum : enum8 { + kSomeValue = 0; + kSomeOtherValue = 1; + kFinalValue = 2; +} + +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + +bitmap TestGlobalBitmap : bitmap32 { + kFirstBit = 0x1; + kSecondBit = 0x2; +} + +struct TestGlobalStruct { + char_string<128> name = 0; + nullable TestGlobalBitmap myBitmap = 1; + optional nullable TestGlobalEnum myEnum = 2; +} + +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +cluster Identify = 3 { + revision 4; + + 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 description for Identify */ + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +cluster Descriptor = 29 { + revision 2; + + bitmap Feature : bitmap32 { + kTagList = 0x1; + } + + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute cluster_id serverList[] = 1; + readonly attribute cluster_id clientList[] = 2; + readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; + readonly attribute 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 Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ +cluster Binding = 30 { + revision 1; // NOTE: Default/not specifically set + + fabric_scoped struct TargetStruct { + optional node_id node = 1; + optional group_id group = 2; + optional endpoint_no endpoint = 3; + optional cluster_id cluster = 4; + fabric_idx fabricIndex = 254; + } + + attribute access(write: manage) TargetStruct binding[] = 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 Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ +cluster AccessControl = 31 { + revision 2; + + enum AccessControlEntryAuthModeEnum : enum8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : enum8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum AccessRestrictionTypeEnum : enum8 { + kAttributeAccessForbidden = 0; + kAttributeWriteForbidden = 1; + kCommandForbidden = 2; + kEventForbidden = 3; + } + + enum ChangeTypeEnum : enum8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + bitmap Feature : bitmap32 { + kExtension = 0x1; + kManagedDevice = 0x2; + } + + struct AccessRestrictionStruct { + AccessRestrictionTypeEnum type = 0; + nullable int32u id = 1; + } + + struct CommissioningAccessRestrictionEntryStruct { + endpoint_no endpoint = 0; + cluster_id cluster = 1; + AccessRestrictionStruct restrictions[] = 2; + } + + fabric_scoped struct AccessRestrictionEntryStruct { + fabric_sensitive endpoint_no endpoint = 0; + fabric_sensitive cluster_id cluster = 1; + fabric_sensitive AccessRestrictionStruct restrictions[] = 2; + fabric_idx fabricIndex = 254; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { + int64u token = 0; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute optional CommissioningAccessRestrictionEntryStruct commissioningARL[] = 5; + readonly attribute optional AccessRestrictionEntryStruct arl[] = 6; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ReviewFabricRestrictionsRequest { + CommissioningAccessRestrictionEntryStruct arl[] = 0; + } + + response struct ReviewFabricRestrictionsResponse = 1 { + int64u token = 0; + } + + /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +cluster BasicInformation = 40 { + revision 3; + + enum ColorEnum : enum8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : enum8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + int32u softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; + readonly attribute int32u specificationVersion = 21; + readonly attribute int16u maxPathsPerInvoke = 22; + readonly attribute 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 MfgSpecificPing(): DefaultSuccess = 0; +} + +/** Provides an interface for providing OTA software updates */ +cluster OtaSoftwareUpdateProvider = 41 { + revision 1; // NOTE: Default/not specifically set + + enum ApplyUpdateActionEnum : enum8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum DownloadProtocolEnum : enum8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHTTPS = 2; + kVendorSpecific = 3; + } + + enum StatusEnum : enum8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + DownloadProtocolEnum protocolsSupported[] = 3; + optional int16u hardwareVersion = 4; + optional char_string<2> location = 5; + optional boolean requestorCanConsent = 6; + optional octet_string<512> metadataForProvider = 7; + } + + response struct QueryImageResponse = 1 { + StatusEnum status = 0; + optional int32u delayedActionTime = 1; + optional char_string<256> imageURI = 2; + optional int32u softwareVersion = 3; + optional char_string<64> softwareVersionString = 4; + optional octet_string<32> updateToken = 5; + optional boolean userConsentNeeded = 6; + optional octet_string<512> metadataForRequestor = 7; + } + + request struct ApplyUpdateRequestRequest { + octet_string<32> updateToken = 0; + int32u newVersion = 1; + } + + response struct ApplyUpdateResponse = 3 { + ApplyUpdateActionEnum action = 0; + int32u delayedActionTime = 1; + } + + request struct NotifyUpdateAppliedRequest { + octet_string<32> updateToken = 0; + int32u softwareVersion = 1; + } + + /** Determine availability of a new Software Image */ + command QueryImage(QueryImageRequest): QueryImageResponse = 0; + /** Determine next action to take for a downloaded Software Image */ + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + /** Notify OTA Provider that an update was applied */ + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; +} + +/** Provides an interface for downloading and applying OTA software updates */ +cluster OtaSoftwareUpdateRequestor = 42 { + revision 1; // NOTE: Default/not specifically set + + enum AnnouncementReasonEnum : enum8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum ChangeReasonEnum : enum8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum UpdateStateEnum : enum8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + fabric_scoped struct ProviderLocation { + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + fabric_idx fabricIndex = 254; + } + + info event StateTransition = 0 { + UpdateStateEnum previousState = 0; + UpdateStateEnum newState = 1; + ChangeReasonEnum reason = 2; + nullable int32u targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + int32u softwareVersion = 0; + int16u productID = 1; + } + + info event DownloadError = 2 { + int32u softwareVersion = 0; + int64u bytesDownloaded = 1; + nullable int8u progressPercent = 2; + nullable int64s platformCode = 3; + } + + attribute access(write: administer) ProviderLocation defaultOTAProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute UpdateStateEnum updateState = 2; + readonly attribute nullable int8u updateStateProgress = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + AnnouncementReasonEnum announcementReason = 2; + optional octet_string<512> metadataForNode = 3; + endpoint_no endpoint = 4; + } + + /** Announce the presence of an OTA Provider */ + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; +} + +/** 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 */ +cluster LocalizationConfiguration = 43 { + revision 1; // NOTE: Default/not specifically set + + attribute access(write: manage) 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. */ +cluster TimeFormatLocalization = 44 { + revision 1; // NOTE: Default/not specifically set + + 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; + kUseActiveLocale = 255; + } + + enum HourFormatEnum : enum8 { + k12hr = 0; + k24hr = 1; + kUseActiveLocale = 255; + } + + bitmap Feature : bitmap32 { + kCalendarFormat = 0x1; + } + + attribute access(write: manage) HourFormatEnum hourFormat = 0; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional 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; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for the units in which values are conveyed in communication to a + user. As such, Nodes that visually or audibly convey measurable values to the user need a + mechanism by which they can be configured to use a user’s preferred unit. */ +cluster UnitLocalization = 45 { + revision 1; + + enum TempUnitEnum : enum8 { + kFahrenheit = 0; + kCelsius = 1; + kKelvin = 2; + } + + bitmap Feature : bitmap32 { + kTemperatureUnit = 0x1; + } + + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 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 manage global aspects of the Commissioning flow. */ +cluster GeneralCommissioning = 48 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningErrorEnum : enum8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; + } + + enum RegulatoryLocationTypeEnum : enum8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; + 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; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + char_string<2> countryCode = 1; + int64u breadcrumb = 2; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +cluster NetworkCommissioning = 49 { + revision 1; // NOTE: Default/not specifically set + + 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; + kPerDeviceCredentials = 0x8; + } + + bitmap ThreadCapabilitiesBitmap : bitmap16 { + kIsBorderRouterCapable = 0x1; + kIsRouterCapable = 0x2; + kIsSleepyEndDeviceCapable = 0x4; + kIsFullThreadDevice = 0x8; + kIsSynchronizedSleepyEndDeviceCapable = 0x10; + } + + bitmap WiFiSecurityBitmap : bitmap8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + provisional readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + provisional readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + provisional readonly attribute optional int16u threadVersion = 10; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + + request struct AddOrUpdateThreadNetworkRequest { + octet_string<254> operationalDataset = 0; + optional int64u breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + + request struct ConnectNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + + request struct ReorderNetworkRequest { + octet_string<32> networkID = 0; + int8u networkIndex = 1; + optional int64u breadcrumb = 2; + } + + request struct QueryIdentityRequest { + octet_string<20> keyIdentifier = 0; + optional octet_string<32> possessionNonce = 1; + } + + response struct QueryIdentityResponse = 10 { + octet_string<140> identity = 0; + optional octet_string<64> possessionSignature = 1; + } + + /** Detemine the set of networks the device sees as available. */ + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +cluster DiagnosticLogs = 50 { + revision 1; // NOTE: Default/not specifically set + + 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; + } + + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + long_octet_string logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster GeneralDiagnostics = 51 { + revision 2; + + enum BootReasonEnum : enum8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : enum8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : enum8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : enum8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + bitmap Feature : bitmap32 { + kDataModelTest = 0x1; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + } + + response struct TimeSnapshotResponse = 2 { + systime_ms systemTimeMs = 0; + nullable posix_ms posixTimeMs = 1; + } + + request struct PayloadTestRequestRequest { + octet_string<16> enableKey = 0; + int8u value = 1; + int16u count = 2; + } + + response struct PayloadTestResponse = 4 { + octet_string payload = 0; + } + + /** Provide a means for certification tests to trigger some test-plan-specific events */ + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ + command TimeSnapshot(): TimeSnapshotResponse = 1; + /** Request a variable length payload response. */ + command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; +} + +/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster SoftwareDiagnostics = 52 { + revision 1; // NOTE: Default/not specifically set + + 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 optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; +} + +/** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ +cluster ThreadNetworkDiagnostics = 53 { + revision 2; + + 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 optional int64u overrunCount = 6; + readonly attribute NeighborTableStruct neighborTable[] = 7; + readonly attribute RouteTableStruct routeTable[] = 8; + readonly attribute nullable int32u partitionId = 9; + readonly attribute nullable int16u weighting = 10; + readonly attribute nullable int16u dataVersion = 11; + readonly attribute nullable int16u stableDataVersion = 12; + readonly attribute nullable int8u leaderRouterId = 13; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; + readonly attribute nullable SecurityPolicy securityPolicy = 59; + readonly attribute nullable octet_string<4> channelPage0Mask = 60; + readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; + readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62; + 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; + + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +cluster AdministratorCommissioning = 60 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningWindowStatusEnum : enum8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : enum8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + bitmap Feature : bitmap32 { + kBasic = 0x1; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable vendor_id adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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<32> salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +cluster OperationalCredentials = 62 { + revision 1; // NOTE: Default/not specifically set + + 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<32> attestationNonce = 0; + } + + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + + request struct CSRRequestRequest { + octet_string<32> CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + + request struct AddNOCRequest { + octet_string<400> NOCValue = 0; + optional octet_string<400> ICACValue = 1; + octet_string<16> IPKValue = 2; + int64u caseAdminSubject = 3; + vendor_id adminVendorId = 4; + } + + request struct UpdateNOCRequest { + octet_string NOCValue = 0; + optional octet_string ICACValue = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + + request struct UpdateFabricLabelRequest { + char_string<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + octet_string rootCACertificate = 0; + } + + /** Sender is requesting attestation information from the receiver. */ + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +cluster GroupKeyManagement = 63 { + revision 1; // NOTE: Default/not specifically set + + enum GroupKeySecurityPolicyEnum : enum8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : bitmap32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + int16u groupKeySetIDs[] = 0; + } + + /** Write a new set of keys for the given key set id. */ + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only +labels. */ +cluster FixedLabel = 64 { + revision 1; // NOTE: Default/not specifically set + + 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. */ +cluster UserLabel = 65 { + revision 1; // NOTE: Default/not specifically set + + 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; +} + +/** 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. */ +cluster OperationalState = 96 { + revision 1; + + enum ErrorStateEnum : enum8 { + kNoError = 0; + kUnableToStartOrResume = 1; + kUnableToCompleteOperation = 2; + kCommandInvalidInState = 3; + } + + enum OperationalStateEnum : enum8 { + kStopped = 0; + kRunning = 1; + kPaused = 2; + kError = 3; + } + + struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; + } + + struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; + } + + critical event OperationalError = 0 { + ErrorStateStruct errorState = 0; + } + + info event OperationCompletion = 1 { + enum8 completionErrorCode = 0; + optional nullable elapsed_s totalOperationalTime = 1; + optional nullable elapsed_s pausedTime = 2; + } + + readonly attribute nullable char_string phaseList[] = 0; + readonly attribute nullable int8u currentPhase = 1; + readonly attribute optional 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; + + response struct OperationalCommandResponse = 4 { + ErrorStateStruct commandResponseState = 0; + } + + /** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ + command Pause(): OperationalCommandResponse = 0; + /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ + command Stop(): OperationalCommandResponse = 1; + /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ + command Start(): OperationalCommandResponse = 2; + /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ + command Resume(): OperationalCommandResponse = 3; +} + +/** This cluster provides a mechanism for querying data about electrical power as measured by the server. */ +cluster ElectricalPowerMeasurement = 144 { + revision 1; + + enum MeasurementTypeEnum : enum16 { + kUnspecified = 0; + kVoltage = 1; + kActiveCurrent = 2; + kReactiveCurrent = 3; + kApparentCurrent = 4; + kActivePower = 5; + kReactivePower = 6; + kApparentPower = 7; + kRMSVoltage = 8; + kRMSCurrent = 9; + kRMSPower = 10; + kFrequency = 11; + kPowerFactor = 12; + kNeutralCurrent = 13; + kElectricalEnergy = 14; + } + + enum PowerModeEnum : enum8 { + kUnknown = 0; + kDC = 1; + kAC = 2; + } + + bitmap Feature : bitmap32 { + kDirectCurrent = 0x1; + kAlternatingCurrent = 0x2; + kPolyphasePower = 0x4; + kHarmonics = 0x8; + kPowerQuality = 0x10; + } + + struct MeasurementAccuracyRangeStruct { + int64s rangeMin = 0; + int64s rangeMax = 1; + optional percent100ths percentMax = 2; + optional percent100ths percentMin = 3; + optional percent100ths percentTypical = 4; + optional int64u fixedMax = 5; + optional int64u fixedMin = 6; + optional int64u fixedTypical = 7; + } + + struct MeasurementAccuracyStruct { + MeasurementTypeEnum measurementType = 0; + boolean measured = 1; + int64s minMeasuredValue = 2; + int64s maxMeasuredValue = 3; + MeasurementAccuracyRangeStruct accuracyRanges[] = 4; + } + + struct HarmonicMeasurementStruct { + int8u order = 0; + nullable int64s measurement = 1; + } + + struct MeasurementRangeStruct { + MeasurementTypeEnum measurementType = 0; + int64s min = 1; + int64s max = 2; + optional epoch_s startTimestamp = 3; + optional epoch_s endTimestamp = 4; + optional epoch_s minTimestamp = 5; + optional epoch_s maxTimestamp = 6; + optional systime_ms startSystime = 7; + optional systime_ms endSystime = 8; + optional systime_ms minSystime = 9; + optional systime_ms maxSystime = 10; + } + + info event MeasurementPeriodRanges = 0 { + MeasurementRangeStruct ranges[] = 0; + } + + readonly attribute PowerModeEnum powerMode = 0; + readonly attribute int8u numberOfMeasurementTypes = 1; + readonly attribute MeasurementAccuracyStruct accuracy[] = 2; + readonly attribute optional MeasurementRangeStruct ranges[] = 3; + readonly attribute optional nullable voltage_mv voltage = 4; + readonly attribute optional nullable amperage_ma activeCurrent = 5; + readonly attribute optional nullable amperage_ma reactiveCurrent = 6; + readonly attribute optional nullable amperage_ma apparentCurrent = 7; + readonly attribute nullable power_mw activePower = 8; + readonly attribute optional nullable power_mw reactivePower = 9; + readonly attribute optional nullable power_mw apparentPower = 10; + readonly attribute optional nullable voltage_mv RMSVoltage = 11; + readonly attribute optional nullable amperage_ma RMSCurrent = 12; + readonly attribute optional nullable power_mw RMSPower = 13; + readonly attribute optional nullable int64s frequency = 14; + readonly attribute optional nullable HarmonicMeasurementStruct harmonicCurrents[] = 15; + readonly attribute optional nullable HarmonicMeasurementStruct harmonicPhases[] = 16; + readonly attribute optional nullable int64s powerFactor = 17; + readonly attribute optional nullable amperage_ma neutralCurrent = 18; + 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 a mechanism for querying data about the electrical energy imported or provided by the server. */ +cluster ElectricalEnergyMeasurement = 145 { + revision 1; + + enum MeasurementTypeEnum : enum16 { + kUnspecified = 0; + kVoltage = 1; + kActiveCurrent = 2; + kReactiveCurrent = 3; + kApparentCurrent = 4; + kActivePower = 5; + kReactivePower = 6; + kApparentPower = 7; + kRMSVoltage = 8; + kRMSCurrent = 9; + kRMSPower = 10; + kFrequency = 11; + kPowerFactor = 12; + kNeutralCurrent = 13; + kElectricalEnergy = 14; + } + + bitmap Feature : bitmap32 { + kImportedEnergy = 0x1; + kExportedEnergy = 0x2; + kCumulativeEnergy = 0x4; + kPeriodicEnergy = 0x8; + } + + struct MeasurementAccuracyRangeStruct { + int64s rangeMin = 0; + int64s rangeMax = 1; + optional percent100ths percentMax = 2; + optional percent100ths percentMin = 3; + optional percent100ths percentTypical = 4; + optional int64u fixedMax = 5; + optional int64u fixedMin = 6; + optional int64u fixedTypical = 7; + } + + struct MeasurementAccuracyStruct { + MeasurementTypeEnum measurementType = 0; + boolean measured = 1; + int64s minMeasuredValue = 2; + int64s maxMeasuredValue = 3; + MeasurementAccuracyRangeStruct accuracyRanges[] = 4; + } + + struct CumulativeEnergyResetStruct { + optional nullable epoch_s importedResetTimestamp = 0; + optional nullable epoch_s exportedResetTimestamp = 1; + optional nullable systime_ms importedResetSystime = 2; + optional nullable systime_ms exportedResetSystime = 3; + } + + struct EnergyMeasurementStruct { + energy_mwh energy = 0; + optional epoch_s startTimestamp = 1; + optional epoch_s endTimestamp = 2; + optional systime_ms startSystime = 3; + optional systime_ms endSystime = 4; + } + + info event CumulativeEnergyMeasured = 0 { + optional EnergyMeasurementStruct energyImported = 0; + optional EnergyMeasurementStruct energyExported = 1; + } + + info event PeriodicEnergyMeasured = 1 { + optional EnergyMeasurementStruct energyImported = 0; + optional EnergyMeasurementStruct energyExported = 1; + } + + readonly attribute MeasurementAccuracyStruct accuracy = 0; + readonly attribute optional nullable EnergyMeasurementStruct cumulativeEnergyImported = 1; + readonly attribute optional nullable EnergyMeasurementStruct cumulativeEnergyExported = 2; + readonly attribute optional nullable EnergyMeasurementStruct periodicEnergyImported = 3; + readonly attribute optional nullable EnergyMeasurementStruct periodicEnergyExported = 4; + readonly attribute optional nullable CumulativeEnergyResetStruct cumulativeEnergyReset = 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; +} + +/** This cluster allows a client to manage the power draw of a device. An example of such a client could be an Energy Management System (EMS) which controls an Energy Smart Appliance (ESA). */ +provisional cluster DeviceEnergyManagement = 152 { + revision 4; + + enum AdjustmentCauseEnum : enum8 { + kLocalOptimization = 0; + kGridOptimization = 1; + } + + enum CauseEnum : enum8 { + kNormalCompletion = 0; + kOffline = 1; + kFault = 2; + kUserOptOut = 3; + kCancelled = 4; + } + + enum CostTypeEnum : enum8 { + kFinancial = 0; + kGHGEmissions = 1; + kComfort = 2; + kTemperature = 3; + } + + enum ESAStateEnum : enum8 { + kOffline = 0; + kOnline = 1; + kFault = 2; + kPowerAdjustActive = 3; + kPaused = 4; + } + + enum ESATypeEnum : enum8 { + kEVSE = 0; + kSpaceHeating = 1; + kWaterHeating = 2; + kSpaceCooling = 3; + kSpaceHeatingCooling = 4; + kBatteryStorage = 5; + kSolarPV = 6; + kFridgeFreezer = 7; + kWashingMachine = 8; + kDishwasher = 9; + kCooking = 10; + kHomeWaterPump = 11; + kIrrigationWaterPump = 12; + kPoolPump = 13; + kOther = 255; + } + + enum ForecastUpdateReasonEnum : enum8 { + kInternalOptimization = 0; + kLocalOptimization = 1; + kGridOptimization = 2; + } + + enum OptOutStateEnum : enum8 { + kNoOptOut = 0; + kLocalOptOut = 1; + kGridOptOut = 2; + kOptOut = 3; + } + + enum PowerAdjustReasonEnum : enum8 { + kNoAdjustment = 0; + kLocalOptimizationAdjustment = 1; + kGridOptimizationAdjustment = 2; + } + + bitmap Feature : bitmap32 { + kPowerAdjustment = 0x1; + kPowerForecastReporting = 0x2; + kStateForecastReporting = 0x4; + kStartTimeAdjustment = 0x8; + kPausable = 0x10; + kForecastAdjustment = 0x20; + kConstraintBasedAdjustment = 0x40; + } + + struct CostStruct { + CostTypeEnum costType = 0; + int32s value = 1; + int8u decimalPoints = 2; + optional int16u currency = 3; + } + + struct PowerAdjustStruct { + power_mw minPower = 0; + power_mw maxPower = 1; + elapsed_s minDuration = 2; + elapsed_s maxDuration = 3; + } + + struct PowerAdjustCapabilityStruct { + nullable PowerAdjustStruct powerAdjustCapability[] = 0; + PowerAdjustReasonEnum cause = 1; + } + + struct SlotStruct { + elapsed_s minDuration = 0; + elapsed_s maxDuration = 1; + elapsed_s defaultDuration = 2; + elapsed_s elapsedSlotTime = 3; + elapsed_s remainingSlotTime = 4; + optional boolean slotIsPausable = 5; + optional elapsed_s minPauseDuration = 6; + optional elapsed_s maxPauseDuration = 7; + optional int16u manufacturerESAState = 8; + optional power_mw nominalPower = 9; + optional power_mw minPower = 10; + optional power_mw maxPower = 11; + optional energy_mwh nominalEnergy = 12; + optional CostStruct costs[] = 13; + optional power_mw minPowerAdjustment = 14; + optional power_mw maxPowerAdjustment = 15; + optional elapsed_s minDurationAdjustment = 16; + optional elapsed_s maxDurationAdjustment = 17; + } + + struct ForecastStruct { + int32u forecastID = 0; + nullable int16u activeSlotNumber = 1; + epoch_s startTime = 2; + epoch_s endTime = 3; + optional nullable epoch_s earliestStartTime = 4; + optional epoch_s latestEndTime = 5; + boolean isPausable = 6; + SlotStruct slots[] = 7; + ForecastUpdateReasonEnum forecastUpdateReason = 8; + } + + struct ConstraintsStruct { + epoch_s startTime = 0; + elapsed_s duration = 1; + optional power_mw nominalPower = 2; + optional energy_mwh maximumEnergy = 3; + optional int8s loadControl = 4; + } + + struct SlotAdjustmentStruct { + int8u slotIndex = 0; + optional power_mw nominalPower = 1; + elapsed_s duration = 2; + } + + info event PowerAdjustStart = 0 { + } + + info event PowerAdjustEnd = 1 { + CauseEnum cause = 0; + elapsed_s duration = 1; + energy_mwh energyUse = 2; + } + + info event Paused = 2 { + } + + info event Resumed = 3 { + CauseEnum cause = 0; + } + + readonly attribute ESATypeEnum ESAType = 0; + readonly attribute boolean ESACanGenerate = 1; + readonly attribute ESAStateEnum ESAState = 2; + readonly attribute power_mw absMinPower = 3; + readonly attribute power_mw absMaxPower = 4; + readonly attribute optional nullable PowerAdjustCapabilityStruct powerAdjustmentCapability = 5; + readonly attribute optional nullable ForecastStruct forecast = 6; + readonly attribute optional OptOutStateEnum optOutState = 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 PowerAdjustRequestRequest { + power_mw power = 0; + elapsed_s duration = 1; + AdjustmentCauseEnum cause = 2; + } + + request struct StartTimeAdjustRequestRequest { + epoch_s requestedStartTime = 0; + AdjustmentCauseEnum cause = 1; + } + + request struct PauseRequestRequest { + elapsed_s duration = 0; + AdjustmentCauseEnum cause = 1; + } + + request struct ModifyForecastRequestRequest { + int32u forecastID = 0; + SlotAdjustmentStruct slotAdjustments[] = 1; + AdjustmentCauseEnum cause = 2; + } + + request struct RequestConstraintBasedForecastRequest { + ConstraintsStruct constraints[] = 0; + AdjustmentCauseEnum cause = 1; + } + + /** Allows a client to request an adjustment in the power consumption of an ESA for a specified duration. */ + command PowerAdjustRequest(PowerAdjustRequestRequest): DefaultSuccess = 0; + /** Allows a client to cancel an ongoing PowerAdjustmentRequest operation. */ + command CancelPowerAdjustRequest(): DefaultSuccess = 1; + /** Allows a client to adjust the start time of a Forecast sequence that has not yet started operation (i.e. where the current Forecast StartTime is in the future). */ + command StartTimeAdjustRequest(StartTimeAdjustRequestRequest): DefaultSuccess = 2; + /** Allows a client to temporarily pause an operation and reduce the ESAs energy demand. */ + command PauseRequest(PauseRequestRequest): DefaultSuccess = 3; + /** Allows a client to cancel the PauseRequest command and enable earlier resumption of operation. */ + command ResumeRequest(): DefaultSuccess = 4; + /** Allows a client to modify a Forecast within the limits allowed by the ESA. */ + command ModifyForecastRequest(ModifyForecastRequestRequest): DefaultSuccess = 5; + /** Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. */ + command RequestConstraintBasedForecast(RequestConstraintBasedForecastRequest): DefaultSuccess = 6; + /** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command. */ + command CancelRequest(): DefaultSuccess = 7; +} + +/** The Power Topology Cluster provides a mechanism for expressing how power is flowing between endpoints. */ +cluster PowerTopology = 156 { + revision 1; + + bitmap Feature : bitmap32 { + kNodeTopology = 0x1; + kTreeTopology = 0x2; + kSetTopology = 0x4; + kDynamicPowerFlow = 0x8; + } + + readonly attribute optional endpoint_no availableEndpoints[] = 0; + readonly attribute optional endpoint_no activeEndpoints[] = 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; +} + +/** Attributes and commands for selecting a mode from a list of supported options. */ +provisional cluster DeviceEnergyManagementMode = 159 { + revision 2; + + enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; + kNoOptimization = 16384; + kDeviceOptimization = 16385; + kLocalOptimization = 16386; + kGridOptimization = 16387; + } + + bitmap Feature : bitmap32 { + kOnOff = 0x1; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute ModeOptionStruct supportedModes[] = 0; + readonly attribute int8u currentMode = 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 ChangeToModeRequest { + int8u newMode = 0; + } + + response struct ChangeToModeResponse = 1 { + enum8 status = 0; + optional char_string<64> statusText = 1; + } + + /** This command is used to change device modes. */ + command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 1; + + binding cluster OtaSoftwareUpdateProvider; + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision; + } + + server cluster BasicInformation { + callback attribute dataModelRevision; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location; + callback attribute hardwareVersion; + callback attribute hardwareVersionString; + callback attribute softwareVersion; + callback attribute softwareVersionString; + callback attribute manufacturingDate; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster OtaSoftwareUpdateRequestor { + callback attribute defaultOTAProviders; + 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; + + handle command AnnounceOTAProvider; + } + + 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 UnitLocalization { + persist attribute temperatureUnit default = 1; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig; + callback attribute locationCapability; + callback attribute supportsConcurrentConnection; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command ArmFailSafe; + handle command ArmFailSafeResponse; + handle command SetRegulatoryConfig; + handle command SetRegulatoryConfigResponse; + handle command CommissioningComplete; + handle command CommissioningCompleteResponse; + } + + 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; + callback attribute supportedThreadFeatures; + callback attribute threadVersion; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + + handle command ScanNetworks; + handle command ScanNetworksResponse; + handle command AddOrUpdateWiFiNetwork; + handle command AddOrUpdateThreadNetwork; + handle command RemoveNetwork; + handle command NetworkConfigResponse; + handle command ConnectNetwork; + handle command ConnectNetworkResponse; + handle command ReorderNetwork; + } + + server cluster DiagnosticLogs { + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command RetrieveLogsRequest; + } + + server cluster GeneralDiagnostics { + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount; + callback attribute upTime; + callback attribute totalOperationalHours; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command TestEventTrigger; + handle command TimeSnapshot; + handle command TimeSnapshotResponse; + } + + server cluster SoftwareDiagnostics { + emits event SoftwareFault; + callback attribute threadMetrics; + callback attribute currentHeapFree; + callback attribute currentHeapUsed; + callback attribute currentHeapHighWatermark; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + + handle command ResetWatermarks; + } + + server cluster ThreadNetworkDiagnostics { + callback attribute channel; + callback attribute routingRole; + callback attribute networkName; + callback attribute panId; + callback attribute extendedPanId; + callback attribute meshLocalPrefix; + callback attribute overrunCount; + callback attribute neighborTable; + callback attribute routeTable; + callback attribute partitionId; + callback attribute weighting; + callback attribute dataVersion; + callback attribute stableDataVersion; + callback attribute leaderRouterId; + callback attribute detachedRoleCount; + callback attribute childRoleCount; + callback attribute routerRoleCount; + callback attribute leaderRoleCount; + callback attribute attachAttemptCount; + callback attribute partitionIdChangeCount; + callback attribute betterPartitionAttachAttemptCount; + callback attribute parentChangeCount; + callback attribute txTotalCount; + callback attribute txUnicastCount; + callback attribute txBroadcastCount; + callback attribute txAckRequestedCount; + callback attribute txAckedCount; + callback attribute txNoAckRequestedCount; + callback attribute txDataCount; + callback attribute txDataPollCount; + callback attribute txBeaconCount; + callback attribute txBeaconRequestCount; + callback attribute txOtherCount; + callback attribute txRetryCount; + callback attribute txDirectMaxRetryExpiryCount; + callback attribute txIndirectMaxRetryExpiryCount; + callback attribute txErrCcaCount; + callback attribute txErrAbortCount; + callback attribute txErrBusyChannelCount; + callback attribute rxTotalCount; + callback attribute rxUnicastCount; + callback attribute rxBroadcastCount; + callback attribute rxDataCount; + callback attribute rxDataPollCount; + callback attribute rxBeaconCount; + callback attribute rxBeaconRequestCount; + callback attribute rxOtherCount; + callback attribute rxAddressFilteredCount; + callback attribute rxDestAddrFilteredCount; + callback attribute rxDuplicatedCount; + callback attribute rxErrNoFrameCount; + callback attribute rxErrUnknownNeighborCount; + callback attribute rxErrInvalidSrcAddrCount; + callback attribute rxErrSecCount; + callback attribute rxErrFcsCount; + callback attribute rxErrOtherCount; + callback attribute activeTimestamp; + callback attribute pendingTimestamp; + callback attribute delay; + callback attribute securityPolicy; + callback attribute channelPage0Mask; + callback attribute operationalDatasetComponents; + callback attribute activeNetworkFaultsList; + ram attribute featureMap default = 0x000F; + ram attribute clusterRevision default = 2; + + handle command ResetCounts; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus; + callback attribute adminFabricIndex; + callback attribute adminVendorId; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command OpenCommissioningWindow; + handle command OpenBasicCommissioningWindow; + handle command RevokeCommissioning; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command AttestationRequest; + handle command AttestationResponse; + handle command CertificateChainRequest; + handle command CertificateChainResponse; + handle command CSRRequest; + handle command CSRResponse; + handle command AddNOC; + handle command UpdateNOC; + handle command NOCResponse; + handle command UpdateFabricLabel; + handle command RemoveFabric; + handle command AddTrustedRootCertificate; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command KeySetWrite; + handle command KeySetRead; + handle command KeySetReadResponse; + handle command KeySetRemove; + handle command KeySetReadAllIndices; + handle command KeySetReadAllIndicesResponse; + } + + 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 ma_dishwasher = 117, version 1; + + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x00; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + + handle command Identify; + handle command TriggerEffect; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster Binding { + callback attribute binding; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster OperationalState { + callback attribute phaseList; + callback attribute currentPhase; + callback attribute operationalStateList; + callback attribute operationalState; + callback attribute operationalError; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command Pause; + handle command Stop; + handle command Start; + handle command Resume; + handle command OperationalCommandResponse; + } +} +endpoint 2 { + device type ma_electricalsensor = 1296, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster ElectricalPowerMeasurement { + emits event MeasurementPeriodRanges; + callback attribute powerMode; + callback attribute numberOfMeasurementTypes; + callback attribute accuracy; + callback attribute ranges; + callback attribute voltage; + callback attribute activeCurrent; + callback attribute reactiveCurrent; + callback attribute apparentCurrent; + callback attribute activePower; + callback attribute reactivePower; + callback attribute apparentPower; + callback attribute RMSVoltage; + callback attribute RMSCurrent; + callback attribute RMSPower; + callback attribute frequency; + callback attribute harmonicCurrents; + callback attribute harmonicPhases; + callback attribute powerFactor; + callback attribute neutralCurrent; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster ElectricalEnergyMeasurement { + emits event CumulativeEnergyMeasured; + callback attribute accuracy; + callback attribute cumulativeEnergyImported; + callback attribute cumulativeEnergyReset; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster PowerTopology { + callback attribute availableEndpoints; + callback attribute activeEndpoints; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + } +} +endpoint 3 { + device type device_energy_management = 1293, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster DeviceEnergyManagement { + emits event PowerAdjustStart; + emits event PowerAdjustEnd; + emits event Paused; + emits event Resumed; + callback attribute ESAType; + callback attribute ESACanGenerate; + callback attribute ESAState; + callback attribute absMinPower; + callback attribute absMaxPower; + callback attribute powerAdjustmentCapability; + callback attribute forecast; + callback attribute optOutState; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 3; + + handle command PowerAdjustRequest; + handle command CancelPowerAdjustRequest; + handle command StartTimeAdjustRequest; + handle command PauseRequest; + handle command ResumeRequest; + handle command ModifyForecastRequest; + handle command RequestConstraintBasedForecast; + handle command CancelRequest; + } + + server cluster DeviceEnergyManagementMode { + callback attribute supportedModes; + callback attribute currentMode; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + + handle command ChangeToMode; + handle command ChangeToModeResponse; + } +} + + diff --git a/examples/dishwasher-app/silabs/data_model/dishwasher-thread-app.zap b/examples/dishwasher-app/silabs/data_model/dishwasher-thread-app.zap new file mode 100644 index 0000000000..f7927d1a6a --- /dev/null +++ b/examples/dishwasher-app/silabs/data_model/dishwasher-thread-app.zap @@ -0,0 +1,6002 @@ +{ + "fileFormat": 2, + "featureLevel": 103, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "category": "matter", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "id": 1, + "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "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": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPathsPerInvoke", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "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": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "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, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdatePossible", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "UpdateStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateStateProgress", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 1, + "storageOption": "NVM", + "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": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "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": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "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": null, + "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": "SupportedThreadFeatures", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "ThreadCapabilitiesBitmap", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThreadVersion", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "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": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshot", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshotResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "SoftwareFault", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRoleEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DetachedRoleCount", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChildRoleCount", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouterRoleCount", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRoleCount", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AttachAttemptCount", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionIdChangeCount", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BetterPartitionAttachAttemptCount", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ParentChangeCount", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxTotalCount", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxUnicastCount", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBroadcastCount", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckRequestedCount", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckedCount", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxNoAckRequestedCount", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataCount", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataPollCount", + "code": 29, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconCount", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconRequestCount", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxOtherCount", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxRetryCount", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCcaCount", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrAbortCount", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrBusyChannelCount", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxTotalCount", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxUnicastCount", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBroadcastCount", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataCount", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataPollCount", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconCount", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconRequestCount", + "code": 45, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxOtherCount", + "code": 46, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxAddressFilteredCount", + "code": 47, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDestAddrFilteredCount", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDuplicatedCount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrNoFrameCount", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrUnknownNeighborCount", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrInvalidSrcAddrCount", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrSecCount", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrFcsCount", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrOtherCount", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingTimestamp", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Delay", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 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": null, + "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": null, + "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": null, + "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": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "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": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "MA-dishwasher", + "deviceTypeRef": { + "code": 117, + "profileId": 259, + "label": "MA-dishwasher", + "name": "MA-dishwasher" + }, + "deviceTypes": [ + { + "code": 117, + "profileId": 259, + "label": "MA-dishwasher", + "name": "MA-dishwasher" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 117 + ], + "deviceTypeName": "MA-dishwasher", + "deviceTypeCode": 117, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Binding", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational State", + "code": 96, + "mfgCode": null, + "define": "OPERATIONAL_STATE_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Pause", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "Stop", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "Start", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "Resume", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "OperationalCommandResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "PhaseList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPhase", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalStateList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalState", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "OperationalStateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 3, + "name": "MA-electricalsensor", + "deviceTypeRef": { + "code": 1296, + "profileId": 259, + "label": "MA-electricalsensor", + "name": "MA-electricalsensor" + }, + "deviceTypes": [ + { + "code": 1296, + "profileId": 259, + "label": "MA-electricalsensor", + "name": "MA-electricalsensor" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 1296 + ], + "deviceTypeName": "MA-electricalsensor", + "deviceTypeCode": 1296, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Electrical Power Measurement", + "code": 144, + "mfgCode": null, + "define": "ELECTRICAL_POWER_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "PowerMode", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PowerModeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfMeasurementTypes", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Accuracy", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Ranges", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Voltage", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "voltage_mv", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveCurrent", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "amperage_ma", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ReactiveCurrent", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "amperage_ma", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ApparentCurrent", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "amperage_ma", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActivePower", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "power_mw", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ReactivePower", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "power_mw", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ApparentPower", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "power_mw", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RMSVoltage", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "voltage_mv", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RMSCurrent", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "amperage_ma", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RMSPower", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "power_mw", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Frequency", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "int64s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "HarmonicCurrents", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "HarmonicPhases", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PowerFactor", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int64s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NeutralCurrent", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "amperage_ma", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "MeasurementPeriodRanges", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Electrical Energy Measurement", + "code": 145, + "mfgCode": null, + "define": "ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Accuracy", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "MeasurementAccuracyStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CumulativeEnergyImported", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "EnergyMeasurementStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CumulativeEnergyReset", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "CumulativeEnergyResetStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "CumulativeEnergyMeasured", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Power Topology", + "code": 156, + "mfgCode": null, + "define": "POWER_TOPOLOGY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "AvailableEndpoints", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveEndpoints", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 4, + "name": "MA-deviceenergymanagement", + "deviceTypeRef": { + "code": 1293, + "profileId": 259, + "label": "Device Energy Management", + "name": "Device Energy Management" + }, + "deviceTypes": [ + { + "code": 1293, + "profileId": 259, + "label": "Device Energy Management", + "name": "Device Energy Management" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 1293 + ], + "deviceTypeName": "Device Energy Management", + "deviceTypeCode": 1293, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Device Energy Management", + "code": 152, + "mfgCode": null, + "define": "DEVICE_ENERGY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "PowerAdjustRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CancelPowerAdjustRequest", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StartTimeAdjustRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "PauseRequest", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ResumeRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ModifyForecastRequest", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RequestConstraintBasedForecast", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CancelRequest", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "ESAType", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "ESATypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ESACanGenerate", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ESAState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ESAStateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMinPower", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "power_mw", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMaxPower", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "power_mw", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PowerAdjustmentCapability", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "PowerAdjustCapabilityStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Forecast", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "ForecastStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OptOutState", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "OptOutStateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "PowerAdjustStart", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "PowerAdjustEnd", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Paused", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Resumed", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Device Energy Management Mode", + "code": 159, + "mfgCode": null, + "define": "DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "SupportedModes", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "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": "OnMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "MA-dishwasher", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "MA-electricalsensor", + "endpointTypeIndex": 2, + "profileId": 259, + "endpointId": 2, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "MA-deviceenergymanagement", + "endpointTypeIndex": 3, + "profileId": 259, + "endpointId": 3, + "networkId": 0, + "parentEndpointIdentifier": null + } + ] +} \ No newline at end of file diff --git a/examples/dishwasher-app/silabs/data_model/dishwasher-wifi-app.matter b/examples/dishwasher-app/silabs/data_model/dishwasher-wifi-app.matter new file mode 100644 index 0000000000..24abdb3986 --- /dev/null +++ b/examples/dishwasher-app/silabs/data_model/dishwasher-wifi-app.matter @@ -0,0 +1,2654 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + +enum TestGlobalEnum : enum8 { + kSomeValue = 0; + kSomeOtherValue = 1; + kFinalValue = 2; +} + +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + +bitmap TestGlobalBitmap : bitmap32 { + kFirstBit = 0x1; + kSecondBit = 0x2; +} + +struct TestGlobalStruct { + char_string<128> name = 0; + nullable TestGlobalBitmap myBitmap = 1; + optional nullable TestGlobalEnum myEnum = 2; +} + +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +cluster Identify = 3 { + revision 4; + + 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 description for Identify */ + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +cluster Descriptor = 29 { + revision 2; + + bitmap Feature : bitmap32 { + kTagList = 0x1; + } + + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute cluster_id serverList[] = 1; + readonly attribute cluster_id clientList[] = 2; + readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; + readonly attribute 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 Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ +cluster Binding = 30 { + revision 1; // NOTE: Default/not specifically set + + fabric_scoped struct TargetStruct { + optional node_id node = 1; + optional group_id group = 2; + optional endpoint_no endpoint = 3; + optional cluster_id cluster = 4; + fabric_idx fabricIndex = 254; + } + + attribute access(write: manage) TargetStruct binding[] = 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 Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ +cluster AccessControl = 31 { + revision 2; + + enum AccessControlEntryAuthModeEnum : enum8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : enum8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum AccessRestrictionTypeEnum : enum8 { + kAttributeAccessForbidden = 0; + kAttributeWriteForbidden = 1; + kCommandForbidden = 2; + kEventForbidden = 3; + } + + enum ChangeTypeEnum : enum8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + bitmap Feature : bitmap32 { + kExtension = 0x1; + kManagedDevice = 0x2; + } + + struct AccessRestrictionStruct { + AccessRestrictionTypeEnum type = 0; + nullable int32u id = 1; + } + + struct CommissioningAccessRestrictionEntryStruct { + endpoint_no endpoint = 0; + cluster_id cluster = 1; + AccessRestrictionStruct restrictions[] = 2; + } + + fabric_scoped struct AccessRestrictionEntryStruct { + fabric_sensitive endpoint_no endpoint = 0; + fabric_sensitive cluster_id cluster = 1; + fabric_sensitive AccessRestrictionStruct restrictions[] = 2; + fabric_idx fabricIndex = 254; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { + int64u token = 0; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute optional CommissioningAccessRestrictionEntryStruct commissioningARL[] = 5; + readonly attribute optional AccessRestrictionEntryStruct arl[] = 6; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ReviewFabricRestrictionsRequest { + CommissioningAccessRestrictionEntryStruct arl[] = 0; + } + + response struct ReviewFabricRestrictionsResponse = 1 { + int64u token = 0; + } + + /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +cluster BasicInformation = 40 { + revision 3; + + enum ColorEnum : enum8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : enum8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + int32u softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; + readonly attribute int32u specificationVersion = 21; + readonly attribute int16u maxPathsPerInvoke = 22; + readonly attribute 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 MfgSpecificPing(): DefaultSuccess = 0; +} + +/** Provides an interface for providing OTA software updates */ +cluster OtaSoftwareUpdateProvider = 41 { + revision 1; // NOTE: Default/not specifically set + + enum ApplyUpdateActionEnum : enum8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum DownloadProtocolEnum : enum8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHTTPS = 2; + kVendorSpecific = 3; + } + + enum StatusEnum : enum8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + DownloadProtocolEnum protocolsSupported[] = 3; + optional int16u hardwareVersion = 4; + optional char_string<2> location = 5; + optional boolean requestorCanConsent = 6; + optional octet_string<512> metadataForProvider = 7; + } + + response struct QueryImageResponse = 1 { + StatusEnum status = 0; + optional int32u delayedActionTime = 1; + optional char_string<256> imageURI = 2; + optional int32u softwareVersion = 3; + optional char_string<64> softwareVersionString = 4; + optional octet_string<32> updateToken = 5; + optional boolean userConsentNeeded = 6; + optional octet_string<512> metadataForRequestor = 7; + } + + request struct ApplyUpdateRequestRequest { + octet_string<32> updateToken = 0; + int32u newVersion = 1; + } + + response struct ApplyUpdateResponse = 3 { + ApplyUpdateActionEnum action = 0; + int32u delayedActionTime = 1; + } + + request struct NotifyUpdateAppliedRequest { + octet_string<32> updateToken = 0; + int32u softwareVersion = 1; + } + + /** Determine availability of a new Software Image */ + command QueryImage(QueryImageRequest): QueryImageResponse = 0; + /** Determine next action to take for a downloaded Software Image */ + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + /** Notify OTA Provider that an update was applied */ + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; +} + +/** Provides an interface for downloading and applying OTA software updates */ +cluster OtaSoftwareUpdateRequestor = 42 { + revision 1; // NOTE: Default/not specifically set + + enum AnnouncementReasonEnum : enum8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum ChangeReasonEnum : enum8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum UpdateStateEnum : enum8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + fabric_scoped struct ProviderLocation { + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + fabric_idx fabricIndex = 254; + } + + info event StateTransition = 0 { + UpdateStateEnum previousState = 0; + UpdateStateEnum newState = 1; + ChangeReasonEnum reason = 2; + nullable int32u targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + int32u softwareVersion = 0; + int16u productID = 1; + } + + info event DownloadError = 2 { + int32u softwareVersion = 0; + int64u bytesDownloaded = 1; + nullable int8u progressPercent = 2; + nullable int64s platformCode = 3; + } + + attribute access(write: administer) ProviderLocation defaultOTAProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute UpdateStateEnum updateState = 2; + readonly attribute nullable int8u updateStateProgress = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + AnnouncementReasonEnum announcementReason = 2; + optional octet_string<512> metadataForNode = 3; + endpoint_no endpoint = 4; + } + + /** Announce the presence of an OTA Provider */ + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; +} + +/** 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 */ +cluster LocalizationConfiguration = 43 { + revision 1; // NOTE: Default/not specifically set + + attribute access(write: manage) 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. */ +cluster TimeFormatLocalization = 44 { + revision 1; // NOTE: Default/not specifically set + + 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; + kUseActiveLocale = 255; + } + + enum HourFormatEnum : enum8 { + k12hr = 0; + k24hr = 1; + kUseActiveLocale = 255; + } + + bitmap Feature : bitmap32 { + kCalendarFormat = 0x1; + } + + attribute access(write: manage) HourFormatEnum hourFormat = 0; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional 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; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for the units in which values are conveyed in communication to a + user. As such, Nodes that visually or audibly convey measurable values to the user need a + mechanism by which they can be configured to use a user’s preferred unit. */ +cluster UnitLocalization = 45 { + revision 1; + + enum TempUnitEnum : enum8 { + kFahrenheit = 0; + kCelsius = 1; + kKelvin = 2; + } + + bitmap Feature : bitmap32 { + kTemperatureUnit = 0x1; + } + + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 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 manage global aspects of the Commissioning flow. */ +cluster GeneralCommissioning = 48 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningErrorEnum : enum8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; + } + + enum RegulatoryLocationTypeEnum : enum8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; + 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; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + char_string<2> countryCode = 1; + int64u breadcrumb = 2; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +cluster NetworkCommissioning = 49 { + revision 1; // NOTE: Default/not specifically set + + 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; + kPerDeviceCredentials = 0x8; + } + + bitmap ThreadCapabilitiesBitmap : bitmap16 { + kIsBorderRouterCapable = 0x1; + kIsRouterCapable = 0x2; + kIsSleepyEndDeviceCapable = 0x4; + kIsFullThreadDevice = 0x8; + kIsSynchronizedSleepyEndDeviceCapable = 0x10; + } + + bitmap WiFiSecurityBitmap : bitmap8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + provisional readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + provisional readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + provisional readonly attribute optional int16u threadVersion = 10; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + + request struct AddOrUpdateThreadNetworkRequest { + octet_string<254> operationalDataset = 0; + optional int64u breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + + request struct ConnectNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + + request struct ReorderNetworkRequest { + octet_string<32> networkID = 0; + int8u networkIndex = 1; + optional int64u breadcrumb = 2; + } + + request struct QueryIdentityRequest { + octet_string<20> keyIdentifier = 0; + optional octet_string<32> possessionNonce = 1; + } + + response struct QueryIdentityResponse = 10 { + octet_string<140> identity = 0; + optional octet_string<64> possessionSignature = 1; + } + + /** Detemine the set of networks the device sees as available. */ + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +cluster DiagnosticLogs = 50 { + revision 1; // NOTE: Default/not specifically set + + 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; + } + + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + long_octet_string logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster GeneralDiagnostics = 51 { + revision 2; + + enum BootReasonEnum : enum8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : enum8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : enum8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : enum8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + bitmap Feature : bitmap32 { + kDataModelTest = 0x1; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + } + + response struct TimeSnapshotResponse = 2 { + systime_ms systemTimeMs = 0; + nullable posix_ms posixTimeMs = 1; + } + + request struct PayloadTestRequestRequest { + octet_string<16> enableKey = 0; + int8u value = 1; + int16u count = 2; + } + + response struct PayloadTestResponse = 4 { + octet_string payload = 0; + } + + /** Provide a means for certification tests to trigger some test-plan-specific events */ + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ + command TimeSnapshot(): TimeSnapshotResponse = 1; + /** Request a variable length payload response. */ + command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; +} + +/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster SoftwareDiagnostics = 52 { + revision 1; // NOTE: Default/not specifically set + + 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 optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): 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. */ +cluster WiFiNetworkDiagnostics = 54 { + revision 1; // NOTE: Default/not specifically set + + 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 associationFailureCause = 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 optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional 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; + + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ + command ResetCounts(): DefaultSuccess = 0; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +cluster AdministratorCommissioning = 60 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningWindowStatusEnum : enum8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : enum8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + bitmap Feature : bitmap32 { + kBasic = 0x1; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable vendor_id adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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<32> salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +cluster OperationalCredentials = 62 { + revision 1; // NOTE: Default/not specifically set + + 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<32> attestationNonce = 0; + } + + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + + request struct CSRRequestRequest { + octet_string<32> CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + + request struct AddNOCRequest { + octet_string<400> NOCValue = 0; + optional octet_string<400> ICACValue = 1; + octet_string<16> IPKValue = 2; + int64u caseAdminSubject = 3; + vendor_id adminVendorId = 4; + } + + request struct UpdateNOCRequest { + octet_string NOCValue = 0; + optional octet_string ICACValue = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + + request struct UpdateFabricLabelRequest { + char_string<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + octet_string rootCACertificate = 0; + } + + /** Sender is requesting attestation information from the receiver. */ + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +cluster GroupKeyManagement = 63 { + revision 1; // NOTE: Default/not specifically set + + enum GroupKeySecurityPolicyEnum : enum8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : bitmap32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + int16u groupKeySetIDs[] = 0; + } + + /** Write a new set of keys for the given key set id. */ + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only +labels. */ +cluster FixedLabel = 64 { + revision 1; // NOTE: Default/not specifically set + + 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. */ +cluster UserLabel = 65 { + revision 1; // NOTE: Default/not specifically set + + 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; +} + +/** 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. */ +cluster OperationalState = 96 { + revision 1; + + enum ErrorStateEnum : enum8 { + kNoError = 0; + kUnableToStartOrResume = 1; + kUnableToCompleteOperation = 2; + kCommandInvalidInState = 3; + } + + enum OperationalStateEnum : enum8 { + kStopped = 0; + kRunning = 1; + kPaused = 2; + kError = 3; + } + + struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; + } + + struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; + } + + critical event OperationalError = 0 { + ErrorStateStruct errorState = 0; + } + + info event OperationCompletion = 1 { + enum8 completionErrorCode = 0; + optional nullable elapsed_s totalOperationalTime = 1; + optional nullable elapsed_s pausedTime = 2; + } + + readonly attribute nullable char_string phaseList[] = 0; + readonly attribute nullable int8u currentPhase = 1; + readonly attribute optional 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; + + response struct OperationalCommandResponse = 4 { + ErrorStateStruct commandResponseState = 0; + } + + /** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ + command Pause(): OperationalCommandResponse = 0; + /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ + command Stop(): OperationalCommandResponse = 1; + /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ + command Start(): OperationalCommandResponse = 2; + /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ + command Resume(): OperationalCommandResponse = 3; +} + +/** This cluster provides a mechanism for querying data about electrical power as measured by the server. */ +cluster ElectricalPowerMeasurement = 144 { + revision 1; + + enum MeasurementTypeEnum : enum16 { + kUnspecified = 0; + kVoltage = 1; + kActiveCurrent = 2; + kReactiveCurrent = 3; + kApparentCurrent = 4; + kActivePower = 5; + kReactivePower = 6; + kApparentPower = 7; + kRMSVoltage = 8; + kRMSCurrent = 9; + kRMSPower = 10; + kFrequency = 11; + kPowerFactor = 12; + kNeutralCurrent = 13; + kElectricalEnergy = 14; + } + + enum PowerModeEnum : enum8 { + kUnknown = 0; + kDC = 1; + kAC = 2; + } + + bitmap Feature : bitmap32 { + kDirectCurrent = 0x1; + kAlternatingCurrent = 0x2; + kPolyphasePower = 0x4; + kHarmonics = 0x8; + kPowerQuality = 0x10; + } + + struct MeasurementAccuracyRangeStruct { + int64s rangeMin = 0; + int64s rangeMax = 1; + optional percent100ths percentMax = 2; + optional percent100ths percentMin = 3; + optional percent100ths percentTypical = 4; + optional int64u fixedMax = 5; + optional int64u fixedMin = 6; + optional int64u fixedTypical = 7; + } + + struct MeasurementAccuracyStruct { + MeasurementTypeEnum measurementType = 0; + boolean measured = 1; + int64s minMeasuredValue = 2; + int64s maxMeasuredValue = 3; + MeasurementAccuracyRangeStruct accuracyRanges[] = 4; + } + + struct HarmonicMeasurementStruct { + int8u order = 0; + nullable int64s measurement = 1; + } + + struct MeasurementRangeStruct { + MeasurementTypeEnum measurementType = 0; + int64s min = 1; + int64s max = 2; + optional epoch_s startTimestamp = 3; + optional epoch_s endTimestamp = 4; + optional epoch_s minTimestamp = 5; + optional epoch_s maxTimestamp = 6; + optional systime_ms startSystime = 7; + optional systime_ms endSystime = 8; + optional systime_ms minSystime = 9; + optional systime_ms maxSystime = 10; + } + + info event MeasurementPeriodRanges = 0 { + MeasurementRangeStruct ranges[] = 0; + } + + readonly attribute PowerModeEnum powerMode = 0; + readonly attribute int8u numberOfMeasurementTypes = 1; + readonly attribute MeasurementAccuracyStruct accuracy[] = 2; + readonly attribute optional MeasurementRangeStruct ranges[] = 3; + readonly attribute optional nullable voltage_mv voltage = 4; + readonly attribute optional nullable amperage_ma activeCurrent = 5; + readonly attribute optional nullable amperage_ma reactiveCurrent = 6; + readonly attribute optional nullable amperage_ma apparentCurrent = 7; + readonly attribute nullable power_mw activePower = 8; + readonly attribute optional nullable power_mw reactivePower = 9; + readonly attribute optional nullable power_mw apparentPower = 10; + readonly attribute optional nullable voltage_mv RMSVoltage = 11; + readonly attribute optional nullable amperage_ma RMSCurrent = 12; + readonly attribute optional nullable power_mw RMSPower = 13; + readonly attribute optional nullable int64s frequency = 14; + readonly attribute optional nullable HarmonicMeasurementStruct harmonicCurrents[] = 15; + readonly attribute optional nullable HarmonicMeasurementStruct harmonicPhases[] = 16; + readonly attribute optional nullable int64s powerFactor = 17; + readonly attribute optional nullable amperage_ma neutralCurrent = 18; + 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 a mechanism for querying data about the electrical energy imported or provided by the server. */ +cluster ElectricalEnergyMeasurement = 145 { + revision 1; + + enum MeasurementTypeEnum : enum16 { + kUnspecified = 0; + kVoltage = 1; + kActiveCurrent = 2; + kReactiveCurrent = 3; + kApparentCurrent = 4; + kActivePower = 5; + kReactivePower = 6; + kApparentPower = 7; + kRMSVoltage = 8; + kRMSCurrent = 9; + kRMSPower = 10; + kFrequency = 11; + kPowerFactor = 12; + kNeutralCurrent = 13; + kElectricalEnergy = 14; + } + + bitmap Feature : bitmap32 { + kImportedEnergy = 0x1; + kExportedEnergy = 0x2; + kCumulativeEnergy = 0x4; + kPeriodicEnergy = 0x8; + } + + struct MeasurementAccuracyRangeStruct { + int64s rangeMin = 0; + int64s rangeMax = 1; + optional percent100ths percentMax = 2; + optional percent100ths percentMin = 3; + optional percent100ths percentTypical = 4; + optional int64u fixedMax = 5; + optional int64u fixedMin = 6; + optional int64u fixedTypical = 7; + } + + struct MeasurementAccuracyStruct { + MeasurementTypeEnum measurementType = 0; + boolean measured = 1; + int64s minMeasuredValue = 2; + int64s maxMeasuredValue = 3; + MeasurementAccuracyRangeStruct accuracyRanges[] = 4; + } + + struct CumulativeEnergyResetStruct { + optional nullable epoch_s importedResetTimestamp = 0; + optional nullable epoch_s exportedResetTimestamp = 1; + optional nullable systime_ms importedResetSystime = 2; + optional nullable systime_ms exportedResetSystime = 3; + } + + struct EnergyMeasurementStruct { + energy_mwh energy = 0; + optional epoch_s startTimestamp = 1; + optional epoch_s endTimestamp = 2; + optional systime_ms startSystime = 3; + optional systime_ms endSystime = 4; + } + + info event CumulativeEnergyMeasured = 0 { + optional EnergyMeasurementStruct energyImported = 0; + optional EnergyMeasurementStruct energyExported = 1; + } + + info event PeriodicEnergyMeasured = 1 { + optional EnergyMeasurementStruct energyImported = 0; + optional EnergyMeasurementStruct energyExported = 1; + } + + readonly attribute MeasurementAccuracyStruct accuracy = 0; + readonly attribute optional nullable EnergyMeasurementStruct cumulativeEnergyImported = 1; + readonly attribute optional nullable EnergyMeasurementStruct cumulativeEnergyExported = 2; + readonly attribute optional nullable EnergyMeasurementStruct periodicEnergyImported = 3; + readonly attribute optional nullable EnergyMeasurementStruct periodicEnergyExported = 4; + readonly attribute optional nullable CumulativeEnergyResetStruct cumulativeEnergyReset = 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; +} + +/** This cluster allows a client to manage the power draw of a device. An example of such a client could be an Energy Management System (EMS) which controls an Energy Smart Appliance (ESA). */ +provisional cluster DeviceEnergyManagement = 152 { + revision 4; + + enum AdjustmentCauseEnum : enum8 { + kLocalOptimization = 0; + kGridOptimization = 1; + } + + enum CauseEnum : enum8 { + kNormalCompletion = 0; + kOffline = 1; + kFault = 2; + kUserOptOut = 3; + kCancelled = 4; + } + + enum CostTypeEnum : enum8 { + kFinancial = 0; + kGHGEmissions = 1; + kComfort = 2; + kTemperature = 3; + } + + enum ESAStateEnum : enum8 { + kOffline = 0; + kOnline = 1; + kFault = 2; + kPowerAdjustActive = 3; + kPaused = 4; + } + + enum ESATypeEnum : enum8 { + kEVSE = 0; + kSpaceHeating = 1; + kWaterHeating = 2; + kSpaceCooling = 3; + kSpaceHeatingCooling = 4; + kBatteryStorage = 5; + kSolarPV = 6; + kFridgeFreezer = 7; + kWashingMachine = 8; + kDishwasher = 9; + kCooking = 10; + kHomeWaterPump = 11; + kIrrigationWaterPump = 12; + kPoolPump = 13; + kOther = 255; + } + + enum ForecastUpdateReasonEnum : enum8 { + kInternalOptimization = 0; + kLocalOptimization = 1; + kGridOptimization = 2; + } + + enum OptOutStateEnum : enum8 { + kNoOptOut = 0; + kLocalOptOut = 1; + kGridOptOut = 2; + kOptOut = 3; + } + + enum PowerAdjustReasonEnum : enum8 { + kNoAdjustment = 0; + kLocalOptimizationAdjustment = 1; + kGridOptimizationAdjustment = 2; + } + + bitmap Feature : bitmap32 { + kPowerAdjustment = 0x1; + kPowerForecastReporting = 0x2; + kStateForecastReporting = 0x4; + kStartTimeAdjustment = 0x8; + kPausable = 0x10; + kForecastAdjustment = 0x20; + kConstraintBasedAdjustment = 0x40; + } + + struct CostStruct { + CostTypeEnum costType = 0; + int32s value = 1; + int8u decimalPoints = 2; + optional int16u currency = 3; + } + + struct PowerAdjustStruct { + power_mw minPower = 0; + power_mw maxPower = 1; + elapsed_s minDuration = 2; + elapsed_s maxDuration = 3; + } + + struct PowerAdjustCapabilityStruct { + nullable PowerAdjustStruct powerAdjustCapability[] = 0; + PowerAdjustReasonEnum cause = 1; + } + + struct SlotStruct { + elapsed_s minDuration = 0; + elapsed_s maxDuration = 1; + elapsed_s defaultDuration = 2; + elapsed_s elapsedSlotTime = 3; + elapsed_s remainingSlotTime = 4; + optional boolean slotIsPausable = 5; + optional elapsed_s minPauseDuration = 6; + optional elapsed_s maxPauseDuration = 7; + optional int16u manufacturerESAState = 8; + optional power_mw nominalPower = 9; + optional power_mw minPower = 10; + optional power_mw maxPower = 11; + optional energy_mwh nominalEnergy = 12; + optional CostStruct costs[] = 13; + optional power_mw minPowerAdjustment = 14; + optional power_mw maxPowerAdjustment = 15; + optional elapsed_s minDurationAdjustment = 16; + optional elapsed_s maxDurationAdjustment = 17; + } + + struct ForecastStruct { + int32u forecastID = 0; + nullable int16u activeSlotNumber = 1; + epoch_s startTime = 2; + epoch_s endTime = 3; + optional nullable epoch_s earliestStartTime = 4; + optional epoch_s latestEndTime = 5; + boolean isPausable = 6; + SlotStruct slots[] = 7; + ForecastUpdateReasonEnum forecastUpdateReason = 8; + } + + struct ConstraintsStruct { + epoch_s startTime = 0; + elapsed_s duration = 1; + optional power_mw nominalPower = 2; + optional energy_mwh maximumEnergy = 3; + optional int8s loadControl = 4; + } + + struct SlotAdjustmentStruct { + int8u slotIndex = 0; + optional power_mw nominalPower = 1; + elapsed_s duration = 2; + } + + info event PowerAdjustStart = 0 { + } + + info event PowerAdjustEnd = 1 { + CauseEnum cause = 0; + elapsed_s duration = 1; + energy_mwh energyUse = 2; + } + + info event Paused = 2 { + } + + info event Resumed = 3 { + CauseEnum cause = 0; + } + + readonly attribute ESATypeEnum ESAType = 0; + readonly attribute boolean ESACanGenerate = 1; + readonly attribute ESAStateEnum ESAState = 2; + readonly attribute power_mw absMinPower = 3; + readonly attribute power_mw absMaxPower = 4; + readonly attribute optional nullable PowerAdjustCapabilityStruct powerAdjustmentCapability = 5; + readonly attribute optional nullable ForecastStruct forecast = 6; + readonly attribute optional OptOutStateEnum optOutState = 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 PowerAdjustRequestRequest { + power_mw power = 0; + elapsed_s duration = 1; + AdjustmentCauseEnum cause = 2; + } + + request struct StartTimeAdjustRequestRequest { + epoch_s requestedStartTime = 0; + AdjustmentCauseEnum cause = 1; + } + + request struct PauseRequestRequest { + elapsed_s duration = 0; + AdjustmentCauseEnum cause = 1; + } + + request struct ModifyForecastRequestRequest { + int32u forecastID = 0; + SlotAdjustmentStruct slotAdjustments[] = 1; + AdjustmentCauseEnum cause = 2; + } + + request struct RequestConstraintBasedForecastRequest { + ConstraintsStruct constraints[] = 0; + AdjustmentCauseEnum cause = 1; + } + + /** Allows a client to request an adjustment in the power consumption of an ESA for a specified duration. */ + command PowerAdjustRequest(PowerAdjustRequestRequest): DefaultSuccess = 0; + /** Allows a client to cancel an ongoing PowerAdjustmentRequest operation. */ + command CancelPowerAdjustRequest(): DefaultSuccess = 1; + /** Allows a client to adjust the start time of a Forecast sequence that has not yet started operation (i.e. where the current Forecast StartTime is in the future). */ + command StartTimeAdjustRequest(StartTimeAdjustRequestRequest): DefaultSuccess = 2; + /** Allows a client to temporarily pause an operation and reduce the ESAs energy demand. */ + command PauseRequest(PauseRequestRequest): DefaultSuccess = 3; + /** Allows a client to cancel the PauseRequest command and enable earlier resumption of operation. */ + command ResumeRequest(): DefaultSuccess = 4; + /** Allows a client to modify a Forecast within the limits allowed by the ESA. */ + command ModifyForecastRequest(ModifyForecastRequestRequest): DefaultSuccess = 5; + /** Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. */ + command RequestConstraintBasedForecast(RequestConstraintBasedForecastRequest): DefaultSuccess = 6; + /** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command. */ + command CancelRequest(): DefaultSuccess = 7; +} + +/** The Power Topology Cluster provides a mechanism for expressing how power is flowing between endpoints. */ +cluster PowerTopology = 156 { + revision 1; + + bitmap Feature : bitmap32 { + kNodeTopology = 0x1; + kTreeTopology = 0x2; + kSetTopology = 0x4; + kDynamicPowerFlow = 0x8; + } + + readonly attribute optional endpoint_no availableEndpoints[] = 0; + readonly attribute optional endpoint_no activeEndpoints[] = 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; +} + +/** Attributes and commands for selecting a mode from a list of supported options. */ +provisional cluster DeviceEnergyManagementMode = 159 { + revision 2; + + enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; + kNoOptimization = 16384; + kDeviceOptimization = 16385; + kLocalOptimization = 16386; + kGridOptimization = 16387; + } + + bitmap Feature : bitmap32 { + kOnOff = 0x1; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute ModeOptionStruct supportedModes[] = 0; + readonly attribute int8u currentMode = 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 ChangeToModeRequest { + int8u newMode = 0; + } + + response struct ChangeToModeResponse = 1 { + enum8 status = 0; + optional char_string<64> statusText = 1; + } + + /** This command is used to change device modes. */ + command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 1; + + binding cluster OtaSoftwareUpdateProvider; + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision; + } + + server cluster BasicInformation { + callback attribute dataModelRevision; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location; + callback attribute hardwareVersion; + callback attribute hardwareVersionString; + callback attribute softwareVersion; + callback attribute softwareVersionString; + callback attribute manufacturingDate; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster OtaSoftwareUpdateRequestor { + callback attribute defaultOTAProviders; + 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; + + handle command AnnounceOTAProvider; + } + + 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 UnitLocalization { + persist attribute temperatureUnit default = 1; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig; + callback attribute locationCapability; + callback attribute supportsConcurrentConnection; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command ArmFailSafe; + handle command ArmFailSafeResponse; + handle command SetRegulatoryConfig; + handle command SetRegulatoryConfigResponse; + handle command CommissioningComplete; + handle command CommissioningCompleteResponse; + } + + 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; + callback attribute supportedWiFiBands; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + + handle command ScanNetworks; + handle command ScanNetworksResponse; + handle command AddOrUpdateWiFiNetwork; + handle command AddOrUpdateThreadNetwork; + handle command RemoveNetwork; + handle command NetworkConfigResponse; + handle command ConnectNetwork; + handle command ConnectNetworkResponse; + handle command ReorderNetwork; + } + + server cluster DiagnosticLogs { + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command RetrieveLogsRequest; + } + + server cluster GeneralDiagnostics { + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount; + callback attribute upTime; + callback attribute totalOperationalHours; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command TestEventTrigger; + handle command TimeSnapshot; + handle command TimeSnapshotResponse; + } + + server cluster SoftwareDiagnostics { + emits event SoftwareFault; + callback attribute threadMetrics; + callback attribute currentHeapFree; + callback attribute currentHeapUsed; + callback attribute currentHeapHighWatermark; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + + handle command ResetWatermarks; + } + + server cluster WiFiNetworkDiagnostics { + callback attribute bssid; + callback attribute securityType; + callback attribute wiFiVersion; + callback attribute channelNumber; + callback attribute rssi; + callback attribute beaconLostCount; + callback attribute beaconRxCount; + callback attribute packetMulticastRxCount; + callback attribute packetMulticastTxCount; + callback attribute packetUnicastRxCount; + callback attribute packetUnicastTxCount; + callback attribute currentMaxRate; + callback attribute overrunCount; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + + handle command ResetCounts; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus; + callback attribute adminFabricIndex; + callback attribute adminVendorId; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command OpenCommissioningWindow; + handle command OpenBasicCommissioningWindow; + handle command RevokeCommissioning; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command AttestationRequest; + handle command AttestationResponse; + handle command CertificateChainRequest; + handle command CertificateChainResponse; + handle command CSRRequest; + handle command CSRResponse; + handle command AddNOC; + handle command UpdateNOC; + handle command NOCResponse; + handle command UpdateFabricLabel; + handle command RemoveFabric; + handle command AddTrustedRootCertificate; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command KeySetWrite; + handle command KeySetRead; + handle command KeySetReadResponse; + handle command KeySetRemove; + handle command KeySetReadAllIndices; + handle command KeySetReadAllIndicesResponse; + } + + 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 ma_dishwasher = 117, version 1; + + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x00; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + + handle command Identify; + handle command TriggerEffect; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster Binding { + callback attribute binding; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster OperationalState { + callback attribute phaseList; + callback attribute currentPhase; + callback attribute operationalStateList; + callback attribute operationalState; + callback attribute operationalError; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command Pause; + handle command Stop; + handle command Start; + handle command Resume; + handle command OperationalCommandResponse; + } +} +endpoint 2 { + device type ma_electricalsensor = 1296, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster ElectricalPowerMeasurement { + emits event MeasurementPeriodRanges; + callback attribute powerMode; + callback attribute numberOfMeasurementTypes; + callback attribute accuracy; + callback attribute ranges; + callback attribute voltage; + callback attribute activeCurrent; + callback attribute reactiveCurrent; + callback attribute apparentCurrent; + callback attribute activePower; + callback attribute reactivePower; + callback attribute apparentPower; + callback attribute RMSVoltage; + callback attribute RMSCurrent; + callback attribute RMSPower; + callback attribute frequency; + callback attribute harmonicCurrents; + callback attribute harmonicPhases; + callback attribute powerFactor; + callback attribute neutralCurrent; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster ElectricalEnergyMeasurement { + emits event CumulativeEnergyMeasured; + callback attribute accuracy; + callback attribute cumulativeEnergyImported; + callback attribute cumulativeEnergyReset; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster PowerTopology { + callback attribute availableEndpoints; + callback attribute activeEndpoints; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + } +} +endpoint 3 { + device type device_energy_management = 1293, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster DeviceEnergyManagement { + emits event PowerAdjustStart; + emits event PowerAdjustEnd; + emits event Paused; + emits event Resumed; + callback attribute ESAType; + callback attribute ESACanGenerate; + callback attribute ESAState; + callback attribute absMinPower; + callback attribute absMaxPower; + callback attribute powerAdjustmentCapability; + callback attribute forecast; + callback attribute optOutState; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 3; + + handle command PowerAdjustRequest; + handle command CancelPowerAdjustRequest; + handle command StartTimeAdjustRequest; + handle command PauseRequest; + handle command ResumeRequest; + handle command ModifyForecastRequest; + handle command RequestConstraintBasedForecast; + handle command CancelRequest; + } + + server cluster DeviceEnergyManagementMode { + callback attribute supportedModes; + callback attribute currentMode; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + + handle command ChangeToMode; + handle command ChangeToModeResponse; + } +} + + diff --git a/examples/dishwasher-app/silabs/data_model/dishwasher-wifi-app.zap b/examples/dishwasher-app/silabs/data_model/dishwasher-wifi-app.zap new file mode 100644 index 0000000000..61d3ad5f4c --- /dev/null +++ b/examples/dishwasher-app/silabs/data_model/dishwasher-wifi-app.zap @@ -0,0 +1,5189 @@ +{ + "fileFormat": 2, + "featureLevel": 100, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "category": "matter", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "id": 1, + "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "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": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPathsPerInvoke", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "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": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "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, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdatePossible", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "UpdateStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateStateProgress", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 1, + "storageOption": "NVM", + "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": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "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": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "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": null, + "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": "SupportedWiFiBands", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "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", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "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": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshot", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshotResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "SoftwareFault", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "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": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "MA-dishwasher", + "deviceTypeRef": { + "code": 117, + "profileId": 259, + "label": "MA-dishwasher", + "name": "MA-dishwasher" + }, + "deviceTypes": [ + { + "code": 117, + "profileId": 259, + "label": "MA-dishwasher", + "name": "MA-dishwasher" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 117 + ], + "deviceTypeName": "MA-dishwasher", + "deviceTypeCode": 117, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Binding", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational State", + "code": 96, + "mfgCode": null, + "define": "OPERATIONAL_STATE_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Pause", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "Stop", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "Start", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "Resume", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "OperationalCommandResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "PhaseList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPhase", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalStateList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalState", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "OperationalStateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 3, + "name": "MA-electricalsensor", + "deviceTypeRef": { + "code": 1296, + "profileId": 259, + "label": "MA-electricalsensor", + "name": "MA-electricalsensor" + }, + "deviceTypes": [ + { + "code": 1296, + "profileId": 259, + "label": "MA-electricalsensor", + "name": "MA-electricalsensor" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 1296 + ], + "deviceTypeName": "MA-electricalsensor", + "deviceTypeCode": 1296, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Electrical Power Measurement", + "code": 144, + "mfgCode": null, + "define": "ELECTRICAL_POWER_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "attributes": [ + { + "name": "PowerMode", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PowerModeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfMeasurementTypes", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Accuracy", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Ranges", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Voltage", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "voltage_mv", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveCurrent", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "amperage_ma", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ReactiveCurrent", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "amperage_ma", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ApparentCurrent", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "amperage_ma", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActivePower", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "power_mw", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ReactivePower", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "power_mw", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ApparentPower", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "power_mw", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RMSVoltage", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "voltage_mv", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RMSCurrent", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "amperage_ma", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RMSPower", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "power_mw", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Frequency", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "int64s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "HarmonicCurrents", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "HarmonicPhases", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PowerFactor", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int64s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NeutralCurrent", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "amperage_ma", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "MeasurementPeriodRanges", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Electrical Energy Measurement", + "code": 145, + "mfgCode": null, + "define": "ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "attributes": [ + { + "name": "Accuracy", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "MeasurementAccuracyStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CumulativeEnergyImported", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "EnergyMeasurementStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CumulativeEnergyReset", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "CumulativeEnergyResetStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "CumulativeEnergyMeasured", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Power Topology", + "code": 156, + "mfgCode": null, + "define": "POWER_TOPOLOGY_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "attributes": [ + { + "name": "AvailableEndpoints", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveEndpoints", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 4, + "name": "MA-deviceenergymanagement", + "deviceTypeRef": { + "code": 1293, + "profileId": 259, + "label": "Device Energy Management", + "name": "Device Energy Management" + }, + "deviceTypes": [ + { + "code": 1293, + "profileId": 259, + "label": "Device Energy Management", + "name": "Device Energy Management" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 1293 + ], + "deviceTypeName": "Device Energy Management", + "deviceTypeCode": 1293, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Device Energy Management", + "code": 152, + "mfgCode": null, + "define": "DEVICE_ENERGY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "PowerAdjustRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CancelPowerAdjustRequest", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StartTimeAdjustRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "PauseRequest", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ResumeRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ModifyForecastRequest", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RequestConstraintBasedForecast", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CancelRequest", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "ESAType", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "ESATypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ESACanGenerate", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ESAState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ESAStateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMinPower", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "power_mw", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMaxPower", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "power_mw", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PowerAdjustmentCapability", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Forecast", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "ForecastStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OptOutState", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "OptOutStateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "PowerAdjustStart", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "PowerAdjustEnd", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Paused", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Resumed", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Device Energy Management Mode", + "code": 159, + "mfgCode": null, + "define": "DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "SupportedModes", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "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": "OnMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "MA-dishwasher", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "MA-electricalsensor", + "endpointTypeIndex": 2, + "profileId": 259, + "endpointId": 2, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "MA-deviceenergymanagement", + "endpointTypeIndex": 3, + "profileId": 259, + "endpointId": 3, + "networkId": 0, + "parentEndpointIdentifier": null + } + ] +} \ No newline at end of file diff --git a/examples/dishwasher-app/silabs/include/AppConfig.h b/examples/dishwasher-app/silabs/include/AppConfig.h new file mode 100644 index 0000000000..c1633f454d --- /dev/null +++ b/examples/dishwasher-app/silabs/include/AppConfig.h @@ -0,0 +1,88 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * 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 "silabs_utils.h" + +// ---- Dishwasher Example App Config ---- + +#define APP_TASK_NAME "DishWasher" + +#define BLE_DEV_NAME "SL-Dishwasher" + +// Number of seconds between event and attribute updates for cumulative energy are emited +#define CUMULATIVE_REPORT_INTERVAL_SECONDS 60 + +// APP Logo, boolean only. must be 64x64 +#define ON_DEMO_BITMAP \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, \ + 0x00, 0xF0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x1E, 0x1E, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x1F, 0x1F, 0x00, \ + 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x1F, 0x1F, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x1F, 0x1F, 0x00, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x07, 0x0E, 0x0E, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, \ + 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, \ + 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x7F, 0xFF, \ + 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x7F, 0xFE, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x3F, 0xFC, 0xFF, 0xE0, 0xFF, 0xFF, \ + 0x07, 0xFF, 0x1F, 0xFC, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x1F, 0xF8, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x0F, 0xF0, \ + 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x0F, 0xF0, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x07, 0xE0, 0xFF, 0xE0, 0xFF, 0xFF, \ + 0x07, 0xFF, 0x07, 0xE0, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x03, 0xC0, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x03, 0xC0, \ + 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x01, 0x80, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x01, 0x80, 0xFF, 0xE0, 0xFF, 0xFF, \ + 0x07, 0xFF, 0x01, 0x80, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x01, 0x80, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x01, 0x80, \ + 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x01, 0x80, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x03, 0xC0, 0xFF, 0xE0, 0xFF, 0xFF, \ + 0x07, 0xFF, 0x03, 0xE0, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x0F, 0xF0, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x1F, 0xF8, \ + 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, \ + 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x07, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, \ + 0x00, 0xF8, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + +#define OFF_DEMO_BITMAP \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, \ + 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x0F, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x07, 0xFE, 0x00, 0x00, 0x00, \ + 0x00, 0xF0, 0xFF, 0x07, 0xFC, 0x01, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x0F, 0xF8, 0x03, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x1F, \ + 0xF0, 0x07, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0xE0, 0x0F, 0x0E, 0x00, 0x00, 0xE0, 0xFF, 0x7F, 0xC0, 0x1F, 0x1F, 0x00, \ + 0x00, 0xE0, 0xFF, 0xFF, 0x80, 0x3F, 0x1F, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x01, 0x7F, 0x1F, 0x00, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x03, 0xFE, 0x0E, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0xFC, 0x01, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0xF8, 0x03, 0x00, \ + 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0xF0, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0xE0, 0x0F, 0x00, 0x00, 0xE0, 0xFF, 0xFF, \ + 0x07, 0xC0, 0x1F, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x07, 0x81, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0x03, 0xFF, 0xFF, \ + 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0x07, 0xFE, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0x0F, 0xFC, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, \ + 0x07, 0x1F, 0xF8, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0x3F, 0xF0, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0x7F, 0xE0, 0xFF, \ + 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0xC0, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x81, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, \ + 0x07, 0xFF, 0x03, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x07, 0xFE, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x0F, 0xFC, \ + 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x0F, 0xF8, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x07, 0xF0, 0xFF, 0xE0, 0xFF, 0xFF, \ + 0x07, 0xFF, 0x07, 0xE0, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x03, 0xC0, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x03, 0x80, \ + 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x01, 0x00, 0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0x01, 0x00, 0xFE, 0xE0, 0xFF, 0xFF, \ + 0x07, 0xFF, 0x01, 0x00, 0xFC, 0xE1, 0xFF, 0xFF, 0x07, 0xFF, 0x01, 0x00, 0xF8, 0xE3, 0xFF, 0xFF, 0x07, 0xFF, 0x01, 0x00, \ + 0xF0, 0xE7, 0xFF, 0xFF, 0x07, 0xFF, 0x01, 0x00, 0xE0, 0xEF, 0xFF, 0xFF, 0x07, 0xFF, 0x03, 0x40, 0xC0, 0xFF, 0xFF, 0xFF, \ + 0x07, 0xFF, 0x03, 0xE0, 0x80, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0x0F, 0xF0, 0x01, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0x1F, 0xF8, \ + 0x03, 0xFE, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0x07, 0xFC, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0x0F, 0xF8, 0xFF, 0xFF, \ + 0x07, 0xFF, 0xFF, 0xFF, 0x1F, 0xF0, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0x3F, 0xE0, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, \ + 0x7F, 0xC0, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, \ + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x1F, 0x00, 0x00, 0x00, \ + 0x00, 0x08, 0xF8, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x3E, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF diff --git a/examples/dishwasher-app/silabs/include/AppEvent.h b/examples/dishwasher-app/silabs/include/AppEvent.h new file mode 100644 index 0000000000..259034e1b5 --- /dev/null +++ b/examples/dishwasher-app/silabs/include/AppEvent.h @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2018 Nest Labs, Inc. + * 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 + +struct AppEvent; +typedef void (*EventHandler)(AppEvent *); + +struct AppEvent +{ + enum AppEventTypes + { + kEventType_Button = 0, + kEventType_Timer, + kEventType_Dishwasher, + kEventType_Install, + }; + + uint16_t Type; + + union + { + struct + { + uint8_t Action; + } ButtonEvent; + struct + { + void * Context; + } TimerEvent; + struct + { + uint8_t Action; + int32_t Actor; + } DishwasherEvent; + }; + + EventHandler Handler; +}; diff --git a/examples/dishwasher-app/silabs/include/AppTask.h b/examples/dishwasher-app/silabs/include/AppTask.h new file mode 100644 index 0000000000..63cc97e849 --- /dev/null +++ b/examples/dishwasher-app/silabs/include/AppTask.h @@ -0,0 +1,103 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * 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 + +/********************************************************** + * Includes + *********************************************************/ +#include +#include +#include +#include + +#include "BaseApplication.h" + +/********************************************************** + * Defines + *********************************************************/ + +// Application-defined error codes in the CHIP_ERROR space. +#define APP_ERROR_EVENT_QUEUE_FAILED CHIP_APPLICATION_ERROR(0x01) +#define APP_ERROR_CREATE_TASK_FAILED CHIP_APPLICATION_ERROR(0x02) +#define APP_ERROR_UNHANDLED_EVENT CHIP_APPLICATION_ERROR(0x03) +#define APP_ERROR_CREATE_TIMER_FAILED CHIP_APPLICATION_ERROR(0x04) +#define APP_ERROR_START_TIMER_FAILED CHIP_APPLICATION_ERROR(0x05) +#define APP_ERROR_STOP_TIMER_FAILED CHIP_APPLICATION_ERROR(0x06) + +/********************************************************** + * AppTask Declaration + *********************************************************/ +class AppTask : public BaseApplication +{ + +public: + AppTask() = default; + + static AppTask & GetAppTask() { return sAppTask; } + + /** + * @brief AppTask task main loop function + * + * @param pvParameter FreeRTOS task parameter + */ + static void AppTaskMain(void * pvParameter); + + CHIP_ERROR StartAppTask(); + + /** + * @brief Event handler when a button is pressed + * Function posts an event for button processing + * + * @param buttonHandle APP_CONTROL_BUTTON or APP_FUNCTION_BUTTON + * @param btnAction Button action - SL_SIMPLE_BUTTON_PRESSED, + * SL_SIMPLE_BUTTON_RELEASED or + * SL_SIMPLE_BUTTON_DISABLED + */ + static void ButtonEventHandler(uint8_t button, uint8_t btnAction); + +private: + static AppTask sAppTask; + /** + * @brief AppTask initialisation function + * + * @return CHIP_ERROR + */ + CHIP_ERROR Init(); + + /** + * @brief PB0 Button event processing function + * Press and hold will trigger a factory reset timer start + * Press and release will restart BLEAdvertising if not commisionned + * + * @param aEvent button event being processed + */ + static void ButtonHandler(AppEvent * aEvent); + + /** + * @brief PB1 Button event processing function + * Function triggers a switch action sent to the CHIP task + * + * @param aEvent button event being processed + */ + static void DishwasherActionEventHandler(AppEvent * aEvent); + + static void ActionInitiated(chip::app::Clusters::OperationalState::OperationalStateEnum action); + static void ActionCompleted(); +}; diff --git a/examples/dishwasher-app/silabs/include/CHIPProjectConfig.h b/examples/dishwasher-app/silabs/include/CHIPProjectConfig.h new file mode 100644 index 0000000000..57d85a4830 --- /dev/null +++ b/examples/dishwasher-app/silabs/include/CHIPProjectConfig.h @@ -0,0 +1,102 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * 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. +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif + +// For convenience, Chip Security Test Mode can be enabled and the +// requirement for authentication in various protocols can be disabled. +// +// WARNING: These options make it possible to circumvent basic Chip security functionality, +// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. +// +#define CHIP_CONFIG_SECURITY_TEST_MODE 0 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID + * + * 0xFFF1: Test vendor + */ +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID + * + * 0x8005: example Dishwasher + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8005 + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + * + * Enable support for Chip-over-BLE (CHIPoBLE). + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 + +/** + * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER + * + * Enables the use of a hard-coded default serial number if none + * is found in Chip NV storage. + */ +#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE + * + * A size, in bytes, of the individual debug event logging buffer. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) + +/** + * @def CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL + * + * @brief + * Active retransmit interval, or time to wait before retransmission after + * subsequent failures in milliseconds. + * + * This is the default value, that might be adjusted by end device depending on its + * needs (e.g. sleeping period) using Service Discovery TXT record CRA key. + * + */ +#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL (2000_ms32) diff --git a/examples/platform/silabs/TemperatureSensor.h b/examples/dishwasher-app/silabs/include/DataModelHelper.h similarity index 69% rename from examples/platform/silabs/TemperatureSensor.h rename to examples/dishwasher-app/silabs/include/DataModelHelper.h index 116287e9a3..df46629269 100644 --- a/examples/platform/silabs/TemperatureSensor.h +++ b/examples/dishwasher-app/silabs/include/DataModelHelper.h @@ -1,7 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. + * Copyright (c) 2024 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,10 +18,10 @@ #pragma once -#include "sl_status.h" -#include +#include -namespace TemperatureSensor { -sl_status_t Init(); -sl_status_t GetTemp(uint32_t * relativeHumidity, int16_t * temperature); -}; // namespace TemperatureSensor +namespace DataModelHelper { + +chip::EndpointId GetEndpointIdFromCluster(chip::ClusterId clusterId); + +} // namespace DataModelHelper diff --git a/examples/darwin-framework-tool/include/CHIPProjectAppConfig.h b/examples/dishwasher-app/silabs/include/DeviceEnergyManager.h similarity index 59% rename from examples/darwin-framework-tool/include/CHIPProjectAppConfig.h rename to examples/dishwasher-app/silabs/include/DeviceEnergyManager.h index 6f1764a52d..9b9e1b548e 100644 --- a/examples/darwin-framework-tool/include/CHIPProjectAppConfig.h +++ b/examples/dishwasher-app/silabs/include/DeviceEnergyManager.h @@ -1,5 +1,7 @@ /* + * * 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. @@ -14,18 +16,22 @@ * limitations under the License. */ -/** - * @file - * Project configuration for Darwin Framework Tool. - * - */ -#ifndef CHIPPROJECTCONFIG_H -#define CHIPPROJECTCONFIG_H +#pragma once + +#include + +class DeviceEnergyManager +{ +public: + ~DeviceEnergyManager() { Shutdown(); } + + static DeviceEnergyManager & Instance(void) { return sDeviceEnergy; } -// Enable some test-only interaction model APIs. -#define CONFIG_BUILD_FOR_HOST_UNIT_TEST 1 + chip::app::Clusters::DeviceEnergyManagement::DeviceEnergyManagementDelegate * GetDEMDelegate(); -// Allow us, for test purposes, to encode invalid enum values. -#define CHIP_CONFIG_IM_ENABLE_ENCODING_SENTINEL_ENUM_VALUES 1 + CHIP_ERROR Init(); + void Shutdown(); -#endif /* CHIPPROJECTCONFIG_H */ +private: + static DeviceEnergyManager sDeviceEnergy; +}; diff --git a/examples/dishwasher-app/silabs/include/DishwasherManager.h b/examples/dishwasher-app/silabs/include/DishwasherManager.h new file mode 100644 index 0000000000..f832e6f0b5 --- /dev/null +++ b/examples/dishwasher-app/silabs/include/DishwasherManager.h @@ -0,0 +1,99 @@ +/* + * + * Copyright (c) 2019 Google LLC. + * 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 "AppEvent.h" +#include +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace DeviceEnergyManagement { + +class DishwasherManager : public DEMManufacturerDelegate +{ + using OperationalStateEnum = chip::app::Clusters::OperationalState::OperationalStateEnum; + +public: + static constexpr int64_t kApproximateEnergyUsedByESA = 1800'000; // mW + + DishwasherManager(DeviceEnergyManagementManager * aDEMInstance) : mDEMInstance(aDEMInstance) {} + virtual ~DishwasherManager() {} + + CHIP_ERROR Init(); + void CycleOperationalState(); + void UpdateDishwasherLed(); + void UpdateOperationState(OperationalStateEnum state); + OperationalStateEnum GetOperationalState(); + + typedef void (*Callback_fn_initiated)(OperationalStateEnum action); + typedef void (*Callback_fn_completed)(); + void SetCallbacks(Callback_fn_initiated aActionInitiated_CB, Callback_fn_completed aActionCompleted_CB); + + DeviceEnergyManagementDelegate * GetDEMDelegate() + { + if (mDEMInstance) + { + return mDEMInstance->GetDelegate(); + } + return nullptr; + } + + // The PowerAdjustEnd event needs to report the approximate energy used by the ESA during the session. + int64_t GetApproxEnergyDuringSession() override; + + CHIP_ERROR HandleDeviceEnergyManagementPowerAdjustRequest(const int64_t powerMw, const uint32_t durationS, + AdjustmentCauseEnum cause) override; + CHIP_ERROR HandleDeviceEnergyManagementPowerAdjustCompletion() override; + + CHIP_ERROR HandleDeviceEnergyManagementCancelPowerAdjustRequest(CauseEnum cause) override; + CHIP_ERROR HandleDeviceEnergyManagementStartTimeAdjustRequest(const uint32_t requestedStartTimeUtc, + AdjustmentCauseEnum cause) override; + CHIP_ERROR HandleDeviceEnergyManagementPauseRequest(const uint32_t durationS, AdjustmentCauseEnum cause) override; + CHIP_ERROR HandleDeviceEnergyManagementPauseCompletion() override; + CHIP_ERROR HandleDeviceEnergyManagementCancelPauseRequest(CauseEnum cause) override; + CHIP_ERROR HandleDeviceEnergyManagementCancelRequest() override; + CHIP_ERROR + HandleModifyForecastRequest(const uint32_t forecastID, + const DataModel::DecodableList & slotAdjustments, + AdjustmentCauseEnum cause) override; + CHIP_ERROR RequestConstraintBasedForecast( + const DataModel::DecodableList & constraints, + AdjustmentCauseEnum cause) override; + +private: + OperationalStateEnum mState; + + Callback_fn_initiated mActionInitiated_CB; + Callback_fn_completed mActionCompleted_CB; + + // DEM Manufacturer Delegate + DeviceEnergyManagementManager * mDEMInstance; +}; + +DishwasherManager * GetDishwasherManager(); + +} // namespace DeviceEnergyManagement +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/dishwasher-app/silabs/include/ElectricalEnergyMeasurementInstance.h b/examples/dishwasher-app/silabs/include/ElectricalEnergyMeasurementInstance.h new file mode 100644 index 0000000000..dba13b3a51 --- /dev/null +++ b/examples/dishwasher-app/silabs/include/ElectricalEnergyMeasurementInstance.h @@ -0,0 +1,75 @@ +/* + * + * Copyright (c) 2024 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 "AppConfig.h" +#include "AppEvent.h" +#include "ElectricalPowerMeasurementDelegate.h" +#include +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace ElectricalEnergyMeasurement { + +class ElectricalEnergyMeasurementInstance : public ElectricalEnergyMeasurementAttrAccess +{ +public: + static constexpr uint32_t kTimerPeriodms = 1000; // Timer period 1000 ms + static constexpr uint32_t kAttributeFrequency = + CUMULATIVE_REPORT_INTERVAL_SECONDS; // Number of seconds between reports for cumulative energy + + ElectricalEnergyMeasurementInstance(EndpointId aEndpointId, + ElectricalPowerMeasurement::ElectricalPowerMeasurementDelegate & aEPMDelegate, + BitMask aFeature, BitMask aOptionalAttrs) : + ElectricalEnergyMeasurementAttrAccess::ElectricalEnergyMeasurementAttrAccess(aFeature, aOptionalAttrs), + mEndpointId(aEndpointId) + { + mEPMDelegate = &aEPMDelegate; + } + + // Delete copy constructor and assignment operator + ElectricalEnergyMeasurementInstance(const ElectricalEnergyMeasurementInstance &) = delete; + ElectricalEnergyMeasurementInstance(const ElectricalEnergyMeasurementInstance &&) = delete; + ElectricalEnergyMeasurementInstance & operator=(const ElectricalEnergyMeasurementInstance &) = delete; + + CHIP_ERROR Init(); + void Shutdown(); + + ElectricalPowerMeasurement::ElectricalPowerMeasurementDelegate * GetEPMDelegate() { return mEPMDelegate; } + + void StartTimer(uint32_t aTimeoutMs); + void CancelTimer(); + +private: + ElectricalPowerMeasurement::ElectricalPowerMeasurementDelegate * mEPMDelegate; + EndpointId mEndpointId; + osTimerId_t mTimer; + + CHIP_ERROR InitTimer(); + + static void TimerEventHandler(void * timerCbArg); + static void UpdateEnergyAttributesAndNotify(AppEvent * aEvent); +}; + +} // namespace ElectricalEnergyMeasurement +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/dishwasher-app/silabs/include/ElectricalSensorManager.h b/examples/dishwasher-app/silabs/include/ElectricalSensorManager.h new file mode 100644 index 0000000000..3d1cfd234a --- /dev/null +++ b/examples/dishwasher-app/silabs/include/ElectricalSensorManager.h @@ -0,0 +1,37 @@ +/* + * + * Copyright (c) 2024 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 + +class ElectricalSensorManager +{ + using OperationalStateEnum = chip::app::Clusters::OperationalState::OperationalStateEnum; + +public: + ~ElectricalSensorManager() { Shutdown(); } + + static ElectricalSensorManager & Instance(void) { return sElectricalSensor; } + + CHIP_ERROR Init(); + void Shutdown(); + + void UpdateEPMAttributes(OperationalStateEnum state); + +private: + static ElectricalSensorManager sElectricalSensor; +}; diff --git a/examples/dishwasher-app/silabs/include/PowerTopologyDelegateImpl.h b/examples/dishwasher-app/silabs/include/PowerTopologyDelegateImpl.h new file mode 100644 index 0000000000..c33729fc43 --- /dev/null +++ b/examples/dishwasher-app/silabs/include/PowerTopologyDelegateImpl.h @@ -0,0 +1,50 @@ +/* + * + * Copyright (c) 2024 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 + +namespace chip { +namespace app { +namespace Clusters { +namespace PowerTopology { + +class PowerTopologyDelegateImpl : public PowerTopologyDelegate +{ +public: + ~PowerTopologyDelegateImpl() = default; + + CHIP_ERROR GetAvailableEndpointAtIndex(size_t index, EndpointId & endpointId) override; + CHIP_ERROR GetActiveEndpointAtIndex(size_t index, EndpointId & endpointId) override; + + CHIP_ERROR AddActiveEndpoint(EndpointId endpointId); + CHIP_ERROR RemoveActiveEndpoint(EndpointId endpointId); + + void InitAvailableEndpointList(); + +private: + EndpointId mAvailableEndpointIdList[MAX_ENDPOINT_COUNT]; + EndpointId mActiveEndpointIdList[MAX_ENDPOINT_COUNT]; +}; + +} // namespace PowerTopology +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/dishwasher-app/silabs/include/operational-state-delegate-impl.h b/examples/dishwasher-app/silabs/include/operational-state-delegate-impl.h new file mode 100644 index 0000000000..8b8d24e115 --- /dev/null +++ b/examples/dishwasher-app/silabs/include/operational-state-delegate-impl.h @@ -0,0 +1,90 @@ +/* + * + * Copyright (c) 2024 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 + +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 countdown time. This attribute is not used in this application. + * @return The current countdown time. + */ + DataModel::Nullable GetCountdownTime() override { return {}; } + + CHIP_ERROR GetOperationalStateAtIndex(size_t index, GenericOperationalState & operationalState) override; + CHIP_ERROR GetOperationalPhaseAtIndex(size_t index, MutableCharSpan & operationalPhase) override; + + void HandlePauseStateCallback(GenericOperationalError & err) override; + void HandleResumeStateCallback(GenericOperationalError & err) override; + void HandleStartStateCallback(GenericOperationalError & err) override; + void HandleStopStateCallback(GenericOperationalError & err) override; + + /** + * @brief Calls the MatterPostAttributeChangeCallback for the modified attribute on the operationalState instance + * + * @param attributeId Id of the attribute that changed + * @param type Type of the attribute + * @param size Size of the attribute data + * @param value Value of the attribute data + */ + + /** + * @brief Calls the MatterPostAttributeChangeCallback for the modified attribute on the operationalState instance + * + * @param attributeId Id of the attribute that changed + * @param type Type of the attribute + * @param size Size of the attribute data + * @param value Value of the attribute data + */ + void PostAttributeChangeCallback(AttributeId attributeId, uint8_t type, uint16_t size, uint8_t * value); + + void SetEndpointId(EndpointId endpointId); + +private: + const GenericOperationalState rvcOpStateList[4] = { + GenericOperationalState(to_underlying(OperationalStateEnum::kStopped)), + GenericOperationalState(to_underlying(OperationalStateEnum::kRunning)), + GenericOperationalState(to_underlying(OperationalStateEnum::kPaused)), + GenericOperationalState(to_underlying(OperationalStateEnum::kError)), + }; + + EndpointId mEndpointId; + + DataModel::List mOperationalStateList = Span(rvcOpStateList); + const Span mOperationalPhaseList; +}; + +OperationalState::Instance * GetInstance(); +OperationalState::OperationalStateDelegate * GetDelegate(); +void Shutdown(); + +} // namespace OperationalState +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/dishwasher-app/silabs/openthread.gn b/examples/dishwasher-app/silabs/openthread.gn new file mode 100644 index 0000000000..b05216fc9d --- /dev/null +++ b/examples/dishwasher-app/silabs/openthread.gn @@ -0,0 +1,29 @@ +# 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/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 = { + target_cpu = "arm" + target_os = "freertos" + chip_openthread_ftd = true + + import("//openthread.gni") +} diff --git a/examples/dishwasher-app/silabs/openthread.gni b/examples/dishwasher-app/silabs/openthread.gni new file mode 100644 index 0000000000..6794214248 --- /dev/null +++ b/examples/dishwasher-app/silabs/openthread.gni @@ -0,0 +1,28 @@ +# 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}/config/standalone/args.gni") +import("${chip_root}/src/platform/silabs/efr32/args.gni") + +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") + +app_data_model = + "${chip_root}/examples/dishwasher-app/silabs/data_model:silabs-dishwasher" +chip_enable_ota_requestor = true +chip_enable_openthread = true +sl_enable_test_event_trigger = true + +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" diff --git a/examples/dishwasher-app/silabs/src/AppTask.cpp b/examples/dishwasher-app/silabs/src/AppTask.cpp new file mode 100644 index 0000000000..948f1b590b --- /dev/null +++ b/examples/dishwasher-app/silabs/src/AppTask.cpp @@ -0,0 +1,237 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * 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 "AppConfig.h" +#include "AppEvent.h" +#include "AppTask.h" +#include "DeviceEnergyManager.h" +#include "DishwasherManager.h" +#include "ElectricalSensorManager.h" +#include "operational-state-delegate-impl.h" + +#include +#include + +#define APP_FUNCTION_BUTTON 0 +#define APP_CONTROL_BUTTON 1 + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::OperationalState; +using namespace chip::app::Clusters::DeviceEnergyManagement; +using namespace chip::DeviceLayer; +using namespace chip::DeviceLayer::Silabs; +using namespace chip::TLV; + +AppTask AppTask::sAppTask; + +#if SL_MATTER_TEST_EVENT_TRIGGER_ENABLED +static EnergyReportingTestEventTriggerHandler sEnergyReportingTestEventTriggerHandler; +static DeviceEnergyManagementTestEventTriggerHandler sDeviceEnergyManagementTestEventTriggerHandler; +#endif + +CHIP_ERROR AppTask::Init() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + chip::DeviceLayer::Silabs::GetPlatform().SetButtonsCb(AppTask::ButtonEventHandler); + +#ifdef DISPLAY_ENABLED + GetLCD().Init((uint8_t *) "Dishwasher-App"); +#endif + + err = BaseApplication::Init(); + if (err != CHIP_NO_ERROR) + { + SILABS_LOG("BaseApplication::Init() failed"); + appError(err); + } + + PlatformMgr().LockChipStack(); + err = DeviceEnergyManager::Instance().Init(); + PlatformMgr().UnlockChipStack(); + if (err != CHIP_NO_ERROR) + { + SILABS_LOG("DeviceEnergyMgr.Init() failed"); + appError(err); + } + + PlatformMgr().LockChipStack(); + err = ElectricalSensorManager::Instance().Init(); + PlatformMgr().UnlockChipStack(); + if (err != CHIP_NO_ERROR) + { + SILABS_LOG("ElectricalSensorMgr.Init() failed"); + appError(err); + } + +#if SL_MATTER_TEST_EVENT_TRIGGER_ENABLED + // Register DEM & Electrical Sensor Test Event Trigger + if (Server::GetInstance().GetTestEventTriggerDelegate() != nullptr) + { + Server::GetInstance().GetTestEventTriggerDelegate()->AddHandler(&sEnergyReportingTestEventTriggerHandler); + Server::GetInstance().GetTestEventTriggerDelegate()->AddHandler(&sDeviceEnergyManagementTestEventTriggerHandler); + } +#endif + + GetDishwasherManager()->SetCallbacks(ActionInitiated, ActionCompleted); + + // Set the initial state of the dishwasher + OperationalStateEnum state = static_cast(OperationalState::GetInstance()->GetCurrentOperationalState()); + GetDishwasherManager()->UpdateOperationState(state); + +// Update the LCD with the Stored value. Show QR Code if not provisioned +#ifdef DISPLAY_ENABLED + GetLCD().WriteDemoUI((GetDishwasherManager()->GetOperationalState() == OperationalStateEnum::kRunning)); +#ifdef QR_CODE_ENABLED +#ifdef SL_WIFI + if (!ConnectivityMgr().IsWiFiStationProvisioned()) +#else + if (!ConnectivityMgr().IsThreadProvisioned()) +#endif /* !SL_WIFI */ + { + GetLCD().ShowQRCode(true); + } +#endif // QR_CODE_ENABLED +#endif + + return err; +} + +CHIP_ERROR AppTask::StartAppTask() +{ + return BaseApplication::StartAppTask(AppTaskMain); +} + +void AppTask::AppTaskMain(void * pvParameter) +{ + AppEvent event; + osMessageQueueId_t sAppEventQueue = *(static_cast(pvParameter)); + + CHIP_ERROR err = sAppTask.Init(); + if (err != CHIP_NO_ERROR) + { + SILABS_LOG("AppTask.Init() failed"); + appError(err); + } + +#if !(defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER) + sAppTask.StartStatusLEDTimer(); +#endif + + SILABS_LOG("App Task started"); + + while (true) + { + osStatus_t eventReceived = osMessageQueueGet(sAppEventQueue, &event, NULL, osWaitForever); + while (eventReceived == osOK) + { + sAppTask.DispatchEvent(&event); + eventReceived = osMessageQueueGet(sAppEventQueue, &event, NULL, 0); + } + } +} + +void AppTask::DishwasherActionEventHandler(AppEvent * aEvent) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + if (aEvent->Type != AppEvent::kEventType_Button) + { + err = APP_ERROR_UNHANDLED_EVENT; + } + + if (CHIP_NO_ERROR == err) + { + GetDishwasherManager()->CycleOperationalState(); + } +} + +void AppTask::ButtonEventHandler(uint8_t button, uint8_t btnAction) +{ + AppEvent button_event = {}; + button_event.Type = AppEvent::kEventType_Button; + button_event.ButtonEvent.Action = btnAction; + + if ((button == APP_CONTROL_BUTTON) && (btnAction == static_cast(SilabsPlatform::ButtonAction::ButtonPressed))) + { + button_event.Handler = DishwasherActionEventHandler; + AppTask::GetAppTask().PostEvent(&button_event); + } + else if (button == APP_FUNCTION_BUTTON) + { + button_event.Handler = BaseApplication::ButtonHandler; + AppTask::GetAppTask().PostEvent(&button_event); + } +} + +void AppTask::ActionInitiated(OperationalStateEnum action) +{ + // Action initiated, update the dishwasher state led + if (action == OperationalStateEnum::kRunning) + { + SILABS_LOG("Starting dishwasher"); + } + else if (action == OperationalStateEnum::kStopped) + { + SILABS_LOG("Stoping dishwasher"); + } + else if (action == OperationalStateEnum::kPaused) + { + SILABS_LOG("Pausing dishwasher"); + } + else + { + SILABS_LOG("Action error"); + action = OperationalStateEnum::kError; + } + + PlatformMgr().LockChipStack(); + CHIP_ERROR err = Clusters::OperationalState::GetInstance()->SetOperationalState(to_underlying(action)); + PlatformMgr().UnlockChipStack(); + if (err != CHIP_NO_ERROR) + { + SILABS_LOG("ERR: updating Operational state %x", err); + } + else + { + GetDishwasherManager()->UpdateOperationState(action); + ElectricalSensorManager::Instance().UpdateEPMAttributes(action); + } +} + +void AppTask::ActionCompleted() +{ +#ifdef DISPLAY_ENABLED + sAppTask.GetLCD().WriteDemoUI((GetDishwasherManager()->GetOperationalState() == OperationalStateEnum::kRunning)); +#endif +} diff --git a/examples/dishwasher-app/silabs/src/DataModelHelper.cpp b/examples/dishwasher-app/silabs/src/DataModelHelper.cpp new file mode 100644 index 0000000000..477699f17f --- /dev/null +++ b/examples/dishwasher-app/silabs/src/DataModelHelper.cpp @@ -0,0 +1,42 @@ +/* + * + * Copyright (c) 2024 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 "DataModelHelper.h" + +using namespace chip; + +EndpointId DataModelHelper::GetEndpointIdFromCluster(ClusterId clusterId) +{ + for (uint16_t index = 0; index < emberAfEndpointCount(); index++) + { + if (emberAfEndpointIndexIsEnabled(index)) + { + EndpointId endpointId = emberAfEndpointFromIndex(index); + + if (emberAfContainsServer(endpointId, clusterId)) + { + return endpointId; + } + } + } + + return kInvalidEndpointId; +} diff --git a/examples/dishwasher-app/silabs/src/DeviceEnergyManager.cpp b/examples/dishwasher-app/silabs/src/DeviceEnergyManager.cpp new file mode 100644 index 0000000000..db7bdf853a --- /dev/null +++ b/examples/dishwasher-app/silabs/src/DeviceEnergyManager.cpp @@ -0,0 +1,167 @@ +/* + * + * Copyright (c) 2024 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 "AppConfig.h" +#include "AppTask.h" + +#include "DataModelHelper.h" +#include "DeviceEnergyManagementDelegateImpl.h" +#include "DeviceEnergyManager.h" +#include "DishwasherManager.h" +#include "EnergyTimeUtils.h" + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::DeviceEnergyManagement; + +DeviceEnergyManager DeviceEnergyManager::sDeviceEnergy; + +namespace { +std::unique_ptr gDEMDelegate; +std::unique_ptr gDEMInstance; +std::unique_ptr gDishwasherManager; +} // namespace + +DeviceEnergyManagement::DeviceEnergyManagementDelegate * GetDEMDelegate() +{ + VerifyOrDieWithMsg(gDEMDelegate.get() != nullptr, AppServer, "DEM Delegate is null"); + return gDEMDelegate.get(); +} + +DishwasherManager * DeviceEnergyManagement::GetDishwasherManager() +{ + VerifyOrDieWithMsg(gDEMDelegate.get() != nullptr, AppServer, "Dishwasher Manager is null"); + return gDishwasherManager.get(); +} + +/* + * @brief Creates a Delegate and Instance for DEM + * + * The Instance is a container around the Delegate, so + * create the Delegate first, then wrap it in the Instance + * Then call the Instance->Init() to register the attribute and command handlers + */ +CHIP_ERROR DeviceEnergyManagementInit() +{ + EndpointId DEMEndpointId = DataModelHelper::GetEndpointIdFromCluster(DeviceEnergyManagement::Id); + CHIP_ERROR err; + + VerifyOrReturnError((DEMEndpointId != kInvalidEndpointId), CHIP_ERROR_INCORRECT_STATE, + ChipLogError(AppServer, "DEM Cluster not configured")); + + // Initialize DEM (Device Energy Management) and DEMManufacturer (Device Energy Management Manufacturer) + VerifyOrReturnError(!gDEMDelegate && !gDEMInstance, CHIP_ERROR_INCORRECT_STATE, + ChipLogError(AppServer, "DEM Delegate or Instance already exist")); + + gDEMDelegate = std::make_unique(); + VerifyOrReturnError(gDEMDelegate, CHIP_ERROR_NO_MEMORY, ChipLogError(AppServer, "Failed to allocate memory for DEM Delegate")); + + // Manufacturer may optionally not support all features, commands & attributes + // DeviceEnergyManagement::Feature::kStateForecastReporting is removed from the specification [!PA].a,(STA|PAU|FA|CON),O + static uint32_t featureMap = static_cast(DeviceEnergyManagement::Feature::kPowerForecastReporting) + + static_cast(DeviceEnergyManagement::Feature::kStartTimeAdjustment) + + static_cast(DeviceEnergyManagement::Feature::kPausable); + BitMask fmap(featureMap); + + gDEMInstance = std::make_unique(DEMEndpointId, *gDEMDelegate, fmap); + + VerifyOrReturnError(gDEMInstance, CHIP_ERROR_NO_MEMORY, ChipLogError(AppServer, "Failed to allocate memory for DEM Instance"); + gDEMDelegate.reset()); + + gDEMDelegate->SetDeviceEnergyManagementInstance(*gDEMInstance); + + // Register Attribute & Command handlers + err = gDEMInstance->Init(); + VerifyOrReturnError(CHIP_NO_ERROR == err, err, ChipLogError(AppServer, "Init failed on gDEMInstance"); gDEMInstance.reset(); + gDEMDelegate.reset()); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DeviceEnergyManagementShutdown() +{ + /* Do this in the order Instance first, then delegate + * Ensure we call the Instance->Shutdown to free attribute & command handlers first + */ + if (gDEMInstance) + { + /* deregister attribute & command handlers */ + gDEMInstance->Shutdown(); + gDEMInstance.reset(); + } + if (gDEMDelegate) + { + gDEMDelegate.reset(); + } + return CHIP_NO_ERROR; +} + +CHIP_ERROR DeviceEnergyManager::Init() +{ + CHIP_ERROR err; + + err = DeviceEnergyManagementInit(); + VerifyOrReturnError(CHIP_NO_ERROR == err, err, ChipLogError(AppServer, "DEM Init failed"); DeviceEnergyManagementShutdown();); + + // DEM Manufacturer + VerifyOrReturnError(!gDishwasherManager, CHIP_ERROR_INCORRECT_STATE, + ChipLogError(AppServer, "Dishwasher manager already initialized");); + + gDishwasherManager = std::make_unique(gDEMInstance.get()); + VerifyOrReturnError(gDishwasherManager, CHIP_ERROR_NO_MEMORY, + ChipLogError(AppServer, "Failed to allocate memory for DEM ManufacturerDelegate")); + + err = gDishwasherManager->Init(); + VerifyOrReturnError(CHIP_NO_ERROR == err, err, ChipLogError(AppServer, "Init failed on gDishwasherManager")); + + gDEMDelegate->SetDEMManufacturerDelegate(*gDishwasherManager.get()); + + return CHIP_NO_ERROR; +} + +void DeviceEnergyManager::Shutdown() +{ + /* Do this in the order Instance first, then delegate + * Ensure we call the Instance->Shutdown to free attribute & command handlers first + */ + + // Shutdown DEM + if (gDEMInstance) + { + // Deregister attribute & command handlers + gDEMInstance->Shutdown(); + gDEMInstance.reset(); + } + + if (gDEMDelegate) + { + gDEMDelegate.reset(); + } + + // Shutdown DEMManufacturer + if (gDishwasherManager) + { + gDishwasherManager.reset(); + } +} + +DeviceEnergyManagementDelegate * DeviceEnergyManager::GetDEMDelegate() +{ + return gDEMDelegate.get(); +}; diff --git a/examples/dishwasher-app/silabs/src/DishwasherManager.cpp b/examples/dishwasher-app/silabs/src/DishwasherManager.cpp new file mode 100644 index 0000000000..01f30e70f5 --- /dev/null +++ b/examples/dishwasher-app/silabs/src/DishwasherManager.cpp @@ -0,0 +1,209 @@ +/* + * + * Copyright (c) 2024 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 "LEDWidget.h" + +#include "AppConfig.h" +#include "AppTask.h" +#include "DishwasherManager.h" +#include "operational-state-delegate-impl.h" + +#ifdef SL_CATALOG_SIMPLE_LED_LED1_PRESENT +#define DW_STATE_LED 1 +#else +#define DW_STATE_LED 0 +#endif + +namespace { +LEDWidget sDishwasherLED; +} + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::OperationalState; +using namespace chip::app::Clusters::DeviceEnergyManagement; +using namespace chip::DeviceLayer; + +CHIP_ERROR DishwasherManager::Init() +{ + sDishwasherLED.Init(DW_STATE_LED); + AppTask::GetAppTask().LinkAppLed(&sDishwasherLED); + + chip::app::Clusters::DeviceEnergyManagement::DeviceEnergyManagementDelegate * dem = GetDEMDelegate(); + VerifyOrReturnLogError(dem != nullptr, CHIP_ERROR_UNINITIALIZED); + + /* For Device Energy Management we need the ESA to be Online and ready to accept commands */ + dem->SetESAState(ESAStateEnum::kOnline); + dem->SetESAType(ESATypeEnum::kDishwasher); + + // Set the abs min and max power + dem->SetAbsMinPower(1200000); // 1.2KW + dem->SetAbsMaxPower(7600000); // 7.6KW + + return CHIP_NO_ERROR; +} + +OperationalStateEnum DishwasherManager::GetOperationalState() +{ + return mState; +} + +void DishwasherManager::UpdateDishwasherLed() +{ + OperationalStateEnum opState = GetOperationalState(); + sDishwasherLED.Set(false); + + switch (opState) + { + case OperationalStateEnum::kRunning: + sDishwasherLED.Set(true); + break; + case OperationalStateEnum::kPaused: + sDishwasherLED.Blink(300, 700); + break; + case OperationalStateEnum::kError: + sDishwasherLED.Blink(100); + break; + default: + break; + } +} + +void DishwasherManager::SetCallbacks(Callback_fn_initiated aActionInitiated_CB, Callback_fn_completed aActionCompleted_CB) +{ + mActionInitiated_CB = aActionInitiated_CB; + mActionCompleted_CB = aActionCompleted_CB; +} + +void DishwasherManager::CycleOperationalState() +{ + if (mActionInitiated_CB) + { + OperationalStateEnum action; + switch (mState) + { + case OperationalStateEnum::kRunning: + action = OperationalStateEnum::kPaused; + break; + case OperationalStateEnum::kPaused: + action = OperationalStateEnum::kStopped; + break; + case OperationalStateEnum::kStopped: + action = OperationalStateEnum::kRunning; + break; + case OperationalStateEnum::kError: + action = OperationalStateEnum::kStopped; + break; + default: + break; + } + mActionInitiated_CB(action); + } +} + +void DishwasherManager::UpdateOperationState(OperationalStateEnum state) +{ + mState = state; + UpdateDishwasherLed(); + + if (mActionCompleted_CB) + { + mActionCompleted_CB(); + } +} + +int64_t DishwasherManager::GetApproxEnergyDuringSession() +{ + return kApproximateEnergyUsedByESA; +}; + +CHIP_ERROR DishwasherManager::HandleDeviceEnergyManagementPowerAdjustRequest(const int64_t powerMw, const uint32_t durationS, + AdjustmentCauseEnum cause) +{ + // Currently not implemented by our dishwasher app + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR DishwasherManager::HandleDeviceEnergyManagementPowerAdjustCompletion() +{ + // Currently not implemented by our dishwasher app + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR DishwasherManager::HandleDeviceEnergyManagementCancelPowerAdjustRequest(CauseEnum cause) +{ + // Currently not implemented by our dishwasher app + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +// kNoOptOut = 0x00, +// kLocalOptOut = 0x01, +// kGridOptOut = 0x02, +// kOptOut = 0x03, +CHIP_ERROR DishwasherManager::HandleDeviceEnergyManagementStartTimeAdjustRequest(const uint32_t requestedStartTimeUtc, + AdjustmentCauseEnum cause) +{ + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.Handler = nullptr; + AppTask::GetAppTask().PostEvent(&event); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DishwasherManager::HandleDeviceEnergyManagementPauseRequest(const uint32_t durationS, AdjustmentCauseEnum cause) +{ + mActionInitiated_CB(OperationalStateEnum::kPaused); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DishwasherManager::HandleDeviceEnergyManagementPauseCompletion() +{ + mActionInitiated_CB(OperationalStateEnum::kRunning); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DishwasherManager::HandleDeviceEnergyManagementCancelPauseRequest(CauseEnum cause) +{ + mActionInitiated_CB(OperationalStateEnum::kRunning); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DishwasherManager::HandleDeviceEnergyManagementCancelRequest() +{ + mActionInitiated_CB(OperationalStateEnum::kStopped); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DishwasherManager::HandleModifyForecastRequest( + const uint32_t forecastId, const DataModel::DecodableList & slotAdjustments, + AdjustmentCauseEnum cause) +{ + // Currently not implemented by our dishwasher app + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + +CHIP_ERROR DishwasherManager::RequestConstraintBasedForecast( + const DataModel::DecodableList & constraints, + AdjustmentCauseEnum cause) +{ + // Currently not implemented by our dishwasher app + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} diff --git a/examples/dishwasher-app/silabs/src/ElectricalEnergyMeasurementInstance.cpp b/examples/dishwasher-app/silabs/src/ElectricalEnergyMeasurementInstance.cpp new file mode 100644 index 0000000000..2d48dd821d --- /dev/null +++ b/examples/dishwasher-app/silabs/src/ElectricalEnergyMeasurementInstance.cpp @@ -0,0 +1,193 @@ +/* + * + * Copyright (c) 2024 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 "AppConfig.h" +#include "AppTask.h" +#include "ElectricalEnergyMeasurementInstance.h" +#include "EnergyTimeUtils.h" + +#define mWms_TO_mWh(power) ((power) / 3600'000) + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::DeviceEnergyManagement; +using namespace chip::app::Clusters::ElectricalEnergyMeasurement; +using namespace chip::app::Clusters::ElectricalEnergyMeasurement::Attributes; +using namespace chip::app::Clusters::ElectricalEnergyMeasurement::Structs; +using namespace chip::app::DataModel; + +// Example of setting CumulativeEnergyReset structure - for now set these to 0 +// but the manufacturer may want to store these in non volatile storage for timestamp (based on epoch_s) +// Create an accuracy entry which is between +/-0.5 and +/- 5% across the range of all possible energy readings +static const MeasurementAccuracyRangeStruct::Type kEnergyAccuracyRanges[] = { + { .rangeMin = 0, + .rangeMax = 1'000'000'000'000'000, // 1 million Mwh + .percentMax = MakeOptional(static_cast(500)), + .percentMin = MakeOptional(static_cast(50)) } +}; + +static const MeasurementAccuracyStruct::Type kAccuracy = { + .measurementType = MeasurementTypeEnum::kElectricalEnergy, + .measured = false, // this should be made true in an implementation where a real metering device is used. + .minMeasuredValue = 0, + .maxMeasuredValue = 1'000'000'000'000'000, // 1 million Mwh + .accuracyRanges = List(kEnergyAccuracyRanges) +}; + +static const CumulativeEnergyResetStruct::Type kResetStruct = { + .importedResetTimestamp = MakeOptional(MakeNullable(static_cast(0))), + .exportedResetTimestamp = MakeOptional(MakeNullable(static_cast(0))), + .importedResetSystime = MakeOptional(MakeNullable(static_cast(0))), + .exportedResetSystime = MakeOptional(MakeNullable(static_cast(0))), +}; + +static EnergyMeasurementStruct::Type sCumulativeImported = { + .energy = static_cast(0), +}; + +static const EnergyMeasurementStruct::Type sCumulativeExported = { + .energy = static_cast(0), +}; + +namespace { +ElectricalPowerMeasurement::ElectricalPowerMeasurementDelegate * gEPMDelegate; +EndpointId gEndpointId; +int64_t sCumulativeActivePower = 0; +uint8_t sSecondsSinceUpdate = 0; +} // namespace + +CHIP_ERROR ElectricalEnergyMeasurementInstance::Init() +{ + // Initialize attributes + SetMeasurementAccuracy(mEndpointId, kAccuracy); + SetCumulativeReset(mEndpointId, MakeOptional(kResetStruct)); + + // Assign class attributes to instantiated global variables + // for the access to TimerEventHandler + gEPMDelegate = GetEPMDelegate(); + gEndpointId = mEndpointId; + + CHIP_ERROR err; + + uint32_t currentTimestamp; + ReturnErrorOnFailure(GetEpochTS(currentTimestamp)); + + sCumulativeImported.startTimestamp.SetValue(currentTimestamp); + sCumulativeImported.startSystime.SetValue(System::SystemClock().GetMonotonicTimestamp().count()); + + // Initialize and start timer to calculate cumulative energy + err = InitTimer(); + VerifyOrReturnError(CHIP_NO_ERROR == err, err, ChipLogError(AppServer, "Init failed on EEM Timer")); + + StartTimer(kTimerPeriodms); + + return ElectricalEnergyMeasurementAttrAccess::Init(); +} + +void ElectricalEnergyMeasurementInstance::Shutdown() +{ + CancelTimer(); + ElectricalEnergyMeasurementAttrAccess::Shutdown(); +} + +CHIP_ERROR ElectricalEnergyMeasurementInstance::InitTimer() +{ + // Create cmsis os sw timer for EEM Cumulative timer + mTimer = osTimerNew(TimerEventHandler, // Timer callback handler + osTimerPeriodic, // Timer reload + (void *) this, // Pass the app task obj context + NULL // No osTimerAttr_t to provide. + ); + + VerifyOrReturnError(mTimer != NULL, APP_ERROR_CREATE_TIMER_FAILED, SILABS_LOG("Timer create failed")); + + return CHIP_NO_ERROR; +} + +void ElectricalEnergyMeasurementInstance::StartTimer(uint32_t aTimeoutMs) +{ + // Start or restart the function timer + if (osTimerStart(mTimer, pdMS_TO_TICKS(aTimeoutMs)) != osOK) + { + SILABS_LOG("Timer start failed"); + appError(APP_ERROR_START_TIMER_FAILED); + } +} + +void ElectricalEnergyMeasurementInstance::CancelTimer() +{ + if (osTimerStop(mTimer) == osError) + { + SILABS_LOG("Timer stop failed"); + appError(APP_ERROR_STOP_TIMER_FAILED); + } +} + +void ElectricalEnergyMeasurementInstance::TimerEventHandler(void * timerCbArg) +{ + // Get different EPM Active Power values according to operational mode change + Nullable EPMActivePower = gEPMDelegate ? gEPMDelegate->GetActivePower() : Nullable(0); + int64_t activePower = (EPMActivePower.IsNull()) ? 0 : EPMActivePower.Value(); + + // Calculate cumulative imported active power + sCumulativeActivePower += activePower; + sSecondsSinceUpdate += 1; + + if (sSecondsSinceUpdate >= ElectricalEnergyMeasurementInstance::kAttributeFrequency) + { + sSecondsSinceUpdate = 0; + + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.Handler = UpdateEnergyAttributesAndNotify; + AppTask::GetAppTask().PostEvent(&event); + } +} + +void ElectricalEnergyMeasurementInstance::UpdateEnergyAttributesAndNotify(AppEvent * aEvent) +{ + // cumulativeImported update code - To update energy (mWs to mWh), startSystime and endSystime + // Convert the unit : mW * ms -> mWh + sCumulativeImported.energy = mWms_TO_mWh(sCumulativeActivePower * kTimerPeriodms); + + uint32_t currentTimestamp; + if (GetEpochTS(currentTimestamp) == CHIP_NO_ERROR) + { + // Use EpochTS + sCumulativeImported.endTimestamp.SetValue(currentTimestamp); + } + + sCumulativeImported.endSystime.SetValue(System::SystemClock().GetMonotonicTimestamp().count()); + + // Call the SDK to update attributes and generate an event + chip::DeviceLayer::PlatformMgr().LockChipStack(); + NotifyCumulativeEnergyMeasured(gEndpointId, MakeOptional(sCumulativeImported), MakeOptional(sCumulativeExported)); + MatterReportingAttributeChangeCallback(gEndpointId, ElectricalEnergyMeasurement::Id, CumulativeEnergyImported::Id); + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); +} diff --git a/examples/dishwasher-app/silabs/src/ElectricalSensorManager.cpp b/examples/dishwasher-app/silabs/src/ElectricalSensorManager.cpp new file mode 100644 index 0000000000..c751c71c26 --- /dev/null +++ b/examples/dishwasher-app/silabs/src/ElectricalSensorManager.cpp @@ -0,0 +1,215 @@ +/* + * + * Copyright (c) 2024 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 "AppConfig.h" +#include "AppTask.h" +#include "DataModelHelper.h" +#include "DishwasherManager.h" +#include "ElectricalEnergyMeasurementInstance.h" +#include "ElectricalSensorManager.h" +#include "EnergyTimeUtils.h" +#include "PowerTopologyDelegate.h" +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::ElectricalEnergyMeasurement; +using namespace chip::app::Clusters::ElectricalEnergyMeasurement::Structs; +using namespace chip::app::Clusters::ElectricalPowerMeasurement; +using namespace chip::app::Clusters::DeviceEnergyManagement; +using namespace chip::app::Clusters::OperationalState; +using namespace chip::app::Clusters::PowerTopology; +using namespace chip::app::DataModel; + +ElectricalSensorManager ElectricalSensorManager::sElectricalSensor; + +static std::unique_ptr gEEMInstance; +static std::unique_ptr gEPMDelegate; +static std::unique_ptr gEPMInstance; +static std::unique_ptr gPTDelegate; +static std::unique_ptr gPTInstance; + +static const struct +{ + PowerModeEnum PowerMode; + int64_t Voltage; // mV + int64_t ActiveCurrent; // mA + int64_t ActivePower; // mW + int64_t Frequency; // Hz +} kAttributes[4] = { + { PowerModeEnum::kAc, 120'000, 0, 0, 60 }, // kStopped + { PowerModeEnum::kAc, 120'000, 15'000, 1800'000, 60 }, // kRunning + { PowerModeEnum::kAc, 120'000, 125, 17'000, 60 }, // kPaused + { PowerModeEnum::kUnknown, 0, 0, 0, 0 } // kError +}; + +/* + * @brief Creates a Delegate and Instance for Electrical Power/Energy Measurement and Power Topology clusters + * + * The Instance is a container around the Delegate, so + * create the Delegate first, then wrap it in the Instance + * Then call the Instance->Init() to register the attribute and command handlers + */ +CHIP_ERROR ElectricalSensorManager::Init() +{ + EndpointId EPMEndpointId = DataModelHelper::GetEndpointIdFromCluster(ElectricalPowerMeasurement::Id); + EndpointId EEMEndpointId = DataModelHelper::GetEndpointIdFromCluster(ElectricalEnergyMeasurement::Id); + EndpointId PTEndpointId = DataModelHelper::GetEndpointIdFromCluster(PowerTopology::Id); + CHIP_ERROR err; + + VerifyOrReturnError((EPMEndpointId != kInvalidEndpointId) && (EEMEndpointId != kInvalidEndpointId) && + (PTEndpointId != kInvalidEndpointId), + CHIP_ERROR_INCORRECT_STATE, ChipLogError(AppServer, "EPM, EEM or PT Cluster not configured")); + + // Initialize EPM (Electrical Power Management) + VerifyOrReturnError(!gEPMDelegate && !gEPMInstance, CHIP_ERROR_INCORRECT_STATE, + ChipLogError(AppServer, "EPM Delegate or Instance already exist")); + + gEPMDelegate = std::make_unique(); + VerifyOrReturnError(gEPMDelegate, CHIP_ERROR_NO_MEMORY, ChipLogError(AppServer, "Failed to allocate memory for EPM Delegate")); + + /* Manufacturer may optionally not support all features, commands & attributes */ + /* Turning on all optional features and attributes for test certification purposes */ + gEPMInstance = std::make_unique( + EPMEndpointId, *gEPMDelegate, + BitMask(ElectricalPowerMeasurement::Feature::kDirectCurrent, + ElectricalPowerMeasurement::Feature::kAlternatingCurrent), + BitMask( + ElectricalPowerMeasurement::OptionalAttributes::kOptionalAttributeVoltage, + ElectricalPowerMeasurement::OptionalAttributes::kOptionalAttributeActiveCurrent)); + + VerifyOrReturnError(gEPMInstance, CHIP_ERROR_NO_MEMORY, ChipLogError(AppServer, "Failed to allocate memory for EPM Instance"); + gEPMDelegate.reset()); + + // Register Attribute & Command handlers + err = gEPMInstance->Init(); + VerifyOrReturnError(CHIP_NO_ERROR == err, err, ChipLogError(AppServer, "Init failed on gEPMInstance"); gEPMInstance.reset(); + gEPMDelegate.reset()); + + // Initialize EPM attributes + OperationalStateEnum state = GetDishwasherManager()->GetOperationalState(); + UpdateEPMAttributes(state); + + // Initialize EEM (Electrical Energy Management) + VerifyOrReturnError(!gEEMInstance, CHIP_ERROR_INCORRECT_STATE, ChipLogError(AppServer, "EEM Instance already exist")); + + gEEMInstance = std::make_unique( + EEMEndpointId, *gEPMDelegate, + BitMask(ElectricalEnergyMeasurement::Feature::kImportedEnergy, + ElectricalEnergyMeasurement::Feature::kCumulativeEnergy), + BitMask( + ElectricalEnergyMeasurement::OptionalAttributes::kOptionalAttributeCumulativeEnergyReset)); + + VerifyOrReturnError(gEEMInstance, CHIP_ERROR_NO_MEMORY, ChipLogError(AppServer, "Failed to allocate memory for EEM Instance")); + + // Register Attribute & Command handlers + err = gEEMInstance->Init(); + VerifyOrReturnError(CHIP_NO_ERROR == err, err, ChipLogError(AppServer, "Init failed on gEEMInstance"); gPTInstance.reset()); + + // Initialize PT (Power Topology) + VerifyOrReturnError(!gPTDelegate && !gPTInstance, CHIP_ERROR_INCORRECT_STATE, + ChipLogError(AppServer, "PowerTopology Delegate or Instance already exist")); + + gPTDelegate = std::make_unique(); + VerifyOrReturnError(gPTDelegate, CHIP_ERROR_NO_MEMORY, ChipLogError(AppServer, "Failed to allocate memory for PT Delegate")); + + gPTInstance = std::make_unique( + PTEndpointId, *gPTDelegate, BitMask(PowerTopology::Feature::kNodeTopology), + BitMask()); + + VerifyOrReturnError(gPTInstance, CHIP_ERROR_NO_MEMORY, ChipLogError(AppServer, "Failed to allocate memory for PT Instance"); + gPTDelegate.reset()); + + // Register Attribute & Command handlers + err = gPTInstance->Init(); + VerifyOrReturnError(CHIP_NO_ERROR == err, err, ChipLogError(AppServer, "Init failed on gPTInstance"); gPTInstance.reset(); + gPTDelegate.reset();); + + return CHIP_NO_ERROR; +} + +void ElectricalSensorManager::Shutdown() +{ + /* Do this in the order Instance first, then delegate + * Ensure we call the Instance->Shutdown to free attribute & command handlers first + */ + + // Shutdown PT (Power Topology) + if (gPTInstance) + { + // Deregister attribute & command handlers + gPTInstance->Shutdown(); + gPTInstance.reset(); + } + + if (gPTDelegate) + { + gPTDelegate.reset(); + } + + // Shutdown EEM (Electrical Energy Management) + if (gEEMInstance) + { + // Deregister attribute & command handlers + gEEMInstance->Shutdown(); + gEEMInstance.reset(); + } + + // Shutdown EPM (Electrical Power Management) + if (gEPMInstance) + { + // Deregister attribute & command handlers + gEPMInstance->Shutdown(); + gEPMInstance.reset(); + } + + if (gEPMDelegate) + { + gEPMDelegate.reset(); + } +} + +void ElectricalSensorManager::UpdateEPMAttributes(OperationalStateEnum state) +{ + if (gEPMDelegate) + { + uint16_t updateState = to_underlying(state); + uint16_t ERROR_STATE_INDEX = ArraySize(kAttributes) - 1; + // Check state range + if ((updateState < 0) || (updateState > ERROR_STATE_INDEX)) + { + updateState = ERROR_STATE_INDEX; + } + + ChipLogDetail(AppServer, "UpdateAllAttributes to Operational State : %d", updateState); + + // Added to support testing using a static array for now + gEPMDelegate->SetPowerMode(kAttributes[updateState].PowerMode); + gEPMDelegate->SetVoltage(MakeNullable(kAttributes[updateState].Voltage)); + gEPMDelegate->SetActiveCurrent(MakeNullable(kAttributes[updateState].ActiveCurrent)); + gEPMDelegate->SetActivePower(MakeNullable(kAttributes[updateState].ActivePower)); + } +} diff --git a/examples/dishwasher-app/silabs/src/PowerTopologyDelegateImpl.cpp b/examples/dishwasher-app/silabs/src/PowerTopologyDelegateImpl.cpp new file mode 100644 index 0000000000..7e3a68a707 --- /dev/null +++ b/examples/dishwasher-app/silabs/src/PowerTopologyDelegateImpl.cpp @@ -0,0 +1,101 @@ +/* + * + * Copyright (c) 2024 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 "PowerTopologyDelegateImpl.h" + +using namespace chip; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::PowerTopology; + +CHIP_ERROR PowerTopologyDelegateImpl::GetAvailableEndpointAtIndex(size_t index, EndpointId & endpointId) +{ + VerifyOrReturnError(index < ArraySize(mAvailableEndpointIdList), CHIP_ERROR_PROVIDER_LIST_EXHAUSTED); + + endpointId = mAvailableEndpointIdList[index]; + + return (endpointId == kInvalidEndpointId) ? CHIP_ERROR_INVALID_ARGUMENT : CHIP_NO_ERROR; +} + +CHIP_ERROR PowerTopologyDelegateImpl::GetActiveEndpointAtIndex(size_t index, EndpointId & endpointId) +{ + VerifyOrReturnError(index < ArraySize(mActiveEndpointIdList), CHIP_ERROR_PROVIDER_LIST_EXHAUSTED); + + endpointId = mActiveEndpointIdList[index]; + + return (endpointId == kInvalidEndpointId) ? CHIP_ERROR_INVALID_ARGUMENT : CHIP_NO_ERROR; +} + +CHIP_ERROR PowerTopologyDelegateImpl::AddActiveEndpoint(EndpointId endpointId) +{ + bool AvailableEndpointFlag = false; + bool ActiveEndpointFlag = false; + uint16_t availableIndexToAdd = MAX_ENDPOINT_COUNT; + + for (uint16_t index = 0; index < MAX_ENDPOINT_COUNT; index++) + { + if (mAvailableEndpointIdList[index] == endpointId) + { + AvailableEndpointFlag = true; + } + if (mActiveEndpointIdList[index] == endpointId) + { + ActiveEndpointFlag = true; + } + if (mActiveEndpointIdList[index] == kInvalidEndpointId) + { + availableIndexToAdd = index; + } + } + + // Availability and duplication check + VerifyOrReturnError(AvailableEndpointFlag && !ActiveEndpointFlag && (availableIndexToAdd != MAX_ENDPOINT_COUNT), + CHIP_ERROR_INVALID_ARGUMENT); + + mActiveEndpointIdList[availableIndexToAdd] = endpointId; + + return CHIP_NO_ERROR; +} + +CHIP_ERROR PowerTopologyDelegateImpl::RemoveActiveEndpoint(EndpointId endpointId) +{ + for (uint16_t index = 0; index < MAX_ENDPOINT_COUNT; index++) + { + if (mActiveEndpointIdList[index] == endpointId) + { + mActiveEndpointIdList[index] = kInvalidEndpointId; + return CHIP_NO_ERROR; + } + } + + return CHIP_ERROR_INVALID_ARGUMENT; +} + +void PowerTopologyDelegateImpl::InitAvailableEndpointList() +{ + for (uint16_t index = 0; index < MAX_ENDPOINT_COUNT; index++) + { + mAvailableEndpointIdList[index] = + (emberAfEndpointIndexIsEnabled(index)) ? emberAfEndpointFromIndex(index) : kInvalidEndpointId; + + mActiveEndpointIdList[index] = kInvalidEndpointId; + } +} diff --git a/examples/dishwasher-app/silabs/src/ZclCallbacks.cpp b/examples/dishwasher-app/silabs/src/ZclCallbacks.cpp new file mode 100644 index 0000000000..cc972c6454 --- /dev/null +++ b/examples/dishwasher-app/silabs/src/ZclCallbacks.cpp @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2024 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 +#include +#include +#include + +#include "AppConfig.h" +#include "DishwasherManager.h" +#include "ElectricalSensorManager.h" + +#ifdef DIC_ENABLE +#include "dic.h" +#endif // DIC_ENABLE + +using namespace chip; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::DeviceEnergyManagement; + +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 == OperationalState::Id) && (attributeId == OperationalState::Attributes::OperationalState::Id)) + { + GetDishwasherManager()->UpdateOperationState(static_cast(*value)); + ElectricalSensorManager::Instance().UpdateEPMAttributes(static_cast(*value)); + } + else if (clusterId == Identify::Id) + { + ChipLogProgress(Zcl, "Identify attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", + ChipLogValueMEI(attributeId), type, *value, size); + } +} diff --git a/examples/dishwasher-app/silabs/src/operational-state-delegate-impl.cpp b/examples/dishwasher-app/silabs/src/operational-state-delegate-impl.cpp new file mode 100644 index 0000000000..df4e9e7ae8 --- /dev/null +++ b/examples/dishwasher-app/silabs/src/operational-state-delegate-impl.cpp @@ -0,0 +1,217 @@ +/* + * + * Copyright (c) 2024 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 "DataModelHelper.h" +#include "EnergyTimeUtils.h" +#include "operational-state-delegate-impl.h" + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::OperationalState; + +static std::unique_ptr gOperationalStateDelegate; +static std::unique_ptr gOperationalStateInstance; + +/** + * Get the list of supported operational states. + * Fills in the provided GenericOperationalState with the state at `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 OperationalStateDelegate::GetOperationalStateAtIndex(size_t index, GenericOperationalState & operationalState) +{ + VerifyOrReturnError(index < mOperationalStateList.size(), CHIP_ERROR_NOT_FOUND); + + operationalState = mOperationalStateList[index]; + + return CHIP_NO_ERROR; +} + +/** + * Get the list of supported operational phases. + * Fills in the provided MutableCharSpan 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. + * + * If CHIP_ERROR_NOT_FOUND is returned for index 0, that indicates that the PhaseList attribute is null + * (there are no phases defined at all). + * + * @param index The index of the phase, with 0 representing the first phase. + * @param operationalPhase The MutableCharSpan is filled. + */ +CHIP_ERROR OperationalStateDelegate::GetOperationalPhaseAtIndex(size_t index, MutableCharSpan & operationalPhase) +{ + VerifyOrReturnError(index < mOperationalPhaseList.size(), CHIP_ERROR_NOT_FOUND); + + return CopyCharSpanToMutableCharSpan(mOperationalPhaseList[index], operationalPhase); +} + +/** + * Handle Command Callback in application: Pause + * @param[out] get Operational error after callback + */ +void OperationalStateDelegate::HandlePauseStateCallback(GenericOperationalError & err) +{ + auto error = GetInstance()->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kPaused)); + if (error == CHIP_NO_ERROR) + { + err.Set(to_underlying(ErrorStateEnum::kNoError)); + uint8_t value = to_underlying(OperationalStateEnum::kPaused); + PostAttributeChangeCallback(Attributes::OperationalState::Id, ZCL_INT8U_ATTRIBUTE_TYPE, sizeof(uint8_t), &value); + } + else + { + err.Set(to_underlying(ErrorStateEnum::kUnableToCompleteOperation)); + } +} + +/** + * Handle Command Callback in application: Resume + * @param[out] get Operational error after callback + */ +void OperationalStateDelegate::HandleResumeStateCallback(GenericOperationalError & err) +{ + auto error = GetInstance()->SetOperationalState(to_underlying(OperationalStateEnum::kRunning)); + if (error == CHIP_NO_ERROR) + { + err.Set(to_underlying(ErrorStateEnum::kNoError)); + uint8_t value = to_underlying(OperationalStateEnum::kRunning); + PostAttributeChangeCallback(Attributes::OperationalState::Id, ZCL_INT8U_ATTRIBUTE_TYPE, sizeof(uint8_t), &value); + } + else + { + err.Set(to_underlying(ErrorStateEnum::kUnableToCompleteOperation)); + } +} + +/** + * Handle Command Callback in application: Start + * @param[out] get Operational error after callback + */ +void OperationalStateDelegate::HandleStartStateCallback(GenericOperationalError & err) +{ + auto error = GetInstance()->SetOperationalState(to_underlying(OperationalStateEnum::kRunning)); + if (error == CHIP_NO_ERROR) + { + err.Set(to_underlying(ErrorStateEnum::kNoError)); + uint8_t value = to_underlying(OperationalStateEnum::kRunning); + PostAttributeChangeCallback(Attributes::OperationalState::Id, ZCL_INT8U_ATTRIBUTE_TYPE, sizeof(uint8_t), &value); + } + else + { + err.Set(to_underlying(ErrorStateEnum::kUnableToCompleteOperation)); + } +} + +/** + * Handle Command Callback in application: Stop + * @param[out] get Operational error after callback. + */ +void OperationalStateDelegate::HandleStopStateCallback(GenericOperationalError & err) +{ + auto error = GetInstance()->SetOperationalState(to_underlying(OperationalStateEnum::kStopped)); + + VerifyOrReturn(error == CHIP_NO_ERROR, err.Set(to_underlying(ErrorStateEnum::kUnableToCompleteOperation))); + if (error == CHIP_NO_ERROR) + { + err.Set(to_underlying(ErrorStateEnum::kNoError)); + uint8_t value = to_underlying(OperationalStateEnum::kStopped); + PostAttributeChangeCallback(Attributes::OperationalState::Id, ZCL_INT8U_ATTRIBUTE_TYPE, sizeof(uint8_t), &value); + } + else + { + err.Set(to_underlying(ErrorStateEnum::kUnableToCompleteOperation)); + } +} + +/** + * @brief Calls the MatterPostAttributeChangeCallback for the modified attribute on the operationalState instance + * + * @param attributeId Id of the attribute that changed + * @param type Type of the attribute + * @param size Size of the attribute data + * @param value Value of the attribute data + */ +void OperationalStateDelegate::PostAttributeChangeCallback(AttributeId attributeId, uint8_t type, uint16_t size, uint8_t * value) +{ + ConcreteAttributePath info; + info.mClusterId = OperationalState::Id; + info.mAttributeId = attributeId; + info.mEndpointId = mEndpointId; + MatterPostAttributeChangeCallback(info, type, size, value); +} + +void OperationalStateDelegate::SetEndpointId(EndpointId endpointId) +{ + mEndpointId = endpointId; +} + +OperationalState::Instance * OperationalState::GetInstance() +{ + return gOperationalStateInstance.get(); +} + +OperationalState::OperationalStateDelegate * OperationalState::GetDelegate() +{ + return gOperationalStateDelegate.get(); +} + +void emberAfOperationalStateClusterInitCallback(EndpointId endpointId) +{ + CHIP_ERROR err; + + EndpointId OperationalStateEndpointId = DataModelHelper::GetEndpointIdFromCluster(OperationalState::Id); + VerifyOrDie((OperationalStateEndpointId != kInvalidEndpointId) && (OperationalStateEndpointId == endpointId)); + + VerifyOrDie(!gOperationalStateDelegate && !gOperationalStateInstance); + + gOperationalStateDelegate = std::make_unique(); + VerifyOrDie(gOperationalStateDelegate); + + gOperationalStateInstance = + std::make_unique(gOperationalStateDelegate.get(), OperationalStateEndpointId); + VerifyOrDie(gOperationalStateInstance); + + err = gOperationalStateInstance->Init(); + VerifyOrDie(CHIP_NO_ERROR == err); + + gOperationalStateInstance->SetOperationalState(to_underlying(OperationalStateEnum::kStopped)); + + gOperationalStateDelegate->SetEndpointId(OperationalStateEndpointId); +} + +void OperationalState::Shutdown() +{ + if (gOperationalStateInstance) + { + gOperationalStateInstance.reset(); + } + + if (gOperationalStateDelegate) + { + gOperationalStateDelegate.reset(); + } +} diff --git a/examples/dishwasher-app/silabs/third_party/connectedhomeip b/examples/dishwasher-app/silabs/third_party/connectedhomeip new file mode 120000 index 0000000000..c866b86874 --- /dev/null +++ b/examples/dishwasher-app/silabs/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../.. \ No newline at end of file diff --git a/examples/energy-management-app/energy-management-common/energy-evse/include/EnergyTimeUtils.h b/examples/energy-management-app/energy-management-common/common/include/EnergyTimeUtils.h similarity index 100% rename from examples/energy-management-app/energy-management-common/energy-evse/include/EnergyTimeUtils.h rename to examples/energy-management-app/energy-management-common/common/include/EnergyTimeUtils.h diff --git a/examples/energy-management-app/energy-management-common/device-energy-management/include/DEMManufacturerDelegate.h b/examples/energy-management-app/energy-management-common/device-energy-management/include/DEMManufacturerDelegate.h index 65d214d319..f70b9bf33c 100644 --- a/examples/energy-management-app/energy-management-common/device-energy-management/include/DEMManufacturerDelegate.h +++ b/examples/energy-management-app/energy-management-common/device-energy-management/include/DEMManufacturerDelegate.h @@ -80,6 +80,45 @@ class DEMManufacturerDelegate { return CHIP_NO_ERROR; } + + /** + * @brief Allows a client application to send in power readings into the system + * + * @param[in] aEndpointId - Endpoint to send to EPM Cluster + * @param[in] aActivePower_mW - ActivePower measured in milli-watts + * @param[in] aVoltage_mV - Voltage measured in milli-volts + * @param[in] aActiveCurrent_mA - ActiveCurrent measured in milli-amps + */ + virtual CHIP_ERROR SendPowerReading(EndpointId aEndpointId, int64_t aActivePower_mW, int64_t aVoltage_mV, int64_t aCurrent_mA) + { + return CHIP_NO_ERROR; + } + /** + * @brief Allows a client application to send cumulative energy readings into the system + * + * This is a helper function to add timestamps to the readings + * + * @param[in] aCumulativeEnergyImported -total energy imported in milli-watthours + * @param[in] aCumulativeEnergyExported -total energy exported in milli-watthours + */ + virtual CHIP_ERROR SendCumulativeEnergyReading(EndpointId aEndpointId, int64_t aCumulativeEnergyImported, + int64_t aCumulativeEnergyExported) + { + return CHIP_NO_ERROR; + } + /** + * @brief Allows a client application to send periodic energy readings into the system + * + * This is a helper function to add timestamps to the readings + * + * @param[in] aPeriodicEnergyImported - energy imported in milli-watthours in last period + * @param[in] aPeriodicEnergyExported - energy exported in milli-watthours in last period + */ + virtual CHIP_ERROR SendPeriodicEnergyReading(EndpointId aEndpointId, int64_t aCumulativeEnergyImported, + int64_t aCumulativeEnergyExported) + { + return CHIP_NO_ERROR; + } }; } // namespace DeviceEnergyManagement diff --git a/examples/energy-management-app/energy-management-common/device-energy-management/include/DeviceEnergyManagementDelegateImpl.h b/examples/energy-management-app/energy-management-common/device-energy-management/include/DeviceEnergyManagementDelegateImpl.h index da563910f7..568c4b753d 100644 --- a/examples/energy-management-app/energy-management-common/device-energy-management/include/DeviceEnergyManagementDelegateImpl.h +++ b/examples/energy-management-app/energy-management-common/device-energy-management/include/DeviceEnergyManagementDelegateImpl.h @@ -39,6 +39,7 @@ class DeviceEnergyManagementDelegate : public DeviceEnergyManagement::Delegate void SetDEMManufacturerDelegate(DEMManufacturerDelegate & deviceEnergyManagementManufacturerDelegate); + chip::app::Clusters::DeviceEnergyManagement::DEMManufacturerDelegate * GetDEMManufacturerDelegate(); /** * * Implement the DeviceEnergyManagement::Delegate interface diff --git a/examples/energy-management-app/energy-management-common/device-energy-management/src/DEMTestEventTriggers.cpp b/examples/energy-management-app/energy-management-common/device-energy-management/src/DEMTestEventTriggers.cpp index ff545ecf38..58258b73cd 100644 --- a/examples/energy-management-app/energy-management-common/device-energy-management/src/DEMTestEventTriggers.cpp +++ b/examples/energy-management-app/energy-management-common/device-energy-management/src/DEMTestEventTriggers.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/examples/energy-management-app/energy-management-common/device-energy-management/src/DeviceEnergyManagementDelegateImpl.cpp b/examples/energy-management-app/energy-management-common/device-energy-management/src/DeviceEnergyManagementDelegateImpl.cpp index 157b85d477..3adefb0953 100644 --- a/examples/energy-management-app/energy-management-common/device-energy-management/src/DeviceEnergyManagementDelegateImpl.cpp +++ b/examples/energy-management-app/energy-management-common/device-energy-management/src/DeviceEnergyManagementDelegateImpl.cpp @@ -62,6 +62,11 @@ void DeviceEnergyManagementDelegate::SetDEMManufacturerDelegate( mpDEMManufacturerDelegate = &deviceEnergyManagementManufacturerDelegate; } +chip::app::Clusters::DeviceEnergyManagement::DEMManufacturerDelegate * DeviceEnergyManagementDelegate::GetDEMManufacturerDelegate() +{ + return mpDEMManufacturerDelegate; +} + /** * @brief Delegate handler for PowerAdjustRequest * diff --git a/examples/energy-management-app/energy-management-common/device-energy-management/src/device-energy-management-mode.cpp b/examples/energy-management-app/energy-management-common/device-energy-management/src/device-energy-management-mode.cpp index 3323519875..d993e5c163 100644 --- a/examples/energy-management-app/energy-management-common/device-energy-management/src/device-energy-management-mode.cpp +++ b/examples/energy-management-app/energy-management-common/device-energy-management/src/device-energy-management-mode.cpp @@ -90,10 +90,14 @@ void DeviceEnergyManagementMode::Shutdown() void emberAfDeviceEnergyManagementModeClusterInitCallback(chip::EndpointId endpointId) { - VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. VerifyOrDie(!gDeviceEnergyManagementModeDelegate && !gDeviceEnergyManagementModeInstance); gDeviceEnergyManagementModeDelegate = std::make_unique(); - gDeviceEnergyManagementModeInstance = - std::make_unique(gDeviceEnergyManagementModeDelegate.get(), 0x1, DeviceEnergyManagementMode::Id, 0); + gDeviceEnergyManagementModeInstance = std::make_unique(gDeviceEnergyManagementModeDelegate.get(), + endpointId, DeviceEnergyManagementMode::Id, 0); gDeviceEnergyManagementModeInstance->Init(); } + +void MatterDeviceEnergyManagementModeClusterServerShutdownCallback(chip::EndpointId endpoint) +{ + DeviceEnergyManagementMode::Shutdown(); +} diff --git a/examples/energy-management-app/energy-management-common/energy-evse/include/EVSEManufacturerImpl.h b/examples/energy-management-app/energy-management-common/energy-evse/include/EVSEManufacturerImpl.h index 17d2c865bb..c802cf8e04 100644 --- a/examples/energy-management-app/energy-management-common/energy-evse/include/EVSEManufacturerImpl.h +++ b/examples/energy-management-app/energy-management-common/energy-evse/include/EVSEManufacturerImpl.h @@ -153,7 +153,7 @@ class EVSEManufacturer : public DEMManufacturerDelegate * @param[in] aVoltage_mV - Voltage measured in milli-volts * @param[in] aActiveCurrent_mA - ActiveCurrent measured in milli-amps */ - CHIP_ERROR SendPowerReading(EndpointId aEndpointId, int64_t aActivePower_mW, int64_t aVoltage_mV, int64_t aCurrent_mA); + CHIP_ERROR SendPowerReading(EndpointId aEndpointId, int64_t aActivePower_mW, int64_t aVoltage_mV, int64_t aCurrent_mA) override; /** * @brief Allows a client application to send cumulative energy readings into the system @@ -164,7 +164,7 @@ class EVSEManufacturer : public DEMManufacturerDelegate * @param[in] aCumulativeEnergyExported -total energy exported in milli-watthours */ CHIP_ERROR SendCumulativeEnergyReading(EndpointId aEndpointId, int64_t aCumulativeEnergyImported, - int64_t aCumulativeEnergyExported); + int64_t aCumulativeEnergyExported) override; /** * @brief Allows a client application to send periodic energy readings into the system @@ -175,7 +175,7 @@ class EVSEManufacturer : public DEMManufacturerDelegate * @param[in] aPeriodicEnergyExported - energy exported in milli-watthours in last period */ CHIP_ERROR SendPeriodicEnergyReading(EndpointId aEndpointId, int64_t aCumulativeEnergyImported, - int64_t aCumulativeEnergyExported); + int64_t aCumulativeEnergyExported) override; /** Fake Meter data generation - used for testing EPM/EEM clusters */ /** diff --git a/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseDelegateImpl.cpp b/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseDelegateImpl.cpp index 0294a0349e..0305a58381 100644 --- a/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseDelegateImpl.cpp +++ b/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseDelegateImpl.cpp @@ -934,10 +934,10 @@ Status EnergyEvseDelegate::ComputeMaxChargeCurrentLimit() oldValue = mActualChargingCurrentLimit; mActualChargingCurrentLimit = mMaxHardwareCurrentLimit; - mActualChargingCurrentLimit = min(mActualChargingCurrentLimit, mCircuitCapacity); - mActualChargingCurrentLimit = min(mActualChargingCurrentLimit, mCableAssemblyCurrentLimit); - mActualChargingCurrentLimit = min(mActualChargingCurrentLimit, mMaximumChargingCurrentLimitFromCommand); - mActualChargingCurrentLimit = min(mActualChargingCurrentLimit, mUserMaximumChargeCurrent); + mActualChargingCurrentLimit = std::min(mActualChargingCurrentLimit, mCircuitCapacity); + mActualChargingCurrentLimit = std::min(mActualChargingCurrentLimit, mCableAssemblyCurrentLimit); + mActualChargingCurrentLimit = std::min(mActualChargingCurrentLimit, mMaximumChargingCurrentLimitFromCommand); + mActualChargingCurrentLimit = std::min(mActualChargingCurrentLimit, mUserMaximumChargeCurrent); /* Set the actual max charging current attribute */ mMaximumChargeCurrent = mActualChargingCurrentLimit; diff --git a/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseTargetsStore.cpp b/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseTargetsStore.cpp index f15e0b7a10..2144219409 100644 --- a/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseTargetsStore.cpp +++ b/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseTargetsStore.cpp @@ -75,7 +75,7 @@ CHIP_ERROR EvseTargetsDelegate::LoadTargets() Platform::ScopedMemoryBuffer backingBuffer; uint16_t length = GetTlvSizeUpperBound(); - ReturnErrorCodeIf(!backingBuffer.Calloc(length), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(backingBuffer.Calloc(length), CHIP_ERROR_NO_MEMORY); CHIP_ERROR err = mpTargetStore->SyncGetKeyValue(spEvseTargetsKeyName, backingBuffer.Get(), length); if (err == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND) @@ -390,7 +390,7 @@ EvseTargetsDelegate::SaveTargets(DataModel::List backingBuffer; - ReturnErrorCodeIf(!backingBuffer.Calloc(total), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(backingBuffer.Calloc(total), CHIP_ERROR_NO_MEMORY); TLV::ScopedBufferTLVWriter writer(std::move(backingBuffer), total); TLV::TLVType arrayType; diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.matter b/examples/energy-management-app/energy-management-common/energy-management-app.matter index bae77f5f8e..a3c2b9f58b 100644 --- a/examples/energy-management-app/energy-management-common/energy-management-app.matter +++ b/examples/energy-management-app/energy-management-common/energy-management-app.matter @@ -931,6 +931,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2018,13 +2019,13 @@ provisional cluster DeviceEnergyManagement = 152 { command ModifyForecastRequest(ModifyForecastRequestRequest): DefaultSuccess = 5; /** Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. */ command RequestConstraintBasedForecast(RequestConstraintBasedForecastRequest): DefaultSuccess = 6; - /** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command */ + /** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command. */ command CancelRequest(): DefaultSuccess = 7; } /** Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. */ cluster EnergyEvse = 153 { - revision 4; + revision 3; enum EnergyTransferStoppedReasonEnum : enum8 { kEVStopped = 0; @@ -2189,9 +2190,9 @@ cluster EnergyEvse = 153 { /** Allows a client to disable the EVSE from charging and discharging. */ timed command Disable(): DefaultSuccess = 1; - /** This command allows a client to enable the EVSE to charge an EV, */ + /** This command allows a client to enable the EVSE to charge an EV, and to provide or update the maximum and minimum charge current. */ timed command EnableCharging(EnableChargingRequest): DefaultSuccess = 2; - /** Upon receipt, this SHALL allow a client to enable the discharge of an EV, */ + /** Upon receipt, this SHALL allow a client to enable the discharge of an EV, and to provide or update the maximum discharge current. */ timed command EnableDischarging(EnableDischargingRequest): DefaultSuccess = 3; /** Allows a client to put the EVSE into a self-diagnostics mode. */ timed command StartDiagnostics(): DefaultSuccess = 4; @@ -2226,7 +2227,7 @@ cluster PowerTopology = 156 { /** Attributes and commands for selecting a mode from a list of supported options. */ cluster EnergyEvseMode = 157 { - revision 1; + revision 2; enum ModeTag : enum16 { kAuto = 0; @@ -2242,6 +2243,7 @@ cluster EnergyEvseMode = 157 { kManual = 16384; kTimeOfUse = 16385; kSolarCharging = 16386; + kV2X = 16387; } bitmap Feature : bitmap32 { @@ -2261,8 +2263,6 @@ cluster EnergyEvseMode = 157 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u startUpMode = 2; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2279,8 +2279,7 @@ cluster EnergyEvseMode = 157 { optional char_string<64> statusText = 1; } - /** This command is used to change device modes. - On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + /** This command is used to change device modes. */ command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } @@ -2321,8 +2320,6 @@ cluster WaterHeaterMode = 158 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u startUpMode = 2; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2336,17 +2333,16 @@ cluster WaterHeaterMode = 158 { response struct ChangeToModeResponse = 1 { enum8 status = 0; - optional char_string statusText = 1; + optional char_string<64> statusText = 1; } - /** This command is used to change device modes. - On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + /** This command is used to change device modes. */ command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } /** Attributes and commands for selecting a mode from a list of supported options. */ provisional cluster DeviceEnergyManagementMode = 159 { - revision 1; + revision 2; enum ModeTag : enum16 { kAuto = 0; @@ -2382,8 +2378,6 @@ provisional cluster DeviceEnergyManagementMode = 159 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u startUpMode = 2; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2400,8 +2394,7 @@ provisional cluster DeviceEnergyManagementMode = 159 { optional char_string<64> statusText = 1; } - /** This command is used to change device modes. - On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + /** This command is used to change device modes. */ command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } @@ -2416,7 +2409,6 @@ endpoint 0 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2430,7 +2422,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision; @@ -2455,7 +2446,6 @@ endpoint 0 { callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -2466,7 +2456,6 @@ endpoint 0 { callback attribute supportedLocales; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2476,7 +2465,6 @@ endpoint 0 { ram attribute hourFormat; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2485,7 +2473,6 @@ endpoint 0 { server cluster UnitLocalization { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2501,7 +2488,6 @@ endpoint 0 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; @@ -2515,7 +2501,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2538,7 +2523,6 @@ endpoint 0 { callback attribute supportedWiFiBands; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2551,7 +2535,6 @@ endpoint 0 { ram attribute testEventTriggersEnabled; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2567,7 +2550,6 @@ endpoint 0 { callback attribute adminVendorId; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2585,7 +2567,6 @@ endpoint 0 { callback attribute currentFabricIndex; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2611,7 +2592,6 @@ endpoint 0 { callback attribute maxGroupKeysPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2634,7 +2614,6 @@ endpoint 1 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2650,7 +2629,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2678,7 +2656,6 @@ endpoint 1 { callback attribute neutralCurrent; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -2695,7 +2672,6 @@ endpoint 1 { callback attribute cumulativeEnergyReset; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -2710,7 +2686,6 @@ endpoint 1 { callback attribute boostState; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2734,7 +2709,6 @@ endpoint 1 { callback attribute optOutState; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 4; @@ -2775,7 +2749,6 @@ endpoint 1 { callback attribute sessionEnergyCharged; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 2; @@ -2793,7 +2766,6 @@ endpoint 1 { server cluster PowerTopology { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -2804,7 +2776,6 @@ endpoint 1 { callback attribute currentMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -2818,7 +2789,6 @@ endpoint 1 { callback attribute currentMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -2832,7 +2802,6 @@ endpoint 1 { callback attribute currentMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; diff --git a/examples/energy-management-app/energy-management-common/energy-reporting/src/FakeReadings.cpp b/examples/energy-management-app/energy-management-common/energy-reporting/src/FakeReadings.cpp index 78795976c0..bffe3c900d 100644 --- a/examples/energy-management-app/energy-management-common/energy-reporting/src/FakeReadings.cpp +++ b/examples/energy-management-app/energy-management-common/energy-reporting/src/FakeReadings.cpp @@ -16,16 +16,13 @@ * limitations under the License. */ +#include #include -#include -#include -#include #include #include #include #include -#include #include #include @@ -38,7 +35,6 @@ using namespace chip; using namespace chip::app; using namespace chip::app::DataModel; using namespace chip::app::Clusters; -using namespace chip::app::Clusters::EnergyEvse; using namespace chip::app::Clusters::ElectricalPowerMeasurement; using namespace chip::app::Clusters::ElectricalEnergyMeasurement; using namespace chip::app::Clusters::ElectricalEnergyMeasurement::Structs; @@ -145,7 +141,7 @@ void FakeReadings::FakeReadingsUpdate() int64_t current = (static_cast(rand()) % (2 * mCurrentRandomness_mA)) - mCurrentRandomness_mA; current += mCurrent_mA; // add in the base current - GetEvseManufacturer()->SendPowerReading(mEndpointId, power, voltage, current); + GetDEMDelegate()->GetDEMManufacturerDelegate()->SendPowerReading(mEndpointId, power, voltage, current); // update the energy meter - we'll assume that the power has been constant during the previous interval if (mPower_mW > 0) @@ -163,9 +159,11 @@ void FakeReadings::FakeReadingsUpdate() mTotalEnergyExported += mPeriodicEnergyExported; } - GetEvseManufacturer()->SendPeriodicEnergyReading(mEndpointId, mPeriodicEnergyImported, mPeriodicEnergyExported); + GetDEMDelegate()->GetDEMManufacturerDelegate()->SendPeriodicEnergyReading(mEndpointId, mPeriodicEnergyImported, + mPeriodicEnergyExported); - GetEvseManufacturer()->SendCumulativeEnergyReading(mEndpointId, mTotalEnergyImported, mTotalEnergyExported); + GetDEMDelegate()->GetDEMManufacturerDelegate()->SendCumulativeEnergyReading(mEndpointId, mTotalEnergyImported, + mTotalEnergyExported); // start/restart the timer DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds32(mInterval_s), FakeReadingsTimerExpiry, this); diff --git a/examples/energy-management-app/energy-management-common/tests/BUILD.gn b/examples/energy-management-app/energy-management-common/tests/BUILD.gn index c11d783194..3fdc8e9eac 100644 --- a/examples/energy-management-app/energy-management-common/tests/BUILD.gn +++ b/examples/energy-management-app/energy-management-common/tests/BUILD.gn @@ -23,7 +23,6 @@ config("tests_config") { chip_test_suite("tests") { output_name = "libEnergyTest" - output_dir = "${root_out_dir}/lib" public_configs = [ ":tests_config" ] diff --git a/examples/energy-management-app/esp32/README.md b/examples/energy-management-app/esp32/README.md index 733ac5a632..f1a2f12ec4 100644 --- a/examples/energy-management-app/esp32/README.md +++ b/examples/energy-management-app/esp32/README.md @@ -5,9 +5,9 @@ Heater example application along with several other energy management clusters on ESP platforms. Please -[setup ESP-IDF and CHIP Environment](../../../docs/guides/esp32/setup_idf_chip.md) +[setup ESP-IDF and CHIP Environment](../../../docs/platforms/esp32/setup_idf_chip.md) and refer -[building and commissioning](../../../docs/guides/esp32/build_app_and_commission.md) +[building and commissioning](../../../docs/platforms/esp32/build_app_and_commission.md) guides to get started. ### Enabling ESP-Insights: @@ -32,7 +32,7 @@ cp /path/to/auth/key.txt path/to/connectedhomeip/examples/energy-management-app/ --- - [Cluster Control](#cluster-control) -- [Matter OTA guide](../../../docs/guides/esp32/ota.md) +- [Matter OTA guide](../../../docs/platforms/esp32/ota.md) --- diff --git a/examples/energy-management-app/linux/README.md b/examples/energy-management-app/linux/README.md index 89b165c1e1..615f1f50db 100644 --- a/examples/energy-management-app/linux/README.md +++ b/examples/energy-management-app/linux/README.md @@ -7,7 +7,7 @@ for Raspberry Pi Desktop 20.10 (aarch64)** To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini** **EVK**, see the associated -[README document](../../../docs/guides/nxp/nxp_imx8m_linux_examples.md) for +[README document](../../../docs/platforms/nxp/nxp_imx8m_linux_examples.md) for details.
diff --git a/examples/energy-management-app/silabs/README.md b/examples/energy-management-app/silabs/README.md index 96237911df..5c1955a507 100644 --- a/examples/energy-management-app/silabs/README.md +++ b/examples/energy-management-app/silabs/README.md @@ -335,7 +335,7 @@ tracking code inside the `trackAlloc` and `trackFree` function For the description of Software Update process with EFR32 example applications see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) +[EFR32 OTA Software Update](../../../docs/platforms/silabs/silabs_efr32_software_update.md) ## Group Communication (Multicast) diff --git a/examples/fabric-admin/BUILD.gn b/examples/fabric-admin/BUILD.gn index ab58445958..e95d6cb7c8 100644 --- a/examples/fabric-admin/BUILD.gn +++ b/examples/fabric-admin/BUILD.gn @@ -80,6 +80,10 @@ static_library("fabric-admin-utils") { "commands/pairing/OpenCommissioningWindowCommand.h", "commands/pairing/PairingCommand.cpp", "commands/pairing/ToTLVCert.cpp", + "device_manager/BridgeSubscription.cpp", + "device_manager/BridgeSubscription.h", + "device_manager/CommissionerControl.cpp", + "device_manager/CommissionerControl.h", "device_manager/DeviceManager.cpp", "device_manager/DeviceManager.h", "device_manager/DeviceSubscription.cpp", @@ -88,6 +92,8 @@ static_library("fabric-admin-utils") { "device_manager/DeviceSubscriptionManager.h", "device_manager/DeviceSynchronization.cpp", "device_manager/DeviceSynchronization.h", + "device_manager/FabricSyncGetter.cpp", + "device_manager/FabricSyncGetter.h", "device_manager/PairingManager.cpp", "device_manager/PairingManager.h", "device_manager/UniqueIdGetter.cpp", diff --git a/examples/fabric-admin/commands/clusters/ClusterCommand.h b/examples/fabric-admin/commands/clusters/ClusterCommand.h index edf2302219..7c66bebcec 100644 --- a/examples/fabric-admin/commands/clusters/ClusterCommand.h +++ b/examples/fabric-admin/commands/clusters/ClusterCommand.h @@ -84,7 +84,6 @@ class ClusterCommand : public InteractionModelCommands, public ModelCommand, pub if (data != nullptr) { LogErrorOnFailure(RemoteDataModelLogger::LogCommandAsJSON(path, data)); - DeviceMgr().HandleCommandResponse(path, *data); } } diff --git a/examples/fabric-admin/commands/clusters/ReportCommand.cpp b/examples/fabric-admin/commands/clusters/ReportCommand.cpp index 2fdb965ddc..7f3decd78a 100644 --- a/examples/fabric-admin/commands/clusters/ReportCommand.cpp +++ b/examples/fabric-admin/commands/clusters/ReportCommand.cpp @@ -45,8 +45,6 @@ void ReportCommand::OnAttributeData(const app::ConcreteDataAttributePath & path, } LogErrorOnFailure(RemoteDataModelLogger::LogAttributeAsJSON(path, data)); - - DeviceMgr().HandleAttributeData(path, *data); } void ReportCommand::OnEventData(const app::EventHeader & eventHeader, TLV::TLVReader * data, const app::StatusIB * status) @@ -72,6 +70,4 @@ void ReportCommand::OnEventData(const app::EventHeader & eventHeader, TLV::TLVRe } LogErrorOnFailure(RemoteDataModelLogger::LogEventAsJSON(eventHeader, data)); - - DeviceMgr().HandleEventData(eventHeader, *data); } diff --git a/examples/fabric-admin/commands/common/Commands.h b/examples/fabric-admin/commands/common/Commands.h index f071ac08c4..693c33e0ca 100644 --- a/examples/fabric-admin/commands/common/Commands.h +++ b/examples/fabric-admin/commands/common/Commands.h @@ -29,7 +29,7 @@ class Commands { public: - using CommandsVector = ::std::vector>; + using CommandsVector = std::vector>; void RegisterCluster(const char * clusterName, commands_list commandsList) { diff --git a/examples/fabric-admin/commands/fabric-sync/Commands.h b/examples/fabric-admin/commands/fabric-sync/Commands.h index a6bf1c258f..47f7207922 100644 --- a/examples/fabric-admin/commands/fabric-sync/Commands.h +++ b/examples/fabric-admin/commands/fabric-sync/Commands.h @@ -31,7 +31,6 @@ void registerCommandsFabricSync(Commands & commands, CredentialIssuerCommands * make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), }; commands.RegisterCommandSet(clusterName, clusterCommands, "Commands for fabric synchronization."); diff --git a/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp b/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp index c8d9f3da96..f10db13e93 100644 --- a/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp +++ b/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp @@ -30,15 +30,6 @@ using namespace ::chip; -namespace { - -void CheckFabricBridgeSynchronizationSupport(intptr_t ignored) -{ - DeviceMgr().ReadSupportedDeviceCategories(); -} - -} // namespace - void FabricSyncAddBridgeCommand::OnCommissioningComplete(NodeId deviceId, CHIP_ERROR err) { if (mBridgeNodeId != deviceId) @@ -73,7 +64,7 @@ void FabricSyncAddBridgeCommand::OnCommissioningComplete(NodeId deviceId, CHIP_E // // Note: The Fabric-Admin MUST NOT send the RequestCommissioningApproval command // if the remote Fabric-Bridge lacks Fabric Synchronization support. - DeviceLayer::PlatformMgr().ScheduleWork(CheckFabricBridgeSynchronizationSupport, 0); + DeviceLayer::SystemLayer().ScheduleLambda([]() { DeviceMgr().ReadSupportedDeviceCategories(); }); } } else @@ -314,15 +305,3 @@ CHIP_ERROR FabricSyncDeviceCommand::RunCommand(EndpointId remoteId) return CHIP_NO_ERROR; } - -CHIP_ERROR FabricAutoSyncCommand::RunCommand(bool enableAutoSync) -{ - DeviceMgr().EnableAutoSync(enableAutoSync); - - // print to console - fprintf(stderr, "Auto Fabric Sync is %s.\n", enableAutoSync ? "enabled" : "disabled"); - fprintf(stderr, - "WARNING: The auto-sync command is currently under development and may contain bugs. Use it at your own risk.\n"); - - return CHIP_NO_ERROR; -} diff --git a/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.h b/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.h index 16ee40e5b4..8d14529155 100644 --- a/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.h +++ b/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.h @@ -136,22 +136,3 @@ class FabricSyncDeviceCommand : public CHIPCommand, public CommissioningWindowDe CHIP_ERROR RunCommand(chip::EndpointId remoteId); }; - -class FabricAutoSyncCommand : public CHIPCommand -{ -public: - FabricAutoSyncCommand(CredentialIssuerCommands * credIssuerCommands) : CHIPCommand("enable-auto-sync", credIssuerCommands) - { - AddArgument("state", 0, 1, &mEnableAutoSync, "Set to true to enable auto Fabric Sync, false to disable."); - } - - /////////// CHIPCommand Interface ///////// - CHIP_ERROR RunCommand() override { return RunCommand(mEnableAutoSync); } - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(1); } - -private: - bool mEnableAutoSync; - - CHIP_ERROR RunCommand(bool enableAutoSync); -}; diff --git a/examples/fabric-admin/device_manager/BridgeSubscription.cpp b/examples/fabric-admin/device_manager/BridgeSubscription.cpp new file mode 100644 index 0000000000..2efcadaaa6 --- /dev/null +++ b/examples/fabric-admin/device_manager/BridgeSubscription.cpp @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2024 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 "BridgeSubscription.h" +#include + +using namespace ::chip; +using namespace ::chip::app; +using chip::app::ReadClient; + +namespace { + +constexpr uint16_t kSubscribeMinInterval = 0; +constexpr uint16_t kSubscribeMaxInterval = 60; + +void OnDeviceConnectedWrapper(void * context, Messaging::ExchangeManager & exchangeMgr, const SessionHandle & sessionHandle) +{ + reinterpret_cast(context)->OnDeviceConnected(exchangeMgr, sessionHandle); +} + +void OnDeviceConnectionFailureWrapper(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) +{ + reinterpret_cast(context)->OnDeviceConnectionFailure(peerId, error); +} + +} // namespace + +BridgeSubscription::BridgeSubscription() : + mOnDeviceConnectedCallback(OnDeviceConnectedWrapper, this), + mOnDeviceConnectionFailureCallback(OnDeviceConnectionFailureWrapper, this) +{} + +CHIP_ERROR BridgeSubscription::StartSubscription(Controller::DeviceController & controller, NodeId nodeId, EndpointId endpointId) +{ + assertChipStackLockedByCurrentThread(); + + VerifyOrDie(!subscriptionStarted); // Ensure it's not called multiple times. + + // Mark as started + subscriptionStarted = true; + + mEndpointId = endpointId; + + CHIP_ERROR err = controller.GetConnectedDevice(nodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to connect to remote fabric sync bridge %" CHIP_ERROR_FORMAT, err.Format()); + } + return err; +} + +void BridgeSubscription::OnAttributeData(const ConcreteDataAttributePath & path, TLV::TLVReader * data, const StatusIB & status) +{ + if (!status.IsSuccess()) + { + ChipLogError(NotSpecified, "Response Failure: %" CHIP_ERROR_FORMAT, status.ToChipError().Format()); + return; + } + + if (data == nullptr) + { + ChipLogError(NotSpecified, "Response Failure: No Data"); + return; + } + + DeviceMgr().HandleAttributeData(path, *data); +} + +void BridgeSubscription::OnEventData(const app::EventHeader & eventHeader, TLV::TLVReader * data, const app::StatusIB * status) +{ + if (status != nullptr) + { + CHIP_ERROR error = status->ToChipError(); + if (CHIP_NO_ERROR != error) + { + ChipLogError(NotSpecified, "Response Failure: %" CHIP_ERROR_FORMAT, error.Format()); + return; + } + } + + if (data == nullptr) + { + ChipLogError(NotSpecified, "Response Failure: No Data"); + return; + } + + DeviceMgr().HandleEventData(eventHeader, *data); +} + +void BridgeSubscription::OnError(CHIP_ERROR error) +{ + ChipLogProgress(NotSpecified, "Error on remote fabric sync bridge subscription: %" CHIP_ERROR_FORMAT, error.Format()); +} + +void BridgeSubscription::OnDone(ReadClient * apReadClient) +{ + mClient.reset(); + ChipLogProgress(NotSpecified, "The remote fabric sync bridge subscription is terminated"); + + // Reset the subscription state to allow retry + subscriptionStarted = false; + + // TODO:(#36092) Fabric-Admin should attempt to re-subscribe when the subscription to the remote bridge is terminated. +} + +void BridgeSubscription::OnDeviceConnected(Messaging::ExchangeManager & exchangeMgr, const SessionHandle & sessionHandle) +{ + mClient = std::make_unique(app::InteractionModelEngine::GetInstance(), &exchangeMgr /* echangeMgr */, + *this /* callback */, ReadClient::InteractionType::Subscribe); + VerifyOrDie(mClient); + + AttributePathParams readPaths[1]; + readPaths[0] = AttributePathParams(mEndpointId, Clusters::Descriptor::Id, Clusters::Descriptor::Attributes::PartsList::Id); + + EventPathParams eventPaths[1]; + eventPaths[0] = EventPathParams(mEndpointId, Clusters::CommissionerControl::Id, + Clusters::CommissionerControl::Events::CommissioningRequestResult::Id); + eventPaths[0].mIsUrgentEvent = true; + + ReadPrepareParams readParams(sessionHandle); + + readParams.mpAttributePathParamsList = readPaths; + readParams.mAttributePathParamsListSize = 1; + readParams.mpEventPathParamsList = eventPaths; + readParams.mEventPathParamsListSize = 1; + readParams.mMinIntervalFloorSeconds = kSubscribeMinInterval; + readParams.mMaxIntervalCeilingSeconds = kSubscribeMaxInterval; + readParams.mKeepSubscriptions = true; + + CHIP_ERROR err = mClient->SendRequest(readParams); + + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to issue subscription to the Descriptor Cluster of the remote bridged device."); + OnDone(nullptr); + return; + } +} + +void BridgeSubscription::OnDeviceConnectionFailure(const ScopedNodeId & peerId, CHIP_ERROR error) +{ + ChipLogError(NotSpecified, "BridgeSubscription failed to connect to " ChipLogFormatX64, ChipLogValueX64(peerId.GetNodeId())); + OnDone(nullptr); +} diff --git a/examples/fabric-admin/device_manager/BridgeSubscription.h b/examples/fabric-admin/device_manager/BridgeSubscription.h new file mode 100644 index 0000000000..bd2a70279a --- /dev/null +++ b/examples/fabric-admin/device_manager/BridgeSubscription.h @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2024 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 + +/** + * @brief Class used to subscribe to attributes and events from the remote bridged device. + * + * The Descriptor Cluster contains attributes such as the Parts List, which provides a list + * of endpoints or devices that are part of a composite device or bridge. The CommissionerControl + * Cluster generates events related to commissioning requests, which can be monitored to track + * device commissioning status. + * + * When subscribing to attributes and events of a bridged device from another fabric, the class: + * - Establishes a secure session with the device (if needed) via CASE (Chip over + * Authenticated Session Establishment) session. + * - Subscribes to the specified attributes in the Descriptor Cluster (e.g., Parts List) and + * events in the CommissionerControl Cluster (e.g., CommissioningRequestResult) of the remote + * device on the specified node and endpoint. + * - Invokes the provided callback upon successful or unsuccessful subscription, allowing + * further handling of data or errors. + * + * This class also implements the necessary callbacks to handle attribute data reports, event data, + * errors, and session establishment procedures. + */ +class BridgeSubscription : public chip::app::ReadClient::Callback +{ +public: + BridgeSubscription(); + + CHIP_ERROR StartSubscription(chip::Controller::DeviceController & controller, chip::NodeId nodeId, chip::EndpointId endpointId); + + /////////////////////////////////////////////////////////////// + // ReadClient::Callback implementation + /////////////////////////////////////////////////////////////// + void OnAttributeData(const chip::app::ConcreteDataAttributePath & path, chip::TLV::TLVReader * data, + const chip::app::StatusIB & status) override; + void OnEventData(const chip::app::EventHeader & eventHeader, chip::TLV::TLVReader * data, + const chip::app::StatusIB * status) override; + void OnError(CHIP_ERROR error) override; + void OnDone(chip::app::ReadClient * apReadClient) override; + + /////////////////////////////////////////////////////////////// + // callbacks for CASE session establishment + /////////////////////////////////////////////////////////////// + void OnDeviceConnected(chip::Messaging::ExchangeManager & exchangeMgr, const chip::SessionHandle & sessionHandle); + void OnDeviceConnectionFailure(const chip::ScopedNodeId & peerId, CHIP_ERROR error); + +private: + std::unique_ptr mClient; + + chip::Callback::Callback mOnDeviceConnectedCallback; + chip::Callback::Callback mOnDeviceConnectionFailureCallback; + chip::EndpointId mEndpointId; + bool subscriptionStarted = false; +}; diff --git a/examples/fabric-admin/device_manager/CommissionerControl.cpp b/examples/fabric-admin/device_manager/CommissionerControl.cpp new file mode 100644 index 0000000000..b919ceb068 --- /dev/null +++ b/examples/fabric-admin/device_manager/CommissionerControl.cpp @@ -0,0 +1,141 @@ +#include "CommissionerControl.h" +#include + +using namespace ::chip; + +void CommissionerControl::Init(Controller::DeviceCommissioner & commissioner, NodeId nodeId, EndpointId endpointId) +{ + // Ensure that mCommissioner is not already initialized + VerifyOrDie(mCommissioner == nullptr); + + ChipLogProgress(NotSpecified, "Initilize CommissionerControl"); + mCommissioner = &commissioner; + mDestinationId = nodeId; + mEndpointId = endpointId; +} + +CHIP_ERROR CommissionerControl::RequestCommissioningApproval(uint64_t requestId, uint16_t vendorId, uint16_t productId, + Optional label) +{ + VerifyOrReturnError(mCommissioner != nullptr, CHIP_ERROR_INCORRECT_STATE); + + ChipLogProgress(NotSpecified, "Sending RequestCommissioningApproval to node " ChipLogFormatX64, + ChipLogValueX64(mDestinationId)); + + mRequestCommissioningApproval.requestID = requestId; + mRequestCommissioningApproval.vendorID = static_cast(vendorId); + mRequestCommissioningApproval.productID = productId; + + if (label.HasValue()) + { + VerifyOrReturnError(label.Value().size() <= kMaxDeviceLabelLength, CHIP_ERROR_BUFFER_TOO_SMALL); + memcpy(mLabelBuffer, label.Value().data(), label.Value().size()); + mRequestCommissioningApproval.label = Optional>(CharSpan(mLabelBuffer, label.Value().size())); + } + + mCommandType = CommandType::kRequestCommissioningApproval; + return mCommissioner->GetConnectedDevice(mDestinationId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); +} + +CHIP_ERROR CommissionerControl::CommissionNode(uint64_t requestId, uint16_t responseTimeoutSeconds) +{ + VerifyOrReturnError(mCommissioner != nullptr, CHIP_ERROR_INCORRECT_STATE); + + ChipLogProgress(NotSpecified, "Sending CommissionNode to node " ChipLogFormatX64, ChipLogValueX64(mDestinationId)); + + mCommissionNode.requestID = requestId; + mCommissionNode.responseTimeoutSeconds = responseTimeoutSeconds; + + mCommandType = CommandType::kCommissionNode; + return mCommissioner->GetConnectedDevice(mDestinationId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); +} + +void CommissionerControl::OnResponse(app::CommandSender * client, const app::ConcreteCommandPath & path, + const app::StatusIB & status, TLV::TLVReader * data) +{ + ChipLogProgress(NotSpecified, "CommissionerControl: OnResponse."); + + CHIP_ERROR error = status.ToChipError(); + if (CHIP_NO_ERROR != error) + { + ChipLogError(NotSpecified, "Response Failure: %s", ErrorStr(error)); + return; + } + + if (data != nullptr) + { + DeviceMgr().HandleCommandResponse(path, *data); + } +} + +void CommissionerControl::OnError(const app::CommandSender * client, CHIP_ERROR error) +{ + // Handle the error, then reset mCommandSender + ChipLogProgress(NotSpecified, "CommissionerControl: OnError: Error: %s", ErrorStr(error)); +} + +void CommissionerControl::OnDone(app::CommandSender * client) +{ + ChipLogProgress(NotSpecified, "CommissionerControl: OnDone."); + + switch (mCommandType) + { + case CommandType::kRequestCommissioningApproval: + ChipLogProgress(NotSpecified, "CommissionerControl: Command RequestCommissioningApproval has been successfully processed."); + break; + + case CommandType::kCommissionNode: + ChipLogProgress(NotSpecified, "CommissionerControl: Command CommissionNode has been successfully processed."); + break; + + default: + ChipLogError(NotSpecified, "CommissionerControl: Unknown or unhandled command type in OnDone."); + break; + } + + // Reset command type to undefined after processing is done + mCommandType = CommandType::kUndefined; + + // Ensure that mCommandSender is cleaned up after it is done + mCommandSender.reset(); +} + +CHIP_ERROR CommissionerControl::SendCommandForType(CommandType commandType, DeviceProxy * device) +{ + switch (commandType) + { + case CommandType::kRequestCommissioningApproval: + return SendCommand(device, mEndpointId, app::Clusters::CommissionerControl::Id, + app::Clusters::CommissionerControl::Commands::RequestCommissioningApproval::Id, + mRequestCommissioningApproval); + case CommandType::kCommissionNode: + return SendCommand(device, mEndpointId, app::Clusters::CommissionerControl::Id, + app::Clusters::CommissionerControl::Commands::CommissionNode::Id, mCommissionNode); + default: + return CHIP_ERROR_INVALID_ARGUMENT; + } +} + +void CommissionerControl::OnDeviceConnectedFn(void * context, Messaging::ExchangeManager & exchangeMgr, + const SessionHandle & sessionHandle) +{ + CommissionerControl * self = reinterpret_cast(context); + VerifyOrReturn(self != nullptr, ChipLogError(NotSpecified, "OnDeviceConnectedFn: context is null")); + + OperationalDeviceProxy device(&exchangeMgr, sessionHandle); + + CHIP_ERROR err = self->SendCommandForType(self->mCommandType, &device); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to send CommissionerControl command."); + self->OnDone(nullptr); + } +} + +void CommissionerControl::OnDeviceConnectionFailureFn(void * context, const ScopedNodeId & peerId, CHIP_ERROR err) +{ + LogErrorOnFailure(err); + CommissionerControl * self = reinterpret_cast(context); + VerifyOrReturn(self != nullptr, ChipLogError(NotSpecified, "OnDeviceConnectedFn: context is null")); + self->OnDone(nullptr); +} diff --git a/examples/fabric-admin/device_manager/CommissionerControl.h b/examples/fabric-admin/device_manager/CommissionerControl.h new file mode 100644 index 0000000000..1fad323e12 --- /dev/null +++ b/examples/fabric-admin/device_manager/CommissionerControl.h @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2024 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 + +/** + * @class CommissionerControl + * @brief This class handles sending CHIP commands related to commissioning, including sending + * commissioning approval requests and commissioning nodes. + * + * The class acts as a command sender and implements the `chip::app::CommandSender::Callback` interface + * to handle responses, errors, and completion events for the commands it sends. It relies on external + * CCTRL delegate and server mechanisms to manage the overall protocol and state transitions, including + * processing the CommissioningRequestResult and invoking CommissionNode. + */ +class CommissionerControl : public chip::app::CommandSender::Callback +{ +public: + CommissionerControl() : + mOnDeviceConnectedCallback(OnDeviceConnectedFn, this), mOnDeviceConnectionFailureCallback(OnDeviceConnectionFailureFn, this) + {} + + /** + * @brief Initializes the CommissionerControl with a DeviceCommissioner, NodeId, and EndpointId. + * + * @param commissioner The DeviceCommissioner to use for the commissioning process. + * @param nodeId The node ID of the remote fabric bridge. + * @param endpointId The endpoint on which to send CommissionerControl commands. + */ + void Init(chip::Controller::DeviceCommissioner & commissioner, chip::NodeId nodeId, chip::EndpointId endpointId); + + /** + * @brief Sends a RequestCommissioningApproval command to the device. + * + * @param requestId The unique request ID. + * @param vendorId The vendor ID of the device. + * @param productId The product ID of the device. + * @param label Optional label for the device. + * @return CHIP_ERROR CHIP_NO_ERROR on success, or an appropriate error code on failure. + */ + CHIP_ERROR RequestCommissioningApproval(uint64_t requestId, uint16_t vendorId, uint16_t productId, + chip::Optional label); + /** + * @brief Sends a CommissionNode command to the device. + * + * @param requestId The unique request ID. + * @param responseTimeoutSeconds Timeout for the response in seconds. + * @return CHIP_ERROR CHIP_NO_ERROR on success, or an appropriate error code on failure. + */ + CHIP_ERROR CommissionNode(uint64_t requestId, uint16_t responseTimeoutSeconds); + + /////////// CommandSender Callback Interface ///////// + virtual void OnResponse(chip::app::CommandSender * client, const chip::app::ConcreteCommandPath & path, + const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override; + + virtual void OnError(const chip::app::CommandSender * client, CHIP_ERROR error) override; + + virtual void OnDone(chip::app::CommandSender * client) override; + +private: + static constexpr uint16_t kMaxDeviceLabelLength = 64; + + enum class CommandType : uint8_t + { + kUndefined = 0, + kRequestCommissioningApproval = 1, + kCommissionNode = 2, + }; + + template + CHIP_ERROR SendCommand(chip::DeviceProxy * device, chip::EndpointId endpointId, chip::ClusterId clusterId, + chip::CommandId commandId, const T & value) + { + chip::app::CommandPathParams commandPath = { endpointId, clusterId, commandId, + (chip::app::CommandPathFlags::kEndpointIdValid) }; + mCommandSender = std::make_unique(this, device->GetExchangeManager(), false, false, + device->GetSecureSession().Value()->AllowsLargePayload()); + + VerifyOrReturnError(mCommandSender != nullptr, CHIP_ERROR_NO_MEMORY); + + chip::app::CommandSender::AddRequestDataParameters addRequestDataParams(chip::NullOptional); + ReturnErrorOnFailure(mCommandSender->AddRequestData(commandPath, value, addRequestDataParams)); + ReturnErrorOnFailure(mCommandSender->SendCommandRequest(device->GetSecureSession().Value())); + + return CHIP_NO_ERROR; + } + + CHIP_ERROR SendCommandForType(CommandType commandType, chip::DeviceProxy * device); + + static void OnDeviceConnectedFn(void * context, chip::Messaging::ExchangeManager & exchangeMgr, + const chip::SessionHandle & sessionHandle); + static void OnDeviceConnectionFailureFn(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error); + + // Private data members + chip::Controller::DeviceCommissioner * mCommissioner = nullptr; + std::unique_ptr mCommandSender; + chip::NodeId mDestinationId = chip::kUndefinedNodeId; + chip::EndpointId mEndpointId = chip::kRootEndpointId; + CommandType mCommandType = CommandType::kUndefined; + char mLabelBuffer[kMaxDeviceLabelLength]; + + chip::Callback::Callback mOnDeviceConnectedCallback; + chip::Callback::Callback mOnDeviceConnectionFailureCallback; + + chip::app::Clusters::CommissionerControl::Commands::RequestCommissioningApproval::Type mRequestCommissioningApproval; + chip::app::Clusters::CommissionerControl::Commands::CommissionNode::Type mCommissionNode; +}; diff --git a/examples/fabric-admin/device_manager/DeviceManager.cpp b/examples/fabric-admin/device_manager/DeviceManager.cpp index 4f7b1c7755..e52027c8f5 100644 --- a/examples/fabric-admin/device_manager/DeviceManager.cpp +++ b/examples/fabric-admin/device_manager/DeviceManager.cpp @@ -26,15 +26,12 @@ #include using namespace chip; -using namespace chip::app::Clusters; namespace { +constexpr EndpointId kAggregatorEndpointId = 1; constexpr uint16_t kWindowTimeout = 300; constexpr uint16_t kIteration = 1000; -constexpr uint16_t kSubscribeMinInterval = 0; -constexpr uint16_t kSubscribeMaxInterval = 60; -constexpr uint16_t kAggragatorEndpointId = 1; constexpr uint16_t kMaxDiscriminatorLength = 4095; } // namespace @@ -69,6 +66,12 @@ void DeviceManager::UpdateLastUsedNodeId(NodeId nodeId) } } +void DeviceManager::SetRemoteBridgeNodeId(chip::NodeId nodeId) +{ + mRemoteBridgeNodeId = nodeId; + mCommissionerControl.Init(PairingManager::Instance().CurrentCommissioner(), mRemoteBridgeNodeId, kAggregatorEndpointId); +} + void DeviceManager::AddSyncedDevice(const Device & device) { mSyncedDevices.insert(device); @@ -114,14 +117,19 @@ void DeviceManager::RemoveSyncedDevice(NodeId nodeId) ChipLogValueX64(device->GetNodeId()), device->GetEndpointId()); } -void DeviceManager::OpenDeviceCommissioningWindow(NodeId nodeId, uint32_t commissioningTimeoutSec, uint32_t iterations, +void DeviceManager::OpenDeviceCommissioningWindow(ScopedNodeId scopedNodeId, uint32_t iterations, uint16_t commissioningTimeoutSec, uint16_t discriminator, const ByteSpan & salt, const ByteSpan & verifier) { - ChipLogProgress(NotSpecified, "Opening commissioning window for Node ID: " ChipLogFormatX64, ChipLogValueX64(nodeId)); + // PairingManager isn't currently capable of OpenCommissioningWindow on a device of a fabric that it doesn't have + // the controller for. Currently no implementation need this functionality, but should they need it they will hit + // the verify or die below and it will be the responsiblity of whoever requires that functionality to implement. + VerifyOrDie(PairingManager::Instance().CurrentCommissioner().GetFabricIndex() == scopedNodeId.GetFabricIndex()); + ChipLogProgress(NotSpecified, "Opening commissioning window for Node ID: " ChipLogFormatX64, + ChipLogValueX64(scopedNodeId.GetNodeId())); // Open the commissioning window of a device within its own fabric. - CHIP_ERROR err = PairingManager::Instance().OpenCommissioningWindow(nodeId, kRootEndpointId, commissioningTimeoutSec, - iterations, discriminator, salt, verifier); + CHIP_ERROR err = PairingManager::Instance().OpenCommissioningWindow( + scopedNodeId.GetNodeId(), kRootEndpointId, commissioningTimeoutSec, iterations, discriminator, salt, verifier); if (err != CHIP_NO_ERROR) { ChipLogError(NotSpecified, "Failed to open commissioning window: %s", ErrorStr(err)); @@ -192,23 +200,17 @@ void DeviceManager::UnpairLocalFabricBridge() void DeviceManager::SubscribeRemoteFabricBridge() { - // Listen to the state changes of the remote fabric bridge. - StringBuilder commandBuilder; - - // Prepare and push the descriptor subscribe command - commandBuilder.Add("descriptor subscribe parts-list "); - commandBuilder.AddFormat("%d %d %lu %d", kSubscribeMinInterval, kSubscribeMaxInterval, mRemoteBridgeNodeId, - kAggragatorEndpointId); - PushCommand(commandBuilder.c_str()); - - // Clear the builder for the next command - commandBuilder.Reset(); - - // Prepare and push the commissioner control subscribe command - commandBuilder.Add("commissionercontrol subscribe-event commissioning-request-result "); - commandBuilder.AddFormat("%d %d %lu %d --is-urgent true --keepSubscriptions true", kSubscribeMinInterval, kSubscribeMaxInterval, - mRemoteBridgeNodeId, kRootEndpointId); - PushCommand(commandBuilder.c_str()); + ChipLogProgress(NotSpecified, "Start subscription to the remote bridge.") + + CHIP_ERROR error = mBridgeSubscriber.StartSubscription(PairingManager::Instance().CurrentCommissioner(), + mRemoteBridgeNodeId, kAggregatorEndpointId); + + if (error != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to subscribe to the remote bridge (NodeId: %lu). Error: %" CHIP_ERROR_FORMAT, + mRemoteBridgeNodeId, error.Format()); + return; + } } void DeviceManager::ReadSupportedDeviceCategories() @@ -220,20 +222,25 @@ void DeviceManager::ReadSupportedDeviceCategories() return; } - StringBuilder commandBuilder; + ChipLogProgress(NotSpecified, "Read SupportedDeviceCategories from the remote bridge."); - commandBuilder.Add("commissionercontrol read supported-device-categories "); - commandBuilder.AddFormat("%ld ", mRemoteBridgeNodeId); - commandBuilder.AddFormat("%d", kRootEndpointId); + CHIP_ERROR error = mFabricSyncGetter.GetFabricSynchronizationData( + [this](TLV::TLVReader & data) { this->HandleReadSupportedDeviceCategories(data); }, + PairingManager::Instance().CurrentCommissioner(), this->GetRemoteBridgeNodeId(), kAggregatorEndpointId); - PushCommand(commandBuilder.c_str()); + if (error != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, + "Failed to read SupportedDeviceCategories from the remote bridge (NodeId: %lu). Error: %" CHIP_ERROR_FORMAT, + mRemoteBridgeNodeId, error.Format()); + } } void DeviceManager::HandleReadSupportedDeviceCategories(TLV::TLVReader & data) { ChipLogProgress(NotSpecified, "Attribute SupportedDeviceCategories detected."); - BitMask value; + BitMask value; CHIP_ERROR error = app::DataModel::Decode(data, value); if (error != CHIP_NO_ERROR) { @@ -241,7 +248,7 @@ void DeviceManager::HandleReadSupportedDeviceCategories(TLV::TLVReader & data) return; } - if (value.Has(CommissionerControl::SupportedDeviceCategoryBitmap::kFabricSynchronization)) + if (value.Has(app::Clusters::CommissionerControl::SupportedDeviceCategoryBitmap::kFabricSynchronization)) { ChipLogProgress(NotSpecified, "Remote Fabric-Bridge supports Fabric Synchronization, start reverse commissioning."); RequestCommissioningApproval(); @@ -257,19 +264,24 @@ void DeviceManager::RequestCommissioningApproval() uint16_t vendorId = static_cast(CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID); uint16_t productId = static_cast(CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID); - StringBuilder commandBuilder; - commandBuilder.Add("commissionercontrol request-commissioning-approval "); - commandBuilder.AddFormat("%lu %u %u %lu %d", requestId, vendorId, productId, mRemoteBridgeNodeId, kRootEndpointId); + CHIP_ERROR error = mCommissionerControl.RequestCommissioningApproval(requestId, vendorId, productId, NullOptional); + + if (error != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, + "Failed to request commissioning-approval to the remote bridge (NodeId: %lu). Error: %" CHIP_ERROR_FORMAT, + mRemoteBridgeNodeId, error.Format()); + return; + } mRequestId = requestId; - PushCommand(commandBuilder.c_str()); } void DeviceManager::HandleCommissioningRequestResult(TLV::TLVReader & data) { ChipLogProgress(NotSpecified, "CommissioningRequestResult event received."); - CommissionerControl::Events::CommissioningRequestResult::DecodableType value; + app::Clusters::CommissionerControl::Events::CommissioningRequestResult::DecodableType value; CHIP_ERROR error = app::DataModel::Decode(data, value); if (error != CHIP_NO_ERROR) { @@ -354,14 +366,6 @@ void DeviceManager::HandleAttributePartsListUpdate(TLV::TLVReader & data) { // print to console fprintf(stderr, "A new device is added on Endpoint: %u\n", endpoint); - - if (mAutoSyncEnabled) - { - StringBuilder commandBuilder; - commandBuilder.Add("fabricsync sync-device "); - commandBuilder.AddFormat("%d", endpoint); - PushCommand(commandBuilder.c_str()); - } } // Process removed endpoints @@ -376,19 +380,6 @@ void DeviceManager::HandleAttributePartsListUpdate(TLV::TLVReader & data) ChipLogProgress(NotSpecified, "No device on Endpoint: %u", endpoint); continue; } - - if (mAutoSyncEnabled) - { - NodeId nodeId = device->GetNodeId(); - if (PairingManager::Instance().UnpairDevice(nodeId) != CHIP_NO_ERROR) - { - ChipLogError(NotSpecified, "Failed to unpair device " ChipLogFormatX64, ChipLogValueX64(nodeId)); - } - else - { - PairingManager::Instance().SetPairingDelegate(this); - } - } } } @@ -396,16 +387,20 @@ void DeviceManager::SendCommissionNodeRequest(uint64_t requestId, uint16_t respo { ChipLogProgress(NotSpecified, "Request the Commissioner Control Server to begin commissioning a previously approved request."); - StringBuilder commandBuilder; - commandBuilder.Add("commissionercontrol commission-node "); - commandBuilder.AddFormat("%lu %u %lu %d", requestId, responseTimeoutSeconds, mRemoteBridgeNodeId, kRootEndpointId); + CHIP_ERROR error = mCommissionerControl.CommissionNode(requestId, responseTimeoutSeconds); - PushCommand(commandBuilder.c_str()); + if (error != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, + "Failed to send CommissionNode command to the remote bridge (NodeId: %lu). Error: %" CHIP_ERROR_FORMAT, + mRemoteBridgeNodeId, error.Format()); + return; + } } void DeviceManager::HandleReverseOpenCommissioningWindow(TLV::TLVReader & data) { - CommissionerControl::Commands::ReverseOpenCommissioningWindow::DecodableType value; + app::Clusters::CommissionerControl::Commands::ReverseOpenCommissioningWindow::DecodableType value; CHIP_ERROR error = app::DataModel::Decode(data, value); if (error != CHIP_NO_ERROR) @@ -422,21 +417,16 @@ void DeviceManager::HandleReverseOpenCommissioningWindow(TLV::TLVReader & data) ChipLogProgress(NotSpecified, " PAKEPasscodeVerifier size: %lu", value.PAKEPasscodeVerifier.size()); ChipLogProgress(NotSpecified, " salt size: %lu", value.salt.size()); - OpenDeviceCommissioningWindow(mLocalBridgeNodeId, value.commissioningTimeout, value.iterations, value.discriminator, + ScopedNodeId scopedNodeId(mLocalBridgeNodeId, PairingManager::Instance().CurrentCommissioner().GetFabricIndex()); + OpenDeviceCommissioningWindow(scopedNodeId, value.iterations, value.commissioningTimeout, value.discriminator, ByteSpan(value.salt.data(), value.salt.size()), ByteSpan(value.PAKEPasscodeVerifier.data(), value.PAKEPasscodeVerifier.size())); } void DeviceManager::HandleAttributeData(const app::ConcreteDataAttributePath & path, TLV::TLVReader & data) { - if (path.mClusterId == CommissionerControl::Id && - path.mAttributeId == CommissionerControl::Attributes::SupportedDeviceCategories::Id) - { - HandleReadSupportedDeviceCategories(data); - return; - } - - if (path.mClusterId == Descriptor::Id && path.mAttributeId == Descriptor::Attributes::PartsList::Id) + if (path.mClusterId == app::Clusters::Descriptor::Id && + path.mAttributeId == app::Clusters::Descriptor::Attributes::PartsList::Id) { HandleAttributePartsListUpdate(data); return; @@ -445,8 +435,8 @@ void DeviceManager::HandleAttributeData(const app::ConcreteDataAttributePath & p void DeviceManager::HandleEventData(const app::EventHeader & header, TLV::TLVReader & data) { - if (header.mPath.mClusterId == CommissionerControl::Id && - header.mPath.mEventId == CommissionerControl::Events::CommissioningRequestResult::Id) + if (header.mPath.mClusterId == app::Clusters::CommissionerControl::Id && + header.mPath.mEventId == app::Clusters::CommissionerControl::Events::CommissioningRequestResult::Id) { HandleCommissioningRequestResult(data); } @@ -456,8 +446,8 @@ void DeviceManager::HandleCommandResponse(const app::ConcreteCommandPath & path, { ChipLogProgress(NotSpecified, "Command Response received."); - if (path.mClusterId == CommissionerControl::Id && - path.mCommandId == CommissionerControl::Commands::ReverseOpenCommissioningWindow::Id) + if (path.mClusterId == app::Clusters::CommissionerControl::Id && + path.mCommandId == app::Clusters::CommissionerControl::Commands::ReverseOpenCommissioningWindow::Id) { HandleReverseOpenCommissioningWindow(data); } diff --git a/examples/fabric-admin/device_manager/DeviceManager.h b/examples/fabric-admin/device_manager/DeviceManager.h index 5e43e78e3a..6adc8f243e 100644 --- a/examples/fabric-admin/device_manager/DeviceManager.h +++ b/examples/fabric-admin/device_manager/DeviceManager.h @@ -19,9 +19,11 @@ #pragma once #include +#include +#include +#include #include #include - #include constexpr uint32_t kDefaultSetupPinCode = 20202021; @@ -61,20 +63,16 @@ class DeviceManager : public PairingDelegate void UpdateLastUsedNodeId(chip::NodeId nodeId); - void SetRemoteBridgeNodeId(chip::NodeId nodeId) { mRemoteBridgeNodeId = nodeId; } + void SetRemoteBridgeNodeId(chip::NodeId nodeId); void SetLocalBridgePort(uint16_t port) { mLocalBridgePort = port; } void SetLocalBridgeSetupPinCode(uint32_t pinCode) { mLocalBridgeSetupPinCode = pinCode; } void SetLocalBridgeNodeId(chip::NodeId nodeId) { mLocalBridgeNodeId = nodeId; } - bool IsAutoSyncEnabled() const { return mAutoSyncEnabled; } - bool IsFabricSyncReady() const { return mRemoteBridgeNodeId != chip::kUndefinedNodeId; } bool IsLocalBridgeReady() const { return mLocalBridgeNodeId != chip::kUndefinedNodeId; } - void EnableAutoSync(bool state) { mAutoSyncEnabled = state; } - void AddSyncedDevice(const Device & device); void RemoveSyncedDevice(chip::NodeId nodeId); @@ -93,18 +91,18 @@ class DeviceManager : public PairingDelegate * * This function initiates the process to open the commissioning window for a device identified by the given node ID. * - * @param nodeId The ID of the node that should open the commissioning window. - * @param commissioningTimeoutSec The time in seconds before the commissioning window closes. This value determines - * how long the commissioning window remains open for incoming connections. + * @param scopedNodeId The scoped node ID of the device that should open the commissioning window. * @param iterations The number of PBKDF (Password-Based Key Derivation Function) iterations to use * for deriving the PAKE (Password Authenticated Key Exchange) verifier. + * @param commissioningTimeoutSec The time in seconds before the commissioning window closes. This value determines + * how long the commissioning window remains open for incoming connections. * @param discriminator The device-specific discriminator, determined during commissioning, which helps * to uniquely identify the device among others. * @param salt The salt used in the cryptographic operations for commissioning. * @param verifier The PAKE verifier used to authenticate the commissioning process. * */ - void OpenDeviceCommissioningWindow(chip::NodeId nodeId, uint32_t commissioningTimeoutSec, uint32_t iterations, + void OpenDeviceCommissioningWindow(chip::ScopedNodeId scopedNodeId, uint32_t iterations, uint16_t commissioningTimeoutSec, uint16_t discriminator, const chip::ByteSpan & salt, const chip::ByteSpan & verifier); /** @@ -206,9 +204,12 @@ class DeviceManager : public PairingDelegate chip::NodeId mLocalBridgeNodeId = chip::kUndefinedNodeId; std::set mSyncedDevices; - bool mAutoSyncEnabled = false; - bool mInitialized = false; - uint64_t mRequestId = 0; + bool mInitialized = false; + uint64_t mRequestId = 0; + + BridgeSubscription mBridgeSubscriber; + CommissionerControl mCommissionerControl; + FabricSyncGetter mFabricSyncGetter; }; /** diff --git a/examples/fabric-admin/device_manager/DeviceSubscription.cpp b/examples/fabric-admin/device_manager/DeviceSubscription.cpp index a5625707a5..434d349e8c 100644 --- a/examples/fabric-admin/device_manager/DeviceSubscription.cpp +++ b/examples/fabric-admin/device_manager/DeviceSubscription.cpp @@ -120,11 +120,21 @@ void DeviceSubscription::OnDone(ReadClient * apReadClient) // After calling mOnDoneCallback we are indicating that `this` is deleted and we shouldn't do anything else with // DeviceSubscription. MoveToState(State::AwaitingDestruction); - mOnDoneCallback(mNodeId); + mOnDoneCallback(mScopedNodeId); } void DeviceSubscription::OnError(CHIP_ERROR error) { +#if defined(PW_RPC_ENABLED) + if (error == CHIP_ERROR_TIMEOUT && mState == State::SubscriptionStarted) + { + chip_rpc_ReachabilityChanged reachabilityChanged; + reachabilityChanged.has_id = true; + reachabilityChanged.id = mCurrentAdministratorCommissioningAttributes.id; + reachabilityChanged.reachability = false; + DeviceReachableChanged(reachabilityChanged); + } +#endif ChipLogProgress(NotSpecified, "Error subscribing: %" CHIP_ERROR_FORMAT, error.Format()); } @@ -135,7 +145,7 @@ void DeviceSubscription::OnDeviceConnected(Messaging::ExchangeManager & exchange // After calling mOnDoneCallback we are indicating that `this` is deleted and we shouldn't do anything else with // DeviceSubscription. MoveToState(State::AwaitingDestruction); - mOnDoneCallback(mNodeId); + mOnDoneCallback(mScopedNodeId); return; } VerifyOrDie(mState == State::Connecting); @@ -160,7 +170,7 @@ void DeviceSubscription::OnDeviceConnected(Messaging::ExchangeManager & exchange // After calling mOnDoneCallback we are indicating that `this` is deleted and we shouldn't do anything else with // DeviceSubscription. MoveToState(State::AwaitingDestruction); - mOnDoneCallback(mNodeId); + mOnDoneCallback(mScopedNodeId); return; } MoveToState(State::SubscriptionStarted); @@ -198,34 +208,45 @@ void DeviceSubscription::OnDeviceConnectionFailure(const ScopedNodeId & peerId, { VerifyOrDie(mState == State::Connecting || mState == State::Stopping); ChipLogError(NotSpecified, "DeviceSubscription failed to connect to " ChipLogFormatX64, ChipLogValueX64(peerId.GetNodeId())); - // TODO(#35333) Figure out how we should recover if we fail to connect and mState == State::Connecting. +#if defined(PW_RPC_ENABLED) + if (mState == State::Connecting) + { + chip_rpc_ReachabilityChanged reachabilityChanged; + reachabilityChanged.has_id = true; + reachabilityChanged.id = mCurrentAdministratorCommissioningAttributes.id; + reachabilityChanged.reachability = false; + DeviceReachableChanged(reachabilityChanged); + } +#endif // After calling mOnDoneCallback we are indicating that `this` is deleted and we shouldn't do anything else with // DeviceSubscription. MoveToState(State::AwaitingDestruction); - mOnDoneCallback(mNodeId); + mOnDoneCallback(mScopedNodeId); } CHIP_ERROR DeviceSubscription::StartSubscription(OnDoneCallback onDoneCallback, Controller::DeviceController & controller, - NodeId nodeId) + ScopedNodeId scopedNodeId) { assertChipStackLockedByCurrentThread(); VerifyOrDie(mState == State::Idle); + VerifyOrReturnError(controller.GetFabricIndex() == scopedNodeId.GetFabricIndex(), CHIP_ERROR_INVALID_ARGUMENT); - mNodeId = nodeId; + mScopedNodeId = scopedNodeId; #if defined(PW_RPC_ENABLED) mCurrentAdministratorCommissioningAttributes = chip_rpc_AdministratorCommissioningChanged_init_default; mCurrentAdministratorCommissioningAttributes.has_id = true; - mCurrentAdministratorCommissioningAttributes.id.node_id = nodeId; - mCurrentAdministratorCommissioningAttributes.id.fabric_index = controller.GetFabricIndex(); + mCurrentAdministratorCommissioningAttributes.id.node_id = scopedNodeId.GetNodeId(); + mCurrentAdministratorCommissioningAttributes.id.fabric_index = scopedNodeId.GetFabricIndex(); mCurrentAdministratorCommissioningAttributes.window_status = static_cast(Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum::kWindowNotOpen); #endif mOnDoneCallback = onDoneCallback; MoveToState(State::Connecting); - CHIP_ERROR err = controller.GetConnectedDevice(nodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); + CHIP_ERROR err = + controller.GetConnectedDevice(scopedNodeId.GetNodeId(), &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); if (err != CHIP_NO_ERROR) { MoveToState(State::Idle); @@ -258,5 +279,5 @@ void DeviceSubscription::StopSubscription() // After calling mOnDoneCallback we are indicating that `this` is deleted and we shouldn't do anything else with // DeviceSubscription. MoveToState(State::AwaitingDestruction); - mOnDoneCallback(mNodeId); + mOnDoneCallback(mScopedNodeId); } diff --git a/examples/fabric-admin/device_manager/DeviceSubscription.h b/examples/fabric-admin/device_manager/DeviceSubscription.h index 5d84037773..8db31d6e90 100644 --- a/examples/fabric-admin/device_manager/DeviceSubscription.h +++ b/examples/fabric-admin/device_manager/DeviceSubscription.h @@ -39,12 +39,12 @@ class DeviceSubscriptionManager; class DeviceSubscription : public chip::app::ReadClient::Callback { public: - using OnDoneCallback = std::function; + using OnDoneCallback = std::function; DeviceSubscription(); CHIP_ERROR StartSubscription(OnDoneCallback onDoneCallback, chip::Controller::DeviceController & controller, - chip::NodeId nodeId); + chip::ScopedNodeId nodeId); /// This will trigger stopping the subscription. Once subscription is stopped the OnDoneCallback /// provided in StartSubscription will be called to indicate that subscription have been terminated. @@ -80,7 +80,7 @@ class DeviceSubscription : public chip::app::ReadClient::Callback void MoveToState(const State aTargetState); const char * GetStateStr() const; - chip::NodeId mNodeId = chip::kUndefinedNodeId; + chip::ScopedNodeId mScopedNodeId; OnDoneCallback mOnDoneCallback; std::unique_ptr mClient; diff --git a/examples/fabric-admin/device_manager/DeviceSubscriptionManager.cpp b/examples/fabric-admin/device_manager/DeviceSubscriptionManager.cpp index 8dd43f2875..0410c162a8 100644 --- a/examples/fabric-admin/device_manager/DeviceSubscriptionManager.cpp +++ b/examples/fabric-admin/device_manager/DeviceSubscriptionManager.cpp @@ -38,25 +38,25 @@ DeviceSubscriptionManager & DeviceSubscriptionManager::Instance() return instance; } -CHIP_ERROR DeviceSubscriptionManager::StartSubscription(Controller::DeviceController & controller, NodeId nodeId) +CHIP_ERROR DeviceSubscriptionManager::StartSubscription(Controller::DeviceController & controller, ScopedNodeId scopedNodeId) { assertChipStackLockedByCurrentThread(); - auto it = mDeviceSubscriptionMap.find(nodeId); + auto it = mDeviceSubscriptionMap.find(scopedNodeId); VerifyOrReturnError((it == mDeviceSubscriptionMap.end()), CHIP_ERROR_INCORRECT_STATE); auto deviceSubscription = std::make_unique(); VerifyOrReturnError(deviceSubscription, CHIP_ERROR_NO_MEMORY); ReturnErrorOnFailure(deviceSubscription->StartSubscription( - [this](NodeId aNodeId) { this->DeviceSubscriptionTerminated(aNodeId); }, controller, nodeId)); + [this](ScopedNodeId aNodeId) { this->DeviceSubscriptionTerminated(aNodeId); }, controller, scopedNodeId)); - mDeviceSubscriptionMap[nodeId] = std::move(deviceSubscription); + mDeviceSubscriptionMap[scopedNodeId] = std::move(deviceSubscription); return CHIP_NO_ERROR; } -CHIP_ERROR DeviceSubscriptionManager::RemoveSubscription(NodeId nodeId) +CHIP_ERROR DeviceSubscriptionManager::RemoveSubscription(ScopedNodeId scopedNodeId) { assertChipStackLockedByCurrentThread(); - auto it = mDeviceSubscriptionMap.find(nodeId); + auto it = mDeviceSubscriptionMap.find(scopedNodeId); VerifyOrReturnError((it != mDeviceSubscriptionMap.end()), CHIP_ERROR_NOT_FOUND); // We cannot safely erase the DeviceSubscription from mDeviceSubscriptionMap. // After calling StopSubscription we expect DeviceSubscription to eventually @@ -67,14 +67,14 @@ CHIP_ERROR DeviceSubscriptionManager::RemoveSubscription(NodeId nodeId) return CHIP_NO_ERROR; } -void DeviceSubscriptionManager::DeviceSubscriptionTerminated(NodeId nodeId) +void DeviceSubscriptionManager::DeviceSubscriptionTerminated(ScopedNodeId scopedNodeId) { assertChipStackLockedByCurrentThread(); - auto it = mDeviceSubscriptionMap.find(nodeId); + auto it = mDeviceSubscriptionMap.find(scopedNodeId); // DeviceSubscriptionTerminated is a private method that is expected to only // be called by DeviceSubscription when it is terminal and is ready to be // cleaned up and removed. If it is not mapped that means something has gone // really wrong and there is likely a memory leak somewhere. VerifyOrDie(it != mDeviceSubscriptionMap.end()); - mDeviceSubscriptionMap.erase(nodeId); + mDeviceSubscriptionMap.erase(scopedNodeId); } diff --git a/examples/fabric-admin/device_manager/DeviceSubscriptionManager.h b/examples/fabric-admin/device_manager/DeviceSubscriptionManager.h index 5f4e115863..1b5c45fd05 100644 --- a/examples/fabric-admin/device_manager/DeviceSubscriptionManager.h +++ b/examples/fabric-admin/device_manager/DeviceSubscriptionManager.h @@ -32,12 +32,23 @@ class DeviceSubscriptionManager /// Usually called after we have added a synchronized device to fabric-bridge to monitor /// for any changes that need to be propagated to fabric-bridge. - CHIP_ERROR StartSubscription(chip::Controller::DeviceController & controller, chip::NodeId nodeId); + CHIP_ERROR StartSubscription(chip::Controller::DeviceController & controller, chip::ScopedNodeId scopedNodeId); - CHIP_ERROR RemoveSubscription(chip::NodeId nodeId); + CHIP_ERROR RemoveSubscription(chip::ScopedNodeId scopedNodeId); private: - void DeviceSubscriptionTerminated(chip::NodeId nodeId); - - std::unordered_map> mDeviceSubscriptionMap; + struct ScopedNodeIdHasher + { + std::size_t operator()(const chip::ScopedNodeId & scopedNodeId) const + { + std::size_t h1 = std::hash{}(scopedNodeId.GetFabricIndex()); + std::size_t h2 = std::hash{}(scopedNodeId.GetNodeId()); + // Bitshifting h2 reduces collisions when fabricIndex == nodeId. + return h1 ^ (h2 << 1); + } + }; + + void DeviceSubscriptionTerminated(chip::ScopedNodeId scopedNodeId); + + std::unordered_map, ScopedNodeIdHasher> mDeviceSubscriptionMap; }; diff --git a/examples/fabric-admin/device_manager/DeviceSynchronization.cpp b/examples/fabric-admin/device_manager/DeviceSynchronization.cpp index ec350239d7..1e8728ee59 100644 --- a/examples/fabric-admin/device_manager/DeviceSynchronization.cpp +++ b/examples/fabric-admin/device_manager/DeviceSynchronization.cpp @@ -239,23 +239,23 @@ void DeviceSynchronizer::GetUniqueId() auto remoteBridgeNodeId = DeviceMgr().GetRemoteBridgeNodeId(); EndpointId remoteEndpointIdOfInterest = device->GetEndpointId(); - ChipLogDetail(NotSpecified, "Attempting to get UniqueId from remote Fabric Sync Aggregator") CHIP_ERROR err = - mUniqueIdGetter.GetUniqueId( - [this](std::optional aUniqueId) { - if (aUniqueId.has_value()) - { + ChipLogDetail(NotSpecified, "Attempting to get UniqueId from remote Fabric Sync Aggregator"); + CHIP_ERROR err = mUniqueIdGetter.GetUniqueId( + [this](std::optional aUniqueId) { + if (aUniqueId.has_value()) + { #if defined(PW_RPC_ENABLED) - this->mCurrentDeviceData.has_unique_id = true; - memcpy(this->mCurrentDeviceData.unique_id, aUniqueId.value().data(), aUniqueId.value().size()); + this->mCurrentDeviceData.has_unique_id = true; + memcpy(this->mCurrentDeviceData.unique_id, aUniqueId.value().data(), aUniqueId.value().size()); #endif - } - else - { - ChipLogError(NotSpecified, "We expected to get UniqueId from remote Fabric Sync Aggregator, but failed"); - } - this->SynchronizationCompleteAddDevice(); - }, - *mController, remoteBridgeNodeId, remoteEndpointIdOfInterest); + } + else + { + ChipLogError(NotSpecified, "We expected to get UniqueId from remote Fabric Sync Aggregator, but failed"); + } + this->SynchronizationCompleteAddDevice(); + }, + *mController, remoteBridgeNodeId, remoteEndpointIdOfInterest); if (err == CHIP_NO_ERROR) { @@ -277,11 +277,16 @@ void DeviceSynchronizer::SynchronizationCompleteAddDevice() if (!mCurrentDeviceData.is_icd) { VerifyOrDie(mController); - // TODO(#35333) Figure out how we should recover in this circumstance. - CHIP_ERROR err = DeviceSubscriptionManager::Instance().StartSubscription(*mController, mNodeId); + ScopedNodeId scopedNodeId(mNodeId, mController->GetFabricIndex()); + CHIP_ERROR err = DeviceSubscriptionManager::Instance().StartSubscription(*mController, scopedNodeId); if (err != CHIP_NO_ERROR) { ChipLogError(NotSpecified, "Failed start subscription to NodeId:" ChipLogFormatX64, ChipLogValueX64(mNodeId)); + chip_rpc_ReachabilityChanged reachabilityChanged; + reachabilityChanged.has_id = true; + reachabilityChanged.id = mCurrentDeviceData.id; + reachabilityChanged.reachability = false; + DeviceReachableChanged(reachabilityChanged); } } #endif diff --git a/examples/fabric-admin/device_manager/FabricSyncGetter.cpp b/examples/fabric-admin/device_manager/FabricSyncGetter.cpp new file mode 100644 index 0000000000..5201048c3f --- /dev/null +++ b/examples/fabric-admin/device_manager/FabricSyncGetter.cpp @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2024 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 "FabricSyncGetter.h" + +using namespace ::chip; +using namespace ::chip::app; +using chip::app::ReadClient; + +namespace { + +void OnDeviceConnectedWrapper(void * context, Messaging::ExchangeManager & exchangeMgr, const SessionHandle & sessionHandle) +{ + reinterpret_cast(context)->OnDeviceConnected(exchangeMgr, sessionHandle); +} + +void OnDeviceConnectionFailureWrapper(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) +{ + reinterpret_cast(context)->OnDeviceConnectionFailure(peerId, error); +} + +} // namespace + +FabricSyncGetter::FabricSyncGetter() : + mOnDeviceConnectedCallback(OnDeviceConnectedWrapper, this), + mOnDeviceConnectionFailureCallback(OnDeviceConnectionFailureWrapper, this) +{} + +CHIP_ERROR FabricSyncGetter::GetFabricSynchronizationData(OnDoneCallback onDoneCallback, Controller::DeviceController & controller, + NodeId nodeId, EndpointId endpointId) +{ + assertChipStackLockedByCurrentThread(); + + mEndpointId = endpointId; + mOnDoneCallback = onDoneCallback; + + CHIP_ERROR err = controller.GetConnectedDevice(nodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to connect to remote fabric bridge %" CHIP_ERROR_FORMAT, err.Format()); + } + return err; +} + +void FabricSyncGetter::OnAttributeData(const ConcreteDataAttributePath & path, TLV::TLVReader * data, const StatusIB & status) +{ + VerifyOrDie(path.mClusterId == Clusters::CommissionerControl::Id); + + if (!status.IsSuccess()) + { + ChipLogError(NotSpecified, "Response Failure: %" CHIP_ERROR_FORMAT, status.ToChipError().Format()); + return; + } + + switch (path.mAttributeId) + { + case Clusters::CommissionerControl::Attributes::SupportedDeviceCategories::Id: { + mOnDoneCallback(*data); + break; + } + default: + break; + } +} + +void FabricSyncGetter::OnError(CHIP_ERROR error) +{ + ChipLogProgress(NotSpecified, "Error Getting SupportedDeviceCategories: %" CHIP_ERROR_FORMAT, error.Format()); +} + +void FabricSyncGetter::OnDone(ReadClient * apReadClient) +{ + ChipLogProgress(NotSpecified, "Reading SupportedDeviceCategories is done."); +} + +void FabricSyncGetter::OnDeviceConnected(Messaging::ExchangeManager & exchangeMgr, const SessionHandle & sessionHandle) +{ + mClient = std::make_unique(app::InteractionModelEngine::GetInstance(), &exchangeMgr, *this /* callback */, + ReadClient::InteractionType::Read); + VerifyOrDie(mClient); + + AttributePathParams readPaths[1]; + readPaths[0] = AttributePathParams(mEndpointId, Clusters::CommissionerControl::Id, + Clusters::CommissionerControl::Attributes::SupportedDeviceCategories::Id); + + ReadPrepareParams readParams(sessionHandle); + + readParams.mpAttributePathParamsList = readPaths; + readParams.mAttributePathParamsListSize = 1; + + CHIP_ERROR err = mClient->SendRequest(readParams); + + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to read SupportedDeviceCategories from the bridged device."); + OnDone(nullptr); + return; + } +} + +void FabricSyncGetter::OnDeviceConnectionFailure(const ScopedNodeId & peerId, CHIP_ERROR error) +{ + ChipLogError(NotSpecified, "FabricSyncGetter failed to connect to " ChipLogFormatX64, ChipLogValueX64(peerId.GetNodeId())); + + OnDone(nullptr); +} diff --git a/examples/fabric-admin/device_manager/FabricSyncGetter.h b/examples/fabric-admin/device_manager/FabricSyncGetter.h new file mode 100644 index 0000000000..d6d3a5bce8 --- /dev/null +++ b/examples/fabric-admin/device_manager/FabricSyncGetter.h @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2024 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 + +/** + * @brief Class used to get FabricSynchronization from SupportedDeviceCategories attribute of Commissioner Control Cluster. + * + * Functionality: + * - Establishes a CASE session to communicate with the remote bridge. + * - Retrieves the attribute data from the endpoint which host Aggregator. + * - Provides callbacks for success, error, and completion when retrieving data. + */ +class FabricSyncGetter : public chip::app::ReadClient::Callback +{ +public: + using OnDoneCallback = std::function; + + FabricSyncGetter(); + + /** + * @brief Initiates the process of retrieving fabric synchronization data from the target device. + * + * @param onDoneCallback A callback function to be invoked when the data retrieval is complete. + * @param controller The device controller used to establish a session with the target device. + * @param nodeId The Node ID of the target device. + * @param endpointId The Endpoint ID from which to retrieve the fabric synchronization data. + * @return CHIP_ERROR Returns an error if the process fails, CHIP_NO_ERROR on success. + */ + CHIP_ERROR GetFabricSynchronizationData(OnDoneCallback onDoneCallback, chip::Controller::DeviceController & controller, + chip::NodeId nodeId, chip::EndpointId endpointId); + + /////////////////////////////////////////////////////////////// + // ReadClient::Callback implementation + /////////////////////////////////////////////////////////////// + void OnAttributeData(const chip::app::ConcreteDataAttributePath & path, chip::TLV::TLVReader * data, + const chip::app::StatusIB & status) override; + void OnError(CHIP_ERROR error) override; + void OnDone(chip::app::ReadClient * apReadClient) override; + + /////////////////////////////////////////////////////////////// + // callbacks for CASE session establishment + /////////////////////////////////////////////////////////////// + void OnDeviceConnected(chip::Messaging::ExchangeManager & exchangeMgr, const chip::SessionHandle & sessionHandle); + void OnDeviceConnectionFailure(const chip::ScopedNodeId & peerId, CHIP_ERROR error); + +private: + std::unique_ptr mClient; + + OnDoneCallback mOnDoneCallback; + chip::EndpointId mEndpointId; + chip::Callback::Callback mOnDeviceConnectedCallback; + chip::Callback::Callback mOnDeviceConnectionFailureCallback; +}; diff --git a/examples/fabric-admin/device_manager/PairingManager.cpp b/examples/fabric-admin/device_manager/PairingManager.cpp index c46a0ca000..41b4c8744e 100644 --- a/examples/fabric-admin/device_manager/PairingManager.cpp +++ b/examples/fabric-admin/device_manager/PairingManager.cpp @@ -131,98 +131,97 @@ CHIP_ERROR PairingManager::OpenCommissioningWindow(NodeId nodeId, EndpointId end return CHIP_ERROR_INCORRECT_STATE; } - auto params = Platform::MakeUnique(); - params->nodeId = nodeId; - params->endpointId = endpointId; - params->commissioningWindowTimeout = commissioningTimeoutSec; - params->iteration = iterations; - params->discriminator = discriminator; + // Ensure salt and verifier sizes are valid + if (!salt.empty() && salt.size() > chip::Crypto::kSpake2p_Max_PBKDF_Salt_Length) + { + ChipLogError(NotSpecified, "Salt size exceeds buffer capacity"); + return CHIP_ERROR_BUFFER_TOO_SMALL; + } - if (!salt.empty()) + if (!verifier.empty() && verifier.size() > chip::Crypto::kSpake2p_VerifierSerialized_Length) { - if (salt.size() > sizeof(params->saltBuffer)) - { - ChipLogError(NotSpecified, "Salt size exceeds buffer capacity"); - return CHIP_ERROR_BUFFER_TOO_SMALL; - } + ChipLogError(NotSpecified, "Verifier size exceeds buffer capacity"); + return CHIP_ERROR_BUFFER_TOO_SMALL; + } - memcpy(params->saltBuffer, salt.data(), salt.size()); - params->salt = ByteSpan(params->saltBuffer, salt.size()); + if (!salt.empty()) + { + memcpy(mSaltBuffer, salt.data(), salt.size()); + mSalt = ByteSpan(mSaltBuffer, salt.size()); + } + else + { + mSalt = ByteSpan(); } if (!verifier.empty()) { - if (verifier.size() > sizeof(params->verifierBuffer)) - { - ChipLogError(NotSpecified, "Verifier size exceeds buffer capacity"); - return CHIP_ERROR_BUFFER_TOO_SMALL; - } - - memcpy(params->verifierBuffer, verifier.data(), verifier.size()); - params->verifier = ByteSpan(params->verifierBuffer, verifier.size()); + memcpy(mVerifierBuffer, verifier.data(), verifier.size()); + mVerifier = ByteSpan(mVerifierBuffer, verifier.size()); } - - // Schedule work on the Matter thread - return DeviceLayer::PlatformMgr().ScheduleWork(OnOpenCommissioningWindow, reinterpret_cast(params.release())); -} - -void PairingManager::OnOpenCommissioningWindow(intptr_t context) -{ - Platform::UniquePtr params(reinterpret_cast(context)); - PairingManager & self = PairingManager::Instance(); - - if (self.mCommissioner == nullptr) + else { - ChipLogError(NotSpecified, "Commissioner is null, cannot open commissioning window"); - return; + mVerifier = ByteSpan(); } - self.mWindowOpener = Platform::MakeUnique(self.mCommissioner); + return DeviceLayer::SystemLayer().ScheduleLambda([nodeId, endpointId, commissioningTimeoutSec, iterations, discriminator]() { + PairingManager & self = PairingManager::Instance(); - if (!params->verifier.empty()) - { - if (params->salt.empty()) + if (self.mCommissioner == nullptr) { - ChipLogError(NotSpecified, "Salt is required when verifier is set"); - self.mWindowOpener.reset(); + ChipLogError(NotSpecified, "Commissioner is null, cannot open commissioning window"); return; } - CHIP_ERROR err = - self.mWindowOpener->OpenCommissioningWindow(Controller::CommissioningWindowVerifierParams() - .SetNodeId(params->nodeId) - .SetEndpointId(params->endpointId) - .SetTimeout(params->commissioningWindowTimeout) - .SetIteration(params->iteration) - .SetDiscriminator(params->discriminator) - .SetVerifier(params->verifier) - .SetSalt(params->salt) - .SetCallback(&self.mOnOpenCommissioningWindowVerifierCallback)); - if (err != CHIP_NO_ERROR) + self.mWindowOpener = Platform::MakeUnique(self.mCommissioner); + + if (!self.mVerifier.empty()) { - ChipLogError(NotSpecified, "Failed to open commissioning window with verifier: %s", ErrorStr(err)); - self.mWindowOpener.reset(); + if (self.mSalt.empty()) + { + ChipLogError(NotSpecified, "Salt is required when verifier is set"); + self.mWindowOpener.reset(); + return; + } + + // Open the commissioning window with verifier parameters + CHIP_ERROR err = + self.mWindowOpener->OpenCommissioningWindow(Controller::CommissioningWindowVerifierParams() + .SetNodeId(nodeId) + .SetEndpointId(endpointId) + .SetTimeout(commissioningTimeoutSec) + .SetIteration(iterations) + .SetDiscriminator(discriminator) + .SetVerifier(self.mVerifier) + .SetSalt(self.mSalt) + .SetCallback(&self.mOnOpenCommissioningWindowVerifierCallback)); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to open commissioning window with verifier: %s", ErrorStr(err)); + self.mWindowOpener.reset(); + } } - } - else - { - SetupPayload ignored; - CHIP_ERROR err = self.mWindowOpener->OpenCommissioningWindow(Controller::CommissioningWindowPasscodeParams() - .SetNodeId(params->nodeId) - .SetEndpointId(params->endpointId) - .SetTimeout(params->commissioningWindowTimeout) - .SetIteration(params->iteration) - .SetDiscriminator(params->discriminator) - .SetSetupPIN(NullOptional) - .SetSalt(NullOptional) - .SetCallback(&self.mOnOpenCommissioningWindowCallback), - ignored); - if (err != CHIP_NO_ERROR) + else { - ChipLogError(NotSpecified, "Failed to open commissioning window with passcode: %s", ErrorStr(err)); - self.mWindowOpener.reset(); + SetupPayload ignored; + // Open the commissioning window with passcode parameters + CHIP_ERROR err = self.mWindowOpener->OpenCommissioningWindow(Controller::CommissioningWindowPasscodeParams() + .SetNodeId(nodeId) + .SetEndpointId(endpointId) + .SetTimeout(commissioningTimeoutSec) + .SetIteration(iterations) + .SetDiscriminator(discriminator) + .SetSetupPIN(NullOptional) + .SetSalt(NullOptional) + .SetCallback(&self.mOnOpenCommissioningWindowCallback), + ignored); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to open commissioning window with passcode: %s", ErrorStr(err)); + self.mWindowOpener.reset(); + } } - } + }); } void PairingManager::OnOpenCommissioningWindowResponse(void * context, NodeId remoteId, CHIP_ERROR err, SetupPayload payload) @@ -290,7 +289,7 @@ void PairingManager::OnCommissioningComplete(NodeId nodeId, CHIP_ERROR err) if (err == CHIP_NO_ERROR) { // print to console - fprintf(stderr, "New device with Node ID: " ChipLogFormatX64 "has been successfully added.\n", ChipLogValueX64(nodeId)); + fprintf(stderr, "New device with Node ID: " ChipLogFormatX64 " has been successfully added.\n", ChipLogValueX64(nodeId)); // mCommissioner has a lifetime that is the entire life of the application itself // so it is safe to provide to StartDeviceSynchronization. @@ -580,34 +579,24 @@ CHIP_ERROR PairingManager::PairDeviceWithCode(NodeId nodeId, const char * payloa return CHIP_ERROR_INVALID_STRING_LENGTH; } - auto params = Platform::MakeUnique(); - VerifyOrReturnError(params != nullptr, CHIP_ERROR_NO_MEMORY); - - params->nodeId = nodeId; - Platform::CopyString(params->payloadBuffer, sizeof(params->payloadBuffer), payload); + Platform::CopyString(mOnboardingPayload, sizeof(mOnboardingPayload), payload); - // Schedule work on the Matter thread - return DeviceLayer::PlatformMgr().ScheduleWork(OnPairDeviceWithCode, reinterpret_cast(params.release())); -} - -void PairingManager::OnPairDeviceWithCode(intptr_t context) -{ - Platform::UniquePtr params(reinterpret_cast(context)); - PairingManager & self = PairingManager::Instance(); + return DeviceLayer::SystemLayer().ScheduleLambda([nodeId]() { + PairingManager & self = PairingManager::Instance(); - self.InitPairingCommand(); + self.InitPairingCommand(); - CommissioningParameters commissioningParams = self.GetCommissioningParameters(); - auto discoveryType = DiscoveryType::kDiscoveryNetworkOnly; + CommissioningParameters commissioningParams = self.GetCommissioningParameters(); + auto discoveryType = DiscoveryType::kDiscoveryNetworkOnly; - self.mNodeId = params->nodeId; - self.mOnboardingPayload = params->payloadBuffer; + self.mNodeId = nodeId; - CHIP_ERROR err = self.mCommissioner->PairDevice(params->nodeId, params->payloadBuffer, commissioningParams, discoveryType); - if (err != CHIP_NO_ERROR) - { - ChipLogError(NotSpecified, "Failed to pair device with code, error: %s", ErrorStr(err)); - } + CHIP_ERROR err = self.mCommissioner->PairDevice(nodeId, self.mOnboardingPayload, commissioningParams, discoveryType); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to pair device with code, error: %s", ErrorStr(err)); + } + }); } CHIP_ERROR PairingManager::PairDevice(chip::NodeId nodeId, uint32_t setupPINCode, const char * deviceRemoteIp, @@ -619,72 +608,50 @@ CHIP_ERROR PairingManager::PairDevice(chip::NodeId nodeId, uint32_t setupPINCode return CHIP_ERROR_INVALID_STRING_LENGTH; } - auto params = Platform::MakeUnique(); - VerifyOrReturnError(params != nullptr, CHIP_ERROR_NO_MEMORY); - - params->nodeId = nodeId; - params->setupPINCode = setupPINCode; - params->deviceRemotePort = deviceRemotePort; - - Platform::CopyString(params->ipAddrBuffer, sizeof(params->ipAddrBuffer), deviceRemoteIp); - - // Schedule work on the Matter thread - return DeviceLayer::PlatformMgr().ScheduleWork(OnPairDevice, reinterpret_cast(params.release())); -} + Platform::CopyString(mRemoteIpAddr, sizeof(mRemoteIpAddr), deviceRemoteIp); -void PairingManager::OnPairDevice(intptr_t context) -{ - Platform::UniquePtr params(reinterpret_cast(context)); - PairingManager & self = PairingManager::Instance(); + return DeviceLayer::SystemLayer().ScheduleLambda([nodeId, setupPINCode, deviceRemotePort]() { + PairingManager & self = PairingManager::Instance(); - self.InitPairingCommand(); - self.mSetupPINCode = params->setupPINCode; + self.InitPairingCommand(); + self.mSetupPINCode = setupPINCode; - Inet::IPAddress address; - Inet::InterfaceId interfaceId; + Inet::IPAddress address; + Inet::InterfaceId interfaceId; - if (!ParseAddressWithInterface(params->ipAddrBuffer, address, interfaceId)) - { - ChipLogError(NotSpecified, "Invalid IP address: %s", params->ipAddrBuffer); - return; - } + if (!ParseAddressWithInterface(self.mRemoteIpAddr, address, interfaceId)) + { + ChipLogError(NotSpecified, "Invalid IP address: %s", self.mRemoteIpAddr); + return; + } - CHIP_ERROR err = self.Pair(params->nodeId, Transport::PeerAddress::UDP(address, params->deviceRemotePort, interfaceId)); - if (err != CHIP_NO_ERROR) - { - ChipLogError(NotSpecified, "Failed to pair device, error: %s", ErrorStr(err)); - } + CHIP_ERROR err = self.Pair(nodeId, Transport::PeerAddress::UDP(address, deviceRemotePort, interfaceId)); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to pair device, error: %s", ErrorStr(err)); + } + }); } CHIP_ERROR PairingManager::UnpairDevice(NodeId nodeId) { - auto params = Platform::MakeUnique(); - VerifyOrReturnError(params != nullptr, CHIP_ERROR_NO_MEMORY); - - params->nodeId = nodeId; - - // Schedule work on the Matter thread - return DeviceLayer::PlatformMgr().ScheduleWork(OnUnpairDevice, reinterpret_cast(params.release())); -} - -void PairingManager::OnUnpairDevice(intptr_t context) -{ - Platform::UniquePtr params(reinterpret_cast(context)); - PairingManager & self = PairingManager::Instance(); + return DeviceLayer::SystemLayer().ScheduleLambda([nodeId]() { + PairingManager & self = PairingManager::Instance(); - self.InitPairingCommand(); + self.InitPairingCommand(); - self.mCurrentFabricRemover = Platform::MakeUnique(self.mCommissioner); + self.mCurrentFabricRemover = Platform::MakeUnique(self.mCommissioner); - if (!self.mCurrentFabricRemover) - { - ChipLogError(NotSpecified, "Failed to unpair device, mCurrentFabricRemover is null"); - return; - } + if (!self.mCurrentFabricRemover) + { + ChipLogError(NotSpecified, "Failed to unpair device, mCurrentFabricRemover is null"); + return; + } - CHIP_ERROR err = self.mCurrentFabricRemover->RemoveCurrentFabric(params->nodeId, &self.mCurrentFabricRemoveCallback); - if (err != CHIP_NO_ERROR) - { - ChipLogError(NotSpecified, "Failed to unpair device, error: %s", ErrorStr(err)); - } + CHIP_ERROR err = self.mCurrentFabricRemover->RemoveCurrentFabric(nodeId, &self.mCurrentFabricRemoveCallback); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to unpair device, error: %s", ErrorStr(err)); + } + }); } diff --git a/examples/fabric-admin/device_manager/PairingManager.h b/examples/fabric-admin/device_manager/PairingManager.h index 563d129079..50e64f9f0c 100644 --- a/examples/fabric-admin/device_manager/PairingManager.h +++ b/examples/fabric-admin/device_manager/PairingManager.h @@ -140,39 +140,6 @@ class PairingManager : public chip::Controller::DevicePairingDelegate, CHIP_ERROR UnpairDevice(chip::NodeId nodeId); private: - struct CommissioningWindowParams - { - chip::NodeId nodeId; - chip::EndpointId endpointId; - uint16_t commissioningWindowTimeout; - uint32_t iteration; - uint16_t discriminator; - chip::Optional setupPIN; - uint8_t verifierBuffer[chip::Crypto::kSpake2p_VerifierSerialized_Length]; - chip::ByteSpan verifier; - uint8_t saltBuffer[chip::Crypto::kSpake2p_Max_PBKDF_Salt_Length]; - chip::ByteSpan salt; - }; - - struct PairDeviceWithCodeParams - { - chip::NodeId nodeId; - char payloadBuffer[kMaxManualCodeLength + 1]; - }; - - struct PairDeviceParams - { - chip::NodeId nodeId; - uint32_t setupPINCode; - uint16_t deviceRemotePort; - char ipAddrBuffer[chip::Inet::IPAddress::kMaxStringLength]; - }; - - struct UnpairDeviceParams - { - chip::NodeId nodeId; - }; - // Constructors PairingManager(); PairingManager(const PairingManager &) = delete; @@ -202,14 +169,10 @@ class PairingManager : public chip::Controller::DevicePairingDelegate, const chip::Credentials::DeviceAttestationVerifier::AttestationDeviceInfo & info, chip::Credentials::AttestationVerificationResult attestationResult) override; - static void OnOpenCommissioningWindow(intptr_t context); static void OnOpenCommissioningWindowResponse(void * context, chip::NodeId deviceId, CHIP_ERROR status, chip::SetupPayload payload); static void OnOpenCommissioningWindowVerifierResponse(void * context, chip::NodeId deviceId, CHIP_ERROR status); static void OnCurrentFabricRemove(void * context, chip::NodeId remoteNodeId, CHIP_ERROR status); - static void OnPairDeviceWithCode(intptr_t context); - static void OnPairDevice(intptr_t context); - static void OnUnpairDevice(intptr_t context); // Private data members chip::Controller::DeviceCommissioner * mCommissioner = nullptr; @@ -219,12 +182,17 @@ class PairingManager : public chip::Controller::DevicePairingDelegate, CommissioningDelegate * mCommissioningDelegate = nullptr; PairingDelegate * mPairingDelegate = nullptr; - chip::NodeId mNodeId = chip::kUndefinedNodeId; - uint16_t mDiscriminator = 0; - uint32_t mSetupPINCode = 0; - const char * mOnboardingPayload = nullptr; - bool mDeviceIsICD = false; + chip::NodeId mNodeId = chip::kUndefinedNodeId; + chip::ByteSpan mVerifier; + chip::ByteSpan mSalt; + uint16_t mDiscriminator = 0; + uint32_t mSetupPINCode = 0; + bool mDeviceIsICD = false; uint8_t mRandomGeneratedICDSymmetricKey[chip::Crypto::kAES_CCM128_Key_Length]; + uint8_t mVerifierBuffer[chip::Crypto::kSpake2p_VerifierSerialized_Length]; + uint8_t mSaltBuffer[chip::Crypto::kSpake2p_Max_PBKDF_Salt_Length]; + char mRemoteIpAddr[chip::Inet::IPAddress::kMaxStringLength]; + char mOnboardingPayload[kMaxManualCodeLength + 1]; chip::Optional mICDRegistration; chip::Optional mICDCheckInNodeId; diff --git a/examples/fabric-admin/device_manager/UniqueIdGetter.cpp b/examples/fabric-admin/device_manager/UniqueIdGetter.cpp index 9c59e54137..3a6d6af69d 100644 --- a/examples/fabric-admin/device_manager/UniqueIdGetter.cpp +++ b/examples/fabric-admin/device_manager/UniqueIdGetter.cpp @@ -95,11 +95,6 @@ void UniqueIdGetter::OnAttributeData(const ConcreteDataAttributePath & path, TLV } } -void UniqueIdGetter::OnReportEnd() -{ - // We will call mOnDoneCallback in OnDone. -} - void UniqueIdGetter::OnError(CHIP_ERROR error) { ChipLogProgress(NotSpecified, "Error Getting UID: %" CHIP_ERROR_FORMAT, error.Format()); @@ -131,7 +126,7 @@ void UniqueIdGetter::OnDeviceConnected(Messaging::ExchangeManager & exchangeMgr, if (err != CHIP_NO_ERROR) { - ChipLogError(NotSpecified, "Failed to issue subscription to AdministratorCommissioning data"); + ChipLogError(NotSpecified, "Failed to read unique ID from the bridged device."); OnDone(nullptr); return; } @@ -140,7 +135,7 @@ void UniqueIdGetter::OnDeviceConnected(Messaging::ExchangeManager & exchangeMgr, void UniqueIdGetter::OnDeviceConnectionFailure(const ScopedNodeId & peerId, CHIP_ERROR error) { VerifyOrDie(mCurrentlyGettingUid); - ChipLogError(NotSpecified, "DeviceSubscription failed to connect to " ChipLogFormatX64, ChipLogValueX64(peerId.GetNodeId())); + ChipLogError(NotSpecified, "UniqueIdGetter failed to connect to " ChipLogFormatX64, ChipLogValueX64(peerId.GetNodeId())); OnDone(nullptr); } diff --git a/examples/fabric-admin/device_manager/UniqueIdGetter.h b/examples/fabric-admin/device_manager/UniqueIdGetter.h index 6680adf5bd..86d5d82f65 100644 --- a/examples/fabric-admin/device_manager/UniqueIdGetter.h +++ b/examples/fabric-admin/device_manager/UniqueIdGetter.h @@ -51,7 +51,6 @@ class UniqueIdGetter : public chip::app::ReadClient::Callback /////////////////////////////////////////////////////////////// void OnAttributeData(const chip::app::ConcreteDataAttributePath & path, chip::TLV::TLVReader * data, const chip::app::StatusIB & status) override; - void OnReportEnd() override; void OnError(CHIP_ERROR error) override; void OnDone(chip::app::ReadClient * apReadClient) override; diff --git a/examples/fabric-admin/rpc/RpcClient.cpp b/examples/fabric-admin/rpc/RpcClient.cpp index e33dd0472e..9964dc6767 100644 --- a/examples/fabric-admin/rpc/RpcClient.cpp +++ b/examples/fabric-admin/rpc/RpcClient.cpp @@ -205,3 +205,25 @@ CHIP_ERROR AdminCommissioningAttributeChanged(const chip_rpc_AdministratorCommis return WaitForResponse(call); } + +CHIP_ERROR DeviceReachableChanged(const chip_rpc_ReachabilityChanged & data) +{ + ChipLogProgress(NotSpecified, "DeviceReachableChanged"); + // TODO(#35333): When there is some sort of device manager in fabric-admin that handles all the devices we + // are currently connected to (and not just device on the remote bridge), we should notify that manager + // so that it can properly handle any sort of reconnection logic. This can either be done here when + // `data.reachability == false`, or more control can be given wherever DeviceReachableChanged is currently + // called + + // The RPC call is kept alive until it completes. When a response is received, it will be logged by the handler + // function and the call will complete. + auto call = fabricBridgeClient.DeviceReachableChanged(data, RpcCompletedWithEmptyResponse); + + if (!call.active()) + { + // The RPC call was not sent. This could occur due to, for example, an invalid channel ID. Handle if necessary. + return CHIP_ERROR_INTERNAL; + } + + return WaitForResponse(call); +} diff --git a/examples/fabric-admin/rpc/RpcClient.h b/examples/fabric-admin/rpc/RpcClient.h index da6a82115a..a4cefe8bd8 100644 --- a/examples/fabric-admin/rpc/RpcClient.h +++ b/examples/fabric-admin/rpc/RpcClient.h @@ -88,3 +88,14 @@ CHIP_ERROR ActiveChanged(chip::ScopedNodeId scopedNodeId, uint32_t promisedActiv * - CHIP_ERROR_INTERNAL: An internal error occurred while activating the RPC call. */ CHIP_ERROR AdminCommissioningAttributeChanged(const chip_rpc_AdministratorCommissioningChanged & data); + +/** + * @brief Notify that reachachability of the bridged device has changed + * + * @param data information regarding change in reachability of the bridged device. + * @return CHIP_ERROR An error code indicating the success or failure of the operation. + * - CHIP_NO_ERROR: The RPC command was successfully processed. + * - CHIP_ERROR_BUSY: Another operation is currently in progress. + * - CHIP_ERROR_INTERNAL: An internal error occurred while activating the RPC call. + */ +CHIP_ERROR DeviceReachableChanged(const chip_rpc_ReachabilityChanged & data); diff --git a/examples/fabric-admin/rpc/RpcServer.cpp b/examples/fabric-admin/rpc/RpcServer.cpp index d68eb11786..e10bb64cdc 100644 --- a/examples/fabric-admin/rpc/RpcServer.cpp +++ b/examples/fabric-admin/rpc/RpcServer.cpp @@ -98,20 +98,19 @@ class FabricAdmin final : public rpc::FabricAdmin, public IcdManager::Delegate chip_rpc_OperationStatus & response) override { VerifyOrReturnValue(request.has_id, pw::Status::InvalidArgument()); - // TODO(#35875): OpenDeviceCommissioningWindow uses the same controller every time and doesn't currently accept - // FabricIndex. For now we are dropping fabric index from the scoped node id. - NodeId nodeId = request.id.node_id; - uint32_t commissioningTimeoutSec = request.commissioning_timeout; + ScopedNodeId scopedNodeId(request.id.node_id, request.id.fabric_index); uint32_t iterations = request.iterations; uint16_t discriminator = request.discriminator; + uint16_t commissioningTimeoutSec = static_cast(request.commissioning_timeout); // Log the request details for debugging ChipLogProgress(NotSpecified, - "Received OpenCommissioningWindow request: NodeId 0x%lx, Timeout: %u, Iterations: %u, Discriminator: %u", - static_cast(nodeId), commissioningTimeoutSec, iterations, discriminator); + "Received OpenCommissioningWindow request: NodeId " ChipLogFormatX64 + ", Timeout: %u, Iterations: %u, Discriminator: %u", + ChipLogValueX64(scopedNodeId.GetNodeId()), commissioningTimeoutSec, iterations, discriminator); // Open the device commissioning window using raw binary data for salt and verifier - DeviceMgr().OpenDeviceCommissioningWindow(nodeId, commissioningTimeoutSec, iterations, discriminator, + DeviceMgr().OpenDeviceCommissioningWindow(scopedNodeId, iterations, commissioningTimeoutSec, discriminator, ByteSpan(request.salt.bytes, request.salt.size), ByteSpan(request.verifier.bytes, request.verifier.size)); diff --git a/examples/fabric-bridge-app/fabric-bridge-common/BUILD.gn b/examples/fabric-bridge-app/fabric-bridge-common/BUILD.gn index 3db4f1ebb1..18615a0d19 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/BUILD.gn +++ b/examples/fabric-bridge-app/fabric-bridge-common/BUILD.gn @@ -22,7 +22,6 @@ config("config") { chip_data_model("fabric-bridge-common-zap") { zap_file = "fabric-bridge-app.zap" is_server = true - cflags = [ "-DDYNAMIC_ENDPOINT_COUNT=16" ] } # This includes all the clusters that only exist on the dynamic endpoint. diff --git a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter index 57ce56efc3..06e76db5ec 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter +++ b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter @@ -710,6 +710,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2058,21 +2059,6 @@ endpoint 0 { handle command KeySetReadAllIndices; handle command KeySetReadAllIndicesResponse; } - - server cluster CommissionerControl { - emits event CommissioningRequestResult; - ram attribute supportedDeviceCategories default = 0; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - - handle command RequestCommissioningApproval; - handle command CommissionNode; - handle command ReverseOpenCommissioningWindow; - } } endpoint 1 { device type ma_aggregator = 14, version 1; @@ -2102,6 +2088,20 @@ endpoint 1 { callback attribute featureMap; callback attribute clusterRevision; } + + server cluster CommissionerControl { + emits event CommissioningRequestResult; + ram attribute supportedDeviceCategories default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command RequestCommissioningApproval; + handle command CommissionNode; + handle command ReverseOpenCommissioningWindow; + } } diff --git a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.zap b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.zap index 83dae81eec..6537421778 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.zap +++ b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.zap @@ -3969,18 +3969,46 @@ "reportableChange": 0 } ] - }, + } + ] + }, + { + "id": 2, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 14, + "profileId": 259, + "label": "MA-aggregator", + "name": "MA-aggregator" + }, + "deviceTypes": [ { - "name": "Commissioner Control", - "code": 1873, + "code": 14, + "profileId": 259, + "label": "MA-aggregator", + "name": "MA-aggregator" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 14 + ], + "deviceTypeName": "MA-aggregator", + "deviceTypeCode": 14, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, "mfgCode": null, - "define": "COMMISSIONER_CONTROL_CLUSTER", + "define": "IDENTIFY_CLUSTER", "side": "server", "enabled": 1, - "apiMaturity": "provisional", "commands": [ { - "name": "RequestCommissioningApproval", + "name": "Identify", "code": 0, "mfgCode": null, "source": "client", @@ -3988,58 +4016,50 @@ "isEnabled": 1 }, { - "name": "CommissionNode", - "code": 1, + "name": "TriggerEffect", + "code": 64, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 - }, - { - "name": "ReverseOpenCommissioningWindow", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 } ], "attributes": [ { - "name": "SupportedDeviceCategories", + "name": "IdentifyTime", "code": 0, "mfgCode": null, "side": "server", - "type": "SupportedDeviceCategoryBitmap", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "IdentifyType", + "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "IdentifyTypeEnum", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0x0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", "type": "array", @@ -4054,8 +4074,8 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -4111,105 +4131,81 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 } - ], - "events": [ - { - "name": "CommissioningRequestResult", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - } ] - } - ] - }, - { - "id": 2, - "name": "Anonymous Endpoint Type", - "deviceTypeRef": { - "code": 14, - "profileId": 259, - "label": "MA-aggregator", - "name": "MA-aggregator" - }, - "deviceTypes": [ - { - "code": 14, - "profileId": 259, - "label": "MA-aggregator", - "name": "MA-aggregator" - } - ], - "deviceVersions": [ - 1 - ], - "deviceIdentifiers": [ - 14 - ], - "deviceTypeName": "MA-aggregator", - "deviceTypeCode": 14, - "deviceTypeProfileId": 259, - "clusters": [ + }, { - "name": "Identify", - "code": 3, + "name": "Descriptor", + "code": 29, "mfgCode": null, - "define": "IDENTIFY_CLUSTER", + "define": "DESCRIPTOR_CLUSTER", "side": "server", "enabled": 1, - "commands": [ + "attributes": [ { - "name": "Identify", + "name": "DeviceTypeList", "code": 0, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "TriggerEffect", - "code": 64, + "name": "ServerList", + "code": 1, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { - "name": "IdentifyTime", - "code": 0, + "name": "ClientList", + "code": 2, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "IdentifyType", - "code": 1, + "name": "PartsList", + "code": 3, "mfgCode": null, "side": "server", - "type": "IdentifyTypeEnum", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4270,10 +4266,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4286,10 +4282,10 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4298,64 +4294,58 @@ ] }, { - "name": "Descriptor", - "code": 29, + "name": "Commissioner Control", + "code": 1873, "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", + "define": "COMMISSIONER_CONTROL_CLUSTER", "side": "server", "enabled": 1, - "attributes": [ + "commands": [ { - "name": "DeviceTypeList", + "name": "RequestCommissioningApproval", "code": 0, "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "ServerList", + "name": "CommissionNode", "code": 1, "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "ClientList", + "name": "ReverseOpenCommissioningWindow", "code": 2, "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "SupportedDeviceCategories", + "code": 0, + "mfgCode": null, "side": "server", - "type": "array", + "type": "SupportedDeviceCategoryBitmap", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PartsList", - "code": 3, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", "type": "array", @@ -4363,15 +4353,15 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -4379,15 +4369,15 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", "type": "array", @@ -4395,7 +4385,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4411,7 +4401,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4424,10 +4414,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4440,15 +4430,24 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 } + ], + "events": [ + { + "name": "CommissioningRequestResult", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } ] } ] diff --git a/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDevice.h b/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDevice.h index 526ecfff21..d2c5a64b9e 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDevice.h +++ b/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDevice.h @@ -54,6 +54,9 @@ class BridgedDevice [[nodiscard]] bool IsReachable() const { return mReachable; } void SetReachable(bool reachable); + // Reachability attribute changed and requires marking attribute as dirty and sending + // event. + void ReachableChanged(bool reachable); void LogActiveChangeEvent(uint32_t promisedActiveDurationMs); diff --git a/examples/fabric-bridge-app/fabric-bridge-common/include/CHIPProjectAppConfig.h b/examples/fabric-bridge-app/fabric-bridge-common/include/CHIPProjectAppConfig.h index 5340798210..f61f9f469f 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/include/CHIPProjectAppConfig.h +++ b/examples/fabric-bridge-app/fabric-bridge-common/include/CHIPProjectAppConfig.h @@ -30,8 +30,8 @@ // overrides CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT in CHIPProjectConfig #define CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT 16 -// include the CHIPProjectConfig from config/standalone -#include - // Allows app options (ports) to be configured on launch of app #define CHIP_DEVICE_ENABLE_PORT_PARAMS 1 + +// Include the CHIPProjectConfig from platform implementation config +#include diff --git a/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDevice.cpp b/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDevice.cpp index 02bdfbdbcb..f462d1cce6 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDevice.cpp +++ b/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDevice.cpp @@ -24,78 +24,31 @@ #include #include -namespace { - -struct ActiveChangeEventWorkData -{ - chip::EndpointId mEndpointId; - uint32_t mPromisedActiveDuration; -}; - -struct ReportAttributeChangedWorkData -{ - chip::EndpointId mEndpointId; - bool mWindowChanged = false; - bool mFabricIndexChanged = false; - bool mVendorChanged = false; -}; - -void ActiveChangeEventWork(intptr_t arg) -{ - ActiveChangeEventWorkData * data = reinterpret_cast(arg); - - chip::app::Clusters::BridgedDeviceBasicInformation::Events::ActiveChanged::Type event{}; - event.promisedActiveDuration = data->mPromisedActiveDuration; - chip::EventNumber eventNumber = 0; - - CHIP_ERROR err = chip::app::LogEvent(event, data->mEndpointId, eventNumber); - if (err != CHIP_NO_ERROR) - { - ChipLogProgress(NotSpecified, "LogEvent for ActiveChanged failed %s", err.AsString()); - } - chip::Platform::Delete(data); -} - -void ReportAttributeChangedWork(intptr_t arg) -{ - ReportAttributeChangedWorkData * data = reinterpret_cast(arg); - - if (data->mWindowChanged) - { - MatterReportingAttributeChangeCallback(data->mEndpointId, chip::app::Clusters::AdministratorCommissioning::Id, - chip::app::Clusters::AdministratorCommissioning::Attributes::WindowStatus::Id); - } - if (data->mFabricIndexChanged) - { - MatterReportingAttributeChangeCallback(data->mEndpointId, chip::app::Clusters::AdministratorCommissioning::Id, - chip::app::Clusters::AdministratorCommissioning::Attributes::AdminFabricIndex::Id); - } - if (data->mVendorChanged) - { - MatterReportingAttributeChangeCallback(data->mEndpointId, chip::app::Clusters::AdministratorCommissioning::Id, - chip::app::Clusters::AdministratorCommissioning::Attributes::AdminVendorId::Id); - } - chip::Platform::Delete(data); -} - -} // namespace - +using namespace chip; using namespace chip::app::Clusters::Actions; -BridgedDevice::BridgedDevice(chip::ScopedNodeId scopedNodeId) +BridgedDevice::BridgedDevice(ScopedNodeId scopedNodeId) { mReachable = false; mScopedNodeId = scopedNodeId; - mEndpointId = chip::kInvalidEndpointId; + mEndpointId = kInvalidEndpointId; } void BridgedDevice::LogActiveChangeEvent(uint32_t promisedActiveDurationMs) { - ActiveChangeEventWorkData * workdata = chip::Platform::New(); - workdata->mEndpointId = mEndpointId; - workdata->mPromisedActiveDuration = promisedActiveDurationMs; - - chip::DeviceLayer::PlatformMgr().ScheduleWork(ActiveChangeEventWork, reinterpret_cast(workdata)); + EndpointId endpointId = mEndpointId; + + DeviceLayer::SystemLayer().ScheduleLambda([endpointId, promisedActiveDurationMs]() { + app::Clusters::BridgedDeviceBasicInformation::Events::ActiveChanged::Type event{}; + event.promisedActiveDuration = promisedActiveDurationMs; + EventNumber eventNumber = 0; + + CHIP_ERROR err = app::LogEvent(event, endpointId, eventNumber); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(NotSpecified, "LogEvent for ActiveChanged failed %s", err.AsString()); + } + }); } void BridgedDevice::SetReachable(bool reachable) @@ -112,17 +65,54 @@ void BridgedDevice::SetReachable(bool reachable) } } -void BridgedDevice::SetAdminCommissioningAttributes(const AdminCommissioningAttributes & aAdminCommissioningAttributes) +void BridgedDevice::ReachableChanged(bool reachable) { - ReportAttributeChangedWorkData * workdata = chip::Platform::New(); + EndpointId endpointId = mEndpointId; + bool reachableChanged = (mReachable != reachable); + if (reachableChanged) + { + SetReachable(reachable); + DeviceLayer::SystemLayer().ScheduleLambda([endpointId]() { + MatterReportingAttributeChangeCallback(endpointId, app::Clusters::BridgedDeviceBasicInformation::Id, + app::Clusters::BridgedDeviceBasicInformation::Attributes::Reachable::Id); + + app::Clusters::BridgedDeviceBasicInformation::Events::ReachableChanged::Type event{}; + EventNumber eventNumber = 0; + + CHIP_ERROR err = app::LogEvent(event, endpointId, eventNumber); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(NotSpecified, "LogEvent for ActiveChanged failed %s", err.AsString()); + } + }); + } +} - workdata->mEndpointId = mEndpointId; - workdata->mWindowChanged = +void BridgedDevice::SetAdminCommissioningAttributes(const AdminCommissioningAttributes & aAdminCommissioningAttributes) +{ + EndpointId endpointId = mEndpointId; + bool windowChanged = (aAdminCommissioningAttributes.commissioningWindowStatus != mAdminCommissioningAttributes.commissioningWindowStatus); - workdata->mFabricIndexChanged = - (aAdminCommissioningAttributes.openerFabricIndex != mAdminCommissioningAttributes.openerFabricIndex); - workdata->mVendorChanged = (aAdminCommissioningAttributes.openerVendorId != mAdminCommissioningAttributes.openerVendorId); + bool fabricIndexChanged = (aAdminCommissioningAttributes.openerFabricIndex != mAdminCommissioningAttributes.openerFabricIndex); + bool vendorChanged = (aAdminCommissioningAttributes.openerVendorId != mAdminCommissioningAttributes.openerVendorId); mAdminCommissioningAttributes = aAdminCommissioningAttributes; - chip::DeviceLayer::PlatformMgr().ScheduleWork(ReportAttributeChangedWork, reinterpret_cast(workdata)); + + DeviceLayer::SystemLayer().ScheduleLambda([endpointId, windowChanged, fabricIndexChanged, vendorChanged]() { + if (windowChanged) + { + MatterReportingAttributeChangeCallback(endpointId, app::Clusters::AdministratorCommissioning::Id, + app::Clusters::AdministratorCommissioning::Attributes::WindowStatus::Id); + } + if (fabricIndexChanged) + { + MatterReportingAttributeChangeCallback(endpointId, app::Clusters::AdministratorCommissioning::Id, + app::Clusters::AdministratorCommissioning::Attributes::AdminFabricIndex::Id); + } + if (vendorChanged) + { + MatterReportingAttributeChangeCallback(endpointId, app::Clusters::AdministratorCommissioning::Id, + app::Clusters::AdministratorCommissioning::Attributes::AdminVendorId::Id); + } + }); } diff --git a/examples/fabric-bridge-app/linux/CommissionerControl.cpp b/examples/fabric-bridge-app/linux/CommissionerControl.cpp index e9dded102b..138e1129b8 100644 --- a/examples/fabric-bridge-app/linux/CommissionerControl.cpp +++ b/examples/fabric-bridge-app/linux/CommissionerControl.cpp @@ -116,7 +116,7 @@ CHIP_ERROR CommissionerControlDelegate::HandleCommissioningApprovalRequest(const mLabel.ClearValue(); } - CHIP_ERROR err = CommissionerControlServer::Instance().GenerateCommissioningRequestResultEvent(result); + CHIP_ERROR err = CommissionerControlServer::Instance().GenerateCommissioningRequestResultEvent(kAggregatorEndpointId, result); if (err == CHIP_NO_ERROR) { @@ -241,7 +241,7 @@ CHIP_ERROR CommissionerControlInit() Protocols::InteractionModel::Status status = Clusters::CommissionerControl::CommissionerControlServer::Instance().SetSupportedDeviceCategoriesValue( - kRootEndpointId, supportedDeviceCategories); + Clusters::CommissionerControl::kAggregatorEndpointId, supportedDeviceCategories); if (status != Protocols::InteractionModel::Status::Success) { diff --git a/examples/fabric-bridge-app/linux/README.md b/examples/fabric-bridge-app/linux/README.md index 27a01d9ffe..ede6ce2639 100644 --- a/examples/fabric-bridge-app/linux/README.md +++ b/examples/fabric-bridge-app/linux/README.md @@ -130,13 +130,6 @@ defined: scp ./fabric-bridge-app ubuntu@xxx.xxx.xxx.xxx:/home/ubuntu ``` -- To delete generated executable, libraries and object files use: - - ```sh - cd ~/connectedhomeip/examples/fabric-bridge-app/linux - rm -rf out/ - ``` - ## Running the Complete Example on Ubuntu - Building diff --git a/examples/fabric-bridge-app/linux/RpcServer.cpp b/examples/fabric-bridge-app/linux/RpcServer.cpp index 8271cc3c49..5fea43c6ef 100644 --- a/examples/fabric-bridge-app/linux/RpcServer.cpp +++ b/examples/fabric-bridge-app/linux/RpcServer.cpp @@ -48,6 +48,7 @@ class FabricBridge final : public chip::rpc::FabricBridge pw::Status ActiveChanged(const chip_rpc_KeepActiveChanged & request, pw_protobuf_Empty & response) override; pw::Status AdminCommissioningAttributeChanged(const chip_rpc_AdministratorCommissioningChanged & request, pw_protobuf_Empty & response) override; + pw::Status DeviceReachableChanged(const chip_rpc_ReachabilityChanged & request, pw_protobuf_Empty & response) override; }; pw::Status FabricBridge::AddSynchronizedDevice(const chip_rpc_SynchronizedDevice & request, pw_protobuf_Empty & response) @@ -210,6 +211,26 @@ pw::Status FabricBridge::AdminCommissioningAttributeChanged(const chip_rpc_Admin return pw::OkStatus(); } +pw::Status FabricBridge::DeviceReachableChanged(const chip_rpc_ReachabilityChanged & request, pw_protobuf_Empty & response) +{ + VerifyOrReturnValue(request.has_id, pw::Status::InvalidArgument()); + ScopedNodeId scopedNodeId(request.id.node_id, request.id.fabric_index); + ChipLogProgress(NotSpecified, "Received device reachable changed: Id=[%d:" ChipLogFormatX64 "]", scopedNodeId.GetFabricIndex(), + ChipLogValueX64(scopedNodeId.GetNodeId())); + + auto * device = BridgeDeviceMgr().GetDeviceByScopedNodeId(scopedNodeId); + if (device == nullptr) + { + ChipLogError(NotSpecified, "Could not find bridged device associated with Id=[%d:0x" ChipLogFormatX64 "]", + scopedNodeId.GetFabricIndex(), ChipLogValueX64(scopedNodeId.GetNodeId())); + return pw::Status::NotFound(); + } + + device->ReachableChanged(request.reachability); + + return pw::OkStatus(); +} + FabricBridge fabric_bridge_service; #endif // defined(PW_RPC_FABRIC_BRIDGE_SERVICE) && PW_RPC_FABRIC_BRIDGE_SERVICE diff --git a/examples/fabric-bridge-app/linux/include/CommissionerControl.h b/examples/fabric-bridge-app/linux/include/CommissionerControl.h index 1188d9a796..fceb80c2d8 100644 --- a/examples/fabric-bridge-app/linux/include/CommissionerControl.h +++ b/examples/fabric-bridge-app/linux/include/CommissionerControl.h @@ -26,6 +26,8 @@ namespace app { namespace Clusters { namespace CommissionerControl { +inline constexpr EndpointId kAggregatorEndpointId = 1; + class CommissionerControlDelegate : public Delegate { public: diff --git a/examples/fabric-bridge-app/linux/main.cpp b/examples/fabric-bridge-app/linux/main.cpp index 3e93c9878f..a101fd3d32 100644 --- a/examples/fabric-bridge-app/linux/main.cpp +++ b/examples/fabric-bridge-app/linux/main.cpp @@ -81,10 +81,10 @@ bool HandleCustomOption(const char * aProgram, ArgParser::OptionSet * aOptions, switch (aIdentifier) { case kOptionFabricAdminServerPortNumber: - gFabricAdminServerPort = atoi(aValue); + gFabricAdminServerPort = static_cast(atoi(aValue)); break; case kOptionLocalServerPortNumber: - gLocalServerPort = atoi(aValue); + gLocalServerPort = static_cast(atoi(aValue)); break; default: ArgParser::PrintArgError("%s: INTERNAL ERROR: Unhandled option: %s\n", aProgram, aName); diff --git a/examples/all-clusters-minimal-app/tizen/.gn b/examples/fabric-sync/.gn similarity index 92% rename from examples/all-clusters-minimal-app/tizen/.gn rename to examples/fabric-sync/.gn index edd34d34bd..3b11e2ba2e 100644 --- a/examples/all-clusters-minimal-app/tizen/.gn +++ b/examples/fabric-sync/.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Project CHIP Authors +# Copyright (c) 2024 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. @@ -21,7 +21,5 @@ buildconfig = "${build_root}/config/BUILDCONFIG.gn" check_system_includes = true default_args = { - target_os = "tizen" - import("//args.gni") } diff --git a/examples/fabric-sync/BUILD.gn b/examples/fabric-sync/BUILD.gn new file mode 100644 index 0000000000..de193bd5f6 --- /dev/null +++ b/examples/fabric-sync/BUILD.gn @@ -0,0 +1,45 @@ +# Copyright (c) 2024 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/build.gni") +import("//build_overrides/chip.gni") +import("${chip_root}/build/chip/tools.gni") +import("${chip_root}/src/lib/lib.gni") + +assert(chip_build_tools) + +executable("fabric-sync") { + cflags = [ "-Wconversion" ] + + include_dirs = [ + ".", + "${chip_root}/src/lib", + ] + + sources = [ "main.cpp" ] + + deps = [ + "${chip_root}/examples/fabric-sync/bridge:fabric-bridge-lib", + "${chip_root}/examples/fabric-sync/bridge:fabric-bridge-zap", + "${chip_root}/examples/platform/linux:app-main", + "${chip_root}/src/lib", + "${chip_root}/third_party/inipp", + ] + + output_dir = root_out_dir +} + +group("default") { + deps = [ ":fabric-sync" ] +} diff --git a/examples/fabric-sync/README.md b/examples/fabric-sync/README.md new file mode 100644 index 0000000000..6cbe9da9e9 --- /dev/null +++ b/examples/fabric-sync/README.md @@ -0,0 +1,136 @@ +# Matter Linux Fabric Sync Example + +An example application to implement the Fabric Synchronization feature and +demonstrates the end-to-end Fabric Synchronization feature using dynamic +endpoints. + +Fabric Synchronization feature will facilitate the commissioning of end devices +from one fabric to another without requiring user intervention for every end +device. It defines mechanisms that can be used by multiple +ecosystems/controllers to communicate with one another to simplify the +experience for users. + +This doc is tested on **Ubuntu 22.04 LTS (aarch64)** + +
+ +- [Matter Linux Fabric Sync Example](#matter-linux-fabric-sync-example) + - [Theory of Operation](#theory-of-operation) + - [Building](#building) + - [Running the Complete Example on Ubuntu](#running-the-complete-example-on-ubuntu) + +
+ +## Theory of Operation + +### Dynamic Endpoints + +The Fabric-Sync Example makes use of Dynamic Endpoints. Current SDK support is +limited for dynamic endpoints, since endpoints are typically defined (along with +the clusters and attributes they contain) in a .zap file which then generates +code and static structures to define the endpoints. + +To support endpoints that are not statically defined, the ZCL attribute storage +mechanisms will hold additional endpoint information for `NUM_DYNAMIC_ENDPOINTS` +additional endpoints. These additional endpoint structures must be defined by +the application and can change at runtime. + +To facilitate the creation of these endpoint structures, several macros are +defined: + +`DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(attrListName)` +`DECLARE_DYNAMIC_ATTRIBUTE(attId, attType, attSizeBytes, attrMask)` +`DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(clusterRevision)` + +- These three macros are used to declare a list of attributes for use within a + cluster. The declaration must begin with the + `DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN` macro which will define the name of + the allocated attribute structure. Each attribute is then added by the + `DECLARE_DYNAMIC_ATTRIBUTE` macro. Finally, + `DECLARE_DYNAMIC_ATTRIBUTE_LIST_END` macro should be used to close the + definition. + +- All attributes defined with these macros will be configured as + `ATTRIBUTE_MASK_EXTERNAL_STORAGE` in the ZCL database and therefore will + rely on the application to maintain storage for the attribute. Consequently, + reads or writes to these attributes must be handled within the application + by the `emberAfExternalAttributeWriteCallback` and + `emberAfExternalAttributeReadCallback` functions. See the bridge + application's `main.cpp` for an example of this implementation. + +`DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(clusterListName)` +`DECLARE_DYNAMIC_CLUSTER(clusterId, clusterAttrs, role, incomingCommands, outgoingCommands)` +`DECLARE_DYNAMIC_CLUSTER_LIST_END` + +- These three macros are used to declare a list of clusters for use within a + endpoint. The declaration must begin with the + `DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN` macro which will define the name of the + allocated cluster structure. Each cluster is then added by the + `DECLARE_DYNAMIC_CLUSTER` macro referencing attribute list previously + defined by the `DECLARE_DYNAMIC_ATTRIBUTE...` macros and the lists of + incoming/outgoing commands terminated by kInvalidCommandId (or nullptr if + there aren't any commands in the list). Finally, + `DECLARE_DYNAMIC_CLUSTER_LIST_END` macro should be used to close the + definition. + +`DECLARE_DYNAMIC_ENDPOINT(endpointName, clusterList)` + +- This macro is used to declare an endpoint and its associated cluster list, + which must be previously defined by the `DECLARE_DYNAMIC_CLUSTER...` macros. + +## Building + + ### For Linux host example: + + ``` + source scripts/activate.sh + ./scripts/build/build_examples.py --target linux-x64-fabric-sync-no-ble build + ``` + + ### For Raspberry Pi 4 example: + + Pull Docker Images + + ``` + docker pull connectedhomeip/chip-build-vscode:latest + ``` + + Run docker + + ``` + docker run -it -v ~/connectedhomeip:/var/connectedhomeip connectedhomeip/chip-build-vscode:latest /bin/bash + ``` + + Build + + ``` + cd /var/connectedhomeip + + git config --global --add safe.directory /var/connectedhomeip + git config --global --add safe.directory /var/connectedhomeip/third_party/pigweed/repo + git config --global --add safe.directory /var/connectedhomeip/examples/common/QRCode/repo + + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --target linux-arm64-fabric-sync-no-ble-clang \ + build" + ``` + + Transfer the fabric-bridge-app binary to a Raspberry Pi + + ``` + scp ./fabric-sync ubuntu@xxx.xxx.xxx.xxx:/home/ubuntu + ``` + +## Running the Complete Example on Ubuntu + +- Building + + Follow [Building](#building) section of this document. + +- Run Linux Fabric Sync Example App + + ```sh + cd ~/connectedhomeip/ + sudo out/debug/fabric-sync + ``` diff --git a/examples/fabric-sync/args.gni b/examples/fabric-sync/args.gni new file mode 100644 index 0000000000..d5e45ed869 --- /dev/null +++ b/examples/fabric-sync/args.gni @@ -0,0 +1,40 @@ +# Copyright (c) 2024 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}/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/fabric-sync/bridge/include" ] +chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] + +chip_build_libshell = true + +chip_enable_additional_data_advertising = true + +chip_enable_rotating_device_id = true + +chip_config_network_layer_ble = false + +matter_enable_tracing_support = true +matter_log_json_payload_hex = true +matter_log_json_payload_decode_full = true + +# Thread devices do not support WakeOnLan because their mac address is >48bit +chip_enable_openthread = false diff --git a/examples/fabric-sync/bridge/BUILD.gn b/examples/fabric-sync/bridge/BUILD.gn new file mode 100644 index 0000000000..310496bc54 --- /dev/null +++ b/examples/fabric-sync/bridge/BUILD.gn @@ -0,0 +1,60 @@ +# Copyright (c) 2024 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}/src/app/chip_data_model.gni") +import("${chip_root}/src/lib/lib.gni") + +config("config") { + include_dirs = [ "include" ] +} + +chip_data_model("fabric-bridge-zap") { + zap_file = "fabric-bridge.zap" + is_server = true +} + +# This includes all the clusters that only exist on the dynamic endpoint. +source_set("fabric-bridge-common") { + public_configs = [ ":config" ] + + sources = [ + "${chip_root}/src/app/clusters/ecosystem-information-server/ecosystem-information-server.cpp", + "${chip_root}/src/app/clusters/ecosystem-information-server/ecosystem-information-server.h", + ] + + public_deps = [ ":fabric-bridge-zap" ] +} + +source_set("fabric-bridge-lib") { + public_configs = [ ":config" ] + + sources = [ + "include/BridgedAdministratorCommissioning.h", + "include/BridgedDevice.h", + "include/BridgedDeviceBasicInformationImpl.h", + "include/BridgedDeviceManager.h", + "include/CHIPProjectAppConfig.h", + "src/BridgedAdministratorCommissioning.cpp", + "src/BridgedDevice.cpp", + "src/BridgedDeviceBasicInformationImpl.cpp", + "src/BridgedDeviceManager.cpp", + ] + + deps = [ + "${chip_root}/examples/fabric-sync/bridge:fabric-bridge-common", + "${chip_root}/examples/platform/linux:app-main", + "${chip_root}/src/lib", + ] +} diff --git a/examples/fabric-sync/bridge/fabric-bridge.matter b/examples/fabric-sync/bridge/fabric-bridge.matter new file mode 100644 index 0000000000..06e76db5ec --- /dev/null +++ b/examples/fabric-sync/bridge/fabric-bridge.matter @@ -0,0 +1,2107 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + +enum TestGlobalEnum : enum8 { + kSomeValue = 0; + kSomeOtherValue = 1; + kFinalValue = 2; +} + +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + +bitmap TestGlobalBitmap : bitmap32 { + kFirstBit = 0x1; + kSecondBit = 0x2; +} + +struct TestGlobalStruct { + char_string<128> name = 0; + nullable TestGlobalBitmap myBitmap = 1; + optional nullable TestGlobalEnum myEnum = 2; +} + +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +cluster Identify = 3 { + revision 4; + + 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 description for Identify */ + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +cluster Descriptor = 29 { + revision 2; + + bitmap Feature : bitmap32 { + kTagList = 0x1; + } + + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute cluster_id serverList[] = 1; + readonly attribute cluster_id clientList[] = 2; + readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; + readonly attribute 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. */ +cluster AccessControl = 31 { + revision 2; + + enum AccessControlEntryAuthModeEnum : enum8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : enum8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum AccessRestrictionTypeEnum : enum8 { + kAttributeAccessForbidden = 0; + kAttributeWriteForbidden = 1; + kCommandForbidden = 2; + kEventForbidden = 3; + } + + enum ChangeTypeEnum : enum8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + bitmap Feature : bitmap32 { + kExtension = 0x1; + kManagedDevice = 0x2; + } + + struct AccessRestrictionStruct { + AccessRestrictionTypeEnum type = 0; + nullable int32u id = 1; + } + + struct CommissioningAccessRestrictionEntryStruct { + endpoint_no endpoint = 0; + cluster_id cluster = 1; + AccessRestrictionStruct restrictions[] = 2; + } + + fabric_scoped struct AccessRestrictionEntryStruct { + fabric_sensitive endpoint_no endpoint = 0; + fabric_sensitive cluster_id cluster = 1; + fabric_sensitive AccessRestrictionStruct restrictions[] = 2; + fabric_idx fabricIndex = 254; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { + int64u token = 0; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute optional CommissioningAccessRestrictionEntryStruct commissioningARL[] = 5; + readonly attribute optional AccessRestrictionEntryStruct arl[] = 6; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ReviewFabricRestrictionsRequest { + CommissioningAccessRestrictionEntryStruct arl[] = 0; + } + + response struct ReviewFabricRestrictionsResponse = 1 { + int64u token = 0; + } + + /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; +} + +/** The Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ +cluster AccessControl = 31 { + revision 2; + + enum AccessControlEntryAuthModeEnum : enum8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : enum8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum AccessRestrictionTypeEnum : enum8 { + kAttributeAccessForbidden = 0; + kAttributeWriteForbidden = 1; + kCommandForbidden = 2; + kEventForbidden = 3; + } + + enum ChangeTypeEnum : enum8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + bitmap Feature : bitmap32 { + kExtension = 0x1; + kManagedDevice = 0x2; + } + + struct AccessRestrictionStruct { + AccessRestrictionTypeEnum type = 0; + nullable int32u id = 1; + } + + struct CommissioningAccessRestrictionEntryStruct { + endpoint_no endpoint = 0; + cluster_id cluster = 1; + AccessRestrictionStruct restrictions[] = 2; + } + + fabric_scoped struct AccessRestrictionEntryStruct { + fabric_sensitive endpoint_no endpoint = 0; + fabric_sensitive cluster_id cluster = 1; + fabric_sensitive AccessRestrictionStruct restrictions[] = 2; + fabric_idx fabricIndex = 254; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { + int64u token = 0; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute optional CommissioningAccessRestrictionEntryStruct commissioningARL[] = 5; + readonly attribute optional AccessRestrictionEntryStruct arl[] = 6; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ReviewFabricRestrictionsRequest { + CommissioningAccessRestrictionEntryStruct arl[] = 0; + } + + response struct ReviewFabricRestrictionsResponse = 1 { + int64u token = 0; + } + + /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +cluster BasicInformation = 40 { + revision 3; + + enum ColorEnum : enum8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : enum8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + int32u softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; + readonly attribute int32u specificationVersion = 21; + readonly attribute int16u maxPathsPerInvoke = 22; + readonly attribute 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 MfgSpecificPing(): DefaultSuccess = 0; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +cluster GeneralCommissioning = 48 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningErrorEnum : enum8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; + } + + enum RegulatoryLocationTypeEnum : enum8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; + 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; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + char_string<2> countryCode = 1; + int64u breadcrumb = 2; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +cluster NetworkCommissioning = 49 { + revision 1; // NOTE: Default/not specifically set + + 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; + kPerDeviceCredentials = 0x8; + } + + bitmap ThreadCapabilitiesBitmap : bitmap16 { + kIsBorderRouterCapable = 0x1; + kIsRouterCapable = 0x2; + kIsSleepyEndDeviceCapable = 0x4; + kIsFullThreadDevice = 0x8; + kIsSynchronizedSleepyEndDeviceCapable = 0x10; + } + + bitmap WiFiSecurityBitmap : bitmap8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + provisional readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + provisional readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + provisional readonly attribute optional int16u threadVersion = 10; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + + request struct AddOrUpdateThreadNetworkRequest { + octet_string<254> operationalDataset = 0; + optional int64u breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + + request struct ConnectNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + + request struct ReorderNetworkRequest { + octet_string<32> networkID = 0; + int8u networkIndex = 1; + optional int64u breadcrumb = 2; + } + + request struct QueryIdentityRequest { + octet_string<20> keyIdentifier = 0; + optional octet_string<32> possessionNonce = 1; + } + + response struct QueryIdentityResponse = 10 { + octet_string<140> identity = 0; + optional octet_string<64> possessionSignature = 1; + } + + /** Detemine the set of networks the device sees as available. */ + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +cluster DiagnosticLogs = 50 { + revision 1; // NOTE: Default/not specifically set + + 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; + } + + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + long_octet_string logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster GeneralDiagnostics = 51 { + revision 2; + + enum BootReasonEnum : enum8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : enum8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : enum8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : enum8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + bitmap Feature : bitmap32 { + kDataModelTest = 0x1; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + } + + response struct TimeSnapshotResponse = 2 { + systime_ms systemTimeMs = 0; + nullable posix_ms posixTimeMs = 1; + } + + request struct PayloadTestRequestRequest { + octet_string<16> enableKey = 0; + int8u value = 1; + int16u count = 2; + } + + response struct PayloadTestResponse = 4 { + octet_string payload = 0; + } + + /** Provide a means for certification tests to trigger some test-plan-specific events */ + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ + command TimeSnapshot(): TimeSnapshotResponse = 1; + /** Request a variable length payload response. */ + command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; +} + +/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster SoftwareDiagnostics = 52 { + revision 1; // NOTE: Default/not specifically set + + 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 optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; +} + +/** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ +cluster ThreadNetworkDiagnostics = 53 { + revision 2; + + 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 optional int64u overrunCount = 6; + readonly attribute NeighborTableStruct neighborTable[] = 7; + readonly attribute RouteTableStruct routeTable[] = 8; + readonly attribute nullable int32u partitionId = 9; + readonly attribute nullable int16u weighting = 10; + readonly attribute nullable int16u dataVersion = 11; + readonly attribute nullable int16u stableDataVersion = 12; + readonly attribute nullable int8u leaderRouterId = 13; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; + readonly attribute nullable SecurityPolicy securityPolicy = 59; + readonly attribute nullable octet_string<4> channelPage0Mask = 60; + readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; + readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62; + 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; + + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ + command access(invoke: manage) 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. */ +cluster WiFiNetworkDiagnostics = 54 { + revision 1; // NOTE: Default/not specifically set + + 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 associationFailureCause = 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 optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional 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; + + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ + 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. */ +cluster EthernetNetworkDiagnostics = 55 { + revision 1; // NOTE: Default/not specifically set + + 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 optional nullable PHYRateEnum PHYRate = 0; + readonly attribute optional nullable boolean fullDuplex = 1; + readonly attribute optional int64u packetRxCount = 2; + readonly attribute optional int64u packetTxCount = 3; + readonly attribute optional int64u txErrCount = 4; + readonly attribute optional int64u collisionCount = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute optional nullable boolean carrierDetect = 7; + readonly attribute optional 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; + + /** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +cluster AdministratorCommissioning = 60 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningWindowStatusEnum : enum8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : enum8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + bitmap Feature : bitmap32 { + kBasic = 0x1; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable vendor_id adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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<32> salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +cluster OperationalCredentials = 62 { + revision 1; // NOTE: Default/not specifically set + + 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<32> attestationNonce = 0; + } + + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + + request struct CSRRequestRequest { + octet_string<32> CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + + request struct AddNOCRequest { + octet_string<400> NOCValue = 0; + optional octet_string<400> ICACValue = 1; + octet_string<16> IPKValue = 2; + int64u caseAdminSubject = 3; + vendor_id adminVendorId = 4; + } + + request struct UpdateNOCRequest { + octet_string NOCValue = 0; + optional octet_string ICACValue = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + + request struct UpdateFabricLabelRequest { + char_string<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + octet_string rootCACertificate = 0; + } + + /** Sender is requesting attestation information from the receiver. */ + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +cluster GroupKeyManagement = 63 { + revision 1; // NOTE: Default/not specifically set + + enum GroupKeySecurityPolicyEnum : enum8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : bitmap32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + int16u groupKeySetIDs[] = 0; + } + + /** Write a new set of keys for the given key set id. */ + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** Supports the ability for clients to request the commissioning of themselves or other nodes onto a fabric which the cluster server can commission onto. */ +cluster CommissionerControl = 1873 { + revision 1; + + bitmap SupportedDeviceCategoryBitmap : bitmap32 { + kFabricSynchronization = 0x1; + } + + fabric_sensitive info event access(read: manage) CommissioningRequestResult = 0 { + int64u requestID = 0; + node_id clientNodeID = 1; + status statusCode = 2; + fabric_idx fabricIndex = 254; + } + + readonly attribute access(read: manage) SupportedDeviceCategoryBitmap supportedDeviceCategories = 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 RequestCommissioningApprovalRequest { + int64u requestID = 0; + vendor_id vendorID = 1; + int16u productID = 2; + optional char_string<64> label = 3; + } + + request struct CommissionNodeRequest { + int64u requestID = 0; + int16u responseTimeoutSeconds = 1; + } + + response struct ReverseOpenCommissioningWindow = 2 { + int16u commissioningTimeout = 0; + octet_string PAKEPasscodeVerifier = 1; + int16u discriminator = 2; + int32u iterations = 3; + octet_string<32> salt = 4; + } + + /** This command is sent by a client to request approval for a future CommissionNode call. */ + command access(invoke: manage) RequestCommissioningApproval(RequestCommissioningApprovalRequest): DefaultSuccess = 0; + /** This command is sent by a client to request that the server begins commissioning a previously approved request. */ + command access(invoke: manage) CommissionNode(CommissionNodeRequest): ReverseOpenCommissioningWindow = 1; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 1; + + binding cluster AccessControl; + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location; + callback attribute hardwareVersion; + callback attribute hardwareVersionString; + callback attribute softwareVersion; + callback attribute softwareVersionString; + callback attribute manufacturingDate; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig; + callback attribute locationCapability; + callback attribute supportsConcurrentConnection; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command ArmFailSafe; + handle command ArmFailSafeResponse; + handle command SetRegulatoryConfig; + handle command SetRegulatoryConfigResponse; + handle command CommissioningComplete; + handle command CommissioningCompleteResponse; + } + + 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; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + + handle command ScanNetworks; + handle command ScanNetworksResponse; + handle command AddOrUpdateWiFiNetwork; + handle command AddOrUpdateThreadNetwork; + handle command RemoveNetwork; + handle command NetworkConfigResponse; + handle command ConnectNetwork; + handle command ConnectNetworkResponse; + handle command ReorderNetwork; + } + + server cluster DiagnosticLogs { + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command RetrieveLogsRequest; + } + + server cluster GeneralDiagnostics { + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount; + callback attribute upTime; + callback attribute totalOperationalHours; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command TestEventTrigger; + handle command TimeSnapshot; + handle command TimeSnapshotResponse; + } + + server cluster SoftwareDiagnostics { + emits event SoftwareFault; + callback attribute threadMetrics; + callback attribute currentHeapFree; + callback attribute currentHeapUsed; + callback attribute currentHeapHighWatermark; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster ThreadNetworkDiagnostics { + callback attribute channel; + callback attribute routingRole; + callback attribute networkName; + callback attribute panId; + callback attribute extendedPanId; + callback attribute meshLocalPrefix; + callback attribute overrunCount; + callback attribute neighborTable; + callback attribute routeTable; + callback attribute partitionId; + callback attribute weighting; + callback attribute dataVersion; + callback attribute stableDataVersion; + callback attribute leaderRouterId; + callback attribute detachedRoleCount; + callback attribute childRoleCount; + callback attribute routerRoleCount; + callback attribute leaderRoleCount; + callback attribute attachAttemptCount; + callback attribute partitionIdChangeCount; + callback attribute betterPartitionAttachAttemptCount; + callback attribute parentChangeCount; + callback attribute txTotalCount; + callback attribute txUnicastCount; + callback attribute txBroadcastCount; + callback attribute txAckRequestedCount; + callback attribute txAckedCount; + callback attribute txNoAckRequestedCount; + callback attribute txDataCount; + callback attribute txDataPollCount; + callback attribute txBeaconCount; + callback attribute txBeaconRequestCount; + callback attribute txOtherCount; + callback attribute txRetryCount; + callback attribute txDirectMaxRetryExpiryCount; + callback attribute txIndirectMaxRetryExpiryCount; + callback attribute txErrCcaCount; + callback attribute txErrAbortCount; + callback attribute txErrBusyChannelCount; + callback attribute rxTotalCount; + callback attribute rxUnicastCount; + callback attribute rxBroadcastCount; + callback attribute rxDataCount; + callback attribute rxDataPollCount; + callback attribute rxBeaconCount; + callback attribute rxBeaconRequestCount; + callback attribute rxOtherCount; + callback attribute rxAddressFilteredCount; + callback attribute rxDestAddrFilteredCount; + callback attribute rxDuplicatedCount; + callback attribute rxErrNoFrameCount; + callback attribute rxErrUnknownNeighborCount; + callback attribute rxErrInvalidSrcAddrCount; + callback attribute rxErrSecCount; + callback attribute rxErrFcsCount; + callback attribute rxErrOtherCount; + callback attribute activeTimestamp; + callback attribute pendingTimestamp; + callback attribute delay; + callback attribute securityPolicy; + callback attribute channelPage0Mask; + callback attribute operationalDatasetComponents; + callback attribute activeNetworkFaultsList; + ram attribute featureMap default = 15; + ram attribute clusterRevision default = 2; + } + + server cluster WiFiNetworkDiagnostics { + emits event Disconnection; + emits event AssociationFailure; + emits event ConnectionStatus; + callback attribute bssid; + callback attribute securityType; + callback attribute wiFiVersion; + callback attribute channelNumber; + callback attribute rssi; + callback attribute beaconLostCount; + callback attribute beaconRxCount; + callback attribute packetMulticastRxCount; + callback attribute packetMulticastTxCount; + callback attribute packetUnicastRxCount; + callback attribute packetUnicastTxCount; + callback attribute currentMaxRate; + callback attribute overrunCount; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + } + + server cluster EthernetNetworkDiagnostics { + callback attribute PHYRate; + callback attribute fullDuplex; + callback attribute packetRxCount; + callback attribute packetTxCount; + callback attribute txErrCount; + callback attribute collisionCount; + callback attribute overrunCount; + callback attribute carrierDetect; + callback attribute timeSinceReset; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + + handle command ResetCounts; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus; + callback attribute adminFabricIndex; + callback attribute adminVendorId; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command OpenCommissioningWindow; + handle command OpenBasicCommissioningWindow; + handle command RevokeCommissioning; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command AttestationRequest; + handle command AttestationResponse; + handle command CertificateChainRequest; + handle command CertificateChainResponse; + handle command CSRRequest; + handle command CSRResponse; + handle command AddNOC; + handle command UpdateNOC; + handle command NOCResponse; + handle command UpdateFabricLabel; + handle command RemoveFabric; + handle command AddTrustedRootCertificate; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command KeySetWrite; + handle command KeySetRead; + handle command KeySetReadResponse; + handle command KeySetRemove; + handle command KeySetReadAllIndices; + handle command KeySetReadAllIndicesResponse; + } +} +endpoint 1 { + device type ma_aggregator = 14, version 1; + + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + + handle command Identify; + handle command TriggerEffect; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster CommissionerControl { + emits event CommissioningRequestResult; + ram attribute supportedDeviceCategories default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command RequestCommissioningApproval; + handle command CommissionNode; + handle command ReverseOpenCommissioningWindow; + } +} + + diff --git a/examples/fabric-sync/bridge/fabric-bridge.zap b/examples/fabric-sync/bridge/fabric-bridge.zap new file mode 100644 index 0000000000..6537421778 --- /dev/null +++ b/examples/fabric-sync/bridge/fabric-bridge.zap @@ -0,0 +1,4474 @@ +{ + "fileFormat": 2, + "featureLevel": 103, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "category": "matter", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "id": 1, + "name": "MA-bridge", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "client", + "enabled": 1 + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "AccessControlEntryChanged", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "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": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPathsPerInvoke", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "3", + "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": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "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": null, + "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": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "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": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshot", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshotResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "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": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "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": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "SoftwareFault", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DetachedRoleCount", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChildRoleCount", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouterRoleCount", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRoleCount", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AttachAttemptCount", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionIdChangeCount", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BetterPartitionAttachAttemptCount", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ParentChangeCount", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxTotalCount", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxUnicastCount", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBroadcastCount", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckRequestedCount", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckedCount", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxNoAckRequestedCount", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataCount", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataPollCount", + "code": 29, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconCount", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconRequestCount", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxOtherCount", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxRetryCount", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCcaCount", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrAbortCount", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrBusyChannelCount", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxTotalCount", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxUnicastCount", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBroadcastCount", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataCount", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataPollCount", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconCount", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconRequestCount", + "code": 45, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxOtherCount", + "code": 46, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxAddressFilteredCount", + "code": 47, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDestAddrFilteredCount", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDuplicatedCount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrNoFrameCount", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrUnknownNeighborCount", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrInvalidSrcAddrCount", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrSecCount", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrFcsCount", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrOtherCount", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingTimestamp", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Delay", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 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": null, + "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": null, + "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": null, + "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": "15", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Wi-Fi 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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "PHYRate", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PHYRateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 14, + "profileId": 259, + "label": "MA-aggregator", + "name": "MA-aggregator" + }, + "deviceTypes": [ + { + "code": 14, + "profileId": 259, + "label": "MA-aggregator", + "name": "MA-aggregator" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 14 + ], + "deviceTypeName": "MA-aggregator", + "deviceTypeCode": 14, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Commissioner Control", + "code": 1873, + "mfgCode": null, + "define": "COMMISSIONER_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RequestCommissioningApproval", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissionNode", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ReverseOpenCommissioningWindow", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "SupportedDeviceCategories", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "SupportedDeviceCategoryBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 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": "CommissioningRequestResult", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-bridge", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "parentEndpointIdentifier": null + } + ] +} \ No newline at end of file diff --git a/examples/fabric-sync/bridge/include/BridgedAdministratorCommissioning.h b/examples/fabric-sync/bridge/include/BridgedAdministratorCommissioning.h new file mode 100644 index 0000000000..06fd9026d4 --- /dev/null +++ b/examples/fabric-sync/bridge/include/BridgedAdministratorCommissioning.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2024 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 + +/** + * @brief CADMIN cluster implementation for handling attribute interactions of bridged device endpoints. + * + * The current Administrator Commissioning Cluster server's zap generated code will automatically + * register an Attribute Access Interface for the root node endpoint implementation. In order to + * properly respond to a read attribute for bridged devices we are representing, we override the + * currently registered Attribute Interface such that we are first to receive any read attribute + * request on Administrator Commissioning Cluster, and if it is not an endpoint for a device we + * are a bridge for we redirect to the default cluster server implementation of Administrator + * Commissioning Cluster. + */ +class BridgedAdministratorCommissioning : public chip::app::AttributeAccessInterface +{ +public: + // Register for the AdministratorCommissioning cluster on all endpoints. + BridgedAdministratorCommissioning() : + AttributeAccessInterface(chip::NullOptional, chip::app::Clusters::AdministratorCommissioning::Id) + {} + + CHIP_ERROR Init(); + + CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; + + // We do not allow writing to CADMIN attributes of a bridged device endpoint. We simply redirect + // write requests to the original attribute interface. + CHIP_ERROR Write(const chip::app::ConcreteDataAttributePath & aPath, chip::app::AttributeValueDecoder & aDecoder) override + { + VerifyOrDie(mOriginalAttributeInterface); + return mOriginalAttributeInterface->Write(aPath, aDecoder); + } + +private: + // If mOriginalAttributeInterface is removed from here, the class description needs to be updated + // to reflect this change. + chip::app::AttributeAccessInterface * mOriginalAttributeInterface = nullptr; +}; diff --git a/examples/fabric-sync/bridge/include/BridgedDevice.h b/examples/fabric-sync/bridge/include/BridgedDevice.h new file mode 100644 index 0000000000..d2c5a64b9e --- /dev/null +++ b/examples/fabric-sync/bridge/include/BridgedDevice.h @@ -0,0 +1,92 @@ +/* + * + * Copyright (c) 2024 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 + +class BridgedDevice +{ +public: + /// Defines all attributes that we keep track of for a bridged device + struct BridgedAttributes + { + std::string uniqueId; + std::string vendorName; + uint16_t vendorId = 0; + std::string productName; + uint16_t productId = 0; + std::string nodeLabel; + uint16_t hardwareVersion = 0; + std::string hardwareVersionString; + uint32_t softwareVersion = 0; + std::string softwareVersionString; + }; + + struct AdminCommissioningAttributes + { + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum commissioningWindowStatus = + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum::kWindowNotOpen; + std::optional openerFabricIndex = std::nullopt; + std::optional openerVendorId = std::nullopt; + }; + + BridgedDevice(chip::ScopedNodeId scopedNodeId); + virtual ~BridgedDevice() = default; + + [[nodiscard]] bool IsReachable() const { return mReachable; } + void SetReachable(bool reachable); + // Reachability attribute changed and requires marking attribute as dirty and sending + // event. + void ReachableChanged(bool reachable); + + void LogActiveChangeEvent(uint32_t promisedActiveDurationMs); + + [[nodiscard]] bool IsIcd() const { return mIsIcd; } + void SetIcd(bool icd) { mIsIcd = icd; } + + inline void SetEndpointId(chip::EndpointId id) { mEndpointId = id; }; + inline chip::EndpointId GetEndpointId() { return mEndpointId; }; + inline chip::ScopedNodeId GetScopedNodeId() { return mScopedNodeId; }; + inline void SetParentEndpointId(chip::EndpointId id) { mParentEndpointId = id; }; + inline chip::EndpointId GetParentEndpointId() { return mParentEndpointId; }; + + [[nodiscard]] const BridgedAttributes & GetBridgedAttributes() const { return mAttributes; } + void SetBridgedAttributes(const BridgedAttributes & value) { mAttributes = value; } + + void SetAdminCommissioningAttributes(const AdminCommissioningAttributes & aAdminCommissioningAttributes); + const AdminCommissioningAttributes & GetAdminCommissioningAttributes() const { return mAdminCommissioningAttributes; } + + /// Convenience method to set just the unique id of a bridged device as it + /// is one of the few attributes that is not always bulk-set + void SetUniqueId(const std::string & value) { mAttributes.uniqueId = value; } + +protected: + bool mReachable = false; + bool mIsIcd = false; + + chip::ScopedNodeId mScopedNodeId; + chip::EndpointId mEndpointId = 0; + chip::EndpointId mParentEndpointId = 0; + + BridgedAttributes mAttributes; + AdminCommissioningAttributes mAdminCommissioningAttributes; +}; diff --git a/examples/fabric-sync/bridge/include/BridgedDeviceBasicInformationImpl.h b/examples/fabric-sync/bridge/include/BridgedDeviceBasicInformationImpl.h new file mode 100644 index 0000000000..23403438ab --- /dev/null +++ b/examples/fabric-sync/bridge/include/BridgedDeviceBasicInformationImpl.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2024 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 + +class BridgedDeviceBasicInformationImpl : public chip::app::AttributeAccessInterface +{ +public: + BridgedDeviceBasicInformationImpl() : + chip::app::AttributeAccessInterface(chip::NullOptional /* endpointId */, + chip::app::Clusters::BridgedDeviceBasicInformation::Id) + {} + + // AttributeAccessInterface implementation + CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & path, chip::app::AttributeValueEncoder & encoder) override; + CHIP_ERROR Write(const chip::app::ConcreteDataAttributePath & path, chip::app::AttributeValueDecoder & decoder) override; +}; diff --git a/examples/fabric-sync/bridge/include/BridgedDeviceManager.h b/examples/fabric-sync/bridge/include/BridgedDeviceManager.h new file mode 100644 index 0000000000..127898fc5b --- /dev/null +++ b/examples/fabric-sync/bridge/include/BridgedDeviceManager.h @@ -0,0 +1,136 @@ +/* + * + * Copyright (c) 2024 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 "BridgedDevice.h" + +#include + +class BridgedDeviceManager +{ +public: + BridgedDeviceManager() = default; + + /** + * @brief Initializes the BridgedDeviceManager. + * + * This function sets up the initial state of the BridgedDeviceManager, clearing + * any existing devices and setting the starting dynamic endpoint ID. + */ + void Init(); + + /** + * @brief Adds a device to a dynamic endpoint. + * + * This function attempts to add a device to a dynamic endpoint. It tries to find an available + * endpoint slot and retries the addition process up to a specified maximum number of times if + * the endpoint already exists. If the addition is successful, it returns the index of the + * dynamic endpoint; + * + * Ensures that the device has a unique id: + * - device MUST set its unique id if any BEFORE calling this method + * - if no unique id (i.e. empty string), a new unique id will be generated + * - Add will fail if the unique id is not unique + * + * @param dev A pointer to the device to be added. + * @param parentEndpointId The parent endpoint ID. Defaults to an invalid endpoint ID. + * @return int The index of the dynamic endpoint if successful, nullopt otherwise + */ + std::optional AddDeviceEndpoint(std::unique_ptr dev, + chip::EndpointId parentEndpointId = chip::kInvalidEndpointId); + + /** + * @brief Removes a device from a dynamic endpoint. + * + * This function attempts to remove a device from a dynamic endpoint by iterating through the + * available endpoints and checking if the device matches. If the device is found, it clears the + * dynamic endpoint, logs the removal, and returns the index of the removed endpoint. + * If the device is not found, it returns -1. + * + * @param dev A pointer to the device to be removed. + * @return int The index of the removed dynamic endpoint if successful, -1 otherwise. + */ + int RemoveDeviceEndpoint(BridgedDevice * dev); + + /** + * @brief Gets a device from its endpoint ID. + * + * This function iterates through the available devices and returns the device that matches the + * specified endpoint ID. If no device matches the endpoint ID, it returns nullptr. + * + * @param endpointId The endpoint ID of the device to be retrieved. + * @return BridgedDevice* A pointer to the device if found, nullptr otherwise. + */ + BridgedDevice * GetDevice(chip::EndpointId endpointId) const; + + /** + * @brief Gets a device from its ScopedNodeId. + * + * This function iterates through the available devices and returns the device that matches the + * specified ScopedNodeId. If no device matches the ScopedNodeId, it returns nullptr. + * + * @param scopedNodeId The ScopedNodeId of the device to be retrieved. + * @return BridgedDevice* A pointer to the device if found, nullptr otherwise. + */ + BridgedDevice * GetDeviceByScopedNodeId(chip::ScopedNodeId scopedNodeId) const; + + /** + * @brief Removes a device from a dynamic endpoint by its ScopedNodeId. + * + * This function attempts to remove a device and the associated dynamic endpoint by iterating through + * the available device and checking if the device matches the specified ScopedNodeId. If the device is + * found, it removes the dynamic endpoint. + * + * @param scopedNodeId The ScopedNodeId of the device to be removed. + * @return unsigned of the index of the removed dynamic endpoint if successful, nullopt otherwise. + */ + std::optional RemoveDeviceByScopedNodeId(chip::ScopedNodeId scopedNodeId); + + /** + * Finds the device with the given unique id (if any) + */ + BridgedDevice * GetDeviceByUniqueId(const std::string & id); + +private: + friend BridgedDeviceManager & BridgeDeviceMgr(); + + /** + * Creates a new unique ID that is not used by any other mDevice + */ + std::string GenerateUniqueId(); + + static BridgedDeviceManager sInstance; + + chip::EndpointId mCurrentEndpointId; + chip::EndpointId mFirstDynamicEndpointId; + std::unique_ptr mDevices[CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT + 1]; +}; + +/** + * Returns the public interface of the BridgedDeviceManager singleton object. + * + * Applications should use this to access features of the BridgedDeviceManager + * object. + */ +inline BridgedDeviceManager & BridgeDeviceMgr() +{ + return BridgedDeviceManager::sInstance; +} diff --git a/examples/fabric-sync/bridge/include/CHIPProjectAppConfig.h b/examples/fabric-sync/bridge/include/CHIPProjectAppConfig.h new file mode 100644 index 0000000000..b1a711658d --- /dev/null +++ b/examples/fabric-sync/bridge/include/CHIPProjectAppConfig.h @@ -0,0 +1,49 @@ +/* + * + * Copyright (c) 2024 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 + +// FabricSync needs to be commissioners and likely want to be discoverable +#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY 1 + +// FabricSync will often enable this feature +#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_PASSCODE 1 + +// FabricSync needs to be both commissioners and commissionees +#define CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE 1 + +// Enable app platform +#define CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED 1 + +// overrides CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT in CHIPProjectConfig +#define CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT 16 + +// Allows app options (ports) to be configured on launch of app +#define CHIP_DEVICE_ENABLE_PORT_PARAMS 1 + +// Include the CHIPProjectConfig from platform implementation config +#include diff --git a/examples/fabric-sync/bridge/src/BridgedAdministratorCommissioning.cpp b/examples/fabric-sync/bridge/src/BridgedAdministratorCommissioning.cpp new file mode 100644 index 0000000000..a0d87cbb3b --- /dev/null +++ b/examples/fabric-sync/bridge/src/BridgedAdministratorCommissioning.cpp @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2024 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 "BridgedAdministratorCommissioning.h" + +#include "BridgedDevice.h" +#include "BridgedDeviceManager.h" +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::AdministratorCommissioning; + +CHIP_ERROR BridgedAdministratorCommissioning::Init() +{ + // We expect initialization after emberAfInit(). This allows us to unregister the existing + // AccessAttributeInterface for AdministratorCommissioning and register ourselves, ensuring we + // get the callback for reading attribute. If the read is not intended for a bridged device we will + // forward it to the original attribute interface that we are unregistering. + mOriginalAttributeInterface = AttributeAccessInterfaceRegistry::Instance().Get(kRootEndpointId, AdministratorCommissioning::Id); + VerifyOrReturnError(mOriginalAttributeInterface, CHIP_ERROR_INTERNAL); + AttributeAccessInterfaceRegistry::Instance().Unregister(mOriginalAttributeInterface); + VerifyOrDie(AttributeAccessInterfaceRegistry::Instance().Register(this)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR BridgedAdministratorCommissioning::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +{ + VerifyOrDie(aPath.mClusterId == Clusters::AdministratorCommissioning::Id); + EndpointId endpointId = aPath.mEndpointId; + BridgedDevice * device = BridgeDeviceMgr().GetDevice(endpointId); + + if (!device) + { + VerifyOrDie(mOriginalAttributeInterface); + return mOriginalAttributeInterface->Read(aPath, aEncoder); + } + auto attr = device->GetAdminCommissioningAttributes(); + + switch (aPath.mAttributeId) + { + case Attributes::WindowStatus::Id: { + return aEncoder.Encode(attr.commissioningWindowStatus); + } + case Attributes::AdminFabricIndex::Id: { + DataModel::Nullable encodeableFabricIndex = DataModel::NullNullable; + if (attr.openerFabricIndex.has_value()) + { + encodeableFabricIndex.SetNonNull(attr.openerFabricIndex.value()); + } + return aEncoder.Encode(encodeableFabricIndex); + } + case Attributes::AdminVendorId::Id: { + DataModel::Nullable encodeableVendorId = DataModel::NullNullable; + if (attr.openerVendorId.has_value()) + { + encodeableVendorId.SetNonNull(attr.openerVendorId.value()); + } + return aEncoder.Encode(encodeableVendorId); + } + default: + break; + } + + return CHIP_NO_ERROR; +} diff --git a/examples/fabric-sync/bridge/src/BridgedDevice.cpp b/examples/fabric-sync/bridge/src/BridgedDevice.cpp new file mode 100644 index 0000000000..f462d1cce6 --- /dev/null +++ b/examples/fabric-sync/bridge/src/BridgedDevice.cpp @@ -0,0 +1,118 @@ +/* + * + * Copyright (c) 2024 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 "BridgedDevice.h" + +#include + +#include +#include +#include + +using namespace chip; +using namespace chip::app::Clusters::Actions; + +BridgedDevice::BridgedDevice(ScopedNodeId scopedNodeId) +{ + mReachable = false; + mScopedNodeId = scopedNodeId; + mEndpointId = kInvalidEndpointId; +} + +void BridgedDevice::LogActiveChangeEvent(uint32_t promisedActiveDurationMs) +{ + EndpointId endpointId = mEndpointId; + + DeviceLayer::SystemLayer().ScheduleLambda([endpointId, promisedActiveDurationMs]() { + app::Clusters::BridgedDeviceBasicInformation::Events::ActiveChanged::Type event{}; + event.promisedActiveDuration = promisedActiveDurationMs; + EventNumber eventNumber = 0; + + CHIP_ERROR err = app::LogEvent(event, endpointId, eventNumber); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(NotSpecified, "LogEvent for ActiveChanged failed %s", err.AsString()); + } + }); +} + +void BridgedDevice::SetReachable(bool reachable) +{ + mReachable = reachable; + + if (reachable) + { + ChipLogProgress(NotSpecified, "BridgedDevice[%s]: ONLINE", mAttributes.uniqueId.c_str()); + } + else + { + ChipLogProgress(NotSpecified, "BridgedDevice[%s]: OFFLINE", mAttributes.uniqueId.c_str()); + } +} + +void BridgedDevice::ReachableChanged(bool reachable) +{ + EndpointId endpointId = mEndpointId; + bool reachableChanged = (mReachable != reachable); + if (reachableChanged) + { + SetReachable(reachable); + DeviceLayer::SystemLayer().ScheduleLambda([endpointId]() { + MatterReportingAttributeChangeCallback(endpointId, app::Clusters::BridgedDeviceBasicInformation::Id, + app::Clusters::BridgedDeviceBasicInformation::Attributes::Reachable::Id); + + app::Clusters::BridgedDeviceBasicInformation::Events::ReachableChanged::Type event{}; + EventNumber eventNumber = 0; + + CHIP_ERROR err = app::LogEvent(event, endpointId, eventNumber); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(NotSpecified, "LogEvent for ActiveChanged failed %s", err.AsString()); + } + }); + } +} + +void BridgedDevice::SetAdminCommissioningAttributes(const AdminCommissioningAttributes & aAdminCommissioningAttributes) +{ + EndpointId endpointId = mEndpointId; + bool windowChanged = + (aAdminCommissioningAttributes.commissioningWindowStatus != mAdminCommissioningAttributes.commissioningWindowStatus); + bool fabricIndexChanged = (aAdminCommissioningAttributes.openerFabricIndex != mAdminCommissioningAttributes.openerFabricIndex); + bool vendorChanged = (aAdminCommissioningAttributes.openerVendorId != mAdminCommissioningAttributes.openerVendorId); + + mAdminCommissioningAttributes = aAdminCommissioningAttributes; + + DeviceLayer::SystemLayer().ScheduleLambda([endpointId, windowChanged, fabricIndexChanged, vendorChanged]() { + if (windowChanged) + { + MatterReportingAttributeChangeCallback(endpointId, app::Clusters::AdministratorCommissioning::Id, + app::Clusters::AdministratorCommissioning::Attributes::WindowStatus::Id); + } + if (fabricIndexChanged) + { + MatterReportingAttributeChangeCallback(endpointId, app::Clusters::AdministratorCommissioning::Id, + app::Clusters::AdministratorCommissioning::Attributes::AdminFabricIndex::Id); + } + if (vendorChanged) + { + MatterReportingAttributeChangeCallback(endpointId, app::Clusters::AdministratorCommissioning::Id, + app::Clusters::AdministratorCommissioning::Attributes::AdminVendorId::Id); + } + }); +} diff --git a/examples/fabric-sync/bridge/src/BridgedDeviceBasicInformationImpl.cpp b/examples/fabric-sync/bridge/src/BridgedDeviceBasicInformationImpl.cpp new file mode 100644 index 0000000000..7fa48a4a15 --- /dev/null +++ b/examples/fabric-sync/bridge/src/BridgedDeviceBasicInformationImpl.cpp @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2024 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 "BridgedDeviceBasicInformationImpl.h" + +#include "BridgedDeviceManager.h" + +#include +#include +#include + +#include + +static constexpr unsigned kBridgedDeviceBasicInformationClusterRevision = 4; + +using namespace ::chip; +using namespace ::chip::app; +using namespace ::chip::app::Clusters; + +CHIP_ERROR BridgedDeviceBasicInformationImpl::Read(const ConcreteReadAttributePath & path, AttributeValueEncoder & encoder) +{ + // Registration is done for the bridged device basic information only + VerifyOrDie(path.mClusterId == app::Clusters::BridgedDeviceBasicInformation::Id); + + BridgedDevice * dev = BridgeDeviceMgr().GetDevice(path.mEndpointId); + VerifyOrReturnError(dev != nullptr, CHIP_ERROR_NOT_FOUND); + + switch (path.mAttributeId) + { + case BasicInformation::Attributes::Reachable::Id: + encoder.Encode(dev->IsReachable()); + break; + case BasicInformation::Attributes::NodeLabel::Id: + encoder.Encode(CharSpan::fromCharString(dev->GetBridgedAttributes().nodeLabel.c_str())); + break; + case BasicInformation::Attributes::ClusterRevision::Id: + encoder.Encode(kBridgedDeviceBasicInformationClusterRevision); + break; + case BasicInformation::Attributes::FeatureMap::Id: { + BitMask features; + features.Set(Clusters::BridgedDeviceBasicInformation::Feature::kBridgedICDSupport, dev->IsIcd()); + encoder.Encode(features); + } + break; + case BasicInformation::Attributes::UniqueID::Id: + encoder.Encode(CharSpan::fromCharString(dev->GetBridgedAttributes().uniqueId.c_str())); + break; + case BasicInformation::Attributes::VendorName::Id: + encoder.Encode(CharSpan::fromCharString(dev->GetBridgedAttributes().vendorName.c_str())); + break; + case BasicInformation::Attributes::VendorID::Id: + encoder.Encode(dev->GetBridgedAttributes().vendorId); + break; + case BasicInformation::Attributes::ProductName::Id: + encoder.Encode(CharSpan::fromCharString(dev->GetBridgedAttributes().productName.c_str())); + break; + case BasicInformation::Attributes::ProductID::Id: + encoder.Encode(dev->GetBridgedAttributes().productId); + break; + case BasicInformation::Attributes::HardwareVersion::Id: + encoder.Encode(dev->GetBridgedAttributes().hardwareVersion); + break; + case BasicInformation::Attributes::HardwareVersionString::Id: + encoder.Encode(CharSpan::fromCharString(dev->GetBridgedAttributes().hardwareVersionString.c_str())); + break; + case BasicInformation::Attributes::SoftwareVersion::Id: + encoder.Encode(dev->GetBridgedAttributes().softwareVersion); + break; + case BasicInformation::Attributes::SoftwareVersionString::Id: + encoder.Encode(CharSpan::fromCharString(dev->GetBridgedAttributes().softwareVersionString.c_str())); + break; + default: + return CHIP_ERROR_INVALID_ARGUMENT; + } + return CHIP_NO_ERROR; +} + +CHIP_ERROR BridgedDeviceBasicInformationImpl::Write(const ConcreteDataAttributePath & path, AttributeValueDecoder & decoder) +{ + VerifyOrDie(path.mClusterId == app::Clusters::BridgedDeviceBasicInformation::Id); + + BridgedDevice * dev = BridgeDeviceMgr().GetDevice(path.mEndpointId); + VerifyOrReturnError(dev != nullptr, CHIP_ERROR_NOT_FOUND); + + if (!dev->IsReachable()) + { + return CHIP_ERROR_NOT_CONNECTED; + } + + ChipLogProgress(NotSpecified, "Bridged device basic information attempt to write attribute: ep=%d", path.mAttributeId); + + // nothing writable right now ... + + return CHIP_ERROR_INVALID_ARGUMENT; +} diff --git a/examples/fabric-sync/bridge/src/BridgedDeviceManager.cpp b/examples/fabric-sync/bridge/src/BridgedDeviceManager.cpp new file mode 100644 index 0000000000..0265f91202 --- /dev/null +++ b/examples/fabric-sync/bridge/src/BridgedDeviceManager.cpp @@ -0,0 +1,345 @@ +/* + * + * Copyright (c) 2024 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 "BridgedDeviceManager.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::Credentials; +using namespace chip::Inet; +using namespace chip::Transport; +using namespace chip::DeviceLayer; +using namespace chip::app::Clusters; + +namespace { + +constexpr uint8_t kMaxRetries = 10; +constexpr int kNodeLabelSize = 32; +constexpr int kUniqueIdSize = 32; +constexpr int kVendorNameSize = 32; +constexpr int kProductNameSize = 32; +constexpr int kHardwareVersionSize = 64; +constexpr int kSoftwareVersionSize = 64; + +// Current ZCL implementation of Struct uses a max-size array of 254 bytes +constexpr int kDescriptorAttributeArraySize = 254; + +#define ZCL_ADMINISTRATOR_COMMISSIONING_CLUSTER_REVISION (1u) + +// ENDPOINT DEFINITIONS: +// ================================================================================= +// +// Endpoint definitions will be reused across multiple endpoints for every instance of the +// endpoint type. +// There will be no intrinsic storage for the endpoint attributes declared here. +// Instead, all attributes will be treated as EXTERNAL, and therefore all reads +// or writes to the attributes must be handled within the emberAfExternalAttributeWriteCallback +// and emberAfExternalAttributeReadCallback functions declared herein. This fits +// the typical model of a bridge, since a bridge typically maintains its own +// state database representing the devices connected to it. + +// (taken from matter-devices.xml) +#define DEVICE_TYPE_BRIDGED_NODE 0x0013 + +// Device Version for dynamic endpoints: +#define DEVICE_VERSION_DEFAULT 1 + +// --------------------------------------------------------------------------- +// +// SYNCED DEVICE ENDPOINT: contains the following clusters: +// - Descriptor +// - Bridged Device Basic Information +// - Administrator Commissioning + +// clang-format off +// Declare Descriptor cluster attributes +DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(descriptorAttrs) + DECLARE_DYNAMIC_ATTRIBUTE(Descriptor::Attributes::DeviceTypeList::Id, ARRAY, kDescriptorAttributeArraySize, 0), /* device list */ + DECLARE_DYNAMIC_ATTRIBUTE(Descriptor::Attributes::ServerList::Id, ARRAY, kDescriptorAttributeArraySize, 0), /* server list */ + DECLARE_DYNAMIC_ATTRIBUTE(Descriptor::Attributes::ClientList::Id, ARRAY, kDescriptorAttributeArraySize, 0), /* client list */ + DECLARE_DYNAMIC_ATTRIBUTE(Descriptor::Attributes::PartsList::Id, ARRAY, kDescriptorAttributeArraySize, 0), /* parts list */ +DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); + +// Declare Bridged Device Basic Information cluster attributes +DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(bridgedDeviceBasicAttrs) + // The attributes below are MANDATORY in the Bridged Device Information Cluster + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::Reachable::Id, BOOLEAN, 1, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::UniqueID::Id, CHAR_STRING, kUniqueIdSize, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::FeatureMap::Id, BITMAP32, 4, 0), + + // The attributes below are OPTIONAL in the bridged device, however they are MANDATORY in the BasicInformation cluster + // so they can always be provided if desired + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::VendorName::Id, CHAR_STRING, kVendorNameSize, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::VendorID::Id, INT16U, 2, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::ProductName::Id, CHAR_STRING, kProductNameSize, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::ProductID::Id, INT16U, 2, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::NodeLabel::Id, CHAR_STRING, kNodeLabelSize, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::HardwareVersion::Id, INT16U, 2, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::HardwareVersionString::Id, CHAR_STRING, + kHardwareVersionSize, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::SoftwareVersion::Id, INT32U, 4, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::Id, CHAR_STRING, + kSoftwareVersionSize, 0), +DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); + +// Declare Ecosystem Information cluster attributes +DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(ecosystemInformationBasicAttrs) + DECLARE_DYNAMIC_ATTRIBUTE(EcosystemInformation::Attributes::DeviceDirectory::Id, ARRAY, kDescriptorAttributeArraySize, 0), + DECLARE_DYNAMIC_ATTRIBUTE(EcosystemInformation::Attributes::LocationDirectory::Id, ARRAY, kDescriptorAttributeArraySize, 0), + DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); + +// Declare Administrator Commissioning cluster attributes +DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(AdministratorCommissioningAttrs) + DECLARE_DYNAMIC_ATTRIBUTE(AdministratorCommissioning::Attributes::WindowStatus::Id, ENUM8, 1, 0), + DECLARE_DYNAMIC_ATTRIBUTE(AdministratorCommissioning::Attributes::AdminFabricIndex::Id, FABRIC_IDX, 1, 0), + DECLARE_DYNAMIC_ATTRIBUTE(AdministratorCommissioning::Attributes::AdminVendorId::Id, VENDOR_ID, 2, 0), + DECLARE_DYNAMIC_ATTRIBUTE(AdministratorCommissioning::Attributes::ClusterRevision::Id, INT16U, ZCL_ADMINISTRATOR_COMMISSIONING_CLUSTER_REVISION, 0), +DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); +// clang-format on + +constexpr CommandId bridgedDeviceBasicInformationCommands[] = { + app::Clusters::BridgedDeviceBasicInformation::Commands::KeepActive::Id, + kInvalidCommandId, +}; + +constexpr CommandId administratorCommissioningCommands[] = { + app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, + app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, + app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Id, + kInvalidCommandId, +}; + +// clang-format off +// Declare Cluster List for Bridged Node endpoint +DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(bridgedNodeClusters) + DECLARE_DYNAMIC_CLUSTER(Descriptor::Id, descriptorAttrs, ZAP_CLUSTER_MASK(SERVER), nullptr, nullptr), + DECLARE_DYNAMIC_CLUSTER(BridgedDeviceBasicInformation::Id, bridgedDeviceBasicAttrs, ZAP_CLUSTER_MASK(SERVER), nullptr, nullptr), + DECLARE_DYNAMIC_CLUSTER(EcosystemInformation::Id, ecosystemInformationBasicAttrs, ZAP_CLUSTER_MASK(SERVER), nullptr, nullptr), + DECLARE_DYNAMIC_CLUSTER(AdministratorCommissioning::Id, AdministratorCommissioningAttrs, ZAP_CLUSTER_MASK(SERVER), + administratorCommissioningCommands, nullptr) +DECLARE_DYNAMIC_CLUSTER_LIST_END; + +DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(icdBridgedNodeClusters) + DECLARE_DYNAMIC_CLUSTER(Descriptor::Id, descriptorAttrs, ZAP_CLUSTER_MASK(SERVER), nullptr, nullptr), + DECLARE_DYNAMIC_CLUSTER(BridgedDeviceBasicInformation::Id, bridgedDeviceBasicAttrs, ZAP_CLUSTER_MASK(SERVER), + bridgedDeviceBasicInformationCommands, nullptr), + DECLARE_DYNAMIC_CLUSTER(AdministratorCommissioning::Id, AdministratorCommissioningAttrs, ZAP_CLUSTER_MASK(SERVER), + administratorCommissioningCommands, nullptr) +DECLARE_DYNAMIC_CLUSTER_LIST_END; +// clang-format on + +// Declare Bridged Node endpoint +DECLARE_DYNAMIC_ENDPOINT(sBridgedNodeEndpoint, bridgedNodeClusters); +DECLARE_DYNAMIC_ENDPOINT(sIcdBridgedNodeEndpoint, icdBridgedNodeClusters); + +// TODO: this is a single version array, however we may have many +// different clusters that are independent. +DataVersion sBridgedNodeDataVersions[ArraySize(bridgedNodeClusters)]; + +const EmberAfDeviceType sBridgedDeviceTypes[] = { { DEVICE_TYPE_BRIDGED_NODE, DEVICE_VERSION_DEFAULT } }; + +} // namespace + +// Define the static member +BridgedDeviceManager BridgedDeviceManager::sInstance; + +void BridgedDeviceManager::Init() +{ + mFirstDynamicEndpointId = static_cast( + static_cast(emberAfEndpointFromIndex(static_cast(emberAfFixedEndpointCount() - 1))) + 1); + mCurrentEndpointId = mFirstDynamicEndpointId; +} + +std::optional BridgedDeviceManager::AddDeviceEndpoint(std::unique_ptr dev, + chip::EndpointId parentEndpointId) +{ + EmberAfEndpointType * ep = dev->IsIcd() ? &sIcdBridgedNodeEndpoint : &sBridgedNodeEndpoint; + + const chip::Span & deviceTypeList = Span(sBridgedDeviceTypes); + + // TODO: this shares data version among different clusters, which seems incorrect + const chip::Span & dataVersionStorage = Span(sBridgedNodeDataVersions); + + if (dev->GetBridgedAttributes().uniqueId.empty()) + { + dev->SetUniqueId(GenerateUniqueId()); + } + else if (GetDeviceByUniqueId(dev->GetBridgedAttributes().uniqueId) != nullptr) + { + ChipLogProgress(NotSpecified, "A device with unique id '%s' already exists", dev->GetBridgedAttributes().uniqueId.c_str()); + return std::nullopt; + } + + for (unsigned index = 0; index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; index++) + { + if (mDevices[index]) + { + continue; + } + + for (int retryCount = 0; retryCount < kMaxRetries; retryCount++) + { + DeviceLayer::StackLock lock; + dev->SetEndpointId(mCurrentEndpointId); + dev->SetParentEndpointId(parentEndpointId); + CHIP_ERROR err = + emberAfSetDynamicEndpoint(index, mCurrentEndpointId, ep, dataVersionStorage, deviceTypeList, parentEndpointId); + if (err == CHIP_NO_ERROR) + { + ChipLogProgress(NotSpecified, "Added device with Id=[%d:0x" ChipLogFormatX64 "] to dynamic endpoint %d (index=%d)", + dev->GetScopedNodeId().GetFabricIndex(), ChipLogValueX64(dev->GetScopedNodeId().GetNodeId()), + mCurrentEndpointId, index); + mDevices[index] = std::move(dev); + return index; + } + if (err != CHIP_ERROR_ENDPOINT_EXISTS) + { + return std::nullopt; // Return error as endpoint addition failed due to an error other than endpoint already exists + } + // Increment the endpoint ID and handle wrap condition + if (++mCurrentEndpointId < mFirstDynamicEndpointId) + { + mCurrentEndpointId = mFirstDynamicEndpointId; + } + } + ChipLogError(NotSpecified, "Failed to add dynamic endpoint after %d retries", kMaxRetries); + return std::nullopt; // Return error as all retries are exhausted + } + + ChipLogProgress(NotSpecified, "Failed to add dynamic endpoint: No endpoints available!"); + return std::nullopt; +} + +int BridgedDeviceManager::RemoveDeviceEndpoint(BridgedDevice * dev) +{ + uint8_t index = 0; + while (index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) + { + if (mDevices[index].get() == dev) + { + DeviceLayer::StackLock lock; + // Silence complaints about unused ep when progress logging + // disabled. + [[maybe_unused]] EndpointId ep = emberAfClearDynamicEndpoint(index); + mDevices[index] = nullptr; + ChipLogProgress(NotSpecified, "Removed device %s from dynamic endpoint %d (index=%d)", + dev->GetBridgedAttributes().uniqueId.c_str(), ep, index); + return index; + } + index++; + } + return -1; +} + +BridgedDevice * BridgedDeviceManager::GetDevice(chip::EndpointId endpointId) const +{ + for (uint8_t index = 0; index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; ++index) + { + if (mDevices[index] && mDevices[index]->GetEndpointId() == endpointId) + { + return mDevices[index].get(); + } + } + return nullptr; +} + +std::string BridgedDeviceManager::GenerateUniqueId() +{ + char rand_buffer[kUniqueIdSize + 1]; + memset(rand_buffer, 0, sizeof(rand_buffer)); + + static const char kRandCharChoices[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + + while (true) + { + /// for nice viewing, prefix the generated value + memcpy(rand_buffer, "GEN-", 4); + for (unsigned idx = 4; idx < kUniqueIdSize; idx++) + { + rand_buffer[idx] = kRandCharChoices[Crypto::GetRandU8() % (sizeof(kRandCharChoices) - 1)]; + } + + // we know zero-terminated due to the memset + std::string uniqueIdChoice = rand_buffer; + + if (!GetDeviceByUniqueId(uniqueIdChoice)) + { + return uniqueIdChoice; + } + } +} + +BridgedDevice * BridgedDeviceManager::GetDeviceByUniqueId(const std::string & id) +{ + for (uint8_t index = 0; index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; ++index) + { + if (mDevices[index] && mDevices[index]->GetBridgedAttributes().uniqueId == id) + { + return mDevices[index].get(); + } + } + return nullptr; +} + +BridgedDevice * BridgedDeviceManager::GetDeviceByScopedNodeId(chip::ScopedNodeId scopedNodeId) const +{ + for (uint8_t index = 0; index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; ++index) + { + if (mDevices[index] && mDevices[index]->GetScopedNodeId() == scopedNodeId) + { + return mDevices[index].get(); + } + } + return nullptr; +} + +std::optional BridgedDeviceManager::RemoveDeviceByScopedNodeId(chip::ScopedNodeId scopedNodeId) +{ + for (unsigned index = 0; index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; ++index) + { + if (mDevices[index] && mDevices[index]->GetScopedNodeId() == scopedNodeId) + { + DeviceLayer::StackLock lock; + EndpointId ep = emberAfClearDynamicEndpoint(index); + mDevices[index] = nullptr; + ChipLogProgress(NotSpecified, "Removed device with Id=[%d:0x" ChipLogFormatX64 "] from dynamic endpoint %d (index=%d)", + scopedNodeId.GetFabricIndex(), ChipLogValueX64(scopedNodeId.GetNodeId()), ep, index); + return index; + } + } + return std::nullopt; +} diff --git a/examples/fabric-sync/build_overrides b/examples/fabric-sync/build_overrides new file mode 120000 index 0000000000..b430cf6a2e --- /dev/null +++ b/examples/fabric-sync/build_overrides @@ -0,0 +1 @@ +../build_overrides \ No newline at end of file diff --git a/examples/all-clusters-minimal-app/tizen/include/CHIPProjectAppConfig.h b/examples/fabric-sync/main.cpp similarity index 59% rename from examples/all-clusters-minimal-app/tizen/include/CHIPProjectAppConfig.h rename to examples/fabric-sync/main.cpp index cecc041dc2..84c014dfcb 100644 --- a/examples/all-clusters-minimal-app/tizen/include/CHIPProjectAppConfig.h +++ b/examples/fabric-sync/main.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2024 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,16 +16,26 @@ * 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. - * - */ +#include + +using namespace chip; + +void ApplicationInit() +{ + ChipLogProgress(NotSpecified, "Fabric-Sync: ApplicationInit()"); +} + +void ApplicationShutdown() +{ + ChipLogDetail(NotSpecified, "Fabric-Sync: ApplicationShutdown()"); +} + +int main(int argc, char * argv[]) +{ + + VerifyOrDie(ChipLinuxAppInit(argc, argv) == 0); -#pragma once + ChipLinuxAppMainLoop(); -// include the CHIPProjectConfig from config/standalone -#include + return 0; +} diff --git a/examples/fabric-sync/third_party/connectedhomeip b/examples/fabric-sync/third_party/connectedhomeip new file mode 120000 index 0000000000..1b20c9fb81 --- /dev/null +++ b/examples/fabric-sync/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../ \ No newline at end of file diff --git a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImExtendableInvokeCommand.kt b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImExtendableInvokeCommand.kt index 0b1a2ab746..be1af1d62c 100644 --- a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImExtendableInvokeCommand.kt +++ b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImExtendableInvokeCommand.kt @@ -75,6 +75,7 @@ class PairOnNetworkLongImExtendableInvokeCommand( ) { setFailure("invoke failure with incorrect status") } + responseCount++ } if (clusterId == CLUSTER_ID_TEST && commandId == TEST_ADD_ARGUMENT_RSP_COMMAND) { @@ -89,8 +90,8 @@ class PairOnNetworkLongImExtendableInvokeCommand( if (status != null) { setFailure("invoke failure with incorrect status") } + responseCount++ } - responseCount++ } override fun onNoResponse(noInvokeResponseData: NoInvokeResponseData) { @@ -126,7 +127,7 @@ class PairOnNetworkLongImExtendableInvokeCommand( val element1: InvokeElement = InvokeElement.newInstance( - /* endpointId= */ 0, + /* endpointId= */ 1, CLUSTER_ID_IDENTIFY, IDENTIFY_COMMAND, tlvWriter1.getEncoded(), diff --git a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairingCommand.kt b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairingCommand.kt index a33a813f07..4351a937f7 100644 --- a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairingCommand.kt +++ b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairingCommand.kt @@ -183,7 +183,9 @@ abstract class PairingCommand( override fun onICDRegistrationInfoRequired() { logger.log(Level.INFO, "onICDRegistrationInfoRequired") currentCommissioner() - .updateCommissioningICDRegistrationInfo(ICDRegistrationInfo.newBuilder().build()) + .updateCommissioningICDRegistrationInfo( + ICDRegistrationInfo.newBuilder().setICDStayActiveDurationMsec(30000L).build() + ) } override fun onICDRegistrationComplete(errorCode: Long, icdDeviceInfo: ICDDeviceInfo) { diff --git a/examples/laundry-washer-app/nxp/common/main/main.cpp b/examples/laundry-washer-app/nxp/common/main/main.cpp index b2aadab98c..26772e9e60 100644 --- a/examples/laundry-washer-app/nxp/common/main/main.cpp +++ b/examples/laundry-washer-app/nxp/common/main/main.cpp @@ -32,7 +32,7 @@ uint8_t __attribute__((section(".heap"))) ucHeap[configTOTAL_HEAP_SIZE]; using namespace ::chip::DeviceLayer; -extern "C" int main(int argc, char * argv[]) +int main(int argc, char * argv[]) { TaskHandle_t taskHandle; diff --git a/examples/laundry-washer-app/nxp/rt/rt1060/.gn b/examples/laundry-washer-app/nxp/rt/rt1060/.gn new file mode 100644 index 0000000000..0985ed955a --- /dev/null +++ b/examples/laundry-washer-app/nxp/rt/rt1060/.gn @@ -0,0 +1,35 @@ +# 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/build.gni") +import("//build_overrides/chip.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 = { + target_cpu = "arm" + target_os = "freertos" + + import("//args.gni") + + # Import common example GN args + import("${chip_root}/examples/platform/nxp/common/gn/args.gni") + + # Import default platform configs + import("${chip_root}/src/platform/nxp/rt/rt1060/args.gni") +} diff --git a/examples/laundry-washer-app/nxp/rt/rt1060/BUILD.gn b/examples/laundry-washer-app/nxp/rt/rt1060/BUILD.gn new file mode 100644 index 0000000000..eb7ea93bbd --- /dev/null +++ b/examples/laundry-washer-app/nxp/rt/rt1060/BUILD.gn @@ -0,0 +1,291 @@ +# Copyright (c) 2021-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. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/nxp_sdk.gni") +import("//build_overrides/openthread.gni") +import("${chip_root}/src/platform/device.gni") + +#allows to get common NXP SDK gn options +import("${nxp_sdk_build_root}/nxp_sdk.gni") + +# Allows to get various RT gn options +import("${nxp_sdk_build_root}/${nxp_sdk_name}/rt_sdk.gni") + +import("${chip_root}/src/platform/nxp/${nxp_platform}/args.gni") +import( + "${nxp_sdk_build_root}/${nxp_sdk_name}/${rt_platform}/${rt_platform}.gni") +import("${nxp_sdk_build_root}/${nxp_sdk_name}/nxp_executable.gni") + +assert(current_os == "freertos") +assert(target_os == "freertos") +assert(nxp_platform == "rt/rt1060") + +declare_args() { + # Allows to enable to ota_provider support + enable_ota_provider = false + + # Allows to connect to a predefine Wi-Fi network at boot + wifi_auto_connect_at_boot = false + wifi_auto_connect_at_boot_ssid = "" + wifi_auto_connect_at_boot_password = "" + + # Setup discriminator as argument + setup_discriminator = 3840 +} + +example_platform_dir = + "${nxp_sdk_matter_support_root}/examples/platform/${nxp_platform}" +common_example_dir = "${chip_root}/examples/platform/nxp/common" + +app_common_folder = "laundry-washer-app/nxp/zap" + +# Create here the SDK instance. +# Particular sources/defines/includes could be added/changed depending on the target application. +rt_sdk("sdk") { + defines = [] + + cflags = [] + public_deps = [] + public_configs = [] + sources = [] + include_dirs = [] + + # Indicate paths to default board files + include_dirs += [ "${example_platform_dir}/board/" ] + + # RT1060 rev A use same pin mux as rev B + # If user needs different pin mux files for rev A and rev B boards, the source and include from below needs to be updated accordingly + if (evkname == "evkmimxrt1060") { + include_dirs += [ "${example_platform_dir}/board/evkbmimxrt1060/" ] + sources += [ "${example_platform_dir}/board/evkbmimxrt1060/pin_mux.c" ] + } else { + include_dirs += [ "${example_platform_dir}/board/${evkname}/" ] + sources += [ "${example_platform_dir}/board/${evkname}/pin_mux.c" ] + } + sources += [ "${example_platform_dir}/board/hardware_init.c" ] + sources += [ "${example_platform_dir}/board/clock_config.c" ] + sources += [ "${example_platform_dir}/board/board.c" ] + sources += [ "${example_platform_dir}/board/peripherals.c" ] + + # Indicate the path to CHIPProjectConfig.h + include_dirs += [ "include/config" ] + + # Indicate the default path to FreeRTOSConfig.h + include_dirs += [ "${example_platform_dir}/app/project_include/freeRTOS" ] + + # Indicate the default path to OpenThreadConfig.h + include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ] + + # For matter with BR feature, increase FreeRTOS heap size + if (chip_enable_wifi && chip_enable_openthread) { + defines += [ "configTOTAL_HEAP_SIZE=(size_t)(170 * 1024)" ] + } + + defines += [ + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}", + ] +} + +# Create the SDK driver instance. +# Particular sources/defines/includes could be added to add other drivers not available in the default sdk driver template +rt1060_sdk_drivers("sdk_driver") { +} + +rt_executable("laundry-washer") { + output_name = "chip-rt1060-laundry-washer-example" + + defines = [ + "CONFIG_RENDEZVOUS_MODE=7", + "CONFIG_APP_FREERTOS_OS=1", + ] + + if (chip_enable_openthread) { + defines += [ "CONFIG_NET_L2_OPENTHREAD=1" ] + } + + include_dirs = [ + "../../common/main/include", + "../../common/main", + "${chip_root}/examples/all-clusters-app/all-clusters-common/include", + "${chip_root}/examples/providers/", + ] + + sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", + "${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp", + "../../common/main/AppTask.cpp", + "../../common/main/DeviceCallbacks.cpp", + "../../common/main/ZclCallbacks.cpp", + "../../common/main/include/AppEvent.h", + "../../common/main/include/AppTask.h", + "../../common/main/include/DeviceCallbacks.h", + "../../common/main/main.cpp", + ] + + # App common files + include_dirs += [ + "${common_example_dir}/icd/include", + "${common_example_dir}/matter_cli/include", + "${common_example_dir}/device_manager/include", + "${common_example_dir}/device_callbacks/include", + "${common_example_dir}/matter_button/include", + "${common_example_dir}/factory_data/include", + "${common_example_dir}/app_task/include", + ] + + sources += [ + "${chip_root}/examples/platform/nxp/${nxp_platform}/factory_data/source/AppFactoryDataExample.cpp", + "${common_example_dir}/app_task/source/AppTaskBase.cpp", + "${common_example_dir}/app_task/source/AppTaskFreeRTOS.cpp", + "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", + "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/icd/source/ICDUtil.cpp", + "${common_example_dir}/matter_button/source/ButtonDefault.cpp", + "${common_example_dir}/matter_button/source/ButtonManager.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationDefault.cpp", + ] + + deps = [ "${chip_root}/examples/${app_common_folder}" ] + + 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/laundry-washer-controls-delegate-impl.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/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", + "../../common/main/laundry-washer-mode.cpp", + "../../common/main/operational-state-delegate-impl.cpp", + ] + + if (chip_enable_matter_cli) { + defines += [ "ENABLE_CHIP_SHELL" ] + deps += [ + "${chip_root}/examples/shell/shell_common:shell_common", + "${chip_root}/src/lib/shell:shell", + ] + sources += [ + "${common_example_dir}/matter_cli/source/AppCLIBase.cpp", + "${common_example_dir}/matter_cli/source/AppCLIFreeRTOS.cpp", + ] + } + + if (chip_enable_ota_requestor) { + sources += [ + "${chip_root}/examples/platform/nxp/common/mcuboot_app_support/flash_partitioning.h", + "${common_example_dir}/ota_requestor/source/OTARequestorInitiator.cpp", + "${common_example_dir}/ota_requestor/source/OTARequestorInitiatorCommon.cpp", + + #Adding mcuboot files + "${chip_root}/examples/platform/nxp/common/mcuboot_app_support/mcuboot_app_support.c", + "${chip_root}/examples/platform/nxp/common/mcuboot_app_support/mcuboot_app_support.h", + ] + include_dirs += [ + "$${common_example_dir}/ota_requestor/include", + "${chip_root}/examples/platform/nxp/common/mcuboot_app_support", + ] + } + + if (wifi_auto_connect_at_boot) { + assert(wifi_auto_connect_at_boot_ssid != "" && + wifi_auto_connect_at_boot_password != "", + "WiFi SSID and password must be specified at build time!") + + defines += [ + "CONFIG_CHIP_APP_WIFI_CONNECT_AT_BOOT=1", + "CONFIG_CHIP_APP_WIFI_SSID=\"${wifi_auto_connect_at_boot_ssid}\"", + "CONFIG_CHIP_APP_WIFI_PASSWORD=\"${wifi_auto_connect_at_boot_password}\"", + ] + + include_dirs += [ "${common_example_dir}/wifi_connect/include" ] + sources += [ "${common_example_dir}/wifi_connect/source/WifiConnect.cpp" ] + } + + if (enable_ota_provider) { + defines += [ "CONFIG_CHIP_OTA_PROVIDER=1" ] + + include_dirs += [ + "${common_example_dir}/ota_provider/include", + "${common_example_dir}/ota_provider/ota-provider-common", + ] + + sources += [ + "${common_example_dir}/ota_provider/ota-provider-common/RTBdxOtaSender.cpp", + "${common_example_dir}/ota_provider/ota-provider-common/RTOTAProviderExample.cpp", + "${common_example_dir}/ota_provider/source/OTAProvider.cpp", + ] + + deps += [ + "${chip_root}/src/app/server", + "${chip_root}/src/protocols/bdx", + "${chip_root}/third_party/jsoncpp", + ] + } + + # In case a dedicated assert function needs to be supported the flag sdk_fsl_assert_support should be set to false + # The would add to the build a dedicated application assert implementation. + if (!sdk_fsl_assert_support) { + sources += [ "${common_example_dir}/app_assert/source/AppAssert.cpp" ] + } + + cflags = [ "-Wconversion" ] + + ldscript = + "${example_platform_dir}/app/ldscripts/MIMXRT1062xxxxx_flexspi_nor.ld" + + inputs = [ ldscript ] + + ldflags = [ + "-T" + rebase_path(ldscript, root_build_dir), + "-fno-common", + "-Wl,--defsym=__stack_size__=2048", + "-ffreestanding", + "-fno-builtin", + "-mapcs", + "-u qspiflash_config", + "-u image_vector_table", + "-u boot_data", + "-u dcd_data", + "-Wl,-print-memory-usage", + "-Wl,--no-warn-rwx-segments", + ] + + if (enable_ota_provider) { + # As the OTA file will be stored in the littlefs file system, it is required to increase the size of the file system + # To be able to store an OTA file with a MAX size of 640K, + # it recommended to size the file system with: + # 161 sectors of 4K => reserved for the OTA file + # 32 sectors of 4K => reserved for Matter/OT/BLE settings storage + ldflags += [ "-Wl,--defsym=gNVMSectorCountLink_d=193" ] + } + + if (chip_enable_ota_requestor) { + # If OTA build flag is enabled, + # we would need to reserve enough space for the bootloader (MCUBoot) + # MCUBoot requires 0x11000 Bytes to be reserved at the base of the flash + # Consequently, some sections will need to be shifted + ldflags += [ "-Wl,--defsym=__mcu_boot_size__=0x11000" ] + } + + output_dir = root_out_dir +} + +group("rt1060") { + deps = [ ":laundry-washer" ] +} + +group("default") { + deps = [ ":rt1060" ] +} diff --git a/examples/laundry-washer-app/nxp/rt/rt1060/README.md b/examples/laundry-washer-app/nxp/rt/rt1060/README.md new file mode 100644 index 0000000000..62d4847a4a --- /dev/null +++ b/examples/laundry-washer-app/nxp/rt/rt1060/README.md @@ -0,0 +1,5 @@ +# CHIP RT1060 Thermostat Application + +All instructions describing how to use a Matter application on NXP RT1060 can be +found in [README.md](../../../../all-clusters-app/nxp/rt/rt1060/README.md) root +readme diff --git a/examples/laundry-washer-app/nxp/rt/rt1060/args.gni b/examples/laundry-washer-app/nxp/rt/rt1060/args.gni new file mode 100644 index 0000000000..d65714c928 --- /dev/null +++ b/examples/laundry-washer-app/nxp/rt/rt1060/args.gni @@ -0,0 +1,25 @@ +# 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. + +import("//build_overrides/chip.gni") + +# SDK target definitions +nxp_sdk_target = get_label_info(":sdk", "label_no_toolchain") +nxp_sdk_driver_target = get_label_info(":sdk_driver", "label_no_toolchain") + +# ICDM +chip_enable_icd_server = true +chip_persist_subscriptions = true +chip_subscription_timeout_resumption = true +chip_enable_icd_checkin = true diff --git a/examples/laundry-washer-app/nxp/rt/rt1060/build_overrides b/examples/laundry-washer-app/nxp/rt/rt1060/build_overrides new file mode 120000 index 0000000000..f10867042f --- /dev/null +++ b/examples/laundry-washer-app/nxp/rt/rt1060/build_overrides @@ -0,0 +1 @@ +../../../../build_overrides \ No newline at end of file diff --git a/examples/laundry-washer-app/nxp/rt/rt1060/include/config/CHIPProjectConfig.h b/examples/laundry-washer-app/nxp/rt/rt1060/include/config/CHIPProjectConfig.h new file mode 100644 index 0000000000..dd73c6c9ea --- /dev/null +++ b/examples/laundry-washer-app/nxp/rt/rt1060/include/config/CHIPProjectConfig.h @@ -0,0 +1,216 @@ +/* + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020 Google LLC. + * 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 + +/* + * Tells to the platform Factory Data Provider whether to use the example configuration or real/provisioned data. + */ +#ifndef CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA +#define CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA 0 +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID + * + * 0xFFF1: Test vendor. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID + * + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8005 + +#if !CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA +// Use a default pairing code if one hasn't been provisioned in flash. +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif + +// Use a default pairing code if one hasn't been provisioned in flash. +#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" + +/** + * CHIP_DEVICE_CONFIG_USE_TEST_SERIAL_NUMBER + * + * Enables the use of a hard-coded default serial number if none + * is found in CHIP NV storage. + */ +#define CHIP_DEVICE_CONFIG_USE_TEST_SERIAL_NUMBER "DUMMY_SN" + +#endif /* !CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA */ + +/** + * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION + * + * The hardware version number assigned to device or product by the device vendor. This + * number is scoped to the device product id, and typically corresponds to a revision of the + * physical device, a change to its packaging, and/or a change to its marketing presentation. + * This value is generally *not* incremented for device software versions. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 100 + +#ifndef CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING "v0.1.0" +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING + * + * A string identifying the software version running on the device. + * CHIP currently expects the software version to be in the format + * {MAJOR_VERSION}.0d{MINOR_VERSION} + */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING NXP_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION NXP_CONFIG_DEVICE_SOFTWARE_VERSION +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME "NXP Semiconductors" +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME "NXP Demo App" +#endif + +#ifndef CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION +//-> format_version = 1 +//-> vendor_id = 0xFFF1 +//-> product_id_array = [ 0x8000, 0x8001, 0x8002, 0x8003, 0x8004, 0x8005, 0x8006, 0x8007, 0x8008, 0x8009, 0x800A, 0x800B, +// 0x800C, 0x800D, 0x800E, 0x800F, 0x8010, 0x8011, 0x8012, 0x8013, 0x8014, 0x8015, 0x8016, 0x8017, 0x8018, 0x8019, 0x801A, +// 0x801B, 0x801C, 0x801D, 0x801E, 0x801F, 0x8020, 0x8021, 0x8022, 0x8023, 0x8024, 0x8025, 0x8026, 0x8027, 0x8028, 0x8029, +// 0x802A, 0x802B, 0x802C, 0x802D, 0x802E, 0x802F, 0x8030, 0x8031, 0x8032, 0x8033, 0x8034, 0x8035, 0x8036, 0x8037, 0x8038, +// 0x8039, 0x803A, 0x803B, 0x803C, 0x803D, 0x803E, 0x803F, 0x8040, 0x8041, 0x8042, 0x8043, 0x8044, 0x8045, 0x8046, 0x8047, +// 0x8048, 0x8049, 0x804A, 0x804B, 0x804C, 0x804D, 0x804E, 0x804F, 0x8050, 0x8051, 0x8052, 0x8053, 0x8054, 0x8055, 0x8056, +// 0x8057, 0x8058, 0x8059, 0x805A, 0x805B, 0x805C, 0x805D, 0x805E, 0x805F, 0x8060, 0x8061, 0x8062, 0x8063 ] +//-> device_type_id = 0x0016 +//-> certificate_id = "ZIG20142ZB330003-24" +//-> security_level = 0 +//-> security_information = 0 +//-> version_number = 0x2694 +//-> certification_type = 0 +//-> dac_origin_vendor_id is not present +//-> dac_origin_product_id is not present +#define CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION \ + { \ + 0x30, 0x82, 0x02, 0x19, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, 0x82, 0x02, 0x0a, 0x30, \ + 0x82, 0x02, 0x06, 0x02, 0x01, 0x03, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, \ + 0x02, 0x01, 0x30, 0x82, 0x01, 0x71, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x82, \ + 0x01, 0x62, 0x04, 0x82, 0x01, 0x5e, 0x15, 0x24, 0x00, 0x01, 0x25, 0x01, 0xf1, 0xff, 0x36, 0x02, 0x05, 0x00, 0x80, \ + 0x05, 0x01, 0x80, 0x05, 0x02, 0x80, 0x05, 0x03, 0x80, 0x05, 0x04, 0x80, 0x05, 0x05, 0x80, 0x05, 0x06, 0x80, 0x05, \ + 0x07, 0x80, 0x05, 0x08, 0x80, 0x05, 0x09, 0x80, 0x05, 0x0a, 0x80, 0x05, 0x0b, 0x80, 0x05, 0x0c, 0x80, 0x05, 0x0d, \ + 0x80, 0x05, 0x0e, 0x80, 0x05, 0x0f, 0x80, 0x05, 0x10, 0x80, 0x05, 0x11, 0x80, 0x05, 0x12, 0x80, 0x05, 0x13, 0x80, \ + 0x05, 0x14, 0x80, 0x05, 0x15, 0x80, 0x05, 0x16, 0x80, 0x05, 0x17, 0x80, 0x05, 0x18, 0x80, 0x05, 0x19, 0x80, 0x05, \ + 0x1a, 0x80, 0x05, 0x1b, 0x80, 0x05, 0x1c, 0x80, 0x05, 0x1d, 0x80, 0x05, 0x1e, 0x80, 0x05, 0x1f, 0x80, 0x05, 0x20, \ + 0x80, 0x05, 0x21, 0x80, 0x05, 0x22, 0x80, 0x05, 0x23, 0x80, 0x05, 0x24, 0x80, 0x05, 0x25, 0x80, 0x05, 0x26, 0x80, \ + 0x05, 0x27, 0x80, 0x05, 0x28, 0x80, 0x05, 0x29, 0x80, 0x05, 0x2a, 0x80, 0x05, 0x2b, 0x80, 0x05, 0x2c, 0x80, 0x05, \ + 0x2d, 0x80, 0x05, 0x2e, 0x80, 0x05, 0x2f, 0x80, 0x05, 0x30, 0x80, 0x05, 0x31, 0x80, 0x05, 0x32, 0x80, 0x05, 0x33, \ + 0x80, 0x05, 0x34, 0x80, 0x05, 0x35, 0x80, 0x05, 0x36, 0x80, 0x05, 0x37, 0x80, 0x05, 0x38, 0x80, 0x05, 0x39, 0x80, \ + 0x05, 0x3a, 0x80, 0x05, 0x3b, 0x80, 0x05, 0x3c, 0x80, 0x05, 0x3d, 0x80, 0x05, 0x3e, 0x80, 0x05, 0x3f, 0x80, 0x05, \ + 0x40, 0x80, 0x05, 0x41, 0x80, 0x05, 0x42, 0x80, 0x05, 0x43, 0x80, 0x05, 0x44, 0x80, 0x05, 0x45, 0x80, 0x05, 0x46, \ + 0x80, 0x05, 0x47, 0x80, 0x05, 0x48, 0x80, 0x05, 0x49, 0x80, 0x05, 0x4a, 0x80, 0x05, 0x4b, 0x80, 0x05, 0x4c, 0x80, \ + 0x05, 0x4d, 0x80, 0x05, 0x4e, 0x80, 0x05, 0x4f, 0x80, 0x05, 0x50, 0x80, 0x05, 0x51, 0x80, 0x05, 0x52, 0x80, 0x05, \ + 0x53, 0x80, 0x05, 0x54, 0x80, 0x05, 0x55, 0x80, 0x05, 0x56, 0x80, 0x05, 0x57, 0x80, 0x05, 0x58, 0x80, 0x05, 0x59, \ + 0x80, 0x05, 0x5a, 0x80, 0x05, 0x5b, 0x80, 0x05, 0x5c, 0x80, 0x05, 0x5d, 0x80, 0x05, 0x5e, 0x80, 0x05, 0x5f, 0x80, \ + 0x05, 0x60, 0x80, 0x05, 0x61, 0x80, 0x05, 0x62, 0x80, 0x05, 0x63, 0x80, 0x18, 0x24, 0x03, 0x16, 0x2c, 0x04, 0x13, \ + 0x5a, 0x49, 0x47, 0x32, 0x30, 0x31, 0x34, 0x32, 0x5a, 0x42, 0x33, 0x33, 0x30, 0x30, 0x30, 0x33, 0x2d, 0x32, 0x34, \ + 0x24, 0x05, 0x00, 0x24, 0x06, 0x00, 0x25, 0x07, 0x94, 0x26, 0x24, 0x08, 0x00, 0x18, 0x31, 0x7d, 0x30, 0x7b, 0x02, \ + 0x01, 0x03, 0x80, 0x14, 0x62, 0xfa, 0x82, 0x33, 0x59, 0xac, 0xfa, 0xa9, 0x96, 0x3e, 0x1c, 0xfa, 0x14, 0x0a, 0xdd, \ + 0xf5, 0x04, 0xf3, 0x71, 0x60, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, \ + 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x04, 0x47, 0x30, 0x45, 0x02, 0x20, 0x24, 0xe5, \ + 0xd1, 0xf4, 0x7a, 0x7d, 0x7b, 0x0d, 0x20, 0x6a, 0x26, 0xef, 0x69, 0x9b, 0x7c, 0x97, 0x57, 0xb7, 0x2d, 0x46, 0x90, \ + 0x89, 0xde, 0x31, 0x92, 0xe6, 0x78, 0xc7, 0x45, 0xe7, 0xf6, 0x0c, 0x02, 0x21, 0x00, 0xf8, 0xaa, 0x2f, 0xa7, 0x11, \ + 0xfc, 0xb7, 0x9b, 0x97, 0xe3, 0x97, 0xce, 0xda, 0x66, 0x7b, 0xae, 0x46, 0x4e, 0x2b, 0xd3, 0xff, 0xdf, 0xc3, 0xcc, \ + 0xed, 0x7a, 0xa8, 0xca, 0x5f, 0x4c, 0x1a, 0x7c \ + } +#endif + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC + * + * Enables synchronizing the device's real time clock with a remote CHIP Time service + * using the CHIP Time Sync protocol. + */ +// #define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 1 + +/** + * CHIP_CONFIG_MAX_BINDINGS + * + * Maximum number of simultaneously active bindings per ChipExchangeManager + * 1 (Time Sync) + 2 (Two 1-way subscriptions) + 1 (Software Update) = 4 + * in the worst case. Keeping another 4 as buffer. + */ +#define CHIP_CONFIG_MAX_BINDINGS 6 + +/** + * CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD + * + * Select the ability to offload event logs to any interested subscribers using WDM. + */ +#define CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD 1 + +/** + * CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE + * + * A size, in bytes, of the individual debug event logging buffer. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) + +/** + * CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE + * + * For a development build, set the default importance of events to be logged as Debug. + * Since debug is the lowest importance level, this means all standard, critical, info and + * debug importance level vi events get logged. + */ +#if BUILD_RELEASE +#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Production +#else +#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Debug +#endif // BUILD_RELEASE + +/* Increasing the retransmission interval of the MRP messages after subsequent failures */ +#ifndef CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL +#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL (2000_ms32) +#endif diff --git a/examples/laundry-washer-app/nxp/rt/rt1060/third_party/connectedhomeip b/examples/laundry-washer-app/nxp/rt/rt1060/third_party/connectedhomeip new file mode 120000 index 0000000000..305f2077ff --- /dev/null +++ b/examples/laundry-washer-app/nxp/rt/rt1060/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../../.. \ No newline at end of file diff --git a/examples/laundry-washer-app/nxp/rt/rt1170/.gn b/examples/laundry-washer-app/nxp/rt/rt1170/.gn new file mode 100644 index 0000000000..59dcfeb229 --- /dev/null +++ b/examples/laundry-washer-app/nxp/rt/rt1170/.gn @@ -0,0 +1,35 @@ +# 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/build.gni") +import("//build_overrides/chip.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 = { + target_cpu = "arm" + target_os = "freertos" + + import("//args.gni") + + # Import common example GN args + import("${chip_root}/examples/platform/nxp/common/gn/args.gni") + + # Import default platform configs + import("${chip_root}/src/platform/nxp/rt/rt1170/args.gni") +} diff --git a/examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn b/examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn new file mode 100644 index 0000000000..96b035e862 --- /dev/null +++ b/examples/laundry-washer-app/nxp/rt/rt1170/BUILD.gn @@ -0,0 +1,246 @@ +# Copyright (c) 2021-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. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/nxp_sdk.gni") +import("//build_overrides/openthread.gni") +import("${chip_root}/src/platform/device.gni") + +#allows to get common NXP SDK gn options +import("${nxp_sdk_build_root}/nxp_sdk.gni") + +# Allows to get various RT gn options +import("${nxp_sdk_build_root}/${nxp_sdk_name}/rt_sdk.gni") + +import("${chip_root}/src/platform/nxp/${nxp_platform}/args.gni") +import( + "${nxp_sdk_build_root}/${nxp_sdk_name}/${rt_platform}/${rt_platform}.gni") +import("${nxp_sdk_build_root}/${nxp_sdk_name}/nxp_executable.gni") + +assert(current_os == "freertos") +assert(target_os == "freertos") +assert(nxp_platform == "rt/rt1170") + +declare_args() { + # Allows to connect to a predefine Wi-Fi network at boot + wifi_auto_connect_at_boot = false + wifi_auto_connect_at_boot_ssid = "" + wifi_auto_connect_at_boot_password = "" + + # Setup discriminator as argument + setup_discriminator = 3840 +} + +example_platform_dir = + "${nxp_sdk_matter_support_root}/examples/platform/${nxp_platform}" +common_example_dir = "${chip_root}/examples/platform/nxp/common" + +# Use NXP custom zap files for laundry-washer device-type +app_common_folder = "laundry-washer-app/nxp/zap" + +# Create here the SDK instance. +# Particular sources/defines/includes could be added/changed depending on the target application. +rt_sdk("sdk") { + defines = [] + + cflags = [] + public_deps = [] + public_configs = [] + sources = [] + include_dirs = [] + + # Indicate paths to default board files + include_dirs += [ "${example_platform_dir}/board/" ] + sources += [ "${example_platform_dir}/board/pin_mux.c" ] + sources += [ "${example_platform_dir}/board/hardware_init.c" ] + sources += [ "${example_platform_dir}/board/clock_config.c" ] + sources += [ "${example_platform_dir}/board/board.c" ] + sources += [ "${example_platform_dir}/board/peripherals.c" ] + sources += [ "${example_platform_dir}/board/sdmmc_config.c" ] + + # Indicate the path to CHIPProjectConfig.h + include_dirs += [ "include/config" ] + + # Indicate the default path to FreeRTOSConfig.h + include_dirs += [ "${example_platform_dir}/app/project_include/freeRTOS" ] + + # Indicate the default path to OpenThreadConfig.h + include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ] + + # For matter with BR feature, increase FreeRTOS heap size + if (chip_enable_wifi && chip_enable_openthread) { + defines += [ "configTOTAL_HEAP_SIZE=(size_t)(170 * 1024)" ] + } + + defines += [ + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}", + ] +} + +# Create the SDK driver instance. +# Particular sources/defines/includes could be added to add other drivers not available in the default sdk driver template +rt1170_sdk_drivers("sdk_driver") { +} + +rt_executable("laundry-washer-app") { + output_name = "chip-rt1170-laundry-washer-example" + + defines = [ + "CONFIG_RENDEZVOUS_MODE=7", + "CONFIG_APP_FREERTOS_OS=1", + ] + + if (chip_enable_openthread) { + defines += [ "CONFIG_NET_L2_OPENTHREAD=1" ] + } + + include_dirs = [ + "../../common/main/include", + "../../common/main", + "${chip_root}/examples/all-clusters-app/all-clusters-common/include", + "${chip_root}/examples/providers/", + ] + + sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", + "${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp", + "../../common/main/AppTask.cpp", + "../../common/main/DeviceCallbacks.cpp", + "../../common/main/ZclCallbacks.cpp", + "../../common/main/include/AppEvent.h", + "../../common/main/include/AppTask.h", + "../../common/main/include/DeviceCallbacks.h", + "../../common/main/main.cpp", + ] + + # App common files + include_dirs += [ + "${common_example_dir}/icd/include", + "${common_example_dir}/matter_button/include", + "${common_example_dir}/matter_cli/include", + "${common_example_dir}/device_manager/include", + "${common_example_dir}/device_callbacks/include", + "${common_example_dir}/factory_data/include", + "${common_example_dir}/app_task/include", + ] + + sources += [ + "${common_example_dir}/app_task/source/AppTaskBase.cpp", + "${common_example_dir}/app_task/source/AppTaskFreeRTOS.cpp", + "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", + "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/factory_data/source/AppFactoryDataDefaultImpl.cpp", + "${common_example_dir}/icd/source/ICDUtil.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationEmpty.cpp", + ] + + deps = [ "${chip_root}/examples/${app_common_folder}" ] + + 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/laundry-washer-controls-delegate-impl.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/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", + "../../common/main/laundry-washer-mode.cpp", + "../../common/main/operational-state-delegate-impl.cpp", + ] + + if (chip_enable_matter_cli) { + defines += [ "ENABLE_CHIP_SHELL" ] + deps += [ + "${chip_root}/examples/shell/shell_common:shell_common", + "${chip_root}/src/lib/shell:shell", + ] + sources += [ + "${common_example_dir}/matter_cli/source/AppCLIBase.cpp", + "${common_example_dir}/matter_cli/source/AppCLIFreeRTOS.cpp", + ] + } + + if (chip_enable_ota_requestor) { + include_dirs += [ "${common_example_dir}/ota_requestor/include" ] + sources += [ + "${common_example_dir}/ota_requestor/source/OTARequestorInitiator.cpp", + "${common_example_dir}/ota_requestor/source/OTARequestorInitiatorCommon.cpp", + ] + } + + if (wifi_auto_connect_at_boot) { + assert(wifi_auto_connect_at_boot_ssid != "" && + wifi_auto_connect_at_boot_password != "", + "WiFi SSID and password must be specified at build time!") + + defines += [ + "CONFIG_CHIP_APP_WIFI_CONNECT_AT_BOOT=1", + "CONFIG_CHIP_APP_WIFI_SSID=\"${wifi_auto_connect_at_boot_ssid}\"", + "CONFIG_CHIP_APP_WIFI_PASSWORD=\"${wifi_auto_connect_at_boot_password}\"", + ] + + include_dirs += [ "${common_example_dir}/wifi_connect/include" ] + sources += [ "${common_example_dir}/wifi_connect/source/WifiConnect.cpp" ] + } + + # In case a dedicated assert function needs to be supported the flag sdk_fsl_assert_support should be set to false + # The would add to the build a dedicated application assert implementation. + if (!sdk_fsl_assert_support) { + sources += [ "${common_example_dir}/app_assert/source/AppAssert.cpp" ] + } + + cflags = [ "-Wconversion" ] + + ldscript = + "${example_platform_dir}/app/ldscripts/MIMXRT1176xxxxx_cm7_flexspi_nor.ld" + + inputs = [ ldscript ] + + ldflags = [ + "-T" + rebase_path(ldscript, root_build_dir), + "-fno-common", + "-Wl,--defsym=__stack_size__=2048", + "-ffreestanding", + "-fno-builtin", + "-mapcs", + "-u qspiflash_config", + "-u image_vector_table", + "-u boot_data", + "-u dcd_data", + "-Wl,-print-memory-usage", + "-Wl,--no-warn-rwx-segments", + ] + + if (chip_enable_ota_requestor) { + if (no_mcuboot) { + # If "no_mcuboot" is set to true, the application will be linked at the base of the flash. + print( + "Warning : The OTA Requestor is enabled without MCUBoot. This will prevent the application from applying software updates.") + } else { + # we need to reserve enough space for the bootloader (MCUBoot) + # MCUBoot requires 0x40000 Bytes to be reserved at the base of the flash + # Consequently, some sections will need to be shifted + ldflags += [ "-Wl,--defsym=__m_mcuboot_size__=0x40000" ] + } + } + + output_dir = root_out_dir +} + +group("rt1170") { + deps = [ ":laundry-washer-app" ] +} + +group("default") { + deps = [ ":rt1170" ] +} diff --git a/examples/laundry-washer-app/nxp/rt/rt1170/README.md b/examples/laundry-washer-app/nxp/rt/rt1170/README.md new file mode 100644 index 0000000000..97101758c8 --- /dev/null +++ b/examples/laundry-washer-app/nxp/rt/rt1170/README.md @@ -0,0 +1,5 @@ +# CHIP RT1170 Thermostat Application + +All instructions describing how to use a Matter application on NXP RT11170 can +be found in [README.md](../../../../all-clusters-app/nxp/rt/rt1170/README.md) +root readme diff --git a/examples/laundry-washer-app/nxp/rt/rt1170/args.gni b/examples/laundry-washer-app/nxp/rt/rt1170/args.gni new file mode 100644 index 0000000000..d65714c928 --- /dev/null +++ b/examples/laundry-washer-app/nxp/rt/rt1170/args.gni @@ -0,0 +1,25 @@ +# 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. + +import("//build_overrides/chip.gni") + +# SDK target definitions +nxp_sdk_target = get_label_info(":sdk", "label_no_toolchain") +nxp_sdk_driver_target = get_label_info(":sdk_driver", "label_no_toolchain") + +# ICDM +chip_enable_icd_server = true +chip_persist_subscriptions = true +chip_subscription_timeout_resumption = true +chip_enable_icd_checkin = true diff --git a/examples/laundry-washer-app/nxp/rt/rt1170/build_overrides b/examples/laundry-washer-app/nxp/rt/rt1170/build_overrides new file mode 120000 index 0000000000..f10867042f --- /dev/null +++ b/examples/laundry-washer-app/nxp/rt/rt1170/build_overrides @@ -0,0 +1 @@ +../../../../build_overrides \ No newline at end of file diff --git a/examples/laundry-washer-app/nxp/rt/rt1170/include/config/CHIPProjectConfig.h b/examples/laundry-washer-app/nxp/rt/rt1170/include/config/CHIPProjectConfig.h new file mode 100644 index 0000000000..dd73c6c9ea --- /dev/null +++ b/examples/laundry-washer-app/nxp/rt/rt1170/include/config/CHIPProjectConfig.h @@ -0,0 +1,216 @@ +/* + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020 Google LLC. + * 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 + +/* + * Tells to the platform Factory Data Provider whether to use the example configuration or real/provisioned data. + */ +#ifndef CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA +#define CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA 0 +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID + * + * 0xFFF1: Test vendor. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID + * + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8005 + +#if !CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA +// Use a default pairing code if one hasn't been provisioned in flash. +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif + +// Use a default pairing code if one hasn't been provisioned in flash. +#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" + +/** + * CHIP_DEVICE_CONFIG_USE_TEST_SERIAL_NUMBER + * + * Enables the use of a hard-coded default serial number if none + * is found in CHIP NV storage. + */ +#define CHIP_DEVICE_CONFIG_USE_TEST_SERIAL_NUMBER "DUMMY_SN" + +#endif /* !CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA */ + +/** + * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION + * + * The hardware version number assigned to device or product by the device vendor. This + * number is scoped to the device product id, and typically corresponds to a revision of the + * physical device, a change to its packaging, and/or a change to its marketing presentation. + * This value is generally *not* incremented for device software versions. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 100 + +#ifndef CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING "v0.1.0" +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING + * + * A string identifying the software version running on the device. + * CHIP currently expects the software version to be in the format + * {MAJOR_VERSION}.0d{MINOR_VERSION} + */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING NXP_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION NXP_CONFIG_DEVICE_SOFTWARE_VERSION +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME "NXP Semiconductors" +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME "NXP Demo App" +#endif + +#ifndef CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION +//-> format_version = 1 +//-> vendor_id = 0xFFF1 +//-> product_id_array = [ 0x8000, 0x8001, 0x8002, 0x8003, 0x8004, 0x8005, 0x8006, 0x8007, 0x8008, 0x8009, 0x800A, 0x800B, +// 0x800C, 0x800D, 0x800E, 0x800F, 0x8010, 0x8011, 0x8012, 0x8013, 0x8014, 0x8015, 0x8016, 0x8017, 0x8018, 0x8019, 0x801A, +// 0x801B, 0x801C, 0x801D, 0x801E, 0x801F, 0x8020, 0x8021, 0x8022, 0x8023, 0x8024, 0x8025, 0x8026, 0x8027, 0x8028, 0x8029, +// 0x802A, 0x802B, 0x802C, 0x802D, 0x802E, 0x802F, 0x8030, 0x8031, 0x8032, 0x8033, 0x8034, 0x8035, 0x8036, 0x8037, 0x8038, +// 0x8039, 0x803A, 0x803B, 0x803C, 0x803D, 0x803E, 0x803F, 0x8040, 0x8041, 0x8042, 0x8043, 0x8044, 0x8045, 0x8046, 0x8047, +// 0x8048, 0x8049, 0x804A, 0x804B, 0x804C, 0x804D, 0x804E, 0x804F, 0x8050, 0x8051, 0x8052, 0x8053, 0x8054, 0x8055, 0x8056, +// 0x8057, 0x8058, 0x8059, 0x805A, 0x805B, 0x805C, 0x805D, 0x805E, 0x805F, 0x8060, 0x8061, 0x8062, 0x8063 ] +//-> device_type_id = 0x0016 +//-> certificate_id = "ZIG20142ZB330003-24" +//-> security_level = 0 +//-> security_information = 0 +//-> version_number = 0x2694 +//-> certification_type = 0 +//-> dac_origin_vendor_id is not present +//-> dac_origin_product_id is not present +#define CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION \ + { \ + 0x30, 0x82, 0x02, 0x19, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, 0x82, 0x02, 0x0a, 0x30, \ + 0x82, 0x02, 0x06, 0x02, 0x01, 0x03, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, \ + 0x02, 0x01, 0x30, 0x82, 0x01, 0x71, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x82, \ + 0x01, 0x62, 0x04, 0x82, 0x01, 0x5e, 0x15, 0x24, 0x00, 0x01, 0x25, 0x01, 0xf1, 0xff, 0x36, 0x02, 0x05, 0x00, 0x80, \ + 0x05, 0x01, 0x80, 0x05, 0x02, 0x80, 0x05, 0x03, 0x80, 0x05, 0x04, 0x80, 0x05, 0x05, 0x80, 0x05, 0x06, 0x80, 0x05, \ + 0x07, 0x80, 0x05, 0x08, 0x80, 0x05, 0x09, 0x80, 0x05, 0x0a, 0x80, 0x05, 0x0b, 0x80, 0x05, 0x0c, 0x80, 0x05, 0x0d, \ + 0x80, 0x05, 0x0e, 0x80, 0x05, 0x0f, 0x80, 0x05, 0x10, 0x80, 0x05, 0x11, 0x80, 0x05, 0x12, 0x80, 0x05, 0x13, 0x80, \ + 0x05, 0x14, 0x80, 0x05, 0x15, 0x80, 0x05, 0x16, 0x80, 0x05, 0x17, 0x80, 0x05, 0x18, 0x80, 0x05, 0x19, 0x80, 0x05, \ + 0x1a, 0x80, 0x05, 0x1b, 0x80, 0x05, 0x1c, 0x80, 0x05, 0x1d, 0x80, 0x05, 0x1e, 0x80, 0x05, 0x1f, 0x80, 0x05, 0x20, \ + 0x80, 0x05, 0x21, 0x80, 0x05, 0x22, 0x80, 0x05, 0x23, 0x80, 0x05, 0x24, 0x80, 0x05, 0x25, 0x80, 0x05, 0x26, 0x80, \ + 0x05, 0x27, 0x80, 0x05, 0x28, 0x80, 0x05, 0x29, 0x80, 0x05, 0x2a, 0x80, 0x05, 0x2b, 0x80, 0x05, 0x2c, 0x80, 0x05, \ + 0x2d, 0x80, 0x05, 0x2e, 0x80, 0x05, 0x2f, 0x80, 0x05, 0x30, 0x80, 0x05, 0x31, 0x80, 0x05, 0x32, 0x80, 0x05, 0x33, \ + 0x80, 0x05, 0x34, 0x80, 0x05, 0x35, 0x80, 0x05, 0x36, 0x80, 0x05, 0x37, 0x80, 0x05, 0x38, 0x80, 0x05, 0x39, 0x80, \ + 0x05, 0x3a, 0x80, 0x05, 0x3b, 0x80, 0x05, 0x3c, 0x80, 0x05, 0x3d, 0x80, 0x05, 0x3e, 0x80, 0x05, 0x3f, 0x80, 0x05, \ + 0x40, 0x80, 0x05, 0x41, 0x80, 0x05, 0x42, 0x80, 0x05, 0x43, 0x80, 0x05, 0x44, 0x80, 0x05, 0x45, 0x80, 0x05, 0x46, \ + 0x80, 0x05, 0x47, 0x80, 0x05, 0x48, 0x80, 0x05, 0x49, 0x80, 0x05, 0x4a, 0x80, 0x05, 0x4b, 0x80, 0x05, 0x4c, 0x80, \ + 0x05, 0x4d, 0x80, 0x05, 0x4e, 0x80, 0x05, 0x4f, 0x80, 0x05, 0x50, 0x80, 0x05, 0x51, 0x80, 0x05, 0x52, 0x80, 0x05, \ + 0x53, 0x80, 0x05, 0x54, 0x80, 0x05, 0x55, 0x80, 0x05, 0x56, 0x80, 0x05, 0x57, 0x80, 0x05, 0x58, 0x80, 0x05, 0x59, \ + 0x80, 0x05, 0x5a, 0x80, 0x05, 0x5b, 0x80, 0x05, 0x5c, 0x80, 0x05, 0x5d, 0x80, 0x05, 0x5e, 0x80, 0x05, 0x5f, 0x80, \ + 0x05, 0x60, 0x80, 0x05, 0x61, 0x80, 0x05, 0x62, 0x80, 0x05, 0x63, 0x80, 0x18, 0x24, 0x03, 0x16, 0x2c, 0x04, 0x13, \ + 0x5a, 0x49, 0x47, 0x32, 0x30, 0x31, 0x34, 0x32, 0x5a, 0x42, 0x33, 0x33, 0x30, 0x30, 0x30, 0x33, 0x2d, 0x32, 0x34, \ + 0x24, 0x05, 0x00, 0x24, 0x06, 0x00, 0x25, 0x07, 0x94, 0x26, 0x24, 0x08, 0x00, 0x18, 0x31, 0x7d, 0x30, 0x7b, 0x02, \ + 0x01, 0x03, 0x80, 0x14, 0x62, 0xfa, 0x82, 0x33, 0x59, 0xac, 0xfa, 0xa9, 0x96, 0x3e, 0x1c, 0xfa, 0x14, 0x0a, 0xdd, \ + 0xf5, 0x04, 0xf3, 0x71, 0x60, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, \ + 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x04, 0x47, 0x30, 0x45, 0x02, 0x20, 0x24, 0xe5, \ + 0xd1, 0xf4, 0x7a, 0x7d, 0x7b, 0x0d, 0x20, 0x6a, 0x26, 0xef, 0x69, 0x9b, 0x7c, 0x97, 0x57, 0xb7, 0x2d, 0x46, 0x90, \ + 0x89, 0xde, 0x31, 0x92, 0xe6, 0x78, 0xc7, 0x45, 0xe7, 0xf6, 0x0c, 0x02, 0x21, 0x00, 0xf8, 0xaa, 0x2f, 0xa7, 0x11, \ + 0xfc, 0xb7, 0x9b, 0x97, 0xe3, 0x97, 0xce, 0xda, 0x66, 0x7b, 0xae, 0x46, 0x4e, 0x2b, 0xd3, 0xff, 0xdf, 0xc3, 0xcc, \ + 0xed, 0x7a, 0xa8, 0xca, 0x5f, 0x4c, 0x1a, 0x7c \ + } +#endif + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC + * + * Enables synchronizing the device's real time clock with a remote CHIP Time service + * using the CHIP Time Sync protocol. + */ +// #define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 1 + +/** + * CHIP_CONFIG_MAX_BINDINGS + * + * Maximum number of simultaneously active bindings per ChipExchangeManager + * 1 (Time Sync) + 2 (Two 1-way subscriptions) + 1 (Software Update) = 4 + * in the worst case. Keeping another 4 as buffer. + */ +#define CHIP_CONFIG_MAX_BINDINGS 6 + +/** + * CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD + * + * Select the ability to offload event logs to any interested subscribers using WDM. + */ +#define CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD 1 + +/** + * CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE + * + * A size, in bytes, of the individual debug event logging buffer. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) + +/** + * CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE + * + * For a development build, set the default importance of events to be logged as Debug. + * Since debug is the lowest importance level, this means all standard, critical, info and + * debug importance level vi events get logged. + */ +#if BUILD_RELEASE +#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Production +#else +#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Debug +#endif // BUILD_RELEASE + +/* Increasing the retransmission interval of the MRP messages after subsequent failures */ +#ifndef CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL +#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL (2000_ms32) +#endif diff --git a/examples/laundry-washer-app/nxp/rt/rt1170/third_party/connectedhomeip b/examples/laundry-washer-app/nxp/rt/rt1170/third_party/connectedhomeip new file mode 120000 index 0000000000..305f2077ff --- /dev/null +++ b/examples/laundry-washer-app/nxp/rt/rt1170/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../../.. \ No newline at end of file diff --git a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter index 8f30d53f6e..28a2f46d28 100644 --- a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter +++ b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter @@ -1194,6 +1194,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2207,7 +2208,6 @@ endpoint 0 { callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; @@ -2223,7 +2223,6 @@ endpoint 0 { ram attribute updateStateProgress default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2234,7 +2233,6 @@ endpoint 0 { server cluster UnitLocalization { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2268,7 +2266,6 @@ endpoint 0 { ram attribute lastConnectErrorValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -2294,7 +2291,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2313,7 +2309,6 @@ endpoint 0 { callback attribute currentMaxRate; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2379,7 +2374,6 @@ endpoint 1 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2392,7 +2386,6 @@ endpoint 1 { 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; @@ -2417,7 +2410,6 @@ endpoint 1 { persist attribute startUpOnOff default = 0xFF; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 5; @@ -2437,7 +2429,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2447,7 +2438,6 @@ endpoint 1 { callback attribute binding; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2461,7 +2451,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 2; @@ -2471,7 +2460,6 @@ endpoint 1 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2481,7 +2469,6 @@ endpoint 1 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2496,7 +2483,6 @@ endpoint 1 { ram attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2511,7 +2497,6 @@ endpoint 1 { callback attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -2527,7 +2512,6 @@ endpoint 1 { callback attribute supportedRinses; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 1; @@ -2538,7 +2522,6 @@ endpoint 1 { callback attribute supportedTemperatureLevels; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -2557,7 +2540,6 @@ endpoint 1 { callback attribute operationalError; 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/light-switch-app/asr/README.md b/examples/light-switch-app/asr/README.md index ed3b65b82f..5d2f575a2b 100755 --- a/examples/light-switch-app/asr/README.md +++ b/examples/light-switch-app/asr/README.md @@ -13,7 +13,7 @@ This example demonstrates the Matter Light Switch application on ASR platform. ## Building and Commissioning Please refer -[Building and Commissioning](../../../docs/guides/asr_getting_started_guide.md#building-the-example-application) +[Building and Commissioning](../../../docs/platforms/asr/asr_getting_started_guide.md#building-the-example-application) guides to get started ``` diff --git a/examples/light-switch-app/esp32/README.md b/examples/light-switch-app/esp32/README.md index 43a9d9536b..023f9bb227 100644 --- a/examples/light-switch-app/esp32/README.md +++ b/examples/light-switch-app/esp32/README.md @@ -3,9 +3,9 @@ This example demonstrates the Matter Light-switch application on ESP platforms. Please -[setup ESP-IDF and CHIP Environment](../../../docs/guides/esp32/setup_idf_chip.md) +[setup ESP-IDF and CHIP Environment](../../../docs/platforms/esp32/setup_idf_chip.md) and refer -[building and commissioning](../../../docs/guides/esp32/build_app_and_commission.md) +[building and commissioning](../../../docs/platforms/esp32/build_app_and_commission.md) guides to get started. --- diff --git a/examples/light-switch-app/genio/README.md b/examples/light-switch-app/genio/README.md index 7961597d4d..1a9531803f 100644 --- a/examples/light-switch-app/genio/README.md +++ b/examples/light-switch-app/genio/README.md @@ -88,7 +88,7 @@ MediaTek platform. Chip tool standalone, Android or iOS app [CHIP - Tool]](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/chip_tool_guide.md) + Tool]](https://github.com/project-chip/connectedhomeip/blob/master/docs/development_controllers/chip-tool/chip_tool_guide.md) - First of all, you have to commission with the light-switch-app (nodeID 1) and the lighting-app (nodeID 2) with the CHIP tool by following commands. diff --git a/examples/light-switch-app/genio/src/main.cpp b/examples/light-switch-app/genio/src/main.cpp index d545409c70..564233716d 100644 --- a/examples/light-switch-app/genio/src/main.cpp +++ b/examples/light-switch-app/genio/src/main.cpp @@ -251,7 +251,7 @@ void vStartTask(void * pvParameters) * Main Function ****************************************************************************/ -extern "C" int main(void) +int main(void) { mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree); diff --git a/examples/light-switch-app/infineon/cyw30739/README.md b/examples/light-switch-app/infineon/cyw30739/README.md index 0343563087..cec7a2b3ad 100644 --- a/examples/light-switch-app/infineon/cyw30739/README.md +++ b/examples/light-switch-app/infineon/cyw30739/README.md @@ -212,7 +212,7 @@ Put the CYW30739 in to the recovery mode before running the flash script. - It is assumed here that you already have an OpenThread border router configured and running. If not see the following guide - [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) + [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/platforms/openthread/openthread_border_router_pi.md) for more information on how to setup a border router on a raspberryPi. - For this example to work, it is necessary to have a second CYW30739 device diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 947a24740f..07910e283f 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -959,6 +959,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3222,7 +3223,7 @@ endpoint 2 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 2; + ram attribute featureMap default = 6; ram attribute clusterRevision default = 2; } } diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index 89f718140f..595b0d8f83 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -5587,7 +5587,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/light-switch-app/nrfconnect/README.md b/examples/light-switch-app/nrfconnect/README.md index 943759735f..02f7b500aa 100644 --- a/examples/light-switch-app/nrfconnect/README.md +++ b/examples/light-switch-app/nrfconnect/README.md @@ -48,7 +48,7 @@ This example is running on the nRF Connect platform, which is based on Nordic Semiconductor's [nRF Connect SDK](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/index.html) and [Zephyr RTOS](https://zephyrproject.org/). Visit Matter's -[nRF Connect platform overview](../../../docs/guides/nrfconnect_platform_overview.md) +[nRF Connect platform overview](../../../docs/platforms/nrf/nrfconnect_platform_overview.md) to read more about the platform structure and dependencies. By default, the Matter accessory device has IPv6 networking disabled. You must @@ -236,9 +236,10 @@ development kits: - [Lighting Example Application](../../lighting-app/nrfconnect/README.md) -Read the [CHIP Tool user guide](../../../docs/guides/chip_tool_guide.md) to -learn how to commission the lighting device to the same Matter network using the -CHIP Tool. +Read the +[CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md) +to learn how to commission the lighting device to the same Matter network using +the CHIP Tool.
@@ -342,7 +343,7 @@ platform image. **SEGGER J-Link USB port** can be used to get logs from the device or communicate with it using the -[command line interface](../../../docs/guides/nrfconnect_examples_cli.md). +[command line interface](../../../docs/platforms/nrf/nrfconnect_examples_cli.md). **NFC port with antenna attached** can be used to start the [rendezvous](#bluetooth-le-rendezvous) by providing the commissioning @@ -375,7 +376,8 @@ the Light Switch Example application by using the Matter CLI: uart:~$ switch groups onoff off : sends multicast Off command to all bound devices in a group uart:~$ switch groups onoff toggle : sends multicast Toggle command to all bound devices in a group -Check the [CLI user guide](../../../docs/guides/nrfconnect_examples_cli.md) to +Check the +[CLI user guide](../../../docs/platforms/nrf/nrfconnect_examples_cli.md) to learn how to use other CLI commands of the application.
@@ -570,7 +572,7 @@ depending on the selected board: the necessary application functionalities to optimize its performance. For more information, see the -[Configuring nRF Connect SDK examples](../../../docs/guides/nrfconnect_examples_configuration.md) +[Configuring nRF Connect SDK examples](../../../docs/platforms/nrf/nrfconnect_examples_configuration.md) page.
@@ -602,7 +604,8 @@ process, and add Access Control Lists (ACLs). ### Commissioning the lighting device To commission the Lighting Example Application to the same Matter network, read -the [CHIP Tool user guide](../../../docs/guides/chip_tool_guide.md). +the +[CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md). ### Binding cluster and endpoints @@ -617,7 +620,7 @@ example, you can use the The ACL should contain information about all clusters that can be called by the light switch application. See the section about interacting with ZCL clusters in the -[CHIP Tool's user guide](../../../docs/guides/chip_tool_guide.md#interacting-with-data-model-clusters) +[CHIP Tool's user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md#interacting-with-data-model-clusters) for more information about ACLs. You can perform the binding process to a single remote endpoint (unicast @@ -635,7 +638,7 @@ same Matter network. To perform the unicast binding process, complete the following steps: 1. Build the CHIP Tool according to the steps from the - [CHIP Tool user guide](../../../docs/guides/chip_tool_guide.md#building-and-running-the-chip-tool). + [CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md#building-from-source). 2. Go to the CHIP Tool build directory. 3. Add an ACL to the development kit that is programmed with the [Lighting Application Example](../../lighting-app/nrfconnect/README.md) by @@ -687,7 +690,7 @@ same Matter network. To perform the unicast binding process, complete the following steps: 1. Build the CHIP Tool according to the steps from the - [CHIP Tool user guide](../../../docs/guides/chip_tool_guide.md#building-and-running-the-chip-tool). + [CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md#building-from-source). 2. Go to the CHIP Tool build directory. 3. Add the light switch device to the multicast group by running the following @@ -734,5 +737,5 @@ switch subscribe-event short-release 1 20 2 --is-urgent true --keepSub ### Testing Device Firmware Upgrade Read the -[DFU tutorial](../../../docs/guides/nrfconnect_examples_software_update.md) to -see how to upgrade your device firmware. +[DFU tutorial](../../../docs/platforms/nrf/nrfconnect_examples_software_update.md) +to see how to upgrade your device firmware. diff --git a/examples/light-switch-app/qpg/zap/switch.matter b/examples/light-switch-app/qpg/zap/switch.matter index 0cbae08b34..03e0f51ad0 100644 --- a/examples/light-switch-app/qpg/zap/switch.matter +++ b/examples/light-switch-app/qpg/zap/switch.matter @@ -1343,6 +1343,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2897,7 +2898,6 @@ endpoint 0 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2913,7 +2913,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision; @@ -2946,7 +2945,6 @@ endpoint 0 { callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -2962,7 +2960,6 @@ endpoint 0 { ram attribute updateStateProgress default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2985,7 +2982,6 @@ endpoint 0 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 10; ram attribute clusterRevision default = 1; @@ -2999,7 +2995,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -3025,7 +3020,6 @@ endpoint 0 { callback attribute threadVersion; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -3043,7 +3037,6 @@ endpoint 0 { server cluster DiagnosticLogs { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -3084,7 +3077,6 @@ endpoint 0 { callback attribute currentHeapHighWatermark; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -3155,7 +3147,6 @@ endpoint 0 { callback attribute activeNetworkFaultsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x000F; ram attribute clusterRevision default = 2; @@ -3169,7 +3160,6 @@ endpoint 0 { callback attribute adminVendorId; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -3188,7 +3178,6 @@ endpoint 0 { callback attribute currentFabricIndex; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -3214,7 +3203,6 @@ endpoint 0 { callback attribute maxGroupKeysPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -3231,7 +3219,6 @@ endpoint 0 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -3241,7 +3228,6 @@ endpoint 0 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -3259,7 +3245,6 @@ endpoint 0 { ram attribute operatingMode default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0007; ram attribute clusterRevision default = 3; @@ -3285,7 +3270,6 @@ endpoint 1 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -3321,7 +3305,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -3331,7 +3314,6 @@ endpoint 1 { callback attribute binding; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -3346,7 +3328,6 @@ endpoint 2 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -3362,7 +3343,6 @@ endpoint 2 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -3380,7 +3360,6 @@ endpoint 2 { ram attribute multiPressMax default = 2; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 30; ram attribute clusterRevision default = 2; diff --git a/examples/light-switch-app/silabs/README.md b/examples/light-switch-app/silabs/README.md index fe39610cbf..898f8e8f29 100644 --- a/examples/light-switch-app/silabs/README.md +++ b/examples/light-switch-app/silabs/README.md @@ -210,7 +210,7 @@ combination with JLinkRTTClient as follows: - It is assumed here that you already have an OpenThread border router configured and running. If not see the following guide - [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) + [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/platforms/openthread/openthread_border_router_pi.md) for more information on how to setup a border router on a raspberryPi. Take note that the RCP code is available directly through @@ -393,7 +393,7 @@ tracking code inside the `trackAlloc` and `trackFree` function For the description of Software Update process with EFR32 example applications see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) +[EFR32 OTA Software Update](../../../docs/platforms/silabs/silabs_efr32_software_update.md) ## Building options diff --git a/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter b/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter index c5ee2bb6d3..d103ddc553 100644 --- a/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter +++ b/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter @@ -1013,6 +1013,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3019,7 +3020,7 @@ endpoint 1 { } server cluster LevelControl { - persist attribute currentLevel default = 0x01; + persist attribute currentLevel default = 0xFE; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; diff --git a/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.zap b/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.zap index 8d55481e31..54693b1515 100644 --- a/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.zap +++ b/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.zap @@ -4484,7 +4484,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app-data-mode-no-unique-id/linux/README.md b/examples/lighting-app-data-mode-no-unique-id/linux/README.md index 3262e3446a..0fc9ebccff 100644 --- a/examples/lighting-app-data-mode-no-unique-id/linux/README.md +++ b/examples/lighting-app-data-mode-no-unique-id/linux/README.md @@ -12,17 +12,21 @@ Raspberry Pi Desktop 20.10 (aarch64)** To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini** **EVK**, see the associated -[README document](../../../docs/guides/nxp/nxp_imx8m_linux_examples.md) for +[README document](../../../docs/platforms/nxp/nxp_imx8m_linux_examples.md) for details.
-- [CHIP Linux Lighting Example](#chip-linux-lighting-example-data-mode-no-unique-id) +- [CHIP Linux Lighting Example (Data Mode, No Unique ID)](#chip-linux-lighting-example-data-mode-no-unique-id) - [Building](#building) - - [Commandline Arguments](#commandline-arguments) + - [Commandline arguments](#commandline-arguments) - [Running the Complete Example on Raspberry Pi 4](#running-the-complete-example-on-raspberry-pi-4) - - [Running RPC console](#running-rpc-console) + - [Running RPC Console](#running-rpc-console) - [Device Tracing](#device-tracing) + - [Trigger event using lighting-app event named pipe](#trigger-event-using-lighting-app-event-named-pipe) + - [Trigger `SoftwareFault` events](#trigger-softwarefault-events) + - [Trigger `HardwareFault` events](#trigger-hardwarefault-events) + - [Trigger Switch events](#trigger-switch-events)
diff --git a/examples/lighting-app-data-mode-no-unique-id/linux/main.cpp b/examples/lighting-app-data-mode-no-unique-id/linux/main.cpp index 8e586b5cf5..56cafc2e52 100644 --- a/examples/lighting-app-data-mode-no-unique-id/linux/main.cpp +++ b/examples/lighting-app-data-mode-no-unique-id/linux/main.cpp @@ -95,7 +95,7 @@ void ApplicationShutdown() } } -extern "C" int main(int argc, char * argv[]) +int main(int argc, char * argv[]) { if (ChipLinuxAppInit(argc, argv) != 0) { diff --git a/examples/lighting-app/asr/README.md b/examples/lighting-app/asr/README.md index 234154ce8b..ade620e0fc 100755 --- a/examples/lighting-app/asr/README.md +++ b/examples/lighting-app/asr/README.md @@ -14,7 +14,7 @@ This example demonstrates the Matter Lighting application on ASR platform. ## Building and Commissioning Please refer -[Building and Commissioning](../../../docs/guides/asr_getting_started_guide.md#building-the-example-application) +[Building and Commissioning](../../../docs/platforms/asr/asr_getting_started_guide.md#building-the-example-application) guides to get started ``` diff --git a/examples/lighting-app/bouffalolab/README.md b/examples/lighting-app/bouffalolab/README.md index d2fd8b72af..4a5c8d72f4 100644 --- a/examples/lighting-app/bouffalolab/README.md +++ b/examples/lighting-app/bouffalolab/README.md @@ -1,4 +1,4 @@ -# `Bouffalo Lab` +# Matter `Bouffalo Lab` Lighting Example This example functions as a light bulb device type, with on/off and level capabilities and uses a test Vendor ID (VID) and a Product ID (PID) @@ -17,8 +17,6 @@ Legacy supported boards: - `BL602-NIGHT-LIGHT` - `XT-ZB6-DevKit` - `BL706-NIGHT-LIGHT` -- `BL706DK` -- `BL704LDK` > Warning: Changing the VID/PID may cause compilation problems, we recommend > leaving it as the default while using this example. @@ -99,6 +97,7 @@ The following steps take examples for `BL602DK`, `BL704LDK` and `BL706DK`. ``` ./scripts/build/build_examples.py --target bouffalolab-bl602dk-light build + ./scripts/build/build_examples.py --target bouffalolab-bl616dk-light-wifi build ./scripts/build/build_examples.py --target bouffalolab-bl704ldk-light build ./scripts/build/build_examples.py --target bouffalolab-bl706dk-light build ``` @@ -113,25 +112,28 @@ The following steps take examples for `BL602DK`, `BL704LDK` and `BL706DK`. ### Build options with build_examples.py -- `-wifi`, to specify that connectivity Wi-Fi is enabled for Matter - application. +- `-wifi`, specifies to use Wi-Fi for Matter application. - - BL602 uses `-wifi` by default - - BL702 needs specify to use BL706 + BL602 for Wi-Fi connectivity. + - BL602 uses Wi-Fi by default. `-wifi` could be elided. + - BL702 needs it to specify to use BL706 + BL602 for Wi-Fi. -- `-thread`, to specify that connectivity Thread is enabled for Matter - application. +- `-thread`, specifies to use Thread for Matter application. - - BL70X uses `-thread` by default. + - BL70X uses Thread by default. `-thread` could be elided. -- `-ethernet`, to specify that connectivity Ethernet is enabled for Matte - application. +- `-ethernet`, specifies to use Ethernet for Matter application. - - BL706 needs specify to use Ethernet connectivity. + - BL706 needs it to specify to use Ethernet. -- `-easyflash`, to specify that `easyflash` is used for flash storage access. +- `-littlefs`, specifies to use `littlefs` for flash access. +- `-easyflash`, specifies to use `easyflash` for flash access. + - for platform BL602/BL70X, it is necessary to specify one of `-easyflash` + and `-littlefs`. - `-mfd`, enable Matter factory data feature, which load factory data from `MFD` partition + - Please refer to + [Bouffalo Lab Matter factory data guide](../../../docs/platforms/bouffalolab/matter_factory_data.md) + or contact to `Bouffalo Lab` for support. - `-shell`, enable command line - `-rpc`, enable Pigweed RPC feature - `-115200`, set UART baudrate to 115200 for log and command line @@ -173,11 +175,11 @@ The following steps take examples for `BL602DK`, `BL704LDK` and `BL706DK`. - `BL602DK`, `BL704LDK` and `BL706DK`. - ```shell - ./out/bouffalolab-bl602dk-light/chip-bl602-lighting-example.flash.py --port /dev/ttyACM0 - ./out/bouffalolab-bl704ldk-light/chip-bl702l-lighting-example.flash.py --port /dev/ttyACM0 - ./out/bouffalolab-bl706dk-light/chip-bl702-lighting-example.flash.py --port /dev/ttyACM0 + ./out/bouffalolab-bl602dk-light-littlefs/chip-bl602-lighting-example.flash.py --port /dev/ttyACM0 + ./out/bouffalolab-bl616dk-light-wifi/chip-bl616dk-lighting-example.flash.py --port /dev/ttyACM0 + ./out/bouffalolab-bl704ldk-light-littlefs/chip-bl702l-lighting-example.flash.py --port /dev/ttyACM0 + ./out/bouffalolab-bl706dk-light-littlefs/chip-bl702-lighting-example.flash.py --port /dev/ttyACM0 ``` - To wipe out flash and download image, please append `--erase` @@ -209,15 +211,16 @@ The following steps take examples for `BL602DK`, `BL704LDK` and `BL706DK`. ## Test Commission and Control with chip-tool -Please follow [chip_tool_guide](../../../docs/guides/chip_tool_guide.md) and -[guide](../../chip-tool/README.md) to build and use chip-tool for test. +Please follow +[chip_tool_guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md) +and [guide](../../chip-tool/README.md) to build and use chip-tool for test. ### Prerequisite for Thread Protocol Thread wireless protocol runs on BL706, which needs a Thread border router to connect Thread network to Wi-Fi/Ethernet network. Please follow this -[guide](../../../docs/guides/openthread_border_router_pi.md) to setup a -raspberry Pi border router. +[guide](../../../docs/platforms/openthread/openthread_border_router_pi.md) to +setup a raspberry Pi border router. After Thread border router setup, please type following command on Thread border router to get Thread network credential. @@ -300,11 +303,11 @@ ota-provider-app build and usage. - Add boot parameters, signature/encryption if specified - And specify whether image has be compressed. - Add Matter recognition header by - [ota_image_tool.py](../../../docs/guides/openthread_border_router_pi.md). + [ota_image_tool.py](../../../docs/platforms/openthread/openthread_border_router_pi.md). Script `*.flash.py` builds `Bouffalo Lab` bootable image and call -[ota_image_tool.py](../../../docs/guides/openthread_border_router_pi.md) to add -Matter recognition header. Take `BL602DK` as example. +[ota_image_tool.py](../../../docs/platforms/openthread/openthread_border_router_pi.md) +to add Matter recognition header. Take `BL602DK` as example. ```shell ./out/bouffalolab-bl602dk-light/chip-bl602-lighting-example.flash.py --build-ota --vendor-id --product-id --version --version-str --digest-algorithm diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter index ac770a74de..7ce2b52c2d 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter @@ -1013,6 +1013,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2390,7 +2391,7 @@ endpoint 1 { } server cluster LevelControl { - persist attribute currentLevel default = 0x254; + persist attribute currentLevel default = 0xFE; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.zap index 5a0e876845..5115fe9657 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.zap @@ -2952,7 +2952,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x254", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index c8c3ebca3a..bc48c4056b 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -1013,6 +1013,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2576,7 +2577,7 @@ endpoint 1 { } server cluster LevelControl { - persist attribute currentLevel default = 0x254; + persist attribute currentLevel default = 0xFE; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; 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 0c3c28dbdd..f3e9a7c5ce 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap @@ -3928,7 +3928,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x254", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index 66ccb1f4fb..d896f4308f 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -1013,6 +1013,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2439,7 +2440,7 @@ endpoint 1 { } server cluster LevelControl { - persist attribute currentLevel default = 0x254; + persist attribute currentLevel default = 0xFE; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; 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 3f7f9e3119..2afef0893a 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap @@ -3135,7 +3135,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x254", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/esp32/README.md b/examples/lighting-app/esp32/README.md index 3e3dc5ee0a..da74d5476d 100644 --- a/examples/lighting-app/esp32/README.md +++ b/examples/lighting-app/esp32/README.md @@ -3,9 +3,9 @@ This example demonstrates the Matter Lighting application on ESP platforms. Please -[setup ESP-IDF and CHIP Environment](../../../docs/guides/esp32/setup_idf_chip.md) +[setup ESP-IDF and CHIP Environment](../../../docs/platforms/esp32/setup_idf_chip.md) and refer -[building and commissioning](../../../docs/guides/esp32/build_app_and_commission.md) +[building and commissioning](../../../docs/platforms/esp32/build_app_and_commission.md) guides to get started. ### Enabling ESP-Insights: @@ -47,4 +47,4 @@ cp /path/to/auth/key.txt path/to/connectedhomeip/examples/lighting-app/esp32/mai ### Matter OTA For Matter OTA please take a look at -[Matter OTA guide](../../../docs/guides/esp32/ota.md). +[Matter OTA guide](../../../docs/platforms/esp32/ota.md). diff --git a/examples/lighting-app/esp32/sdkconfig.defaults.esp32c6 b/examples/lighting-app/esp32/sdkconfig.defaults.esp32c6 index 104777a72b..161fdd52ae 100644 --- a/examples/lighting-app/esp32/sdkconfig.defaults.esp32c6 +++ b/examples/lighting-app/esp32/sdkconfig.defaults.esp32c6 @@ -65,3 +65,7 @@ CONFIG_ENABLE_CHIP_SHELL=y # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Serial Flasher config +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y +CONFIG_ESPTOOLPY_FLASHSIZE="4MB" diff --git a/examples/lighting-app/genio/README.md b/examples/lighting-app/genio/README.md index 575d4ba5e1..1b586c1597 100644 --- a/examples/lighting-app/genio/README.md +++ b/examples/lighting-app/genio/README.md @@ -86,7 +86,7 @@ MediaTek platform. Chip tool standalone, Android or iOS app [CHIP - Tool]](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/chip_tool_guide.md) + Tool]](https://github.com/project-chip/connectedhomeip/blob/master/docs/development_controllers/chip-tool/chip_tool_guide.md) Here is an example with the CHIP Tool controller: diff --git a/examples/lighting-app/genio/src/main.cpp b/examples/lighting-app/genio/src/main.cpp index 22f654eb5f..2db77457d2 100644 --- a/examples/lighting-app/genio/src/main.cpp +++ b/examples/lighting-app/genio/src/main.cpp @@ -251,7 +251,7 @@ void vStartTask(void * pvParameters) * Main Function ****************************************************************************/ -extern "C" int main(void) +int main(void) { mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree); diff --git a/examples/lighting-app/infineon/cyw30739/README.md b/examples/lighting-app/infineon/cyw30739/README.md index a69ddb0957..c27eaba47a 100644 --- a/examples/lighting-app/infineon/cyw30739/README.md +++ b/examples/lighting-app/infineon/cyw30739/README.md @@ -212,7 +212,7 @@ Put the CYW30739 in to the recovery mode before running the flash script. - It is assumed here that you already have an OpenThread border router configured and running. If not see the following guide - [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) + [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/platforms/openthread/openthread_border_router_pi.md) for more information on how to setup a border router on a raspberryPi. - You can provision and control the device using the Python controller REPL, diff --git a/examples/lighting-app/infineon/psoc6/README.md b/examples/lighting-app/infineon/psoc6/README.md index 773a05af1f..853000547c 100644 --- a/examples/lighting-app/infineon/psoc6/README.md +++ b/examples/lighting-app/infineon/psoc6/README.md @@ -138,4 +138,4 @@ commands. These power cycle the BlueTooth hardware and disable BR/EDR mode. For the description of Software Update process with infineon PSoC6 example applications see -[Infineon PSoC6 OTA Software Update](../../../../docs/guides/infineon_psoc6_software_update.md) +[Infineon PSoC6 OTA Software Update](../../../../docs/platforms/infineon/infineon_psoc6_software_update.md) diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 011d11fc33..769d929e58 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1013,6 +1013,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2956,7 +2957,7 @@ endpoint 1 { } server cluster LevelControl { - persist attribute currentLevel default = 0x01; + persist attribute currentLevel default = 0xFE; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index b04b233712..e714f74af1 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -4500,7 +4500,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/linux/README.md b/examples/lighting-app/linux/README.md index e41799a70d..b5c3d2a53b 100644 --- a/examples/lighting-app/linux/README.md +++ b/examples/lighting-app/linux/README.md @@ -7,7 +7,7 @@ Raspberry Pi Desktop 20.10 (aarch64)** To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini** **EVK**, see the associated -[README document](../../../docs/guides/nxp/nxp_imx8m_linux_examples.md) for +[README document](../../../docs/platforms/nxp/nxp_imx8m_linux_examples.md) for details.
diff --git a/examples/lighting-app/linux/main.cpp b/examples/lighting-app/linux/main.cpp index 8e586b5cf5..46dea03cde 100644 --- a/examples/lighting-app/linux/main.cpp +++ b/examples/lighting-app/linux/main.cpp @@ -95,7 +95,14 @@ void ApplicationShutdown() } } -extern "C" int main(int argc, char * argv[]) +#ifdef __NuttX__ +// NuttX requires the main function to be defined with C-linkage. However, marking +// the main as extern "C" is not strictly conformant with the C++ standard. Since +// clang >= 20 such code triggers -Wmain warning. +extern "C" { +#endif + +int main(int argc, char * argv[]) { if (ChipLinuxAppInit(argc, argv) != 0) { @@ -124,3 +131,7 @@ extern "C" int main(int argc, char * argv[]) return 0; } + +#ifdef __NuttX__ +} +#endif diff --git a/examples/lighting-app/mbed/README.md b/examples/lighting-app/mbed/README.md index 0eafd74a5e..d96ee5281d 100644 --- a/examples/lighting-app/mbed/README.md +++ b/examples/lighting-app/mbed/README.md @@ -240,7 +240,8 @@ terminal. #### CHIP Tools -Read the [MbedCommissioning](../../../docs/guides/mbedos_commissioning.md) to +Read the +[MbedCommissioning](../../../docs/platforms/mbedos/mbedos_commissioning.md) to see how to use different CHIP tools to commission and control the application within a WiFi network. @@ -314,7 +315,7 @@ The example supports building and running on the following mbed-enabled devices: - More details and guidelines about porting new hardware into the Matter project with Mbed OS can be found in - [MbedNewTarget](../../../docs/guides/mbedos_add_new_target.md) + [MbedNewTarget](../../../docs/platforms/mbedos/mbedos_add_new_target.md) - Some useful information about HW platform specific settings can be found in `lighting-app/mbed/mbed_app.json`. Information about this file syntax and its meaning in mbed-os project can be found here: diff --git a/examples/lighting-app/nrfconnect/README.md b/examples/lighting-app/nrfconnect/README.md index 3ba3c74f56..62e4954d7b 100644 --- a/examples/lighting-app/nrfconnect/README.md +++ b/examples/lighting-app/nrfconnect/README.md @@ -44,7 +44,7 @@ This example is running on the nRF Connect platform, which is based on Nordic Semiconductor's [nRF Connect SDK](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/index.html) and [Zephyr RTOS](https://zephyrproject.org/). Visit Matter's -[nRF Connect platform overview](../../../docs/guides/nrfconnect_platform_overview.md) +[nRF Connect platform overview](../../../docs/platforms/nrf/nrfconnect_platform_overview.md) to read more about the platform structure and dependencies. By default, the Matter accessory device has IPv6 networking disabled. You must @@ -267,7 +267,7 @@ opposite one. **SEGGER J-Link USB port** can be used to get logs from the device or communicate with it using the -[command line interface](../../../docs/guides/nrfconnect_examples_cli.md). +[command line interface](../../../docs/platforms/nrf/nrfconnect_examples_cli.md). **NFC port with antenna attached** can be used to start the [rendezvous](#bluetooth-le-rendezvous) by providing the commissioning @@ -496,7 +496,7 @@ depending on the selected board: DFU enabled by default. For more information, see the -[Configuring nRF Connect SDK examples](../../../docs/guides/nrfconnect_examples_configuration.md) +[Configuring nRF Connect SDK examples](../../../docs/platforms/nrf/nrfconnect_examples_configuration.md) page.
@@ -535,19 +535,20 @@ to read more about flashing on the nRF52840 Dongle. ## Testing the example -Check the [CLI tutorial](../../../docs/guides/nrfconnect_examples_cli.md) to -learn how to use command-line interface of the application. +Check the [CLI tutorial](../../../docs/platforms/nrf/nrfconnect_examples_cli.md) +to learn how to use command-line interface of the application. ### Testing using Linux CHIPTool -Read the [CHIP Tool user guide](../../../docs/guides/chip_tool_guide.md) to see -how to use [CHIP Tool for Linux or mac OS](../../chip-tool/README.md) to +Read the +[CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md) +to see how to use [CHIP Tool for Linux or mac OS](../../chip-tool/README.md) to commission and control the application within a Matter-enabled Thread network. ### Testing using Android CHIPTool Read the -[Android commissioning guide](../../../docs/guides/nrfconnect_android_commissioning.md) +[Android commissioning guide](../../../docs/platforms/nrf/nrfconnect_android_commissioning.md) to see how to use [CHIPTool](../../../examples/android/CHIPTool/README.md) for Android smartphones to commission and control the application within a Matter-enabled Thread network. @@ -555,8 +556,8 @@ Matter-enabled Thread network. ### Testing Device Firmware Upgrade Read the -[DFU tutorial](../../../docs/guides/nrfconnect_examples_software_update.md) to -see how to upgrade your device firmware. +[DFU tutorial](../../../docs/platforms/nrf/nrfconnect_examples_software_update.md) +to see how to upgrade your device firmware. ## Testing using the RPC console diff --git a/examples/lighting-app/nxp/README.md b/examples/lighting-app/nxp/README.md index d611b24c8d..e0860a021e 100644 --- a/examples/lighting-app/nxp/README.md +++ b/examples/lighting-app/nxp/README.md @@ -131,7 +131,7 @@ corresponding to data model target. Use `chip_with_factory_data=1` in the gn build command to enable factory data. For a full guide on manufacturing flow, please see -[Guide for writing manufacturing data on NXP devices](../../../docs/guides/nxp/nxp_manufacturing_flow.md). +[Guide for writing manufacturing data on NXP devices](../../../docs/platforms/nxp/nxp_manufacturing_flow.md). ## Flashing and debugging diff --git a/examples/lighting-app/nxp/common/main.cpp b/examples/lighting-app/nxp/common/main.cpp index d9672b5402..ee19392791 100644 --- a/examples/lighting-app/nxp/common/main.cpp +++ b/examples/lighting-app/nxp/common/main.cpp @@ -30,7 +30,7 @@ extern "C" void main_task(void const * argument) chip::NXP::App::GetAppTask().Start(); } #else -extern "C" int main(int argc, char * argv[]) +int main(int argc, char * argv[]) { chip::DeviceLayer::PlatformMgrImpl().HardwareInit(); chip::NXP::App::GetAppTask().Start(); diff --git a/examples/lighting-app/nxp/k32w0/README.md b/examples/lighting-app/nxp/k32w0/README.md index 518e0232a4..61f35a3e71 100644 --- a/examples/lighting-app/nxp/k32w0/README.md +++ b/examples/lighting-app/nxp/k32w0/README.md @@ -328,7 +328,7 @@ Please use the following build args: ## Manufacturing data See -[Guide for writing manufacturing data on NXP devices](../../../../docs/guides/nxp/nxp_manufacturing_flow.md). +[Guide for writing manufacturing data on NXP devices](../../../../docs/platforms/nxp/nxp_manufacturing_flow.md). There are factory data generated binaries available in `third_party/nxp/nxp_matter_support/examples/platform/k32w0/scripts/demo_generated_factory_data` @@ -595,7 +595,7 @@ internal flash space can be found in the The steps for building the SSBL binary with appropriate configuration and writing to the board the binary and other OTA related configurations are described in the -[K32W0x1 OTA guide](../../../../docs/guides/nxp/nxp_k32w0_ota_guide.md). +[K32W0x1 OTA guide](../../../../docs/platforms/nxp/nxp_k32w0_ota_guide.md). Note that the application needs to be built using the `chip_enable_ota_requestor=true` option. This is enabled in the configuration by diff --git a/examples/lighting-app/nxp/k32w1/README.md b/examples/lighting-app/nxp/k32w1/README.md index d61ab1e424..61cec8077c 100644 --- a/examples/lighting-app/nxp/k32w1/README.md +++ b/examples/lighting-app/nxp/k32w1/README.md @@ -109,7 +109,7 @@ this feature, compile the application with: `chip_config_dimmable_led=true` If the feature is enabled, the LED brightness can be controlled using `LevelControl` cluster -[commands](../../../../docs/guides/chip_tool_guide.md#step-7-control-application-data-model-clusters). +[commands](../../../../docs/development_controllers/chip-tool/chip_tool_guide.md#step-7-control-application-data-model-clusters). ## Flashing @@ -235,4 +235,4 @@ To reboot the device, please run `rpcs.chip.rpc.Device.Reboot()`. ## OTA Please see -[k32w1 OTA guide](../../../../docs/guides/nxp/nxp_mcxw71_ota_guide.md). +[k32w1 OTA guide](../../../../docs/platforms/nxp/nxp_mcxw71_ota_guide.md). diff --git a/examples/lighting-app/nxp/linux-imx/imx8m/README.md b/examples/lighting-app/nxp/linux-imx/imx8m/README.md index e20ff1065d..01941f58e7 100644 --- a/examples/lighting-app/nxp/linux-imx/imx8m/README.md +++ b/examples/lighting-app/nxp/linux-imx/imx8m/README.md @@ -1,4 +1,4 @@ To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini** **EVK**, see the associated -[README document](../../../../../docs/guides/nxp/nxp_imx8m_linux_examples.md) +[README document](../../../../../docs/platforms/nxp/nxp_imx8m_linux_examples.md) for details. diff --git a/examples/lighting-app/nxp/mcxw71/README.md b/examples/lighting-app/nxp/mcxw71/README.md index 116fd6183e..3cded8b8be 100644 --- a/examples/lighting-app/nxp/mcxw71/README.md +++ b/examples/lighting-app/nxp/mcxw71/README.md @@ -109,7 +109,7 @@ this feature, compile the application with: `chip_config_dimmable_led=true` If the feature is enabled, the LED brightness can be controlled using `LevelControl` cluster -[commands](../../../../docs/guides/chip_tool_guide.md#step-7-control-application-data-model-clusters). +[commands](../../../../docs/development_controllers/chip-tool/chip_tool_guide.md#step-7-control-application-data-model-clusters). ## Flashing @@ -267,4 +267,4 @@ To reboot the device, please run `rpcs.chip.rpc.Device.Reboot()`. ## OTA Please see -[mcxw71 OTA guide](../../../../docs/guides/nxp/nxp_mcxw71_ota_guide.md). +[mcxw71 OTA guide](../../../../docs/platforms/nxp/nxp_mcxw71_ota_guide.md). diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index 99a3c51c41..c80d7cfa19 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -1013,6 +1013,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2136,7 +2137,7 @@ endpoint 1 { } server cluster LevelControl { - persist attribute currentLevel default = 0x01; + persist attribute currentLevel default = 0xFE; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.zap b/examples/lighting-app/nxp/zap/lighting-on-off.zap index 6d5d8fd8cb..f8293b8cfc 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.zap +++ b/examples/lighting-app/nxp/zap/lighting-on-off.zap @@ -3637,7 +3637,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index a352d37dbb..fbefaabad5 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -1013,6 +1013,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2630,7 +2631,7 @@ endpoint 1 { } server cluster LevelControl { - persist attribute currentLevel default = 0x01; + persist attribute currentLevel default = 0xFE; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; diff --git a/examples/lighting-app/qpg/zap/light.zap b/examples/lighting-app/qpg/zap/light.zap index f4b4c6f1bf..b744892b3b 100644 --- a/examples/lighting-app/qpg/zap/light.zap +++ b/examples/lighting-app/qpg/zap/light.zap @@ -4770,7 +4770,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/silabs/README.md b/examples/lighting-app/silabs/README.md index 606208a387..7052d4f712 100644 --- a/examples/lighting-app/silabs/README.md +++ b/examples/lighting-app/silabs/README.md @@ -200,7 +200,7 @@ combination with JLinkRTTClient as follows: - It is assumed here that you already have an OpenThread border router configured and running. If not see the following guide - [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) + [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/platforms/openthread/openthread_border_router_pi.md) for more information on how to setup a border router on a raspberryPi. Take note that the RCP code is available directly through @@ -331,7 +331,7 @@ tracking code inside the `trackAlloc` and `trackFree` function For the description of Software Update process with EFR32 example applications see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) +[EFR32 OTA Software Update](../../../docs/platforms/silabs/silabs_efr32_software_update.md) ## Group Communication (Multicast) diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index 52285ea3b4..49684770a3 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -1013,6 +1013,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2535,7 +2536,6 @@ endpoint 1 { 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; @@ -2548,7 +2548,6 @@ endpoint 1 { 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; @@ -2573,7 +2572,6 @@ endpoint 1 { persist attribute startUpOnOff default = 0xFF; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 6; @@ -2587,7 +2585,7 @@ endpoint 1 { } server cluster LevelControl { - persist attribute currentLevel default = 0x01; + persist attribute currentLevel default = 0xFE; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; @@ -2603,7 +2601,6 @@ endpoint 1 { persist attribute startUpCurrentLevel default = 255; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 6; @@ -2625,7 +2622,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2637,7 +2633,6 @@ endpoint 1 { callback attribute fabricSceneInfo; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -2681,7 +2676,6 @@ endpoint 1 { persist attribute startUpColorTemperatureMireds default = 0x00FA; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x1F; ram attribute clusterRevision default = 7; diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap index 2644717a84..62cc5c49eb 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -3803,7 +3803,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index 6fb823728b..003a38e52c 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -1272,6 +1272,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2807,7 +2808,6 @@ endpoint 1 { 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; @@ -2820,7 +2820,6 @@ endpoint 1 { 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; @@ -2845,7 +2844,6 @@ endpoint 1 { persist attribute startUpOnOff default = 0xFF; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 6; @@ -2859,7 +2857,7 @@ endpoint 1 { } server cluster LevelControl { - persist attribute currentLevel default = 0x01; + persist attribute currentLevel default = 0xFE; ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; @@ -2875,7 +2873,6 @@ endpoint 1 { persist attribute startUpCurrentLevel default = 255; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 6; @@ -2897,7 +2894,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2917,7 +2913,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 2; @@ -2929,7 +2924,6 @@ endpoint 1 { callback attribute fabricSceneInfo; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap index 086261b9e0..94397579a0 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap @@ -3288,7 +3288,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/stm32/README.md b/examples/lighting-app/stm32/README.md index 26a6051d1a..d69df7d277 100644 --- a/examples/lighting-app/stm32/README.md +++ b/examples/lighting-app/stm32/README.md @@ -14,7 +14,7 @@ This example demonstrates the Matter Lighting application on stm32 platform. ## Building and Commissioning Please refer -[Building and Commissioning](../../../docs/guides/stm32_getting_started_guide.md#building-the-example-application) +[Building and Commissioning](../../../docs/platforms/stm32/stm32_getting_started_guide.md#building-the-example-application) guides to get started ``` diff --git a/examples/lighting-app/tizen/src/DBusInterface.cpp b/examples/lighting-app/tizen/src/DBusInterface.cpp index 36c0f19c35..5484c7daff 100644 --- a/examples/lighting-app/tizen/src/DBusInterface.cpp +++ b/examples/lighting-app/tizen/src/DBusInterface.cpp @@ -42,9 +42,12 @@ class CommandHandlerImplCallback : public CommandHandlerImpl::Callback { public: using Status = Protocols::InteractionModel::Status; - void OnDone(CommandHandlerImpl & apCommandObj) {} - void DispatchCommand(CommandHandlerImpl & apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & apPayload) {} - Status CommandExists(const ConcreteCommandPath & aCommandPath) { return Status::Success; } + + void OnDone(CommandHandlerImpl & apCommandObj) override {} + void DispatchCommand(CommandHandlerImpl & apCommandObj, const ConcreteCommandPath & aCommandPath, + TLV::TLVReader & apPayload) override + {} + Status ValidateCommandCanBeDispatched(const DataModel::InvokeRequest & request) override { return Status::Success; } }; DBusInterface::DBusInterface(chip::EndpointId endpointId) : mEndpointId(endpointId) diff --git a/examples/lit-icd-app/esp32/README.md b/examples/lit-icd-app/esp32/README.md index 405f208bc5..9f36e17f82 100644 --- a/examples/lit-icd-app/esp32/README.md +++ b/examples/lit-icd-app/esp32/README.md @@ -3,9 +3,9 @@ This example is meant to represent a power-save application. Please -[setup ESP-IDF and CHIP Environment](../../../docs/guides/esp32/setup_idf_chip.md) +[setup ESP-IDF and CHIP Environment](../../../docs/platforms/esp32/setup_idf_chip.md) and refer -[building and commissioning](../../../docs/guides/esp32/build_app_and_commission.md) +[building and commissioning](../../../docs/platforms/esp32/build_app_and_commission.md) guides to get started. **Note**: Currently only Thread devices can run this example. diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter index 2d3430c8d9..3c51bf0b1b 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter @@ -765,6 +765,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1832,7 +1833,6 @@ endpoint 0 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -1847,7 +1847,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision; @@ -1872,7 +1871,6 @@ endpoint 0 { callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -1895,7 +1893,6 @@ endpoint 0 { server cluster UnitLocalization { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1909,7 +1906,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1933,7 +1929,6 @@ endpoint 0 { ram attribute lastConnectErrorValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -1956,7 +1951,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2020,7 +2014,6 @@ endpoint 0 { callback attribute adminVendorId; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2038,7 +2031,6 @@ endpoint 0 { callback attribute currentFabricIndex; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2064,7 +2056,6 @@ endpoint 0 { callback attribute maxGroupKeysPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2102,7 +2093,6 @@ endpoint 0 { callback attribute maximumCheckInBackOff; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x000F; ram attribute clusterRevision default = 3; @@ -2123,7 +2113,6 @@ endpoint 1 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2139,7 +2128,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2149,7 +2137,6 @@ endpoint 1 { ram attribute stateValue; 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/lit-icd-app/nrfconnect/README.md b/examples/lit-icd-app/nrfconnect/README.md index ff0f6b6699..81503f9e13 100644 --- a/examples/lit-icd-app/nrfconnect/README.md +++ b/examples/lit-icd-app/nrfconnect/README.md @@ -42,7 +42,7 @@ This example is running on the nRF Connect platform, which is based on Nordic Semiconductor's [nRF Connect SDK](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/index.html) and [Zephyr RTOS](https://zephyrproject.org/). Visit Matter's -[nRF Connect platform overview](../../../docs/guides/nrfconnect_platform_overview.md) +[nRF Connect platform overview](../../../docs/platforms/nrf/nrfconnect_platform_overview.md) to read more about the platform structure and dependencies. By default, the Matter accessory device has IPv6 networking disabled. You must @@ -183,7 +183,7 @@ procedure. **SEGGER J-Link USB port** can be used to get logs from the device or communicate with it using the -[command line interface](../../../docs/guides/nrfconnect_examples_cli.md). +[command line interface](../../../docs/platforms/nrf/nrfconnect_examples_cli.md). **NFC port with antenna attached** can be used to start the [rendezvous](#bluetooth-le-rendezvous) by providing the commissioning @@ -376,7 +376,7 @@ depending on the selected board: the necessary application functionalities to optimize its performance. For more information, see the -[Configuring nRF Connect SDK examples](../../../docs/guides/nrfconnect_examples_configuration.md) +[Configuring nRF Connect SDK examples](../../../docs/platforms/nrf/nrfconnect_examples_configuration.md) page.
@@ -400,17 +400,18 @@ directory: ## Testing the example -Check the [CLI tutorial](../../../docs/guides/nrfconnect_examples_cli.md) to -learn how to use command-line interface of the application. +Check the [CLI tutorial](../../../docs/platforms/nrf/nrfconnect_examples_cli.md) +to learn how to use command-line interface of the application. ### Testing using Linux CHIPTool -Read the [CHIP Tool user guide](../../../docs/guides/chip_tool_guide.md) to see -how to use [CHIP Tool for Linux or mac OS](../../chip-tool/README.md) to +Read the +[CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md) +to see how to use [CHIP Tool for Linux or mac OS](../../chip-tool/README.md) to commission and control the application within a Matter-enabled Thread network. ### Testing Device Firmware Upgrade Read the -[DFU tutorial](../../../docs/guides/nrfconnect_examples_software_update.md) to -see how to upgrade your device firmware. +[DFU tutorial](../../../docs/platforms/nrf/nrfconnect_examples_software_update.md) +to see how to upgrade your device firmware. diff --git a/examples/lit-icd-app/silabs/README.md b/examples/lit-icd-app/silabs/README.md index a38944bad5..4d1dee045c 100644 --- a/examples/lit-icd-app/silabs/README.md +++ b/examples/lit-icd-app/silabs/README.md @@ -202,7 +202,7 @@ combination with JLinkRTTClient as follows: - It is assumed here that you already have an OpenThread border router configured and running. If not see the following guide - [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) + [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/platforms/openthread/openthread_border_router_pi.md) for more information on how to setup a border router on a raspberryPi. Take note that the RCP code is available directly through @@ -317,7 +317,7 @@ tracking code inside the `trackAlloc` and `trackFree` function For the description of Software Update process with EFR32 example applications see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) +[EFR32 OTA Software Update](../../../docs/platforms/silabs/silabs_efr32_software_update.md) ## Building options diff --git a/examples/lit-icd-app/silabs/build_for_wifi_args.gni b/examples/lit-icd-app/silabs/build_for_wifi_args.gni index 56cd70b217..6ef009e906 100644 --- a/examples/lit-icd-app/silabs/build_for_wifi_args.gni +++ b/examples/lit-icd-app/silabs/build_for_wifi_args.gni @@ -29,7 +29,6 @@ sl_enable_test_event_trigger = true chip_enable_icd_server = true chip_subscription_timeout_resumption = false sl_use_subscription_syncing = true -icd_enforce_sit_slow_poll_limit = true chip_enable_icd_lit = true # ICD Matter Configuration flags diff --git a/examples/lit-icd-app/silabs/openthread.gni b/examples/lit-icd-app/silabs/openthread.gni index b12529c2ca..e84e7be8ed 100644 --- a/examples/lit-icd-app/silabs/openthread.gni +++ b/examples/lit-icd-app/silabs/openthread.gni @@ -32,7 +32,6 @@ sl_enable_test_event_trigger = true chip_enable_icd_server = true chip_subscription_timeout_resumption = false sl_use_subscription_syncing = true -icd_enforce_sit_slow_poll_limit = true chip_icd_report_on_active_mode = true chip_enable_icd_lit = true diff --git a/examples/lock-app/asr/README.md b/examples/lock-app/asr/README.md index 1da71f5800..e81db2a331 100755 --- a/examples/lock-app/asr/README.md +++ b/examples/lock-app/asr/README.md @@ -17,7 +17,7 @@ reference for creating your own application. ## Building and Commissioning Please refer -[Building and Commissioning](../../../docs/guides/asr_getting_started_guide.md#building-the-example-application) +[Building and Commissioning](../../../docs/platforms/asr/asr_getting_started_guide.md#building-the-example-application) guides to get started ``` diff --git a/examples/lock-app/esp32/README.md b/examples/lock-app/esp32/README.md index f7f020ed10..119450658c 100644 --- a/examples/lock-app/esp32/README.md +++ b/examples/lock-app/esp32/README.md @@ -3,16 +3,16 @@ This example demonstrates the mapping of OnOff cluster to lock/unlock logic. Please -[setup ESP-IDF and CHIP Environment](../../../docs/guides/esp32/setup_idf_chip.md) +[setup ESP-IDF and CHIP Environment](../../../docs/platforms/esp32/setup_idf_chip.md) and refer -[building and commissioning](../../../docs/guides/esp32/build_app_and_commission.md) +[building and commissioning](../../../docs/platforms/esp32/build_app_and_commission.md) guides to get started. --- - [Cluster control](#cluster-control) - [Example Demo](#example-demo) -- [RPC console and Device Tracing](../../../docs/guides/esp32/rpc_console.md) +- [RPC console and Device Tracing](../../../docs/platforms/esp32/rpc_console.md) --- diff --git a/examples/lock-app/genio/README.md b/examples/lock-app/genio/README.md index 7c4582f707..051f6fa4f2 100644 --- a/examples/lock-app/genio/README.md +++ b/examples/lock-app/genio/README.md @@ -86,7 +86,7 @@ MediaTek platform. Chip tool standalone, Android or iOS app [CHIP - Tool]](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/chip_tool_guide.md) + Tool]](https://github.com/project-chip/connectedhomeip/blob/master/docs/development_controllers/chip-tool/chip_tool_guide.md) Here is an example with the CHIP Tool controller: diff --git a/examples/lock-app/genio/src/main.cpp b/examples/lock-app/genio/src/main.cpp index 92b16a3966..36564e1333 100644 --- a/examples/lock-app/genio/src/main.cpp +++ b/examples/lock-app/genio/src/main.cpp @@ -251,7 +251,7 @@ void vStartTask(void * pvParameters) * Main Function ****************************************************************************/ -extern "C" int main(void) +int main(void) { mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree); diff --git a/examples/lock-app/infineon/cyw30739/README.md b/examples/lock-app/infineon/cyw30739/README.md index 0c9b769b66..c02d3a6c05 100644 --- a/examples/lock-app/infineon/cyw30739/README.md +++ b/examples/lock-app/infineon/cyw30739/README.md @@ -212,7 +212,7 @@ Put the CYW30739 in to the recovery mode before running the flash script. - It is assumed here that you already have an OpenThread border router configured and running. If not see the following guide - [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) + [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/platforms/openthread/openthread_border_router_pi.md) for more information on how to setup a border router on a raspberryPi. - You can provision and control the device using the Python controller REPL, diff --git a/examples/lock-app/infineon/psoc6/README.md b/examples/lock-app/infineon/psoc6/README.md index 0c8e8eb1e8..657b038af9 100644 --- a/examples/lock-app/infineon/psoc6/README.md +++ b/examples/lock-app/infineon/psoc6/README.md @@ -175,7 +175,7 @@ cloud, giving every IoT device its own unique identity. For the description of OPTIGA™ Trust M Provisioning with test DAC generation and PAI and CD storage, please refer to -[Infineon OPTIGA™ Trust M Provisioning](../../../../docs/guides/infineon_trustm_provisioning.md) +[Infineon OPTIGA™ Trust M Provisioning](../../../../docs/platforms/infineon/infineon_trustm_provisioning.md) After completing OPTIGA™ Trust M Provisioning, proceed to [Flashing the Application](#flashing-the-application) section to continue with @@ -185,4 +185,4 @@ subsequent steps. For the description of Software Update process with infineon PSoC6 example applications see -[Infineon PSoC6 OTA Software Update](../../../../docs/guides/infineon_psoc6_software_update.md) +[Infineon PSoC6 OTA Software Update](../../../../docs/platforms/infineon/infineon_psoc6_software_update.md) diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 5e9c4080af..650458149c 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -1024,6 +1024,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2810,7 +2811,6 @@ endpoint 0 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2826,7 +2826,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; callback attribute clusterRevision; @@ -2859,7 +2858,6 @@ endpoint 0 { callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -2882,7 +2880,6 @@ endpoint 0 { server cluster UnitLocalization { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2898,7 +2895,6 @@ endpoint 0 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 2; @@ -2912,7 +2908,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2936,7 +2931,6 @@ endpoint 0 { ram attribute lastConnectErrorValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -2976,7 +2970,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -3112,7 +3105,6 @@ endpoint 0 { callback attribute adminVendorId; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -3130,7 +3122,6 @@ endpoint 0 { callback attribute currentFabricIndex; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -3156,7 +3147,6 @@ endpoint 0 { callback attribute maxGroupKeysPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -3199,7 +3189,6 @@ endpoint 1 { 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; @@ -3215,7 +3204,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -3233,7 +3221,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0A; ram attribute clusterRevision default = 2; @@ -3282,7 +3269,6 @@ endpoint 1 { callback attribute numberOfAliroEndpointKeysSupported; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x7DB3; ram attribute clusterRevision default = 7; diff --git a/examples/lock-app/mbed/README.md b/examples/lock-app/mbed/README.md index 27eb422246..1a8c34d1db 100644 --- a/examples/lock-app/mbed/README.md +++ b/examples/lock-app/mbed/README.md @@ -224,7 +224,8 @@ terminal. #### CHIP Tools -Read the [MbedCommissioning](../../../docs/guides/mbedos_commissioning.md) to +Read the +[MbedCommissioning](../../../docs/platforms/mbedos/mbedos_commissioning.md) to see how to use different CHIP tools to commission and control the application within a WiFi network. @@ -288,7 +289,7 @@ The example supports building and running on the following mbed-enabled devices: - More details and guidelines about porting new hardware into the Matter project with Mbed OS can be found in - [MbedNewTarget](../../../docs/guides/mbedos_add_new_target.md) + [MbedNewTarget](../../../docs/platforms/mbedos/mbedos_add_new_target.md) - Some useful information about HW platform specific settings can be found in `lock-app/mbed/mbed_app.json`. Information about this file syntax and its meaning in mbed-os project can be found here: diff --git a/examples/lock-app/nrfconnect/README.md b/examples/lock-app/nrfconnect/README.md index 14385357bc..0a0743abd4 100644 --- a/examples/lock-app/nrfconnect/README.md +++ b/examples/lock-app/nrfconnect/README.md @@ -44,7 +44,7 @@ This example is running on the nRF Connect platform, which is based on Nordic Semiconductor's [nRF Connect SDK](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/index.html) and [Zephyr RTOS](https://zephyrproject.org/). Visit Matter's -[nRF Connect platform overview](../../../docs/guides/nrfconnect_platform_overview.md) +[nRF Connect platform overview](../../../docs/platforms/nrf/nrfconnect_platform_overview.md) to read more about the platform structure and dependencies. By default, the Matter accessory device has IPv6 networking disabled. You must @@ -255,7 +255,7 @@ opposite one. **SEGGER J-Link USB port** can be used to get logs from the device or communicate with it using the -[command line interface](../../../docs/guides/nrfconnect_examples_cli.md). +[command line interface](../../../docs/platforms/nrf/nrfconnect_examples_cli.md). **NFC port with antenna attached** can be used to start the [rendezvous](#bluetooth-le-rendezvous) by providing the commissioning @@ -454,7 +454,7 @@ depending on the selected board: the necessary application functionalities to optimize its performance. For more information, see the -[Configuring nRF Connect SDK examples](../../../docs/guides/nrfconnect_examples_configuration.md) +[Configuring nRF Connect SDK examples](../../../docs/platforms/nrf/nrfconnect_examples_configuration.md) page.
@@ -478,20 +478,21 @@ directory: ## Testing the example -Check the [CLI tutorial](../../../docs/guides/nrfconnect_examples_cli.md) to -learn how to use command-line interface of the application. +Check the [CLI tutorial](../../../docs/platforms/nrf/nrfconnect_examples_cli.md) +to learn how to use command-line interface of the application. ### Testing using Linux CHIPTool -Read the [CHIP Tool user guide](../../../docs/guides/chip_tool_guide.md) to see -how to use [CHIP Tool for Linux or mac OS](../../chip-tool/README.md) to +Read the +[CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md) +to see how to use [CHIP Tool for Linux or mac OS](../../chip-tool/README.md) to commission and control the application within a Matter-enabled Thread or Wi-Fi network. ### Testing using Android CHIPTool Read the -[Android commissioning guide](../../../docs/guides/nrfconnect_android_commissioning.md) +[Android commissioning guide](../../../docs/platforms/nrf/nrfconnect_android_commissioning.md) to see how to use [CHIPTool](../../../examples/android/CHIPTool/README.md) for Android smartphones to commission and control the application within a Matter-enabled Thread or Wi-Fi network. @@ -499,5 +500,5 @@ Matter-enabled Thread or Wi-Fi network. ### Testing Device Firmware Upgrade Read the -[DFU tutorial](../../../docs/guides/nrfconnect_examples_software_update.md) to -see how to upgrade your device firmware. +[DFU tutorial](../../../docs/platforms/nrf/nrfconnect_examples_software_update.md) +to see how to upgrade your device firmware. diff --git a/examples/lock-app/nxp/README.md b/examples/lock-app/nxp/README.md index c3cf4c112f..a758ef50d7 100644 --- a/examples/lock-app/nxp/README.md +++ b/examples/lock-app/nxp/README.md @@ -126,7 +126,7 @@ corresponding to data model target. Use `chip_with_factory_data=1` in the gn build command to enable factory data. For a full guide on manufacturing flow, please see -[Guide for writing manufacturing data on NXP devices](../../../docs/guides/nxp/nxp_manufacturing_flow.md). +[Guide for writing manufacturing data on NXP devices](../../../docs/platforms/nxp/nxp_manufacturing_flow.md). ## Flashing and debugging diff --git a/examples/lock-app/nxp/common/main/ZclCallbacks.cpp b/examples/lock-app/nxp/common/main/ZclCallbacks.cpp index 98fb0f8c2b..8806a2c058 100644 --- a/examples/lock-app/nxp/common/main/ZclCallbacks.cpp +++ b/examples/lock-app/nxp/common/main/ZclCallbacks.cpp @@ -35,11 +35,20 @@ #include "UserInterfaceFeedback.h" #endif +#if CONFIG_DIAG_LOGS_DEMO +#include +#include +#endif + using namespace ::chip; using namespace chip::app::Clusters; using namespace chip::app::Clusters::DoorLock; using chip::app::DataModel::Nullable; +#if CONFIG_DIAG_LOGS_DEMO +using namespace ::chip::app::Clusters::DiagnosticLogs; +#endif + void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & path, uint8_t type, uint16_t size, uint8_t * value) { chip::DeviceManager::CHIPDeviceManagerCallbacks * cb = @@ -158,3 +167,11 @@ void emberAfPluginDoorLockOnAutoRelock(chip::EndpointId endpointId) DoorLockServer::Instance().SetLockState(1, DlLockState::kLocked, OperationSourceEnum::kAuto, NullNullable, NullNullable, NullNullable, NullNullable); } + +#if CONFIG_DIAG_LOGS_DEMO +void emberAfDiagnosticLogsClusterInitCallback(chip::EndpointId endpoint) +{ + auto & logProvider = LogProvider::GetInstance(); + DiagnosticLogsServer::Instance().SetDiagnosticLogsProviderDelegate(endpoint, &logProvider); +} +#endif diff --git a/examples/lock-app/nxp/common/main/main.cpp b/examples/lock-app/nxp/common/main/main.cpp index 09de048127..8565ca01af 100644 --- a/examples/lock-app/nxp/common/main/main.cpp +++ b/examples/lock-app/nxp/common/main/main.cpp @@ -39,7 +39,7 @@ extern "C" void main_task(void const * argument) chip::NXP::App::GetAppTask().Start(); } #else -extern "C" int main(int argc, char * argv[]) +int main(int argc, char * argv[]) { chip::DeviceLayer::PlatformMgrImpl().HardwareInit(); chip::NXP::App::GetAppTask().Start(); diff --git a/examples/lock-app/nxp/k32w1/README.md b/examples/lock-app/nxp/k32w1/README.md index a085d94afd..88041b86e4 100644 --- a/examples/lock-app/nxp/k32w1/README.md +++ b/examples/lock-app/nxp/k32w1/README.md @@ -163,7 +163,7 @@ Run -> Debug Configurations... -> C/C++ Application ## OTA Please see -[k32w1 OTA guide](../../../../docs/guides/nxp/nxp_mcxw71_ota_guide.md). +[k32w1 OTA guide](../../../../docs/platforms/nxp/nxp_mcxw71_ota_guide.md). ## Multiple BLE connections diff --git a/examples/lock-app/nxp/k32w1/args.gni b/examples/lock-app/nxp/k32w1/args.gni index e0c41d1e34..b7a2d790ef 100644 --- a/examples/lock-app/nxp/k32w1/args.gni +++ b/examples/lock-app/nxp/k32w1/args.gni @@ -30,7 +30,6 @@ chip_with_lwip = false chip_enable_icd_server = true chip_enable_icd_lit = false -icd_enforce_sit_slow_poll_limit = true chip_persist_subscriptions = true chip_subscription_timeout_resumption = true diff --git a/examples/lock-app/nxp/mcxw71/README.md b/examples/lock-app/nxp/mcxw71/README.md index db877d0c00..92e177d0e3 100644 --- a/examples/lock-app/nxp/mcxw71/README.md +++ b/examples/lock-app/nxp/mcxw71/README.md @@ -195,7 +195,7 @@ Run -> Debug Configurations... -> C/C++ Application ## OTA Please see -[mcxw71 OTA guide](../../../../docs/guides/nxp/nxp_mcxw71_ota_guide.md). +[mcxw71 OTA guide](../../../../docs/platforms/nxp/nxp_mcxw71_ota_guide.md). ## Multiple BLE connections diff --git a/examples/lock-app/nxp/mcxw71/args.gni b/examples/lock-app/nxp/mcxw71/args.gni index 761b050b80..1a0940c96a 100644 --- a/examples/lock-app/nxp/mcxw71/args.gni +++ b/examples/lock-app/nxp/mcxw71/args.gni @@ -30,7 +30,6 @@ chip_with_lwip = false chip_enable_icd_server = true chip_enable_icd_lit = false -icd_enforce_sit_slow_poll_limit = true chip_persist_subscriptions = true chip_subscription_timeout_resumption = true diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index c975e2b7c1..281f19877b 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -756,6 +756,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2383,6 +2384,9 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; } @@ -2397,9 +2401,8 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + ram attribute featureMap default = 1; callback attribute clusterRevision; } @@ -2424,7 +2427,6 @@ endpoint 0 { callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -2438,6 +2440,9 @@ endpoint 0 { ram attribute updatePossible default = 1; ram attribute updateState default = 0; ram attribute updateStateProgress default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2449,7 +2454,6 @@ endpoint 0 { callback attribute supportedLocales; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2463,7 +2467,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2489,7 +2492,6 @@ endpoint 0 { ram attribute threadVersion; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 2; @@ -2507,7 +2509,6 @@ endpoint 0 { server cluster DiagnosticLogs { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2525,7 +2526,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2609,7 +2609,6 @@ endpoint 0 { callback attribute activeNetworkFaultsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x000F; ram attribute clusterRevision default = 2; @@ -2621,6 +2620,9 @@ endpoint 0 { callback attribute windowStatus; callback attribute adminFabricIndex; callback attribute adminVendorId; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2635,6 +2637,9 @@ endpoint 0 { callback attribute commissionedFabrics; callback attribute trustedRootCertificates; callback attribute currentFabricIndex; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2657,6 +2662,9 @@ endpoint 0 { callback attribute groupTable; callback attribute maxGroupsPerFabric; callback attribute maxGroupKeysPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2674,7 +2682,6 @@ endpoint 0 { callback attribute activeModeThreshold; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0000; ram attribute clusterRevision default = 1; @@ -2689,7 +2696,6 @@ endpoint 1 { 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; @@ -2705,7 +2711,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2724,13 +2729,18 @@ endpoint 1 { ram attribute numberOfTotalUsersSupported default = 10; ram attribute numberOfPINUsersSupported default = 10; ram attribute numberOfRFIDUsersSupported default = 10; + ram attribute numberOfWeekDaySchedulesSupportedPerUser default = 10; + ram attribute numberOfYearDaySchedulesSupportedPerUser default = 10; + ram attribute numberOfHolidaySchedulesSupported default = 10; ram attribute maxPINCodeLength default = 8; ram attribute minPINCodeLength default = 6; ram attribute maxRFIDCodeLength default = 20; ram attribute minRFIDCodeLength default = 10; ram attribute credentialRulesSupport default = 1; ram attribute numberOfCredentialsSupportedPerUser default = 5; - ram attribute autoRelockTime; + ram attribute language default = "en"; + ram attribute autoRelockTime default = 60; + ram attribute soundVolume default = 0; ram attribute operatingMode default = 0x00; ram attribute supportedOperatingModes default = 0xFFF6; ram attribute enableOneTouchLocking default = 0x00; @@ -2738,16 +2748,48 @@ endpoint 1 { ram attribute wrongCodeEntryLimit default = 3; ram attribute userCodeTemporaryDisableTime default = 10; ram attribute requirePINforRemoteOperation default = 0; + callback attribute aliroReaderVerificationKey; + callback attribute aliroReaderGroupIdentifier; + callback attribute aliroReaderGroupSubIdentifier; + callback attribute aliroExpeditedTransactionSupportedProtocolVersions; + callback attribute aliroGroupResolvingKey; + callback attribute aliroSupportedBLEUWBProtocolVersions; + callback attribute aliroBLEAdvertisingVersion; + callback attribute numberOfAliroCredentialIssuerKeysSupported; + callback attribute numberOfAliroEndpointKeysSupported; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0x0001; + ram attribute featureMap default = 0x7DB3; ram attribute clusterRevision default = 7; handle command LockDoor; handle command UnlockDoor; handle command UnlockWithTimeout; + handle command SetWeekDaySchedule; + handle command GetWeekDaySchedule; + handle command GetWeekDayScheduleResponse; + handle command ClearWeekDaySchedule; + handle command SetYearDaySchedule; + handle command GetYearDaySchedule; + handle command GetYearDayScheduleResponse; + handle command ClearYearDaySchedule; + handle command SetHolidaySchedule; + handle command GetHolidaySchedule; + handle command GetHolidayScheduleResponse; + handle command ClearHolidaySchedule; + handle command SetUser; + handle command GetUser; + handle command GetUserResponse; + handle command ClearUser; + handle command SetCredential; + handle command SetCredentialResponse; + handle command GetCredentialStatus; + handle command GetCredentialStatusResponse; + handle command ClearCredential; + handle command UnboltDoor; + handle command SetAliroReaderConfig; + handle command ClearAliroReaderConfig; } } diff --git a/examples/lock-app/nxp/zap/lock-app.zap b/examples/lock-app/nxp/zap/lock-app.zap index 67da76956d..e888db4505 100644 --- a/examples/lock-app/nxp/zap/lock-app.zap +++ b/examples/lock-app/nxp/zap/lock-app.zap @@ -96,7 +96,7 @@ "singleton": 0, "bounded": 0, "defaultValue": null, - "reportable": 1, + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -112,7 +112,7 @@ "singleton": 0, "bounded": 0, "defaultValue": null, - "reportable": 1, + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -128,6 +128,70 @@ "singleton": 0, "bounded": 0, "defaultValue": null, + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -186,7 +250,7 @@ "singleton": 0, "bounded": 0, "defaultValue": null, - "reportable": 1, + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -202,7 +266,7 @@ "singleton": 0, "bounded": 0, "defaultValue": null, - "reportable": 1, + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -329,7 +393,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -388,7 +452,7 @@ "singleton": 1, "bounded": 0, "defaultValue": null, - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -404,7 +468,7 @@ "singleton": 1, "bounded": 0, "defaultValue": null, - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -420,7 +484,7 @@ "singleton": 1, "bounded": 0, "defaultValue": null, - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -436,7 +500,7 @@ "singleton": 1, "bounded": 0, "defaultValue": null, - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -452,7 +516,7 @@ "singleton": 1, "bounded": 0, "defaultValue": null, - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -468,7 +532,7 @@ "singleton": 1, "bounded": 0, "defaultValue": "", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -484,7 +548,7 @@ "singleton": 1, "bounded": 0, "defaultValue": null, - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -500,7 +564,7 @@ "singleton": 1, "bounded": 0, "defaultValue": null, - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -516,7 +580,7 @@ "singleton": 1, "bounded": 0, "defaultValue": null, - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -532,7 +596,7 @@ "singleton": 1, "bounded": 0, "defaultValue": null, - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -548,7 +612,7 @@ "singleton": 1, "bounded": 0, "defaultValue": null, - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -870,6 +934,70 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -946,7 +1074,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 1, + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -962,7 +1090,7 @@ "singleton": 0, "bounded": 0, "defaultValue": null, - "reportable": 1, + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1834,7 +1962,7 @@ "singleton": 0, "bounded": 0, "defaultValue": null, - "reportable": 1, + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2056,8 +2184,8 @@ "bounded": 0, "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -3244,6 +3372,70 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -3481,52 +3673,116 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Group Key Management", - "code": 63, - "mfgCode": null, - "define": "GROUP_KEY_MANAGEMENT_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ + }, { - "name": "KeySetWrite", - "code": 0, + "name": "EventList", + "code": 65530, "mfgCode": null, - "source": "client", + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", "isIncoming": 1, "isEnabled": 1 }, @@ -3636,6 +3892,70 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4210,6 +4530,198 @@ "source": "client", "isIncoming": 1, "isEnabled": 1 + }, + { + "name": "SetWeekDaySchedule", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetWeekDaySchedule", + "code": 12, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetWeekDayScheduleResponse", + "code": 12, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ClearWeekDaySchedule", + "code": 13, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetYearDaySchedule", + "code": 14, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetYearDaySchedule", + "code": 15, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetYearDayScheduleResponse", + "code": 15, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ClearYearDaySchedule", + "code": 16, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetHolidaySchedule", + "code": 17, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetHolidaySchedule", + "code": 18, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetHolidayScheduleResponse", + "code": 18, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ClearHolidaySchedule", + "code": 19, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetUser", + "code": 26, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetUser", + "code": 27, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetUserResponse", + "code": 28, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ClearUser", + "code": 29, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetCredential", + "code": 34, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetCredentialResponse", + "code": 35, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "GetCredentialStatus", + "code": 36, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetCredentialStatusResponse", + "code": 37, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ClearCredential", + "code": 38, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UnboltDoor", + "code": 39, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetAliroReaderConfig", + "code": 40, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ClearAliroReaderConfig", + "code": 41, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 } ], "attributes": [ @@ -4325,6 +4837,54 @@ "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, @@ -4421,6 +4981,22 @@ "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": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AutoRelockTime", "code": 35, @@ -4431,7 +5007,23 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "60", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SoundVolume", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4549,6 +5141,150 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "AliroReaderVerificationKey", + "code": 128, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AliroReaderGroupIdentifier", + "code": 129, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AliroReaderGroupSubIdentifier", + "code": 130, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AliroExpeditedTransactionSupportedProtocolVersions", + "code": 131, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AliroGroupResolvingKey", + "code": 132, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AliroSupportedBLEUWBProtocolVersions", + "code": 133, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AliroBLEAdvertisingVersion", + "code": 134, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfAliroCredentialIssuerKeysSupported", + "code": 135, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfAliroEndpointKeysSupported", + "code": 136, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -4623,7 +5359,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0001", + "defaultValue": "0x7DB3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/lock-app/openiotsdk/README.md b/examples/lock-app/openiotsdk/README.md index 69e569b9be..f81f2ad9fc 100644 --- a/examples/lock-app/openiotsdk/README.md +++ b/examples/lock-app/openiotsdk/README.md @@ -10,7 +10,7 @@ existing Matter network and can be controlled by it. For information on how to build, run, test and debug this example and further information about the platform it is run on see -[Open IoT SDK examples](../../../docs/guides/openiotsdk_examples.md). +[Open IoT SDK examples](../../../docs/platforms/openiotsdk/openiotsdk_examples.md). The example name to use in the scripts is `lock-app`. @@ -30,7 +30,7 @@ in the terminal. ### Commissioning Read the -[Open IoT SDK commissioning guide](../../../docs/guides/openiotsdk_commissioning.md) +[Open IoT SDK commissioning guide](../../../docs/platforms/openiotsdk/openiotsdk_commissioning.md) to see how to use the Matter controller to commission and control the application. diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index 0c408680b1..74ab5d744a 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -816,6 +816,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2803,7 +2804,6 @@ endpoint 0 { callback attribute activeModeThreshold; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0000; ram attribute clusterRevision default = 3; diff --git a/examples/lock-app/silabs/README.md b/examples/lock-app/silabs/README.md index 4a16af08c0..7b4f7fdbdf 100644 --- a/examples/lock-app/silabs/README.md +++ b/examples/lock-app/silabs/README.md @@ -223,7 +223,7 @@ combination with JLinkRTTClient as follows: - It is assumed here that you already have an OpenThread border router configured and running. If not see the following guide - [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) + [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/platforms/openthread/openthread_border_router_pi.md) for more information on how to setup a border router on a raspberryPi. Take note that the RCP code is available directly through @@ -367,7 +367,7 @@ tracking code inside the `trackAlloc` and `trackFree` function For the description of Software Update process with EFR32 example applications see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) +[EFR32 OTA Software Update](../../../docs/platforms/silabs/silabs_efr32_software_update.md) ## Building options diff --git a/examples/lock-app/silabs/data_model/lock-app.matter b/examples/lock-app/silabs/data_model/lock-app.matter index 9902b87beb..512435d998 100644 --- a/examples/lock-app/silabs/data_model/lock-app.matter +++ b/examples/lock-app/silabs/data_model/lock-app.matter @@ -1024,6 +1024,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2810,7 +2811,6 @@ endpoint 0 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2826,7 +2826,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; callback attribute clusterRevision; @@ -2859,7 +2858,6 @@ endpoint 0 { callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -2882,7 +2880,6 @@ endpoint 0 { server cluster UnitLocalization { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2898,7 +2895,6 @@ endpoint 0 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 2; @@ -2912,7 +2908,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2936,7 +2931,6 @@ endpoint 0 { ram attribute lastConnectErrorValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -2976,7 +2970,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -3112,7 +3105,6 @@ endpoint 0 { callback attribute adminVendorId; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -3130,7 +3122,6 @@ endpoint 0 { callback attribute currentFabricIndex; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -3156,7 +3147,6 @@ endpoint 0 { callback attribute maxGroupKeysPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -3199,7 +3189,6 @@ endpoint 1 { 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; @@ -3215,7 +3204,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -3233,7 +3221,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0A; ram attribute clusterRevision default = 2; @@ -3273,7 +3260,6 @@ endpoint 1 { ram attribute requirePINforRemoteOperation default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x7DB3; ram attribute clusterRevision default = 7; diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index 3da4e2a7ec..e5f6ee1007 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -405,6 +405,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter index f9ee0e90dd..fbc5c3625a 100644 --- a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter +++ b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter @@ -629,6 +629,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1536,7 +1537,6 @@ endpoint 0 { callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -1726,7 +1726,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -1737,7 +1736,6 @@ endpoint 1 { callback attribute currentMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -1753,7 +1751,6 @@ endpoint 1 { callback attribute wattRating; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -1773,7 +1770,6 @@ endpoint 1 { callback attribute operationalError; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; diff --git a/examples/network-manager-app/network-manager-common/network-manager-app.matter b/examples/network-manager-app/network-manager-common/network-manager-app.matter index e3b0fb9de3..4847e0ff9e 100644 --- a/examples/network-manager-app/network-manager-common/network-manager-app.matter +++ b/examples/network-manager-app/network-manager-common/network-manager-app.matter @@ -535,6 +535,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1696,7 +1697,6 @@ endpoint 0 { callback attribute activeNetworkFaultsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; @@ -1801,7 +1801,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -1812,7 +1811,6 @@ endpoint 1 { callback attribute passphraseSurrogate; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1830,7 +1828,6 @@ endpoint 1 { callback attribute pendingDatasetTimestamp; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -1848,7 +1845,6 @@ endpoint 1 { callback attribute threadNetworkTableSize; 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/ota-provider-app/esp32/README.md b/examples/ota-provider-app/esp32/README.md index 2102aabd1a..7717aa1a88 100644 --- a/examples/ota-provider-app/esp32/README.md +++ b/examples/ota-provider-app/esp32/README.md @@ -3,7 +3,7 @@ A prototype application that demonstrates OTA provider capabilities. Please -[setup ESP-IDF and CHIP Environment](../../../docs/guides/esp32/setup_idf_chip.md) +[setup ESP-IDF and CHIP Environment](../../../docs/platforms/esp32/setup_idf_chip.md) --- @@ -16,7 +16,7 @@ Please ### Building and Commissioning Generate the OTA image as described -[here](../../../docs/guides/esp32/ota.md#generate-chip-ota-image) +[here](../../../docs/platforms/esp32/ota.md#generate-chip-ota-image) #### Configure OTA image to serve @@ -36,7 +36,7 @@ Generate the OTA image as described terminator. Follow -[ESP32 Application Usage Guide](../../../docs/guides/esp32/build_app_and_commission.md) +[ESP32 Application Usage Guide](../../../docs/platforms/esp32/build_app_and_commission.md) to Build, Flash, Monitor, and Commission the device. Once device is commissioned successfully, then please try below steps. diff --git a/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp b/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp index 381d3b43f7..d93a61dfbd 100644 --- a/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp +++ b/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp @@ -61,7 +61,7 @@ constexpr uint32_t kBdxServerPollIntervalMillis = 50; void GetUpdateTokenString(const chip::ByteSpan & token, char * buf, size_t bufSize) { const uint8_t * tokenData = static_cast(token.data()); - size_t minLength = chip::min(token.size(), bufSize); + size_t minLength = std::min(token.size(), bufSize); for (size_t i = 0; i < (minLength / 2) - 1; ++i) { snprintf(&buf[i * 2], bufSize, "%02X", tokenData[i]); diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index a8773f83d1..7538f304f3 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -736,6 +736,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/ota-requestor-app/asr/README.md b/examples/ota-requestor-app/asr/README.md index 7af3c25e92..d2cb6c8ff7 100755 --- a/examples/ota-requestor-app/asr/README.md +++ b/examples/ota-requestor-app/asr/README.md @@ -13,7 +13,7 @@ This example demonstrates the Matter OTA Requestor application on ASR platform. ## Building and Commissioning Please refer -[Building and Commissioning](../../../docs/guides/asr_getting_started_guide.md#building-the-example-application) +[Building and Commissioning](../../../docs/platforms/asr/asr_getting_started_guide.md#building-the-example-application) guides to get started ``` diff --git a/examples/ota-requestor-app/esp32/README.md b/examples/ota-requestor-app/esp32/README.md index 1951b4535b..0f8972db50 100644 --- a/examples/ota-requestor-app/esp32/README.md +++ b/examples/ota-requestor-app/esp32/README.md @@ -3,9 +3,9 @@ A prototype application that demonstrates OTA Requestor capabilities. Please -[setup ESP-IDF and CHIP Environment](../../../docs/guides/esp32/setup_idf_chip.md) +[setup ESP-IDF and CHIP Environment](../../../docs/platforms/esp32/setup_idf_chip.md) and refer -[building and commissioning](../../../docs/guides/esp32/build_app_and_commission.md) +[building and commissioning](../../../docs/platforms/esp32/build_app_and_commission.md) guides to get started. --- @@ -13,7 +13,7 @@ guides to get started. - [Prerequisite](#prerequisite) - [Query for an OTA Image](#query-for-an-ota-image) - [ESP32 OTA Requestor with Linux OTA Provider](#esp32-ota-requestor-with-linux-ota-provider) -- [RPC console and Device Tracing](../../../docs/guides/esp32/rpc_console.md) +- [RPC console and Device Tracing](../../../docs/platforms/esp32/rpc_console.md) --- diff --git a/examples/ota-requestor-app/genio/README.md b/examples/ota-requestor-app/genio/README.md index e8675adc62..487056c08f 100644 --- a/examples/ota-requestor-app/genio/README.md +++ b/examples/ota-requestor-app/genio/README.md @@ -86,7 +86,7 @@ MediaTek platform. Chip tool standalone, Android or iOS app [CHIP - Tool]](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/chip_tool_guide.md) + Tool]](https://github.com/project-chip/connectedhomeip/blob/master/docs/development_controllers/chip-tool/chip_tool_guide.md) Here is an example with the CHIP Tool controller: diff --git a/examples/ota-requestor-app/genio/src/main.cpp b/examples/ota-requestor-app/genio/src/main.cpp index e3676c5c9e..6c9f4f16c2 100644 --- a/examples/ota-requestor-app/genio/src/main.cpp +++ b/examples/ota-requestor-app/genio/src/main.cpp @@ -281,7 +281,7 @@ void vStartTask(void * pvParameters) * Main Function ****************************************************************************/ -extern "C" int main(void) +int main(void) { mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree); diff --git a/examples/ota-requestor-app/mbed/README.md b/examples/ota-requestor-app/mbed/README.md index 6f8bcdaf53..0de672921c 100644 --- a/examples/ota-requestor-app/mbed/README.md +++ b/examples/ota-requestor-app/mbed/README.md @@ -231,7 +231,8 @@ in the terminal. #### CHIP Tools -Read the [MbedCommissioning](../../../docs/guides/mbedos_commissioning.md) to +Read the +[MbedCommissioning](../../../docs/platforms/mbedos/mbedos_commissioning.md) to see how to use different CHIP tools to commission and control the application within a WiFi network. @@ -266,7 +267,7 @@ The example supports building and running on the following mbed-enabled devices: - More details and guidelines about porting new hardware into the Matter project with Mbed OS can be found in - [MbedNewTarget](../../../docs/guides/mbedos_add_new_target.md) + [MbedNewTarget](../../../docs/platforms/mbedos/mbedos_add_new_target.md) - Some useful information about HW platform specific settings can be found in `ota-requestor-app/mbed/mbed_app.json`. Information about this file syntax and its meaning in mbed-os project can be found here: diff --git a/examples/ota-requestor-app/openiotsdk/README.md b/examples/ota-requestor-app/openiotsdk/README.md index d9a98c44d3..042c30d17f 100644 --- a/examples/ota-requestor-app/openiotsdk/README.md +++ b/examples/ota-requestor-app/openiotsdk/README.md @@ -9,8 +9,8 @@ file and apply it. The application is configured to support: -- [TF-M](../../../docs/guides/openiotsdk_examples.md#trusted-firmware-m) -- [Device Firmware Update](../../../docs/guides/openiotsdk_examples.md#device-firmware-update) +- [TF-M](../../../docs/platforms/openiotsdk/openiotsdk_examples.md#trusted-firmware-m) +- [Device Firmware Update](../../../docs/platforms/openiotsdk/openiotsdk_examples.md#device-firmware-update) The example behaves as a Matter accessory, device that can be paired into an existing Matter network and can be controlled by it. @@ -19,7 +19,7 @@ existing Matter network and can be controlled by it. For information on how to build, run, test and debug this example and further information about the platform it is run on see -[Open IoT SDK examples](../../../docs/guides/openiotsdk_examples.md). +[Open IoT SDK examples](../../../docs/platforms/openiotsdk/openiotsdk_examples.md). The example name to use in the scripts is `ota-requestor-app`. @@ -39,14 +39,14 @@ follow traces in the terminal. ### Commissioning Read the -[Open IoT SDK commissioning guide](../../../docs/guides/openiotsdk_commissioning.md) +[Open IoT SDK commissioning guide](../../../docs/platforms/openiotsdk/openiotsdk_commissioning.md) to see how to use the Matter controller to commission and control the application. ### Device Firmware Upgrade Read the -[Matter Open IoT SDK Example Device Firmware Upgrade](../../../docs/guides/openiotsdk_examples_software_update.md) +[Matter Open IoT SDK Example Device Firmware Upgrade](../../../docs/platforms/openiotsdk/openiotsdk_examples_software_update.md) to see how to use Matter OTA for firmware update. ### OtaSoftwareUpdateRequestor cluster usage @@ -78,4 +78,4 @@ downloading the update image. If this step is completed, a new image will be installed and the application will be reboot. More details about device firmware update over Matter can be found -[here](../../../docs/guides/openiotsdk_examples_software_update.md). +[here](../../../docs/platforms/openiotsdk/openiotsdk_examples_software_update.md). diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index 2ab9918446..5269b6e709 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -888,6 +888,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1555,7 +1556,6 @@ endpoint 0 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -1571,7 +1571,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision; @@ -1604,7 +1603,6 @@ endpoint 0 { callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -1620,7 +1618,6 @@ endpoint 0 { ram attribute updateStateProgress default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1636,7 +1633,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1660,7 +1656,6 @@ endpoint 0 { ram attribute lastConnectErrorValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -1689,7 +1684,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -1705,7 +1699,6 @@ endpoint 0 { callback attribute adminVendorId; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1724,7 +1717,6 @@ endpoint 0 { callback attribute currentFabricIndex; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1750,7 +1742,6 @@ endpoint 0 { callback attribute maxGroupKeysPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -1846,7 +1837,6 @@ endpoint 65534 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -1863,7 +1853,6 @@ endpoint 65534 { callback attribute lastConnectErrorValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap default = 0; callback attribute clusterRevision default = 1; diff --git a/examples/persistent-storage/KeyValueStorageTest.cpp b/examples/persistent-storage/KeyValueStorageTest.cpp index 5aab299dc0..0f688c4f07 100644 --- a/examples/persistent-storage/KeyValueStorageTest.cpp +++ b/examples/persistent-storage/KeyValueStorageTest.cpp @@ -55,8 +55,8 @@ CHIP_ERROR TestEmptyString() size_t read_size; ReturnErrorOnFailure(KeyValueStoreMgr().Put(kTestKey, kTestValue)); ReturnErrorOnFailure(KeyValueStoreMgr().Get(kTestKey, read_value, sizeof(read_value), &read_size)); - ReturnErrorCodeIf(strcmp(kTestValue, read_value) != 0, CHIP_ERROR_INTERNAL); - ReturnErrorCodeIf(read_size != sizeof(kTestValue), CHIP_ERROR_INTERNAL); + VerifyOrReturnError(strcmp(kTestValue, read_value) == 0, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(read_size == sizeof(kTestValue), CHIP_ERROR_INTERNAL); ReturnErrorOnFailure(KeyValueStoreMgr().Delete(kTestKey)); return CHIP_NO_ERROR; } @@ -69,8 +69,8 @@ CHIP_ERROR TestString() size_t read_size; ReturnErrorOnFailure(KeyValueStoreMgr().Put(kTestKey, kTestValue)); ReturnErrorOnFailure(KeyValueStoreMgr().Get(kTestKey, read_value, sizeof(read_value), &read_size)); - ReturnErrorCodeIf(strcmp(kTestValue, read_value) != 0, CHIP_ERROR_INTERNAL); - ReturnErrorCodeIf(read_size != sizeof(kTestValue), CHIP_ERROR_INTERNAL); + VerifyOrReturnError(strcmp(kTestValue, read_value) == 0, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(read_size == sizeof(kTestValue), CHIP_ERROR_INTERNAL); ReturnErrorOnFailure(KeyValueStoreMgr().Delete(kTestKey)); return CHIP_NO_ERROR; } @@ -82,7 +82,7 @@ CHIP_ERROR TestUint32() uint32_t read_value; ReturnErrorOnFailure(KeyValueStoreMgr().Put(kTestKey, kTestValue)); ReturnErrorOnFailure(KeyValueStoreMgr().Get(kTestKey, &read_value)); - ReturnErrorCodeIf(kTestValue != read_value, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(kTestValue == read_value, CHIP_ERROR_INTERNAL); ReturnErrorOnFailure(KeyValueStoreMgr().Delete(kTestKey)); return CHIP_NO_ERROR; } @@ -94,7 +94,7 @@ CHIP_ERROR TestArray() uint32_t read_value[5]; ReturnErrorOnFailure(KeyValueStoreMgr().Put(kTestKey, kTestValue)); ReturnErrorOnFailure(KeyValueStoreMgr().Get(kTestKey, &read_value)); - ReturnErrorCodeIf(memcmp(kTestValue, read_value, sizeof(kTestValue)) != 0, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(memcmp(kTestValue, read_value, sizeof(kTestValue)) == 0, CHIP_ERROR_INTERNAL); ReturnErrorOnFailure(KeyValueStoreMgr().Delete(kTestKey)); return CHIP_NO_ERROR; } @@ -111,8 +111,8 @@ CHIP_ERROR TestStruct() SomeStruct read_value; ReturnErrorOnFailure(KeyValueStoreMgr().Put(kTestKey, kTestValue)); ReturnErrorOnFailure(KeyValueStoreMgr().Get(kTestKey, &read_value)); - ReturnErrorCodeIf(kTestValue.value1 != read_value.value1, CHIP_ERROR_INTERNAL); - ReturnErrorCodeIf(kTestValue.value2 != read_value.value2, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(kTestValue.value1 == read_value.value1, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(kTestValue.value2 == read_value.value2, CHIP_ERROR_INTERNAL); ReturnErrorOnFailure(KeyValueStoreMgr().Delete(kTestKey)); return CHIP_NO_ERROR; } @@ -125,7 +125,7 @@ CHIP_ERROR TestUpdateValue() { ReturnErrorOnFailure(KeyValueStoreMgr().Put(kTestKey, i)); ReturnErrorOnFailure(KeyValueStoreMgr().Get(kTestKey, &read_value)); - ReturnErrorCodeIf(i != read_value, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(i == read_value, CHIP_ERROR_INTERNAL); } ReturnErrorOnFailure(KeyValueStoreMgr().Delete(kTestKey)); return CHIP_NO_ERROR; @@ -142,9 +142,9 @@ CHIP_ERROR TestMultiRead() size_t read_size; // Returns buffer too small for all but the last read. CHIP_ERROR error = KeyValueStoreMgr().Get(kTestKey, &read_value, sizeof(read_value), &read_size, i * sizeof(uint32_t)); - ReturnErrorCodeIf(error != (i < 4 ? CHIP_ERROR_BUFFER_TOO_SMALL : CHIP_NO_ERROR), error); - ReturnErrorCodeIf(read_size != sizeof(read_value), CHIP_ERROR_INTERNAL); - ReturnErrorCodeIf(kTestValue[i] != read_value, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(error == (i < 4 ? CHIP_ERROR_BUFFER_TOO_SMALL : CHIP_NO_ERROR), error); + VerifyOrReturnError(read_size == sizeof(read_value), CHIP_ERROR_INTERNAL); + VerifyOrReturnError(kTestValue[i] == read_value, CHIP_ERROR_INTERNAL); } ReturnErrorOnFailure(KeyValueStoreMgr().Delete(kTestKey)); return CHIP_NO_ERROR; diff --git a/examples/persistent-storage/esp32/README.md b/examples/persistent-storage/esp32/README.md index d87b894060..e6820508df 100644 --- a/examples/persistent-storage/esp32/README.md +++ b/examples/persistent-storage/esp32/README.md @@ -3,9 +3,9 @@ An example testing and demonstrating the key value storage API. Please -[setup ESP-IDF and CHIP Environment](../../../docs/guides/esp32/setup_idf_chip.md) +[setup ESP-IDF and CHIP Environment](../../../docs/platforms/esp32/setup_idf_chip.md) and refer -[building and commissioning](../../../docs/guides/esp32/build_app_and_commission.md) +[building and commissioning](../../../docs/platforms/esp32/build_app_and_commission.md) guides to get started. --- diff --git a/examples/pigweed-app/esp32/README.md b/examples/pigweed-app/esp32/README.md index 8044faebd1..ebd63eda45 100644 --- a/examples/pigweed-app/esp32/README.md +++ b/examples/pigweed-app/esp32/README.md @@ -1,9 +1,9 @@ # CHIP ESP32 Pigweed Example Application Please -[setup ESP-IDF and CHIP Environment](../../../docs/guides/esp32/setup_idf_chip.md) +[setup ESP-IDF and CHIP Environment](../../../docs/platforms/esp32/setup_idf_chip.md) and refer -[building and commissioning](../../../docs/guides/esp32/build_app_and_commission.md) +[building and commissioning](../../../docs/platforms/esp32/build_app_and_commission.md) guides to get started. --- diff --git a/examples/pigweed-app/mbed/README.md b/examples/pigweed-app/mbed/README.md index 8ca7aca3c2..3932e4f961 100644 --- a/examples/pigweed-app/mbed/README.md +++ b/examples/pigweed-app/mbed/README.md @@ -249,7 +249,7 @@ The example supports building and running on the following mbed-enabled devices: - More details and guidelines about porting new hardware into the Matter project with Mbed OS can be found in - [MbedNewTarget](../../../docs/guides/mbedos_add_new_target.md) + [MbedNewTarget](../../../docs/platforms/mbedos/mbedos_add_new_target.md) - Some useful information about HW platform specific settings can be found in `pigweed-app/mbed/mbed_app.json`. Information about this file syntax and its meaning in mbed-os project can be found here: diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 79d17e5306..a6a1aa5c7f 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -1672,6 +1672,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1763,6 +1764,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -8601,7 +8603,6 @@ endpoint 0 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -8616,7 +8617,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision; @@ -8655,7 +8655,6 @@ endpoint 0 { callback attribute capabilityMinima; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; @@ -8666,7 +8665,6 @@ endpoint 0 { callback attribute supportedLocales; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -8678,7 +8676,6 @@ endpoint 0 { callback attribute supportedCalendarTypes; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -8687,7 +8684,6 @@ endpoint 0 { server cluster UnitLocalization { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -8728,7 +8724,6 @@ endpoint 0 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; @@ -8742,7 +8737,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -8766,7 +8760,6 @@ endpoint 0 { ram attribute lastConnectErrorValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -8795,7 +8788,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -8965,7 +8957,6 @@ endpoint 0 { callback attribute adminVendorId; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -8984,7 +8975,6 @@ endpoint 0 { callback attribute currentFabricIndex; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -9010,7 +9000,6 @@ endpoint 0 { callback attribute maxGroupKeysPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -9678,7 +9667,6 @@ endpoint 1 { callback attribute pendingDatasetTimestamp; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 467aed8bac..0373748d9d 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -1629,6 +1629,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1720,6 +1721,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -8514,7 +8516,6 @@ endpoint 0 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -8529,7 +8530,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision; @@ -8568,7 +8568,6 @@ endpoint 0 { callback attribute capabilityMinima; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; @@ -8579,7 +8578,6 @@ endpoint 0 { callback attribute supportedLocales; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -8591,7 +8589,6 @@ endpoint 0 { callback attribute supportedCalendarTypes; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -8601,7 +8598,6 @@ endpoint 0 { ram attribute temperatureUnit; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -8642,7 +8638,6 @@ endpoint 0 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; @@ -8656,7 +8651,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -8680,7 +8674,6 @@ endpoint 0 { ram attribute lastConnectErrorValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -8709,7 +8702,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -8879,7 +8871,6 @@ endpoint 0 { callback attribute adminVendorId; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -8898,7 +8889,6 @@ endpoint 0 { callback attribute currentFabricIndex; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -8924,7 +8914,6 @@ endpoint 0 { callback attribute maxGroupKeysPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; diff --git a/examples/platform/cc13x4_26x4/CC13X4_26X4DeviceAttestationCreds.cpp b/examples/platform/cc13x4_26x4/CC13X4_26X4DeviceAttestationCreds.cpp index 2cd36b6a14..18b5890e9d 100644 --- a/examples/platform/cc13x4_26x4/CC13X4_26X4DeviceAttestationCreds.cpp +++ b/examples/platform/cc13x4_26x4/CC13X4_26X4DeviceAttestationCreds.cpp @@ -218,8 +218,8 @@ CHIP_ERROR DeviceAttestationCredsCC13X4_26X4::GetFirmwareInformation(MutableByte CHIP_ERROR DeviceAttestationCredsCC13X4_26X4::GetDeviceAttestationCert(MutableByteSpan & out_buffer) { - ReturnErrorCodeIf(out_buffer.size() < mFactoryData->dac_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData->dac_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(out_buffer.size() >= mFactoryData->dac_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData->dac_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); return CopySpanToMutableSpan(ByteSpan{ mFactoryData->dac_cert.data, mFactoryData->dac_cert.len }, out_buffer); return CHIP_NO_ERROR; @@ -227,8 +227,8 @@ CHIP_ERROR DeviceAttestationCredsCC13X4_26X4::GetDeviceAttestationCert(MutableBy CHIP_ERROR DeviceAttestationCredsCC13X4_26X4::GetProductAttestationIntermediateCert(MutableByteSpan & out_buffer) { - ReturnErrorCodeIf(out_buffer.size() < mFactoryData->pai_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData->pai_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(out_buffer.size() >= mFactoryData->pai_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData->pai_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); return CopySpanToMutableSpan(ByteSpan{ mFactoryData->pai_cert.data, mFactoryData->pai_cert.len }, out_buffer); } diff --git a/examples/platform/cc32xx/CC32XXDeviceAttestationCreds.cpp b/examples/platform/cc32xx/CC32XXDeviceAttestationCreds.cpp index 0323e3b7ed..2e85c0b69a 100644 --- a/examples/platform/cc32xx/CC32XXDeviceAttestationCreds.cpp +++ b/examples/platform/cc32xx/CC32XXDeviceAttestationCreds.cpp @@ -349,8 +349,8 @@ CHIP_ERROR DeviceAttestationCredsCC32XX::GetFirmwareInformation(MutableByteSpan CHIP_ERROR DeviceAttestationCredsCC32XX::GetDeviceAttestationCert(MutableByteSpan & out_buffer) { - ReturnErrorCodeIf(out_buffer.size() < mFactoryData->dac_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData->dac_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(out_buffer.size() >= mFactoryData->dac_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData->dac_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); return CopySpanToMutableSpan(ByteSpan{ mFactoryData->dac_cert.data, mFactoryData->dac_cert.len }, out_buffer); return CHIP_NO_ERROR; @@ -358,8 +358,8 @@ CHIP_ERROR DeviceAttestationCredsCC32XX::GetDeviceAttestationCert(MutableByteSpa CHIP_ERROR DeviceAttestationCredsCC32XX::GetProductAttestationIntermediateCert(MutableByteSpan & out_buffer) { - ReturnErrorCodeIf(out_buffer.size() < mFactoryData->pai_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData->pai_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(out_buffer.size() >= mFactoryData->pai_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData->pai_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); return CopySpanToMutableSpan(ByteSpan{ mFactoryData->pai_cert.data, mFactoryData->pai_cert.len }, out_buffer); } diff --git a/examples/platform/nrfconnect/util/PWMDevice.cpp b/examples/platform/nrfconnect/util/PWMDevice.cpp index d0a77ab63f..67836224ce 100644 --- a/examples/platform/nrfconnect/util/PWMDevice.cpp +++ b/examples/platform/nrfconnect/util/PWMDevice.cpp @@ -18,6 +18,8 @@ #include "PWMDevice.h" +#include + #include "AppConfig.h" #include @@ -129,7 +131,7 @@ void PWMDevice::SuppressOutput() void PWMDevice::ApplyLevel() { const uint8_t maxEffectiveLevel = mMaxLevel - mMinLevel; - const uint8_t effectiveLevel = mState == kState_On ? chip::min(mLevel - mMinLevel, maxEffectiveLevel) : 0; + const uint8_t effectiveLevel = mState == kState_On ? std::min(mLevel - mMinLevel, maxEffectiveLevel) : 0; pwm_set_pulse_dt(mPwmDevice, static_cast(static_cast(mPwmDevice->period) * effectiveLevel / maxEffectiveLevel)); diff --git a/examples/platform/nxp/common/device_callbacks/source/CommonDeviceCallbacks.cpp b/examples/platform/nxp/common/device_callbacks/source/CommonDeviceCallbacks.cpp index 1bab4b09f5..5d877aad9b 100644 --- a/examples/platform/nxp/common/device_callbacks/source/CommonDeviceCallbacks.cpp +++ b/examples/platform/nxp/common/device_callbacks/source/CommonDeviceCallbacks.cpp @@ -79,7 +79,16 @@ void chip::NXP::App::CommonDeviceCallbacks::DeviceEventCallback(const ChipDevice case DeviceEventType::kCommissioningComplete: CommonDeviceCallbacks::OnComissioningComplete(event); break; -#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WPA + case DeviceEventType::kThreadConnectivityChange: + if (!ConnectivityMgr().IsWiFiStationConnected() && (event->ThreadConnectivityChange.Result == kConnectivity_Established)) + { + // Restart DnsSd service when operating as Matter over Thread + chip::app::DnssdServer::Instance().StartServer(); + } + break; +#endif // CHIP_DEVICE_CONFIG_ENABLE_WPA +#endif // CHIP_ENABLE_OPENTHREAD case DeviceLayer::DeviceEventType::kDnssdInitialized: ChipLogProgress(DeviceLayer, "kDnssdInitialized"); #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR @@ -158,20 +167,13 @@ void chip::NXP::App::CommonDeviceCallbacks::OnSessionEstablished(chip::DeviceLay #if CHIP_ENABLE_OPENTHREAD void chip::NXP::App::CommonDeviceCallbacks::OnComissioningComplete(const chip::DeviceLayer::ChipDeviceEvent * event) { -#ifndef _NO_GENERIC_THREAD_NETWORK_COMMISSIONING_DRIVER_ #if CHIP_DEVICE_CONFIG_ENABLE_WPA - if (ConnectivityMgr().IsWiFiStationConnected()) - { - // Disable thr nwk commissioining cluster - app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::Set(CHIP_DEVICE_CONFIG_THREAD_NETWORK_ENDPOINT_ID, 0); - } - else if (ConnectivityMgr().IsThreadProvisioned()) + if (!ConnectivityMgr().IsWiFiStationConnected() && ConnectivityMgr().IsThreadProvisioned()) { // Set WIFI cluster interface attribute to disable. app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::Set(0, 0); } #endif // CHIP_DEVICE_CONFIG_ENABLE_WPA -#endif // _NO_GENERIC_THREAD_NETWORK_COMMISSIONING_DRIVER_ #if CHIP_DEVICE_CONFIG_CHIPOBLE_DISABLE_ADVERTISING_WHEN_PROVISIONED /* diff --git a/examples/platform/nxp/common/matter_button/source/ButtonApp.cpp b/examples/platform/nxp/common/matter_button/source/ButtonApp.cpp index 3b03b413ec..ce036dbd75 100644 --- a/examples/platform/nxp/common/matter_button/source/ButtonApp.cpp +++ b/examples/platform/nxp/common/matter_button/source/ButtonApp.cpp @@ -24,11 +24,30 @@ extern "C" { #include "board_comp.h" } +/** + * @brief Flag to describe if the button handles are predefined in SDK. + * + * Set to true by default. Platforms that do not have this support should + * disable the flag, which will enable handle definition in this file. + */ +#ifndef CONFIG_APP_BUTTON_HANDLE_SDK_PREDEFINED +#define CONFIG_APP_BUTTON_HANDLE_SDK_PREDEFINED 1 +#endif + +#if !CONFIG_APP_BUTTON_HANDLE_SDK_PREDEFINED +BUTTON_HANDLE_ARRAY_DEFINE(g_buttonHandle, gAppButtonCnt_c); +#endif + CHIP_ERROR chip::NXP::App::ButtonApp::Init() { - // Button is initialized in otSysInit, when APP_InitServices is called. - // Overwrite the handle to reference the SDK handle. +#if CONFIG_APP_BUTTON_HANDLE_SDK_PREDEFINED + // Button is defined in the SDK and initialized in otSysInit, when APP_InitServices is called. handle = &g_buttonHandle[1]; +#else + // Button handle is defined in this file and it should be initialized here. + handle = &g_buttonHandle[0]; + BOARD_InitButton0(handle); +#endif return CHIP_NO_ERROR; } @@ -48,7 +67,14 @@ void chip::NXP::App::ButtonApp::HandleShortPress() void chip::NXP::App::ButtonApp::HandleLongPress() { - chip::DeviceLayer::PlatformMgrImpl().CleanReset(); + // Execute "clean" reset + chip::DeviceLayer::PlatformMgr().ScheduleWork( + [](intptr_t arg) { + chip::DeviceLayer::PlatformMgr().StopEventLoopTask(); + chip::DeviceLayer::PlatformMgr().Shutdown(); + chip::DeviceLayer::PlatformMgrImpl().Reset(); + }, + (intptr_t) nullptr); } void chip::NXP::App::ButtonApp::HandleDoubleClick() diff --git a/examples/platform/nxp/common/matter_button/source/ButtonManager.cpp b/examples/platform/nxp/common/matter_button/source/ButtonManager.cpp index 046337397a..7aa9866edf 100644 --- a/examples/platform/nxp/common/matter_button/source/ButtonManager.cpp +++ b/examples/platform/nxp/common/matter_button/source/ButtonManager.cpp @@ -17,7 +17,10 @@ */ #include "ButtonManager.h" + +extern "C" { #include "fwk_platform.h" +} #include #include diff --git a/examples/platform/nxp/common/matter_button/source/ButtonRegistrationAppAndBle.cpp b/examples/platform/nxp/common/matter_button/source/ButtonRegistrationAppAndBle.cpp index 45037b268f..b16bc1ff5c 100644 --- a/examples/platform/nxp/common/matter_button/source/ButtonRegistrationAppAndBle.cpp +++ b/examples/platform/nxp/common/matter_button/source/ButtonRegistrationAppAndBle.cpp @@ -24,14 +24,37 @@ #include -static chip::NXP::App::ButtonApp sAppButton; -static chip::NXP::App::ButtonBle sBleButton; +/** + * @brief Flag to configure if the app button is enabled. + * + * Enabled by default. + */ +#ifndef CONFIG_APP_BUTTON_ENABLED +#define CONFIG_APP_BUTTON_ENABLED 1 +#endif + +/** + * @brief Flag to configure if the BLE button is enabled. + * + * Enabled by default. + */ +#ifndef CONFIG_BLE_BUTTON_ENABLED +#define CONFIG_BLE_BUTTON_ENABLED 1 +#endif CHIP_ERROR chip::NXP::App::RegisterButtons(void) { ReturnErrorOnFailure(ButtonMgr().Init()); + +#if CONFIG_BLE_BUTTON_ENABLED + static chip::NXP::App::ButtonBle sBleButton; ReturnErrorOnFailure(ButtonMgr().RegisterButton(sBleButton)); +#endif + +#if CONFIG_APP_BUTTON_ENABLED + static chip::NXP::App::ButtonApp sAppButton; ReturnErrorOnFailure(ButtonMgr().RegisterButton(sAppButton)); +#endif return CHIP_NO_ERROR; } diff --git a/examples/platform/nxp/common/ota_requestor/include/OTARequestorInitiator.h b/examples/platform/nxp/common/ota_requestor/include/OTARequestorInitiator.h index 4054bb4a2a..a6289fc3b8 100644 --- a/examples/platform/nxp/common/ota_requestor/include/OTARequestorInitiator.h +++ b/examples/platform/nxp/common/ota_requestor/include/OTARequestorInitiator.h @@ -27,11 +27,11 @@ #ifdef CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER #include CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER #else -#ifdef CONFIG_CHIP +#ifndef CONFIG_APP_FREERTOS_OS #include #else #include "platform/nxp/common/OTAImageProcessorImpl.h" -#endif /* CONFIG_CHIP */ +#endif /* CONFIG_APP_FREERTOS_OS */ #endif /* CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER */ #include diff --git a/examples/platform/nxp/mcxw71_k32w1/app/project_include/openthread/OpenThreadConfig.h b/examples/platform/nxp/mcxw71_k32w1/app/project_include/openthread/OpenThreadConfig.h index 932812aa71..a8890d9a0e 100644 --- a/examples/platform/nxp/mcxw71_k32w1/app/project_include/openthread/OpenThreadConfig.h +++ b/examples/platform/nxp/mcxw71_k32w1/app/project_include/openthread/OpenThreadConfig.h @@ -53,6 +53,7 @@ #define OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE 0 #define OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE 0 #define OPENTHREAD_CONFIG_TCP_ENABLE 0 +#define OPENTHREAD_CONFIG_DNS_CLIENT_OVER_TCP_ENABLE 0 #define OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE 0 #define OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE 0 diff --git a/examples/platform/nxp/rt/rt1060/doc/images/MIMXRT1060-EVKB-TOP.png b/examples/platform/nxp/rt/rt1060/doc/images/MIMXRT1060-EVKB-TOP.png new file mode 100644 index 0000000000..1e9fbff94c Binary files /dev/null and b/examples/platform/nxp/rt/rt1060/doc/images/MIMXRT1060-EVKB-TOP.png differ diff --git a/examples/platform/nxp/rt/rt1060/doc/images/debug0.png b/examples/platform/nxp/rt/rt1060/doc/images/debug0.png new file mode 100644 index 0000000000..6a594f4e01 Binary files /dev/null and b/examples/platform/nxp/rt/rt1060/doc/images/debug0.png differ diff --git a/examples/platform/nxp/rt/rt1060/doc/images/debug1.png b/examples/platform/nxp/rt/rt1060/doc/images/debug1.png new file mode 100644 index 0000000000..b5a9ee59f3 Binary files /dev/null and b/examples/platform/nxp/rt/rt1060/doc/images/debug1.png differ diff --git a/examples/platform/nxp/rt/rt1060/doc/images/flash_driver.png b/examples/platform/nxp/rt/rt1060/doc/images/flash_driver.png new file mode 100644 index 0000000000..0e5ab13691 Binary files /dev/null and b/examples/platform/nxp/rt/rt1060/doc/images/flash_driver.png differ diff --git a/examples/platform/nxp/rt/rt1060/doc/images/gdbdebugger.png b/examples/platform/nxp/rt/rt1060/doc/images/gdbdebugger.png new file mode 100644 index 0000000000..ace1ff8c9b Binary files /dev/null and b/examples/platform/nxp/rt/rt1060/doc/images/gdbdebugger.png differ diff --git a/examples/platform/nxp/rt/rt1060/doc/images/import-local-repository.png b/examples/platform/nxp/rt/rt1060/doc/images/import-local-repository.png new file mode 100644 index 0000000000..630e9f9545 Binary files /dev/null and b/examples/platform/nxp/rt/rt1060/doc/images/import-local-repository.png differ diff --git a/examples/platform/nxp/rt/rt1060/doc/images/import-sdk-git.png b/examples/platform/nxp/rt/rt1060/doc/images/import-sdk-git.png new file mode 100644 index 0000000000..440db43595 Binary files /dev/null and b/examples/platform/nxp/rt/rt1060/doc/images/import-sdk-git.png differ diff --git a/examples/platform/nxp/rt/rt1060/doc/images/mcu-set.png b/examples/platform/nxp/rt/rt1060/doc/images/mcu-set.png new file mode 100644 index 0000000000..a3d83783d7 Binary files /dev/null and b/examples/platform/nxp/rt/rt1060/doc/images/mcu-set.png differ diff --git a/examples/platform/nxp/rt/rt1060/doc/images/rt1060_evkc_IW612_hw_rework.jpg b/examples/platform/nxp/rt/rt1060/doc/images/rt1060_evkc_IW612_hw_rework.jpg new file mode 100644 index 0000000000..fd7c303cfa Binary files /dev/null and b/examples/platform/nxp/rt/rt1060/doc/images/rt1060_evkc_IW612_hw_rework.jpg differ diff --git a/examples/platform/nxp/rt/rt1060/doc/images/rt1060_evkc_IW612_hw_rework_detail.jpg b/examples/platform/nxp/rt/rt1060/doc/images/rt1060_evkc_IW612_hw_rework_detail.jpg new file mode 100644 index 0000000000..c5a43e6f4a Binary files /dev/null and b/examples/platform/nxp/rt/rt1060/doc/images/rt1060_evkc_IW612_hw_rework_detail.jpg differ diff --git a/examples/platform/nxp/rt/rt1060/doc/images/rt1060_k32w061_pin_settings.jpg b/examples/platform/nxp/rt/rt1060/doc/images/rt1060_k32w061_pin_settings.jpg new file mode 100644 index 0000000000..ed616ee5a5 Binary files /dev/null and b/examples/platform/nxp/rt/rt1060/doc/images/rt1060_k32w061_pin_settings.jpg differ diff --git a/examples/platform/nxp/rt/rt1060/doc/images/select-sdk.png b/examples/platform/nxp/rt/rt1060/doc/images/select-sdk.png new file mode 100644 index 0000000000..335a05035e Binary files /dev/null and b/examples/platform/nxp/rt/rt1060/doc/images/select-sdk.png differ diff --git a/examples/platform/nxp/rt/rt1060/doc/images/startup.png b/examples/platform/nxp/rt/rt1060/doc/images/startup.png new file mode 100644 index 0000000000..cd9a8ad90f Binary files /dev/null and b/examples/platform/nxp/rt/rt1060/doc/images/startup.png differ diff --git a/examples/platform/nxp/rt/rt1060/doc/images/toolchain.JPG b/examples/platform/nxp/rt/rt1060/doc/images/toolchain.JPG new file mode 100644 index 0000000000..068ebfb35e Binary files /dev/null and b/examples/platform/nxp/rt/rt1060/doc/images/toolchain.JPG differ diff --git a/examples/platform/nxp/rt/rt1060/factory_data/source/AppFactoryDataExample.cpp b/examples/platform/nxp/rt/rt1060/factory_data/source/AppFactoryDataExample.cpp new file mode 100644 index 0000000000..a37ff1b5c4 --- /dev/null +++ b/examples/platform/nxp/rt/rt1060/factory_data/source/AppFactoryDataExample.cpp @@ -0,0 +1,77 @@ +/* + * + * 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 "AppFactoryData.h" + +#include +#include +#include + +#if CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA +#include "FactoryDataProvider.h" +/* + * Test key used to encrypt factory data before storing it to the flash. + * The software key should be used only during development stage. + * For production usage, it is recommended to use the OTP key which needs to be fused in the RT1060 SW_GP2. + */ +static const uint8_t aes128TestKey[] + __attribute__((aligned)) = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c }; +#else +#include +#endif + +using namespace chip; +using namespace ::chip::Credentials; +using namespace ::chip::DeviceLayer; + +/** + * Allows to register Matter factory data before initializing the Matter stack + * Load factory data from the flash to the RAM. + * Needs to be done before starting other Matter modules to avoid concurrent access issues with DCP hardware module. + * + * This example demonstrates the usage of the ecb with a software key, to use other encryption mode, + * or to use hardware keys, check available methodes from the FactoryDataProviderImpl class. + */ +CHIP_ERROR NXP::App::AppFactoryData_PreMatterStackInit(void) +{ +#if CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA + + FactoryDataPrvdImpl().SetEncryptionMode(FactoryDataProvider::encrypt_ecb); + FactoryDataPrvdImpl().SetAes128Key(&aes128TestKey[0]); + + return FactoryDataPrvdImpl().Init(); +#else + return CHIP_NO_ERROR; +#endif +} + +/** + * Allows to register Matter factory data after initializing the Matter stack + */ +CHIP_ERROR NXP::App::AppFactoryData_PostMatterStackInit(void) +{ +#if CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA + SetDeviceInstanceInfoProvider(&FactoryDataPrvd()); + SetDeviceAttestationCredentialsProvider(&FactoryDataPrvd()); + SetCommissionableDataProvider(&FactoryDataPrvd()); +#else + // Initialize device attestation with example one (only for debug purpose) + SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); +#endif + return CHIP_NO_ERROR; +} diff --git a/examples/platform/nxp/rt/rt1170/BUILD.gn b/examples/platform/nxp/rt/rt1170/BUILD.gn new file mode 100644 index 0000000000..6585e31750 --- /dev/null +++ b/examples/platform/nxp/rt/rt1170/BUILD.gn @@ -0,0 +1,24 @@ +# Copyright (c) 2020-2022 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("//build_overrides/nxp_sdk.gni") + +config("chip_app_project_config") { + include_dirs = [ + "app/project_include", + "../../common/util/include", + "../../common/mbedtls", + ] +} diff --git a/examples/platform/nxp/rt/rt1170/doc/images/IMX-RT1170-EVK-TOP.jpg b/examples/platform/nxp/rt/rt1170/doc/images/IMX-RT1170-EVK-TOP.jpg new file mode 100644 index 0000000000..a5dc1619ed Binary files /dev/null and b/examples/platform/nxp/rt/rt1170/doc/images/IMX-RT1170-EVK-TOP.jpg differ diff --git a/examples/platform/nxp/rt/rt1170/doc/images/debug0.png b/examples/platform/nxp/rt/rt1170/doc/images/debug0.png new file mode 100644 index 0000000000..e5b02cfe13 Binary files /dev/null and b/examples/platform/nxp/rt/rt1170/doc/images/debug0.png differ diff --git a/examples/platform/nxp/rt/rt1170/doc/images/flash_driver.png b/examples/platform/nxp/rt/rt1170/doc/images/flash_driver.png new file mode 100644 index 0000000000..610acab904 Binary files /dev/null and b/examples/platform/nxp/rt/rt1170/doc/images/flash_driver.png differ diff --git a/examples/platform/nxp/rt/rt1170/doc/images/iwx612_2EL.jpg b/examples/platform/nxp/rt/rt1170/doc/images/iwx612_2EL.jpg new file mode 100644 index 0000000000..1482efefbc Binary files /dev/null and b/examples/platform/nxp/rt/rt1170/doc/images/iwx612_2EL.jpg differ diff --git a/examples/platform/nxp/rt/rt1170/doc/images/mcu-set.png b/examples/platform/nxp/rt/rt1170/doc/images/mcu-set.png new file mode 100644 index 0000000000..27bc4d910a Binary files /dev/null and b/examples/platform/nxp/rt/rt1170/doc/images/mcu-set.png differ diff --git a/examples/platform/nxp/rt/rt1170/doc/images/mcuboot_demo.PNG b/examples/platform/nxp/rt/rt1170/doc/images/mcuboot_demo.PNG new file mode 100644 index 0000000000..0c228b7227 Binary files /dev/null and b/examples/platform/nxp/rt/rt1170/doc/images/mcuboot_demo.PNG differ diff --git a/examples/platform/nxp/rt/rt1170/doc/images/mcuboot_swap_config.png b/examples/platform/nxp/rt/rt1170/doc/images/mcuboot_swap_config.png new file mode 100644 index 0000000000..83c4fdb433 Binary files /dev/null and b/examples/platform/nxp/rt/rt1170/doc/images/mcuboot_swap_config.png differ diff --git a/examples/platform/nxp/rt/rt1170/doc/images/murata_usd-M2_adapter.jpg b/examples/platform/nxp/rt/rt1170/doc/images/murata_usd-M2_adapter.jpg new file mode 100644 index 0000000000..0d8166707b Binary files /dev/null and b/examples/platform/nxp/rt/rt1170/doc/images/murata_usd-M2_adapter.jpg differ diff --git a/examples/platform/nxp/rt/rt1170/doc/images/murata_usd-m2_connections_1.jpg b/examples/platform/nxp/rt/rt1170/doc/images/murata_usd-m2_connections_1.jpg new file mode 100644 index 0000000000..01febd90b5 Binary files /dev/null and b/examples/platform/nxp/rt/rt1170/doc/images/murata_usd-m2_connections_1.jpg differ diff --git a/examples/platform/nxp/rt/rt1170/doc/images/murata_usd-m2_connections_2.jpg b/examples/platform/nxp/rt/rt1170/doc/images/murata_usd-m2_connections_2.jpg new file mode 100644 index 0000000000..91bae4b5f5 Binary files /dev/null and b/examples/platform/nxp/rt/rt1170/doc/images/murata_usd-m2_connections_2.jpg differ diff --git a/examples/platform/nxp/rt/rt1170/doc/images/select-sdk.png b/examples/platform/nxp/rt/rt1170/doc/images/select-sdk.png new file mode 100644 index 0000000000..412731cc98 Binary files /dev/null and b/examples/platform/nxp/rt/rt1170/doc/images/select-sdk.png differ diff --git a/examples/platform/nxp/rt/rt1170/doc/images/startup.png b/examples/platform/nxp/rt/rt1170/doc/images/startup.png new file mode 100644 index 0000000000..c805bc53b0 Binary files /dev/null and b/examples/platform/nxp/rt/rt1170/doc/images/startup.png differ diff --git a/examples/platform/nxp/rt/rt1170/doc/images/toolchain.JPG b/examples/platform/nxp/rt/rt1170/doc/images/toolchain.JPG new file mode 100644 index 0000000000..068ebfb35e Binary files /dev/null and b/examples/platform/nxp/rt/rt1170/doc/images/toolchain.JPG differ diff --git a/examples/platform/openiotsdk/app/openiotsdk_startup_gcc.cpp b/examples/platform/openiotsdk/app/openiotsdk_startup_gcc.cpp index 9add2ca4e5..88488ff647 100644 --- a/examples/platform/openiotsdk/app/openiotsdk_startup_gcc.cpp +++ b/examples/platform/openiotsdk/app/openiotsdk_startup_gcc.cpp @@ -57,7 +57,7 @@ alignas(8) static uint8_t malloc_mutex_obj[80]; // C runtime import: constructor initialization and main extern "C" void __libc_init_array(void); -extern "C" int main(void); +int main(void); // IOT SDK serial declarations #define STDIN_FILENO 0 diff --git a/examples/platform/qpg/project_include/OpenThreadConfig.h b/examples/platform/qpg/project_include/OpenThreadConfig.h index d6955a90a5..a5dd275eb1 100644 --- a/examples/platform/qpg/project_include/OpenThreadConfig.h +++ b/examples/platform/qpg/project_include/OpenThreadConfig.h @@ -80,6 +80,8 @@ #define OPENTHREAD_EXAMPLES_SIMULATION 0 #define OPENTHREAD_CONFIG_PLATFORM_BOOTLOADER_MODE_ENABLE 0 +#define OPENTHREAD_PLATFORM_NEXUS 0 + // Use the Qorvo-supplied default platform configuration for remainder // of OpenThread config options. // diff --git a/examples/platform/silabs/BaseApplication.cpp b/examples/platform/silabs/BaseApplication.cpp index 37efb09fe5..b7ce3e9fed 100644 --- a/examples/platform/silabs/BaseApplication.cpp +++ b/examples/platform/silabs/BaseApplication.cpp @@ -259,7 +259,7 @@ CHIP_ERROR BaseApplication::Init() ChipLogProgress(AppServer, "APP: Wait WiFi Init"); while (!wfx_hw_ready()) { - vTaskDelay(pdMS_TO_TICKS(10)); + osDelay(pdMS_TO_TICKS(10)); } ChipLogProgress(AppServer, "APP: Done WiFi Init"); /* We will init server when we get IP */ diff --git a/examples/platform/silabs/Si70xxSensor.cpp b/examples/platform/silabs/Si70xxSensor.cpp new file mode 100644 index 0000000000..0b03ca040f --- /dev/null +++ b/examples/platform/silabs/Si70xxSensor.cpp @@ -0,0 +1,67 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * 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 "sl_board_control.h" +#include "sl_i2cspm_instances.h" +#include "sl_si70xx.h" +#include +#include + +namespace { + +constexpr uint16_t kSensorTemperatureOffset = 475; +bool initialized = false; + +} // namespace + +namespace Si70xxSensor { + +sl_status_t Init() +{ + sl_status_t status = SL_STATUS_OK; + + status = sl_board_enable_sensor(SL_BOARD_SENSOR_RHT); + VerifyOrReturnError(status == SL_STATUS_OK, status); + + status = sl_si70xx_init(sl_i2cspm_sensor, SI7021_ADDR); + VerifyOrReturnError(status == SL_STATUS_OK, status); + + initialized = true; + return status; +} + +sl_status_t GetSensorData(uint16_t & relativeHumidity, int16_t & temperature) +{ + VerifyOrReturnError(initialized, SL_STATUS_NOT_INITIALIZED); + + sl_status_t status = SL_STATUS_OK; + int32_t tempTemperature = 0; + uint32_t tempHumidity = 0; + + status = sl_si70xx_measure_rh_and_temp(sl_i2cspm_sensor, SI7021_ADDR, &tempHumidity, &tempTemperature); + VerifyOrReturnError(status == SL_STATUS_OK, status); + + // Sensor precision is milliX. We need to reduce to change the precision to centiX to fit with the cluster attributes presicion. + temperature = static_cast(tempTemperature / 10) - kSensorTemperatureOffset; + relativeHumidity = static_cast(tempHumidity / 10); + + return status; +} + +}; // namespace Si70xxSensor diff --git a/examples/platform/silabs/Si70xxSensor.h b/examples/platform/silabs/Si70xxSensor.h new file mode 100644 index 0000000000..8dc31a8daf --- /dev/null +++ b/examples/platform/silabs/Si70xxSensor.h @@ -0,0 +1,48 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * 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 "sl_status.h" +#include + +namespace Si70xxSensor { + +/** + * @brief Initialises the Si70xx Sensor. + * + * @return sl_status_t SL_STATUS_OK if there were no errors occured during initialisation. + * Error if an underlying platform error occured + */ +sl_status_t Init(); + +/** + * @brief Reads Humidity and temperature values from the Si70xx sensor. + * The init function must be called before calling the GetSensorData. + * + * @param[out] relativeHumidity Relative humidity percentage in centi-pourcentage (1000 == 10.00%) + * @param[out] temperature Ambiant temperature in centi-celsium (1000 == 10.00C) + * + * @return sl_status_t SL_STATUS_OK if there were no errors occured during initialisation. + * SL_STATUS_NOT_INITIALIZED if the sensor was not initialised + * Error if an underlying platform error occured + */ +sl_status_t GetSensorData(uint16_t & relativeHumidity, int16_t & temperature); + +}; // namespace Si70xxSensor diff --git a/examples/platform/silabs/SiWx917/BUILD.gn b/examples/platform/silabs/SiWx917/BUILD.gn index 156fb38e49..cf7b7aedbf 100644 --- a/examples/platform/silabs/SiWx917/BUILD.gn +++ b/examples/platform/silabs/SiWx917/BUILD.gn @@ -252,6 +252,13 @@ source_set("siwx917-common") { public_deps += [ ":test-event-trigger" ] } + if (sl_enable_si70xx_sensor) { + sources += [ + "${silabs_common_plat_dir}/Si70xxSensor.cpp", + "${silabs_common_plat_dir}/Si70xxSensor.h", + ] + } + if (app_data_model != "") { public_deps += [ app_data_model ] } diff --git a/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.cpp b/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.cpp index c65a97ea3a..c16d99ad28 100644 --- a/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.cpp +++ b/examples/platform/silabs/SiWx917/SiWx917/sl_wifi_if.cpp @@ -97,10 +97,6 @@ bool ps_requirement_added = false; // TODO: Figure out why we actually need this, we are already handling failure and retries somewhere else. #define WIFI_SCAN_TIMEOUT_TICK 10000 -#if !defined(MIN) -#define MIN(A, B) ((A) < (B) ? (A) : (B)) -#endif - WfxRsi_t wfx_rsi; bool hasNotifiedIPV6 = false; @@ -544,12 +540,12 @@ sl_status_t show_scan_results(sl_wifi_scan_result_t * scan_result) memset(&cur_scan_result, 0, sizeof(cur_scan_result)); cur_scan_result.ssid_length = strnlen((char *) scan_result->scan_info[idx].ssid, - chip::min(sizeof(scan_result->scan_info[idx].ssid), WFX_MAX_SSID_LENGTH)); + std::min(sizeof(scan_result->scan_info[idx].ssid), WFX_MAX_SSID_LENGTH)); chip::Platform::CopyString(cur_scan_result.ssid, cur_scan_result.ssid_length, (char *) scan_result->scan_info[idx].ssid); // if user has provided ssid, then check if the current scan result ssid matches the user provided ssid if (wfx_rsi.scan_ssid != NULL && - (strncmp(wfx_rsi.scan_ssid, cur_scan_result.ssid, MIN(strlen(wfx_rsi.scan_ssid), strlen(cur_scan_result.ssid))) == + (strncmp(wfx_rsi.scan_ssid, cur_scan_result.ssid, std::min(strlen(wfx_rsi.scan_ssid), strlen(cur_scan_result.ssid))) == CMP_SUCCESS)) { continue; @@ -626,7 +622,7 @@ static void wfx_rsi_save_ap_info(void) // translation **********************************************************************************************/ static sl_status_t wfx_rsi_do_join(void) { - ReturnErrorCodeIf((wfx_rsi.dev_state & (WFX_RSI_ST_STA_CONNECTING | WFX_RSI_ST_STA_CONNECTED)), SL_STATUS_IN_PROGRESS); + VerifyOrReturnError(!(wfx_rsi.dev_state & (WFX_RSI_ST_STA_CONNECTING | WFX_RSI_ST_STA_CONNECTED)), SL_STATUS_IN_PROGRESS); sl_status_t status = SL_STATUS_OK; sl_wifi_client_configuration_t ap; memset(&ap, 0, sizeof(ap)); @@ -687,7 +683,7 @@ static sl_status_t wfx_rsi_do_join(void) status = sl_wifi_connect(SL_WIFI_CLIENT_INTERFACE, &ap, timeout_ms); // sl_wifi_connect returns SL_STATUS_IN_PROGRESS if join is in progress // after the initial scan is done, the scan does not check for SSID - ReturnErrorCodeIf((status == SL_STATUS_OK || status == SL_STATUS_IN_PROGRESS), status); + VerifyOrReturnError(status != SL_STATUS_OK && status != SL_STATUS_IN_PROGRESS, status); // failure only happens when the firmware returns an error ChipLogError(DeviceLayer, "wfx_rsi_do_join: sl_wifi_connect failed: 0x%lx", static_cast(status)); diff --git a/examples/platform/silabs/SiWx917/SiWx917/sl_wlan_config.h b/examples/platform/silabs/SiWx917/SiWx917/sl_wlan_config.h index cd605b0f0a..21ee4a5555 100644 --- a/examples/platform/silabs/SiWx917/SiWx917/sl_wlan_config.h +++ b/examples/platform/silabs/SiWx917/SiWx917/sl_wlan_config.h @@ -29,11 +29,19 @@ //! Disable feature #define RSI_DISABLE 0 +// Temmporary work-around for wifi-init failure in ACX modules with WiseConnect v3.3.3. This can be removed after integrating with +// WiseConnect v3.4.0 +#if (SL_SI91X_ACX_MODULE == 1) +#define REGION_CODE IGNORE_REGION +#else +#define REGION_CODE US +#endif + static const sl_wifi_device_configuration_t config = { .boot_option = LOAD_NWP_FW, .mac_address = NULL, .band = SL_SI91X_WIFI_BAND_2_4GHZ, - .region_code = US, + .region_code = REGION_CODE, .boot_config = { .oper_mode = SL_SI91X_CLIENT_MODE, .coex_mode = SL_SI91X_WLAN_BLE_MODE, .feature_bit_map = diff --git a/examples/platform/silabs/SoftwareFaultReports.cpp b/examples/platform/silabs/SoftwareFaultReports.cpp index e656717b88..977f3df20e 100644 --- a/examples/platform/silabs/SoftwareFaultReports.cpp +++ b/examples/platform/silabs/SoftwareFaultReports.cpp @@ -17,10 +17,10 @@ */ #include "SoftwareFaultReports.h" -#include "FreeRTOS.h" #include "silabs_utils.h" #include #include +#include #include #include #include @@ -75,7 +75,7 @@ void OnSoftwareFaultEventHandler(const char * faultRecordString) // Allow some time for the Fault event to be sent as the next action after exiting this function // is typically an assert or reboot. // Depending on the task at fault, it is possible the event can't be transmitted. - vTaskDelay(pdMS_TO_TICKS(1000)); + osDelay(pdMS_TO_TICKS(1000)); #endif // MATTER_DM_PLUGIN_SOFTWARE_DIAGNOSTICS_SERVER } diff --git a/examples/platform/silabs/TemperatureSensor.cpp b/examples/platform/silabs/TemperatureSensor.cpp deleted file mode 100644 index d7e13e1993..0000000000 --- a/examples/platform/silabs/TemperatureSensor.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * 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 "TemperatureSensor.h" - -#include "sl_board_control.h" -#include "sl_i2cspm_instances.h" -#include "sl_si70xx.h" - -namespace TemperatureSensor { -constexpr uint16_t kSensorTemperatureOffset = 800; -static bool initialized = false; - -sl_status_t Init() -{ - sl_status_t status; - sl_i2cspm_t * rht_sensor = sl_i2cspm_sensor; - (void) sl_board_enable_sensor(SL_BOARD_SENSOR_RHT); - - status = sl_si70xx_init(rht_sensor, SI7021_ADDR); - initialized = (SL_STATUS_OK == status); - return status; -} - -sl_status_t GetTemp(uint32_t * relativeHumidity, int16_t * temperature) -{ - if (!initialized) - { - return SL_STATUS_NOT_INITIALIZED; - } - - // Sensor resolution 0.001 C - // DataModel resolution 0.01 C - sl_status_t status; - sl_i2cspm_t * rht_sensor = sl_i2cspm_sensor; - int32_t temp = 0; - status = sl_si70xx_measure_rh_and_temp(rht_sensor, SI7021_ADDR, relativeHumidity, &temp); - - if (temperature != nullptr) - { - *temperature = static_cast(temp / 10) - kSensorTemperatureOffset; - } - - return status; -} -}; // namespace TemperatureSensor diff --git a/examples/platform/silabs/display/demo-ui.c b/examples/platform/silabs/display/demo-ui.c index e0fe37ec9c..d909cb1f88 100644 --- a/examples/platform/silabs/display/demo-ui.c +++ b/examples/platform/silabs/display/demo-ui.c @@ -167,6 +167,5 @@ void demoUIClearMainScreen(uint8_t * name) { GLIB_clear(&glibContext); demoUIDisplayHeader((char *) name); - demoUIDisplayApp(false); demoUIDisplayProtocols(); } diff --git a/examples/platform/silabs/display/lcd.h b/examples/platform/silabs/display/lcd.h index b62664c9b4..61fa816743 100644 --- a/examples/platform/silabs/display/lcd.h +++ b/examples/platform/silabs/display/lcd.h @@ -65,6 +65,7 @@ class SilabsLCD int DrawPixel(void * pContext, int32_t x, int32_t y); int Update(void); void WriteDemoUI(bool state); + void WriteDemoUI(); void SetCustomUI(customUICB cb); void GetScreen(Screen_e & screen); @@ -85,8 +86,6 @@ class SilabsLCD bool protocol1 = false; /* data */ } DemoState_t; - void WriteDemoUI(); - #ifdef QR_CODE_ENABLED void WriteQRCode(); void LCDFillRect(uint8_t x, uint8_t y, uint8_t w, uint8_t h); diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index 91cd2c1a0a..f5c79a2252 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -308,6 +308,13 @@ source_set("efr32-common") { public_deps += [ ":test-event-trigger" ] } + if (sl_enable_si70xx_sensor) { + sources += [ + "${silabs_common_plat_dir}/Si70xxSensor.cpp", + "${silabs_common_plat_dir}/Si70xxSensor.h", + ] + } + if (app_data_model != "") { public_deps += [ app_data_model ] } diff --git a/examples/platform/silabs/efr32/rs911x/rsi_if.cpp b/examples/platform/silabs/efr32/rs911x/rsi_if.cpp index 02500c80f7..78d13498ef 100644 --- a/examples/platform/silabs/efr32/rs911x/rsi_if.cpp +++ b/examples/platform/silabs/efr32/rs911x/rsi_if.cpp @@ -506,6 +506,9 @@ static void wfx_rsi_save_ap_info(void) // translation case SME_WPA2_ENTERPRISE: wfx_rsi.sec.security = WFX_SEC_WPA2; break; + case SME_WPA_WPA2_MIXED_MODE: + wfx_rsi.sec.security = WFX_SEC_WPA_WPA2_MIXED; + break; case SME_WEP: wfx_rsi.sec.security = WFX_SEC_WEP; break; @@ -551,6 +554,7 @@ static void wfx_rsi_do_join(void) break; case WFX_SEC_WPA: case WFX_SEC_WPA2: + case WFX_SEC_WPA_WPA2_MIXED: connect_security_mode = RSI_WPA_WPA2_MIXED; break; #if WIFI_ENABLE_SECURITY_WPA3_TRANSITION @@ -752,7 +756,7 @@ void ProcessEvent(WfxEvent_t inEvent) // clear structure and calculate size of SSID memset(&ap, 0, sizeof(ap)); ap.ssid_length = - strnlen(reinterpret_cast(scan->ssid), chip::min(sizeof(scan->ssid), WFX_MAX_SSID_LENGTH)); + strnlen(reinterpret_cast(scan->ssid), std::min(sizeof(scan->ssid), WFX_MAX_SSID_LENGTH)); chip::Platform::CopyString(ap.ssid, ap.ssid_length, reinterpret_cast(scan->ssid)); // check if the scanned ssid is the one we are looking for diff --git a/examples/platform/silabs/efr32/wf200/host_if.cpp b/examples/platform/silabs/efr32/wf200/host_if.cpp index 044ecc6e97..516abca22b 100644 --- a/examples/platform/silabs/efr32/wf200/host_if.cpp +++ b/examples/platform/silabs/efr32/wf200/host_if.cpp @@ -736,7 +736,7 @@ int32_t wfx_get_ap_info(wfx_wifi_scan_result_t * ap) { int32_t signal_strength; - ap->ssid_length = strnlen(ap_info.ssid, chip::min(sizeof(ap_info.ssid), WFX_MAX_SSID_LENGTH)); + ap->ssid_length = strnlen(ap_info.ssid, std::min(sizeof(ap_info.ssid), WFX_MAX_SSID_LENGTH)); chip::Platform::CopyString(ap->ssid, ap->ssid_length, ap_info.ssid); memcpy(ap->bssid, ap_info.bssid, sizeof(ap_info.bssid)); ap->security = ap_info.security; diff --git a/examples/platform/silabs/provision/ProvisionStorageFlash.cpp b/examples/platform/silabs/provision/ProvisionStorageFlash.cpp index af59d6560c..abca012e36 100644 --- a/examples/platform/silabs/provision/ProvisionStorageFlash.cpp +++ b/examples/platform/silabs/provision/ProvisionStorageFlash.cpp @@ -78,7 +78,7 @@ CHIP_ERROR DecodeTotal(Encoding::Buffer & reader, uint16_t & total) ReturnErrorOnFailure(reader.Get(sz)); total = (0xffff == sz) ? sizeof(uint16_t) : sz; reader.in = reader.begin + total; - ReturnErrorCodeIf(reader.in > reader.end, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(reader.in <= reader.end, CHIP_ERROR_INTERNAL); return CHIP_NO_ERROR; } @@ -118,7 +118,7 @@ CHIP_ERROR Set(uint16_t id, Encoding::Buffer & in) { // New entry size_t temp_total = found.offset; - ReturnErrorCodeIf(temp_total + in.Size() > kPageSize, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(temp_total + in.Size() <= kPageSize, CHIP_ERROR_INVALID_ARGUMENT); // Copy entry ReturnErrorOnFailure(in.Get(page + temp_total, in.Size())); // Update total @@ -138,7 +138,7 @@ CHIP_ERROR Set(uint16_t id, Encoding::Buffer & in) { // Size change, move to the end uint16_t temp_total = total - found.encoded_size; - ReturnErrorCodeIf(temp_total + in.Size() > kPageSize, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(temp_total + in.Size() <= kPageSize, CHIP_ERROR_INVALID_ARGUMENT); // Remove the entry memmove(page + found.offset, page + found.offset + found.encoded_size, temp_total); // Add the entry diff --git a/examples/platform/silabs/uart.cpp b/examples/platform/silabs/uart.cpp index a43a23fa2c..390e151cb7 100644 --- a/examples/platform/silabs/uart.cpp +++ b/examples/platform/silabs/uart.cpp @@ -38,7 +38,6 @@ extern "C" { #include "rsi_board.h" #include "rsi_debug.h" #include "rsi_rom_egpio.h" -#include "sl_si91x_usart.h" #else // For EFR32 #if (_SILICON_LABS_32B_SERIES < 3) #include "em_core.h" @@ -65,10 +64,6 @@ extern "C" { #include "sl_power_manager.h" #endif -#if !defined(MIN) -#define MIN(A, B) ((A) < (B) ? (A) : (B)) -#endif - #ifdef SL_CATALOG_UARTDRV_EUSART_PRESENT #define HELPER1(x) EUSART##x##_RX_IRQn #else @@ -278,7 +273,7 @@ static uint16_t RetrieveFromFifo(Fifo_t * fifo, uint8_t * pData, uint16_t SizeTo VerifyOrDie(pData != nullptr); VerifyOrDie(SizeToRead <= fifo->MaxSize); - uint16_t ReadSize = MIN(SizeToRead, AvailableDataCount(fifo)); + uint16_t ReadSize = std::min(SizeToRead, AvailableDataCount(fifo)); uint16_t nBytesBeforWrap = (fifo->MaxSize - fifo->Head); if (ReadSize > nBytesBeforWrap) diff --git a/examples/platform/silabs/wifi/wfx_rsi_host.cpp b/examples/platform/silabs/wifi/wfx_rsi_host.cpp index 130d9c90d1..d76bc9c795 100644 --- a/examples/platform/silabs/wifi/wfx_rsi_host.cpp +++ b/examples/platform/silabs/wifi/wfx_rsi_host.cpp @@ -369,7 +369,7 @@ bool wfx_start_scan(char * ssid, void (*callback)(wfx_wifi_scan_result_t *)) wfx_rsi.scan_cb = callback; VerifyOrReturnError(ssid != nullptr, false); - wfx_rsi.scan_ssid_length = strnlen(ssid, chip::min(sizeof(ssid), WFX_MAX_SSID_LENGTH)); + wfx_rsi.scan_ssid_length = strnlen(ssid, std::min(sizeof(ssid), WFX_MAX_SSID_LENGTH)); wfx_rsi.scan_ssid = reinterpret_cast(chip::Platform::MemoryAlloc(wfx_rsi.scan_ssid_length)); VerifyOrReturnError(wfx_rsi.scan_ssid != nullptr, false); chip::Platform::CopyString(wfx_rsi.scan_ssid, wfx_rsi.scan_ssid_length, ssid); diff --git a/examples/pump-app/nrfconnect/README.md b/examples/pump-app/nrfconnect/README.md index 16fbc2f014..98d3e1518b 100644 --- a/examples/pump-app/nrfconnect/README.md +++ b/examples/pump-app/nrfconnect/README.md @@ -42,7 +42,7 @@ This example is running on the nRF Connect platform, which is based on Nordic Semiconductor's [nRF Connect SDK](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/index.html) and [Zephyr RTOS](https://zephyrproject.org/). Visit Matter's -[nRF Connect platform overview](../../../docs/guides/nrfconnect_platform_overview.md) +[nRF Connect platform overview](../../../docs/platforms/nrf/nrfconnect_platform_overview.md) to read more about the platform structure and dependencies. The Matter device that runs the pump application is controlled by the Matter @@ -213,7 +213,7 @@ by default). **SEGGER J-Link USB port** can be used to get logs from the device or communicate with it using the -[command line interface](../../../docs/guides/nrfconnect_examples_cli.md). +[command line interface](../../../docs/platforms/nrf/nrfconnect_examples_cli.md). **NFC port with antenna attached** can be used to start the [rendezvous](#bluetooth-le-rendezvous) by providing the commissioning @@ -415,7 +415,7 @@ depending on the selected board: the necessary application functionalities to optimize its performance. For more information, see the -[Configuring nRF Connect SDK examples](../../../docs/guides/nrfconnect_examples_configuration.md) +[Configuring nRF Connect SDK examples](../../../docs/platforms/nrf/nrfconnect_examples_configuration.md) page.
@@ -439,19 +439,20 @@ directory: ## Testing the example -Check the [CLI tutorial](../../../docs/guides/nrfconnect_examples_cli.md) to -learn how to use command-line interface of the application. +Check the [CLI tutorial](../../../docs/platforms/nrf/nrfconnect_examples_cli.md) +to learn how to use command-line interface of the application. ### Testing using Linux CHIPTool -Read the [CHIP Tool user guide](../../../docs/guides/chip_tool_guide.md) to see -how to use [CHIP Tool for Linux or mac OS](../../chip-tool/README.md) to +Read the +[CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md) +to see how to use [CHIP Tool for Linux or mac OS](../../chip-tool/README.md) to commission and control the application within a Matter-enabled Thread network. ### Testing using Android CHIPTool Read the -[Android commissioning guide](../../../docs/guides/nrfconnect_android_commissioning.md) +[Android commissioning guide](../../../docs/platforms/nrf/nrfconnect_android_commissioning.md) to see how to use [CHIPTool](../../../examples/android/CHIPTool/README.md) for Android smartphones to commission and control the application within a Matter-enabled Thread network. diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index fc30273ac0..d4ac8e35a3 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -957,6 +957,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/pump-app/silabs/README.md b/examples/pump-app/silabs/README.md index 7bde704c4a..70d83e4de5 100644 --- a/examples/pump-app/silabs/README.md +++ b/examples/pump-app/silabs/README.md @@ -197,7 +197,7 @@ combination with JLinkRTTClient as follows: - It is assumed here that you already have an OpenThread border router configured and running. If not see the following guide - [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) + [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/platforms/openthread/openthread_border_router_pi.md) for more information on how to setup a border router on a raspberryPi. Take note that the RCP code is available directly through @@ -307,7 +307,7 @@ tracking code inside the `trackAlloc` and `trackFree` function For the description of Software Update process with EFR32 example applications see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) +[EFR32 OTA Software Update](../../../docs/platforms/silabs/silabs_efr32_software_update.md) ## Group Communication (Multicast) diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.matter b/examples/pump-app/silabs/data_model/pump-thread-app.matter index c45e6dcfb8..7d730d759c 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.matter +++ b/examples/pump-app/silabs/data_model/pump-thread-app.matter @@ -957,6 +957,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.matter b/examples/pump-app/silabs/data_model/pump-wifi-app.matter index c45e6dcfb8..7d730d759c 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.matter +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.matter @@ -957,6 +957,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/pump-controller-app/nrfconnect/README.md b/examples/pump-controller-app/nrfconnect/README.md index 64f37c4bb6..b492c3ec38 100644 --- a/examples/pump-controller-app/nrfconnect/README.md +++ b/examples/pump-controller-app/nrfconnect/README.md @@ -43,7 +43,7 @@ This example is running on the nRF Connect platform, which is based on Nordic Semiconductor's [nRF Connect SDK](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/index.html) and [Zephyr RTOS](https://zephyrproject.org/). Visit CHIP's -[nRF Connect platform overview](../../../docs/guides/nrfconnect_platform_overview.md) +[nRF Connect platform overview](../../../docs/platforms/nrf/nrfconnect_platform_overview.md) to read more about the platform structure and dependencies. The Matter device that runs the pump application is controlled by the Matter @@ -214,7 +214,7 @@ by default). **SEGGER J-Link USB port** can be used to get logs from the device or communicate with it using the -[command line interface](../../../docs/guides/nrfconnect_examples_cli.md). +[command line interface](../../../docs/platforms/nrf/nrfconnect_examples_cli.md). **NFC port with antenna attached** can be used to start the [rendezvous](#bluetooth-le-rendezvous) by providing the commissioning @@ -415,7 +415,7 @@ depending on the selected board: the necessary application functionalities to optimize its performance. For more information, see the -[Configuring nRF Connect SDK examples](../../../docs/guides/nrfconnect_examples_configuration.md) +[Configuring nRF Connect SDK examples](../../../docs/platforms/nrf/nrfconnect_examples_configuration.md) page.
@@ -439,19 +439,20 @@ directory: ## Testing the example -Check the [CLI tutorial](../../../docs/guides/nrfconnect_examples_cli.md) to -learn how to use command-line interface of the application. +Check the [CLI tutorial](../../../docs/platforms/nrf/nrfconnect_examples_cli.md) +to learn how to use command-line interface of the application. ### Testing using Linux CHIPTool -Read the [CHIP Tool user guide](../../../docs/guides/chip_tool_guide.md) to see -how to use [CHIP Tool for Linux or mac OS](../../chip-tool/README.md) to +Read the +[CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md) +to see how to use [CHIP Tool for Linux or mac OS](../../chip-tool/README.md) to commission and control the application within a Matter-enabled Thread network. ### Testing using Android CHIPTool Read the -[Android commissioning guide](../../../docs/guides/nrfconnect_android_commissioning.md) +[Android commissioning guide](../../../docs/platforms/nrf/nrfconnect_android_commissioning.md) to see how to use [CHIPTool](../../../examples/android/CHIPTool/README.md) for Android smartphones to commission and control the application within a CHIP-enabled Thread network. diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index 43d27b44e1..a7c2ebcd0f 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -832,6 +832,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/refrigerator-app/linux/README.md b/examples/refrigerator-app/linux/README.md index c969832bcd..cf66321b9a 100644 --- a/examples/refrigerator-app/linux/README.md +++ b/examples/refrigerator-app/linux/README.md @@ -7,7 +7,7 @@ for Raspberry Pi Desktop 20.10 (aarch64)** To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini** **EVK**, see the associated -[README document](../../../docs/guides/nxp/nxp_imx8m_linux_examples.md) for +[README document](../../../docs/platforms/nxp/nxp_imx8m_linux_examples.md) for details.
diff --git a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter index 6a43e52c64..f3149e01af 100644 --- a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter +++ b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter @@ -561,6 +561,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/refrigerator-app/silabs/BUILD.gn b/examples/refrigerator-app/silabs/BUILD.gn new file mode 100644 index 0000000000..9e63c6c10e --- /dev/null +++ b/examples/refrigerator-app/silabs/BUILD.gn @@ -0,0 +1,243 @@ +# Copyright (c) 2024 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/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/efr32_sdk.gni") +import("//build_overrides/pigweed.gni") + +import("${build_root}/config/defaults.gni") +import("${efr32_sdk_build_root}/silabs_executable.gni") + +import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") +import("${chip_root}/src/platform/device.gni") +import("${chip_root}/third_party/silabs/silabs_board.gni") + +if (chip_enable_pw_rpc) { + import("//build_overrides/pigweed.gni") + import("$dir_pw_build/target_types.gni") +} + +assert(current_os == "freertos") + +silabs_project_dir = "${chip_root}/examples/refrigerator-app/silabs" +examples_common_plat_dir = "${chip_root}/examples/platform/silabs" + +if (wifi_soc) { + import("${chip_root}/third_party/silabs/SiWx917_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917" +} else { + import("${efr32_sdk_build_root}/efr32_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32" +} + +import("${examples_common_plat_dir}/args.gni") + +declare_args() { + # Dump memory usage at link time. + chip_print_memory_usage = false + + # Enable the temperature sensor + # Some boards do not have a temperature sensor + use_temp_sensor = false +} + +if (wifi_soc) { + siwx917_sdk("sdk") { + sources = [ + "${examples_common_plat_dir}/FreeRTOSConfig.h", + "${silabs_project_dir}/include/CHIPProjectConfig.h", + ] + + include_dirs = [ + "${chip_root}/src/platform/silabs/SiWx917", + "${silabs_project_dir}/include", + "${examples_plat_dir}", + "${chip_root}/src/lib", + "${examples_common_plat_dir}", + ] + + defines = [] + if (chip_enable_pw_rpc) { + defines += [ + "HAL_VCOM_ENABLE=1", + "PW_RPC_ENABLED", + ] + } + } +} else { + efr32_sdk("sdk") { + sources = [ + "${examples_common_plat_dir}/FreeRTOSConfig.h", + "${silabs_project_dir}/include/CHIPProjectConfig.h", + ] + + include_dirs = [ + "${chip_root}/src/platform/silabs/efr32", + "${silabs_project_dir}/include", + "${examples_plat_dir}", + "${chip_root}/src/lib", + "${examples_common_plat_dir}", + ] + + if (use_wf200) { + include_dirs += [ "${examples_plat_dir}/wf200" ] + } + + if (chip_enable_ble_rs911x) { + include_dirs += [ + "${chip_root}/src/platform/silabs/efr32/rs911x", + "${examples_plat_dir}/rs911x", + "${examples_plat_dir}/rs911x/hal", + ] + } + + defines = [] + if (chip_enable_pw_rpc) { + defines += [ + "HAL_VCOM_ENABLE=1", + "PW_RPC_ENABLED", + ] + } + + if (use_temp_sensor) { + include_dirs += [ + "${efr32_sdk_root}/platform/driver/i2cspm/inc", + "${efr32_sdk_root}/app/bluetooth/common/sensor_rht", + "${efr32_sdk_root}/app/bluetooth/common/sensor_rht/config", + "${efr32_sdk_root}/hardware/driver/si70xx/inc", + "${efr32_sdk_root}/app/bluetooth/common/sensor_select", + "${efr32_sdk_root}/platform/common/config", + ] + + defines += [ "USE_TEMP_SENSOR" ] + } + } +} + +silabs_executable("refrigerator_app") { + output_name = "matter-silabs-refrigerator-example.out" + defines = [] + include_dirs = [ + "include", + "${chip_root}/examples/refrigerator-app/refrigerator-common/include", + ] + + sources = [ + "${chip_root}/examples/refrigerator-app/refrigerator-common/src/static-supported-temperature-levels.cpp", + "${examples_common_plat_dir}/main.cpp", + "src/AppTask.cpp", + "src/RefrigeratorManager.cpp", + "src/ZclCallbacks.cpp", + "src/refrigerator-and-temperature-controlled-cabinet-mode.cpp", + ] + + if (use_temp_sensor) { + sources += [ + "${efr32_sdk_root}/hardware/driver/si70xx/src/sl_si70xx.c", + "${efr32_sdk_root}/platform/common/src/sl_status.c", + "${efr32_sdk_root}/platform/driver/i2cspm/src/sl_i2cspm.c", + "${efr32_sdk_root}/platform/emlib/src/em_i2c.c", + "${examples_common_plat_dir}/TemperatureSensor.cpp", + "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_i2cspm_init.c", + ] + } + + if (!disable_lcd) { + sources += [ "src/RefrigeratorUI.cpp" ] + } + + deps = [ + ":sdk", + app_data_model, + ] + + if (wifi_soc) { + deps += [ "${examples_plat_dir}:siwx917-common" ] + } else { + deps += [ "${examples_plat_dir}:efr32-common" ] + } + + if (chip_enable_pw_rpc) { + defines += [ + "PW_RPC_ENABLED", + "PW_RPC_ATTRIBUTE_SERVICE=1", + "PW_RPC_BUTTON_SERVICE=1", + "PW_RPC_DESCRIPTOR_SERVICE=1", + "PW_RPC_DEVICE_SERVICE=1", + ] + + sources += [ + "${chip_root}/examples/common/pigweed/RpcService.cpp", + "${chip_root}/examples/common/pigweed/efr32/PigweedLoggerMutex.cpp", + "${examples_common_plat_dir}/PigweedLogger.cpp", + "${examples_common_plat_dir}/Rpc.cpp", + ] + + deps += [ + "$dir_pw_hdlc:default_addresses", + "$dir_pw_hdlc:rpc_channel_output", + "$dir_pw_stream:sys_io_stream", + "${chip_root}/config/efr32/lib/pw_rpc:pw_rpc", + "${chip_root}/examples/common/pigweed:attributes_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:button_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:descriptor_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:device_service.nanopb_rpc", + ] + + if (wifi_soc) { + deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ] + } else { + deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ] + } + + deps += pw_build_LINK_DEPS + + include_dirs += [ + "${chip_root}/examples/common", + "${chip_root}/examples/common/pigweed/efr32", + ] + } + + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" + + inputs = [ ldscript ] + + ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ] + + if (chip_print_memory_usage) { + ldflags += [ + "-Wl,--print-memory-usage", + "-fstack-usage", + ] + } + + # WiFi Settings + if (chip_enable_wifi) { + ldflags += [ + "-Wl,--defsym", + "-Wl,SILABS_WIFI=1", + ] + } + + output_dir = root_out_dir +} + +group("silabs") { + deps = [ ":refrigerator_app" ] +} + +group("default") { + deps = [ ":silabs" ] +} diff --git a/examples/refrigerator-app/silabs/README.md b/examples/refrigerator-app/silabs/README.md new file mode 100644 index 0000000000..d063937a6d --- /dev/null +++ b/examples/refrigerator-app/silabs/README.md @@ -0,0 +1,378 @@ +# Matter Refrigerator and Temperature Controlled Example + +An example showing the use of CHIP on the Silicon Labs EFR32 MG24 and SiWx917 +Wi-Fi Boards. + +
+ +- [Matter Refrigerator and Temperature Controlled + Example](#matter-refrigerator-and-Temperature -controlled-example) + - [Introduction](#introduction) + - [Building](#building) + - [Flashing the Application](#flashing-the-application) + - [Viewing Logging Output](#viewing-logging-output) + - [Running the Complete Example](#running-the-complete-example) + - [Notes](#notes) + - [OTA Software Update](#ota-software-update) + - [Building options](#building-options) + - [Disabling logging](#disabling-logging) + - [Debug build / release build](#debug-build--release-build) + - [Disabling LCD](#disabling-lcd) + - [KVS maximum entry count](#kvs-maximum-entry-count) + +
+ +> **NOTE:** Silicon Laboratories now maintains a public matter GitHub repo with +> frequent releases thoroughly tested and validated. Developers looking to +> develop matter products with silabs hardware are encouraged to use our latest +> release with added tools and documentation. +> [Silabs Matter Github](https://github.com/SiliconLabs/matter/releases) + +## Introduction + +The Refrigerator and Temperature Controlled example provides a baseline +demonstration of a Temperature Controlled Cabinet device, built using Matter and +the Silicon Labs Simplicity SDK. It can be controlled by a Chip controller over +an Openthread or Wi-Fi network. + +The Refrigerator device can be commissioned over Bluetooth Low Energy (BLE), +where the device and the Chip controller will exchange security information +using the Rendez-vous procedure. For Thread, the Thread Network credentials are +provided to the Refrigerator device, which will then join the Thread network. + +If the LCD is enabled, the LCD on the Silabs WSTK displays a QR Code containing +the needed commissioning information for the BLE connection and starting the +Rendez-vous procedure. Once the device is commissioned, the display shows a +representation of the refrigerator's temperature-controlled state. + +The Refrigerator and Temperature Controlled example is intended to serve both as +a means to explore the workings of Matter as well as a template for creating +real products based on the Silicon Labs platform. + +## Building + +- Download the + [Simplicity Commander](https://www.silabs.com/mcu/programming-options) + command line tool, and ensure that `commander` is your shell search path. + (For Mac OS X, `commander` is located inside + `Commander.app/Contents/MacOS/`.) + +- Download and install a suitable ARM gcc tool chain (For most Host, the + bootstrap already installs the toolchain): + [GNU Arm Embedded Toolchain 12.2 Rel1](https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads) + +- Install some additional tools(likely already present for CHIP developers): + + # Linux + $ sudo apt-get install git ninja-build + + # Mac OS X + $ brew install ninja + +- Supported hardware: + + - > For the latest supported hardware please refer to the + > [Hardware Requirements](https://github.com/SiliconLabs/matter/blob/latest/docs/silabs/general/HARDWARE_REQUIREMENTS.md) + > in the Silicon Labs Matter Github Repo + + Silabs boards : + + - BRD2601B / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm + - BRD2703A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm + - BRD4186A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm + - BRD4186C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm + - BRD4187A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + - BRD4187C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + - BRD4338A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + - BRD4346A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + +* Build the example application: + + cd ~/connectedhomeip + ./scripts/examples/gn_silabs_example.sh ./examples/refrigerator-app/silabs/ ./out/refrigerator-app BRD4187C + +- To delete generated executable, libraries and object files use: + + $ cd ~/connectedhomeip + $ rm -rf ./out/ + + OR use GN/Ninja directly + + $ cd ~/connectedhomeip/examples/refrigerator-app/silabs + $ git submodule update --init + $ source third_party/connectedhomeip/scripts/activate.sh + $ export SILABS_BOARD=BRD4187C + $ gn gen out/debug + $ ninja -C out/debug + +- To delete generated executable, libraries and object files use: + + $ cd ~/connectedhomeip/examples/refrigerator-app/silabs + $ rm -rf out/ + +* Build the example as Intermittently Connected Device (ICD) + + $ ./scripts/examples/gn_silabs_example.sh ./examples/refrigerator-app/silabs/ ./out/refrigerator-app_ICD BRD4187C --icd + + or use gn as previously mentioned but adding the following arguments: + + $ gn gen out/debug '--args=SILABS_BOARD="BRD4187C" enable_sleepy_device=true chip_openthread_ftd=false' + +* Build the example with pigweed RCP + + $ ./scripts/examples/gn_silabs_example.sh examples/refrigerator-app/silabs/ out/refrigerator_app_rpc BRD4187C 'import("//with_pw_rpc.gni")' + + or use GN/Ninja Directly + + $ cd ~/connectedhomeip/examples/refrigerator-app/silabs + $ git submodule update --init + $ source third_party/connectedhomeip/scripts/activate.sh + $ export SILABS_BOARD=BRD4187C + $ gn gen out/debug --args='import("//with_pw_rpc.gni")' + $ ninja -C out/debug + +For more build options, help is provided when running the build script without +arguments + + ./scripts/examples/gn_silabs_example.sh + +## Flashing the Application + +- On the command line: + + $ cd ~/connectedhomeip/examples/refrigerator-app/silabs + $ python3 out/debug/matter-silabs-refrigerator-example.flash.py + +- Or with the Ozone debugger, just load the .out file. + +All EFR32 boards require a bootloader, see Silicon Labs documentation for more +info. Pre-built bootloader binaries are available in the Assets section of the +Releases page on +[Silabs Matter Github](https://github.com/SiliconLabs/matter/releases) . + +## Viewing Logging Output + +The example application is built to use the SEGGER Real Time Transfer (RTT) +facility for log output. RTT is a feature built-in to the J-Link Interface MCU +on the WSTK development board. It allows bi-directional communication with an +embedded application without the need for a dedicated UART. + +Using the RTT facility requires downloading and installing the _SEGGER J-Link +Software and Documentation Pack_ +([web site](https://www.segger.com/downloads/jlink#J-LinkSoftwareAndDocumentationPack)). + +Alternatively, SEGGER Ozone J-Link debugger can be used to view RTT logs too +after flashing the .out file. + +- Download the J-Link installer by navigating to the appropriate URL and + agreeing to the license agreement. + +- [JLink_Linux_x86_64.deb](https://www.segger.com/downloads/jlink/JLink_Linux_x86_64.deb) +- [JLink_MacOSX.pkg](https://www.segger.com/downloads/jlink/JLink_MacOSX.pkg) + +* Install the J-Link software + + $ cd ~/Downloads + $ sudo dpkg -i JLink_Linux_V*_x86_64.deb + +* In Linux, grant the logged in user the ability to talk to the development + hardware via the linux tty device (/dev/ttyACMx) by adding them to the + dialout group. + + $ sudo usermod -a -G dialout ${USER} + +Once the above is complete, log output can be viewed using the JLinkExe tool in +combination with JLinkRTTClient as follows: + +- Run the JLinkExe tool with arguments to autoconnect to the WSTK board: + + For MG24 use: + + ``` + $ JLinkExe -device EFR32MG24AXXXF1536 -if SWD -speed 4000 -autoconnect 1 + ``` + +- In a second terminal, run the JLinkRTTClient to view logs: + + $ JLinkRTTClient + +## Running the Complete Example + +- It is assumed here that you already have an OpenThread border router + configured and running. If not see the following guide + [Openthread_border_router](../../../docs/platforms/openthread/openthread_border_router_pi.md) + for more information on how to setup a border router on a raspberryPi. + + Take note that the RCP code is available directly through + [Simplicity Studio 5](https://www.silabs.com/products/development-tools/software/simplicity-studio/simplicity-studio-5) + under File->New->Project Wizard->Examples->Thread : ot-rcp + +- User interface : **LCD** The LCD on Silabs WSTK shows a QR Code. This QR + Code is be scanned by the CHIP Tool app For the Rendez-vous procedure over + BLE + + * On devices that do not have or support the LCD Display like the BRD4166A Thunderboard Sense 2, + a URL can be found in the RTT logs. + + [SVR] Copy/paste the below URL in a browser to see the QR Code: + [SVR] https://project-chip.github.io/connectedhomeip/qrcode.html?data=CH%3AI34NM%20-00%200C9SS0 + + **LED 0** shows the overall state of the device and its connectivity. The + following states are possible: + + - _Short Flash On (50 ms on/950 ms off)_ ; The device is in the + unprovisioned (unpaired) state and is waiting for a commissioning + application to connect. + + - _Rapid Even Flashing_ ; (100 ms on/100 ms off)_ — The device is in the + unprovisioned state and a commissioning application is connected through + Bluetooth LE. + + - _Short Flash Off_ ; (950ms on/50ms off)_ — The device is fully + provisioned, but does not yet have full Thread network or service + connectivity. + + - _Solid On_ ; The device is fully provisioned and has full Thread + network and service connectivity. + + **LED 1** Shows the state of the refrigerator and temperature controlled + cabinet + + - temperature ; No implementation is present. this feature will be available in a future update. + - _Off_ ; No implementation is present. this feature will be available in a future update. + - _Blinking slowly_ ; No implementation is present. this feature will be available in a future update. + - _Blinking quickly_ ; No implementation is present. this feature will be available in a future update. + + **Push Button 0** Function button and factory reset + + - Pressed and release: No implementation is present. this feature will be available in a future update. + + - Pressed and hold for 6 s: Initiates the factory reset of the device. + Releasing the button within the 6-second window cancels the factory reset + procedure. **LEDs** blink in unison when the factory reset procedure is + initiated. + + **Push Button 1** Application button + + - Pressed and release: No implementation is present. this feature will be available in a future update. + + - Press and hold for 3 s: No implementation is present. this feature will be available in a future update. + +* Once the device is provisioned, it will join the Thread network is + established, look for the RTT log + + ``` + [DL] Device Role: CHILD + [DL] Partition Id:0x6A7491B7 + [DL] \_OnPlatformEvent default: event->Type = 32778 + [DL] OpenThread State Changed (Flags: 0x00000001) + [DL] Thread Unicast Addresses: + [DL] 2001:DB8::E1A2:87F1:7D5D:FECA/64 valid preferred + [DL] FDDE:AD00:BEEF::FF:FE00:2402/64 valid preferred rloc + [DL] FDDE:AD00:BEEF:0:383F:5E81:A05A:B168/64 valid preferred + [DL] FE80::D8F2:592E:C109:CF00/64 valid preferred + [DL] LwIP Thread interface addresses updated + [DL] FE80::D8F2:592E:C109:CF00 IPv6 link-local address, preferred) + [DL] FDDE:AD00:BEEF:0:383F:5E81:A05A:B168 Thread mesh-local address, preferred) + [DL] 2001:DB8::E1A2:87F1:7D5D:FECA IPv6 global unicast address, preferred) + ``` + + (you can verify that the device is on the thread network with the command + `router table` using a serial terminal (screen / minicom etc.) on the board + running the refrigerator-app example. You can also get the address list with + the command ipaddr again in the serial terminal ) + + You can provision the Chip device using Chip tool Android or iOS app or + through CLI commands on your OT BR + + The + [CHIPTool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) + can now be used to send ZCL commands to the refrigerator device. For + instance, to set the refrigerator covering lift by percentage: + + ``` + chip-tool pairing ble-thread 1 hex: 20202021 3840 + + ./chip-tool refrigeratoralarm read state 1 1 + + Refrigerator Endpoint Id 1 + + This enpoint support the refrigerator alarm cluster + + ./chip-tool temperaturecontrol read temperature-setpoint 1 2 + + Enpoint for temperaturecontrol is 2 and 3 + + Cold Cabinet Endpoint Id 2 + Freeze Cabinet Endpoint Id 3 + + This enpoint support Temperature control cluster + ``` + + To see the supported refrigerator cluster commands, use: + + ``` + chip-tool refrigeratorandtemperaturecontrolledcabinetmode + chip-tool temperaturecontrol + chip-tool refrigeratoralarm + + ``` + +### Notes + +- Depending on your network settings your router might not provide native ipv6 + addresses to your devices (Border router / PC). If this is the case, you + need to add a static ipv6 addresses on both device and then an ipv6 route to + the border router on your PC + + # On Border Router : + $ sudo ip addr add dev 2002::2/64 + + # On PC (Linux) : + $ sudo ip addr add dev 2002::1/64 + + # Add Ipv6 route on PC (Linux) + $ sudo ip route add /64 via 2002::2 + +## OTA Software Update + +For the description of Software Update process with EFR32 example applications +see +[EFR32 OTA Software Update](../../../docs/platforms/silabs/silabs_efr32_software_update.md) + +For the description of Software Update process with SiWx917 example applications +see +[SiWx917 OTA Software Update](https://docs.silabs.com/matter/latest/matter-ota/04-ota-software-update-soc) + +## Building options + +All of Silabs's examples within the Matter repo have all the features enabled by +default, as to provide the best end user experience. However some of those +features can easily be toggled on or off. Here is a short list of options : + +### Disabling logging + +chip_progress_logging, chip_detail_logging, chip_automation_logging + + $ ./scripts/examples/gn_silabs_example.sh ./examples/refrigerator-app/silabs ./out/refrigerator-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" + +### Debug build / release build + +is_debug + + $ ./scripts/examples/gn_silabs_example.sh ./examples/refrigerator-app/silabs ./out/refrigerator-app BRD4164A "is_debug=false" + +### Disabling LCD + +show_qr_code + + $ ./scripts/examples/gn_silabs_example.sh ./examples/refrigerator-app/silabs ./out/refrigerator-app BRD4164A "show_qr_code=false" + +### KVS maximum entry count + +kvs_max_entries + + Set the maximum Kvs entries that can be stored in NVM (Default 75) + Thresholds: 30 <= kvs_max_entries <= 255 + + $ ./scripts/examples/gn_silabs_example.sh ./examples/refrigerator-app/silabs ./out/refrigerator-app BRD4164A kvs_max_entries=50 diff --git a/examples/refrigerator-app/silabs/build_for_wifi_args.gni b/examples/refrigerator-app/silabs/build_for_wifi_args.gni new file mode 100644 index 0000000000..e82cf8be12 --- /dev/null +++ b/examples/refrigerator-app/silabs/build_for_wifi_args.gni @@ -0,0 +1,21 @@ +# Copyright (c) 2024 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}/config/standalone/args.gni") + +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") +import("${chip_root}/src/platform/silabs/wifi_args.gni") +chip_enable_wifi = true +chip_enable_ota_requestor = true +app_data_model = "${chip_root}/examples/refrigerator-app/silabs/data_model:silabs-refrigerator" diff --git a/examples/refrigerator-app/silabs/build_for_wifi_gnfile.gn b/examples/refrigerator-app/silabs/build_for_wifi_gnfile.gn new file mode 100644 index 0000000000..c3b7b1f036 --- /dev/null +++ b/examples/refrigerator-app/silabs/build_for_wifi_gnfile.gn @@ -0,0 +1,29 @@ +# Copyright (c) 2024 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/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 = { + target_cpu = "arm" + target_os = "freertos" + chip_device_platform = "SiWx917" + chip_enable_wifi = true + import("//build_for_wifi_args.gni") +} diff --git a/examples/all-clusters-minimal-app/tizen/build_overrides b/examples/refrigerator-app/silabs/build_overrides similarity index 100% rename from examples/all-clusters-minimal-app/tizen/build_overrides rename to examples/refrigerator-app/silabs/build_overrides diff --git a/examples/refrigerator-app/silabs/data_model/BUILD.gn b/examples/refrigerator-app/silabs/data_model/BUILD.gn new file mode 100644 index 0000000000..da519c005a --- /dev/null +++ b/examples/refrigerator-app/silabs/data_model/BUILD.gn @@ -0,0 +1,26 @@ +# Copyright (c) 2024 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}/src/app/chip_data_model.gni") +import("${chip_root}/src/platform/device.gni") + +chip_data_model("silabs-refrigerator") { + if (chip_enable_wifi) { + zap_file = "refrigerator-wifi-app.zap" + } else { + zap_file = "refrigerator-thread-app.zap" + } + is_server = true +} diff --git a/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.matter b/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.matter new file mode 100644 index 0000000000..173823b22d --- /dev/null +++ b/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.matter @@ -0,0 +1,1994 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + +enum TestGlobalEnum : enum8 { + kSomeValue = 0; + kSomeOtherValue = 1; + kFinalValue = 2; +} + +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + +bitmap TestGlobalBitmap : bitmap32 { + kFirstBit = 0x1; + kSecondBit = 0x2; +} + +struct TestGlobalStruct { + char_string<128> name = 0; + nullable TestGlobalBitmap myBitmap = 1; + optional nullable TestGlobalEnum myEnum = 2; +} + +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +cluster Descriptor = 29 { + revision 2; + + bitmap Feature : bitmap32 { + kTagList = 0x1; + } + + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute cluster_id serverList[] = 1; + readonly attribute cluster_id clientList[] = 2; + readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; + readonly attribute 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. */ +cluster AccessControl = 31 { + revision 2; + + enum AccessControlEntryAuthModeEnum : enum8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : enum8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum AccessRestrictionTypeEnum : enum8 { + kAttributeAccessForbidden = 0; + kAttributeWriteForbidden = 1; + kCommandForbidden = 2; + kEventForbidden = 3; + } + + enum ChangeTypeEnum : enum8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + bitmap Feature : bitmap32 { + kExtension = 0x1; + kManagedDevice = 0x2; + } + + struct AccessRestrictionStruct { + AccessRestrictionTypeEnum type = 0; + nullable int32u id = 1; + } + + struct CommissioningAccessRestrictionEntryStruct { + endpoint_no endpoint = 0; + cluster_id cluster = 1; + AccessRestrictionStruct restrictions[] = 2; + } + + fabric_scoped struct AccessRestrictionEntryStruct { + fabric_sensitive endpoint_no endpoint = 0; + fabric_sensitive cluster_id cluster = 1; + fabric_sensitive AccessRestrictionStruct restrictions[] = 2; + fabric_idx fabricIndex = 254; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { + int64u token = 0; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute optional CommissioningAccessRestrictionEntryStruct commissioningARL[] = 5; + readonly attribute optional AccessRestrictionEntryStruct arl[] = 6; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ReviewFabricRestrictionsRequest { + CommissioningAccessRestrictionEntryStruct arl[] = 0; + } + + response struct ReviewFabricRestrictionsResponse = 1 { + int64u token = 0; + } + + /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +cluster BasicInformation = 40 { + revision 3; + + enum ColorEnum : enum8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : enum8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + int32u softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; + readonly attribute int32u specificationVersion = 21; + readonly attribute int16u maxPathsPerInvoke = 22; + readonly attribute 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 MfgSpecificPing(): DefaultSuccess = 0; +} + +/** Provides an interface for providing OTA software updates */ +cluster OtaSoftwareUpdateProvider = 41 { + revision 1; // NOTE: Default/not specifically set + + enum ApplyUpdateActionEnum : enum8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum DownloadProtocolEnum : enum8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHTTPS = 2; + kVendorSpecific = 3; + } + + enum StatusEnum : enum8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + DownloadProtocolEnum protocolsSupported[] = 3; + optional int16u hardwareVersion = 4; + optional char_string<2> location = 5; + optional boolean requestorCanConsent = 6; + optional octet_string<512> metadataForProvider = 7; + } + + response struct QueryImageResponse = 1 { + StatusEnum status = 0; + optional int32u delayedActionTime = 1; + optional char_string<256> imageURI = 2; + optional int32u softwareVersion = 3; + optional char_string<64> softwareVersionString = 4; + optional octet_string<32> updateToken = 5; + optional boolean userConsentNeeded = 6; + optional octet_string<512> metadataForRequestor = 7; + } + + request struct ApplyUpdateRequestRequest { + octet_string<32> updateToken = 0; + int32u newVersion = 1; + } + + response struct ApplyUpdateResponse = 3 { + ApplyUpdateActionEnum action = 0; + int32u delayedActionTime = 1; + } + + request struct NotifyUpdateAppliedRequest { + octet_string<32> updateToken = 0; + int32u softwareVersion = 1; + } + + /** Determine availability of a new Software Image */ + command QueryImage(QueryImageRequest): QueryImageResponse = 0; + /** Determine next action to take for a downloaded Software Image */ + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + /** Notify OTA Provider that an update was applied */ + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; +} + +/** Provides an interface for downloading and applying OTA software updates */ +cluster OtaSoftwareUpdateRequestor = 42 { + revision 1; // NOTE: Default/not specifically set + + enum AnnouncementReasonEnum : enum8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum ChangeReasonEnum : enum8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum UpdateStateEnum : enum8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + fabric_scoped struct ProviderLocation { + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + fabric_idx fabricIndex = 254; + } + + info event StateTransition = 0 { + UpdateStateEnum previousState = 0; + UpdateStateEnum newState = 1; + ChangeReasonEnum reason = 2; + nullable int32u targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + int32u softwareVersion = 0; + int16u productID = 1; + } + + info event DownloadError = 2 { + int32u softwareVersion = 0; + int64u bytesDownloaded = 1; + nullable int8u progressPercent = 2; + nullable int64s platformCode = 3; + } + + attribute access(write: administer) ProviderLocation defaultOTAProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute UpdateStateEnum updateState = 2; + readonly attribute nullable int8u updateStateProgress = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + AnnouncementReasonEnum announcementReason = 2; + optional octet_string<512> metadataForNode = 3; + endpoint_no endpoint = 4; + } + + /** Announce the presence of an OTA Provider */ + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +cluster GeneralCommissioning = 48 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningErrorEnum : enum8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; + } + + enum RegulatoryLocationTypeEnum : enum8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; + 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; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + char_string<2> countryCode = 1; + int64u breadcrumb = 2; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +cluster NetworkCommissioning = 49 { + revision 1; // NOTE: Default/not specifically set + + 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; + kPerDeviceCredentials = 0x8; + } + + bitmap ThreadCapabilitiesBitmap : bitmap16 { + kIsBorderRouterCapable = 0x1; + kIsRouterCapable = 0x2; + kIsSleepyEndDeviceCapable = 0x4; + kIsFullThreadDevice = 0x8; + kIsSynchronizedSleepyEndDeviceCapable = 0x10; + } + + bitmap WiFiSecurityBitmap : bitmap8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + provisional readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + provisional readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + provisional readonly attribute optional int16u threadVersion = 10; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + + request struct AddOrUpdateThreadNetworkRequest { + octet_string<254> operationalDataset = 0; + optional int64u breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + + request struct ConnectNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + + request struct ReorderNetworkRequest { + octet_string<32> networkID = 0; + int8u networkIndex = 1; + optional int64u breadcrumb = 2; + } + + request struct QueryIdentityRequest { + octet_string<20> keyIdentifier = 0; + optional octet_string<32> possessionNonce = 1; + } + + response struct QueryIdentityResponse = 10 { + octet_string<140> identity = 0; + optional octet_string<64> possessionSignature = 1; + } + + /** Detemine the set of networks the device sees as available. */ + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +cluster DiagnosticLogs = 50 { + revision 1; // NOTE: Default/not specifically set + + 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; + } + + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + long_octet_string logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster GeneralDiagnostics = 51 { + revision 2; + + enum BootReasonEnum : enum8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : enum8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : enum8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : enum8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + bitmap Feature : bitmap32 { + kDataModelTest = 0x1; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + } + + response struct TimeSnapshotResponse = 2 { + systime_ms systemTimeMs = 0; + nullable posix_ms posixTimeMs = 1; + } + + request struct PayloadTestRequestRequest { + octet_string<16> enableKey = 0; + int8u value = 1; + int16u count = 2; + } + + response struct PayloadTestResponse = 4 { + octet_string payload = 0; + } + + /** Provide a means for certification tests to trigger some test-plan-specific events */ + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ + command TimeSnapshot(): TimeSnapshotResponse = 1; + /** Request a variable length payload response. */ + command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; +} + +/** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ +cluster ThreadNetworkDiagnostics = 53 { + revision 2; + + 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 optional int64u overrunCount = 6; + readonly attribute NeighborTableStruct neighborTable[] = 7; + readonly attribute RouteTableStruct routeTable[] = 8; + readonly attribute nullable int32u partitionId = 9; + readonly attribute nullable int16u weighting = 10; + readonly attribute nullable int16u dataVersion = 11; + readonly attribute nullable int16u stableDataVersion = 12; + readonly attribute nullable int8u leaderRouterId = 13; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; + readonly attribute nullable SecurityPolicy securityPolicy = 59; + readonly attribute nullable octet_string<4> channelPage0Mask = 60; + readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; + readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62; + 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; + + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +cluster AdministratorCommissioning = 60 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningWindowStatusEnum : enum8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : enum8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + bitmap Feature : bitmap32 { + kBasic = 0x1; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable vendor_id adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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<32> salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +cluster OperationalCredentials = 62 { + revision 1; // NOTE: Default/not specifically set + + 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<32> attestationNonce = 0; + } + + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + + request struct CSRRequestRequest { + octet_string<32> CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + + request struct AddNOCRequest { + octet_string<400> NOCValue = 0; + optional octet_string<400> ICACValue = 1; + octet_string<16> IPKValue = 2; + int64u caseAdminSubject = 3; + vendor_id adminVendorId = 4; + } + + request struct UpdateNOCRequest { + octet_string NOCValue = 0; + optional octet_string ICACValue = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + + request struct UpdateFabricLabelRequest { + char_string<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + octet_string rootCACertificate = 0; + } + + /** Sender is requesting attestation information from the receiver. */ + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +cluster GroupKeyManagement = 63 { + revision 1; // NOTE: Default/not specifically set + + enum GroupKeySecurityPolicyEnum : enum8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : bitmap32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + int16u groupKeySetIDs[] = 0; + } + + /** Write a new set of keys for the given key set id. */ + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** Attributes and commands for selecting a mode from a list of supported options. */ +cluster RefrigeratorAndTemperatureControlledCabinetMode = 82 { + revision 2; + + enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; + kRapidCool = 16384; + kRapidFreeze = 16385; + } + + bitmap Feature : bitmap32 { + kOnOff = 0x1; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute ModeOptionStruct supportedModes[] = 0; + readonly attribute int8u currentMode = 1; + attribute optional nullable int8u startUpMode = 2; + attribute optional nullable int8u onMode = 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 ChangeToModeRequest { + int8u newMode = 0; + } + + response struct ChangeToModeResponse = 1 { + enum8 status = 0; + optional char_string statusText = 1; + } + + /** This command is used to change device modes. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; +} + +/** Attributes and commands for configuring the temperature control, and reporting temperature. */ +cluster TemperatureControl = 86 { + revision 1; // NOTE: Default/not specifically set + + bitmap Feature : bitmap32 { + kTemperatureNumber = 0x1; + kTemperatureLevel = 0x2; + kTemperatureStep = 0x4; + } + + readonly attribute optional temperature temperatureSetpoint = 0; + readonly attribute optional temperature minTemperature = 1; + readonly attribute optional temperature maxTemperature = 2; + readonly attribute optional temperature step = 3; + readonly attribute optional int8u selectedTemperatureLevel = 4; + readonly attribute optional char_string supportedTemperatureLevels[] = 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 SetTemperatureRequest { + optional temperature targetTemperature = 0; + optional int8u targetTemperatureLevel = 1; + } + + /** Set Temperature */ + command SetTemperature(SetTemperatureRequest): DefaultSuccess = 0; +} + +/** Attributes and commands for configuring the Refrigerator alarm. */ +cluster RefrigeratorAlarm = 87 { + revision 1; // NOTE: Default/not specifically set + + bitmap AlarmBitmap : bitmap32 { + kDoorOpen = 0x1; + } + + info event Notify = 0 { + AlarmBitmap active = 0; + AlarmBitmap inactive = 1; + AlarmBitmap state = 2; + AlarmBitmap mask = 3; + } + + readonly attribute AlarmBitmap mask = 0; + readonly attribute AlarmBitmap state = 2; + readonly attribute AlarmBitmap supported = 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 ma_rootdevice = 22, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location; + callback attribute hardwareVersion; + callback attribute hardwareVersionString; + callback attribute softwareVersion; + callback attribute softwareVersionString; + callback attribute manufacturingDate; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + ram attribute reachable default = 1; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster OtaSoftwareUpdateProvider { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command QueryImage; + handle command QueryImageResponse; + handle command ApplyUpdateRequest; + handle command ApplyUpdateResponse; + handle command NotifyUpdateApplied; + } + + server cluster OtaSoftwareUpdateRequestor { + callback attribute defaultOTAProviders; + ram attribute updatePossible default = true; + ram attribute updateState default = 0; + ram attribute updateStateProgress; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig; + callback attribute locationCapability; + callback attribute supportsConcurrentConnection; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command ArmFailSafe; + handle command ArmFailSafeResponse; + handle command SetRegulatoryConfig; + handle command SetRegulatoryConfigResponse; + handle command CommissioningComplete; + handle command CommissioningCompleteResponse; + } + + 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; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + + handle command ScanNetworks; + handle command ScanNetworksResponse; + handle command AddOrUpdateWiFiNetwork; + handle command RemoveNetwork; + handle command NetworkConfigResponse; + handle command ConnectNetwork; + handle command ConnectNetworkResponse; + handle command ReorderNetwork; + } + + server cluster DiagnosticLogs { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command RetrieveLogsRequest; + handle command RetrieveLogsResponse; + } + + server cluster GeneralDiagnostics { + emits event HardwareFaultChange; + emits event RadioFaultChange; + emits event NetworkFaultChange; + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount; + callback attribute upTime; + callback attribute totalOperationalHours; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command TestEventTrigger; + handle command TimeSnapshot; + handle command TimeSnapshotResponse; + } + + server cluster ThreadNetworkDiagnostics { + callback attribute channel; + callback attribute routingRole; + callback attribute networkName; + callback attribute panId; + callback attribute extendedPanId; + callback attribute meshLocalPrefix; + callback attribute neighborTable; + callback attribute routeTable; + callback attribute partitionId; + callback attribute weighting; + callback attribute dataVersion; + callback attribute stableDataVersion; + callback attribute leaderRouterId; + callback attribute securityPolicy; + callback attribute channelPage0Mask; + callback attribute operationalDatasetComponents; + callback attribute activeNetworkFaultsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus; + callback attribute adminFabricIndex; + callback attribute adminVendorId; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command OpenCommissioningWindow; + handle command RevokeCommissioning; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command AttestationRequest; + handle command AttestationResponse; + handle command CertificateChainRequest; + handle command CertificateChainResponse; + handle command CSRRequest; + handle command CSRResponse; + handle command AddNOC; + handle command UpdateNOC; + handle command NOCResponse; + handle command UpdateFabricLabel; + handle command RemoveFabric; + handle command AddTrustedRootCertificate; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command KeySetWrite; + handle command KeySetRead; + handle command KeySetReadResponse; + handle command KeySetRemove; + handle command KeySetReadAllIndices; + handle command KeySetReadAllIndicesResponse; + } +} +endpoint 1 { + device type ma_refrigerator = 112, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster RefrigeratorAndTemperatureControlledCabinetMode { + callback attribute supportedModes; + callback attribute currentMode; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 2; + + handle command ChangeToMode; + handle command ChangeToModeResponse; + } + + server cluster RefrigeratorAlarm { + ram attribute mask default = 0; + ram attribute state default = 0; + ram attribute supported default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} +endpoint 2 { + device type ma_temperature_controlled_cabinet = 113, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster TemperatureControl { + ram attribute temperatureSetpoint; + ram attribute minTemperature; + ram attribute maxTemperature; + ram attribute step; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 1; + + handle command SetTemperature; + } +} +endpoint 3 { + device type ma_temperature_controlled_cabinet = 113, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster TemperatureControl { + ram attribute temperatureSetpoint; + ram attribute minTemperature; + ram attribute maxTemperature; + ram attribute step; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 1; + + handle command SetTemperature; + } +} + + diff --git a/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.zap b/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.zap new file mode 100644 index 0000000000..57785bd3ad --- /dev/null +++ b/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.zap @@ -0,0 +1,4311 @@ +{ + "fileFormat": 2, + "featureLevel": 103, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "category": "matter", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "id": 1, + "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice", + "deviceTypeOrder": 0 + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice", + "deviceTypeOrder": 0 + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "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": null, + "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": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "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": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPathsPerInvoke", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "3", + "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": "server", + "enabled": 1, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdatePossible", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "true", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdateState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "UpdateStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdateStateProgress", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "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": null, + "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": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshot", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshotResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "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": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "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": "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRoleEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NeighborTable", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RouteTable", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartitionId", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChannelPage0Mask", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalDatasetComponents", + "code": 61, + "mfgCode": null, + "side": "server", + "type": "OperationalDatasetComponents", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaultsList", + "code": 62, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "MA-refrigerator", + "deviceTypeRef": { + "code": 112, + "profileId": 259, + "label": "MA-refrigerator", + "name": "MA-refrigerator", + "deviceTypeOrder": 0 + }, + "deviceTypes": [ + { + "code": 112, + "profileId": 259, + "label": "MA-refrigerator", + "name": "MA-refrigerator", + "deviceTypeOrder": 0 + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 112 + ], + "deviceTypeName": "MA-refrigerator", + "deviceTypeCode": 112, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Refrigerator And Temperature Controlled Cabinet Mode", + "code": 82, + "mfgCode": null, + "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "SupportedModes", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Refrigerator Alarm", + "code": 87, + "mfgCode": null, + "define": "REFRIGERATOR_ALARM_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Mask", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "AlarmBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "State", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "AlarmBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Supported", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "AlarmBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 3, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet", + "deviceTypeOrder": 0 + }, + "deviceTypes": [ + { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet", + "deviceTypeOrder": 0 + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 113 + ], + "deviceTypeName": "MA-temperature-controlled-cabinet", + "deviceTypeCode": 113, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "SetTemperature", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "TemperatureSetpoint", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinTemperature", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxTemperature", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Step", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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 + } + ] + } + ] + }, + { + "id": 4, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet", + "deviceTypeOrder": 0 + }, + "deviceTypes": [ + { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet", + "deviceTypeOrder": 0 + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 113 + ], + "deviceTypeName": "MA-temperature-controlled-cabinet", + "deviceTypeCode": 113, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "SetTemperature", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "TemperatureSetpoint", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinTemperature", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxTemperature", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Step", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "MA-refrigerator", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 2, + "profileId": 259, + "endpointId": 2, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 3, + "profileId": 259, + "endpointId": 3, + "networkId": 0, + "parentEndpointIdentifier": null + } + ] +} \ No newline at end of file diff --git a/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.matter b/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.matter new file mode 100644 index 0000000000..d3a8603e74 --- /dev/null +++ b/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.matter @@ -0,0 +1,1903 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + +enum TestGlobalEnum : enum8 { + kSomeValue = 0; + kSomeOtherValue = 1; + kFinalValue = 2; +} + +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + +bitmap TestGlobalBitmap : bitmap32 { + kFirstBit = 0x1; + kSecondBit = 0x2; +} + +struct TestGlobalStruct { + char_string<128> name = 0; + nullable TestGlobalBitmap myBitmap = 1; + optional nullable TestGlobalEnum myEnum = 2; +} + +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +cluster Descriptor = 29 { + revision 2; + + bitmap Feature : bitmap32 { + kTagList = 0x1; + } + + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute cluster_id serverList[] = 1; + readonly attribute cluster_id clientList[] = 2; + readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; + readonly attribute 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. */ +cluster AccessControl = 31 { + revision 2; + + enum AccessControlEntryAuthModeEnum : enum8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : enum8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum AccessRestrictionTypeEnum : enum8 { + kAttributeAccessForbidden = 0; + kAttributeWriteForbidden = 1; + kCommandForbidden = 2; + kEventForbidden = 3; + } + + enum ChangeTypeEnum : enum8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + bitmap Feature : bitmap32 { + kExtension = 0x1; + kManagedDevice = 0x2; + } + + struct AccessRestrictionStruct { + AccessRestrictionTypeEnum type = 0; + nullable int32u id = 1; + } + + struct CommissioningAccessRestrictionEntryStruct { + endpoint_no endpoint = 0; + cluster_id cluster = 1; + AccessRestrictionStruct restrictions[] = 2; + } + + fabric_scoped struct AccessRestrictionEntryStruct { + fabric_sensitive endpoint_no endpoint = 0; + fabric_sensitive cluster_id cluster = 1; + fabric_sensitive AccessRestrictionStruct restrictions[] = 2; + fabric_idx fabricIndex = 254; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { + int64u token = 0; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute optional CommissioningAccessRestrictionEntryStruct commissioningARL[] = 5; + readonly attribute optional AccessRestrictionEntryStruct arl[] = 6; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ReviewFabricRestrictionsRequest { + CommissioningAccessRestrictionEntryStruct arl[] = 0; + } + + response struct ReviewFabricRestrictionsResponse = 1 { + int64u token = 0; + } + + /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +cluster BasicInformation = 40 { + revision 3; + + enum ColorEnum : enum8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : enum8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + int32u softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; + readonly attribute int32u specificationVersion = 21; + readonly attribute int16u maxPathsPerInvoke = 22; + readonly attribute 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 MfgSpecificPing(): DefaultSuccess = 0; +} + +/** Provides an interface for providing OTA software updates */ +cluster OtaSoftwareUpdateProvider = 41 { + revision 1; // NOTE: Default/not specifically set + + enum ApplyUpdateActionEnum : enum8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum DownloadProtocolEnum : enum8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHTTPS = 2; + kVendorSpecific = 3; + } + + enum StatusEnum : enum8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + DownloadProtocolEnum protocolsSupported[] = 3; + optional int16u hardwareVersion = 4; + optional char_string<2> location = 5; + optional boolean requestorCanConsent = 6; + optional octet_string<512> metadataForProvider = 7; + } + + response struct QueryImageResponse = 1 { + StatusEnum status = 0; + optional int32u delayedActionTime = 1; + optional char_string<256> imageURI = 2; + optional int32u softwareVersion = 3; + optional char_string<64> softwareVersionString = 4; + optional octet_string<32> updateToken = 5; + optional boolean userConsentNeeded = 6; + optional octet_string<512> metadataForRequestor = 7; + } + + request struct ApplyUpdateRequestRequest { + octet_string<32> updateToken = 0; + int32u newVersion = 1; + } + + response struct ApplyUpdateResponse = 3 { + ApplyUpdateActionEnum action = 0; + int32u delayedActionTime = 1; + } + + request struct NotifyUpdateAppliedRequest { + octet_string<32> updateToken = 0; + int32u softwareVersion = 1; + } + + /** Determine availability of a new Software Image */ + command QueryImage(QueryImageRequest): QueryImageResponse = 0; + /** Determine next action to take for a downloaded Software Image */ + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + /** Notify OTA Provider that an update was applied */ + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; +} + +/** Provides an interface for downloading and applying OTA software updates */ +cluster OtaSoftwareUpdateRequestor = 42 { + revision 1; // NOTE: Default/not specifically set + + enum AnnouncementReasonEnum : enum8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum ChangeReasonEnum : enum8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum UpdateStateEnum : enum8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + fabric_scoped struct ProviderLocation { + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + fabric_idx fabricIndex = 254; + } + + info event StateTransition = 0 { + UpdateStateEnum previousState = 0; + UpdateStateEnum newState = 1; + ChangeReasonEnum reason = 2; + nullable int32u targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + int32u softwareVersion = 0; + int16u productID = 1; + } + + info event DownloadError = 2 { + int32u softwareVersion = 0; + int64u bytesDownloaded = 1; + nullable int8u progressPercent = 2; + nullable int64s platformCode = 3; + } + + attribute access(write: administer) ProviderLocation defaultOTAProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute UpdateStateEnum updateState = 2; + readonly attribute nullable int8u updateStateProgress = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + AnnouncementReasonEnum announcementReason = 2; + optional octet_string<512> metadataForNode = 3; + endpoint_no endpoint = 4; + } + + /** Announce the presence of an OTA Provider */ + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +cluster GeneralCommissioning = 48 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningErrorEnum : enum8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; + } + + enum RegulatoryLocationTypeEnum : enum8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; + 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; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + char_string<2> countryCode = 1; + int64u breadcrumb = 2; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +cluster NetworkCommissioning = 49 { + revision 1; // NOTE: Default/not specifically set + + 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; + kPerDeviceCredentials = 0x8; + } + + bitmap ThreadCapabilitiesBitmap : bitmap16 { + kIsBorderRouterCapable = 0x1; + kIsRouterCapable = 0x2; + kIsSleepyEndDeviceCapable = 0x4; + kIsFullThreadDevice = 0x8; + kIsSynchronizedSleepyEndDeviceCapable = 0x10; + } + + bitmap WiFiSecurityBitmap : bitmap8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + provisional readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + provisional readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + provisional readonly attribute optional int16u threadVersion = 10; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + + request struct AddOrUpdateThreadNetworkRequest { + octet_string<254> operationalDataset = 0; + optional int64u breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + + request struct ConnectNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + + request struct ReorderNetworkRequest { + octet_string<32> networkID = 0; + int8u networkIndex = 1; + optional int64u breadcrumb = 2; + } + + request struct QueryIdentityRequest { + octet_string<20> keyIdentifier = 0; + optional octet_string<32> possessionNonce = 1; + } + + response struct QueryIdentityResponse = 10 { + octet_string<140> identity = 0; + optional octet_string<64> possessionSignature = 1; + } + + /** Detemine the set of networks the device sees as available. */ + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +cluster DiagnosticLogs = 50 { + revision 1; // NOTE: Default/not specifically set + + 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; + } + + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + long_octet_string logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster GeneralDiagnostics = 51 { + revision 2; + + enum BootReasonEnum : enum8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : enum8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : enum8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : enum8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + bitmap Feature : bitmap32 { + kDataModelTest = 0x1; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + } + + response struct TimeSnapshotResponse = 2 { + systime_ms systemTimeMs = 0; + nullable posix_ms posixTimeMs = 1; + } + + request struct PayloadTestRequestRequest { + octet_string<16> enableKey = 0; + int8u value = 1; + int16u count = 2; + } + + response struct PayloadTestResponse = 4 { + octet_string payload = 0; + } + + /** Provide a means for certification tests to trigger some test-plan-specific events */ + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ + command TimeSnapshot(): TimeSnapshotResponse = 1; + /** Request a variable length payload response. */ + command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; +} + +/** 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. */ +cluster WiFiNetworkDiagnostics = 54 { + revision 1; // NOTE: Default/not specifically set + + 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 associationFailureCause = 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 optional nullable int32u beaconLostCount = 5; + readonly attribute optional nullable int32u beaconRxCount = 6; + readonly attribute optional nullable int32u packetMulticastRxCount = 7; + readonly attribute optional nullable int32u packetMulticastTxCount = 8; + readonly attribute optional nullable int32u packetUnicastRxCount = 9; + readonly attribute optional nullable int32u packetUnicastTxCount = 10; + readonly attribute optional nullable int64u currentMaxRate = 11; + readonly attribute optional 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; + + /** Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 */ + command ResetCounts(): DefaultSuccess = 0; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +cluster AdministratorCommissioning = 60 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningWindowStatusEnum : enum8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : enum8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + bitmap Feature : bitmap32 { + kBasic = 0x1; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable vendor_id adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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<32> salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +cluster OperationalCredentials = 62 { + revision 1; // NOTE: Default/not specifically set + + 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<32> attestationNonce = 0; + } + + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + + request struct CSRRequestRequest { + octet_string<32> CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + + request struct AddNOCRequest { + octet_string<400> NOCValue = 0; + optional octet_string<400> ICACValue = 1; + octet_string<16> IPKValue = 2; + int64u caseAdminSubject = 3; + vendor_id adminVendorId = 4; + } + + request struct UpdateNOCRequest { + octet_string NOCValue = 0; + optional octet_string ICACValue = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + + request struct UpdateFabricLabelRequest { + char_string<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + octet_string rootCACertificate = 0; + } + + /** Sender is requesting attestation information from the receiver. */ + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +cluster GroupKeyManagement = 63 { + revision 1; // NOTE: Default/not specifically set + + enum GroupKeySecurityPolicyEnum : enum8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : bitmap32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + int16u groupKeySetIDs[] = 0; + } + + /** Write a new set of keys for the given key set id. */ + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** Attributes and commands for selecting a mode from a list of supported options. */ +cluster RefrigeratorAndTemperatureControlledCabinetMode = 82 { + revision 2; + + enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; + kRapidCool = 16384; + kRapidFreeze = 16385; + } + + bitmap Feature : bitmap32 { + kOnOff = 0x1; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute ModeOptionStruct supportedModes[] = 0; + readonly attribute int8u currentMode = 1; + attribute optional nullable int8u startUpMode = 2; + attribute optional nullable int8u onMode = 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 ChangeToModeRequest { + int8u newMode = 0; + } + + response struct ChangeToModeResponse = 1 { + enum8 status = 0; + optional char_string statusText = 1; + } + + /** This command is used to change device modes. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; +} + +/** Attributes and commands for configuring the temperature control, and reporting temperature. */ +cluster TemperatureControl = 86 { + revision 1; // NOTE: Default/not specifically set + + bitmap Feature : bitmap32 { + kTemperatureNumber = 0x1; + kTemperatureLevel = 0x2; + kTemperatureStep = 0x4; + } + + readonly attribute optional temperature temperatureSetpoint = 0; + readonly attribute optional temperature minTemperature = 1; + readonly attribute optional temperature maxTemperature = 2; + readonly attribute optional temperature step = 3; + readonly attribute optional int8u selectedTemperatureLevel = 4; + readonly attribute optional char_string supportedTemperatureLevels[] = 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 SetTemperatureRequest { + optional temperature targetTemperature = 0; + optional int8u targetTemperatureLevel = 1; + } + + /** Set Temperature */ + command SetTemperature(SetTemperatureRequest): DefaultSuccess = 0; +} + +/** Attributes and commands for configuring the Refrigerator alarm. */ +cluster RefrigeratorAlarm = 87 { + revision 1; // NOTE: Default/not specifically set + + bitmap AlarmBitmap : bitmap32 { + kDoorOpen = 0x1; + } + + info event Notify = 0 { + AlarmBitmap active = 0; + AlarmBitmap inactive = 1; + AlarmBitmap state = 2; + AlarmBitmap mask = 3; + } + + readonly attribute AlarmBitmap mask = 0; + readonly attribute AlarmBitmap state = 2; + readonly attribute AlarmBitmap supported = 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 ma_rootdevice = 22, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location; + callback attribute hardwareVersion; + callback attribute hardwareVersionString; + callback attribute softwareVersion; + callback attribute softwareVersionString; + callback attribute manufacturingDate; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + ram attribute reachable default = 1; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster OtaSoftwareUpdateProvider { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command QueryImage; + handle command QueryImageResponse; + handle command ApplyUpdateRequest; + handle command ApplyUpdateResponse; + handle command NotifyUpdateApplied; + } + + server cluster OtaSoftwareUpdateRequestor { + callback attribute defaultOTAProviders; + ram attribute updatePossible default = true; + ram attribute updateState default = 0; + ram attribute updateStateProgress; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig; + callback attribute locationCapability; + callback attribute supportsConcurrentConnection; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command ArmFailSafe; + handle command ArmFailSafeResponse; + handle command SetRegulatoryConfig; + handle command SetRegulatoryConfigResponse; + handle command CommissioningComplete; + handle command CommissioningCompleteResponse; + } + + 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; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + + handle command ScanNetworks; + handle command ScanNetworksResponse; + handle command AddOrUpdateWiFiNetwork; + handle command RemoveNetwork; + handle command NetworkConfigResponse; + handle command ConnectNetwork; + handle command ConnectNetworkResponse; + handle command ReorderNetwork; + } + + server cluster DiagnosticLogs { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command RetrieveLogsRequest; + handle command RetrieveLogsResponse; + } + + server cluster GeneralDiagnostics { + emits event HardwareFaultChange; + emits event RadioFaultChange; + emits event NetworkFaultChange; + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount; + callback attribute upTime; + callback attribute totalOperationalHours; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command TestEventTrigger; + handle command TimeSnapshot; + handle command TimeSnapshotResponse; + } + + server cluster WiFiNetworkDiagnostics { + emits event Disconnection; + emits event AssociationFailure; + emits event ConnectionStatus; + callback attribute bssid; + callback attribute securityType; + callback attribute wiFiVersion; + callback attribute channelNumber; + callback attribute rssi; + callback attribute beaconLostCount; + callback attribute beaconRxCount; + callback attribute packetMulticastRxCount; + callback attribute packetMulticastTxCount; + callback attribute packetUnicastRxCount; + callback attribute packetUnicastTxCount; + callback attribute currentMaxRate; + callback attribute overrunCount; + ram attribute featureMap default = 3; + ram attribute clusterRevision default = 1; + + handle command ResetCounts; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus; + callback attribute adminFabricIndex; + callback attribute adminVendorId; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command OpenCommissioningWindow; + handle command RevokeCommissioning; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command AttestationRequest; + handle command AttestationResponse; + handle command CertificateChainRequest; + handle command CertificateChainResponse; + handle command CSRRequest; + handle command CSRResponse; + handle command AddNOC; + handle command UpdateNOC; + handle command NOCResponse; + handle command UpdateFabricLabel; + handle command RemoveFabric; + handle command AddTrustedRootCertificate; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command KeySetWrite; + handle command KeySetRead; + handle command KeySetReadResponse; + handle command KeySetRemove; + handle command KeySetReadAllIndices; + handle command KeySetReadAllIndicesResponse; + } +} +endpoint 1 { + device type ma_refrigerator = 112, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster RefrigeratorAndTemperatureControlledCabinetMode { + callback attribute supportedModes; + callback attribute currentMode; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 2; + + handle command ChangeToMode; + handle command ChangeToModeResponse; + } + + server cluster RefrigeratorAlarm { + ram attribute mask default = 0; + ram attribute state default = 0; + ram attribute supported default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} +endpoint 2 { + device type ma_temperature_controlled_cabinet = 113, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster TemperatureControl { + ram attribute temperatureSetpoint; + ram attribute minTemperature; + ram attribute maxTemperature; + ram attribute step; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 1; + + handle command SetTemperature; + } +} +endpoint 3 { + device type ma_temperature_controlled_cabinet = 113, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster TemperatureControl { + ram attribute temperatureSetpoint; + ram attribute minTemperature; + ram attribute maxTemperature; + ram attribute step; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 1; + + handle command SetTemperature; + } +} + + diff --git a/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.zap b/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.zap new file mode 100644 index 0000000000..edc35aa7a3 --- /dev/null +++ b/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.zap @@ -0,0 +1,4216 @@ +{ + "fileFormat": 2, + "featureLevel": 103, + "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", + "category": "matter", + "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": [ + { + "id": 1, + "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice", + "deviceTypeOrder": 0 + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice", + "deviceTypeOrder": 0 + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "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": null, + "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": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "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": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPathsPerInvoke", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "3", + "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": "server", + "enabled": 1, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdatePossible", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "true", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdateState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "UpdateStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdateStateProgress", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "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": null, + "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": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshot", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshotResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "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": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "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": "Wi-Fi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "MA-refrigerator", + "deviceTypeRef": { + "code": 112, + "profileId": 259, + "label": "MA-refrigerator", + "name": "MA-refrigerator", + "deviceTypeOrder": 0 + }, + "deviceTypes": [ + { + "code": 112, + "profileId": 259, + "label": "MA-refrigerator", + "name": "MA-refrigerator", + "deviceTypeOrder": 0 + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 112 + ], + "deviceTypeName": "MA-refrigerator", + "deviceTypeCode": 112, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Refrigerator And Temperature Controlled Cabinet Mode", + "code": 82, + "mfgCode": null, + "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "SupportedModes", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Refrigerator Alarm", + "code": 87, + "mfgCode": null, + "define": "REFRIGERATOR_ALARM_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Mask", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "AlarmBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "State", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "AlarmBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Supported", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "AlarmBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 3, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet", + "deviceTypeOrder": 0 + }, + "deviceTypes": [ + { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet", + "deviceTypeOrder": 0 + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 113 + ], + "deviceTypeName": "MA-temperature-controlled-cabinet", + "deviceTypeCode": 113, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "SetTemperature", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "TemperatureSetpoint", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinTemperature", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxTemperature", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Step", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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 + } + ] + } + ] + }, + { + "id": 4, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet", + "deviceTypeOrder": 0 + }, + "deviceTypes": [ + { + "code": 113, + "profileId": 259, + "label": "MA-temperature-controlled-cabinet", + "name": "MA-temperature-controlled-cabinet", + "deviceTypeOrder": 0 + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 113 + ], + "deviceTypeName": "MA-temperature-controlled-cabinet", + "deviceTypeCode": 113, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Control", + "code": 86, + "mfgCode": null, + "define": "TEMPERATURE_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "SetTemperature", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "TemperatureSetpoint", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinTemperature", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxTemperature", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Step", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "MA-refrigerator", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 2, + "profileId": 259, + "endpointId": 2, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 3, + "profileId": 259, + "endpointId": 3, + "networkId": 0, + "parentEndpointIdentifier": null + } + ] +} \ No newline at end of file diff --git a/examples/refrigerator-app/silabs/include/AppConfig.h b/examples/refrigerator-app/silabs/include/AppConfig.h new file mode 100644 index 0000000000..3c9472f8d3 --- /dev/null +++ b/examples/refrigerator-app/silabs/include/AppConfig.h @@ -0,0 +1,61 @@ +/* + * + * Copyright (c) 2024 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 "silabs_utils.h" + +// ---- Refrigerator Example App Config ---- + +#define APP_TASK_NAME "Refr" + +#define BLE_DEV_NAME "SiLabs-Refrigerator" + +// Time it takes in ms for the simulated actuator to move from one +// state to another. +#define ACTUATOR_MOVEMENT_PERIOS_MS 10 + +// APP Logo, boolean only. must be 64x64 +#define ON_DEMO_BITMAP \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xE0, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0x81, 0x81, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC1, 0x83, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x07, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x07, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, \ + 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, \ + 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, \ + 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, \ + 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xE0, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF +#define OFF_DEMO_BITMAP ON_DEMO_BITMAP diff --git a/examples/refrigerator-app/silabs/include/AppEvent.h b/examples/refrigerator-app/silabs/include/AppEvent.h new file mode 100644 index 0000000000..59d49c5002 --- /dev/null +++ b/examples/refrigerator-app/silabs/include/AppEvent.h @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2024 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 + +struct AppEvent; +typedef void (*EventHandler)(AppEvent *); + +struct AppEvent +{ + enum AppEventTypes + { + kEventType_Button = 0, + kEventType_Timer, + kEventType_Refrigerator, + kEventType_Install, + }; + + uint16_t Type; + + union + { + struct + { + uint8_t Action; + } ButtonEvent; + struct + { + void * Context; + } TimerEvent; + struct + { + uint8_t Action; + int32_t Actor; + } RefrigeratorEvent; + }; + + EventHandler Handler; +}; diff --git a/examples/refrigerator-app/silabs/include/AppTask.h b/examples/refrigerator-app/silabs/include/AppTask.h new file mode 100644 index 0000000000..36c4581b29 --- /dev/null +++ b/examples/refrigerator-app/silabs/include/AppTask.h @@ -0,0 +1,110 @@ +/* + * + * Copyright (c) 2024 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 + +/********************************************************** + * Includes + *********************************************************/ + +#include +#include + +#ifdef DISPLAY_ENABLED +#include "RefrigeratorUI.h" +#endif + +#include "AppEvent.h" +#include "BaseApplication.h" +#include "RefrigeratorManager.h" +#include +#include +#include +#include + +/********************************************************** + * Defines + *********************************************************/ + +// Application-defined error codes in the CHIP_ERROR space. +#define APP_ERROR_EVENT_QUEUE_FAILED CHIP_APPLICATION_ERROR(0x01) +#define APP_ERROR_CREATE_TASK_FAILED CHIP_APPLICATION_ERROR(0x02) +#define APP_ERROR_UNHANDLED_EVENT CHIP_APPLICATION_ERROR(0x03) +#define APP_ERROR_CREATE_TIMER_FAILED CHIP_APPLICATION_ERROR(0x04) +#define APP_ERROR_START_TIMER_FAILED CHIP_APPLICATION_ERROR(0x05) +#define APP_ERROR_STOP_TIMER_FAILED CHIP_APPLICATION_ERROR(0x06) + +/********************************************************** + * AppTask Declaration + *********************************************************/ + +class AppTask : public BaseApplication +{ + +public: + AppTask() = default; + + static AppTask & GetAppTask() { return sAppTask; } + + /** + * @brief AppTask task main loop function + * + * @param pvParameter FreeRTOS task parameter + */ + static void AppTaskMain(void * pvParameter); + + CHIP_ERROR StartAppTask(); + + /** + * @brief Event handler when a button is pressed + * Function posts an event for button processing + * + * @param buttonHandle APP_CONTROL_BUTTON or APP_FUNCTION_BUTTON + * @param btnAction button action - SL_SIMPLE_BUTTON_PRESSED, + * SL_SIMPLE_BUTTON_RELEASED or SL_SIMPLE_BUTTON_DISABLED + */ + static void ButtonEventHandler(uint8_t button, uint8_t btnAction); + +private: + static AppTask sAppTask; + + /** + * @brief AppTask initialisation function + * + * @return CHIP_ERROR + */ + CHIP_ERROR Init(); + + /** + * @brief PB0 Button event processing function + * Press and hold will trigger a factory reset timer start + * Press and release will restart BLEAdvertising if not commisionned + * + * @param aEvent button event being processed + */ + static void ButtonHandler(AppEvent * aEvent); + + /** + * @brief PB1 Button event processing function + * Function triggers an action sent to the CHIP task + // TODO: Action for refrigerator is not decided yet + * + * @param aEvent button event being processed + */ + static void RefrigeratorActionEventHandler(AppEvent * aEvent); +}; diff --git a/examples/refrigerator-app/silabs/include/CHIPProjectConfig.h b/examples/refrigerator-app/silabs/include/CHIPProjectConfig.h new file mode 100644 index 0000000000..dfaca5d760 --- /dev/null +++ b/examples/refrigerator-app/silabs/include/CHIPProjectConfig.h @@ -0,0 +1,111 @@ +/* + * + * Copyright (c) 2024 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. +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif + +// For convenience, Chip Security Test Mode can be enabled and the +// requirement for authentication in various protocols can be disabled. +// +// WARNING: These options make it possible to circumvent basic Chip security functionality, +// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. +// +#define CHIP_CONFIG_SECURITY_TEST_MODE 0 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID + * + * 0xFFF1: Test vendor + */ +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID + * + * 0x800E: example refrigerator app + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x800E + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + * + * Enable support for Chip-over-BLE (CHIPoBLE). + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC + * + * Enables synchronizing the device's real time clock with a remote Chip Time service + * using the Chip Time Sync protocol. + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 0 + +/** + * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER + * + * Enables the use of a hard-coded default serial number if none + * is found in Chip NV storage. + */ +#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE + * + * A size, in bytes, of the individual debug event logging buffer. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) + +/** + * @def CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL + * + * @brief + * Active retransmit interval, or time to wait before retransmission after + * subsequent failures in milliseconds. + * + * This is the default value, that might be adjusted by end device depending on its + * needs (e.g. sleeping period) using Service Discovery TXT record CRA key. + * + */ +#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL (2000_ms32) + +#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 diff --git a/examples/refrigerator-app/silabs/include/RefrigeratorIcons.h b/examples/refrigerator-app/silabs/include/RefrigeratorIcons.h new file mode 100644 index 0000000000..094775fa9f --- /dev/null +++ b/examples/refrigerator-app/silabs/include/RefrigeratorIcons.h @@ -0,0 +1,218 @@ +/* + * + * 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. + */ +#pragma once + +#define SILABS_LOGO_WIDTH 47 +#define SILABS_LOGO_HEIGHT 18 +#define BLUETOOTH_ICON_SIZE 18 + +// Status Icon defines +#define STATUS_ICON_LINE 0 +#define SILABS_ICON_POSITION_X 0 +#define BLE_ICON_POSITION_X 72 +#define NETWORK_ICON_POSITION_X 90 +#define MATTER_ICON_POSITION_X 108 + +// Heating/Cooling position +#define HEATING_COOLING_X 90 +#define HEATING_COOLING_Y 40 + +#define BLUETOOTH_ICON_SMALL \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0x7F, 0xFE, 0xEF, 0xF1, 0x7F, 0x9F, 0xFF, 0x7B, 0xFF, 0x1F, 0xFE, 0xFF, 0xFC, 0xFF, \ + 0xF3, 0xFF, 0x87, 0xFF, 0xEF, 0xFD, 0xDF, 0xE7, 0xBF, 0xC7, 0xFF, 0x9F, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F + +#define SILABS_LOGO_SMALL \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, \ + 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x80, 0x3F, 0xFF, 0xFF, 0xFF, 0x00, 0xE0, 0x9F, 0xFF, 0xE7, 0x3F, 0xE0, 0xF1, 0x83, \ + 0xFF, 0xF9, 0xEF, 0xFF, 0x3F, 0xE0, 0x3F, 0xFC, 0xFF, 0xFF, 0x7F, 0xF8, 0x0F, 0xFC, 0xFF, 0xFF, 0x3F, 0xFE, 0x03, 0xFC, \ + 0xFF, 0xF7, 0x9F, 0xFF, 0x81, 0x07, 0x02, 0xF8, 0xFF, 0xFF, 0xE0, 0x07, 0x00, 0xFE, 0xFF, 0xFF, 0xF8, 0x03, 0xC0, 0xFF, \ + 0xFF, 0xFF, 0xFE, 0x9F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0x3F + +#define HEATING_BITMAP \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, \ + 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFE, 0x7F, 0xFC, 0x1F, \ + 0x1F, 0xF8, 0xF8, 0x3F, 0x07, 0xE0, 0xFC, 0xBF, 0xC7, 0xE3, 0xFD, 0xFF, 0xE3, 0xC7, 0xFF, 0xFF, 0xF3, 0xCF, 0xFF, 0xFF, \ + 0xF3, 0xCF, 0xFF, 0xFF, 0xF3, 0xCF, 0xFF, 0xFF, 0xF3, 0xCF, 0xFF, 0xFF, 0xE3, 0xC7, 0xFF, 0xBF, 0xC7, 0xE3, 0xFD, 0x3F, \ + 0x07, 0xE0, 0xFC, 0x1F, 0x1F, 0xF8, 0xF8, 0x3F, 0xFE, 0x7F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xBF, 0xFD, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + +#define HEATING_WIDTH 32 +#define HEATING_HEIGHT 32 + +#define COOLING_BITMAP \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFD, 0xFF, 0xFF, 0x1F, 0xF8, 0xFF, 0xFF, \ + 0x3F, 0xFC, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0x3F, 0x7F, 0xFE, 0xFC, 0x3F, 0x7F, 0xFE, 0xFC, 0x3F, \ + 0x3E, 0x7C, 0xFC, 0x0F, 0x0C, 0x30, 0xF0, 0xCF, 0x80, 0x01, 0xF3, 0xFF, 0xE3, 0xC7, 0xFF, 0xFF, 0xF3, 0xCF, 0xFF, 0xFF, \ + 0xF3, 0xCF, 0xFF, 0xFF, 0xF3, 0xCF, 0xFF, 0xFF, 0xF3, 0xCF, 0xFF, 0xFF, 0xE3, 0xC7, 0xFF, 0xCF, 0x80, 0x01, 0xF3, 0x0F, \ + 0x0C, 0x30, 0xF0, 0x3F, 0x3E, 0x7C, 0xFC, 0x3F, 0x7F, 0xFE, 0xFC, 0x3F, 0x7F, 0xFE, 0xFC, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, \ + 0x7F, 0xFE, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0x1F, 0xF8, 0xFF, 0xFF, 0xBF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + +#define HEATING_COOLING_BITMAP \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFC, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, \ + 0xFC, 0xE0, 0xFF, 0xFF, 0xFC, 0xF9, 0xF7, 0x7F, 0xFC, 0xF8, 0xF3, 0x1F, 0xFC, 0xFC, 0xF9, 0x1F, 0x78, 0xFC, 0xFC, 0xFF, \ + 0x01, 0x7C, 0xFE, 0xFF, 0x03, 0x3C, 0xFF, 0xFF, 0xE3, 0x9F, 0xFF, 0xFF, 0xF3, 0x8F, 0xF3, 0xFF, 0xF3, 0x87, 0xE3, 0xFF, \ + 0xF3, 0x83, 0xF7, 0xC7, 0xF0, 0x01, 0xF7, 0x07, 0xF0, 0x00, 0xFF, 0x0F, 0x7F, 0x00, 0xFF, 0xCF, 0x3F, 0x80, 0xFF, 0xCF, \ + 0x1F, 0x80, 0xFF, 0xFF, 0x0F, 0xC0, 0xFF, 0xFF, 0x07, 0xE0, 0xFD, 0xFF, 0xF3, 0xF8, 0xFD, 0xFF, 0xF9, 0xFF, 0xFC, 0xFF, \ + 0xFC, 0x3F, 0xFC, 0x7F, 0xDE, 0xFF, 0xFF, 0x3F, 0x1F, 0xFE, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + +#define COOLING_WIDTH 32 +#define COOLING_HEIGHT 32 + +// Font for temperature +#define CELSIUS_INDEX 2320 +#define FAHRENHEIT_INDEX 2370 +#define DEGREE_INDEX 2420 + +#define MONACO_FONT_WIDTH 29 +#define MONACO_FONT_NB_LENGTH 232 +#define MONACO_FONT_CH_LENGTH 50 + +#define MONACO_48PT \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFC, 0xFF, 0xFF, \ + 0x00, 0xF0, 0xFF, 0x7F, 0x00, 0xC0, 0xFF, 0x3F, 0x00, 0x80, 0xFF, 0x1F, 0x60, 0x00, 0xFF, 0x1F, 0xF8, 0x03, 0xFF, 0x0F, \ + 0xFC, 0x07, 0xFE, 0x07, 0xFE, 0x07, 0xFE, 0x07, 0xFE, 0x07, 0xFC, 0x07, 0xFF, 0x03, 0xFC, 0x03, 0xFF, 0x03, 0xFC, 0x03, \ + 0xFF, 0x01, 0xF8, 0x83, 0xFF, 0x00, 0xF8, 0x83, 0xFF, 0x00, 0xF8, 0x83, 0x7F, 0x30, 0xF8, 0x83, 0x3F, 0x30, 0xF8, 0x83, \ + 0x3F, 0x38, 0xF8, 0x81, 0x1F, 0x3C, 0xF8, 0x81, 0x0F, 0x3C, 0xF8, 0x81, 0x0F, 0x3E, 0xF8, 0x81, 0x07, 0x3E, 0xF8, 0x81, \ + 0x07, 0x3F, 0xF8, 0x83, 0x83, 0x3F, 0xF8, 0x83, 0x81, 0x3F, 0xF8, 0x83, 0xC1, 0x3F, 0xF8, 0x83, 0xE0, 0x1F, 0xF8, 0x03, \ + 0xE0, 0x1F, 0xF8, 0x03, 0xF0, 0x1F, 0xF8, 0x03, 0xF8, 0x1F, 0xFC, 0x07, 0xF8, 0x0F, 0xFC, 0x07, 0xFC, 0x0F, 0xFC, 0x07, \ + 0xFC, 0x07, 0xFE, 0x0F, 0xFC, 0x07, 0xFE, 0x0F, 0xF8, 0x03, 0xFF, 0x1F, 0xE0, 0x00, 0xFF, 0x3F, 0x00, 0x80, 0xFF, 0x7F, \ + 0x00, 0xC0, 0xFF, 0xFF, 0x00, 0xE0, 0xFF, 0xFF, 0x03, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Character 0x30 (48: '0')*/ \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x0F, 0xFC, 0xFF, 0xFF, 0x07, 0xFC, 0xFF, 0xFF, 0x03, 0xFC, 0xFF, 0xFF, 0x00, 0xFC, 0xFF, 0x3F, 0x00, 0xFC, 0xFF, \ + 0x1F, 0x00, 0xFC, 0xFF, 0x0F, 0x10, 0xFC, 0xFF, 0x0F, 0x1C, 0xFC, 0xFF, 0x0F, 0x1E, 0xFC, 0xFF, 0xCF, 0x1F, 0xFC, 0xFF, \ + 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, \ + 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, \ + 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, \ + 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, \ + 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0x0F, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF8, \ + 0x0F, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Character 0x31 (49: '1')*/ \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0xF8, 0xFF, \ + 0x3F, 0x00, 0xC0, 0xFF, 0x0F, 0x00, 0x80, 0xFF, 0x0F, 0x00, 0x00, 0xFF, 0x0F, 0xF8, 0x00, 0xFF, 0x0F, 0xFF, 0x03, 0xFE, \ + 0xEF, 0xFF, 0x07, 0xFE, 0xFF, 0xFF, 0x0F, 0xFE, 0xFF, 0xFF, 0x0F, 0xFE, 0xFF, 0xFF, 0x0F, 0xFE, 0xFF, 0xFF, 0x0F, 0xFE, \ + 0xFF, 0xFF, 0x07, 0xFE, 0xFF, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0x81, 0xFF, 0xFF, 0xFF, 0xC0, 0xFF, \ + 0xFF, 0x7F, 0xC0, 0xFF, 0xFF, 0x3F, 0xE0, 0xFF, 0xFF, 0x1F, 0xF0, 0xFF, 0xFF, 0x0F, 0xF8, 0xFF, 0xFF, 0x07, 0xFC, 0xFF, \ + 0xFF, 0x03, 0xFE, 0xFF, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0x81, 0xFF, 0xFF, 0xFF, 0xC0, 0xFF, 0xFF, 0x7F, 0xE0, 0xFF, 0xFF, \ + 0x3F, 0xF0, 0xFF, 0xFF, 0x1F, 0xF8, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x0F, 0xFC, 0xFF, 0xFF, 0x0F, 0xFE, 0xFF, 0xFF, \ + 0x0F, 0xFE, 0xFF, 0xFF, 0x07, 0xFE, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0xFE, 0x07, 0x00, 0x00, 0xFC, 0x07, 0x00, 0x00, 0xFC, \ + 0x07, 0x00, 0x00, 0xFC, 0x07, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Character 0x32 (50: '2')*/ \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFE, 0xFF, \ + 0x0F, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0x0F, 0x7C, 0x80, 0xFF, 0x8F, 0xFF, 0x01, 0xFF, \ + 0xFF, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, \ + 0xFF, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0x83, 0xFF, 0xFF, 0xFF, 0x81, 0xFF, 0xFF, 0x7F, 0xC0, 0xFF, 0xFF, 0x07, 0xE0, 0xFF, \ + 0x7F, 0x00, 0xF0, 0xFF, 0x7F, 0x00, 0xF8, 0xFF, 0x7F, 0x00, 0xE0, 0xFF, 0x7F, 0x00, 0x80, 0xFF, 0xFF, 0x7F, 0x00, 0xFF, \ + 0xFF, 0xFF, 0x01, 0xFF, 0xFF, 0xFF, 0x07, 0xFE, 0xFF, 0xFF, 0x07, 0xFE, 0xFF, 0xFF, 0x0F, 0xFC, 0xFF, 0xFF, 0x0F, 0xFC, \ + 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x0F, 0xFC, 0xFF, 0xFF, 0x0F, 0xFC, 0xFF, 0xFF, 0x0F, 0xFC, \ + 0xFF, 0xFF, 0x07, 0xFE, 0xF7, 0xFF, 0x07, 0xFE, 0x87, 0xFF, 0x01, 0xFF, 0x07, 0x7C, 0x80, 0xFF, 0x07, 0x00, 0xC0, 0xFF, \ + 0x07, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xF0, 0xFF, 0x7F, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Character 0x33 (51: '3')*/ \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0x7F, 0xE0, 0xFF, 0xFF, 0x7F, 0xE0, 0xFF, 0xFF, 0x3F, 0xE0, 0xFF, 0xFF, 0x1F, 0xE0, 0xFF, \ + 0xFF, 0x1F, 0xE0, 0xFF, 0xFF, 0x0F, 0xE0, 0xFF, 0xFF, 0x07, 0xE0, 0xFF, 0xFF, 0x07, 0xE0, 0xFF, 0xFF, 0x83, 0xE0, 0xFF, \ + 0xFF, 0x81, 0xE0, 0xFF, 0xFF, 0xC0, 0xE0, 0xFF, 0xFF, 0xE0, 0xE0, 0xFF, 0x7F, 0xE0, 0xE0, 0xFF, 0x3F, 0xF0, 0xE0, 0xFF, \ + 0x3F, 0xF8, 0xE0, 0xFF, 0x1F, 0xF8, 0xE0, 0xFF, 0x0F, 0xFC, 0xE0, 0xFF, 0x0F, 0xFE, 0xE0, 0xFF, 0x07, 0xFE, 0xE0, 0xFF, \ + 0x03, 0xFF, 0xE0, 0xFF, 0x83, 0xFF, 0xE0, 0xFF, 0x81, 0xFF, 0xC0, 0xFF, 0x01, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0xF0, \ + 0x01, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, \ + 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, \ + 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Character 0x34 (52: '4')*/ \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0x0F, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0xFE, 0x0F, 0x00, 0x00, 0xFE, \ + 0x0F, 0xFE, 0xFF, 0xFF, 0x0F, 0xFE, 0xFF, 0xFF, 0x0F, 0xFE, 0xFF, 0xFF, 0x0F, 0xFE, 0xFF, 0xFF, 0x0F, 0xFE, 0xFF, 0xFF, \ + 0x0F, 0xFE, 0xFF, 0xFF, 0x0F, 0xFE, 0xFF, 0xFF, 0x0F, 0xFE, 0xFF, 0xFF, 0x0F, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0xFC, 0xFF, \ + 0x0F, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0xC0, 0xFF, 0x0F, 0x00, 0x80, 0xFF, 0xFF, 0x0F, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0xFE, \ + 0xFF, 0xFF, 0x03, 0xFE, 0xFF, 0xFF, 0x07, 0xFE, 0xFF, 0xFF, 0x07, 0xFC, 0xFF, 0xFF, 0x0F, 0xFC, 0xFF, 0xFF, 0x0F, 0xFC, \ + 0xFF, 0xFF, 0x0F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x0F, 0xFC, 0xFF, 0xFF, 0x0F, 0xFC, 0xFF, 0xFF, 0x0F, 0xFC, \ + 0xFF, 0xFF, 0x07, 0xFE, 0xEF, 0xFF, 0x03, 0xFE, 0x07, 0xFF, 0x00, 0xFF, 0x07, 0x00, 0x80, 0xFF, 0x07, 0x00, 0xC0, 0xFF, \ + 0x07, 0x00, 0xE0, 0xFF, 0x0F, 0x00, 0xF0, 0xFF, 0xFF, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Character 0x35 (53: '5')*/ \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xC0, 0xFF, \ + 0xFF, 0x07, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0xFE, 0xFF, 0x00, 0x00, 0xFE, 0x7F, 0x80, 0x07, 0xFE, 0x3F, 0xE0, 0x7F, 0xFE, \ + 0x1F, 0xF0, 0xFF, 0xFF, 0x1F, 0xF8, 0xFF, 0xFF, 0x0F, 0xFC, 0xFF, 0xFF, 0x0F, 0xFE, 0xFF, 0xFF, 0x07, 0xFE, 0xFF, 0xFF, \ + 0x07, 0xFE, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0x03, 0x0F, 0xE0, 0xFF, \ + 0x83, 0x03, 0x80, 0xFF, 0x83, 0x01, 0x00, 0xFF, 0x83, 0x00, 0x00, 0xFE, 0x03, 0xC0, 0x07, 0xFC, 0x03, 0xF0, 0x0F, 0xFC, \ + 0x03, 0xF8, 0x1F, 0xF8, 0x03, 0xFC, 0x3F, 0xF8, 0x03, 0xFC, 0x3F, 0xF8, 0x07, 0xFE, 0x3F, 0xF8, 0x07, 0xFE, 0x3F, 0xF8, \ + 0x07, 0xFE, 0x3F, 0xF8, 0x07, 0xFE, 0x3F, 0xF8, 0x07, 0xFE, 0x3F, 0xF8, 0x0F, 0xFE, 0x3F, 0xF8, 0x0F, 0xFC, 0x1F, 0xF8, \ + 0x0F, 0xFC, 0x1F, 0xFC, 0x1F, 0xF8, 0x0F, 0xFC, 0x1F, 0xF0, 0x07, 0xFE, 0x3F, 0xC0, 0x01, 0xFE, 0x7F, 0x00, 0x00, 0xFF, \ + 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0x01, 0xE0, 0xFF, 0xFF, 0x07, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Character 0x36 (54: '6')*/ \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0x0F, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF8, \ + 0xFF, 0xFF, 0x3F, 0xF8, 0xFF, 0xFF, 0x1F, 0xF8, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x0F, 0xFE, 0xFF, 0xFF, 0x0F, 0xFE, \ + 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0x83, 0xFF, 0xFF, 0xFF, 0x81, 0xFF, 0xFF, 0xFF, 0xC1, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, \ + 0xFF, 0x7F, 0xE0, 0xFF, 0xFF, 0x3F, 0xF0, 0xFF, 0xFF, 0x3F, 0xF8, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x0F, 0xFC, 0xFF, \ + 0xFF, 0x07, 0xFE, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0x83, 0xFF, 0xFF, 0xFF, 0x81, 0xFF, 0xFF, \ + 0xFF, 0xC1, 0xFF, 0xFF, 0xFF, 0xC0, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0xFF, 0xE0, 0xFF, 0xFF, 0x7F, 0xE0, 0xFF, 0xFF, \ + 0x7F, 0xE0, 0xFF, 0xFF, 0x7F, 0xE0, 0xFF, 0xFF, 0x7F, 0xE0, 0xFF, 0xFF, 0x7F, 0xE0, 0xFF, 0xFF, 0x7F, 0xF0, 0xFF, 0xFF, \ + 0x7F, 0xF0, 0xFF, 0xFF, 0x7F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Character 0x37 (55: '7')*/ \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xF8, 0xFF, \ + 0xFF, 0x01, 0xE0, 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0x7F, 0x00, 0x80, 0xFF, 0x3F, 0xE0, 0x00, 0xFF, 0x3F, 0xF8, 0x03, 0xFF, \ + 0x1F, 0xFC, 0x07, 0xFE, 0x1F, 0xFC, 0x0F, 0xFE, 0x1F, 0xFC, 0x0F, 0xFE, 0x1F, 0xFC, 0x0F, 0xFE, 0x1F, 0xFC, 0x07, 0xFE, \ + 0x1F, 0xF8, 0x07, 0xFF, 0x3F, 0xF0, 0x03, 0xFF, 0x3F, 0xE0, 0x81, 0xFF, 0x7F, 0xC0, 0x80, 0xFF, 0x7F, 0x00, 0xC0, 0xFF, \ + 0xFF, 0x00, 0xE0, 0xFF, 0xFF, 0x01, 0xF0, 0xFF, 0xFF, 0x03, 0xF8, 0xFF, 0xFF, 0x00, 0xE0, 0xFF, 0x7F, 0x00, 0xC0, 0xFF, \ + 0x3F, 0x60, 0x80, 0xFF, 0x1F, 0xF0, 0x00, 0xFF, 0x1F, 0xF8, 0x01, 0xFE, 0x0F, 0xFC, 0x03, 0xFE, 0x0F, 0xFC, 0x07, 0xFC, \ + 0x07, 0xFE, 0x0F, 0xFC, 0x07, 0xFE, 0x0F, 0xFC, 0x07, 0xFF, 0x1F, 0xFC, 0x07, 0xFF, 0x1F, 0xFC, 0x07, 0xFF, 0x1F, 0xFC, \ + 0x07, 0xFE, 0x0F, 0xFC, 0x07, 0xFC, 0x0F, 0xFC, 0x0F, 0xF8, 0x07, 0xFE, 0x0F, 0xE0, 0x01, 0xFE, 0x1F, 0x00, 0x00, 0xFF, \ + 0x3F, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0xE0, 0xFF, 0xFF, 0x03, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Character 0x38 (56: '8')*/ \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0xFE, 0xFF, \ + 0xFF, 0x00, 0xF0, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0xC0, 0xFF, 0x0F, 0x70, 0x80, 0xFF, 0x07, 0xFC, 0x01, 0xFF, \ + 0x07, 0xFE, 0x03, 0xFF, 0x03, 0xFF, 0x03, 0xFF, 0x83, 0xFF, 0x07, 0xFE, 0x83, 0xFF, 0x07, 0xFE, 0x83, 0xFF, 0x0F, 0xFC, \ + 0xC1, 0xFF, 0x0F, 0xFC, 0xC1, 0xFF, 0x0F, 0xFC, 0xC1, 0xFF, 0x0F, 0xFC, 0x83, 0xFF, 0x07, 0xFC, 0x83, 0xFF, 0x07, 0xFC, \ + 0x83, 0xFF, 0x07, 0xFC, 0x03, 0xFF, 0x03, 0xF8, 0x03, 0xFE, 0x01, 0xF8, 0x07, 0x7C, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0xF8, \ + 0x1F, 0x00, 0x10, 0xF8, 0x3F, 0x00, 0x1C, 0xFC, 0xFF, 0x00, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x1F, 0xFC, \ + 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0x0F, 0xFC, 0xFF, 0xFF, 0x0F, 0xFE, 0xFF, 0xFF, 0x07, 0xFE, 0xFF, 0xFF, 0x07, 0xFE, \ + 0xFF, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0x81, 0xFF, 0xCF, 0xFF, 0x80, 0xFF, 0x0F, 0x3E, 0xC0, 0xFF, 0x0F, 0x00, 0xE0, 0xFF, \ + 0x0F, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0xFC, 0xFF, 0x3F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Character 0x39 (57: '9')*/ \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFC, 0x1F, 0xE0, 0x0F, 0xE3, 0xC7, 0xFF, \ + 0xE3, 0xFF, 0xE3, 0xFF, 0xE3, 0xFF, 0xE3, 0xFF, 0xE3, 0xFF, 0xE3, 0xFF, 0xC3, 0xFF, 0x87, 0xEF, 0x0F, 0xE0, 0x1F, 0xE0, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Character 0x63 (99: 'c')*/ \ + 0xFF, 0xFB, 0x7F, 0xC0, 0x3F, 0xC0, 0x1F, 0xFF, 0x1F, 0xFF, 0x9F, 0xFF, 0x9F, 0xFF, 0x9F, 0xFF, 0x03, 0xF0, 0x03, 0xF0, \ + 0x9F, 0xFF, 0x9F, 0xFF, 0x9F, 0xFF, 0x9F, 0xFF, 0x9F, 0xFF, 0x9F, 0xFF, 0x9F, 0xFF, 0x9F, 0xFF, 0x9F, 0xFF, 0x9F, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Character 0x66 (102: 'f')*/ \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE3, 0xFF, 0xDD, 0xFF, 0xDD, 0xFF, 0xDD, 0xFF, 0xE3, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, /* Character 0x20 (32: 'degree')*/ diff --git a/examples/refrigerator-app/silabs/include/RefrigeratorManager.h b/examples/refrigerator-app/silabs/include/RefrigeratorManager.h new file mode 100644 index 0000000000..669fd833f4 --- /dev/null +++ b/examples/refrigerator-app/silabs/include/RefrigeratorManager.h @@ -0,0 +1,74 @@ +/* + * + * Copyright (c) 2024 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 "AppEvent.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters::RefrigeratorAlarm; +using namespace chip::app::Clusters::RefrigeratorAlarm::Attributes; +using namespace chip::app::Clusters::TemperatureControl; +using namespace chip::app::Clusters::TemperatureControl::Attributes; +using namespace chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode; +using namespace chip::DeviceLayer; +using chip::Protocols::InteractionModel::Status; + +class RefrigeratorManager +{ +public: + CHIP_ERROR Init(); + void TempCtrlAttributeChangeHandler(EndpointId endpointId, AttributeId attributeId, uint8_t * value, uint16_t size); + void RefAlaramAttributeChangeHandler(EndpointId endpointId, AttributeId attributeId, uint8_t * value, uint16_t size); + uint8_t GetMode(); + int8_t GetCurrentTemp(); + int8_t SetMode(); + +private: + friend RefrigeratorManager & RefrigeratorMgr(); + + int16_t mCurrentMode; + int16_t mStartUpMode; + int16_t mOnMode; + + int16_t mTemperatureSetpoint; + int16_t mMinTemperature; + int16_t mMaxTemperature; + + chip::app::Clusters::RefrigeratorAlarm::AlarmBitmap mMask; + chip::app::Clusters::RefrigeratorAlarm::AlarmBitmap mState; + chip::app::Clusters::RefrigeratorAlarm::AlarmBitmap mSupported; + + int8_t ConvertToPrintableTemp(int16_t temperature); + static RefrigeratorManager sRefrigeratorMgr; +}; + +inline RefrigeratorManager & RefrigeratorMgr() +{ + return RefrigeratorManager::sRefrigeratorMgr; +} diff --git a/examples/refrigerator-app/silabs/include/RefrigeratorUI.h b/examples/refrigerator-app/silabs/include/RefrigeratorUI.h new file mode 100644 index 0000000000..cf157420fb --- /dev/null +++ b/examples/refrigerator-app/silabs/include/RefrigeratorUI.h @@ -0,0 +1,40 @@ +/* + * + * Copyright (c) 2024 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 "RefrigeratorIcons.h" +#include "glib.h" +#include "lcd.h" + +class RefrigeratorUI +{ + +public: + static void DrawUI(GLIB_Context_t * glibContext); + static void SetCurrentTemp(int8_t temp); + static void SetMode(uint8_t mode); + +private: + static void DrawHeader(GLIB_Context_t * glibContext); + static void DrawFooter(GLIB_Context_t * glibContext, bool autoMode = true); + static void DrawCurrentTemp(GLIB_Context_t * glibContext, int8_t temp, bool isCelsius = true); + static void DrawFont(GLIB_Context_t * glibContext, uint8_t initial_x, uint8_t initial_y, uint8_t width, uint8_t * data, + uint32_t size); + static void DrawSetPoint(GLIB_Context_t * glibContext, int8_t setPoint, bool secondLine); +}; diff --git a/examples/refrigerator-app/silabs/include/refrigerator-and-temperature-controlled-cabinet-mode.h b/examples/refrigerator-app/silabs/include/refrigerator-and-temperature-controlled-cabinet-mode.h new file mode 100644 index 0000000000..2c13cd1f4a --- /dev/null +++ b/examples/refrigerator-app/silabs/include/refrigerator-and-temperature-controlled-cabinet-mode.h @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2024 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 RefrigeratorAndTemperatureControlledCabinetMode { + +const uint8_t ModeNormal = 0; +const uint8_t ModeRapidCool = 1; +const uint8_t ModeRapidFreeze = 2; + +/// This is an application level delegate to handle LaundryWasherMode commands according to the specific business logic. +class RefrigeratorAndTemperatureControlledCabinetModeDelegate : public ModeBase::Delegate +{ +private: + using ModeTagStructType = detail::Structs::ModeTagStruct::Type; + ModeTagStructType modeTagsNoarmal[1] = { { .value = to_underlying(ModeTag::kAuto) } }; + ModeTagStructType modeTagsRapidCool[1] = { { .value = to_underlying(ModeTag::kRapidCool) } }; + ModeTagStructType modeTagsRapidFreeze[3] = { { .value = to_underlying(ModeBase::ModeTag::kMax) }, + { .value = to_underlying(ModeTag::kRapidFreeze) } }; + + const detail::Structs::ModeOptionStruct::Type kModeOptions[3] = { + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Normal"), + .mode = ModeNormal, + .modeTags = DataModel::List(modeTagsNoarmal) }, + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Rapid Cool"), + .mode = ModeRapidCool, + .modeTags = DataModel::List(modeTagsRapidCool) }, + detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Rapid Freeze"), + .mode = ModeRapidFreeze, + .modeTags = DataModel::List(modeTagsRapidFreeze) }, + }; + + CHIP_ERROR Init() override; + void HandleChangeToMode(uint8_t mode, ModeBase::Commands::ChangeToModeResponse::Type & response) override; + CHIP_ERROR GetModeLabelByIndex(uint8_t modeIndex, MutableCharSpan & label) override; + CHIP_ERROR GetModeValueByIndex(uint8_t modeIndex, uint8_t & value) override; + CHIP_ERROR GetModeTagsByIndex(uint8_t modeIndex, DataModel::List & tags) override; + +public: + ~RefrigeratorAndTemperatureControlledCabinetModeDelegate() override = default; +}; + +ModeBase::Instance * Instance(); + +void Shutdown(); + +} // namespace RefrigeratorAndTemperatureControlledCabinetMode + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/refrigerator-app/silabs/openthread.gn b/examples/refrigerator-app/silabs/openthread.gn new file mode 100644 index 0000000000..01a7070afc --- /dev/null +++ b/examples/refrigerator-app/silabs/openthread.gn @@ -0,0 +1,29 @@ +# Copyright (c) 2024 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/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 = { + target_cpu = "arm" + target_os = "freertos" + chip_openthread_ftd = true + + import("//openthread.gni") +} diff --git a/examples/refrigerator-app/silabs/openthread.gni b/examples/refrigerator-app/silabs/openthread.gni new file mode 100644 index 0000000000..1b4d67ff84 --- /dev/null +++ b/examples/refrigerator-app/silabs/openthread.gni @@ -0,0 +1,26 @@ +# Copyright (c) 2024 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}/config/standalone/args.gni") +import("${chip_root}/src/platform/silabs/efr32/args.gni") + +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") + +app_data_model = "${chip_root}/examples/refrigerator-app/silabs/data_model:silabs-refrigerator" +chip_enable_ota_requestor = true +chip_enable_openthread = true + +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" diff --git a/examples/refrigerator-app/silabs/src/AppTask.cpp b/examples/refrigerator-app/silabs/src/AppTask.cpp new file mode 100644 index 0000000000..d2def279be --- /dev/null +++ b/examples/refrigerator-app/silabs/src/AppTask.cpp @@ -0,0 +1,144 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * 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. + */ + +/********************************************************** + * Includes + *********************************************************/ + +#include "AppTask.h" +#include "AppConfig.h" +#include "AppEvent.h" + +#include "LEDWidget.h" + +#ifdef DISPLAY_ENABLED +#include "RefrigeratorUI.h" +#include "lcd.h" +#ifdef QR_CODE_ENABLED +#include "qrcodegen.h" +#endif // QR_CODE_ENABLED +#endif // DISPLAY_ENABLED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/********************************************************** + * Defines and Constants + *********************************************************/ + +#define APP_FUNCTION_BUTTON 0 +#define APP_REFRIGERATOR 1 + +using namespace chip; +using namespace chip::app; +using namespace chip::TLV; +using namespace ::chip::DeviceLayer; + +/********************************************************** + * Variable declarations + *********************************************************/ + +/********************************************************** + * AppTask Definitions + *********************************************************/ + +AppTask AppTask::sAppTask; + +CHIP_ERROR AppTask::Init() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + chip::DeviceLayer::Silabs::GetPlatform().SetButtonsCb(AppTask::ButtonEventHandler); + +#ifdef DISPLAY_ENABLED + GetLCD().Init((uint8_t *) "Refrigrator-App"); +#endif + + err = BaseApplication::Init(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(AppServer, "BaseApplication::Init() failed"); + appError(err); + } + err = RefrigeratorMgr().Init(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(AppServer, "RefrigeratorMgr::Init() failed"); + appError(err); + } + + return err; +} + +CHIP_ERROR AppTask::StartAppTask() +{ + return BaseApplication::StartAppTask(AppTaskMain); +} + +void AppTask::AppTaskMain(void * pvParameter) +{ + AppEvent event; + osMessageQueueId_t sAppEventQueue = *(static_cast(pvParameter)); + + CHIP_ERROR err = sAppTask.Init(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(AppServer, "AppTask.Init() failed"); + appError(err); + } + +#if !(defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER) + sAppTask.StartStatusLEDTimer(); +#endif + + ChipLogDetail(AppServer, "App Task started"); + while (true) + { + osStatus_t eventReceived = osMessageQueueGet(sAppEventQueue, &event, NULL, osWaitForever); + while (eventReceived == osOK) + { + sAppTask.DispatchEvent(&event); + eventReceived = osMessageQueueGet(sAppEventQueue, &event, NULL, 0); + } + } +} + +void AppTask::ButtonEventHandler(uint8_t button, uint8_t btnAction) +{ + AppEvent aEvent = {}; + aEvent.Type = AppEvent::kEventType_Button; + aEvent.ButtonEvent.Action = btnAction; + + if (button == APP_FUNCTION_BUTTON) + { + aEvent.Handler = BaseApplication::ButtonHandler; + sAppTask.PostEvent(&aEvent); + } +} diff --git a/examples/refrigerator-app/silabs/src/RefrigeratorManager.cpp b/examples/refrigerator-app/silabs/src/RefrigeratorManager.cpp new file mode 100644 index 0000000000..09ab827e9d --- /dev/null +++ b/examples/refrigerator-app/silabs/src/RefrigeratorManager.cpp @@ -0,0 +1,141 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * 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. + */ + +/********************************************************** + * Includes + *********************************************************/ + +#include "RefrigeratorManager.h" +#include "AppConfig.h" +#include "AppEvent.h" +#include "AppTask.h" +#include +#include +#include + +/********************************************************** + * Defines and Constants + *********************************************************/ + +using namespace chip; +using namespace ::chip::DeviceLayer; + +namespace RefAndTempAttr = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes; +namespace RefAlarmAttr = chip::app::Clusters::RefrigeratorAlarm::Attributes; +namespace TempCtrlAttr = chip::app::Clusters::TemperatureControl::Attributes; + +// set Parent Endpoint and Composition Type for an Endpoint +EndpointId kRefEndpointId = 1; +EndpointId kColdCabinetEndpointId = 2; +EndpointId kFreezeCabinetEndpointId = 3; + +RefrigeratorManager RefrigeratorManager::sRefrigeratorMgr; + +namespace { +app::Clusters::TemperatureControl::AppSupportedTemperatureLevelsDelegate sAppSupportedTemperatureLevelsDelegate; + +// Please refer to https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/master/src/namespaces +constexpr const uint8_t kNamespaceRefrigerator = 0x41; +// Refrigerator Namespace: 0x41, tag 0x00 (Refrigerator) +constexpr const uint8_t kTagRefrigerator = 0x00; +// Refrigerator Namespace: 0x41, tag 0x01 (Freezer) +constexpr const uint8_t kTagFreezer = 0x01; +const Clusters::Descriptor::Structs::SemanticTagStruct::Type refrigeratorTagList[] = { { .namespaceID = kNamespaceRefrigerator, + .tag = kTagRefrigerator } }; +const Clusters::Descriptor::Structs::SemanticTagStruct::Type freezerTagList[] = { { .namespaceID = kNamespaceRefrigerator, + .tag = kTagFreezer } }; +} // namespace + +CHIP_ERROR RefrigeratorManager::Init() +{ + SetTreeCompositionForEndpoint(kRefEndpointId); + SetParentEndpointForEndpoint(kColdCabinetEndpointId, kRefEndpointId); + SetParentEndpointForEndpoint(kFreezeCabinetEndpointId, kRefEndpointId); + + // set TagList + SetTagList(kColdCabinetEndpointId, Span(refrigeratorTagList)); + SetTagList(kFreezeCabinetEndpointId, Span(freezerTagList)); + + app::Clusters::TemperatureControl::SetInstance(&sAppSupportedTemperatureLevelsDelegate); + return CHIP_NO_ERROR; +} + +int8_t RefrigeratorManager::ConvertToPrintableTemp(int16_t temperature) +{ + constexpr uint8_t kRoundUpValue = 50; + + // Round up the temperature as we won't print decimals on LCD + // Is it a negative temperature + if (temperature < 0) + { + temperature -= kRoundUpValue; + } + else + { + temperature += kRoundUpValue; + } + + return static_cast(temperature / 100); +} + +void RefrigeratorManager::TempCtrlAttributeChangeHandler(EndpointId endpointId, AttributeId attributeId, uint8_t * value, + uint16_t size) +{ + switch (attributeId) + { + case TempCtrlAttr::TemperatureSetpoint::Id: { + int16_t temperatureSetpoint = ConvertToPrintableTemp(static_cast(*value)); + mTemperatureSetpoint = temperatureSetpoint; + TempCtrlAttr::TemperatureSetpoint::Set(endpointId, temperatureSetpoint); + } + break; + default: { + ChipLogError(AppServer, "Unhandled Temperature controlled attribute %ld", attributeId); + return; + } + break; + } +} + +void RefrigeratorManager::RefAlaramAttributeChangeHandler(EndpointId endpointId, AttributeId attributeId, uint8_t * value, + uint16_t size) +{ + switch (attributeId) + { + case RefAlarmAttr::Mask::Id: { + auto mask = static_cast(*value); + mState = static_cast(mask); + RefAlarmAttr::Mask::Set(endpointId, mMask); + } + break; + + case RefAlarmAttr::State::Id: { + auto state = static_cast(*value); + mState = static_cast(state); + RefAlarmAttr::State::Set(endpointId, mState); + } + break; + + default: { + ChipLogError(AppServer, "Unhandled Refrigerator Alarm attribute %ld", attributeId); + return; + } + break; + } +} diff --git a/examples/refrigerator-app/silabs/src/RefrigeratorUI.cpp b/examples/refrigerator-app/silabs/src/RefrigeratorUI.cpp new file mode 100644 index 0000000000..655c803f21 --- /dev/null +++ b/examples/refrigerator-app/silabs/src/RefrigeratorUI.cpp @@ -0,0 +1,274 @@ +/* + * + * Copyright (c) 2024 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 "RefrigeratorUI.h" +#include "demo-ui-bitmaps.h" +#include "dmd.h" +#include "glib.h" +#include "lcd.h" +#include + +#if SL_WIFI && !defined(SLI_SI91X_MCU_INTERFACE) +// Only needed for wifi NCP devices +#include "spi_multiplex.h" +#endif // SL_WIFI + +// LCD line define +constexpr uint8_t kTempLcdInitialX = 30; + +// Bitmap +static const uint8_t silabsLogo[] = { SILABS_LOGO_SMALL }; +static const uint8_t matterLogoBitmap[] = { MATTER_LOGO_BITMAP }; + +static const uint8_t wifiLogo[] = { WIFI_BITMAP }; +static const uint8_t threadLogo[] = { THREAD_BITMAP }; +static const uint8_t bleLogo[] = { BLUETOOTH_ICON_SMALL }; + +static const unsigned char monaco_48pt[] = { MONACO_48PT }; +static const unsigned char heating_bits[] = { HEATING_BITMAP }; +static const unsigned char cooling_bits[] = { COOLING_BITMAP }; +static const unsigned char heating_cooling_bits[] = { HEATING_COOLING_BITMAP }; + +static int8_t mCurrentTempCelsius; +static uint8_t mMode; + +#ifdef SL_WIFI +#define UI_WIFI 1 +#else +#define UI_WIFI 0 +#endif + +/** + * @brief Draw the entire UI on the screen including header, footer, and temperature. + * @param GLIB_Context_t * pointer to the context for the GLIB library + */ +void RefrigeratorUI::DrawUI(GLIB_Context_t * glibContext) +{ + if (glibContext == nullptr) + { + ChipLogError(AppServer, "App Task started"); + return; + } + + GLIB_clear(glibContext); + DrawHeader(glibContext); + DrawCurrentTemp(glibContext, mCurrentTempCelsius); + DrawFooter(glibContext, false); + +#if SL_LCDCTRL_MUX + sl_wfx_host_pre_lcd_spi_transfer(); +#endif // SL_LCDCTRL_MUX + DMD_updateDisplay(); +#if SL_LCDCTRL_MUX + sl_wfx_host_post_lcd_spi_transfer(); +#endif // SL_LCDCTRL_MUX +} + +/** + * @brief Set the current temperature of the refrigerator. + * @param int8_t temp The current temperature in Celsius + */ +void RefrigeratorUI::SetCurrentTemp(int8_t temp) +{ + mCurrentTempCelsius = temp; +} + +/** + * @brief Set the operating mode of the refrigerator. + * @param uint8_t mode Mode of the refrigerator (e.g., cooling, defrosting) + */ +void RefrigeratorUI::SetMode(uint8_t mode) +{ + mMode = mode; +} + +/** + * @brief Draw the header of the UI, usually displaying the title or current status. + * @param GLIB_Context_t * pointer to the context for the GLIB library + */ +void RefrigeratorUI::DrawHeader(GLIB_Context_t * glibContext) +{ + // Draw Silabs Corner icon + GLIB_drawBitmap(glibContext, SILABS_ICON_POSITION_X, STATUS_ICON_LINE, SILABS_LOGO_WIDTH, SILABS_LOGO_HEIGHT, silabsLogo); + // Draw BLE Icon + GLIB_drawBitmap(glibContext, BLE_ICON_POSITION_X, STATUS_ICON_LINE, BLUETOOTH_ICON_SIZE, BLUETOOTH_ICON_SIZE, bleLogo); + // Draw WiFi/OpenThread Icon + GLIB_drawBitmap(glibContext, NETWORK_ICON_POSITION_X, STATUS_ICON_LINE, (UI_WIFI) ? WIFI_BITMAP_HEIGHT : THREAD_BITMAP_WIDTH, + WIFI_BITMAP_HEIGHT, (UI_WIFI) ? wifiLogo : threadLogo); + // Draw Matter Icon + GLIB_drawBitmap(glibContext, MATTER_ICON_POSITION_X, STATUS_ICON_LINE, MATTER_LOGO_WIDTH, MATTER_LOGO_HEIGHT, matterLogoBitmap); +#if SL_LCDCTRL_MUX + sl_wfx_host_pre_lcd_spi_transfer(); +#endif // SL_LCDCTRL_MUX + DMD_updateDisplay(); +#if SL_LCDCTRL_MUX + sl_wfx_host_post_lcd_spi_transfer(); +#endif // SL_LCDCTRL_MUX +} + +/** + * @brief Draw the footer of the UI, which may display additional information such as mode. + * @param GLIB_Context_t * pointer to the context for the GLIB library + * @param bool autoMode Whether the refrigerator is in automatic mode + */ +void RefrigeratorUI::DrawFooter(GLIB_Context_t * glibContext, bool autoMode) +{ + // TODO:: Need to implement this function + +#if SL_LCDCTRL_MUX + sl_wfx_host_pre_lcd_spi_transfer(); +#endif // SL_LCDCTRL_MUX + DMD_updateDisplay(); +#if SL_LCDCTRL_MUX + sl_wfx_host_post_lcd_spi_transfer(); +#endif // SL_LCDCTRL_MUX +} + +/** + * @brief Draw a 2 digit Temp of screen. Because of this Celsius is used by default + * @param GLIB_Context_t * pointer to the context for the GLIB library + * @param int8_t current Temperature in Celsius + * @param int8_t setPoint in Celsius + * @param bool isCelsius By default set to True. For future development + */ +void RefrigeratorUI::DrawCurrentTemp(GLIB_Context_t * glibContext, int8_t temp, bool isCelsius) +{ + uint8_t tempArray[2]; + uint8_t position_x = 10; + uint8_t * data; + + if (temp > 99 || temp < -99) + { + // Invalid temp for a house thermostat + return; + } + + if (temp < 0) + { + for (uint8_t y = 60; y < 64; y++) + { + for (uint8_t x = 1; x < 10; x++) + { + GLIB_drawPixel(glibContext, x, y); + } + } + + temp = temp * -1; + } + + // Draw Unit + if (isCelsius) + { + data = (uint8_t *) &monaco_48pt[DEGREE_INDEX]; + DrawFont(glibContext, 65, kTempLcdInitialX, 15, data, MONACO_FONT_CH_LENGTH); + data = (uint8_t *) &monaco_48pt[CELSIUS_INDEX]; + DrawFont(glibContext, 70, kTempLcdInitialX, 15, data, MONACO_FONT_CH_LENGTH); + } + else + { + data = (uint8_t *) &monaco_48pt[DEGREE_INDEX]; + DrawFont(glibContext, 65, 25, 15, data, MONACO_FONT_CH_LENGTH); // 25 to fit with f of fahrenheint + data = (uint8_t *) &monaco_48pt[FAHRENHEIT_INDEX]; + DrawFont(glibContext, 70, kTempLcdInitialX, 15, data, MONACO_FONT_CH_LENGTH); + } + + // Print Current temp + tempArray[0] = (uint8_t) ((temp / 10)); + tempArray[1] = (uint8_t) ((temp % 10)); + + for (uint8_t ch = 0; ch < 2; ch++) + { + data = (uint8_t *) &monaco_48pt[tempArray[ch] * MONACO_FONT_NB_LENGTH]; + DrawFont(glibContext, position_x, kTempLcdInitialX, MONACO_FONT_WIDTH, data, MONACO_FONT_NB_LENGTH); + position_x += MONACO_FONT_WIDTH; + } +} + +/** + * @brief Draw a font at a specified position on the screen. + * @param GLIB_Context_t * pointer to the context for the GLIB library + * @param uint8_t initial_x X-coordinate for the starting position + * @param uint8_t initial_y Y-coordinate for the starting position + * @param uint8_t width Width of the font to be drawn + * @param uint8_t * data Pointer to the font data + * @param uint32_t size Size of the font data in bytes + */ +void RefrigeratorUI::DrawFont(GLIB_Context_t * glibContext, uint8_t initial_x, uint8_t initial_y, uint8_t width, uint8_t * data, + uint32_t size) +{ + uint8_t x = initial_x, y = initial_y; + for (uint16_t i = 0; i < size; i++) + { + for (uint8_t mask = 0; mask < 8; mask++) + { + if (!(data[i] & (0x01 << mask))) + { + GLIB_drawPixel(glibContext, x, y); + } + // Check line changes + if (((x - initial_x) % width) == 0 && x != initial_x) + { + x = initial_x; + y++; + // Font is 8 bit align with paddings bits; + mask = 8; + } + else + { + x++; + } + } + } +} + +/** + * @brief Draw the set point temperature on the screen. + * @param GLIB_Context_t * pointer to the context for the GLIB library + * @param int8_t setPoint The set point temperature in Celsius + * @param bool secondLine Whether to display on the second line (true) or first line (false) + */ +void RefrigeratorUI::DrawSetPoint(GLIB_Context_t * glibContext, int8_t setPoint, bool secondLine) +{ + char setPointLine[] = { '-', 'X', 'X', '\0' }; + + if (setPoint > 99 || setPoint < -99) + { + return; + } + + // Update SetPoint string + if (setPoint < 0) + { + setPointLine[0] = (setPoint < 0) ? '-' : ' '; + setPoint *= -1; + setPointLine[1] = ((setPoint / 10) + 0x30); + setPointLine[2] = ((setPoint % 10) + 0x30); + } + else + { + setPointLine[0] = ((setPoint / 10) + 0x30); + setPointLine[1] = ((setPoint % 10) + 0x30); + setPointLine[2] = '\0'; + } + + // Print SetPoint + GLIB_drawStringOnLine(glibContext, setPointLine, (secondLine) ? 8 : 7, GLIB_ALIGN_LEFT, 67, 0, true); +} diff --git a/examples/refrigerator-app/silabs/src/ZclCallbacks.cpp b/examples/refrigerator-app/silabs/src/ZclCallbacks.cpp new file mode 100644 index 0000000000..bd9febc75e --- /dev/null +++ b/examples/refrigerator-app/silabs/src/ZclCallbacks.cpp @@ -0,0 +1,87 @@ +/* + * + * Copyright (c) 2024 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 "RefrigeratorManager.h" +#include +#include +#include +#include + +#ifdef DIC_ENABLE +#include "dic_control.h" +#endif // DIC_ENABLE + +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)); + + switch (clusterId) + { + case app::Clusters::Identify::Id: + ChipLogProgress(Zcl, "Identify cluster ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", + ChipLogValueMEI(attributePath.mAttributeId), type, *value, size); + break; + case app::Clusters::RefrigeratorAlarm::Id: + RefrigeratorMgr().RefAlaramAttributeChangeHandler(attributePath.mEndpointId, attributeId, value, size); +#ifdef DIC_ENABLE + dic::control::AttributeHandler(attributePath.mEndpointId, attributeId); +#endif // DIC_ENABLE + break; + case app::Clusters::TemperatureControl::Id: + RefrigeratorMgr().TempCtrlAttributeChangeHandler(attributePath.mEndpointId, attributeId, value, size); +#ifdef DIC_ENABLE + dic::control::AttributeHandler(attributePath.mEndpointId, attributeId); +#endif // DIC_ENABLE + break; + default: + break; + } +} + +/** @brief Refrigerator 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 emberAfRefrigeratorAlarmClusterInitCallback(EndpointId endpoint) {} + +/** @brief Temperature Control 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 emberAfTemperatureControlClusterInitCallback(EndpointId endpoint) {} diff --git a/examples/refrigerator-app/silabs/src/refrigerator-and-temperature-controlled-cabinet-mode.cpp b/examples/refrigerator-app/silabs/src/refrigerator-and-temperature-controlled-cabinet-mode.cpp new file mode 100644 index 0000000000..443dcb7f6d --- /dev/null +++ b/examples/refrigerator-app/silabs/src/refrigerator-and-temperature-controlled-cabinet-mode.cpp @@ -0,0 +1,111 @@ +/* + * + * Copyright (c) 2024 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 + +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode; +using chip::Protocols::InteractionModel::Status; +template +using List = chip::app::DataModel::List; +using ModeTagStructType = chip::app::Clusters::detail::Structs::ModeTagStruct::Type; + +static RefrigeratorAndTemperatureControlledCabinetModeDelegate * gRefrigeratorAndTemperatureControlledCabinetModeDelegate = nullptr; +static ModeBase::Instance * gRefrigeratorAndTemperatureControlledCabinetModeInstance = nullptr; + +CHIP_ERROR RefrigeratorAndTemperatureControlledCabinetModeDelegate::Init() +{ + return CHIP_NO_ERROR; +} + +void RefrigeratorAndTemperatureControlledCabinetModeDelegate::HandleChangeToMode( + uint8_t NewMode, ModeBase::Commands::ChangeToModeResponse::Type & response) +{ + response.status = to_underlying(ModeBase::StatusCode::kSuccess); +} + +CHIP_ERROR RefrigeratorAndTemperatureControlledCabinetModeDelegate::GetModeLabelByIndex(uint8_t modeIndex, + chip::MutableCharSpan & label) +{ + if (modeIndex >= ArraySize(kModeOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + return chip::CopyCharSpanToMutableCharSpan(kModeOptions[modeIndex].label, label); +} + +CHIP_ERROR RefrigeratorAndTemperatureControlledCabinetModeDelegate::GetModeValueByIndex(uint8_t modeIndex, uint8_t & value) +{ + if (modeIndex >= ArraySize(kModeOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + value = kModeOptions[modeIndex].mode; + return CHIP_NO_ERROR; +} + +CHIP_ERROR RefrigeratorAndTemperatureControlledCabinetModeDelegate::GetModeTagsByIndex(uint8_t modeIndex, + List & tags) +{ + if (modeIndex >= ArraySize(kModeOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + + if (tags.size() < kModeOptions[modeIndex].modeTags.size()) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + std::copy(kModeOptions[modeIndex].modeTags.begin(), kModeOptions[modeIndex].modeTags.end(), tags.begin()); + tags.reduce_size(kModeOptions[modeIndex].modeTags.size()); + + return CHIP_NO_ERROR; +} + +ModeBase::Instance * RefrigeratorAndTemperatureControlledCabinetMode::Instance() +{ + return gRefrigeratorAndTemperatureControlledCabinetModeInstance; +} + +void RefrigeratorAndTemperatureControlledCabinetMode::Shutdown() +{ + if (gRefrigeratorAndTemperatureControlledCabinetModeInstance != nullptr) + { + delete gRefrigeratorAndTemperatureControlledCabinetModeInstance; + gRefrigeratorAndTemperatureControlledCabinetModeInstance = nullptr; + } + if (gRefrigeratorAndTemperatureControlledCabinetModeDelegate != nullptr) + { + delete gRefrigeratorAndTemperatureControlledCabinetModeDelegate; + gRefrigeratorAndTemperatureControlledCabinetModeDelegate = nullptr; + } +} + +void emberAfRefrigeratorAndTemperatureControlledCabinetModeClusterInitCallback(chip::EndpointId endpointId) +{ + VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. + VerifyOrDie(gRefrigeratorAndTemperatureControlledCabinetModeDelegate == nullptr && + gRefrigeratorAndTemperatureControlledCabinetModeInstance == nullptr); + gRefrigeratorAndTemperatureControlledCabinetModeDelegate = + new RefrigeratorAndTemperatureControlledCabinetMode::RefrigeratorAndTemperatureControlledCabinetModeDelegate; + gRefrigeratorAndTemperatureControlledCabinetModeInstance = + new ModeBase::Instance(gRefrigeratorAndTemperatureControlledCabinetModeDelegate, 0x1, + RefrigeratorAndTemperatureControlledCabinetMode::Id, chip::to_underlying(Feature::kOnOff)); + gRefrigeratorAndTemperatureControlledCabinetModeInstance->Init(); +} diff --git a/examples/all-clusters-minimal-app/tizen/third_party/connectedhomeip b/examples/refrigerator-app/silabs/third_party/connectedhomeip similarity index 100% rename from examples/all-clusters-minimal-app/tizen/third_party/connectedhomeip rename to examples/refrigerator-app/silabs/third_party/connectedhomeip diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index c6af761d33..0db897b3f7 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -585,6 +585,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1678,7 +1679,6 @@ endpoint 0 { callback attribute adminVendorId; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 0x0001; @@ -1736,7 +1736,6 @@ endpoint 1 { 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; @@ -1752,7 +1751,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -1763,7 +1761,6 @@ endpoint 1 { callback attribute currentMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -1777,7 +1774,6 @@ endpoint 1 { callback attribute currentMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 3; @@ -1796,7 +1792,6 @@ endpoint 1 { callback attribute operationalError; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1816,7 +1811,6 @@ endpoint 1 { callback attribute progress; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; diff --git a/examples/shell/genio/src/main.cpp b/examples/shell/genio/src/main.cpp index 7190fd232a..fb4b3e068a 100644 --- a/examples/shell/genio/src/main.cpp +++ b/examples/shell/genio/src/main.cpp @@ -161,7 +161,7 @@ void vStartTask(void * pvParameters) * Main Function ****************************************************************************/ -extern "C" int main(void) +int main(void) { mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree); diff --git a/examples/shell/mbed/README.md b/examples/shell/mbed/README.md index 16a9f987bc..c2991270a5 100644 --- a/examples/shell/mbed/README.md +++ b/examples/shell/mbed/README.md @@ -207,7 +207,7 @@ The example supports building and running on the following mbed-enabled devices: - More details and guidelines about porting new hardware into the Matter project with Mbed OS can be found in - [MbedNewTarget](../../../docs/guides/mbedos_add_new_target.md) + [MbedNewTarget](../../../docs/platforms/mbedos/mbedos_add_new_target.md) - Some useful information about HW platform specific settings can be found in `shell/mbed/mbed_app.json`. Information about this file syntax and its meaning in mbed-os project can be found here: diff --git a/examples/shell/openiotsdk/README.md b/examples/shell/openiotsdk/README.md index b633fa7b01..7670c19437 100644 --- a/examples/shell/openiotsdk/README.md +++ b/examples/shell/openiotsdk/README.md @@ -12,7 +12,7 @@ For more details see For information on how to build, run, test and debug this example and further information about the platform it is run on see -[Open IoT SDK examples](../../../docs/guides/openiotsdk_examples.md). +[Open IoT SDK examples](../../../docs/platforms/openiotsdk/openiotsdk_examples.md). The example name to use in the scripts is `shell`. diff --git a/examples/smoke-co-alarm-app/silabs/README.md b/examples/smoke-co-alarm-app/silabs/README.md index e16621df11..7928107b35 100644 --- a/examples/smoke-co-alarm-app/silabs/README.md +++ b/examples/smoke-co-alarm-app/silabs/README.md @@ -220,7 +220,7 @@ combination with JLinkRTTClient as follows: - It is assumed here that you already have an OpenThread border router configured and running. If not see the following guide - [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) + [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/platforms/openthread/openthread_border_router_pi.md) for more information on how to setup a border router on a raspberryPi. Take note that the RCP code is available directly through @@ -317,7 +317,7 @@ tracking code inside the `trackAlloc` and `trackFree` function For the description of Software Update process with EFR32 example applications see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) +[EFR32 OTA Software Update](../../../docs/platforms/silabs/silabs_efr32_software_update.md) ## Building options diff --git a/examples/smoke-co-alarm-app/silabs/build_for_wifi_args.gni b/examples/smoke-co-alarm-app/silabs/build_for_wifi_args.gni index 0619082413..e5097f8a1d 100644 --- a/examples/smoke-co-alarm-app/silabs/build_for_wifi_args.gni +++ b/examples/smoke-co-alarm-app/silabs/build_for_wifi_args.gni @@ -28,7 +28,6 @@ sl_enable_test_event_trigger = true chip_enable_icd_server = true chip_subscription_timeout_resumption = false sl_use_subscription_syncing = true -icd_enforce_sit_slow_poll_limit = true chip_enable_icd_lit = true # ICD Matter Configuration flags diff --git a/examples/smoke-co-alarm-app/silabs/openthread.gni b/examples/smoke-co-alarm-app/silabs/openthread.gni index 845b2220b4..f2a7ab6ed7 100644 --- a/examples/smoke-co-alarm-app/silabs/openthread.gni +++ b/examples/smoke-co-alarm-app/silabs/openthread.gni @@ -32,7 +32,6 @@ sl_enable_test_event_trigger = true chip_enable_icd_server = true chip_subscription_timeout_resumption = false sl_use_subscription_syncing = true -icd_enforce_sit_slow_poll_limit = true chip_icd_report_on_active_mode = true chip_enable_icd_lit = true 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 fbba1a8ab8..d4d7f8c93e 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 @@ -1075,6 +1075,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2489,7 +2490,6 @@ endpoint 1 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2522,7 +2522,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2539,7 +2538,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 2; @@ -2572,7 +2570,6 @@ endpoint 1 { ram attribute expiryDate default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 1; diff --git a/examples/temperature-measurement-app/asr/README.md b/examples/temperature-measurement-app/asr/README.md index 72c01f8973..1382849e59 100755 --- a/examples/temperature-measurement-app/asr/README.md +++ b/examples/temperature-measurement-app/asr/README.md @@ -14,7 +14,7 @@ temperature sensor. ## Building and Commissioning Please refer -[Building and Commissioning](../../../docs/guides/asr_getting_started_guide.md#building-the-example-application) +[Building and Commissioning](../../../docs/platforms/asr/asr_getting_started_guide.md#building-the-example-application) guides to get started ``` diff --git a/examples/temperature-measurement-app/esp32/README.md b/examples/temperature-measurement-app/esp32/README.md index 71210102d9..a3276ae372 100644 --- a/examples/temperature-measurement-app/esp32/README.md +++ b/examples/temperature-measurement-app/esp32/README.md @@ -3,9 +3,9 @@ This example is meant to represent a minimal-sized application. Please -[setup ESP-IDF and CHIP Environment](../../../docs/guides/esp32/setup_idf_chip.md) +[setup ESP-IDF and CHIP Environment](../../../docs/platforms/esp32/setup_idf_chip.md) and refer -[building and commissioning](../../../docs/guides/esp32/build_app_and_commission.md) +[building and commissioning](../../../docs/platforms/esp32/build_app_and_commission.md) guides to get started. --- diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter index 925b3ee868..17ab13992c 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -715,6 +715,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1706,7 +1707,6 @@ endpoint 0 { server cluster DiagnosticLogs { 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/thermostat/asr/README.md b/examples/thermostat/asr/README.md index 0392b82086..1422efee18 100755 --- a/examples/thermostat/asr/README.md +++ b/examples/thermostat/asr/README.md @@ -14,7 +14,7 @@ temperature from local sensor. ## Building and Commissioning Please refer -[Building and Commissioning](../../../docs/guides/asr_getting_started_guide.md#building-the-example-application) +[Building and Commissioning](../../../docs/platforms/asr/asr_getting_started_guide.md#building-the-example-application) guides to get started ``` diff --git a/examples/thermostat/genio/README.md b/examples/thermostat/genio/README.md index 4ae5bba017..b9630f7e0a 100644 --- a/examples/thermostat/genio/README.md +++ b/examples/thermostat/genio/README.md @@ -86,7 +86,7 @@ MediaTek platform. Chip tool standalone, Android or iOS app [CHIP - Tool]](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/chip_tool_guide.md) + Tool]](https://github.com/project-chip/connectedhomeip/blob/master/docs/development_controllers/chip-tool/chip_tool_guide.md) Here is an example with the CHIP Tool controller: diff --git a/examples/thermostat/genio/src/main.cpp b/examples/thermostat/genio/src/main.cpp index d545409c70..564233716d 100644 --- a/examples/thermostat/genio/src/main.cpp +++ b/examples/thermostat/genio/src/main.cpp @@ -251,7 +251,7 @@ void vStartTask(void * pvParameters) * Main Function ****************************************************************************/ -extern "C" int main(void) +int main(void) { mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree); diff --git a/examples/thermostat/infineon/cyw30739/README.md b/examples/thermostat/infineon/cyw30739/README.md index 0b94884fe1..d514fefdf6 100644 --- a/examples/thermostat/infineon/cyw30739/README.md +++ b/examples/thermostat/infineon/cyw30739/README.md @@ -212,7 +212,7 @@ Put the CYW30739 in to the recovery mode before running the flash script. - It is assumed here that you already have an OpenThread border router configured and running. If not see the following guide - [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) + [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/platforms/openthread/openthread_border_router_pi.md) for more information on how to setup a border router on a raspberryPi. - For this example to work, it is necessary to have a second CYW30739 device diff --git a/examples/thermostat/nxp/common/main/main.cpp b/examples/thermostat/nxp/common/main/main.cpp index b2aadab98c..26772e9e60 100644 --- a/examples/thermostat/nxp/common/main/main.cpp +++ b/examples/thermostat/nxp/common/main/main.cpp @@ -32,7 +32,7 @@ uint8_t __attribute__((section(".heap"))) ucHeap[configTOTAL_HEAP_SIZE]; using namespace ::chip::DeviceLayer; -extern "C" int main(int argc, char * argv[]) +int main(int argc, char * argv[]) { TaskHandle_t taskHandle; diff --git a/examples/thermostat/nxp/linux-imx/imx8m/README.md b/examples/thermostat/nxp/linux-imx/imx8m/README.md index e20ff1065d..01941f58e7 100644 --- a/examples/thermostat/nxp/linux-imx/imx8m/README.md +++ b/examples/thermostat/nxp/linux-imx/imx8m/README.md @@ -1,4 +1,4 @@ To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini** **EVK**, see the associated -[README document](../../../../../docs/guides/nxp/nxp_imx8m_linux_examples.md) +[README document](../../../../../docs/platforms/nxp/nxp_imx8m_linux_examples.md) for details. diff --git a/examples/thermostat/nxp/linux-se05x/README.md b/examples/thermostat/nxp/linux-se05x/README.md index e20ff1065d..01941f58e7 100644 --- a/examples/thermostat/nxp/linux-se05x/README.md +++ b/examples/thermostat/nxp/linux-se05x/README.md @@ -1,4 +1,4 @@ To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini** **EVK**, see the associated -[README document](../../../../../docs/guides/nxp/nxp_imx8m_linux_examples.md) +[README document](../../../../../docs/platforms/nxp/nxp_imx8m_linux_examples.md) for details. diff --git a/examples/thermostat/nxp/rt/rt1060/.gn b/examples/thermostat/nxp/rt/rt1060/.gn new file mode 100644 index 0000000000..0985ed955a --- /dev/null +++ b/examples/thermostat/nxp/rt/rt1060/.gn @@ -0,0 +1,35 @@ +# 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/build.gni") +import("//build_overrides/chip.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 = { + target_cpu = "arm" + target_os = "freertos" + + import("//args.gni") + + # Import common example GN args + import("${chip_root}/examples/platform/nxp/common/gn/args.gni") + + # Import default platform configs + import("${chip_root}/src/platform/nxp/rt/rt1060/args.gni") +} diff --git a/examples/thermostat/nxp/rt/rt1060/BUILD.gn b/examples/thermostat/nxp/rt/rt1060/BUILD.gn new file mode 100644 index 0000000000..5eba1a328f --- /dev/null +++ b/examples/thermostat/nxp/rt/rt1060/BUILD.gn @@ -0,0 +1,304 @@ +# Copyright (c) 2021-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. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/nxp_sdk.gni") +import("//build_overrides/openthread.gni") +import("${chip_root}/src/platform/device.gni") + +#allows to get common NXP SDK gn options +import("${nxp_sdk_build_root}/nxp_sdk.gni") + +# Allows to get various RT gn options +import("${nxp_sdk_build_root}/${nxp_sdk_name}/rt_sdk.gni") + +import("${chip_root}/src/platform/nxp/${nxp_platform}/args.gni") +import( + "${nxp_sdk_build_root}/${nxp_sdk_name}/${rt_platform}/${rt_platform}.gni") +import("${nxp_sdk_build_root}/${nxp_sdk_name}/nxp_executable.gni") + +assert(current_os == "freertos") +assert(target_os == "freertos") +assert(nxp_platform == "rt/rt1060") + +declare_args() { + # Allows to enable to ota_provider support + enable_ota_provider = false + + # Allows to connect to a predefine Wi-Fi network at boot + wifi_auto_connect_at_boot = false + wifi_auto_connect_at_boot_ssid = "" + wifi_auto_connect_at_boot_password = "" + + # Setup discriminator as argument + setup_discriminator = 3840 + + chip_with_diag_logs_demo = true +} + +example_platform_dir = + "${nxp_sdk_matter_support_root}/examples/platform/${nxp_platform}" +common_example_dir = "${chip_root}/examples/platform/nxp/common" + +app_common_folder = "thermostat/nxp/zap" + +# Create here the SDK instance. +# Particular sources/defines/includes could be added/changed depending on the target application. +rt_sdk("sdk") { + defines = [] + + cflags = [] + public_deps = [] + public_configs = [] + sources = [] + include_dirs = [] + + # Indicate paths to default board files + include_dirs += [ "${example_platform_dir}/board/" ] + + # RT1060 rev A use same pin mux as rev B + # If user needs different pin mux files for rev A and rev B boards, the source and include from below needs to be updated accordingly + if (evkname == "evkmimxrt1060") { + include_dirs += [ "${example_platform_dir}/board/evkbmimxrt1060/" ] + sources += [ "${example_platform_dir}/board/evkbmimxrt1060/pin_mux.c" ] + } else { + include_dirs += [ "${example_platform_dir}/board/${evkname}/" ] + sources += [ "${example_platform_dir}/board/${evkname}/pin_mux.c" ] + } + sources += [ "${example_platform_dir}/board/hardware_init.c" ] + sources += [ "${example_platform_dir}/board/clock_config.c" ] + sources += [ "${example_platform_dir}/board/board.c" ] + sources += [ "${example_platform_dir}/board/peripherals.c" ] + + # Indicate the path to CHIPProjectConfig.h + include_dirs += [ "include/config" ] + + # Indicate the default path to FreeRTOSConfig.h + include_dirs += [ "${example_platform_dir}/app/project_include/freeRTOS" ] + + # Indicate the default path to OpenThreadConfig.h + include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ] + + # For matter with BR feature, increase FreeRTOS heap size and enable TBR cluster + if (chip_enable_wifi && chip_enable_openthread) { + defines += [ + "configTOTAL_HEAP_SIZE=(size_t)(170 * 1024)", + "CHIP_DEVICE_CONFIG_ENABLE_TBR=1", + ] + } + + defines += [ + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}", + ] +} + +# Create the SDK driver instance. +# Particular sources/defines/includes could be added to add other drivers not available in the default sdk driver template +rt1060_sdk_drivers("sdk_driver") { +} + +rt_executable("thermostat") { + output_name = "chip-rt1060-thermostat-example" + + defines = [ + "CONFIG_RENDEZVOUS_MODE=7", + "CONFIG_APP_FREERTOS_OS=1", + ] + + if (chip_enable_openthread) { + defines += [ "CONFIG_NET_L2_OPENTHREAD=1" ] + } + + if (chip_with_diag_logs_demo) { + defines += [ + "CONFIG_DIAG_LOGS_DEMO=1", + "CHIP_DEVICE_CONFIG_MAX_DIAG_LOG_SIZE=1024", + ] + } + + include_dirs = [ + "../../common/main/include", + "../../common/main", + "${chip_root}/examples/all-clusters-app/all-clusters-common/include", + "${chip_root}/examples/providers/", + ] + + sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", + "${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp", + "../../common/main/AppTask.cpp", + "../../common/main/DeviceCallbacks.cpp", + "../../common/main/ZclCallbacks.cpp", + "../../common/main/include/AppEvent.h", + "../../common/main/include/AppTask.h", + "../../common/main/include/DeviceCallbacks.h", + "../../common/main/main.cpp", + ] + + if (chip_with_diag_logs_demo) { + include_dirs += [ + "${common_example_dir}/diagnostic_logs/include", + "${chip_root}", + ] + sources += [ + "${common_example_dir}/diagnostic_logs/source/DiagnosticLogsDemo.cpp", + "${common_example_dir}/diagnostic_logs/source/DiagnosticLogsProviderDelegateImpl.cpp", + ] + } + + # App common files + include_dirs += [ + "${common_example_dir}/icd/include", + "${common_example_dir}/matter_cli/include", + "${common_example_dir}/device_manager/include", + "${common_example_dir}/device_callbacks/include", + "${common_example_dir}/matter_button/include", + "${common_example_dir}/factory_data/include", + "${common_example_dir}/app_task/include", + ] + + sources += [ + "${chip_root}/examples/platform/nxp/${nxp_platform}/factory_data/source/AppFactoryDataExample.cpp", + "${common_example_dir}/app_task/source/AppTaskBase.cpp", + "${common_example_dir}/app_task/source/AppTaskFreeRTOS.cpp", + "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", + "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/icd/source/ICDUtil.cpp", + "${common_example_dir}/matter_button/source/ButtonDefault.cpp", + "${common_example_dir}/matter_button/source/ButtonManager.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationDefault.cpp", + ] + + deps = [ "${chip_root}/examples/${app_common_folder}" ] + + if (chip_enable_matter_cli) { + defines += [ "ENABLE_CHIP_SHELL" ] + deps += [ + "${chip_root}/examples/shell/shell_common:shell_common", + "${chip_root}/src/lib/shell:shell", + ] + sources += [ + "${common_example_dir}/matter_cli/source/AppCLIBase.cpp", + "${common_example_dir}/matter_cli/source/AppCLIFreeRTOS.cpp", + ] + } + + if (chip_enable_ota_requestor) { + sources += [ + "${chip_root}/examples/platform/nxp/common/mcuboot_app_support/flash_partitioning.h", + "${common_example_dir}/ota_requestor/source/OTARequestorInitiator.cpp", + "${common_example_dir}/ota_requestor/source/OTARequestorInitiatorCommon.cpp", + + #Adding mcuboot files + "${chip_root}/examples/platform/nxp/common/mcuboot_app_support/mcuboot_app_support.c", + "${chip_root}/examples/platform/nxp/common/mcuboot_app_support/mcuboot_app_support.h", + ] + include_dirs += [ + "$${common_example_dir}/ota_requestor/include", + "${chip_root}/examples/platform/nxp/common/mcuboot_app_support", + ] + } + + if (wifi_auto_connect_at_boot) { + assert(wifi_auto_connect_at_boot_ssid != "" && + wifi_auto_connect_at_boot_password != "", + "WiFi SSID and password must be specified at build time!") + + defines += [ + "CONFIG_CHIP_APP_WIFI_CONNECT_AT_BOOT=1", + "CONFIG_CHIP_APP_WIFI_SSID=\"${wifi_auto_connect_at_boot_ssid}\"", + "CONFIG_CHIP_APP_WIFI_PASSWORD=\"${wifi_auto_connect_at_boot_password}\"", + ] + + include_dirs += [ "${common_example_dir}/wifi_connect/include" ] + sources += [ "${common_example_dir}/wifi_connect/source/WifiConnect.cpp" ] + } + + if (enable_ota_provider) { + defines += [ "CONFIG_CHIP_OTA_PROVIDER=1" ] + + include_dirs += [ + "${common_example_dir}/ota_provider/include", + "${common_example_dir}/ota_provider/ota-provider-common", + ] + + sources += [ + "${common_example_dir}/ota_provider/ota-provider-common/RTBdxOtaSender.cpp", + "${common_example_dir}/ota_provider/ota-provider-common/RTOTAProviderExample.cpp", + "${common_example_dir}/ota_provider/source/OTAProvider.cpp", + ] + + deps += [ + "${chip_root}/src/app/server", + "${chip_root}/src/protocols/bdx", + "${chip_root}/third_party/jsoncpp", + ] + } + + # In case a dedicated assert function needs to be supported the flag sdk_fsl_assert_support should be set to false + # The would add to the build a dedicated application assert implementation. + if (!sdk_fsl_assert_support) { + sources += [ "${common_example_dir}/app_assert/source/AppAssert.cpp" ] + } + + cflags = [ "-Wconversion" ] + + ldscript = + "${example_platform_dir}/app/ldscripts/MIMXRT1062xxxxx_flexspi_nor.ld" + + inputs = [ ldscript ] + + ldflags = [ + "-T" + rebase_path(ldscript, root_build_dir), + "-fno-common", + "-Wl,--defsym=__stack_size__=2048", + "-ffreestanding", + "-fno-builtin", + "-mapcs", + "-u qspiflash_config", + "-u image_vector_table", + "-u boot_data", + "-u dcd_data", + "-Wl,-print-memory-usage", + "-Wl,--no-warn-rwx-segments", + ] + + if (enable_ota_provider) { + # As the OTA file will be stored in the littlefs file system, it is required to increase the size of the file system + # To be able to store an OTA file with a MAX size of 640K, + # it recommended to size the file system with: + # 161 sectors of 4K => reserved for the OTA file + # 32 sectors of 4K => reserved for Matter/OT/BLE settings storage + ldflags += [ "-Wl,--defsym=gNVMSectorCountLink_d=193" ] + } + + if (chip_enable_ota_requestor) { + # If OTA build flag is enabled, + # we would need to reserve enough space for the bootloader (MCUBoot) + # MCUBoot requires 0x11000 Bytes to be reserved at the base of the flash + # Consequently, some sections will need to be shifted + ldflags += [ "-Wl,--defsym=__mcu_boot_size__=0x11000" ] + } + + output_dir = root_out_dir +} + +group("rt1060") { + deps = [ ":thermostat" ] +} + +group("default") { + deps = [ ":rt1060" ] +} diff --git a/examples/thermostat/nxp/rt/rt1060/README.md b/examples/thermostat/nxp/rt/rt1060/README.md new file mode 100644 index 0000000000..62d4847a4a --- /dev/null +++ b/examples/thermostat/nxp/rt/rt1060/README.md @@ -0,0 +1,5 @@ +# CHIP RT1060 Thermostat Application + +All instructions describing how to use a Matter application on NXP RT1060 can be +found in [README.md](../../../../all-clusters-app/nxp/rt/rt1060/README.md) root +readme diff --git a/examples/thermostat/nxp/rt/rt1060/args.gni b/examples/thermostat/nxp/rt/rt1060/args.gni new file mode 100644 index 0000000000..c2d91a5db7 --- /dev/null +++ b/examples/thermostat/nxp/rt/rt1060/args.gni @@ -0,0 +1,19 @@ +# 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. + +import("//build_overrides/chip.gni") + +# SDK target definitions +nxp_sdk_target = get_label_info(":sdk", "label_no_toolchain") +nxp_sdk_driver_target = get_label_info(":sdk_driver", "label_no_toolchain") diff --git a/examples/thermostat/nxp/rt/rt1060/build_overrides b/examples/thermostat/nxp/rt/rt1060/build_overrides new file mode 120000 index 0000000000..f10867042f --- /dev/null +++ b/examples/thermostat/nxp/rt/rt1060/build_overrides @@ -0,0 +1 @@ +../../../../build_overrides \ No newline at end of file diff --git a/examples/thermostat/nxp/rt/rt1060/include/config/CHIPProjectConfig.h b/examples/thermostat/nxp/rt/rt1060/include/config/CHIPProjectConfig.h new file mode 100644 index 0000000000..dd73c6c9ea --- /dev/null +++ b/examples/thermostat/nxp/rt/rt1060/include/config/CHIPProjectConfig.h @@ -0,0 +1,216 @@ +/* + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020 Google LLC. + * 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 + +/* + * Tells to the platform Factory Data Provider whether to use the example configuration or real/provisioned data. + */ +#ifndef CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA +#define CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA 0 +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID + * + * 0xFFF1: Test vendor. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID + * + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8005 + +#if !CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA +// Use a default pairing code if one hasn't been provisioned in flash. +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif + +// Use a default pairing code if one hasn't been provisioned in flash. +#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" + +/** + * CHIP_DEVICE_CONFIG_USE_TEST_SERIAL_NUMBER + * + * Enables the use of a hard-coded default serial number if none + * is found in CHIP NV storage. + */ +#define CHIP_DEVICE_CONFIG_USE_TEST_SERIAL_NUMBER "DUMMY_SN" + +#endif /* !CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA */ + +/** + * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION + * + * The hardware version number assigned to device or product by the device vendor. This + * number is scoped to the device product id, and typically corresponds to a revision of the + * physical device, a change to its packaging, and/or a change to its marketing presentation. + * This value is generally *not* incremented for device software versions. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 100 + +#ifndef CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING "v0.1.0" +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING + * + * A string identifying the software version running on the device. + * CHIP currently expects the software version to be in the format + * {MAJOR_VERSION}.0d{MINOR_VERSION} + */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING NXP_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION NXP_CONFIG_DEVICE_SOFTWARE_VERSION +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME "NXP Semiconductors" +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME "NXP Demo App" +#endif + +#ifndef CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION +//-> format_version = 1 +//-> vendor_id = 0xFFF1 +//-> product_id_array = [ 0x8000, 0x8001, 0x8002, 0x8003, 0x8004, 0x8005, 0x8006, 0x8007, 0x8008, 0x8009, 0x800A, 0x800B, +// 0x800C, 0x800D, 0x800E, 0x800F, 0x8010, 0x8011, 0x8012, 0x8013, 0x8014, 0x8015, 0x8016, 0x8017, 0x8018, 0x8019, 0x801A, +// 0x801B, 0x801C, 0x801D, 0x801E, 0x801F, 0x8020, 0x8021, 0x8022, 0x8023, 0x8024, 0x8025, 0x8026, 0x8027, 0x8028, 0x8029, +// 0x802A, 0x802B, 0x802C, 0x802D, 0x802E, 0x802F, 0x8030, 0x8031, 0x8032, 0x8033, 0x8034, 0x8035, 0x8036, 0x8037, 0x8038, +// 0x8039, 0x803A, 0x803B, 0x803C, 0x803D, 0x803E, 0x803F, 0x8040, 0x8041, 0x8042, 0x8043, 0x8044, 0x8045, 0x8046, 0x8047, +// 0x8048, 0x8049, 0x804A, 0x804B, 0x804C, 0x804D, 0x804E, 0x804F, 0x8050, 0x8051, 0x8052, 0x8053, 0x8054, 0x8055, 0x8056, +// 0x8057, 0x8058, 0x8059, 0x805A, 0x805B, 0x805C, 0x805D, 0x805E, 0x805F, 0x8060, 0x8061, 0x8062, 0x8063 ] +//-> device_type_id = 0x0016 +//-> certificate_id = "ZIG20142ZB330003-24" +//-> security_level = 0 +//-> security_information = 0 +//-> version_number = 0x2694 +//-> certification_type = 0 +//-> dac_origin_vendor_id is not present +//-> dac_origin_product_id is not present +#define CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION \ + { \ + 0x30, 0x82, 0x02, 0x19, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, 0x82, 0x02, 0x0a, 0x30, \ + 0x82, 0x02, 0x06, 0x02, 0x01, 0x03, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, \ + 0x02, 0x01, 0x30, 0x82, 0x01, 0x71, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x82, \ + 0x01, 0x62, 0x04, 0x82, 0x01, 0x5e, 0x15, 0x24, 0x00, 0x01, 0x25, 0x01, 0xf1, 0xff, 0x36, 0x02, 0x05, 0x00, 0x80, \ + 0x05, 0x01, 0x80, 0x05, 0x02, 0x80, 0x05, 0x03, 0x80, 0x05, 0x04, 0x80, 0x05, 0x05, 0x80, 0x05, 0x06, 0x80, 0x05, \ + 0x07, 0x80, 0x05, 0x08, 0x80, 0x05, 0x09, 0x80, 0x05, 0x0a, 0x80, 0x05, 0x0b, 0x80, 0x05, 0x0c, 0x80, 0x05, 0x0d, \ + 0x80, 0x05, 0x0e, 0x80, 0x05, 0x0f, 0x80, 0x05, 0x10, 0x80, 0x05, 0x11, 0x80, 0x05, 0x12, 0x80, 0x05, 0x13, 0x80, \ + 0x05, 0x14, 0x80, 0x05, 0x15, 0x80, 0x05, 0x16, 0x80, 0x05, 0x17, 0x80, 0x05, 0x18, 0x80, 0x05, 0x19, 0x80, 0x05, \ + 0x1a, 0x80, 0x05, 0x1b, 0x80, 0x05, 0x1c, 0x80, 0x05, 0x1d, 0x80, 0x05, 0x1e, 0x80, 0x05, 0x1f, 0x80, 0x05, 0x20, \ + 0x80, 0x05, 0x21, 0x80, 0x05, 0x22, 0x80, 0x05, 0x23, 0x80, 0x05, 0x24, 0x80, 0x05, 0x25, 0x80, 0x05, 0x26, 0x80, \ + 0x05, 0x27, 0x80, 0x05, 0x28, 0x80, 0x05, 0x29, 0x80, 0x05, 0x2a, 0x80, 0x05, 0x2b, 0x80, 0x05, 0x2c, 0x80, 0x05, \ + 0x2d, 0x80, 0x05, 0x2e, 0x80, 0x05, 0x2f, 0x80, 0x05, 0x30, 0x80, 0x05, 0x31, 0x80, 0x05, 0x32, 0x80, 0x05, 0x33, \ + 0x80, 0x05, 0x34, 0x80, 0x05, 0x35, 0x80, 0x05, 0x36, 0x80, 0x05, 0x37, 0x80, 0x05, 0x38, 0x80, 0x05, 0x39, 0x80, \ + 0x05, 0x3a, 0x80, 0x05, 0x3b, 0x80, 0x05, 0x3c, 0x80, 0x05, 0x3d, 0x80, 0x05, 0x3e, 0x80, 0x05, 0x3f, 0x80, 0x05, \ + 0x40, 0x80, 0x05, 0x41, 0x80, 0x05, 0x42, 0x80, 0x05, 0x43, 0x80, 0x05, 0x44, 0x80, 0x05, 0x45, 0x80, 0x05, 0x46, \ + 0x80, 0x05, 0x47, 0x80, 0x05, 0x48, 0x80, 0x05, 0x49, 0x80, 0x05, 0x4a, 0x80, 0x05, 0x4b, 0x80, 0x05, 0x4c, 0x80, \ + 0x05, 0x4d, 0x80, 0x05, 0x4e, 0x80, 0x05, 0x4f, 0x80, 0x05, 0x50, 0x80, 0x05, 0x51, 0x80, 0x05, 0x52, 0x80, 0x05, \ + 0x53, 0x80, 0x05, 0x54, 0x80, 0x05, 0x55, 0x80, 0x05, 0x56, 0x80, 0x05, 0x57, 0x80, 0x05, 0x58, 0x80, 0x05, 0x59, \ + 0x80, 0x05, 0x5a, 0x80, 0x05, 0x5b, 0x80, 0x05, 0x5c, 0x80, 0x05, 0x5d, 0x80, 0x05, 0x5e, 0x80, 0x05, 0x5f, 0x80, \ + 0x05, 0x60, 0x80, 0x05, 0x61, 0x80, 0x05, 0x62, 0x80, 0x05, 0x63, 0x80, 0x18, 0x24, 0x03, 0x16, 0x2c, 0x04, 0x13, \ + 0x5a, 0x49, 0x47, 0x32, 0x30, 0x31, 0x34, 0x32, 0x5a, 0x42, 0x33, 0x33, 0x30, 0x30, 0x30, 0x33, 0x2d, 0x32, 0x34, \ + 0x24, 0x05, 0x00, 0x24, 0x06, 0x00, 0x25, 0x07, 0x94, 0x26, 0x24, 0x08, 0x00, 0x18, 0x31, 0x7d, 0x30, 0x7b, 0x02, \ + 0x01, 0x03, 0x80, 0x14, 0x62, 0xfa, 0x82, 0x33, 0x59, 0xac, 0xfa, 0xa9, 0x96, 0x3e, 0x1c, 0xfa, 0x14, 0x0a, 0xdd, \ + 0xf5, 0x04, 0xf3, 0x71, 0x60, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, \ + 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x04, 0x47, 0x30, 0x45, 0x02, 0x20, 0x24, 0xe5, \ + 0xd1, 0xf4, 0x7a, 0x7d, 0x7b, 0x0d, 0x20, 0x6a, 0x26, 0xef, 0x69, 0x9b, 0x7c, 0x97, 0x57, 0xb7, 0x2d, 0x46, 0x90, \ + 0x89, 0xde, 0x31, 0x92, 0xe6, 0x78, 0xc7, 0x45, 0xe7, 0xf6, 0x0c, 0x02, 0x21, 0x00, 0xf8, 0xaa, 0x2f, 0xa7, 0x11, \ + 0xfc, 0xb7, 0x9b, 0x97, 0xe3, 0x97, 0xce, 0xda, 0x66, 0x7b, 0xae, 0x46, 0x4e, 0x2b, 0xd3, 0xff, 0xdf, 0xc3, 0xcc, \ + 0xed, 0x7a, 0xa8, 0xca, 0x5f, 0x4c, 0x1a, 0x7c \ + } +#endif + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC + * + * Enables synchronizing the device's real time clock with a remote CHIP Time service + * using the CHIP Time Sync protocol. + */ +// #define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 1 + +/** + * CHIP_CONFIG_MAX_BINDINGS + * + * Maximum number of simultaneously active bindings per ChipExchangeManager + * 1 (Time Sync) + 2 (Two 1-way subscriptions) + 1 (Software Update) = 4 + * in the worst case. Keeping another 4 as buffer. + */ +#define CHIP_CONFIG_MAX_BINDINGS 6 + +/** + * CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD + * + * Select the ability to offload event logs to any interested subscribers using WDM. + */ +#define CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD 1 + +/** + * CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE + * + * A size, in bytes, of the individual debug event logging buffer. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) + +/** + * CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE + * + * For a development build, set the default importance of events to be logged as Debug. + * Since debug is the lowest importance level, this means all standard, critical, info and + * debug importance level vi events get logged. + */ +#if BUILD_RELEASE +#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Production +#else +#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Debug +#endif // BUILD_RELEASE + +/* Increasing the retransmission interval of the MRP messages after subsequent failures */ +#ifndef CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL +#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL (2000_ms32) +#endif diff --git a/examples/thermostat/nxp/rt/rt1060/third_party/connectedhomeip b/examples/thermostat/nxp/rt/rt1060/third_party/connectedhomeip new file mode 120000 index 0000000000..305f2077ff --- /dev/null +++ b/examples/thermostat/nxp/rt/rt1060/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../../.. \ No newline at end of file diff --git a/examples/thermostat/nxp/rt/rt1170/.gn b/examples/thermostat/nxp/rt/rt1170/.gn new file mode 100644 index 0000000000..59dcfeb229 --- /dev/null +++ b/examples/thermostat/nxp/rt/rt1170/.gn @@ -0,0 +1,35 @@ +# 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/build.gni") +import("//build_overrides/chip.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 = { + target_cpu = "arm" + target_os = "freertos" + + import("//args.gni") + + # Import common example GN args + import("${chip_root}/examples/platform/nxp/common/gn/args.gni") + + # Import default platform configs + import("${chip_root}/src/platform/nxp/rt/rt1170/args.gni") +} diff --git a/examples/thermostat/nxp/rt/rt1170/BUILD.gn b/examples/thermostat/nxp/rt/rt1170/BUILD.gn new file mode 100644 index 0000000000..c89df14eb5 --- /dev/null +++ b/examples/thermostat/nxp/rt/rt1170/BUILD.gn @@ -0,0 +1,257 @@ +# Copyright (c) 2021-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. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/nxp_sdk.gni") +import("//build_overrides/openthread.gni") +import("${chip_root}/src/platform/device.gni") + +#allows to get common NXP SDK gn options +import("${nxp_sdk_build_root}/nxp_sdk.gni") + +# Allows to get various RT gn options +import("${nxp_sdk_build_root}/${nxp_sdk_name}/rt_sdk.gni") + +import("${chip_root}/src/platform/nxp/${nxp_platform}/args.gni") +import( + "${nxp_sdk_build_root}/${nxp_sdk_name}/${rt_platform}/${rt_platform}.gni") +import("${nxp_sdk_build_root}/${nxp_sdk_name}/nxp_executable.gni") + +assert(current_os == "freertos") +assert(target_os == "freertos") +assert(nxp_platform == "rt/rt1170") + +declare_args() { + # Allows to connect to a predefine Wi-Fi network at boot + wifi_auto_connect_at_boot = false + wifi_auto_connect_at_boot_ssid = "" + wifi_auto_connect_at_boot_password = "" + + # Setup discriminator as argument + setup_discriminator = 3840 + + chip_with_diag_logs_demo = true +} + +example_platform_dir = + "${nxp_sdk_matter_support_root}/examples/platform/${nxp_platform}" +common_example_dir = "${chip_root}/examples/platform/nxp/common" + +app_common_folder = "thermostat/nxp/zap" + +# Create here the SDK instance. +# Particular sources/defines/includes could be added/changed depending on the target application. +rt_sdk("sdk") { + defines = [] + + cflags = [] + public_deps = [] + public_configs = [] + sources = [] + include_dirs = [] + + # Indicate paths to default board files + include_dirs += [ "${example_platform_dir}/board/" ] + sources += [ "${example_platform_dir}/board/pin_mux.c" ] + sources += [ "${example_platform_dir}/board/hardware_init.c" ] + sources += [ "${example_platform_dir}/board/clock_config.c" ] + sources += [ "${example_platform_dir}/board/board.c" ] + sources += [ "${example_platform_dir}/board/peripherals.c" ] + sources += [ "${example_platform_dir}/board/sdmmc_config.c" ] + + # Indicate the path to CHIPProjectConfig.h + include_dirs += [ "include/config" ] + + # Indicate the default path to FreeRTOSConfig.h + include_dirs += [ "${example_platform_dir}/app/project_include/freeRTOS" ] + + # Indicate the default path to OpenThreadConfig.h + include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ] + + # For matter with BR feature, increase FreeRTOS heap size and enable TBR cluster + if (chip_enable_wifi && chip_enable_openthread) { + defines += [ + "configTOTAL_HEAP_SIZE=(size_t)(170 * 1024)", + "CHIP_DEVICE_CONFIG_ENABLE_TBR=1", + ] + } + defines += [ + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}", + ] +} + +# Create the SDK driver instance. +# Particular sources/defines/includes could be added to add other drivers not available in the default sdk driver template +rt1170_sdk_drivers("sdk_driver") { +} + +rt_executable("thermostat") { + output_name = "chip-rt1170-thermostat-example" + + defines = [ + "CONFIG_RENDEZVOUS_MODE=7", + "CONFIG_APP_FREERTOS_OS=1", + ] + + if (chip_enable_openthread) { + defines += [ "CONFIG_NET_L2_OPENTHREAD=1" ] + } + + if (chip_with_diag_logs_demo) { + defines += [ + "CONFIG_DIAG_LOGS_DEMO=1", + "CHIP_DEVICE_CONFIG_MAX_DIAG_LOG_SIZE=1024", + ] + } + + include_dirs = [ + "../../common/main/include", + "../../common/main", + "${chip_root}/examples/all-clusters-app/all-clusters-common/include", + "${chip_root}/examples/providers/", + ] + + sources = [ + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", + "${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp", + "../../common/main/AppTask.cpp", + "../../common/main/DeviceCallbacks.cpp", + "../../common/main/ZclCallbacks.cpp", + "../../common/main/include/AppEvent.h", + "../../common/main/include/AppTask.h", + "../../common/main/include/DeviceCallbacks.h", + "../../common/main/main.cpp", + ] + + if (chip_with_diag_logs_demo) { + include_dirs += [ + "${common_example_dir}/diagnostic_logs/include", + "${chip_root}", + ] + sources += [ + "${common_example_dir}/diagnostic_logs/source/DiagnosticLogsDemo.cpp", + "${common_example_dir}/diagnostic_logs/source/DiagnosticLogsProviderDelegateImpl.cpp", + ] + } + + # App common files + include_dirs += [ + "${common_example_dir}/icd/include", + "${common_example_dir}/matter_button/include", + "${common_example_dir}/matter_cli/include", + "${common_example_dir}/device_manager/include", + "${common_example_dir}/device_callbacks/include", + "${common_example_dir}/factory_data/include", + "${common_example_dir}/app_task/include", + ] + + sources += [ + "${common_example_dir}/app_task/source/AppTaskBase.cpp", + "${common_example_dir}/app_task/source/AppTaskFreeRTOS.cpp", + "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", + "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/factory_data/source/AppFactoryDataDefaultImpl.cpp", + "${common_example_dir}/icd/source/ICDUtil.cpp", + "${common_example_dir}/matter_button/source/ButtonRegistrationEmpty.cpp", + ] + + deps = [ "${chip_root}/examples/${app_common_folder}" ] + + if (chip_enable_matter_cli) { + defines += [ "ENABLE_CHIP_SHELL" ] + deps += [ + "${chip_root}/examples/shell/shell_common:shell_common", + "${chip_root}/src/lib/shell:shell", + ] + sources += [ + "${common_example_dir}/matter_cli/source/AppCLIBase.cpp", + "${common_example_dir}/matter_cli/source/AppCLIFreeRTOS.cpp", + ] + } + + if (chip_enable_ota_requestor) { + include_dirs += [ "${common_example_dir}/ota_requestor/include" ] + sources += [ + "${common_example_dir}/ota_requestor/source/OTARequestorInitiator.cpp", + "${common_example_dir}/ota_requestor/source/OTARequestorInitiatorCommon.cpp", + ] + } + + if (wifi_auto_connect_at_boot) { + assert(wifi_auto_connect_at_boot_ssid != "" && + wifi_auto_connect_at_boot_password != "", + "WiFi SSID and password must be specified at build time!") + + defines += [ + "CONFIG_CHIP_APP_WIFI_CONNECT_AT_BOOT=1", + "CONFIG_CHIP_APP_WIFI_SSID=\"${wifi_auto_connect_at_boot_ssid}\"", + "CONFIG_CHIP_APP_WIFI_PASSWORD=\"${wifi_auto_connect_at_boot_password}\"", + ] + + include_dirs += [ "${common_example_dir}/wifi_connect/include" ] + sources += [ "${common_example_dir}/wifi_connect/source/WifiConnect.cpp" ] + } + + # In case a dedicated assert function needs to be supported the flag sdk_fsl_assert_support should be set to false + # The would add to the build a dedicated application assert implementation. + if (!sdk_fsl_assert_support) { + sources += [ "${common_example_dir}/app_assert/source/AppAssert.cpp" ] + } + + cflags = [ "-Wconversion" ] + + ldscript = + "${example_platform_dir}/app/ldscripts/MIMXRT1176xxxxx_cm7_flexspi_nor.ld" + + inputs = [ ldscript ] + + ldflags = [ + "-T" + rebase_path(ldscript, root_build_dir), + "-fno-common", + "-Wl,--defsym=__stack_size__=2048", + "-ffreestanding", + "-fno-builtin", + "-mapcs", + "-u qspiflash_config", + "-u image_vector_table", + "-u boot_data", + "-u dcd_data", + "-Wl,-print-memory-usage", + "-Wl,--no-warn-rwx-segments", + ] + + if (chip_enable_ota_requestor) { + if (no_mcuboot) { + # If "no_mcuboot" is set to true, the application will be linked at the base of the flash. + print( + "Warning : The OTA Requestor is enabled without MCUBoot. This will prevent the application from applying software updates.") + } else { + # we need to reserve enough space for the bootloader (MCUBoot) + # MCUBoot requires 0x40000 Bytes to be reserved at the base of the flash + # Consequently, some sections will need to be shifted + ldflags += [ "-Wl,--defsym=__m_mcuboot_size__=0x40000" ] + } + } + + output_dir = root_out_dir +} + +group("rt1170") { + deps = [ ":thermostat" ] +} + +group("default") { + deps = [ ":rt1170" ] +} diff --git a/examples/thermostat/nxp/rt/rt1170/README.md b/examples/thermostat/nxp/rt/rt1170/README.md new file mode 100644 index 0000000000..97101758c8 --- /dev/null +++ b/examples/thermostat/nxp/rt/rt1170/README.md @@ -0,0 +1,5 @@ +# CHIP RT1170 Thermostat Application + +All instructions describing how to use a Matter application on NXP RT11170 can +be found in [README.md](../../../../all-clusters-app/nxp/rt/rt1170/README.md) +root readme diff --git a/examples/thermostat/nxp/rt/rt1170/args.gni b/examples/thermostat/nxp/rt/rt1170/args.gni new file mode 100644 index 0000000000..c2d91a5db7 --- /dev/null +++ b/examples/thermostat/nxp/rt/rt1170/args.gni @@ -0,0 +1,19 @@ +# 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. + +import("//build_overrides/chip.gni") + +# SDK target definitions +nxp_sdk_target = get_label_info(":sdk", "label_no_toolchain") +nxp_sdk_driver_target = get_label_info(":sdk_driver", "label_no_toolchain") diff --git a/examples/thermostat/nxp/rt/rt1170/build_overrides b/examples/thermostat/nxp/rt/rt1170/build_overrides new file mode 120000 index 0000000000..f10867042f --- /dev/null +++ b/examples/thermostat/nxp/rt/rt1170/build_overrides @@ -0,0 +1 @@ +../../../../build_overrides \ No newline at end of file diff --git a/examples/thermostat/nxp/rt/rt1170/include/config/CHIPProjectConfig.h b/examples/thermostat/nxp/rt/rt1170/include/config/CHIPProjectConfig.h new file mode 100644 index 0000000000..dd73c6c9ea --- /dev/null +++ b/examples/thermostat/nxp/rt/rt1170/include/config/CHIPProjectConfig.h @@ -0,0 +1,216 @@ +/* + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020 Google LLC. + * 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 + +/* + * Tells to the platform Factory Data Provider whether to use the example configuration or real/provisioned data. + */ +#ifndef CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA +#define CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA 0 +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID + * + * 0xFFF1: Test vendor. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID + * + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8005 + +#if !CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA +// Use a default pairing code if one hasn't been provisioned in flash. +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif + +// Use a default pairing code if one hasn't been provisioned in flash. +#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" + +/** + * CHIP_DEVICE_CONFIG_USE_TEST_SERIAL_NUMBER + * + * Enables the use of a hard-coded default serial number if none + * is found in CHIP NV storage. + */ +#define CHIP_DEVICE_CONFIG_USE_TEST_SERIAL_NUMBER "DUMMY_SN" + +#endif /* !CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA */ + +/** + * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION + * + * The hardware version number assigned to device or product by the device vendor. This + * number is scoped to the device product id, and typically corresponds to a revision of the + * physical device, a change to its packaging, and/or a change to its marketing presentation. + * This value is generally *not* incremented for device software versions. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 100 + +#ifndef CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING "v0.1.0" +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING + * + * A string identifying the software version running on the device. + * CHIP currently expects the software version to be in the format + * {MAJOR_VERSION}.0d{MINOR_VERSION} + */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING NXP_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION NXP_CONFIG_DEVICE_SOFTWARE_VERSION +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME "NXP Semiconductors" +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME "NXP Demo App" +#endif + +#ifndef CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION +//-> format_version = 1 +//-> vendor_id = 0xFFF1 +//-> product_id_array = [ 0x8000, 0x8001, 0x8002, 0x8003, 0x8004, 0x8005, 0x8006, 0x8007, 0x8008, 0x8009, 0x800A, 0x800B, +// 0x800C, 0x800D, 0x800E, 0x800F, 0x8010, 0x8011, 0x8012, 0x8013, 0x8014, 0x8015, 0x8016, 0x8017, 0x8018, 0x8019, 0x801A, +// 0x801B, 0x801C, 0x801D, 0x801E, 0x801F, 0x8020, 0x8021, 0x8022, 0x8023, 0x8024, 0x8025, 0x8026, 0x8027, 0x8028, 0x8029, +// 0x802A, 0x802B, 0x802C, 0x802D, 0x802E, 0x802F, 0x8030, 0x8031, 0x8032, 0x8033, 0x8034, 0x8035, 0x8036, 0x8037, 0x8038, +// 0x8039, 0x803A, 0x803B, 0x803C, 0x803D, 0x803E, 0x803F, 0x8040, 0x8041, 0x8042, 0x8043, 0x8044, 0x8045, 0x8046, 0x8047, +// 0x8048, 0x8049, 0x804A, 0x804B, 0x804C, 0x804D, 0x804E, 0x804F, 0x8050, 0x8051, 0x8052, 0x8053, 0x8054, 0x8055, 0x8056, +// 0x8057, 0x8058, 0x8059, 0x805A, 0x805B, 0x805C, 0x805D, 0x805E, 0x805F, 0x8060, 0x8061, 0x8062, 0x8063 ] +//-> device_type_id = 0x0016 +//-> certificate_id = "ZIG20142ZB330003-24" +//-> security_level = 0 +//-> security_information = 0 +//-> version_number = 0x2694 +//-> certification_type = 0 +//-> dac_origin_vendor_id is not present +//-> dac_origin_product_id is not present +#define CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION \ + { \ + 0x30, 0x82, 0x02, 0x19, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, 0x82, 0x02, 0x0a, 0x30, \ + 0x82, 0x02, 0x06, 0x02, 0x01, 0x03, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, \ + 0x02, 0x01, 0x30, 0x82, 0x01, 0x71, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x82, \ + 0x01, 0x62, 0x04, 0x82, 0x01, 0x5e, 0x15, 0x24, 0x00, 0x01, 0x25, 0x01, 0xf1, 0xff, 0x36, 0x02, 0x05, 0x00, 0x80, \ + 0x05, 0x01, 0x80, 0x05, 0x02, 0x80, 0x05, 0x03, 0x80, 0x05, 0x04, 0x80, 0x05, 0x05, 0x80, 0x05, 0x06, 0x80, 0x05, \ + 0x07, 0x80, 0x05, 0x08, 0x80, 0x05, 0x09, 0x80, 0x05, 0x0a, 0x80, 0x05, 0x0b, 0x80, 0x05, 0x0c, 0x80, 0x05, 0x0d, \ + 0x80, 0x05, 0x0e, 0x80, 0x05, 0x0f, 0x80, 0x05, 0x10, 0x80, 0x05, 0x11, 0x80, 0x05, 0x12, 0x80, 0x05, 0x13, 0x80, \ + 0x05, 0x14, 0x80, 0x05, 0x15, 0x80, 0x05, 0x16, 0x80, 0x05, 0x17, 0x80, 0x05, 0x18, 0x80, 0x05, 0x19, 0x80, 0x05, \ + 0x1a, 0x80, 0x05, 0x1b, 0x80, 0x05, 0x1c, 0x80, 0x05, 0x1d, 0x80, 0x05, 0x1e, 0x80, 0x05, 0x1f, 0x80, 0x05, 0x20, \ + 0x80, 0x05, 0x21, 0x80, 0x05, 0x22, 0x80, 0x05, 0x23, 0x80, 0x05, 0x24, 0x80, 0x05, 0x25, 0x80, 0x05, 0x26, 0x80, \ + 0x05, 0x27, 0x80, 0x05, 0x28, 0x80, 0x05, 0x29, 0x80, 0x05, 0x2a, 0x80, 0x05, 0x2b, 0x80, 0x05, 0x2c, 0x80, 0x05, \ + 0x2d, 0x80, 0x05, 0x2e, 0x80, 0x05, 0x2f, 0x80, 0x05, 0x30, 0x80, 0x05, 0x31, 0x80, 0x05, 0x32, 0x80, 0x05, 0x33, \ + 0x80, 0x05, 0x34, 0x80, 0x05, 0x35, 0x80, 0x05, 0x36, 0x80, 0x05, 0x37, 0x80, 0x05, 0x38, 0x80, 0x05, 0x39, 0x80, \ + 0x05, 0x3a, 0x80, 0x05, 0x3b, 0x80, 0x05, 0x3c, 0x80, 0x05, 0x3d, 0x80, 0x05, 0x3e, 0x80, 0x05, 0x3f, 0x80, 0x05, \ + 0x40, 0x80, 0x05, 0x41, 0x80, 0x05, 0x42, 0x80, 0x05, 0x43, 0x80, 0x05, 0x44, 0x80, 0x05, 0x45, 0x80, 0x05, 0x46, \ + 0x80, 0x05, 0x47, 0x80, 0x05, 0x48, 0x80, 0x05, 0x49, 0x80, 0x05, 0x4a, 0x80, 0x05, 0x4b, 0x80, 0x05, 0x4c, 0x80, \ + 0x05, 0x4d, 0x80, 0x05, 0x4e, 0x80, 0x05, 0x4f, 0x80, 0x05, 0x50, 0x80, 0x05, 0x51, 0x80, 0x05, 0x52, 0x80, 0x05, \ + 0x53, 0x80, 0x05, 0x54, 0x80, 0x05, 0x55, 0x80, 0x05, 0x56, 0x80, 0x05, 0x57, 0x80, 0x05, 0x58, 0x80, 0x05, 0x59, \ + 0x80, 0x05, 0x5a, 0x80, 0x05, 0x5b, 0x80, 0x05, 0x5c, 0x80, 0x05, 0x5d, 0x80, 0x05, 0x5e, 0x80, 0x05, 0x5f, 0x80, \ + 0x05, 0x60, 0x80, 0x05, 0x61, 0x80, 0x05, 0x62, 0x80, 0x05, 0x63, 0x80, 0x18, 0x24, 0x03, 0x16, 0x2c, 0x04, 0x13, \ + 0x5a, 0x49, 0x47, 0x32, 0x30, 0x31, 0x34, 0x32, 0x5a, 0x42, 0x33, 0x33, 0x30, 0x30, 0x30, 0x33, 0x2d, 0x32, 0x34, \ + 0x24, 0x05, 0x00, 0x24, 0x06, 0x00, 0x25, 0x07, 0x94, 0x26, 0x24, 0x08, 0x00, 0x18, 0x31, 0x7d, 0x30, 0x7b, 0x02, \ + 0x01, 0x03, 0x80, 0x14, 0x62, 0xfa, 0x82, 0x33, 0x59, 0xac, 0xfa, 0xa9, 0x96, 0x3e, 0x1c, 0xfa, 0x14, 0x0a, 0xdd, \ + 0xf5, 0x04, 0xf3, 0x71, 0x60, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, \ + 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x04, 0x47, 0x30, 0x45, 0x02, 0x20, 0x24, 0xe5, \ + 0xd1, 0xf4, 0x7a, 0x7d, 0x7b, 0x0d, 0x20, 0x6a, 0x26, 0xef, 0x69, 0x9b, 0x7c, 0x97, 0x57, 0xb7, 0x2d, 0x46, 0x90, \ + 0x89, 0xde, 0x31, 0x92, 0xe6, 0x78, 0xc7, 0x45, 0xe7, 0xf6, 0x0c, 0x02, 0x21, 0x00, 0xf8, 0xaa, 0x2f, 0xa7, 0x11, \ + 0xfc, 0xb7, 0x9b, 0x97, 0xe3, 0x97, 0xce, 0xda, 0x66, 0x7b, 0xae, 0x46, 0x4e, 0x2b, 0xd3, 0xff, 0xdf, 0xc3, 0xcc, \ + 0xed, 0x7a, 0xa8, 0xca, 0x5f, 0x4c, 0x1a, 0x7c \ + } +#endif + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC + * + * Enables synchronizing the device's real time clock with a remote CHIP Time service + * using the CHIP Time Sync protocol. + */ +// #define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 1 + +/** + * CHIP_CONFIG_MAX_BINDINGS + * + * Maximum number of simultaneously active bindings per ChipExchangeManager + * 1 (Time Sync) + 2 (Two 1-way subscriptions) + 1 (Software Update) = 4 + * in the worst case. Keeping another 4 as buffer. + */ +#define CHIP_CONFIG_MAX_BINDINGS 6 + +/** + * CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD + * + * Select the ability to offload event logs to any interested subscribers using WDM. + */ +#define CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD 1 + +/** + * CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE + * + * A size, in bytes, of the individual debug event logging buffer. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) + +/** + * CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE + * + * For a development build, set the default importance of events to be logged as Debug. + * Since debug is the lowest importance level, this means all standard, critical, info and + * debug importance level vi events get logged. + */ +#if BUILD_RELEASE +#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Production +#else +#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Debug +#endif // BUILD_RELEASE + +/* Increasing the retransmission interval of the MRP messages after subsequent failures */ +#ifndef CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL +#define CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL (2000_ms32) +#endif diff --git a/examples/thermostat/nxp/rt/rt1170/third_party/connectedhomeip b/examples/thermostat/nxp/rt/rt1170/third_party/connectedhomeip new file mode 120000 index 0000000000..305f2077ff --- /dev/null +++ b/examples/thermostat/nxp/rt/rt1170/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../../.. \ No newline at end of file diff --git a/examples/thermostat/nxp/zap/thermostat_matter_br.matter b/examples/thermostat/nxp/zap/thermostat_matter_br.matter index 9b35e9d22b..f38e2b130b 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_br.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_br.matter @@ -866,6 +866,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2300,7 +2301,6 @@ endpoint 0 { callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -2349,7 +2349,6 @@ endpoint 0 { callback attribute supportedWiFiBands; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -2368,7 +2367,6 @@ endpoint 0 { server cluster DiagnosticLogs { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2387,7 +2385,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2404,7 +2401,6 @@ endpoint 0 { callback attribute currentHeapHighWatermark; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -2426,7 +2422,6 @@ endpoint 0 { callback attribute overrunCount; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2495,7 +2490,6 @@ endpoint 1 { 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; @@ -2532,7 +2526,6 @@ endpoint 1 { server cluster FixedLabel { callback attribute labelList; - callback attribute eventList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -2541,7 +2534,6 @@ endpoint 1 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2582,7 +2574,6 @@ endpoint 2 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2601,7 +2592,6 @@ endpoint 2 { ram attribute threadVersion; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2684,7 +2674,6 @@ endpoint 2 { callback attribute activeNetworkFaultsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; @@ -2701,7 +2690,6 @@ endpoint 2 { callback attribute pendingDatasetTimestamp; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index f02c08a6a5..4c6b26a578 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -866,6 +866,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2179,7 +2180,6 @@ endpoint 0 { callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -2229,7 +2229,6 @@ endpoint 0 { ram attribute threadVersion; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -2248,7 +2247,6 @@ endpoint 0 { server cluster DiagnosticLogs { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2267,7 +2265,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2284,7 +2281,6 @@ endpoint 0 { callback attribute currentHeapHighWatermark; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -2426,7 +2422,6 @@ endpoint 1 { 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; @@ -2463,7 +2458,6 @@ endpoint 1 { server cluster FixedLabel { callback attribute labelList; - callback attribute eventList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -2472,7 +2466,6 @@ endpoint 1 { callback attribute labelList; 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/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index a583ab8f96..9b09b05416 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -866,6 +866,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2090,7 +2091,6 @@ endpoint 0 { callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -2139,7 +2139,6 @@ endpoint 0 { callback attribute supportedWiFiBands; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -2158,7 +2157,6 @@ endpoint 0 { server cluster DiagnosticLogs { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2177,7 +2175,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2194,7 +2191,6 @@ endpoint 0 { callback attribute currentHeapHighWatermark; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; @@ -2219,7 +2215,6 @@ endpoint 0 { callback attribute overrunCount; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2288,7 +2283,6 @@ endpoint 1 { 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; @@ -2325,7 +2319,6 @@ endpoint 1 { server cluster FixedLabel { callback attribute labelList; - callback attribute eventList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -2334,7 +2327,6 @@ endpoint 1 { callback attribute labelList; 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/thermostat/qpg/zap/thermostaticRadiatorValve.matter b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter index 1f7b2191bc..86383cf904 100644 --- a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter +++ b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter @@ -913,6 +913,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/thermostat/silabs/BUILD.gn b/examples/thermostat/silabs/BUILD.gn index 75b2f75c15..f51ee14825 100644 --- a/examples/thermostat/silabs/BUILD.gn +++ b/examples/thermostat/silabs/BUILD.gn @@ -47,10 +47,6 @@ import("${examples_common_plat_dir}/args.gni") declare_args() { # Dump memory usage at link time. chip_print_memory_usage = false - - # Enable the temperature sensor - # Some boards do not have a temperature sensor - use_temp_sensor = false } if (wifi_soc) { @@ -112,19 +108,6 @@ if (wifi_soc) { "PW_RPC_ENABLED", ] } - - if (use_temp_sensor) { - include_dirs += [ - "${efr32_sdk_root}/platform/driver/i2cspm/inc", - "${efr32_sdk_root}/app/bluetooth/common/sensor_rht", - "${efr32_sdk_root}/app/bluetooth/common/sensor_rht/config", - "${efr32_sdk_root}/hardware/driver/si70xx/inc", - "${efr32_sdk_root}/app/bluetooth/common/sensor_select", - "${efr32_sdk_root}/platform/common/config", - ] - - defines += [ "USE_TEMP_SENSOR" ] - } } } @@ -141,17 +124,6 @@ silabs_executable("thermostat_app") { "src/ZclCallbacks.cpp", ] - if (use_temp_sensor) { - sources += [ - "${efr32_sdk_root}/hardware/driver/si70xx/src/sl_si70xx.c", - "${efr32_sdk_root}/platform/common/src/sl_status.c", - "${efr32_sdk_root}/platform/driver/i2cspm/src/sl_i2cspm.c", - "${efr32_sdk_root}/platform/emlib/src/em_i2c.c", - "${examples_common_plat_dir}/TemperatureSensor.cpp", - "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_i2cspm_init.c", - ] - } - if (!disable_lcd) { sources += [ "src/ThermostatUI.cpp" ] } diff --git a/examples/thermostat/silabs/README.md b/examples/thermostat/silabs/README.md index 25ba47891b..3205352bf0 100644 --- a/examples/thermostat/silabs/README.md +++ b/examples/thermostat/silabs/README.md @@ -206,7 +206,7 @@ combination with JLinkRTTClient as follows: - It is assumed here that you already have an OpenThread border router configured and running. If not see the following guide - [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) + [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/platforms/openthread/openthread_border_router_pi.md) for more information on how to setup a border router on a raspberryPi. Take note that the RCP code is available directly through @@ -324,7 +324,7 @@ tracking code inside the `trackAlloc` and `trackFree` function For the description of Software Update process with EFR32 example applications see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) +[EFR32 OTA Software Update](../../../docs/platforms/silabs/silabs_efr32_software_update.md) ## Building options diff --git a/examples/thermostat/silabs/src/SensorManager.cpp b/examples/thermostat/silabs/src/SensorManager.cpp index abecd899d5..3522e9f5a3 100644 --- a/examples/thermostat/silabs/src/SensorManager.cpp +++ b/examples/thermostat/silabs/src/SensorManager.cpp @@ -26,14 +26,15 @@ #include "AppEvent.h" #include "AppTask.h" -#ifdef USE_TEMP_SENSOR -#include "TemperatureSensor.h" -#endif +#if defined(SL_MATTER_USE_SI70XX_SENSOR) && SL_MATTER_USE_SI70XX_SENSOR +#include "Si70xxSensor.h" +#endif // defined(SL_MATTER_USE_SI70XX_SENSOR) && SL_MATTER_USE_SI70XX_SENSOR /********************************************************** * Defines and Constants *********************************************************/ using namespace chip; +using namespace chip::app; using namespace ::chip::DeviceLayer; constexpr EndpointId kThermostatEndpoint = 1; @@ -45,10 +46,10 @@ constexpr uint16_t kMinTemperatureDelta = 50; // 0.5 degree Celcius *********************************************************/ SensorManager SensorManager::sSensorManager; -#ifndef USE_TEMP_SENSOR +#if !(defined(SL_MATTER_USE_SI70XX_SENSOR) && (SL_MATTER_USE_SI70XX_SENSOR)) constexpr uint16_t kSimulatedReadingFrequency = (60000 / kSensorTImerPeriodMs); // Change Simulated number at each minutes static int16_t mSimulatedTemp[] = { 2300, 2400, 2800, 2550, 2200, 2125, 2100, 2600, 1800, 2700 }; -#endif +#endif // !(defined(SL_MATTER_USE_SI70XX_SENSOR) && (SL_MATTER_USE_SI70XX_SENSOR)) CHIP_ERROR SensorManager::Init() { @@ -61,13 +62,13 @@ CHIP_ERROR SensorManager::Init() return APP_ERROR_CREATE_TIMER_FAILED; } -#ifdef USE_TEMP_SENSOR - if (SL_STATUS_OK != TemperatureSensor::Init()) +#if defined(SL_MATTER_USE_SI70XX_SENSOR) && SL_MATTER_USE_SI70XX_SENSOR + if (SL_STATUS_OK != Si70xxSensor::Init()) { SILABS_LOG("Failed to Init Sensor"); return CHIP_ERROR_INTERNAL; } -#endif +#endif // defined(SL_MATTER_USE_SI70XX_SENSOR) && SL_MATTER_USE_SI70XX_SENSOR // Update Temp immediatly at bootup SensorTimerEventHandler(nullptr); @@ -81,19 +82,20 @@ void SensorManager::SensorTimerEventHandler(void * arg) int16_t temperature = 0; static int16_t lastTemperature = 0; -#ifdef USE_TEMP_SENSOR +#if defined(SL_MATTER_USE_SI70XX_SENSOR) && SL_MATTER_USE_SI70XX_SENSOR int32_t tempSum = 0; - uint32_t humidity = 0; + uint16_t humidity = 0; for (uint8_t i = 0; i < 100; i++) { - if (SL_STATUS_OK != TemperatureSensor::GetTemp(&humidity, &temperature)) + if (SL_STATUS_OK != Si70xxSensor::GetSensorData(humidity, temperature)) { SILABS_LOG("Failed to read Temperature !!!"); } tempSum += temperature; } temperature = static_cast(tempSum / 100); + #else static uint8_t nbOfRepetition = 0; static uint8_t simulatedIndex = 0; @@ -109,18 +111,20 @@ void SensorManager::SensorTimerEventHandler(void * arg) simulatedIndex++; nbOfRepetition = 0; } -#endif // USE_TEMP_SENSOR +#endif // defined(SL_MATTER_USE_SI70XX_SENSOR) && SL_MATTER_USE_SI70XX_SENSOR SILABS_LOG("Sensor Temp is : %d", temperature); + MarkAttributeDirty reportState = MarkAttributeDirty::kNo; if ((temperature >= (lastTemperature + kMinTemperatureDelta)) || temperature <= (lastTemperature - kMinTemperatureDelta)) { - lastTemperature = temperature; - PlatformMgr().LockChipStack(); - // The SensorMagager shouldn't be aware of the Endpoint ID TODO Fix this. - // TODO Per Spec we should also apply the Offset stored in the same cluster before saving the temp - - app::Clusters::Thermostat::Attributes::LocalTemperature::Set(kThermostatEndpoint, temperature); - PlatformMgr().UnlockChipStack(); + reportState = MarkAttributeDirty::kIfChanged; } + + lastTemperature = temperature; + PlatformMgr().LockChipStack(); + // The SensorMagager shouldn't be aware of the Endpoint ID TODO Fix this. + // TODO Per Spec we should also apply the Offset stored in the same cluster before saving the temp + app::Clusters::Thermostat::Attributes::LocalTemperature::Set(kThermostatEndpoint, temperature, reportState); + PlatformMgr().UnlockChipStack(); } diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 08106665d9..1c062da0fe 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -974,6 +974,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/examples/thread-br-app/esp32/README.md b/examples/thread-br-app/esp32/README.md index 576339cd43..2578a106ab 100644 --- a/examples/thread-br-app/esp32/README.md +++ b/examples/thread-br-app/esp32/README.md @@ -4,9 +4,9 @@ A prototype application that demonstrates OpenThread Border Router on ESP32-S3 + ESP32-H2 Thread Border Router DevKit Board. Please -[setup ESP-IDF and CHIP Environment](../../../docs/guides/esp32/setup_idf_chip.md) +[setup ESP-IDF and CHIP Environment](../../../docs/platforms/esp32/setup_idf_chip.md) and refer -[building and commissioning](../../../docs/guides/esp32/build_app_and_commission.md) +[building and commissioning](../../../docs/platforms/esp32/build_app_and_commission.md) guides to get started. --- diff --git a/examples/thread-br-app/thread-br-common/thread-br-app.matter b/examples/thread-br-app/thread-br-common/thread-br-app.matter index ce073c319b..4aa0db4a70 100644 --- a/examples/thread-br-app/thread-br-common/thread-br-app.matter +++ b/examples/thread-br-app/thread-br-common/thread-br-app.matter @@ -535,6 +535,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1591,7 +1592,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -1617,7 +1617,6 @@ endpoint 1 { callback attribute activeNetworkFaultsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; @@ -1632,7 +1631,6 @@ endpoint 1 { callback attribute pendingDatasetTimestamp; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; ram attribute clusterRevision default = 1; diff --git a/examples/tv-app/openiotsdk/README.md b/examples/tv-app/openiotsdk/README.md index 8702f294e1..5a148260dd 100644 --- a/examples/tv-app/openiotsdk/README.md +++ b/examples/tv-app/openiotsdk/README.md @@ -19,7 +19,7 @@ paired into an existing Matter network and can be controlled by it. For information on how to build, run, test and debug this example and further information about the platform it is run on see -[Open IoT SDK examples](../../../docs/guides/openiotsdk_examples.md). +[Open IoT SDK examples](../../../docs/platforms/openiotsdk/openiotsdk_examples.md). The example name to use in the scripts is `tv-app`. @@ -68,7 +68,7 @@ Run the `app help` command to get all supported commands and their usage. ## Commissioning Read the -[Open IoT SDK commissioning guide](../../../docs/guides/openiotsdk_commissioning.md) +[Open IoT SDK commissioning guide](../../../docs/platforms/openiotsdk/openiotsdk_commissioning.md) to see how to use the Matter controller to commission and control the application. diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 6ea0892fac..3cf472ee1d 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -937,6 +937,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1028,6 +1029,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3886,7 +3888,6 @@ endpoint 1 { callback attribute activeMessageIDs; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -4039,7 +4040,6 @@ endpoint 1 { ram attribute blockUnrated; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 28; ram attribute clusterRevision default = 2; @@ -4126,7 +4126,6 @@ endpoint 3 { callback attribute binding; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -4270,7 +4269,6 @@ endpoint 3 { ram attribute blockUnrated; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 28; ram attribute clusterRevision default = 1; diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ConnectionExampleFragment.java b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ConnectionExampleFragment.java index fc3ba6cd1d..f711096a22 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ConnectionExampleFragment.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ConnectionExampleFragment.java @@ -29,6 +29,7 @@ import android.widget.TextView; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentActivity; import com.R; import com.matter.casting.core.CastingPlayer; import com.matter.casting.support.CommissionerDeclaration; @@ -208,36 +209,41 @@ public void handle(CommissionerDeclaration cd) { Log.i(TAG, "CastingPlayer CommissionerDeclaration message received: "); cd.logDetail(); - getActivity() - .runOnUiThread( - () -> { - connectionFragmentStatusTextView.setText( - "CommissionerDeclaration message received from Casting Player: \n\n"); - if (cd.getCommissionerPasscode()) { + FragmentActivity activity = getActivity(); + // Prevent possible NullPointerException. This callback could be called when + // this Fragment is not attached to its host activity or when the fragment's + // lifecycle is not in a valid state for interacting with the activity. + if (activity != null && !activity.isFinishing()) { + activity.runOnUiThread( + () -> { + connectionFragmentStatusTextView.setText( + "CommissionerDeclaration message received from Casting Player: \n\n"); + if (cd.getCommissionerPasscode()) { - displayPasscodeInputDialog(getActivity()); + displayPasscodeInputDialog(activity); + connectionFragmentStatusTextView.setText( + "CommissionerDeclaration message received from Casting Player: A passcode is now displayed for the user by the Casting Player. \n\n"); + } + if (cd.getCancelPasscode()) { + if (useCommissionerGeneratedPasscode) { connectionFragmentStatusTextView.setText( - "CommissionerDeclaration message received from Casting Player: A passcode is now displayed for the user by the Casting Player. \n\n"); - } - if (cd.getCancelPasscode()) { - if (useCommissionerGeneratedPasscode) { - connectionFragmentStatusTextView.setText( - "CastingPlayer/Commissioner-Generated passcode connection attempt cancelled by the CastingPlayer/Commissioner user. \n\nRoute back to exit. \n\n"); - } else { - connectionFragmentStatusTextView.setText( - "Connection attempt cancelled by the CastingPlayer/Commissioner user. \n\nRoute back to exit. \n\n"); - } - if (passcodeDialog != null && passcodeDialog.isShowing()) { - passcodeDialog.dismiss(); - } + "CastingPlayer/Commissioner-Generated passcode connection attempt cancelled by the CastingPlayer/Commissioner user. \n\nRoute back to exit. \n\n"); + } else { + connectionFragmentStatusTextView.setText( + "Connection attempt cancelled by the CastingPlayer/Commissioner user. \n\nRoute back to exit. \n\n"); } - if (cd.getErrorCode() != CommissionerDeclaration.CdError.noError) { - commissionerDeclarationErrorTextView.setText( - "CommissionerDeclaration error from CastingPlayer: " - + cd.getErrorCode().getDescription()); + if (passcodeDialog != null && passcodeDialog.isShowing()) { + passcodeDialog.dismiss(); } - }); + } + if (cd.getErrorCode() != CommissionerDeclaration.CdError.noError) { + commissionerDeclarationErrorTextView.setText( + "CommissionerDeclaration error from CastingPlayer: " + + cd.getErrorCode().getDescription()); + } + }); + } } }; diff --git a/examples/tv-casting-app/android/README.md b/examples/tv-casting-app/android/README.md index b620c1ac5c..047f960f81 100644 --- a/examples/tv-casting-app/android/README.md +++ b/examples/tv-casting-app/android/README.md @@ -21,7 +21,7 @@ the TV. ## Requirements for building Refer to -[this file](../../../docs/guides/android_building.md#requirements-for-building) +[this file](../../../docs/platforms/android/android_building.md#requirements-for-building) to download the recommended version for the Android SDK and NDK for your machine. Set the `$ANDROID_HOME` environment variable to where the SDK is downloaded and the `$ANDROID_NDK_HOME` environment variable to point to where diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj index 28793f5f60..882961ed91 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj @@ -678,7 +678,6 @@ "$(CHIP_ROOT)/src/include", "$(CHIP_ROOT)/src/lib", "$(CHIP_ROOT)/src/app", - "$(CHIP_ROOT)/config/ios", "$(CHIP_ROOT)/src/app/util", "$(CHIP_ROOT)/third_party/nlassert/repo/include", "$(CHIP_ROOT)/third_party/nlio/repo/include", @@ -759,7 +758,6 @@ "$(CHIP_ROOT)/src/include", "$(CHIP_ROOT)/src/lib", "$(CHIP_ROOT)/src/app", - "$(CHIP_ROOT)/config/ios", "$(CHIP_ROOT)/src/app/util", "$(CHIP_ROOT)/third_party/nlassert/repo/include", "$(CHIP_ROOT)/third_party/nlio/repo/include", diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.h index d11580a6e8..0633da0cce 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.h +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.h @@ -48,9 +48,6 @@ @interface MCOnOffClusterAcceptedCommandListAttribute : MCAttribute @end -@interface MCOnOffClusterEventListAttribute : MCAttribute -@end - @interface MCOnOffClusterAttributeListAttribute : MCAttribute @end @@ -110,9 +107,6 @@ @interface MCLevelControlClusterAcceptedCommandListAttribute : MCAttribute @end -@interface MCLevelControlClusterEventListAttribute : MCAttribute -@end - @interface MCLevelControlClusterAttributeListAttribute : MCAttribute @end @@ -136,9 +130,6 @@ @interface MCWakeOnLanClusterAcceptedCommandListAttribute : MCAttribute @end -@interface MCWakeOnLanClusterEventListAttribute : MCAttribute -@end - @interface MCWakeOnLanClusterAttributeListAttribute : MCAttribute @end @@ -162,9 +153,6 @@ @interface MCTargetNavigatorClusterAcceptedCommandListAttribute : MCAttribute @end -@interface MCTargetNavigatorClusterEventListAttribute : MCAttribute -@end - @interface MCTargetNavigatorClusterAttributeListAttribute : MCAttribute @end @@ -215,9 +203,6 @@ @interface MCMediaPlaybackClusterAcceptedCommandListAttribute : MCAttribute @end -@interface MCMediaPlaybackClusterEventListAttribute : MCAttribute -@end - @interface MCMediaPlaybackClusterAttributeListAttribute : MCAttribute @end @@ -235,9 +220,6 @@ @interface MCKeypadInputClusterAcceptedCommandListAttribute : MCAttribute @end -@interface MCKeypadInputClusterEventListAttribute : MCAttribute -@end - @interface MCKeypadInputClusterAttributeListAttribute : MCAttribute @end @@ -261,9 +243,6 @@ @interface MCContentLauncherClusterAcceptedCommandListAttribute : MCAttribute @end -@interface MCContentLauncherClusterEventListAttribute : MCAttribute -@end - @interface MCContentLauncherClusterAttributeListAttribute : MCAttribute @end @@ -287,9 +266,6 @@ @interface MCApplicationLauncherClusterAcceptedCommandListAttribute : MCAttribute @end -@interface MCApplicationLauncherClusterEventListAttribute : MCAttribute -@end - @interface MCApplicationLauncherClusterAttributeListAttribute : MCAttribute @end @@ -331,9 +307,6 @@ @interface MCApplicationBasicClusterAcceptedCommandListAttribute : MCAttribute @end -@interface MCApplicationBasicClusterEventListAttribute : MCAttribute -@end - @interface MCApplicationBasicClusterAttributeListAttribute : MCAttribute @end diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.mm index fc563f5264..fa7706e2ec 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.mm +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCAttributeObjects.mm @@ -388,67 +388,6 @@ - (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aE } @end -@implementation MCOnOffClusterEventListAttribute -- (void)read:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue, CHIP_ERROR * errPtr) { - return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; - }); - mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }); -} - -- (void)subscribe:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion - minInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue, CHIP_ERROR * errPtr) { - return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; - }); - mcAttribute->subscribe( - context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }, minInterval, maxInterval); -} - -- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError -{ - NSArray * value = nil; - if (cppValue.type() == typeid(std::shared_ptr)) { - std::shared_ptr sharedPtr = std::any_cast>(cppValue); - chip::app::Clusters::OnOff::Attributes::EventList::TypeInfo::DecodableType _cppValue = *sharedPtr; - *aError = CHIP_NO_ERROR; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = _cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - *aError = CHIP_ERROR_INTERNAL; - return value; -} -@end - @implementation MCOnOffClusterAttributeListAttribute - (void)read:(void * _Nullable)context completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion @@ -1394,67 +1333,6 @@ - (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aE } @end -@implementation MCLevelControlClusterEventListAttribute -- (void)read:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue, CHIP_ERROR * errPtr) { - return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; - }); - mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }); -} - -- (void)subscribe:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion - minInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue, CHIP_ERROR * errPtr) { - return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; - }); - mcAttribute->subscribe( - context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }, minInterval, maxInterval); -} - -- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError -{ - NSArray * value = nil; - if (cppValue.type() == typeid(std::shared_ptr)) { - std::shared_ptr sharedPtr = std::any_cast>(cppValue); - chip::app::Clusters::LevelControl::Attributes::EventList::TypeInfo::DecodableType _cppValue = *sharedPtr; - *aError = CHIP_NO_ERROR; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = _cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - *aError = CHIP_ERROR_INTERNAL; - return value; -} -@end - @implementation MCLevelControlClusterAttributeListAttribute - (void)read:(void * _Nullable)context completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion @@ -1829,67 +1707,6 @@ - (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aE } @end -@implementation MCWakeOnLanClusterEventListAttribute -- (void)read:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue, CHIP_ERROR * errPtr) { - return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; - }); - mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }); -} - -- (void)subscribe:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion - minInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue, CHIP_ERROR * errPtr) { - return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; - }); - mcAttribute->subscribe( - context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }, minInterval, maxInterval); -} - -- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError -{ - NSArray * value = nil; - if (cppValue.type() == typeid(std::shared_ptr)) { - std::shared_ptr sharedPtr = std::any_cast>(cppValue); - chip::app::Clusters::WakeOnLan::Attributes::EventList::TypeInfo::DecodableType _cppValue = *sharedPtr; - *aError = CHIP_NO_ERROR; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = _cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - *aError = CHIP_ERROR_INTERNAL; - return value; -} -@end - @implementation MCWakeOnLanClusterAttributeListAttribute - (void)read:(void * _Nullable)context completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion @@ -2281,67 +2098,6 @@ - (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aE } @end -@implementation MCTargetNavigatorClusterEventListAttribute -- (void)read:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue, CHIP_ERROR * errPtr) { - return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; - }); - mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }); -} - -- (void)subscribe:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion - minInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue, CHIP_ERROR * errPtr) { - return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; - }); - mcAttribute->subscribe( - context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }, minInterval, maxInterval); -} - -- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError -{ - NSArray * value = nil; - if (cppValue.type() == typeid(std::shared_ptr)) { - std::shared_ptr sharedPtr = std::any_cast>(cppValue); - chip::app::Clusters::TargetNavigator::Attributes::EventList::TypeInfo::DecodableType _cppValue = *sharedPtr; - *aError = CHIP_NO_ERROR; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = _cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - *aError = CHIP_ERROR_INTERNAL; - return value; -} -@end - @implementation MCTargetNavigatorClusterAttributeListAttribute - (void)read:(void * _Nullable)context completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion @@ -3321,67 +3077,6 @@ - (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aE } @end -@implementation MCMediaPlaybackClusterEventListAttribute -- (void)read:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue, CHIP_ERROR * errPtr) { - return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; - }); - mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }); -} - -- (void)subscribe:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion - minInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue, CHIP_ERROR * errPtr) { - return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; - }); - mcAttribute->subscribe( - context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }, minInterval, maxInterval); -} - -- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError -{ - NSArray * value = nil; - if (cppValue.type() == typeid(std::shared_ptr)) { - std::shared_ptr sharedPtr = std::any_cast>(cppValue); - chip::app::Clusters::MediaPlayback::Attributes::EventList::TypeInfo::DecodableType _cppValue = *sharedPtr; - *aError = CHIP_NO_ERROR; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = _cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - *aError = CHIP_ERROR_INTERNAL; - return value; -} -@end - @implementation MCMediaPlaybackClusterAttributeListAttribute - (void)read:(void * _Nullable)context completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion @@ -3659,67 +3354,6 @@ - (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aE } @end -@implementation MCKeypadInputClusterEventListAttribute -- (void)read:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue, CHIP_ERROR * errPtr) { - return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; - }); - mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }); -} - -- (void)subscribe:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion - minInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue, CHIP_ERROR * errPtr) { - return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; - }); - mcAttribute->subscribe( - context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }, minInterval, maxInterval); -} - -- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError -{ - NSArray * value = nil; - if (cppValue.type() == typeid(std::shared_ptr)) { - std::shared_ptr sharedPtr = std::any_cast>(cppValue); - chip::app::Clusters::KeypadInput::Attributes::EventList::TypeInfo::DecodableType _cppValue = *sharedPtr; - *aError = CHIP_NO_ERROR; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = _cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - *aError = CHIP_ERROR_INTERNAL; - return value; -} -@end - @implementation MCKeypadInputClusterAttributeListAttribute - (void)read:(void * _Nullable)context completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion @@ -4109,67 +3743,6 @@ - (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aE } @end -@implementation MCContentLauncherClusterEventListAttribute -- (void)read:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue, CHIP_ERROR * errPtr) { - return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; - }); - mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }); -} - -- (void)subscribe:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion - minInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue, CHIP_ERROR * errPtr) { - return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; - }); - mcAttribute->subscribe( - context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }, minInterval, maxInterval); -} - -- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError -{ - NSArray * value = nil; - if (cppValue.type() == typeid(std::shared_ptr)) { - std::shared_ptr sharedPtr = std::any_cast>(cppValue); - chip::app::Clusters::ContentLauncher::Attributes::EventList::TypeInfo::DecodableType _cppValue = *sharedPtr; - *aError = CHIP_NO_ERROR; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = _cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - *aError = CHIP_ERROR_INTERNAL; - return value; -} -@end - @implementation MCContentLauncherClusterAttributeListAttribute - (void)read:(void * _Nullable)context completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion @@ -4571,67 +4144,6 @@ - (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aE } @end -@implementation MCApplicationLauncherClusterEventListAttribute -- (void)read:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue, CHIP_ERROR * errPtr) { - return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; - }); - mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }); -} - -- (void)subscribe:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion - minInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue, CHIP_ERROR * errPtr) { - return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; - }); - mcAttribute->subscribe( - context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }, minInterval, maxInterval); -} - -- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError -{ - NSArray * value = nil; - if (cppValue.type() == typeid(std::shared_ptr)) { - std::shared_ptr sharedPtr = std::any_cast>(cppValue); - chip::app::Clusters::ApplicationLauncher::Attributes::EventList::TypeInfo::DecodableType _cppValue = *sharedPtr; - *aError = CHIP_NO_ERROR; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = _cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - *aError = CHIP_ERROR_INTERNAL; - return value; -} -@end - @implementation MCApplicationLauncherClusterAttributeListAttribute - (void)read:(void * _Nullable)context completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion @@ -5314,67 +4826,6 @@ - (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aE } @end -@implementation MCApplicationBasicClusterEventListAttribute -- (void)read:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue, CHIP_ERROR * errPtr) { - return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; - }); - mcAttribute->read(context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }); -} - -- (void)subscribe:(void * _Nullable)context - completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion - minInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval -{ - MCAttributeTemplate * mcAttribute = new MCAttributeTemplate(self.cppAttribute, - [self](std::any cppValue, CHIP_ERROR * errPtr) { - return [self getObjCTypeFromCpp:cppValue errorCode:errPtr]; - }); - mcAttribute->subscribe( - context, [mcAttribute, completion](void * context, id before, id after, NSError * err) { - completion(context, before, after, err); - delete mcAttribute; - }, minInterval, maxInterval); -} - -- (id _Nullable)getObjCTypeFromCpp:(std::any)cppValue errorCode:(CHIP_ERROR *)aError -{ - NSArray * value = nil; - if (cppValue.type() == typeid(std::shared_ptr)) { - std::shared_ptr sharedPtr = std::any_cast>(cppValue); - chip::app::Clusters::ApplicationBasic::Attributes::EventList::TypeInfo::DecodableType _cppValue = *sharedPtr; - *aError = CHIP_NO_ERROR; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = _cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - *aError = CHIP_ERROR_INTERNAL; - return value; -} -@end - @implementation MCApplicationBasicClusterAttributeListAttribute - (void)read:(void * _Nullable)context completion:(void (^_Nonnull __strong)(void * _Nullable, id _Nullable __strong before, id _Nullable __strong after, NSError * _Nullable __strong error))completion diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.h index 12a3d8d3bf..9534dfa060 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.h +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.h @@ -98,11 +98,6 @@ */ - (MCOnOffClusterAcceptedCommandListAttribute * _Nullable)acceptedCommandListAttribute; -/** - * @brief Returns non-nil pointer to MCOnOffClusterEventListAttribute if supported, nil otherwise. - */ -- (MCOnOffClusterEventListAttribute * _Nullable)eventListAttribute; - /** * @brief Returns non-nil pointer to MCOnOffClusterAttributeListAttribute if supported, nil otherwise. */ @@ -252,11 +247,6 @@ */ - (MCLevelControlClusterAcceptedCommandListAttribute * _Nullable)acceptedCommandListAttribute; -/** - * @brief Returns non-nil pointer to MCLevelControlClusterEventListAttribute if supported, nil otherwise. - */ -- (MCLevelControlClusterEventListAttribute * _Nullable)eventListAttribute; - /** * @brief Returns non-nil pointer to MCLevelControlClusterAttributeListAttribute if supported, nil otherwise. */ @@ -301,11 +291,6 @@ */ - (MCWakeOnLanClusterAcceptedCommandListAttribute * _Nullable)acceptedCommandListAttribute; -/** - * @brief Returns non-nil pointer to MCWakeOnLanClusterEventListAttribute if supported, nil otherwise. - */ -- (MCWakeOnLanClusterEventListAttribute * _Nullable)eventListAttribute; - /** * @brief Returns non-nil pointer to MCWakeOnLanClusterAttributeListAttribute if supported, nil otherwise. */ @@ -355,11 +340,6 @@ */ - (MCTargetNavigatorClusterAcceptedCommandListAttribute * _Nullable)acceptedCommandListAttribute; -/** - * @brief Returns non-nil pointer to MCTargetNavigatorClusterEventListAttribute if supported, nil otherwise. - */ -- (MCTargetNavigatorClusterEventListAttribute * _Nullable)eventListAttribute; - /** * @brief Returns non-nil pointer to MCTargetNavigatorClusterAttributeListAttribute if supported, nil otherwise. */ @@ -519,11 +499,6 @@ */ - (MCMediaPlaybackClusterAcceptedCommandListAttribute * _Nullable)acceptedCommandListAttribute; -/** - * @brief Returns non-nil pointer to MCMediaPlaybackClusterEventListAttribute if supported, nil otherwise. - */ -- (MCMediaPlaybackClusterEventListAttribute * _Nullable)eventListAttribute; - /** * @brief Returns non-nil pointer to MCMediaPlaybackClusterAttributeListAttribute if supported, nil otherwise. */ @@ -563,11 +538,6 @@ */ - (MCKeypadInputClusterAcceptedCommandListAttribute * _Nullable)acceptedCommandListAttribute; -/** - * @brief Returns non-nil pointer to MCKeypadInputClusterEventListAttribute if supported, nil otherwise. - */ -- (MCKeypadInputClusterEventListAttribute * _Nullable)eventListAttribute; - /** * @brief Returns non-nil pointer to MCKeypadInputClusterAttributeListAttribute if supported, nil otherwise. */ @@ -622,11 +592,6 @@ */ - (MCContentLauncherClusterAcceptedCommandListAttribute * _Nullable)acceptedCommandListAttribute; -/** - * @brief Returns non-nil pointer to MCContentLauncherClusterEventListAttribute if supported, nil otherwise. - */ -- (MCContentLauncherClusterEventListAttribute * _Nullable)eventListAttribute; - /** * @brief Returns non-nil pointer to MCContentLauncherClusterAttributeListAttribute if supported, nil otherwise. */ @@ -686,11 +651,6 @@ */ - (MCApplicationLauncherClusterAcceptedCommandListAttribute * _Nullable)acceptedCommandListAttribute; -/** - * @brief Returns non-nil pointer to MCApplicationLauncherClusterEventListAttribute if supported, nil otherwise. - */ -- (MCApplicationLauncherClusterEventListAttribute * _Nullable)eventListAttribute; - /** * @brief Returns non-nil pointer to MCApplicationLauncherClusterAttributeListAttribute if supported, nil otherwise. */ @@ -765,11 +725,6 @@ */ - (MCApplicationBasicClusterAcceptedCommandListAttribute * _Nullable)acceptedCommandListAttribute; -/** - * @brief Returns non-nil pointer to MCApplicationBasicClusterEventListAttribute if supported, nil otherwise. - */ -- (MCApplicationBasicClusterEventListAttribute * _Nullable)eventListAttribute; - /** * @brief Returns non-nil pointer to MCApplicationBasicClusterAttributeListAttribute if supported, nil otherwise. */ diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.mm index 8c51871a2c..8d05bd52ed 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.mm +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.mm @@ -115,12 +115,6 @@ - (id)acceptedCommandListAttribute return cppAttribute != nil ? [[MCOnOffClusterAcceptedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; } -- (id)eventListAttribute -{ - void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::OnOff::Attributes::EventList::Id); - return cppAttribute != nil ? [[MCOnOffClusterEventListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; -} - - (id)attributeListAttribute { void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::OnOff::Attributes::AttributeList::Id); @@ -298,12 +292,6 @@ - (id)acceptedCommandListAttribute return cppAttribute != nil ? [[MCLevelControlClusterAcceptedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; } -- (id)eventListAttribute -{ - void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::EventList::Id); - return cppAttribute != nil ? [[MCLevelControlClusterEventListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; -} - - (id)attributeListAttribute { void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::LevelControl::Attributes::AttributeList::Id); @@ -355,12 +343,6 @@ - (id)acceptedCommandListAttribute return cppAttribute != nil ? [[MCWakeOnLanClusterAcceptedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; } -- (id)eventListAttribute -{ - void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::WakeOnLan::Attributes::EventList::Id); - return cppAttribute != nil ? [[MCWakeOnLanClusterEventListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; -} - - (id)attributeListAttribute { void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::WakeOnLan::Attributes::AttributeList::Id); @@ -418,12 +400,6 @@ - (id)acceptedCommandListAttribute return cppAttribute != nil ? [[MCTargetNavigatorClusterAcceptedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; } -- (id)eventListAttribute -{ - void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::TargetNavigator::Attributes::EventList::Id); - return cppAttribute != nil ? [[MCTargetNavigatorClusterEventListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; -} - - (id)attributeListAttribute { void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::TargetNavigator::Attributes::AttributeList::Id); @@ -613,12 +589,6 @@ - (id)acceptedCommandListAttribute return cppAttribute != nil ? [[MCMediaPlaybackClusterAcceptedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; } -- (id)eventListAttribute -{ - void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::EventList::Id); - return cppAttribute != nil ? [[MCMediaPlaybackClusterEventListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; -} - - (id)attributeListAttribute { void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::MediaPlayback::Attributes::AttributeList::Id); @@ -664,12 +634,6 @@ - (id)acceptedCommandListAttribute return cppAttribute != nil ? [[MCKeypadInputClusterAcceptedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; } -- (id)eventListAttribute -{ - void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::KeypadInput::Attributes::EventList::Id); - return cppAttribute != nil ? [[MCKeypadInputClusterEventListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; -} - - (id)attributeListAttribute { void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::KeypadInput::Attributes::AttributeList::Id); @@ -733,12 +697,6 @@ - (id)acceptedCommandListAttribute return cppAttribute != nil ? [[MCContentLauncherClusterAcceptedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; } -- (id)eventListAttribute -{ - void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ContentLauncher::Attributes::EventList::Id); - return cppAttribute != nil ? [[MCContentLauncherClusterEventListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; -} - - (id)attributeListAttribute { void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ContentLauncher::Attributes::AttributeList::Id); @@ -808,12 +766,6 @@ - (id)acceptedCommandListAttribute return cppAttribute != nil ? [[MCApplicationLauncherClusterAcceptedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; } -- (id)eventListAttribute -{ - void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationLauncher::Attributes::EventList::Id); - return cppAttribute != nil ? [[MCApplicationLauncherClusterEventListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; -} - - (id)attributeListAttribute { void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationLauncher::Attributes::AttributeList::Id); @@ -901,12 +853,6 @@ - (id)acceptedCommandListAttribute return cppAttribute != nil ? [[MCApplicationBasicClusterAcceptedCommandListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; } -- (id)eventListAttribute -{ - void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationBasic::Attributes::EventList::Id); - return cppAttribute != nil ? [[MCApplicationBasicClusterEventListAttribute alloc] initWithCppAttribute:cppAttribute] : nil; -} - - (id)attributeListAttribute { void * cppAttribute = self.cppCluster->GetAttribute(chip::app::Clusters::ApplicationBasic::Attributes::AttributeList::Id); diff --git a/examples/tv-casting-app/darwin/args.gni b/examples/tv-casting-app/darwin/args.gni index 1158e98e5f..10b02842ff 100644 --- a/examples/tv-casting-app/darwin/args.gni +++ b/examples/tv-casting-app/darwin/args.gni @@ -14,17 +14,14 @@ import("//build_overrides/chip.gni") -import("${chip_root}/config/ios/args.gni") +import("${chip_root}/config/darwin/args.gni") chip_device_project_config_include = "" -chip_project_config_include = "" -chip_system_project_config_include = "" -chip_project_config_include_dirs += [ +chip_project_config_include_dirs = [ "${chip_root}/examples/tv-casting-app/tv-casting-common/include", "${chip_root}/examples/tv-casting-app/tv-casting-common", ] -chip_project_config_include_dirs += [ "${chip_root}/config/ios" ] chip_build_libshell = true diff --git a/examples/tv-casting-app/linux/simple-app-helper.cpp b/examples/tv-casting-app/linux/simple-app-helper.cpp index 115fe9f786..f354aa094f 100644 --- a/examples/tv-casting-app/linux/simple-app-helper.cpp +++ b/examples/tv-casting-app/linux/simple-app-helper.cpp @@ -289,7 +289,7 @@ void ConnectionHandler(CHIP_ERROR err, matter::casting::core::CastingPlayer * ca kDesiredEndpointVendorId); } - ChipLogProgress(AppServer, "simple-app-helper.cpp::ConnectionHandler(): Getting endpoints avaiable for demo interactions"); + ChipLogProgress(AppServer, "simple-app-helper.cpp::ConnectionHandler(): Getting endpoints available for demo interactions"); std::vector> endpoints = castingPlayer->GetEndpoints(); LogEndpointsDetails(endpoints); @@ -450,6 +450,9 @@ CHIP_ERROR CommandHandler(int argc, char ** argv) targetCastingPlayer->VerifyOrEstablishConnection(connectionCallbacks, matter::casting::core::kCommissioningWindowTimeoutSec, idOptions); + ChipLogProgress(AppServer, "CommandHandler() request, VerifyOrEstablishConnection() called, calling StopDiscovery()"); + // Stop discovery since we have discovered, and are now connecting to the desired CastingPlayer. + matter::casting::core::CastingPlayerDiscovery::GetInstance()->StopDiscovery(); return CHIP_NO_ERROR; } if (strcmp(argv[0], "setcommissionerpasscode") == 0) diff --git a/examples/tv-casting-app/tv-casting-common/core/CastingPlayer.cpp b/examples/tv-casting-app/tv-casting-common/core/CastingPlayer.cpp index 83fc6b4b56..37d442f714 100644 --- a/examples/tv-casting-app/tv-casting-common/core/CastingPlayer.cpp +++ b/examples/tv-casting-app/tv-casting-common/core/CastingPlayer.cpp @@ -380,10 +380,10 @@ chip::Inet::IPAddress * CastingPlayer::GetIpAddressForUDCRequest() void CastingPlayer::FindOrEstablishSession(void * clientContext, chip::OnDeviceConnected onDeviceConnected, chip::OnDeviceConnectionFailure onDeviceConnectionFailure) { - ChipLogProgress(AppServer, "CastingPlayer.FindOrEstablishSession called on nodeId=0x" ChipLogFormatX64 " fabricIndex=%d", + ChipLogProgress(AppServer, "CastingPlayer::FindOrEstablishSession() called on nodeId=0x" ChipLogFormatX64 " fabricIndex=%d", ChipLogValueX64(mAttributes.nodeId), mAttributes.fabricIndex); VerifyOrReturn(mAttributes.nodeId != 0 && mAttributes.fabricIndex != 0, - ChipLogError(AppServer, "CastingPlayer.FindOrEstablishSession called on invalid nodeId/fabricIndex")); + ChipLogError(AppServer, "CastingPlayer::FindOrEstablishSession() called on invalid nodeId/fabricIndex")); ConnectionContext * connectionContext = new ConnectionContext(clientContext, this, onDeviceConnected, onDeviceConnectionFailure); diff --git a/examples/tv-casting-app/tv-casting-common/core/CommissionerDeclarationHandler.cpp b/examples/tv-casting-app/tv-casting-common/core/CommissionerDeclarationHandler.cpp index c89b899bf5..a54d1013d3 100644 --- a/examples/tv-casting-app/tv-casting-common/core/CommissionerDeclarationHandler.cpp +++ b/examples/tv-casting-app/tv-casting-common/core/CommissionerDeclarationHandler.cpp @@ -38,18 +38,24 @@ CommissionerDeclarationHandler * CommissionerDeclarationHandler::GetInstance() return sCommissionerDeclarationHandler_; } -// TODO: In the following PRs. Implement setHandler() for CommissionerDeclaration messages and expose messages to higher layers for -// Linux, Android and iOS. void CommissionerDeclarationHandler::OnCommissionerDeclarationMessage( const chip::Transport::PeerAddress & source, chip::Protocols::UserDirectedCommissioning::CommissionerDeclaration cd) { - ChipLogProgress(AppServer, - "CommissionerDeclarationHandler::OnCommissionerDeclarationMessage(), calling CloseCommissioningWindow()"); - // Close the commissioning window. Since we recived a CommissionerDeclaration message from the Commissioner, we know that - // commissioning via AccountLogin cluster failed. We will open a new commissioningWindow prior to sending the next - // IdentificationDeclaration Message to the Commissioner. - chip::Server::GetInstance().GetCommissioningWindowManager().CloseCommissioningWindow(); - support::ChipDeviceEventHandler::SetUdcStatus(false); + ChipLogProgress(AppServer, "CommissionerDeclarationHandler::OnCommissionerDeclarationMessage()"); + + // During UDC with CastingPlayer/Commissioner-Generated Passcode, the Commissioner responds with a CommissionerDeclaration + // message with CommissionerPasscode set to true. The CommissionerPasscode flag indicates that a Passcode is now displayed for + // the user by the CastingPlayer /Commissioner. With this CommissionerDeclaration message, we also know that commissioning via + // AccountLogin cluster has failed. Therefore, we close the commissioning window. We will open a new commissioning window prior + // to sending the next/2nd IdentificationDeclaration message to the Commissioner. + if (cd.GetCommissionerPasscode()) + { + ChipLogProgress(AppServer, + "CommissionerDeclarationHandler::OnCommissionerDeclarationMessage(), calling CloseCommissioningWindow()"); + // Close the commissioning window. + chip::Server::GetInstance().GetCommissioningWindowManager().CloseCommissioningWindow(); + support::ChipDeviceEventHandler::SetUdcStatus(false); + } // Flag to indicate when the CastingPlayer/Commissioner user has decided to exit the commissioning process. if (cd.GetCancelPasscode()) @@ -57,6 +63,9 @@ void CommissionerDeclarationHandler::OnCommissionerDeclarationMessage( ChipLogProgress(AppServer, "CommissionerDeclarationHandler::OnCommissionerDeclarationMessage(), Got CancelPasscode parameter, " "CastingPlayer/Commissioner user has decided to exit the commissioning attempt. Connection aborted."); + // Close the commissioning window. + chip::Server::GetInstance().GetCommissioningWindowManager().CloseCommissioningWindow(); + support::ChipDeviceEventHandler::SetUdcStatus(false); // Since the CastingPlayer/Commissioner user has decided to exit the commissioning process, we cancel the ongoing // connection attempt without notifying the CastingPlayer/Commissioner. Therefore the // shouldSendIdentificationDeclarationMessage flag in the internal StopConnecting() API call is set to false. The @@ -65,12 +74,7 @@ void CommissionerDeclarationHandler::OnCommissionerDeclarationMessage( // and user 2 might be controlling the CastingPlayer/Commissioner TV. CastingPlayer * targetCastingPlayer = CastingPlayer::GetTargetCastingPlayer(); // Avoid crashing if we recieve this CommissionerDeclaration message when targetCastingPlayer is nullptr. - if (targetCastingPlayer == nullptr) - { - ChipLogError(AppServer, - "CommissionerDeclarationHandler::OnCommissionerDeclarationMessage() targetCastingPlayer is nullptr"); - } - else + if (targetCastingPlayer != nullptr) { CHIP_ERROR err = targetCastingPlayer->StopConnecting(false); if (err != CHIP_NO_ERROR) @@ -82,6 +86,11 @@ void CommissionerDeclarationHandler::OnCommissionerDeclarationMessage( err.Format()); } } + else + { + ChipLogError(AppServer, + "CommissionerDeclarationHandler::OnCommissionerDeclarationMessage() targetCastingPlayer is nullptr"); + } } if (mCmmissionerDeclarationCallback_) diff --git a/examples/tv-casting-app/tv-casting-common/core/Endpoint.h b/examples/tv-casting-app/tv-casting-common/core/Endpoint.h index 734f1e3d5a..85e67dbfe9 100644 --- a/examples/tv-casting-app/tv-casting-common/core/Endpoint.h +++ b/examples/tv-casting-app/tv-casting-common/core/Endpoint.h @@ -105,7 +105,6 @@ class Endpoint : public std::enable_shared_from_this */ std::vector GetServerList() { - ChipLogProgress(AppServer, "Endpoint::GetServerList() mClusters.size(): %d", static_cast(mClusters.size())); std::vector serverList; for (auto const & cluster : mClusters) { @@ -123,7 +122,6 @@ class Endpoint : public std::enable_shared_from_this template void RegisterCluster(const chip::ClusterId clusterId) { - ChipLogProgress(AppServer, "Endpoint::RegisterCluster() Registering clusterId %d for endpointId %d", clusterId, GetId()); static_assert(std::is_base_of::value, "T must be derived from BaseCluster"); auto cluster = std::make_shared(shared_from_this()); cluster->SetUp(); @@ -137,7 +135,6 @@ class Endpoint : public std::enable_shared_from_this memory::Strong GetCluster() { static_assert(std::is_base_of::value, "T must be derived from BaseCluster"); - ChipLogProgress(AppServer, "Endpoint::GetCluster() mClusters.size(): %d", static_cast(mClusters.size())); for (const auto & pair : mClusters) { auto cluster = std::dynamic_pointer_cast(pair.second); @@ -151,8 +148,8 @@ class Endpoint : public std::enable_shared_from_this void LogDetail() const { - ChipLogProgress(AppServer, "Endpoint::LogDetail() Endpoint ID: %d, Vendor ID: %d, Product ID: %d", mAttributes.mId, - mAttributes.mVendorId, mAttributes.mProductId); + ChipLogProgress(AppServer, "Endpoint::LogDetail() Endpoint ID: %d, Vendor ID: %d, Product ID: %d, Clusters: %d", + mAttributes.mId, mAttributes.mVendorId, mAttributes.mProductId, static_cast(mClusters.size())); } }; diff --git a/examples/tv-casting-app/tv-casting-common/include/CHIPProjectAppConfig.h b/examples/tv-casting-app/tv-casting-common/include/CHIPProjectAppConfig.h index f5887bc382..0e9ccf7d67 100644 --- a/examples/tv-casting-app/tv-casting-common/include/CHIPProjectAppConfig.h +++ b/examples/tv-casting-app/tv-casting-common/include/CHIPProjectAppConfig.h @@ -92,4 +92,6 @@ // Include the CHIPProjectConfig from config/standalone // Add this at the end so that we can hit our #defines first +#ifndef CHIP_DEVICE_LAYER_TARGET_DARWIN #include +#endif // CHIP_DEVICE_LAYER_TARGET_DARWIN diff --git a/examples/tv-casting-app/tv-casting-common/include/MediaCommandBase.h b/examples/tv-casting-app/tv-casting-common/include/MediaCommandBase.h index 87ddf70ef2..d3d03b1a24 100644 --- a/examples/tv-casting-app/tv-casting-common/include/MediaCommandBase.h +++ b/examples/tv-casting-app/tv-casting-common/include/MediaCommandBase.h @@ -32,7 +32,7 @@ class MediaCommandBase : public MediaBase VerifyOrDieWithMsg(mTargetVideoPlayerInfo != nullptr, AppServer, "Target unknown"); auto deviceProxy = mTargetVideoPlayerInfo->GetOperationalDeviceProxy(); - ReturnErrorCodeIf(deviceProxy == nullptr || !deviceProxy->ConnectionReady(), CHIP_ERROR_PEER_NODE_NOT_FOUND); + VerifyOrReturnError(deviceProxy != nullptr && deviceProxy->ConnectionReady(), CHIP_ERROR_PEER_NODE_NOT_FOUND); sResponseCallback = responseCallback; diff --git a/examples/tv-casting-app/tv-casting-common/include/MediaReadBase.h b/examples/tv-casting-app/tv-casting-common/include/MediaReadBase.h index e7e99e3d7e..ba896739d6 100644 --- a/examples/tv-casting-app/tv-casting-common/include/MediaReadBase.h +++ b/examples/tv-casting-app/tv-casting-common/include/MediaReadBase.h @@ -32,7 +32,7 @@ class MediaReadBase : public MediaBase VerifyOrDieWithMsg(mTargetVideoPlayerInfo != nullptr, AppServer, "Target unknown"); auto deviceProxy = mTargetVideoPlayerInfo->GetOperationalDeviceProxy(); - ReturnErrorCodeIf(deviceProxy == nullptr || !deviceProxy->ConnectionReady(), CHIP_ERROR_PEER_NODE_NOT_FOUND); + VerifyOrReturnError(deviceProxy != nullptr && deviceProxy->ConnectionReady(), CHIP_ERROR_PEER_NODE_NOT_FOUND); MediaClusterBase cluster(*deviceProxy->GetExchangeManager(), deviceProxy->GetSecureSession().Value(), mTvEndpoint); diff --git a/examples/tv-casting-app/tv-casting-common/include/MediaSubscriptionBase.h b/examples/tv-casting-app/tv-casting-common/include/MediaSubscriptionBase.h index 65b91b175f..caf6e5da71 100644 --- a/examples/tv-casting-app/tv-casting-common/include/MediaSubscriptionBase.h +++ b/examples/tv-casting-app/tv-casting-common/include/MediaSubscriptionBase.h @@ -33,7 +33,7 @@ class MediaSubscriptionBase : public MediaBase VerifyOrDieWithMsg(mTargetVideoPlayerInfo != nullptr, AppServer, "Target unknown"); auto deviceProxy = mTargetVideoPlayerInfo->GetOperationalDeviceProxy(); - ReturnErrorCodeIf(deviceProxy == nullptr || !deviceProxy->ConnectionReady(), CHIP_ERROR_PEER_NODE_NOT_FOUND); + VerifyOrReturnError(deviceProxy != nullptr && deviceProxy->ConnectionReady(), CHIP_ERROR_PEER_NODE_NOT_FOUND); MediaClusterBase cluster(*deviceProxy->GetExchangeManager(), deviceProxy->GetSecureSession().Value(), mTvEndpoint); diff --git a/examples/tv-casting-app/tv-casting-common/support/CastingStore.cpp b/examples/tv-casting-app/tv-casting-common/support/CastingStore.cpp index 93bd00616d..1ddf40a9b2 100644 --- a/examples/tv-casting-app/tv-casting-common/support/CastingStore.cpp +++ b/examples/tv-casting-app/tv-casting-common/support/CastingStore.cpp @@ -78,8 +78,9 @@ std::vector CastingStore::ReadAll() size_t castingStoreDataSize = 0; err = chip::DeviceLayer::PersistedStorage::KeyValueStoreMgr().Get(kCastingStoreDataKey, castingStoreData, kCastingStoreDataMaxBytes, &castingStoreDataSize); - VerifyOrReturnValue(err == CHIP_NO_ERROR, std::vector(), - ChipLogError(AppServer, "KeyValueStoreMgr.Get failed %" CHIP_ERROR_FORMAT, err.Format())); + VerifyOrReturnValue( + err == CHIP_NO_ERROR, std::vector(), + ChipLogError(AppServer, "CastingStore::ReadAll() KeyValueStoreMgr.Get failed %" CHIP_ERROR_FORMAT, err.Format())); ChipLogProgress(AppServer, "CastingStore::ReadAll() Read TLV(CastingStoreData) from KVS store with size: %lu bytes", static_cast(castingStoreDataSize)); @@ -252,6 +253,9 @@ std::vector CastingStore::ReadAll() if (endpointContainerTagNum == kCastingPlayerEndpointIdTag) { err = reader.Get(endpointAttributes.mId); + // Log which endpoints we cached. + ChipLogProgress(AppServer, "CastingStore::ReadAll() Endpoints container endpointAttributes.mId: %d", + endpointAttributes.mId); VerifyOrReturnValue(err == CHIP_NO_ERROR, std::vector(), ChipLogError(AppServer, "TLVReader.Get failed %" CHIP_ERROR_FORMAT, err.Format())); continue; @@ -475,7 +479,7 @@ CHIP_ERROR CastingStore::WriteAll(std::vector castingPlayer for (auto & castingPlayer : castingPlayers) { - ChipLogProgress(AppServer, "CastingStore::WriteAll() writing castingPlayer:"); + ChipLogProgress(AppServer, "CastingStore::WriteAll() writing CastingPlayer:"); chip::TLV::TLVType castingPlayerContainerType; // CastingPlayer container starts ReturnErrorOnFailure( @@ -547,7 +551,8 @@ CHIP_ERROR CastingStore::WriteAll(std::vector castingPlayer ReturnErrorOnFailure(tlvWriter.StartContainer(chip::TLV::ContextTag(kCastingPlayerEndpointServerListContainerTag), chip::TLV::kTLVType_Structure, serverListContainerType)); std::vector serverList = endpoint->GetServerList(); - ChipLogProgress(AppServer, "CastingStore::WriteAll() writing CastingPlayer Endpoint ServerList:"); + ChipLogProgress(AppServer, "CastingStore::WriteAll() writing CastingPlayer Endpoint ID: %d ServerList.size(): %d", + endpoint->GetId(), static_cast(serverList.size())); for (chip::ClusterId clusterId : serverList) { ChipLogProgress(AppServer, "CastingStore::WriteAll() clusterId: %d", clusterId); @@ -586,7 +591,7 @@ CHIP_ERROR CastingStore::DeleteAll() CHIP_ERROR err = chip::DeviceLayer::PersistedStorage::KeyValueStoreMgr().Delete(kCastingStoreDataKey); if (err == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND) // no error, if the key-value pair was not stored { - ChipLogProgress(AppServer, "CastingStore::DeleteAll ignoring error %" CHIP_ERROR_FORMAT, err.Format()); + ChipLogProgress(AppServer, "CastingStore::DeleteAll() ignoring error %" CHIP_ERROR_FORMAT, err.Format()); return CHIP_NO_ERROR; } return err; @@ -594,7 +599,7 @@ CHIP_ERROR CastingStore::DeleteAll() CHIP_ERROR CastingStore::Delete(core::CastingPlayer castingPlayer) { - ChipLogProgress(AppServer, "CastingStore::Delete"); + ChipLogProgress(AppServer, "CastingStore::Delete()"); // Read cache of CastingPlayers std::vector castingPlayers = ReadAll(); @@ -608,7 +613,7 @@ CHIP_ERROR CastingStore::Delete(core::CastingPlayer castingPlayer) if (it != castingPlayers.end()) { - ChipLogProgress(AppServer, "CastingStore::Delete deleting CastingPlayer %s from CastingStore cache", it->GetId()); + ChipLogProgress(AppServer, "CastingStore::Delete() deleting CastingPlayer %s from CastingStore cache", it->GetId()); castingPlayers.erase(it); return WriteAll(castingPlayers); } @@ -618,7 +623,7 @@ CHIP_ERROR CastingStore::Delete(core::CastingPlayer castingPlayer) void CastingStore::OnFabricRemoved(const chip::FabricTable & fabricTable, chip::FabricIndex fabricIndex) { - ChipLogProgress(AppServer, "CastingStore::OnFabricRemoved"); + ChipLogProgress(AppServer, "CastingStore::OnFabricRemoved()"); // Read cache of CastingPlayers std::vector castingPlayers = ReadAll(); @@ -633,12 +638,15 @@ void CastingStore::OnFabricRemoved(const chip::FabricTable & fabricTable, chip:: if (it != castingPlayers.end()) { - ChipLogProgress(AppServer, "CastingStore::OnFabricRemoved deleting CastingPlayer %s from CastingStore cache", + ChipLogProgress(AppServer, "CastingStore::OnFabricRemoved() deleting CastingPlayer %s from CastingStore cache", it->GetId()); castingPlayers.erase(it); WriteAll(castingPlayers); } } + CHIP_ERROR err = chip::Server::GetInstance().GetSessionResumptionStorage()->DeleteAll(fabricIndex); + ChipLogProgress(AppServer, "CastingStore::OnFabricRemoved() SessionResumptionStorage.DeleteAll(%d) status %" CHIP_ERROR_FORMAT, + fabricIndex, err.Format()); } }; // namespace support diff --git a/examples/tv-casting-app/tv-casting-common/support/ChipDeviceEventHandler.cpp b/examples/tv-casting-app/tv-casting-common/support/ChipDeviceEventHandler.cpp index cf8ca82366..f027c8d1c4 100644 --- a/examples/tv-casting-app/tv-casting-common/support/ChipDeviceEventHandler.cpp +++ b/examples/tv-casting-app/tv-casting-common/support/ChipDeviceEventHandler.cpp @@ -62,6 +62,7 @@ void ChipDeviceEventHandler::Handle(const chip::DeviceLayer::ChipDeviceEvent * e CastingPlayer::GetTargetCastingPlayer()->SetNodeId(targetNodeId); CastingPlayer::GetTargetCastingPlayer()->SetFabricIndex(targetFabricIndex); + ChipLogProgress(AppServer, "ChipDeviceEventHandler::Handle() calling FindOrEstablishSession()"); CastingPlayer::GetTargetCastingPlayer()->FindOrEstablishSession( nullptr, [](void * context, chip::Messaging::ExchangeManager & exchangeMgr, const chip::SessionHandle & sessionHandle) { @@ -144,12 +145,12 @@ void ChipDeviceEventHandler::HandleBindingsChangedViaCluster(const chip::DeviceL bool & runPostCommissioning, chip::NodeId & targetNodeId, chip::FabricIndex & targetFabricIndex) { - ChipLogProgress(AppServer, "ChipDeviceEventHandler::HandleBindingsChangedViaCluster called"); + ChipLogProgress(AppServer, "ChipDeviceEventHandler::HandleBindingsChangedViaCluster() called"); if (CastingPlayer::GetTargetCastingPlayer()->IsConnected()) { // re-use existing nodeId and fabricIndex - ChipLogProgress(AppServer, "ChipDeviceEventHandler::HandleBindingsChangedViaCluster already connected to video player"); + ChipLogProgress(AppServer, "ChipDeviceEventHandler::HandleBindingsChangedViaCluster() already connected to video player"); runPostCommissioning = true; targetNodeId = CastingPlayer::GetTargetCastingPlayer()->GetNodeId(); targetFabricIndex = CastingPlayer::GetTargetCastingPlayer()->GetFabricIndex(); @@ -159,7 +160,7 @@ void ChipDeviceEventHandler::HandleBindingsChangedViaCluster(const chip::DeviceL else if (sUdcInProgress) { ChipLogProgress(AppServer, - "ChipDeviceEventHandler::HandleBindingsChangedViaCluster UDC is in progress while handling " + "ChipDeviceEventHandler::HandleBindingsChangedViaCluster() UDC is in progress while handling " "kBindingsChangedViaCluster with " "fabricIndex: %d", event->BindingsChanged.fabricIndex); @@ -170,7 +171,7 @@ void ChipDeviceEventHandler::HandleBindingsChangedViaCluster(const chip::DeviceL for (const auto & binding : chip::BindingTable::GetInstance()) { ChipLogProgress(AppServer, - "ChipDeviceEventHandler::HandleBindingsChangedViaCluster Read cached binding type=%d fabrixIndex=%d " + "ChipDeviceEventHandler::HandleBindingsChangedViaCluster() Read cached binding type=%d fabrixIndex=%d " "nodeId=0x" ChipLogFormatX64 " groupId=%d local endpoint=%d remote endpoint=%d cluster=" ChipLogFormatMEI, binding.type, binding.fabricIndex, ChipLogValueX64(binding.nodeId), binding.groupId, binding.local, @@ -178,7 +179,7 @@ void ChipDeviceEventHandler::HandleBindingsChangedViaCluster(const chip::DeviceL if (binding.type == MATTER_UNICAST_BINDING && event->BindingsChanged.fabricIndex == binding.fabricIndex) { ChipLogProgress(AppServer, - "ChipDeviceEventHandler::HandleBindingsChangedViaCluster Matched accessingFabricIndex with " + "ChipDeviceEventHandler::HandleBindingsChangedViaCluster() Matched accessingFabricIndex with " "nodeId=0x" ChipLogFormatX64, ChipLogValueX64(binding.nodeId)); targetNodeId = binding.nodeId; @@ -190,9 +191,10 @@ void ChipDeviceEventHandler::HandleBindingsChangedViaCluster(const chip::DeviceL if (targetNodeId == 0 && runPostCommissioning == false) { - ChipLogError(AppServer, - "ChipDeviceEventHandler::HandleBindingsChangedViaCluster accessingFabricIndex: %d did not match bindings", - event->BindingsChanged.fabricIndex); + ChipLogError( + AppServer, + "ChipDeviceEventHandler::HandleBindingsChangedViaCluster() accessingFabricIndex: %d did not match bindings", + event->BindingsChanged.fabricIndex); CastingPlayer::GetTargetCastingPlayer()->mOnCompleted(CHIP_ERROR_INCORRECT_STATE, CastingPlayer::GetTargetCastingPlayer()); return; @@ -204,7 +206,7 @@ void ChipDeviceEventHandler::HandleCommissioningComplete(const chip::DeviceLayer bool & runPostCommissioning, chip::NodeId & targetNodeId, chip::FabricIndex & targetFabricIndex) { - ChipLogProgress(AppServer, "ChipDeviceEventHandler::HandleCommissioningComplete called"); + ChipLogProgress(AppServer, "ChipDeviceEventHandler::HandleCommissioningComplete() called"); sUdcInProgress = false; targetNodeId = event->CommissioningComplete.nodeId; targetFabricIndex = event->CommissioningComplete.fabricIndex; diff --git a/examples/tv-casting-app/tv-casting-common/support/EndpointListLoader.cpp b/examples/tv-casting-app/tv-casting-common/support/EndpointListLoader.cpp index 44e76f628b..a54c4ddc59 100644 --- a/examples/tv-casting-app/tv-casting-common/support/EndpointListLoader.cpp +++ b/examples/tv-casting-app/tv-casting-common/support/EndpointListLoader.cpp @@ -51,9 +51,17 @@ void EndpointListLoader::Initialize(chip::Messaging::ExchangeManager * exchangeM mExchangeMgr = exchangeMgr; mSessionHandle = sessionHandle; + chip::NodeId targetCastingPlayerNodeId = CastingPlayer::GetTargetCastingPlayer()->GetNodeId(); + chip::FabricIndex targetCastingPlayerFabricIndex = CastingPlayer::GetTargetCastingPlayer()->GetFabricIndex(); + ChipLogProgress(AppServer, + "EndpointListLoader::Initialize() targetCastingPlayerNodeId: 0x" ChipLogFormatX64 + ", targetCastingPlayerFabricIndex: %d", + ChipLogValueX64(targetCastingPlayerNodeId), targetCastingPlayerFabricIndex); + for (const auto & binding : chip::BindingTable::GetInstance()) { - if (binding.type == MATTER_UNICAST_BINDING && CastingPlayer::GetTargetCastingPlayer()->GetNodeId() == binding.nodeId) + if (binding.type == MATTER_UNICAST_BINDING && targetCastingPlayerNodeId == binding.nodeId && + targetCastingPlayerFabricIndex == binding.fabricIndex) { // check to see if we discovered a new endpoint in the bindings chip::EndpointId endpointId = binding.remote; @@ -66,6 +74,8 @@ void EndpointListLoader::Initialize(chip::Messaging::ExchangeManager * exchangeM } } } + ChipLogProgress(AppServer, "EndpointListLoader::Initialize() mNewEndpointsToLoad++, mNewEndpointsToLoad: %lu", + mNewEndpointsToLoad); mPendingAttributeReads = mNewEndpointsToLoad * kTotalDesiredAttributes; mEndpointAttributesList = new EndpointAttributes[mNewEndpointsToLoad]; @@ -78,16 +88,24 @@ CHIP_ERROR EndpointListLoader::Load() VerifyOrReturnError(CastingPlayer::GetTargetCastingPlayer() != nullptr, CHIP_ERROR_INCORRECT_STATE); + chip::NodeId targetCastingPlayerNodeId = CastingPlayer::GetTargetCastingPlayer()->GetNodeId(); + chip::FabricIndex targetCastingPlayerFabricIndex = CastingPlayer::GetTargetCastingPlayer()->GetFabricIndex(); + ChipLogProgress(AppServer, + "EndpointListLoader::Load() targetCastingPlayerNodeId: 0x" ChipLogFormatX64 + ", targetCastingPlayerFabricIndex: %d", + ChipLogValueX64(targetCastingPlayerNodeId), targetCastingPlayerFabricIndex); + int endpointIndex = -1; bool isLoadingRequired = false; for (const auto & binding : chip::BindingTable::GetInstance()) { ChipLogProgress(AppServer, - "Binding type=%d fab=%d nodeId=0x" ChipLogFormatX64 + "EndpointListLoader::Load() Binding type=%d fab=%d nodeId=0x" ChipLogFormatX64 " groupId=%d local endpoint=%d remote endpoint=%d cluster=" ChipLogFormatMEI, binding.type, binding.fabricIndex, ChipLogValueX64(binding.nodeId), binding.groupId, binding.local, binding.remote, ChipLogValueMEI(binding.clusterId.value_or(0))); - if (binding.type == MATTER_UNICAST_BINDING && CastingPlayer::GetTargetCastingPlayer()->GetNodeId() == binding.nodeId) + if (binding.type == MATTER_UNICAST_BINDING && targetCastingPlayerNodeId == binding.nodeId && + targetCastingPlayerFabricIndex == binding.fabricIndex) { // if we discovered a new Endpoint from the bindings, read its EndpointAttributes chip::EndpointId endpointId = binding.remote; @@ -98,7 +116,8 @@ CHIP_ERROR EndpointListLoader::Load() }) == endpoints.end()) { // Read attributes and mEndpointAttributesList for (endpointIndex + 1) - ChipLogProgress(AppServer, "EndpointListLoader::Load Reading attributes for endpointId %d", endpointId); + ChipLogProgress(AppServer, "EndpointListLoader::Load() Reading attributes for endpointId: %d, on fabricIndex: %d", + endpointId, binding.fabricIndex); isLoadingRequired = true; mEndpointAttributesList[++endpointIndex].mId = endpointId; ReadVendorId(&mEndpointAttributesList[endpointIndex]); @@ -121,7 +140,7 @@ CHIP_ERROR EndpointListLoader::Load() void EndpointListLoader::Complete() { - ChipLogProgress(AppServer, "EndpointListLoader::Complete called with mPendingAttributeReads %lu", mPendingAttributeReads); + ChipLogProgress(AppServer, "EndpointListLoader::Complete() called with mPendingAttributeReads: %lu", mPendingAttributeReads); if (mPendingAttributeReads > 0) { mPendingAttributeReads--; @@ -161,7 +180,7 @@ void EndpointListLoader::Complete() // callback client OnCompleted VerifyOrReturn(CastingPlayer::GetTargetCastingPlayer()->mOnCompleted, - ChipLogError(AppServer, "EndpointListLoader::Complete mOnCompleted() not found")); + ChipLogError(AppServer, "EndpointListLoader::Complete() mOnCompleted() not found")); CastingPlayer::GetTargetCastingPlayer()->mOnCompleted(CHIP_NO_ERROR, CastingPlayer::GetTargetCastingPlayer()); } } @@ -180,7 +199,8 @@ CHIP_ERROR EndpointListLoader::ReadVendorId(EndpointAttributes * endpointAttribu }, [](void * context, CHIP_ERROR err) { EndpointAttributes * _endpointAttributes = static_cast(context); - ChipLogError(AppServer, "EndpointListLoader ReadAttribute(VendorID) failed for endpointID %d. Err: %" CHIP_ERROR_FORMAT, + ChipLogError(AppServer, + "EndpointListLoader::ReadAttribute(VendorID) failed for endpointID %d. Err: %" CHIP_ERROR_FORMAT, _endpointAttributes->mId, err.Format()); EndpointListLoader::GetInstance()->Complete(); }); @@ -201,7 +221,7 @@ CHIP_ERROR EndpointListLoader::ReadProductId(EndpointAttributes * endpointAttrib [](void * context, CHIP_ERROR err) { EndpointAttributes * _endpointAttributes = static_cast(context); ChipLogError(AppServer, - "EndpointListLoader ReadAttribute(ProductID) failed for endpointID %d. Err: %" CHIP_ERROR_FORMAT, + "EndpointListLoader::ReadAttribute(ProductID) failed for endpointID %d. Err: %" CHIP_ERROR_FORMAT, _endpointAttributes->mId, err.Format()); EndpointListLoader::GetInstance()->Complete(); }); @@ -227,7 +247,7 @@ CHIP_ERROR EndpointListLoader::ReadDeviceTypeList(EndpointAttributes * endpointA [](void * context, CHIP_ERROR err) { EndpointAttributes * _endpointAttributes = static_cast(context); ChipLogError(AppServer, - "EndpointListLoader ReadAttribute(DeviceTypeList) failed for endpointID %d. Err: %" CHIP_ERROR_FORMAT, + "EndpointListLoader::ReadAttribute(DeviceTypeList) failed for endpointID %d. Err: %" CHIP_ERROR_FORMAT, _endpointAttributes->mId, err.Format()); EndpointListLoader::GetInstance()->Complete(); }); @@ -251,7 +271,9 @@ CHIP_ERROR EndpointListLoader::ReadServerList(std::vector * end EndpointListLoader::GetInstance()->Complete(); }, [](void * context, CHIP_ERROR err) { - ChipLogError(AppServer, "EndpointListLoader ReadAttribute(ServerList) failed. Err: %" CHIP_ERROR_FORMAT, err.Format()); + ChipLogError(AppServer, + "EndpointListLoader::ReadServerList() ReadAttribute(ServerList) failed. Err: %" CHIP_ERROR_FORMAT, + err.Format()); EndpointListLoader::GetInstance()->Complete(); }); } diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 6d8fb379e5..b1f1cb4916 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -1000,6 +1000,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3236,7 +3237,6 @@ endpoint 1 { server cluster ContentAppObserver { 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/virtual-device-app/android/README.md b/examples/virtual-device-app/android/README.md index a5a1ce3a65..2bb74a79f3 100644 --- a/examples/virtual-device-app/android/README.md +++ b/examples/virtual-device-app/android/README.md @@ -23,7 +23,7 @@ This app offers the following features: ## Requirements for building For information about how to build the application, see the -[Building Android](../../../docs/guides/android_building.md) guide. +[Building Android](../../../docs/platforms/android/android_building.md) guide. ## Preparing for build diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter index cbb366ad54..b9a3224db7 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter @@ -1177,6 +1177,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3901,7 +3902,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; @@ -3912,7 +3912,6 @@ endpoint 1 { callback attribute fabricSceneInfo; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -4011,7 +4010,6 @@ endpoint 1 { ram attribute safetyStatus default = 0x0000; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; @@ -4039,7 +4037,6 @@ endpoint 1 { ram attribute colorCapabilities default = 0x0000; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 7; diff --git a/examples/water-leak-detector-app/linux/.gn b/examples/water-leak-detector-app/linux/.gn new file mode 100644 index 0000000000..3b11e2ba2e --- /dev/null +++ b/examples/water-leak-detector-app/linux/.gn @@ -0,0 +1,25 @@ +# Copyright (c) 2024 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/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/water-leak-detector-app/linux/BUILD.gn b/examples/water-leak-detector-app/linux/BUILD.gn new file mode 100644 index 0000000000..c5caf26d8e --- /dev/null +++ b/examples/water-leak-detector-app/linux/BUILD.gn @@ -0,0 +1,64 @@ +# Copyright (c) 2024 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") +import("${chip_root}/third_party/imgui/imgui.gni") + +assert(chip_build_tools) + +config("includes") { + include_dirs = [ + ".", + "include", + ] +} + +executable("water-leak-detector-app") { + sources = [ + "include/CHIPProjectAppConfig.h", + "main.cpp", + ] + + deps = [ + "${chip_root}/examples/platform/linux:app-main", + "${chip_root}/examples/water-leak-detector-app/water-leak-detector-common", + "${chip_root}/src/lib", + ] + + if (chip_examples_enable_imgui_ui) { + deps += [ + "${chip_root}/examples/common/imgui_ui", + "${chip_root}/examples/common/imgui_ui/windows:boolean_state", + "${chip_root}/examples/common/imgui_ui/windows:occupancy_sensing", + "${chip_root}/examples/common/imgui_ui/windows:qrcode", + ] + } + + include_dirs = [ "include" ] + + cflags = [ "-Wconversion" ] + + output_dir = root_out_dir +} + +group("linux") { + deps = [ ":water-leak-detector-app" ] +} + +group("default") { + deps = [ ":linux" ] +} diff --git a/examples/all-clusters-minimal-app/tizen/args.gni b/examples/water-leak-detector-app/linux/args.gni similarity index 84% rename from examples/all-clusters-minimal-app/tizen/args.gni rename to examples/water-leak-detector-app/linux/args.gni index bf1ef5219e..5be50537dd 100644 --- a/examples/all-clusters-minimal-app/tizen/args.gni +++ b/examples/water-leak-detector-app/linux/args.gni @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Project CHIP Authors +# Copyright (c) 2024 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. @@ -12,6 +12,8 @@ # 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") @@ -21,5 +23,6 @@ chip_project_config_include = "" chip_system_project_config_include = "" chip_project_config_include_dirs = - [ "${chip_root}/examples/all-clusters-minimal-app/tizen/include" ] + [ "${chip_root}/examples/water-leak-detector-app/linux/include" ] chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] +matter_enable_tracing_support = true diff --git a/examples/water-leak-detector-app/linux/build_overrides b/examples/water-leak-detector-app/linux/build_overrides new file mode 120000 index 0000000000..e578e73312 --- /dev/null +++ b/examples/water-leak-detector-app/linux/build_overrides @@ -0,0 +1 @@ +../../build_overrides \ No newline at end of file diff --git a/examples/water-leak-detector-app/linux/include/CHIPProjectAppConfig.h b/examples/water-leak-detector-app/linux/include/CHIPProjectAppConfig.h new file mode 100644 index 0000000000..14ec70af42 --- /dev/null +++ b/examples/water-leak-detector-app/linux/include/CHIPProjectAppConfig.h @@ -0,0 +1,39 @@ +/* + * + * Copyright (c) 2024 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 the CHIPProjectConfig from config/standalone +#include + +#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY 0 + +// Bulbs do not typically use this - enabled so we can use shell to discover commissioners +#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT 1 + +#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 + +#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DEVICE_TYPE 1 + +#define CHIP_DEVICE_CONFIG_DEVICE_TYPE 0x0043 // Water Leak Detector + +#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DEVICE_NAME 1 + +#define CHIP_DEVICE_ENABLE_PORT_PARAMS 1 + +#define CHIP_DEVICE_CONFIG_DEVICE_NAME "Water Leak Detector" diff --git a/examples/water-leak-detector-app/linux/main.cpp b/examples/water-leak-detector-app/linux/main.cpp new file mode 100644 index 0000000000..02a91b82ce --- /dev/null +++ b/examples/water-leak-detector-app/linux/main.cpp @@ -0,0 +1,53 @@ +/* + * + * Copyright (c) 2024 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 + +#if defined(CHIP_IMGUI_ENABLED) && CHIP_IMGUI_ENABLED +#include +#include +#include +#include +#endif + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; + +void ApplicationInit() {} + +void ApplicationShutdown() {} + +int main(int argc, char * argv[]) +{ + VerifyOrDie(ChipLinuxAppInit(argc, argv) == 0); + +#if defined(CHIP_IMGUI_ENABLED) && CHIP_IMGUI_ENABLED + example::Ui::ImguiUi ui; + + ui.AddWindow(std::make_unique()); + ui.AddWindow(std::make_unique(chip::EndpointId(1), "Water Leak Detector")); + + ChipLinuxAppMainLoop(&ui); +#else + ChipLinuxAppMainLoop(); +#endif + + return 0; +} diff --git a/examples/water-leak-detector-app/linux/third_party/connectedhomeip b/examples/water-leak-detector-app/linux/third_party/connectedhomeip new file mode 120000 index 0000000000..c866b86874 --- /dev/null +++ b/examples/water-leak-detector-app/linux/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../.. \ No newline at end of file diff --git a/examples/water-leak-detector-app/water-leak-detector-common/BUILD.gn b/examples/water-leak-detector-app/water-leak-detector-common/BUILD.gn new file mode 100644 index 0000000000..47031e0dbc --- /dev/null +++ b/examples/water-leak-detector-app/water-leak-detector-common/BUILD.gn @@ -0,0 +1,21 @@ +# Copyright (c) 2024 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}/src/app/chip_data_model.gni") + +chip_data_model("water-leak-detector-common") { + zap_file = "water-leak-detector-app.zap" + is_server = true +} diff --git a/examples/water-leak-detector-app/water-leak-detector-common/water-leak-detector-app.matter b/examples/water-leak-detector-app/water-leak-detector-common/water-leak-detector-app.matter new file mode 100644 index 0000000000..5d4d31b28f --- /dev/null +++ b/examples/water-leak-detector-app/water-leak-detector-common/water-leak-detector-app.matter @@ -0,0 +1,1955 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + +enum TestGlobalEnum : enum8 { + kSomeValue = 0; + kSomeOtherValue = 1; + kFinalValue = 2; +} + +enum ThreeLevelAutoEnum : enum8 { + kLow = 0; + kMedium = 1; + kHigh = 2; + kAutomatic = 3; +} + +bitmap TestGlobalBitmap : bitmap32 { + kFirstBit = 0x1; + kSecondBit = 0x2; +} + +struct TestGlobalStruct { + char_string<128> name = 0; + nullable TestGlobalBitmap myBitmap = 1; + optional nullable TestGlobalEnum myEnum = 2; +} + +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +cluster Identify = 3 { + revision 4; + + 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 description for Identify */ + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** Attributes and commands for group configuration and manipulation. */ +cluster Groups = 4 { + revision 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<16> groupName = 1; + } + + response struct AddGroupResponse = 0 { + enum8 status = 0; + group_id groupID = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + response struct ViewGroupResponse = 1 { + enum8 status = 0; + group_id groupID = 1; + char_string<16> groupName = 2; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + response struct GetGroupMembershipResponse = 2 { + nullable int8u capacity = 0; + group_id groupList[] = 1; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + response struct RemoveGroupResponse = 3 { + enum8 status = 0; + group_id groupID = 1; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ + 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. */ +cluster Descriptor = 29 { + revision 2; + + bitmap Feature : bitmap32 { + kTagList = 0x1; + } + + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute cluster_id serverList[] = 1; + readonly attribute cluster_id clientList[] = 2; + readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; + readonly attribute 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. */ +cluster AccessControl = 31 { + revision 2; + + enum AccessControlEntryAuthModeEnum : enum8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : enum8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum AccessRestrictionTypeEnum : enum8 { + kAttributeAccessForbidden = 0; + kAttributeWriteForbidden = 1; + kCommandForbidden = 2; + kEventForbidden = 3; + } + + enum ChangeTypeEnum : enum8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + bitmap Feature : bitmap32 { + kExtension = 0x1; + kManagedDevice = 0x2; + } + + struct AccessRestrictionStruct { + AccessRestrictionTypeEnum type = 0; + nullable int32u id = 1; + } + + struct CommissioningAccessRestrictionEntryStruct { + endpoint_no endpoint = 0; + cluster_id cluster = 1; + AccessRestrictionStruct restrictions[] = 2; + } + + fabric_scoped struct AccessRestrictionEntryStruct { + fabric_sensitive endpoint_no endpoint = 0; + fabric_sensitive cluster_id cluster = 1; + fabric_sensitive AccessRestrictionStruct restrictions[] = 2; + fabric_idx fabricIndex = 254; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { + int64u token = 0; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute optional CommissioningAccessRestrictionEntryStruct commissioningARL[] = 5; + readonly attribute optional AccessRestrictionEntryStruct arl[] = 6; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ReviewFabricRestrictionsRequest { + CommissioningAccessRestrictionEntryStruct arl[] = 0; + } + + response struct ReviewFabricRestrictionsResponse = 1 { + int64u token = 0; + } + + /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +cluster BasicInformation = 40 { + revision 3; + + enum ColorEnum : enum8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : enum8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + int32u softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; + readonly attribute int32u specificationVersion = 21; + readonly attribute int16u maxPathsPerInvoke = 22; + readonly attribute 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 MfgSpecificPing(): 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 */ +cluster LocalizationConfiguration = 43 { + revision 1; // NOTE: Default/not specifically set + + attribute access(write: manage) 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; +} + +/** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ +cluster PowerSource = 47 { + revision 1; // NOTE: Default/not specifically set + + enum BatApprovedChemistryEnum : enum16 { + kUnspecified = 0; + kAlkaline = 1; + kLithiumCarbonFluoride = 2; + kLithiumChromiumOxide = 3; + kLithiumCopperOxide = 4; + kLithiumIronDisulfide = 5; + kLithiumManganeseDioxide = 6; + kLithiumThionylChloride = 7; + kMagnesium = 8; + kMercuryOxide = 9; + kNickelOxyhydride = 10; + kSilverOxide = 11; + kZincAir = 12; + kZincCarbon = 13; + kZincChloride = 14; + kZincManganeseDioxide = 15; + kLeadAcid = 16; + kLithiumCobaltOxide = 17; + kLithiumIon = 18; + kLithiumIonPolymer = 19; + kLithiumIronPhosphate = 20; + kLithiumSulfur = 21; + kLithiumTitanate = 22; + kNickelCadmium = 23; + kNickelHydrogen = 24; + kNickelIron = 25; + kNickelMetalHydride = 26; + kNickelZinc = 27; + kSilverZinc = 28; + kSodiumIon = 29; + kSodiumSulfur = 30; + kZincBromide = 31; + kZincCerium = 32; + } + + enum BatChargeFaultEnum : enum8 { + kUnspecified = 0; + kAmbientTooHot = 1; + kAmbientTooCold = 2; + kBatteryTooHot = 3; + kBatteryTooCold = 4; + kBatteryAbsent = 5; + kBatteryOverVoltage = 6; + kBatteryUnderVoltage = 7; + kChargerOverVoltage = 8; + kChargerUnderVoltage = 9; + kSafetyTimeout = 10; + } + + enum BatChargeLevelEnum : enum8 { + kOK = 0; + kWarning = 1; + kCritical = 2; + } + + enum BatChargeStateEnum : enum8 { + kUnknown = 0; + kIsCharging = 1; + kIsAtFullCharge = 2; + kIsNotCharging = 3; + } + + enum BatCommonDesignationEnum : enum16 { + kUnspecified = 0; + kAAA = 1; + kAA = 2; + kC = 3; + kD = 4; + k4v5 = 5; + k6v0 = 6; + k9v0 = 7; + k12AA = 8; + kAAAA = 9; + kA = 10; + kB = 11; + kF = 12; + kN = 13; + kNo6 = 14; + kSubC = 15; + kA23 = 16; + kA27 = 17; + kBA5800 = 18; + kDuplex = 19; + k4SR44 = 20; + k523 = 21; + k531 = 22; + k15v0 = 23; + k22v5 = 24; + k30v0 = 25; + k45v0 = 26; + k67v5 = 27; + kJ = 28; + kCR123A = 29; + kCR2 = 30; + k2CR5 = 31; + kCRP2 = 32; + kCRV3 = 33; + kSR41 = 34; + kSR43 = 35; + kSR44 = 36; + kSR45 = 37; + kSR48 = 38; + kSR54 = 39; + kSR55 = 40; + kSR57 = 41; + kSR58 = 42; + kSR59 = 43; + kSR60 = 44; + kSR63 = 45; + kSR64 = 46; + kSR65 = 47; + kSR66 = 48; + kSR67 = 49; + kSR68 = 50; + kSR69 = 51; + kSR516 = 52; + kSR731 = 53; + kSR712 = 54; + kLR932 = 55; + kA5 = 56; + kA10 = 57; + kA13 = 58; + kA312 = 59; + kA675 = 60; + kAC41E = 61; + k10180 = 62; + k10280 = 63; + k10440 = 64; + k14250 = 65; + k14430 = 66; + k14500 = 67; + k14650 = 68; + k15270 = 69; + k16340 = 70; + kRCR123A = 71; + k17500 = 72; + k17670 = 73; + k18350 = 74; + k18500 = 75; + k18650 = 76; + k19670 = 77; + k25500 = 78; + k26650 = 79; + k32600 = 80; + } + + enum BatFaultEnum : enum8 { + kUnspecified = 0; + kOverTemp = 1; + kUnderTemp = 2; + } + + enum BatReplaceabilityEnum : enum8 { + kUnspecified = 0; + kNotReplaceable = 1; + kUserReplaceable = 2; + kFactoryReplaceable = 3; + } + + enum PowerSourceStatusEnum : enum8 { + kUnspecified = 0; + kActive = 1; + kStandby = 2; + kUnavailable = 3; + } + + enum WiredCurrentTypeEnum : enum8 { + kAC = 0; + kDC = 1; + } + + enum WiredFaultEnum : enum8 { + kUnspecified = 0; + kOverVoltage = 1; + kUnderVoltage = 2; + } + + bitmap Feature : bitmap32 { + kWired = 0x1; + kBattery = 0x2; + kRechargeable = 0x4; + kReplaceable = 0x8; + } + + struct BatChargeFaultChangeType { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + struct BatFaultChangeType { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + struct WiredFaultChangeType { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event WiredFaultChange = 0 { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event BatFaultChange = 1 { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + info event BatChargeFaultChange = 2 { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + readonly attribute PowerSourceStatusEnum status = 0; + readonly attribute int8u order = 1; + readonly attribute char_string<60> description = 2; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; + readonly attribute endpoint_no endpointList[] = 31; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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. */ +cluster GeneralCommissioning = 48 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningErrorEnum : enum8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; + } + + enum RegulatoryLocationTypeEnum : enum8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; + 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; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + char_string<2> countryCode = 1; + int64u breadcrumb = 2; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +cluster NetworkCommissioning = 49 { + revision 1; // NOTE: Default/not specifically set + + 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; + kPerDeviceCredentials = 0x8; + } + + bitmap ThreadCapabilitiesBitmap : bitmap16 { + kIsBorderRouterCapable = 0x1; + kIsRouterCapable = 0x2; + kIsSleepyEndDeviceCapable = 0x4; + kIsFullThreadDevice = 0x8; + kIsSynchronizedSleepyEndDeviceCapable = 0x10; + } + + bitmap WiFiSecurityBitmap : bitmap8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + provisional readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + provisional readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + provisional readonly attribute optional int16u threadVersion = 10; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + + request struct AddOrUpdateThreadNetworkRequest { + octet_string<254> operationalDataset = 0; + optional int64u breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + + request struct ConnectNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + + request struct ReorderNetworkRequest { + octet_string<32> networkID = 0; + int8u networkIndex = 1; + optional int64u breadcrumb = 2; + } + + request struct QueryIdentityRequest { + octet_string<20> keyIdentifier = 0; + optional octet_string<32> possessionNonce = 1; + } + + response struct QueryIdentityResponse = 10 { + octet_string<140> identity = 0; + optional octet_string<64> possessionSignature = 1; + } + + /** Detemine the set of networks the device sees as available. */ + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +cluster DiagnosticLogs = 50 { + revision 1; // NOTE: Default/not specifically set + + 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; + } + + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + long_octet_string logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster GeneralDiagnostics = 51 { + revision 2; + + enum BootReasonEnum : enum8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : enum8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : enum8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : enum8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + bitmap Feature : bitmap32 { + kDataModelTest = 0x1; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + } + + response struct TimeSnapshotResponse = 2 { + systime_ms systemTimeMs = 0; + nullable posix_ms posixTimeMs = 1; + } + + request struct PayloadTestRequestRequest { + octet_string<16> enableKey = 0; + int8u value = 1; + int16u count = 2; + } + + response struct PayloadTestResponse = 4 { + octet_string payload = 0; + } + + /** Provide a means for certification tests to trigger some test-plan-specific events */ + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ + command TimeSnapshot(): TimeSnapshotResponse = 1; + /** Request a variable length payload response. */ + command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +cluster AdministratorCommissioning = 60 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningWindowStatusEnum : enum8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : enum8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + bitmap Feature : bitmap32 { + kBasic = 0x1; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable vendor_id adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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<32> salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +cluster OperationalCredentials = 62 { + revision 1; // NOTE: Default/not specifically set + + 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<32> attestationNonce = 0; + } + + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + + request struct CSRRequestRequest { + octet_string<32> CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + + request struct AddNOCRequest { + octet_string<400> NOCValue = 0; + optional octet_string<400> ICACValue = 1; + octet_string<16> IPKValue = 2; + int64u caseAdminSubject = 3; + vendor_id adminVendorId = 4; + } + + request struct UpdateNOCRequest { + octet_string NOCValue = 0; + optional octet_string ICACValue = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + + request struct UpdateFabricLabelRequest { + char_string<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + octet_string rootCACertificate = 0; + } + + /** Sender is requesting attestation information from the receiver. */ + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +cluster GroupKeyManagement = 63 { + revision 1; // NOTE: Default/not specifically set + + enum GroupKeySecurityPolicyEnum : enum8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : bitmap32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + int16u groupKeySetIDs[] = 0; + } + + /** Write a new set of keys for the given key set id. */ + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** This cluster provides an interface to a boolean state called StateValue. */ +cluster BooleanState = 69 { + revision 1; + + info event StateChange = 0 { + boolean stateValue = 0; + } + + readonly attribute boolean stateValue = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute 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 configure a boolean sensor. */ +cluster BooleanStateConfiguration = 128 { + revision 1; + + bitmap AlarmModeBitmap : bitmap8 { + kVisual = 0x1; + kAudible = 0x2; + } + + bitmap Feature : bitmap32 { + kVisual = 0x1; + kAudible = 0x2; + kAlarmSuppress = 0x4; + kSensitivityLevel = 0x8; + } + + bitmap SensorFaultBitmap : bitmap16 { + kGeneralFault = 0x1; + } + + info event AlarmsStateChanged = 0 { + AlarmModeBitmap alarmsActive = 0; + optional AlarmModeBitmap alarmsSuppressed = 1; + } + + info event SensorFault = 1 { + SensorFaultBitmap sensorFault = 0; + } + + attribute optional int8u currentSensitivityLevel = 0; + readonly attribute optional int8u supportedSensitivityLevels = 1; + readonly attribute optional int8u defaultSensitivityLevel = 2; + readonly attribute optional AlarmModeBitmap alarmsActive = 3; + readonly attribute optional AlarmModeBitmap alarmsSuppressed = 4; + readonly attribute optional AlarmModeBitmap alarmsEnabled = 5; + readonly attribute optional AlarmModeBitmap alarmsSupported = 6; + readonly attribute optional SensorFaultBitmap sensorFault = 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 SuppressAlarmRequest { + AlarmModeBitmap alarmsToSuppress = 0; + } + + request struct EnableDisableAlarmRequest { + AlarmModeBitmap alarmsToEnableDisable = 0; + } + + /** This command is used to suppress the specified alarm mode. */ + command SuppressAlarm(SuppressAlarmRequest): DefaultSuccess = 0; + /** This command is used to enable or disable the specified alarm mode. */ + command EnableDisableAlarm(EnableDisableAlarmRequest): DefaultSuccess = 1; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location; + callback attribute hardwareVersion; + callback attribute hardwareVersionString; + callback attribute softwareVersion; + callback attribute softwareVersionString; + callback attribute manufacturingDate; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } + + server cluster LocalizationConfiguration { + ram attribute activeLocale; + callback attribute supportedLocales; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig; + callback attribute locationCapability; + callback attribute supportsConcurrentConnection; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + + handle command ArmFailSafe; + handle command ArmFailSafeResponse; + handle command SetRegulatoryConfig; + handle command SetRegulatoryConfigResponse; + handle command CommissioningComplete; + handle command CommissioningCompleteResponse; + } + + server cluster NetworkCommissioning { + ram attribute maxNetworks; + callback attribute networks; + ram attribute scanMaxTimeSeconds; + ram attribute connectMaxTimeSeconds; + ram attribute interfaceEnabled; + ram attribute lastNetworkingStatus; + ram attribute lastNetworkID; + ram attribute lastConnectErrorValue; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 0x0001; + + handle command ScanNetworks; + handle command ScanNetworksResponse; + handle command AddOrUpdateWiFiNetwork; + handle command AddOrUpdateThreadNetwork; + handle command RemoveNetwork; + handle command NetworkConfigResponse; + handle command ConnectNetwork; + handle command ConnectNetworkResponse; + handle command ReorderNetwork; + } + + server cluster DiagnosticLogs { + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command RetrieveLogsRequest; + handle command RetrieveLogsResponse; + } + + server cluster GeneralDiagnostics { + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount; + callback attribute upTime; + callback attribute totalOperationalHours; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command TestEventTrigger; + handle command TimeSnapshot; + handle command TimeSnapshotResponse; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus; + callback attribute adminFabricIndex; + callback attribute adminVendorId; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + + handle command OpenCommissioningWindow; + handle command OpenBasicCommissioningWindow; + handle command RevokeCommissioning; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + + handle command AttestationRequest; + handle command AttestationResponse; + handle command CertificateChainRequest; + handle command CertificateChainResponse; + handle command CSRRequest; + handle command CSRResponse; + handle command AddNOC; + handle command UpdateNOC; + handle command NOCResponse; + handle command UpdateFabricLabel; + handle command RemoveFabric; + handle command AddTrustedRootCertificate; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command KeySetWrite; + handle command KeySetRead; + handle command KeySetReadResponse; + handle command KeySetRemove; + handle command KeySetReadAllIndices; + handle command KeySetReadAllIndicesResponse; + } +} +endpoint 1 { + device type ma_powersource = 17, version 1; + device type ma_water_leak_detector = 67, version 1; + + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + + handle command Identify; + handle command TriggerEffect; + } + + server cluster Groups { + ram attribute nameSupport; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + + handle command AddGroup; + handle command AddGroupResponse; + handle command ViewGroup; + handle command ViewGroupResponse; + handle command GetGroupMembership; + handle command GetGroupMembershipResponse; + handle command RemoveGroup; + handle command RemoveGroupResponse; + handle command RemoveAllGroups; + handle command AddGroupIfIdentifying; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster PowerSource { + ram attribute status default = 1; + ram attribute order default = 1; + ram attribute description default = "Primary Battery"; + ram attribute batVoltage default = 4100; + ram attribute batPercentRemaining default = 95; + ram attribute batTimeRemaining default = 518400; + ram attribute batChargeLevel default = 0; + ram attribute batReplacementNeeded default = 0; + ram attribute batReplaceability default = 1; + ram attribute batPresent default = 1; + ram attribute batCapacity default = 350; + ram attribute batChargeState default = 4; + ram attribute batFunctionalWhileCharging default = 1; + callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster BooleanState { + ram attribute stateValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster BooleanStateConfiguration { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} + + diff --git a/examples/water-leak-detector-app/water-leak-detector-common/water-leak-detector-app.zap b/examples/water-leak-detector-app/water-leak-detector-common/water-leak-detector-app.zap new file mode 100644 index 0000000000..1dc7adb63a --- /dev/null +++ b/examples/water-leak-detector-app/water-leak-detector-common/water-leak-detector-app.zap @@ -0,0 +1,3214 @@ +{ + "fileFormat": 2, + "featureLevel": 103, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "category": "matter", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "id": 1, + "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "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": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "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": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "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": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPathsPerInvoke", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "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": "2", + "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": "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": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "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": null, + "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": "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshot", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshotResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "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": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 67, + "profileId": 259, + "label": "MA-water-leak-detector", + "name": "MA-water-leak-detector" + }, + "deviceTypes": [ + { + "code": 67, + "profileId": 259, + "label": "MA-water-leak-detector", + "name": "MA-water-leak-detector" + }, + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 67, + 17 + ], + "deviceTypeName": "MA-water-leak-detector", + "deviceTypeCode": 67, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "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": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "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": "Primary Battery", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatVoltage", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4100", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatPercentRemaining", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "95", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatTimeRemaining", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "518400", + "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": "0", + "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": "0", + "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": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatPresent", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatCapacity", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "350", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatChargeState", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "BatChargeStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatFunctionalWhileCharging", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Boolean State", + "code": 69, + "mfgCode": null, + "define": "BOOLEAN_STATE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "StateValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Boolean State Configuration", + "code": 128, + "mfgCode": null, + "define": "BOOLEAN_STATE_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "parentEndpointIdentifier": 0 + } + ] +} diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 50a47d27c7..850b8f047e 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -1101,6 +1101,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2341,7 +2342,6 @@ endpoint 0 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2357,7 +2357,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision; @@ -2390,7 +2389,6 @@ endpoint 0 { callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; @@ -2413,7 +2411,6 @@ endpoint 0 { server cluster UnitLocalization { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2432,7 +2429,6 @@ endpoint 0 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; @@ -2446,7 +2442,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2470,7 +2465,6 @@ endpoint 0 { ram attribute lastConnectErrorValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -2499,7 +2493,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2633,7 +2626,6 @@ endpoint 0 { callback attribute adminVendorId; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2651,7 +2643,6 @@ endpoint 0 { callback attribute currentFabricIndex; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2677,7 +2668,6 @@ endpoint 0 { callback attribute maxGroupKeysPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2708,7 +2698,6 @@ endpoint 0 { callback attribute activeModeThreshold; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0000; ram attribute clusterRevision default = 3; diff --git a/examples/window-app/nrfconnect/README.md b/examples/window-app/nrfconnect/README.md index 964af0c265..c743bb22f2 100644 --- a/examples/window-app/nrfconnect/README.md +++ b/examples/window-app/nrfconnect/README.md @@ -40,7 +40,7 @@ This example is running on the nRF Connect platform, which is based on Nordic Semiconductor's [nRF Connect SDK](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/index.html) and [Zephyr RTOS](https://zephyrproject.org/). Visit Matter's -[nRF Connect platform overview](../../../docs/guides/nrfconnect_platform_overview.md) +[nRF Connect platform overview](../../../docs/platforms/nrf/nrfconnect_platform_overview.md) to read more about the platform structure and dependencies. The Matter device that runs the window shutter application is controlled by the @@ -229,7 +229,7 @@ by default). **SEGGER J-Link USB port** can be used to get logs from the device or communicate with it using the -[command line interface](../../../docs/guides/nrfconnect_examples_cli.md). +[command line interface](../../../docs/platforms/nrf/nrfconnect_examples_cli.md). **NFC port with antenna attached** can be used to start the [rendezvous](#bluetooth-le-rendezvous) by providing the commissioning @@ -430,7 +430,7 @@ depending on the selected board: only the necessary application functionalities to optimize its performance. For more information, see the -[Configuring nRF Connect SDK examples](../../../docs/guides/nrfconnect_examples_configuration.md) +[Configuring nRF Connect SDK examples](../../../docs/platforms/nrf/nrfconnect_examples_configuration.md) page.
@@ -454,19 +454,20 @@ directory: ## Testing the example -Check the [CLI tutorial](../../../docs/guides/nrfconnect_examples_cli.md) to -learn how to use command-line interface of the application. +Check the [CLI tutorial](../../../docs/platforms/nrf/nrfconnect_examples_cli.md) +to learn how to use command-line interface of the application. ### Testing using Linux CHIPTool -Read the [CHIP Tool user guide](../../../docs/guides/chip_tool_guide.md) to see -how to use [CHIP Tool for Linux or mac OS](../../chip-tool/README.md) to +Read the +[CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md) +to see how to use [CHIP Tool for Linux or mac OS](../../chip-tool/README.md) to commission and control the application within a Matter-enabled Thread network. ### Testing using Android CHIPTool Read the -[Android commissioning guide](../../../docs/guides/nrfconnect_android_commissioning.md) +[Android commissioning guide](../../../docs/platforms/nrf/nrfconnect_android_commissioning.md) to see how to use [CHIPTool](../../../examples/android/CHIPTool/README.md) for Android smartphones to commission and control the application within a Matter-enabled Thread network. @@ -474,5 +475,5 @@ Matter-enabled Thread network. ### Testing Device Firmware Upgrade Read the -[DFU tutorial](../../../docs/guides/nrfconnect_examples_software_update.md) to -see how to upgrade your device firmware. +[DFU tutorial](../../../docs/platforms/nrf/nrfconnect_examples_software_update.md) +to see how to upgrade your device firmware. diff --git a/examples/window-app/silabs/README.md b/examples/window-app/silabs/README.md index 47dbb77a7f..a5e985cec0 100644 --- a/examples/window-app/silabs/README.md +++ b/examples/window-app/silabs/README.md @@ -195,7 +195,7 @@ combination with JLinkRTTClient as follows: - It is assumed here that you already have an OpenThread border router configured and running. If not see the following guide - [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) + [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/platforms/openthread/openthread_border_router_pi.md) for more information on how to setup a border router on a raspberryPi. Take note that the RCP code is available directly through @@ -324,7 +324,7 @@ combination with JLinkRTTClient as follows: For the description of Software Update process with EFR32 example applications see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) +[EFR32 OTA Software Update](../../../docs/platforms/silabs/silabs_efr32_software_update.md) ## Building options diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 99bc5042ed..824b79d6ce 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:81" + - name: "ghcr.io/project-chip/chip-build-vscode:85" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: git config --global --add safe.directory "*" python scripts/checkout_submodules.py --shallow --recursive --platform esp32 nrfconnect silabs linux android id: Submodules - - name: "ghcr.io/project-chip/chip-build-vscode:81" + - name: "ghcr.io/project-chip/chip-build-vscode:85" # NOTE: silabs boostrap is NOT done with the rest as it requests a conflicting # jinja2 version (asks for 3.1.3 when constraints.txt asks for 3.0.3) env: @@ -24,7 +24,7 @@ steps: path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:81" + - name: "ghcr.io/project-chip/chip-build-vscode:85" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -45,7 +45,7 @@ steps: volumes: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:81" + - name: "ghcr.io/project-chip/chip-build-vscode:85" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -66,7 +66,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:81" + - name: "ghcr.io/project-chip/chip-build-vscode:85" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -88,7 +88,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:81" + - name: "ghcr.io/project-chip/chip-build-vscode:85" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -141,7 +141,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:81" + - name: "ghcr.io/project-chip/chip-build-vscode:85" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index 9f5456cec0..081a6389d0 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -81 : [Telink] Update Docker image (Zephyr update) +87 : [Silabs] Delete SDK files to reduce the amount of flash consummed diff --git a/integrations/docker/images/stage-2/chip-build-efr32/Dockerfile b/integrations/docker/images/stage-2/chip-build-efr32/Dockerfile index d54bab59f0..a202e835a7 100644 --- a/integrations/docker/images/stage-2/chip-build-efr32/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-efr32/Dockerfile @@ -13,26 +13,33 @@ RUN set -x \ && : # last line -# Download Simplicity SDK v2024.6.1 (a1a37fa) -RUN wget https://github.com/SiliconLabs/simplicity_sdk/releases/download/v2024.6.1-0/sisdk-sdk.zip -O /tmp/simplicity_sdk.zip \ +# Download Simplicity SDK v2024.6.2 (36e12f0) +RUN wget https://github.com/SiliconLabs/simplicity_sdk/releases/download/v2024.6.2/gecko-sdk.zip -O /tmp/simplicity_sdk.zip \ && unzip /tmp/simplicity_sdk.zip -d /tmp/simplicity_sdk \ && rm -rf /tmp/simplicity_sdk.zip \ # Deleting files that are not needed to save space - && rm -rf /tmp/simplicity_sdk/protocol/flex /tmp/simplicity_sdk/protocol/z-wave /tmp/simplicity_sdk/protocol/zigbee /tmp/simplicity_sdk/protocol/wisun \ + && rm -rf /tmp/simplicity_sdk/protocol/flex /tmp/simplicity_sdk/protocol/z-wave /tmp/simplicity_sdk/protocol/zigbee /tmp/simplicity_sdk/protocol/wisun /tmp/simplicity_sdk/util/third_party/tensorflow_extra \ + /tmp/simplicity_sdk/util/third_party/sqlite /tmp/simplicity_sdk/util/third_party/ot-br-posix /tmp/simplicity_sdk/util/third_party/tflite-micro /tmp/simplicity_sdk/util/third_party/tflite-fatfs /tmp/simplicity_sdk/util/third_party/unity_test_framework \ + /tmp/simplicity_sdk/platform/radio/efr32_multiphy_configurator \ && find /tmp/simplicity_sdk/protocol/bluetooth /tmp/simplicity_sdk/platform -name "*.a" -type f -delete \ && find /tmp/simplicity_sdk/protocol/openthread -name "*efr32mg21*" -delete \ + && find /tmp/simplicity_sdk \( -name "libsl_platform_ftd_efr32mg2*" -o -name "libsl_ot_stack_mtd_efr32mg2*" \) -type f -delete \ + && find /tmp/simplicity_sdk/hardware/board/config -mindepth 1 -maxdepth 1 -type d ! \( -name '*brd4186c*' -o -name '*brd4187c*' -o -name '*brd4186a*' -o -name '*brd4187a*' -o -name '*brd2601b*' -o -name '*brd2703a*' -o -name '*brd2704a*' \ + -o -name '*brd4316a*' -o -name '*brd4317a*' -o -name '*brd4318a*' -o -name '*brd4319a*' -o -name '*brd4116a*' -o -name '*brd4117a*' -o -name '*brd4118a*' -o -name '*brd2608a*' \) -exec rm -rf {} + \ + && find /tmp/simplicity_sdk/platform/Device/SiliconLabs -mindepth 1 -maxdepth 1 -type d ! \( -name 'EFR32MG24' -o -name 'EFR32MG26' -o -name 'MGM24' \) -exec rm -rf {} + \ + && find /tmp/simplicity_sdk -name "*.slc*" -type f -delete \ && : # last line -# Clone WiSeConnect Wi-Fi and Bluetooth Software 2.10.0 (f94b83d) -RUN git clone --depth=1 --single-branch --branch=2.10.0 https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git /tmp/wiseconnect-wifi-bt-sdk && \ +# Clone WiSeConnect Wi-Fi and Bluetooth Software 2.10.3 (b6d6cb5) +RUN git clone --depth=1 --single-branch --branch=2.10.3 https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git /tmp/wiseconnect-wifi-bt-sdk && \ cd /tmp/wiseconnect-wifi-bt-sdk && \ - rm -rf .git \ + rm -rf .git examples \ && : # last line -# Clone WiSeConnect SDK v3.3.2 (b5d6422) -RUN git clone --depth=1 --single-branch --branch=v3.3.2 https://github.com/SiliconLabs/wiseconnect.git /tmp/wifi_sdk && \ +# Clone WiSeConnect SDK v3.3.3 (a6390dd) +RUN git clone --depth=1 --single-branch --branch=v3.3.3 https://github.com/SiliconLabs/wiseconnect.git /tmp/wifi_sdk && \ cd /tmp/wifi_sdk && \ - rm -rf .git \ + rm -rf .git examples components/device/stm32 \ && : # last line # SLC-cli install diff --git a/integrations/docker/images/stage-3/chip-build-tizen-qemu/Dockerfile b/integrations/docker/images/stage-3/chip-build-tizen-qemu/Dockerfile index 26b9183da6..2d0bb55e3a 100644 --- a/integrations/docker/images/stage-3/chip-build-tizen-qemu/Dockerfile +++ b/integrations/docker/images/stage-3/chip-build-tizen-qemu/Dockerfile @@ -46,23 +46,25 @@ RUN set -x \ && cd *linux-kernel-* \ && zcat ../*-to-*.diff.gz | patch -p1 \ && patch -p1 < $TIZEN_SDK_ROOT/files/0001-smack-add-permissive-mode.patch \ - # Compile + # Configure && export MAKEFLAGS=-j$(nproc) \ && export ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- \ && make tizen_bcm2711_defconfig \ - && ./scripts/config -e ARCH_VIRT \ - && ./scripts/config -e VIRTIO_MMIO -e HW_RANDOM_VIRTIO \ + # Add support for QEMU VirtIO devices + && ./scripts/config -e ARCH_VIRT -e VIRTIO_MMIO \ && ./scripts/config -e VIRTIO_PCI -e VIRTIO_BLK \ && ./scripts/config -e VIRTIO_NET -e VETH \ - && ./scripts/config -e IKCONFIG -e IKCONFIG_PROC \ + && ./scripts/config -e HW_RANDOM_VIRTIO \ + # Use ARM PL031 RTC and synchronize time during boot + && ./scripts/config -e RTC_DRV_PL031 -e RTC_HCTOSYS \ + # Enable vHCI driver to add support for Bluetooth virtualization && ./scripts/config -e BT_HCIVHCI -e CRYPTO_USER_API_HASH -e CRYPTO_USER_API_SKCIPHER \ - && ./scripts/config -e OVERLAY_FS \ - && ./scripts/config -e SECURITY_SMACK_PERMISSIVE_MODE \ - && ./scripts/config -e NET_9P -e NET_9P_VIRTIO \ - && ./scripts/config -e INET \ - && ./scripts/config -e 9P_FS -e 9P_FS_POSIX_ACL \ - && ./scripts/config -e PCI_HOST_GENERIC \ + # Enable overlay FS and disable SMACK to workaround permission issues + && ./scripts/config -e OVERLAY_FS -e SECURITY_SMACK_PERMISSIVE_MODE \ + # Enable 9P filesystem support to share files between host and guest + && ./scripts/config -e INET -e PCI_HOST_GENERIC -e NET_9P -e NET_9P_VIRTIO -e 9P_FS \ && make olddefconfig \ + # Compile && make -j$(nproc) zImage \ && mv arch/arm/boot/zImage $TIZEN_IOT_QEMU_KERNEL \ # Cleanup @@ -180,9 +182,13 @@ RUN set -x \ && echo -n \ "#!/bin/bash\n" \ "grep -q 'rootshell' /proc/cmdline && exit\n" \ - "if [[ -x /mnt/chip/runner.sh ]]; then\n" \ + "runner=\$(grep -o 'runner=[^ ]*' /proc/cmdline | sed 's/runner=//')\n" \ + "if [[ -z \"\$runner\" ]]; then\n" \ + " runner='/mnt/chip/runner.sh' \n" \ + "fi\n" \ + "if [[ -x \"\$runner\" ]]; then\n" \ " echo '### RUNNER START ###'\n" \ - " /mnt/chip/runner.sh\n" \ + " \"\$runner\"\n" \ " echo '### RUNNER STOP:' \$?\n" \ "else\n" \ " read -r -t 5 -p 'Press ENTER to access root shell...' && exit || echo ' timeout.'\n" \ diff --git a/scripts/BUILD.gn b/scripts/BUILD.gn index 0ebcab9791..ea1d49662f 100644 --- a/scripts/BUILD.gn +++ b/scripts/BUILD.gn @@ -20,8 +20,8 @@ import("$dir_pw_build/python_dist.gni") # This target creates a single Python package and wheel for yamltests. It will # merge all Python dependencies Matter. The output is located in: -# out/obj/matter_yamltests_distribution/ <- source files here -# out/obj/matter_yamltests_distribution._build_wheel/matter_yamltests-0.0.1-py3-none-any.whl +# out/obj/scripts/matter_yamltests_distribution/ <- source files here +# out/obj/scripts/matter_yamltests_distribution._build_wheel/matter_yamltests-0.0.1-py3-none-any.whl pw_python_distribution("matter_yamltests_distribution") { packages = [ "${chip_root}/scripts/py_matter_yamltests:matter_yamltests" ] generate_setup_cfg = { diff --git a/scripts/build/build/__init__.py b/scripts/build/build/__init__.py index c363f6c326..5f3cbbab36 100644 --- a/scripts/build/build/__init__.py +++ b/scripts/build/build/__init__.py @@ -4,9 +4,10 @@ from enum import Enum, auto from typing import Sequence -from .targets import BUILD_TARGETS from builders.builder import BuilderOptions +from .targets import BUILD_TARGETS + class BuildSteps(Enum): GENERATED = auto() @@ -18,11 +19,12 @@ class Context: to generate make/ninja instructions and to compile. """ - def __init__(self, runner, repository_path: str, output_prefix: str): + def __init__(self, runner, repository_path: str, output_prefix: str, ninja_jobs: int): self.builders = [] self.runner = runner self.repository_path = repository_path self.output_prefix = output_prefix + self.ninja_jobs = ninja_jobs self.completed_steps = set() def SetupBuilders(self, targets: Sequence[str], options: BuilderOptions): @@ -36,7 +38,7 @@ def SetupBuilders(self, targets: Sequence[str], options: BuilderOptions): found = False for choice in BUILD_TARGETS: builder = choice.Create(target, self.runner, self.repository_path, - self.output_prefix, options) + self.output_prefix, self.ninja_jobs, options) if builder: self.builders.append(builder) found = True diff --git a/scripts/build/build/target.py b/scripts/build/build/target.py index 7f17161701..78e4599fb5 100644 --- a/scripts/build/build/target.py +++ b/scripts/build/build/target.py @@ -389,7 +389,7 @@ def StringIntoTargetParts(self, value: str): return _StringIntoParts(value, suffix, self.fixed_targets, self.modifiers) def Create(self, name: str, runner, repository_path: str, output_prefix: str, - builder_options: BuilderOptions): + ninja_jobs: int, builder_options: BuilderOptions): parts = self.StringIntoTargetParts(name) @@ -406,6 +406,7 @@ def Create(self, name: str, runner, repository_path: str, output_prefix: str, builder.target = self builder.identifier = name builder.output_dir = os.path.join(output_prefix, name) + builder.ninja_jobs = ninja_jobs builder.chip_dir = os.path.abspath(repository_path) builder.options = builder_options diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 8d1b30234c..779855f4ed 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -28,7 +28,7 @@ from builders.mw320 import MW320App, MW320Builder from builders.nrf import NrfApp, NrfBoard, NrfConnectBuilder from builders.nuttx import NuttXApp, NuttXBoard, NuttXBuilder -from builders.nxp import NxpApp, NxpBoard, NxpBoardVariant, NxpBuilder, NxpBuildSystem, NxpOsUsed +from builders.nxp import NxpApp, NxpBoard, NxpBoardVariant, NxpBuilder, NxpBuildSystem, NxpLogLevel, NxpOsUsed from builders.openiotsdk import OpenIotSdkApp, OpenIotSdkBuilder, OpenIotSdkCryptoBackend from builders.qpg import QpgApp, QpgBoard, QpgBuilder from builders.stm32 import stm32App, stm32Board, stm32Builder @@ -133,6 +133,7 @@ def BuildHostTarget(): TargetPart('bridge', app=HostApp.BRIDGE), TargetPart('fabric-admin', app=HostApp.FABRIC_ADMIN).OnlyIfRe("-rpc"), TargetPart('fabric-bridge', app=HostApp.FABRIC_BRIDGE).OnlyIfRe("-rpc"), + TargetPart('fabric-sync', app=HostApp.FABRIC_SYNC), TargetPart('tests', app=HostApp.TESTS), TargetPart('chip-cert', app=HostApp.CERT_TOOL), TargetPart('address-resolve-tool', app=HostApp.ADDRESS_RESOLVE), @@ -146,6 +147,7 @@ def BuildHostTarget(): TargetPart('air-quality-sensor', app=HostApp.AIR_QUALITY_SENSOR), TargetPart('network-manager', app=HostApp.NETWORK_MANAGER), TargetPart('energy-management', app=HostApp.ENERGY_MANAGEMENT), + TargetPart('water-leak-detector', app=HostApp.WATER_LEAK_DETECTOR), ] if (HostBoard.NATIVE.PlatformName() == 'darwin'): @@ -257,6 +259,7 @@ def BuildEfr32Target(): TargetPart('brd2703a', board=Efr32Board.BRD2703A), TargetPart('brd4338a', board=Efr32Board.BRD4338A, enable_wifi=True, enable_917_soc=True), TargetPart('brd2605a', board=Efr32Board.BRD2605A, enable_wifi=True, enable_917_soc=True), + TargetPart('brd4343a', board=Efr32Board.BRD4343A, enable_wifi=True, enable_917_soc=True), ]) # apps @@ -516,6 +519,8 @@ def BuildNxpTarget(): target.AppendFixedTargets([ TargetPart('k32w0', board=NxpBoard.K32W0), TargetPart('k32w1', board=NxpBoard.K32W1), + TargetPart('rt1060', board=NxpBoard.RT1060), + TargetPart('rt1170', board=NxpBoard.RT1170), TargetPart('rw61x', board=NxpBoard.RW61X), TargetPart('rw61x_eth', board=NxpBoard.RW61X_ETH), TargetPart('mcxw71', board=NxpBoard.MCXW71) @@ -532,9 +537,9 @@ def BuildNxpTarget(): TargetPart('lighting', app=NxpApp.LIGHTING).OnlyIfRe('(k32w0|k32w1|mcxw71)'), TargetPart('contact-sensor', app=NxpApp.CONTACT).OnlyIfRe('(k32w0|k32w1|mcxw71)'), TargetPart('lock-app', app=NxpApp.LOCK_APP).OnlyIfRe('(k32w1|mcxw71)'), - TargetPart('all-clusters', app=NxpApp.ALLCLUSTERS).OnlyIfRe('rw61x'), - TargetPart('laundry-washer', app=NxpApp.LAUNDRYWASHER).OnlyIfRe('rw61x'), - TargetPart('thermostat', app=NxpApp.THERMOSTAT).OnlyIfRe('rw61x') + TargetPart('all-clusters', app=NxpApp.ALLCLUSTERS).OnlyIfRe('rt1060|rt1170|rw61x'), + TargetPart('laundry-washer', app=NxpApp.LAUNDRYWASHER).OnlyIfRe('rt1060|rt1170|rw61x'), + TargetPart('thermostat', app=NxpApp.THERMOSTAT).OnlyIfRe('rt1060|rt1170|rw61x') ]) target.AppendModifier(name="factory", enable_factory_data=True) @@ -546,15 +551,23 @@ def BuildNxpTarget(): target.AppendModifier(name="rotating-id", enable_rotating_id=True).ExceptIfRe('rw61x') target.AppendModifier(name="sw-v2", has_sw_version_2=True) target.AppendModifier(name="ota", enable_ota=True).ExceptIfRe('zephyr') - target.AppendModifier(name="wifi", enable_wifi=True).OnlyIfRe('rw61x') + target.AppendModifier(name="wifi", enable_wifi=True).OnlyIfRe('rt1060|rt1170|rw61x') target.AppendModifier(name="ethernet", enable_ethernet=True).OnlyIfRe('rw61x_eth-zephyr') target.AppendModifier(name="thread", enable_thread=True).ExceptIfRe('zephyr') target.AppendModifier(name="matter-shell", enable_shell=True).ExceptIfRe('k32w0|k32w1') target.AppendModifier('data-model-disabled', data_model_interface="disabled").ExceptIfRe('-data-model-enabled') target.AppendModifier('data-model-enabled', data_model_interface="enabled").ExceptIfRe('-data-model-disabled') - target.AppendModifier(name="factory-build", enable_factory_data_build=True).OnlyIfRe('rw61x') + target.AppendModifier(name="factory-build", enable_factory_data_build=True).OnlyIfRe('rt1060|rt1170|rw61x') target.AppendModifier(name="frdm", board_variant=NxpBoardVariant.FRDM).OnlyIfRe('rw61x') target.AppendModifier(name="cmake", build_system=NxpBuildSystem.CMAKE).OnlyIfRe('rw61x') + target.AppendModifier(name="evkc", board_variant=NxpBoardVariant.EVKC).OnlyIfRe('rt1060') + target.AppendModifier(name="iw416", iw416_transceiver=True).OnlyIfRe('rt1060') + target.AppendModifier(name="w8801", w8801_transceiver=True).OnlyIfRe('rt1060') + target.AppendModifier(name="iwx12", iwx12_transceiver=True).OnlyIfRe('rt1060|rt1170') + target.AppendModifier(name="log-all", log_level=NxpLogLevel.ALL).ExceptIfRe("-log-(progress|error|none)") + target.AppendModifier(name="log-progress", log_level=NxpLogLevel.PROGRESS).ExceptIfRe("-log-(all|error|none)") + target.AppendModifier(name="log-error", log_level=NxpLogLevel.ERROR).ExceptIfRe("-log-(progress|all|none)") + target.AppendModifier(name="log-none", log_level=NxpLogLevel.NONE).ExceptIfRe("-log-(progress|error|all)") return target @@ -668,7 +681,6 @@ def BuildTizenTarget(): # apps target.AppendFixedTargets([ TargetPart('all-clusters', app=TizenApp.ALL_CLUSTERS), - TargetPart('all-clusters-minimal', app=TizenApp.ALL_CLUSTERS_MINIMAL), TargetPart('chip-tool', app=TizenApp.CHIP_TOOL), TargetPart('light', app=TizenApp.LIGHT), TargetPart('tests', app=TizenApp.TESTS), diff --git a/scripts/build/build_examples.py b/scripts/build/build_examples.py index e1f37fca79..171c788c05 100755 --- a/scripts/build/build_examples.py +++ b/scripts/build/build_examples.py @@ -104,6 +104,13 @@ def ValidateTargetNames(context, parameter, values): default='./out', type=click.Path(file_okay=False, resolve_path=True), help='Prefix for the generated file output.') +@click.option( + '--ninja-jobs', + type=int, + is_flag=False, + flag_value=0, + default=None, + help='Number of ninja jobs') @click.option( '--pregen-dir', default=None, @@ -136,8 +143,8 @@ def ValidateTargetNames(context, parameter, values): 'for using ccache when building examples.')) @click.pass_context def main(context, log_level, target, enable_link_map_file, repo, - out_prefix, pregen_dir, clean, dry_run, dry_run_output, enable_flashbundle, - no_log_timestamps, pw_command_launcher): + out_prefix, ninja_jobs, pregen_dir, clean, dry_run, dry_run_output, + enable_flashbundle, no_log_timestamps, pw_command_launcher): # Ensures somewhat pretty logging of what is going on log_fmt = '%(asctime)s %(levelname)-7s %(message)s' if no_log_timestamps: @@ -161,7 +168,7 @@ def main(context, log_level, target, enable_link_map_file, repo, logging.info('Building targets: %s', CommaSeparate(requested_targets)) context.obj = build.Context( - repository_path=repo, output_prefix=out_prefix, runner=runner) + repository_path=repo, output_prefix=out_prefix, ninja_jobs=ninja_jobs, runner=runner) context.obj.SetupBuilders(targets=requested_targets, options=BuilderOptions( enable_link_map_file=enable_link_map_file, enable_flashbundle=enable_flashbundle, diff --git a/scripts/build/builders/ameba.py b/scripts/build/builders/ameba.py index 802ce1f73c..a4b3338b0c 100644 --- a/scripts/build/builders/ameba.py +++ b/scripts/build/builders/ameba.py @@ -85,8 +85,12 @@ def generate(self): title='Generating ' + self.identifier) def _build(self): - self._Execute(['ninja', '-C', self.output_dir], - title='Building ' + self.identifier) + cmd = ['ninja', '-C', self.output_dir] + + if self.ninja_jobs is not None: + cmd.append('-j' + str(self.ninja_jobs)) + + self._Execute(cmd, title='Building ' + self.identifier) def build_outputs(self): yield BuilderOutput( diff --git a/scripts/build/builders/android.py b/scripts/build/builders/android.py index 94d3a566a6..3f640177f1 100644 --- a/scripts/build/builders/android.py +++ b/scripts/build/builders/android.py @@ -466,8 +466,13 @@ def _build(self): title="Building APP " + self.identifier, ) else: + cmd = ["ninja", "-C", self.output_dir] + + if self.ninja_jobs is not None: + cmd.append('-j' + str(self.ninja_jobs)) + self._Execute( - ["ninja", "-C", self.output_dir], + cmd, title="Building JNI " + self.identifier, ) diff --git a/scripts/build/builders/efr32.py b/scripts/build/builders/efr32.py index 0ca8649b1a..cb80eab890 100644 --- a/scripts/build/builders/efr32.py +++ b/scripts/build/builders/efr32.py @@ -112,6 +112,7 @@ class Efr32Board(Enum): BRD4338A = 11 BRD2703A = 12 BRD2605A = 13 + BRD4343A = 14 def GnArgName(self): if self == Efr32Board.BRD2704B: @@ -140,6 +141,8 @@ def GnArgName(self): return 'BRD2703A' elif self == Efr32Board.BRD2605A: return 'BRD2605A' + elif self == Efr32Board.BRD4343A: + return 'BRD4343A' else: raise Exception('Unknown board #: %r' % self) diff --git a/scripts/build/builders/gn.py b/scripts/build/builders/gn.py index d2b09f393c..6d9385bd4f 100644 --- a/scripts/build/builders/gn.py +++ b/scripts/build/builders/gn.py @@ -95,6 +95,8 @@ def _build(self): self.PreBuildCommand() cmd = ['ninja', '-C', self.output_dir] + if self.ninja_jobs is not None: + cmd.append('-j' + str(self.ninja_jobs)) if self.build_command: cmd.append(self.build_command) diff --git a/scripts/build/builders/host.py b/scripts/build/builders/host.py index 624bd9ad74..3b81f5d944 100644 --- a/scripts/build/builders/host.py +++ b/scripts/build/builders/host.py @@ -72,6 +72,7 @@ class HostApp(Enum): BRIDGE = auto() FABRIC_ADMIN = auto() FABRIC_BRIDGE = auto() + FABRIC_SYNC = auto() JAVA_MATTER_CONTROLLER = auto() KOTLIN_MATTER_CONTROLLER = auto() CONTACT_SENSOR = auto() @@ -84,6 +85,7 @@ class HostApp(Enum): AIR_QUALITY_SENSOR = auto() NETWORK_MANAGER = auto() ENERGY_MANAGEMENT = auto() + WATER_LEAK_DETECTOR = auto() def ExamplePath(self): if self == HostApp.ALL_CLUSTERS: @@ -130,6 +132,8 @@ def ExamplePath(self): return 'fabric-admin' elif self == HostApp.FABRIC_BRIDGE: return 'fabric-bridge-app/linux' + elif self == HostApp.FABRIC_SYNC: + return 'fabric-sync' elif self == HostApp.JAVA_MATTER_CONTROLLER: return 'java-matter-controller' elif self == HostApp.KOTLIN_MATTER_CONTROLLER: @@ -154,6 +158,8 @@ def ExamplePath(self): return 'network-manager-app/linux' elif self == HostApp.ENERGY_MANAGEMENT: return 'energy-management-app/linux' + elif self == HostApp.WATER_LEAK_DETECTOR: + return 'water-leak-detector/linux' else: raise Exception('Unknown app type: %r' % self) @@ -233,6 +239,9 @@ def OutputNames(self): elif self == HostApp.FABRIC_BRIDGE: yield 'fabric-bridge-app' yield 'fabric-bridge-app.map' + elif self == HostApp.FABRIC_SYNC: + yield 'fabric-sync' + yield 'fabric-sync.map' elif self == HostApp.JAVA_MATTER_CONTROLLER: yield 'java-matter-controller' yield 'java-matter-controller.map' @@ -266,6 +275,9 @@ def OutputNames(self): elif self == HostApp.ENERGY_MANAGEMENT: yield 'chip-energy-management-app' yield 'chip-energy-management-app.map' + elif self == HostApp.WATER_LEAK_DETECTOR: + yield 'water-leak-detector-app' + yield 'water-leak-detector-app.map' else: raise Exception('Unknown app type: %r' % self) @@ -564,7 +576,14 @@ def generate(self): def PreBuildCommand(self): if self.app == HostApp.TESTS and self.use_coverage: - self._Execute(['ninja', '-C', self.output_dir, 'default'], title="Build-only") + cmd = ['ninja', '-C', self.output_dir] + + if self.ninja_jobs is not None: + cmd.append('-j' + str(self.ninja_jobs)) + + cmd.append('default') + + self._Execute(cmd, title="Build-only") self._Execute(['lcov', '--initial', '--capture', '--directory', os.path.join(self.output_dir, 'obj'), '--exclude', os.path.join(self.chip_dir, '**/tests/*'), '--exclude', os.path.join(self.chip_dir, 'zzz_generated/*'), diff --git a/scripts/build/builders/nrf.py b/scripts/build/builders/nrf.py index 5fbc417ffe..b94a695359 100644 --- a/scripts/build/builders/nrf.py +++ b/scripts/build/builders/nrf.py @@ -215,8 +215,12 @@ def generate(self): def _build(self): logging.info('Compiling NrfConnect at %s', self.output_dir) - self._Execute(['ninja', '-C', self.output_dir], - title='Building ' + self.identifier) + cmd = ['ninja', '-C', self.output_dir] + + if self.ninja_jobs is not None: + cmd.append('-j' + str(self.ninja_jobs)) + + self._Execute(cmd, title='Building ' + self.identifier) if self.app == NrfApp.UNIT_TESTS: # Note: running zephyr/zephyr.elf has the same result except it creates diff --git a/scripts/build/builders/nxp.py b/scripts/build/builders/nxp.py index c78ea1ca58..91155f20c9 100644 --- a/scripts/build/builders/nxp.py +++ b/scripts/build/builders/nxp.py @@ -51,6 +51,8 @@ def BuildSystem(self): class NxpBoard(Enum): K32W0 = auto() K32W1 = auto() + RT1060 = auto() + RT1170 = auto() RW61X = auto() RW61X_ETH = auto() MCXW71 = auto() @@ -60,6 +62,10 @@ def Name(self, os_env): return 'k32w0x' elif self == NxpBoard.K32W1: return 'k32w1' + elif self == NxpBoard.RT1060: + return 'rt1060' + elif self == NxpBoard.RT1170: + return 'rt1170' elif (self == NxpBoard.RW61X) or (self == NxpBoard.RW61X_ETH): if os_env == NxpOsUsed.ZEPHYR: if self == NxpBoard.RW61X_ETH: @@ -78,6 +84,10 @@ def FolderName(self, os_env): return 'k32w0' elif self == NxpBoard.K32W1: return 'k32w1' + elif self == NxpBoard.RT1060: + return 'rt/rt1060' + elif self == NxpBoard.RT1170: + return 'rt/rt1170' elif (self == NxpBoard.RW61X) or (self == NxpBoard.RW61X_ETH): if os_env == NxpOsUsed.ZEPHYR: return 'zephyr' @@ -92,15 +102,16 @@ def FolderName(self, os_env): class NxpBoardVariant(Enum): RD = auto() FRDM = auto() + EVKC = auto() + EVKB = auto() def BoardVariantName(self, board): - if board != NxpBoard.RW61X: - raise Exception('Board variants only supported for RW61X') - if self == NxpBoardVariant.RD: return "rdrw612bga" elif self == NxpBoardVariant.FRDM: return "frdm" + elif self == NxpBoardVariant.EVKC: + return "evkcmimxrt1060" class NxpApp(Enum): @@ -147,6 +158,14 @@ def BuildRoot(self, root, board, os_env): return os.path.join(root, 'examples', self.ExampleName(), 'nxp', board.FolderName(os_env)) +class NxpLogLevel(Enum): + DEFAULT = auto() # default everything + ALL = auto() # enable all logging + PROGRESS = auto() # progress and above + ERROR = auto() # error and above + NONE = auto() # no chip_logging at all + + class NxpBuilder(GnBuilder): def __init__(self, @@ -173,7 +192,12 @@ def __init__(self, enable_ota: bool = False, data_model_interface: Optional[str] = None, enable_factory_data_build: bool = False, - disable_pairing_autostart: bool = False): + disable_pairing_autostart: bool = False, + iw416_transceiver: bool = False, + w8801_transceiver: bool = False, + iwx12_transceiver: bool = False, + log_level: NxpLogLevel = NxpLogLevel.DEFAULT, + ): super(NxpBuilder, self).__init__( root=app.BuildRoot(root, board, os_env), runner=runner) @@ -200,12 +224,19 @@ def __init__(self, self.enable_factory_data_build = enable_factory_data_build self.disable_pairing_autostart = disable_pairing_autostart self.board_variant = board_variant + self.iw416_transceiver = iw416_transceiver + self.w8801_transceiver = w8801_transceiver + self.iwx12_transceiver = iwx12_transceiver + if self.low_power and log_level != NxpLogLevel.NONE: + logging.warning("Switching log level to 'NONE' for low power build") + log_level = NxpLogLevel.NONE + self.log_level = log_level def GnBuildArgs(self): args = [] if self.low_power: - args.append('chip_with_low_power=1 chip_logging=false') + args.append('chip_with_low_power=1') if self.board == NxpBoard.K32W0: args.append('chip_pw_tokenizer_logging=false chip_with_OM15082=0') @@ -227,6 +258,31 @@ def GnBuildArgs(self): if self.enable_rotating_id: args.append('chip_enable_rotating_device_id=1 chip_enable_additional_data_advertising=1') + if self.log_level == NxpLogLevel.DEFAULT: + pass + elif self.log_level == NxpLogLevel.ALL: + args.append("chip_logging=true") + args.append("chip_error_logging=true") + args.append("chip_progress_logging=true") + args.append("chip_detail_logging=true") + args.append("chip_automation_logging=true") + elif self.log_level == NxpLogLevel.PROGRESS: + args.append("chip_logging=true") + args.append("chip_error_logging=true") + args.append("chip_progress_logging=true") + args.append("chip_detail_logging=false") + args.append("chip_automation_logging=false") + elif self.log_level == NxpLogLevel.ERROR: + args.append("chip_logging=true") + args.append("chip_error_logging=true") + args.append("chip_progress_logging=false") + args.append("chip_detail_logging=false") + args.append("chip_automation_logging=false") + elif self.log_level == NxpLogLevel.NONE: + args.append("chip_logging=false") + else: + raise Exception("Unknown log level: %r", self.log_level) + if self.has_sw_version_2: args.append('nxp_software_version=2') @@ -248,10 +304,32 @@ def GnBuildArgs(self): # thread is enabled by default on kw32 if self.board == NxpBoard.RW61X: args.append('chip_enable_openthread=true chip_inet_config_enable_ipv4=false') + if self.board == NxpBoard.RT1060: + args.append('chip_enable_openthread=true chip_inet_config_enable_ipv4=false') + if self.board == NxpBoard.RT1170: + args.append('chip_enable_openthread=true chip_inet_config_enable_ipv4=false') if self.data_model_interface is not None: args.append(f'chip_use_data_model_interface="{self.data_model_interface}"') + if self.board_variant: + if self.board == NxpBoard.RT1060: + flag_board_variant = "evkname=\\\"%s\\\"" % self.board_variant.BoardVariantName(self.board) + args.append(flag_board_variant) + if self.board == NxpBoard.RW61X: + flag_board_variant = "board_version=\\\"%s\\\"" % self.board_variant.BoardVariantName(self.board) + args.append(flag_board_variant) + + if self.iw416_transceiver: + args.append('iw416_transceiver=true') + + if self.w8801_transceiver: + # BLE not supported on this transceiver + args.append('w8801_transceiver=true chip_enable_ble=false') + + if self.iwx12_transceiver: + args.append('iwx12_transceiver=true') + return args def CmakeBuildFlags(self): diff --git a/scripts/build/builders/telink.py b/scripts/build/builders/telink.py index 6ac4c30ca2..2badbce4d1 100644 --- a/scripts/build/builders/telink.py +++ b/scripts/build/builders/telink.py @@ -238,6 +238,9 @@ def _build(self): cmd = self.get_cmd_prefixes() + ("ninja -C %s" % self.output_dir) + if self.ninja_jobs is not None: + cmd += " -j%s" % str(self.ninja_jobs) + self._Execute(['bash', '-c', cmd], title='Building ' + self.identifier) def build_outputs(self): diff --git a/scripts/build/builders/tizen.py b/scripts/build/builders/tizen.py index b9b9c59661..8c7968888e 100644 --- a/scripts/build/builders/tizen.py +++ b/scripts/build/builders/tizen.py @@ -39,11 +39,6 @@ class TizenApp(Enum): 'examples/all-clusters-app/tizen', ('chip-all-clusters-app', 'chip-all-clusters-app.map')) - ALL_CLUSTERS_MINIMAL = App( - 'chip-all-clusters-minimal-app', - 'examples/all-clusters-minimal-app/tizen', - ('chip-all-clusters-minimal-app', - 'chip-all-clusters-minimal-app.map')) LIGHT = App( 'chip-lighting-app', 'examples/lighting-app/tizen', diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index 93e375c857..084b80bea3 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -5,15 +5,15 @@ bouffalolab-{bl602dk,bl704ldk,bl706dk,bl602-night-light,bl706-night-light,bl602- cc32xx-{lock,air-purifier} ti-cc13x4_26x4-{lighting,lock,pump,pump-controller}[-mtd][-ftd] cyw30739-{cyw30739b2_p5_evk_01,cyw30739b2_p5_evk_02,cyw30739b2_p5_evk_03,cyw930739m2evb_01,cyw930739m2evb_02}-{light,light-switch,lock,thermostat} -efr32-{brd2704b,brd4316a,brd4317a,brd4318a,brd4319a,brd4186a,brd4187a,brd2601b,brd4187c,brd4186c,brd2703a,brd4338a,brd2605a}-{window-covering,switch,unit-test,light,lock,thermostat,pump,air-quality-sensor-app}[-rpc][-with-ota-requestor][-icd][-low-power][-shell][-no-logging][-openthread-mtd][-heap-monitoring][-no-openthread-cli][-show-qr-code][-wifi][-rs9116][-wf200][-siwx917][-ipv4][-additional-data-advertising][-use-ot-lib][-use-ot-coap-lib][-no-version][-skip-rps-generation] +efr32-{brd2704b,brd4316a,brd4317a,brd4318a,brd4319a,brd4186a,brd4187a,brd2601b,brd4187c,brd4186c,brd2703a,brd4338a,brd2605a,brd4343a}-{window-covering,switch,unit-test,light,lock,thermostat,pump,air-quality-sensor-app}[-rpc][-with-ota-requestor][-icd][-low-power][-shell][-no-logging][-openthread-mtd][-heap-monitoring][-no-openthread-cli][-show-qr-code][-wifi][-rs9116][-wf200][-siwx917][-ipv4][-additional-data-advertising][-use-ot-lib][-use-ot-coap-lib][-no-version][-skip-rps-generation] esp32-{m5stack,c3devkit,devkitc,qemu}-{all-clusters,all-clusters-minimal,energy-management,ota-provider,ota-requestor,shell,light,lock,bridge,temperature-measurement,ota-requestor,tests}[-rpc][-ipv6only][-tracing][-data-model-disabled][-data-model-enabled] genio-lighting-app linux-fake-tests[-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-pw-fuzztest][-coverage][-dmalloc][-clang] -linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,kotlin-matter-controller,minmdns,light,light-data-model-no-unique-id,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,fabric-admin,fabric-bridge,tests,chip-cert,address-resolve-tool,contact-sensor,dishwasher,microwave-oven,refrigerator,rvc,air-purifier,lit-icd,air-quality-sensor,network-manager,energy-management}[-nodeps][-nlfaultinject][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-no-shell][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-pw-fuzztest][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui][-evse-test-event][-enable-dnssd-tests][-disable-dnssd-tests][-chip-casting-simplified][-data-model-check][-data-model-disabled][-data-model-enabled][-check-failure-die] +linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,kotlin-matter-controller,minmdns,light,light-data-model-no-unique-id,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,fabric-admin,fabric-bridge,fabric-sync,tests,chip-cert,address-resolve-tool,contact-sensor,dishwasher,microwave-oven,refrigerator,rvc,air-purifier,lit-icd,air-quality-sensor,network-manager,energy-management,water-leak-detector}[-nodeps][-nlfaultinject][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-no-shell][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-pw-fuzztest][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui][-evse-test-event][-enable-dnssd-tests][-disable-dnssd-tests][-chip-casting-simplified][-data-model-check][-data-model-disabled][-data-model-enabled][-check-failure-die] linux-x64-efr32-test-runner[-clang] imx-{chip-tool,lighting-app,thermostat,all-clusters-app,all-clusters-minimal-app,ota-provider-app}[-release] infineon-psoc6-{lock,light,all-clusters,all-clusters-minimal}[-ota][-updateimage][-trustm] -nxp-{k32w0,k32w1,rw61x,rw61x_eth,mcxw71}-{zephyr,freertos}-{lighting,contact-sensor,lock-app,all-clusters,laundry-washer,thermostat}[-factory][-low-power][-lit][-fro32k][-smu2][-dac-conversion][-rotating-id][-sw-v2][-ota][-wifi][-ethernet][-thread][-matter-shell][-data-model-disabled][-data-model-enabled][-factory-build][-frdm][-cmake] +nxp-{k32w0,k32w1,rt1060,rt1170,rw61x,rw61x_eth,mcxw71}-{zephyr,freertos}-{lighting,contact-sensor,lock-app,all-clusters,laundry-washer,thermostat}[-factory][-low-power][-lit][-fro32k][-smu2][-dac-conversion][-rotating-id][-sw-v2][-ota][-wifi][-ethernet][-thread][-matter-shell][-data-model-disabled][-data-model-enabled][-factory-build][-frdm][-cmake][-evkc][-iw416][-w8801][-iwx12][-log-all][-log-progress][-log-error][-log-none] mbed-cy8cproto_062_4343w-{lock,light,all-clusters,all-clusters-minimal,pigweed,ota-requestor,shell}[-release][-develop][-debug][-data-model-disabled][-data-model-enabled] mw320-all-clusters-app nrf-{nrf5340dk,nrf52840dk,nrf52840dongle}-{all-clusters,all-clusters-minimal,lock,light,light-switch,shell,pump,pump-controller,window-covering}[-rpc][-data-model-disabled][-data-model-enabled] @@ -21,6 +21,6 @@ nrf-native-posix-64-tests nuttx-x64-light qpg-qpg6105-{lock,light,shell,persistent-storage,light-switch,thermostat}[-updateimage][-data-model-disabled][-data-model-enabled] stm32-stm32wb5mm-dk-light -tizen-arm-{all-clusters,all-clusters-minimal,chip-tool,light,tests}[-no-ble][-no-thread][-no-wifi][-asan][-ubsan][-with-ui] +tizen-arm-{all-clusters,chip-tool,light,tests}[-no-ble][-no-thread][-no-wifi][-asan][-ubsan][-with-ui] telink-{tlsr9118bdk40d,tlsr9518adk80d,tlsr9528a,tlsr9528a_retention,tlsr9258a,tlsr9258a_retention}-{air-quality-sensor,all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,shell,smoke-co-alarm,temperature-measurement,thermostat,window-covering}[-ota][-dfu][-shell][-rpc][-factory-data][-4mb][-mars][-usb][-data-model-disabled][-data-model-enabled] openiotsdk-{shell,lock}[-mbedtls][-psa] diff --git a/scripts/build_coverage.sh b/scripts/build_coverage.sh index 9e7b4a0fe8..1bb68a2911 100755 --- a/scripts/build_coverage.sh +++ b/scripts/build_coverage.sh @@ -50,6 +50,7 @@ SUPPORTED_TESTS=(unit yaml all) CODE="core" TESTS="unit" skip_gn=false +TEST_TARGET=check help() { @@ -70,6 +71,7 @@ help() { 'unit': Run unit test to drive the coverage check. --default 'yaml': Run yaml test to drive the coverage check. 'all': Run unit & yaml test to drive the coverage check. + --target Specific test target to run (e.g. TestEmberAttributeBuffer.run) " } @@ -89,6 +91,9 @@ for i in "$@"; do TESTS="${i#*=}" shift ;; + --target=*) + TEST_TARGET="${i#*=}" + ;; -o=* | --output_root=*) OUTPUT_ROOT="${i#*=}" COVERAGE_ROOT="$OUTPUT_ROOT/coverage" @@ -121,20 +126,21 @@ if [ "$skip_gn" == false ]; then # Generates ninja files EXTRA_GN_ARGS="" if [[ "$TESTS" == "yaml" || "$TESTS" == "all" ]]; then - EXTRA_GN_ARGS="$EXTRA_GN_ARGS chip_build_all_clusters_app=true" + EXTRA_GN_ARGS="$EXTRA_GN_ARGS chip_build_all_clusters_app=true" else EXTRA_GN_ARGS="$EXTRA_GN_ARGS chip_build_tools=false" fi gn --root="$CHIP_ROOT" gen "$OUTPUT_ROOT" --args="use_coverage=true$EXTRA_GN_ARGS" - ninja -C "$OUTPUT_ROOT" # Run unit tests if [[ "$TESTS" == "unit" || "$TESTS" == "all" ]]; then - ninja -C "$OUTPUT_ROOT" check + ninja -C "$OUTPUT_ROOT" "$TEST_TARGET" fi # Run yaml tests if [[ "$TESTS" == "yaml" || "$TESTS" == "all" ]]; then + ninja -C "$OUTPUT_ROOT" + scripts/run_in_build_env.sh \ "./scripts/tests/run_test_suite.py \ --chip-tool ""$OUTPUT_ROOT/chip-tool \ diff --git a/scripts/build_python.sh b/scripts/build_python.sh index da3fe0cbed..7f03815f3f 100755 --- a/scripts/build_python.sh +++ b/scripts/build_python.sh @@ -175,22 +175,6 @@ tracing_options="matter_log_json_payload_hex=true matter_log_json_payload_decode gn --root="$CHIP_ROOT" gen "$OUTPUT_ROOT" --args="$tracing_options chip_detail_logging=$chip_detail_logging chip_project_config_include_dirs=[\"//config/python\"] $chip_mdns_arg $chip_case_retry_arg $pregen_dir_arg chip_config_network_layer_ble=$enable_ble chip_enable_ble=$enable_ble chip_crypto=\"boringssl\"" -function ninja_target() { - # Print the ninja target required to build a gn label. - local GN_LABEL="$1" - local NINJA_TARGET="$(gn ls "$OUTPUT_ROOT" --as=output "$GN_LABEL")" - echo "$NINJA_TARGET" -} - -function wheel_output_dir() { - # Print the wheel output directory for a pw_python_package or - # pw_python_distribution. The label must end in "._build_wheel". - local GN_LABEL="$1" - local NINJA_TARGET="$(ninja_target "$GN_LABEL")" - local WHEEL_DIR="$OUTPUT_ROOT"/"$(dirname "$NINJA_TARGET")/$(basename -s .stamp "$NINJA_TARGET")" - echo "$WHEEL_DIR" -} - # Compile Python wheels ninja -C "$OUTPUT_ROOT" python_wheels @@ -200,6 +184,11 @@ WHEEL=("$OUTPUT_ROOT"/controller/python/chip*.whl) # Add the matter_testing_infrastructure wheel WHEEL+=("$OUTPUT_ROOT"/python/obj/src/python_testing/matter_testing_infrastructure/chip-testing._build_wheel/chip_testing-*.whl) +if [ "$install_pytest_requirements" = "yes" ]; then + # Add the matter_yamltests_distribution wheel + WHEEL+=("$OUTPUT_ROOT"/obj/scripts/matter_yamltests_distribution._build_wheel/matter_yamltests-*.whl) +fi + if [ -n "$extra_packages" ]; then WHEEL+=("$extra_packages") fi @@ -221,14 +210,7 @@ if [ -n "$install_virtual_env" ]; then "$ENVIRONMENT_ROOT"/bin/python -m pip install --upgrade "${WHEEL[@]}" if [ "$install_pytest_requirements" = "yes" ]; then - YAMLTESTS_GN_LABEL="//scripts:matter_yamltests_distribution._build_wheel" - # Add wheels from pw_python_package or pw_python_distribution templates. - YAMLTEST_WHEEL=( - "$(ls -tr "$(wheel_output_dir "$YAMLTESTS_GN_LABEL")"/*.whl | head -n 1)" - ) - echo_blue "Installing python test dependencies ..." - "$ENVIRONMENT_ROOT"/bin/pip install --upgrade "${YAMLTEST_WHEEL[@]}" "$ENVIRONMENT_ROOT"/bin/pip install -r "$CHIP_ROOT/scripts/tests/requirements.txt" "$ENVIRONMENT_ROOT"/bin/pip install -r "$CHIP_ROOT/src/python_testing/requirements.txt" fi diff --git a/scripts/examples/gn_silabs_example.sh b/scripts/examples/gn_silabs_example.sh index a72e4e1a90..bc06f8b2d2 100755 --- a/scripts/examples/gn_silabs_example.sh +++ b/scripts/examples/gn_silabs_example.sh @@ -302,7 +302,7 @@ else fi # 917 exception. TODO find a more generic way - if [ "$SILABS_BOARD" == "BRD4338A" ] || [ "$SILABS_BOARD" == "BRD2605A" ]; then + if [ "$SILABS_BOARD" == "BRD4338A" ] || [ "$SILABS_BOARD" == "BRD2605A" ] || [ "$SILABS_BOARD" == "BRD4343A" ]; then echo "Compiling for 917 WiFi SOC" USE_WIFI=true fi diff --git a/scripts/icecc.sh b/scripts/icecc.sh new file mode 100755 index 0000000000..54783a4874 --- /dev/null +++ b/scripts/icecc.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2024 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 scripts starts or stops the iceccd. +# It's meant to be use within devcontainer. + +if [ "$1" = "start" ]; then + IFS='.' read -ra PARTS <<<"$HOSTNAME" + if iceccd -d -m 0 -N "devcontainer-${PARTS[0]}"; then + echo "iceccd started" + else + echo "Failed to start iceccd" + fi +fi + +if [ "$1" = "stop" ]; then + if pkill icecc; then + echo "iceccd stopped" + else + echo "Failed to stop iceccd" + fi +fi diff --git a/scripts/py_matter_yamltests/matter_yamltests/hooks.py b/scripts/py_matter_yamltests/matter_yamltests/hooks.py index d14e90a7aa..ca739b8ea2 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/hooks.py +++ b/scripts/py_matter_yamltests/matter_yamltests/hooks.py @@ -152,7 +152,7 @@ def step_skipped(self, name: str, expression: str): """ pass - def step_start(self, request: TestStep, endpoint: Optional[int] = None): + def step_start(self, request: TestStep): """ This method is called when the runner starts running a step from the test. @@ -160,8 +160,6 @@ def step_start(self, request: TestStep, endpoint: Optional[int] = None): ---------- request: TestStep The original request as defined by the test step. - endpoint: int - An optional device endpoint the step will target. """ pass diff --git a/scripts/rules.matterlint b/scripts/rules.matterlint index 1573cc7065..4f61d26be7 100644 --- a/scripts/rules.matterlint +++ b/scripts/rules.matterlint @@ -14,6 +14,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/boolean-state-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/actions-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml"; +load "../src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/chip-ota.xml"; @@ -108,6 +109,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml"; +load "../src/app/zap-templates/zcl/data-model/chip/webrtc-requestor-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml"; @@ -119,6 +121,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.x load "../src/app/zap-templates/zcl/data-model/chip/sample-mei-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml"; +load "../src/app/zap-templates/zcl/data-model/chip/zone-management-cluster.xml"; all endpoints { // These attributes follow a different code path and do not have to be diff --git a/scripts/run-clang-tidy-on-compile-commands.py b/scripts/run-clang-tidy-on-compile-commands.py index 407caaa6f4..ee3bdc8f33 100755 --- a/scripts/run-clang-tidy-on-compile-commands.py +++ b/scripts/run-clang-tidy-on-compile-commands.py @@ -40,6 +40,7 @@ import tempfile import threading import traceback +from pathlib import Path import click import coloredlogs @@ -92,20 +93,19 @@ def __init__(self, json_entry, gcc_sysroot=None): # # However that seems to potentially disable a lot, so for now just filter out the # offending argument - command_items = [arg for arg in command_items if arg not in {'-c', '-S'}] + command_items = [arg for arg in command_items if arg not in {"-c", "-S"}] # Allow gcc/g++ invocations to also be tidied - arguments should be # compatible and on darwin gcc/g++ is actually a symlink to clang - if compiler in ['clang++', 'clang', 'gcc', 'g++']: + if compiler in ["clang++", "clang", "gcc", "g++"]: self.valid = True self.clang_arguments = command_items[1:] else: - logging.warning( - "Cannot tidy %s - not a clang compile command", self.file) + logging.warning("Cannot tidy %s - not a clang compile command", self.file) return - if compiler in ['gcc', 'g++'] and gcc_sysroot: - self.clang_arguments.insert(0, '--sysroot='+gcc_sysroot) + if compiler in ["gcc", "g++"] and gcc_sysroot: + self.clang_arguments.insert(0, "--sysroot=" + gcc_sysroot) @property def full_path(self): @@ -122,8 +122,12 @@ def SetChecks(self, checks: str): def Check(self): logging.debug("Running tidy on %s from %s", self.file, self.directory) try: - cmd = ["clang-tidy", self.file] + \ - self.tidy_arguments + ["--"] + self.clang_arguments + cmd = ( + ["clang-tidy", self.file] + + self.tidy_arguments + + ["--"] + + self.clang_arguments + ) logging.debug("Executing: %r" % cmd) proc = subprocess.Popen( @@ -156,7 +160,7 @@ def Check(self): "Use -system-headers to display errors from system headers as well.", ] - for line in err.decode('utf-8').split('\n'): + for line in err.decode("utf-8").split("\n"): line = line.strip() if any(map(lambda s: s in line, skip_strings)): @@ -165,7 +169,7 @@ def Check(self): if not line: continue # no empty lines - logging.warning('TIDY %s: %s', self.file, line) + logging.warning("TIDY %s: %s", self.file, line) if proc.returncode != 0: if proc.returncode < 0: @@ -203,18 +207,20 @@ def Failure(self, path: str): def find_darwin_gcc_sysroot(): - for line in subprocess.check_output('xcodebuild -sdk -version'.split()).decode('utf8').split('\n'): - if not line.startswith('Path: '): + for line in subprocess.check_output( + "xcodebuild -sdk -version".split(), text=True + ).splitlines(): + if not line.startswith("Path: "): continue - path = line[line.find(': ')+2:] - if '/MacOSX.platform/' not in path: + path = line[line.find(": ") + 2:] + if "/MacOSX.platform/" not in path: continue logging.info("Found %s" % path) return path # A hard-coded value that works on default installations logging.warning("Using default platform sdk path. This may be incorrect.") - return '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' + return "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" class ClangTidyRunner: @@ -228,13 +234,12 @@ def __init__(self): self.gcc_sysroot = None self.file_names_to_check = set() - if sys.platform == 'darwin': + if sys.platform == "darwin": # Darwin gcc invocation will auto select a system root, however clang requires an explicit path since # we are using the built-in pigweed clang-tidy. - logging.info( - 'Searching for a MacOS system root for gcc invocations...') + logging.info("Searching for a MacOS system root for gcc invocations...") self.gcc_sysroot = find_darwin_gcc_sysroot() - logging.info(' Chose: %s' % self.gcc_sysroot) + logging.info(" Chose: %s" % self.gcc_sysroot) def AddDatabase(self, compile_commands_json): database = json.load(open(compile_commands_json)) @@ -245,7 +250,7 @@ def AddDatabase(self, compile_commands_json): continue if item.file in self.file_names_to_check: - logging.info('Ignoring additional request for checking %s', item.file) + logging.info("Ignoring additional request for checking %s", item.file) continue self.file_names_to_check.add(item.file) @@ -270,12 +275,12 @@ def Cleanup(self): # Allow all diagnostics for distinct paths to be applied # at once but never again for future paths for d in diagnostics: - if d['DiagnosticMessage']['FilePath'] not in already_seen: + if d["DiagnosticMessage"]["FilePath"] not in already_seen: all_diagnostics.append(d) # in the future assume these files were already processed for d in diagnostics: - already_seen.add(d['DiagnosticMessage']['FilePath']) + already_seen.add(d["DiagnosticMessage"]["FilePath"]) if all_diagnostics: with open(self.fixes_file, "w") as out: @@ -304,8 +309,7 @@ def ExportFixesTo(self, f): for idx, e in enumerate(self.entries): e.ExportFixesTo( os.path.join( - self.fixes_temporary_file_dir.name, "fixes%d.yaml" % ( - idx + 1,) + self.fixes_temporary_file_dir.name, "fixes%d.yaml" % (idx + 1,) ) ) @@ -407,6 +411,12 @@ def Check(self): type=str, help="Checks to run (passed in to clang-tidy). If not set the .clang-tidy file is used.", ) +@click.option( + "--file-list-file", + default=None, + type=click.Path(exists=True), + help="When provided, only tidy files that match files mentioned in this file.", +) @click.pass_context def main( context, @@ -417,6 +427,7 @@ def main( no_log_timestamps, export_fixes, checks, + file_list_file, ): log_fmt = "%(asctime)s %(levelname)-7s %(message)s" if no_log_timestamps: @@ -452,6 +463,14 @@ def cleanup(): r = re.compile(file_exclude_regex) runner.FilterEntries(lambda e: not r.search(e.file)) + if file_list_file: + acceptable = set() + with open(file_list_file, "rt") as f: + for file_name in f.readlines(): + acceptable.add(Path(file_name.strip()).resolve().as_posix()) + + runner.FilterEntries(lambda e: e.full_path in acceptable) + if export_fixes: runner.ExportFixesTo(export_fixes) @@ -492,4 +511,4 @@ def cmd_fix(context): if __name__ == "__main__": - main(auto_envvar_prefix='CHIP') + main(auto_envvar_prefix="CHIP") diff --git a/scripts/setup/zap.json b/scripts/setup/zap.json index 38dec06969..8b18116caa 100644 --- a/scripts/setup/zap.json +++ b/scripts/setup/zap.json @@ -8,13 +8,13 @@ "mac-amd64", "windows-amd64" ], - "tags": ["version:2@v2024.08.14-nightly.1"] + "tags": ["version:2@v2024.10.15-nightly.1"] }, { "_comment": "Always get the amd64 version on mac until usable arm64 zap build is available", "path": "fuchsia/third_party/zap/mac-amd64", "platforms": ["mac-arm64"], - "tags": ["version:2@v2024.08.14-nightly.1"] + "tags": ["version:2@v2024.10.15-nightly.1"] } ] } diff --git a/scripts/setup/zap.version b/scripts/setup/zap.version index 5e2fd1daf0..e58d8c5cac 100644 --- a/scripts/setup/zap.version +++ b/scripts/setup/zap.version @@ -1 +1 @@ -v2024.08.14-nightly +v2024.10.15-nightly diff --git a/scripts/spec_xml/generate_spec_xml.py b/scripts/spec_xml/generate_spec_xml.py index 0d41b3f519..43582fdb36 100755 --- a/scripts/spec_xml/generate_spec_xml.py +++ b/scripts/spec_xml/generate_spec_xml.py @@ -24,26 +24,17 @@ from pathlib import Path import click +from paths import Branch, get_chip_root, get_data_model_path, get_documentation_file_path, get_in_progress_defines -DEFAULT_CHIP_ROOT = os.path.abspath( - os.path.join(os.path.dirname(__file__), '..', '..')) -DEFAULT_OUTPUT_DIR_1_3 = os.path.abspath( - os.path.join(DEFAULT_CHIP_ROOT, 'data_model', '1.3')) -DEFAULT_OUTPUT_DIR_IN_PROGRESS = os.path.abspath( - os.path.join(DEFAULT_CHIP_ROOT, 'data_model', 'in_progress')) -DEFAULT_OUTPUT_DIR_TOT = os.path.abspath( - os.path.join(DEFAULT_CHIP_ROOT, 'data_model', 'master')) -DEFAULT_DOCUMENTATION_FILE = os.path.abspath( - os.path.join(DEFAULT_CHIP_ROOT, 'docs', 'spec_clusters.md')) - -# questions -# is energy-calendar still in? -# is heat-pump out? wasn't in 0.7 -# location-cluster - is this define gone now? -# queuedpreset - is this define gone now? -CURRENT_IN_PROGRESS_DEFINES = ['aliro', 'atomicwrites', 'battery-storage', 'device-location', 'e2e-jf', 'energy-calendar', 'energy-drlc', - 'energy-management', 'heat-pump', 'hrap-1', 'hvac', 'matter-fabric-synchronization', 'metering', 'secondary-net', - 'service-area-cluster', 'solar-power', 'tcp', 'water-heater', 'wifiSetup'] +# Use the get_in_progress_defines() function to fetch the in-progress defines +CURRENT_IN_PROGRESS_DEFINES = get_in_progress_defines() + +# Replace hardcoded paths with dynamic paths using paths.py functions +DEFAULT_CHIP_ROOT = get_chip_root() +DEFAULT_OUTPUT_DIR_1_3 = get_data_model_path(Branch.V1_3) +DEFAULT_OUTPUT_DIR_IN_PROGRESS = get_data_model_path(Branch.IN_PROGRESS) +DEFAULT_OUTPUT_DIR_TOT = get_data_model_path(Branch.MASTER) +DEFAULT_DOCUMENTATION_FILE = get_documentation_file_path() def get_xml_path(filename, output_dir): @@ -90,7 +81,6 @@ def make_asciidoc(target: str, include_in_progress: str, spec_dir: str, dry_run: '--include-in-progress', type=click.Choice(['All', 'None', 'Current']), default='All') def main(scraper, spec_root, output_dir, dry_run, include_in_progress): - # Clusters need to be scraped first because the cluster directory is passed to the device type directory if not output_dir: output_dir_map = {'All': DEFAULT_OUTPUT_DIR_TOT, 'None': DEFAULT_OUTPUT_DIR_1_3, 'Current': DEFAULT_OUTPUT_DIR_IN_PROGRESS} output_dir = output_dir_map[include_in_progress] @@ -103,30 +93,28 @@ def main(scraper, spec_root, output_dir, dry_run, include_in_progress): def scrape_clusters(scraper, spec_root, output_dir, dry_run, include_in_progress): src_dir = os.path.abspath(os.path.join(spec_root, 'src')) - sdm_clusters_dir = os.path.abspath( - os.path.join(src_dir, 'service_device_management')) + sdm_clusters_dir = os.path.abspath(os.path.join(src_dir, 'service_device_management')) app_clusters_dir = os.path.abspath(os.path.join(src_dir, 'app_clusters')) dm_clusters_dir = os.path.abspath(os.path.join(src_dir, 'data_model')) - media_clusters_dir = os.path.abspath( - os.path.join(app_clusters_dir, 'media')) - clusters_output_dir = os.path.abspath(os.path.join(output_dir, 'clusters')) + media_clusters_dir = os.path.abspath(os.path.join(app_clusters_dir, 'media')) + + clusters_output_dir = os.path.join(output_dir, 'clusters') if not os.path.exists(clusters_output_dir): os.makedirs(clusters_output_dir) - print('Generating main spec to get file include list - this make take a few minutes') + print('Generating main spec to get file include list - this may take a few minutes') main_out = make_asciidoc('pdf', include_in_progress, spec_root, dry_run) - print('Generating cluster spec to get file include list - this make take a few minutes') + print('Generating cluster spec to get file include list - this may take a few minutes') cluster_out = make_asciidoc('pdf-appclusters-book', include_in_progress, spec_root, dry_run) def scrape_cluster(filename: str) -> None: base = Path(filename).stem if base not in main_out and base not in cluster_out: - print(f'skipping file: {base} as it is not compiled into the asciidoc') + print(f'Skipping file: {base} as it is not compiled into the asciidoc') return xml_path = get_xml_path(filename, clusters_output_dir) - cmd = [scraper, 'cluster', '-i', filename, '-o', - xml_path, '-nd'] + cmd = [scraper, 'cluster', '-i', filename, '-o', xml_path, '-nd'] if include_in_progress == 'All': cmd.extend(['--define', 'in-progress']) elif include_in_progress == 'Current': @@ -150,33 +138,29 @@ def scrape_all_clusters(dir: str, exclude_list: list[str] = []) -> None: tree = ElementTree.parse(f'{xml_path}') root = tree.getroot() cluster = next(root.iter('cluster')) - # If there's no cluster ID table, this isn't a cluster try: next(cluster.iter('clusterIds')) except StopIteration: - # If there's no cluster ID table, this isn't a cluster just some kind of intro adoc print(f'Removing file {xml_path} as it does not include any cluster definitions') os.remove(xml_path) continue def scrape_device_types(scraper, spec_root, output_dir, dry_run, include_in_progress): - device_type_dir = os.path.abspath( - os.path.join(spec_root, 'src', 'device_types')) - device_types_output_dir = os.path.abspath( - os.path.join(output_dir, 'device_types')) + device_type_dir = os.path.abspath(os.path.join(spec_root, 'src', 'device_types')) + device_types_output_dir = os.path.abspath(os.path.join(output_dir, 'device_types')) clusters_output_dir = os.path.abspath(os.path.join(output_dir, 'clusters')) if not os.path.exists(device_types_output_dir): os.makedirs(device_types_output_dir) - print('Generating device type library to get file include list - this make take a few minutes') + print('Generating device type library to get file include list - this may take a few minutes') device_type_output = make_asciidoc('pdf-devicelibrary-book', include_in_progress, spec_root, dry_run) def scrape_device_type(filename: str) -> None: base = Path(filename).stem if base not in device_type_output: - print(f'skipping file: {filename} as it is not compiled into the asciidoc') + print(f'Skipping file: {filename} as it is not compiled into the asciidoc') return xml_path = get_xml_path(filename, device_types_output_dir) cmd = [scraper, 'devicetype', '-c', '-cls', clusters_output_dir, diff --git a/scripts/spec_xml/paths.py b/scripts/spec_xml/paths.py new file mode 100644 index 0000000000..3a5159cc51 --- /dev/null +++ b/scripts/spec_xml/paths.py @@ -0,0 +1,109 @@ +#!/usr/bin/env python3 + +# Copyright (c) 2024 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 os +from enum import Enum + +# Define a branch enum for different versions or branches + + +class Branch(Enum): + MASTER = "master" + V1_3 = "v1_3" + V1_4 = "v1_4" + IN_PROGRESS = "in_progress" + + +def get_chip_root(): + """ + Returns the CHIP root directory, trying the environment variable first + and falling back if necessary. + """ + chip_root = os.getenv('PW_PROJECT_ROOT') + if chip_root: + return chip_root + else: + try: + return os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) + except Exception as e: + raise EnvironmentError( + "Unable to determine CHIP root directory. Please ensure the environment is activated." + ) from e + + +def get_data_model_path(branch: Branch): + """ + Returns the path to the data model directory for a given branch. + """ + chip_root = get_chip_root() + data_model_path = os.path.join(chip_root, 'data_model', branch.value) + if not os.path.exists(data_model_path): + raise FileNotFoundError(f"Data model path for branch {branch} does not exist: {data_model_path}") + return data_model_path + + +def get_spec_xml_output_path(): + """ + Returns the path to the output directory for generated XML files. + """ + chip_root = get_chip_root() + output_dir = os.path.join(chip_root, 'out', 'spec_xml') + if not os.path.exists(output_dir): + os.makedirs(output_dir) # Automatically create the directory if it doesn't exist + return output_dir + + +def get_documentation_file_path(): + """ + Returns the path to the documentation file. + """ + chip_root = get_chip_root() + documentation_file = os.path.join(chip_root, 'docs', 'spec_clusters.md') + if not os.path.exists(documentation_file): + raise FileNotFoundError(f"Documentation file does not exist: {documentation_file}") + return documentation_file + + +def get_python_testing_path(): + """ + Returns the path to the python_testing directory. + """ + chip_root = get_chip_root() + python_testing_path = os.path.join(chip_root, 'src', 'python_testing') + if not os.path.exists(python_testing_path): + raise FileNotFoundError(f"Python testing directory does not exist: {python_testing_path}") + return python_testing_path + + +def get_in_progress_defines(): + """ + Returns a list of defines that are currently in progress. + This can be updated dynamically as needed. + """ + return [ + 'aliro', 'atomicwrites', 'battery-storage', 'device-location', 'e2e-jf', + 'energy-calendar', 'energy-drlc', 'energy-management', 'heat-pump', 'hrap-1', + 'hvac', 'matter-fabric-synchronization', 'metering', 'secondary-net', + 'service-area-cluster', 'solar-power', 'tcp', 'water-heater', 'wifiSetup' + ] + + +def get_available_branches(): + """ + Return a list of available branches for the data model. + This can be expanded or dynamically fetched if necessary. + """ + return [Branch.MASTER, Branch.V1_3, Branch.V1_4] diff --git a/scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py b/scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py index 567bf146c7..0753c7aed1 100755 --- a/scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py +++ b/scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py @@ -57,9 +57,9 @@ def run_test_section(self, app_args: str, script_args: str, factory_reset_all: b cmd = self.get_base_run_python_cmd(self.run_python_test_path, self.app_path, app_args, self.script_path, script_args) if factory_reset_all: - cmd = cmd + ' --factoryreset' + cmd = cmd + ' --factory-reset' if factory_reset_app: - cmd = cmd + ' --factoryreset-app-only' + cmd = cmd + ' --factory-reset-app-only' logging.info(f'Running cmd {cmd}') diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 161d3b8c0c..5cb891a014 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -235,6 +235,7 @@ def _GetChipReplUnsupportedTests() -> Set[str]: "TestReadNoneSubscribeNone.yaml", # chip-repl does not support AnyCommands (07/27/2023) "Test_TC_IDM_1_2.yaml", # chip-repl does not support AnyCommands (19/07/2023) "Test_TC_BRBINFO_2_1.yaml", # chip-repl does not support AnyCommands (24/07/2024) + "TestThermostat.yaml", # chip-repl does not support AnyCommands (14/10/2024) "TestIcdManagementCluster.yaml", # TODO(#30430): add ICD registration support in chip-repl "Test_TC_ICDM_3_4.yaml", # chip-repl does not support ICD registration # chip-repl and chip-tool disagree on what the YAML here should look like: https://github.com/project-chip/connectedhomeip/issues/29110 diff --git a/scripts/tests/matter_yaml_linter.py b/scripts/tests/matter_yaml_linter.py index 4fdcb765ce..308e151824 100644 --- a/scripts/tests/matter_yaml_linter.py +++ b/scripts/tests/matter_yaml_linter.py @@ -15,6 +15,7 @@ # limitations under the License. import os import re +import subprocess import sys from pathlib import Path @@ -23,15 +24,12 @@ DEFAULT_CHIP_ROOT = os.path.abspath( os.path.join(os.path.dirname(__file__), '..', '..')) -# TODO: These tests need to be re-written. Please see https://github.com/project-chip/connectedhomeip/issues/32620 -KNOWN_BAD_UNIT_TESTING = set(('Test_TC_S_2_2.yaml', 'Test_TC_S_2_3.yaml')) - def _is_cert_test(path): return "certification" in os.path.dirname(path) -def main(): +def check_unit_testing(): bad_tests = set() for test in AllChipToolYamlTests(use_short_run_name=False): with open(test.run_name, "r") as f: @@ -47,10 +45,37 @@ def main(): print(f'\t{line+1}: {val}') bad_tests.add(Path(test.run_name).name) - if bad_tests - KNOWN_BAD_UNIT_TESTING: + if bad_tests: return 1 return 0 +def check_manual_steps(): + # Doing this on a test-by-test basis so the log message is more obvious + bad_test = False + # We are operating in a VM, and although there is a checkout, it is working in a scratch directory + # where the ownership is different than the runner. + # Adding an exception for this directory so that git can function properly. + subprocess.run("git config --global --add safe.directory '*'", shell=True) + for test in AllChipToolYamlTests(use_short_run_name=False): + + cmd = f'git diff HEAD^..HEAD --unified=0 -- {test.run_name}' + output = subprocess.check_output(cmd, shell=True).decode().splitlines() + user_prompt_added = [line for line in output if re.search(r'^\+.*UserPrompt.*', line)] + user_prompt_removed = [line for line in output if re.search(r'^\-.*UserPrompt.*', line)] + if len(user_prompt_added) > len(user_prompt_removed): + print(f'Found YAML test with additional manual steps: {test.name}') + bad_test = True + if bad_test: + return 1 + return 0 + + +def main(): + ret = check_unit_testing() + ret += check_manual_steps() + return ret + + if __name__ == '__main__': sys.exit(main()) diff --git a/scripts/tests/run_python_test.py b/scripts/tests/run_python_test.py index d7d3c6955a..0c40f9ac30 100755 --- a/scripts/tests/run_python_test.py +++ b/scripts/tests/run_python_test.py @@ -71,9 +71,9 @@ def process_test_script_output(line, is_stderr): @click.command() @click.option("--app", type=click.Path(exists=True), default=None, help='Path to local application to use, omit to use external apps.') -@click.option("--factoryreset", is_flag=True, +@click.option("--factory-reset/--no-factory-reset", default=None, help='Remove app config and repl configs (/tmp/chip* and /tmp/repl*) before running the tests.') -@click.option("--factoryreset-app-only", is_flag=True, +@click.option("--factory-reset-app-only/--no-factory-reset-app-only", default=None, help='Remove app config and repl configs (/tmp/chip* and /tmp/repl*) before running the tests, but not the controller config') @click.option("--app-args", type=str, default='', help='The extra arguments passed to the device. Can use placeholders like {SCRIPT_BASE_NAME}') @@ -90,9 +90,10 @@ def process_test_script_output(line, is_stderr): help='Script arguments, can use placeholders like {SCRIPT_BASE_NAME}.') @click.option("--script-gdb", is_flag=True, help='Run script through gdb') -@click.option("--quiet", is_flag=True, help="Do not print output from passing tests. Use this flag in CI to keep github log sizes manageable.") +@click.option("--quiet/--no-quiet", default=None, + help="Do not print output from passing tests. Use this flag in CI to keep GitHub log size manageable.") @click.option("--load-from-env", default=None, help="YAML file that contains values for environment variables.") -def main(app: str, factoryreset: bool, factoryreset_app_only: bool, app_args: str, +def main(app: str, factory_reset: bool, factory_reset_app_only: bool, app_args: str, app_ready_pattern: str, script: str, script_args: str, script_gdb: bool, quiet: bool, load_from_env): if load_from_env: reader = MetadataReader(load_from_env) @@ -106,18 +107,23 @@ def main(app: str, factoryreset: bool, factoryreset_app_only: bool, app_args: st app_args=app_args, app_ready_pattern=app_ready_pattern, script_args=script_args, - factory_reset=factoryreset, - factory_reset_app_only=factoryreset_app_only, script_gdb=script_gdb, - quiet=quiet ) ] if not runs: - raise Exception( - "No valid runs were found. Make sure you add runs to your file, see https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md document for reference/example.") + raise click.ClickException( + "No valid runs were found. Make sure you add runs to your file, see " + "https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md document for reference/example.") - coloredlogs.install(level='INFO') + # Override runs Metadata with the command line arguments + for run in runs: + if factory_reset is not None: + run.factory_reset = factory_reset + if factory_reset_app_only is not None: + run.factory_reset_app_only = factory_reset_app_only + if quiet is not None: + run.quiet = quiet for run in runs: logging.info("Executing %s %s", run.py_script_path.split('/')[-1], run.run) @@ -215,4 +221,5 @@ def main_impl(app: str, factory_reset: bool, factory_reset_app_only: bool, app_a if __name__ == '__main__': + coloredlogs.install(level='INFO') main(auto_envvar_prefix='CHIP') diff --git a/scripts/tools/bouffalolab/generate_factory_data.py b/scripts/tools/bouffalolab/generate_factory_data.py new file mode 100755 index 0000000000..28f362ba2d --- /dev/null +++ b/scripts/tools/bouffalolab/generate_factory_data.py @@ -0,0 +1,556 @@ +#!/usr/bin/env python3 +# +# Copyright (c) 2022 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import argparse +import base64 +import binascii +import logging as log +import os +import random +import secrets +import subprocess +import sys +from datetime import datetime, timedelta +from pathlib import Path + +from Crypto.Cipher import AES +from cryptography import x509 +from cryptography.hazmat.backends import default_backend +from cryptography.hazmat.primitives import hashes +from cryptography.hazmat.primitives.asymmetric import ec +from cryptography.hazmat.primitives.serialization import load_der_private_key +from cryptography.x509.oid import ObjectIdentifier + +MATTER_ROOT = os.path.dirname(os.path.realpath(__file__))[:-len("/scripts/tools/bouffalolab")] + +TEST_CD_CERT = MATTER_ROOT + "/credentials/test/certification-declaration/Chip-Test-CD-Signing-Cert.pem" +TEST_CD_KEY = MATTER_ROOT + "/credentials/test/certification-declaration/Chip-Test-CD-Signing-Key.pem" +TEST_PAA_CERT = MATTER_ROOT + "/credentials/test/attestation/Chip-Test-PAA-FFF1-Cert.pem" +TEST_PAA_KEY = MATTER_ROOT + "/credentials/test/attestation/Chip-Test-PAA-FFF1-Key.pem" +TEST_PAI_CERT = MATTER_ROOT + "/credentials/test/attestation/Chip-Test-PAI-FFF1-8000-Cert.pem" +TEST_PAI_KEY = MATTER_ROOT + "/credentials/test/attestation/Chip-Test-PAI-FFF1-8000-Key.pem" +TEST_CHIP_CERT = MATTER_ROOT + "/out/linux-x64-chip-cert/chip-cert" +TEST_CD_TYPE = 1 # 0 - development, 1 - provisional, 2 - official + + +def gen_test_passcode(passcode): + + INVALID_PASSCODES = [0, 11111111, 22222222, 33333333, 44444444, + 55555555, 66666666, 77777777, 88888888, 99999999, + 12345678, 87654321] + + def check_passcode(passcode): + return 0 <= passcode <= 99999999 and passcode not in INVALID_PASSCODES + + if isinstance(passcode, int): + if check_passcode(passcode): + raise Exception("passcode is invalid value.") + return passcode + + passcode = -1 + while not check_passcode(passcode): + passcode = random.randint(0, 99999999) + + return passcode + + +def gen_test_discriminator(discriminator): + + if isinstance(discriminator, int): + if discriminator > 0xfff: + raise Exception("discriminator is invalid value.") + + discriminator = random.randint(0, 0xfff) + + return discriminator + + +def gen_test_unique_id(unique_id): + + if isinstance(unique_id, bytes): + if len(unique_id) != 16: + raise Exception("rotating unique id has invalid length.") + return unique_id + + unique_id = secrets.token_bytes(16) + + return unique_id + + +def gen_test_spake2(passcode, spake2p_it, spake2p_salt, spake2p_verifier=None): + + sys.path.insert(0, os.path.join(MATTER_ROOT, 'scripts', 'tools', 'spake2p')) + from spake2p import generate_verifier + + if isinstance(spake2p_it, int): + if not 1000 <= spake2p_it <= 100000: + raise Exception("SPAKE2+ iteration count out of range.") + else: + spake2p_it = random.randint(1000, 100000) + + if spake2p_salt is None: + spake2p_salt_len = random.randint(16, 32) + spake2p_salt = bytes(random.sample(range(0, 255), spake2p_salt_len)) + else: + spake2p_salt = base64.b64decode(spake2p_salt) + if not 16 <= len(spake2p_salt) <= 32: + raise Exception("SPAKE2+ slat is invalid.") + + if spake2p_verifier is None: + spake2p_verifier = generate_verifier(passcode, spake2p_salt, spake2p_it) + else: + if generate_verifier(passcode, spake2p_salt, spake2p_it) != spake2p_verifier: + raise Exception("SPAKE2+ verifier is invalid.") + + return spake2p_it, spake2p_salt, spake2p_verifier + + +def gen_test_certs(chip_cert: str, + output: str, + vendor_id: int, + product_id: int, + device_name: str, + cd_cert: str = None, + cd_key: str = None, + cd: str = None, + paa_cert: str = None, + paa_key: str = None, + pai_cert: str = None, + pai_key: str = None, + dac_cert: str = None, + dac_key: str = None): + + def parse_cert_file(cert): + + def get_subject_attr(subject, oid): + try: + return subject.get_attributes_for_oid(oid) + except Exception: + return None + + if not os.path.isfile(cert): + return None, None, None, None, None + + with open(cert, 'rb') as cert_file: + cert = x509.load_pem_x509_certificate(cert_file.read(), default_backend()) + + vendor_id = None + product_id = None + for attribute in cert.subject: + if ObjectIdentifier('1.3.6.1.4.1.37244.2.1') == attribute.oid: + vendor_id = int(attribute.value, 16) + if ObjectIdentifier('1.3.6.1.4.1.37244.2.2') == attribute.oid: + product_id = int(attribute.value, 16) + + issue_date = cert.not_valid_before + expire_date = cert.not_valid_after + + return vendor_id, product_id, issue_date, expire_date + + def verify_certificates(chip_cert, paa_cert, pai_cert, dac_cert): + + if not os.path.isfile(pai_cert) or not os.path.isfile(dac_cert): + raise Exception("PAI certificate or DAC certificate is not specified.") + + with open(pai_cert, 'rb') as cert_file: + cert = x509.load_pem_x509_certificate(cert_file.read(), default_backend()) + pai_public_key = cert.public_key() + + with open(dac_cert, 'rb') as cert_file: + cert = x509.load_pem_x509_certificate(cert_file.read(), default_backend()) + + try: + pai_public_key.verify(cert.signature, cert.tbs_certificate_bytes, ec.ECDSA(hashes.SHA256())) + except Exception: + raise Exception("Failed to verify DAC signature with PAI certificate.") + + if (pai_cert != TEST_PAI_CERT and paa_cert != TEST_PAA_CERT) or (pai_cert == TEST_PAI_CERT and paa_cert == TEST_PAA_CERT): + if os.path.isfile(paa_cert): + cmd = [chip_cert, "validate-att-cert", + "--dac", dac_cert, + "--pai", pai_cert, + "--paa", paa_cert, + ] + log.info("Verify Certificate Chain: {}".format(" ".join(cmd))) + subprocess.run(cmd) + + def gen_dac_certificate(chip_cert, device_name, vendor_id, product_id, pai_cert, pai_key, dac_cert, dac_key, pai_issue_date, pai_expire_date): + def gen_valid_times(issue_date, expire_date): + now = datetime.now() - timedelta(days=1) + + if not (issue_date <= now <= expire_date): + raise Exception("Invalid time in test PAI to generate DAC.") + + return now.strftime('%Y%m%d%H%M%SZ'), (expire_date - now).days + + if not os.path.isfile(dac_cert) or not os.path.isfile(dac_key): + if not os.path.isfile(pai_cert) or not os.path.isfile(pai_key): + raise Exception("No test PAI certificate/key specified for test DAC generation.") + + valid_from, lifetime = gen_valid_times(pai_issue_date, pai_expire_date) + cmd = [chip_cert, "gen-att-cert", + "--type", "d", # device attestation certificate + "--subject-cn", device_name + " Test DAC 0", + "--subject-vid", hex(vendor_id), + "--subject-pid", hex(product_id), + "--ca-cert", pai_cert, + "--ca-key", pai_key, + "--out", dac_cert, + "--out-key", dac_key, + "--valid-from", valid_from, + "--lifetime", str(lifetime), + ] + log.info("Generate DAC: {}".format(" ".join(cmd))) + subprocess.run(cmd) + + def convert_pem_to_der(chip_cert, action, pem): + + if not os.path.isfile(pem): + raise Exception("File {} is not existed.".format(pem)) + + der = Path(pem).with_suffix(".der") + if not os.path.isfile(der): + cmd = [chip_cert, action, pem, der, "--x509-der", ] + subprocess.run(cmd) + + return der + + def gen_cd(chip_cert, dac_vendor_id, dac_product_id, vendor_id, product_id, cd_cert, cd_key, cd): + + if os.path.isfile(cd): + return + + cmd = [chip_cert, "gen-cd", + "--key", cd_key, + "--cert", cd_cert, + "--out", cd, + "--format-version", "1", + "--vendor-id", hex(vendor_id), + "--product-id", hex(product_id), + "--device-type-id", "0x1234", + "--certificate-id", "ZIG20141ZB330001-24", + "--security-level", "0", + "--security-info", "0", + "--certification-type", str(TEST_CD_TYPE), + "--version-number", "9876", + ] + + if dac_vendor_id != vendor_id or dac_product_id != product_id: + cmd += ["--dac-origin-vendor-id", hex(dac_vendor_id), + "--dac-origin-product-id", hex(dac_product_id), + ] + + log.info("Generate CD: {}".format(" ".join(cmd))) + subprocess.run(cmd) + + pai_vendor_id, pai_product_id, pai_issue_date, pai_expire_date = parse_cert_file(pai_cert) + + dac_vendor_id = pai_vendor_id if pai_vendor_id else vendor_id + dac_product_id = pai_product_id if pai_product_id else product_id + gen_dac_certificate(chip_cert, device_name, dac_vendor_id, dac_product_id, pai_cert, + pai_key, dac_cert, dac_key, pai_issue_date, pai_expire_date) + + dac_cert_der = convert_pem_to_der(chip_cert, "convert-cert", dac_cert) + dac_key_der = convert_pem_to_der(chip_cert, "convert-key", dac_key) + pai_cert_der = convert_pem_to_der(chip_cert, "convert-cert", pai_cert) + + dac_vendor_id, dac_product_id, *_ = parse_cert_file(dac_cert) + paa_vendor_id, paa_product_id, *_ = parse_cert_file(paa_cert) + + verify_certificates(chip_cert, paa_cert, pai_cert, dac_cert) + + gen_cd(chip_cert, dac_vendor_id, dac_product_id, vendor_id, product_id, cd_cert, cd_key, cd) + + return cd, pai_cert_der, dac_cert_der, dac_key_der + + +def gen_mfd_partition(args, mfd_output): + + def int_to_2bytearray_l(intvalue): + src = bytearray(2) + src[1] = (intvalue >> 8) & 0xFF + src[0] = (intvalue >> 0) & 0xFF + return src + + def int_to_4bytearray_l(intvalue): + src = bytearray(4) + src[3] = (intvalue >> 24) & 0xFF + src[2] = (intvalue >> 16) & 0xFF + src[1] = (intvalue >> 8) & 0xFF + src[0] = (intvalue >> 0) & 0xFF + return src + + def gen_efuse_aes_iv(): + return bytes(random.sample(range(0, 0xff), 12) + [0] * 4) + + def read_file(rfile): + with open(rfile, 'rb') as _f: + return _f.read() + + def get_private_key(der): + with open(der, 'rb') as file: + keys = load_der_private_key(file.read(), password=None, backend=default_backend()) + private_key = keys.private_numbers().private_value.to_bytes(32, byteorder='big') + + return private_key + + def encrypt_data(data_bytearray, key_bytearray, iv_bytearray): + data_bytearray += bytes([0] * (16 - (len(data_bytearray) % 16))) + cryptor = AES.new(key_bytearray, AES.MODE_CBC, iv_bytearray) + ciphertext = cryptor.encrypt(data_bytearray) + return ciphertext + + def convert_to_bytes(data): + if isinstance(data, bytes) or isinstance(data, str): + if isinstance(data, str): + return data.encode() + else: + return data + elif isinstance(data, int): + byte_len = int((data.bit_length() + 7) / 8) + return data.to_bytes(byte_len, byteorder='little') + elif data is None: + return bytes([]) + else: + raise Exception("Data is invalid type: {}".format(type(data))) + + def gen_tlvs(mfdDict, need_sec): + MFD_ID_RAW_MASK = 0x8000 + + sec_tlvs = bytes([]) + raw_tlvs = bytes([]) + + for name in mfdDict.keys(): + d = mfdDict[name] + if d["sec"] and need_sec: + if d["len"] and d["len"] < len(d["data"]): + raise Exception("Data size of {} is over {}".format(name, d["len"])) + sec_tlvs += int_to_2bytearray_l(d["id"]) + sec_tlvs += int_to_2bytearray_l(len(d["data"])) + sec_tlvs += d["data"] + + for name in mfdDict.keys(): + d = mfdDict[name] + if not d["sec"] or not need_sec: + if d["len"] and d["len"] < len(d["data"]): + raise Exception("Data size of {} is over {}".format(name, d["len"])) + raw_tlvs += int_to_2bytearray_l(d["id"] + MFD_ID_RAW_MASK) + raw_tlvs += int_to_2bytearray_l(len(d["data"])) + raw_tlvs += d["data"] + + return sec_tlvs, raw_tlvs + + mfdDict = { + "aes_iv": {'sec': False, "id": 1, "len": 16, "data": gen_efuse_aes_iv() if args.key else bytes([0] * 16)}, + "dac_cert": {'sec': False, "id": 2, "len": None, "data": read_file(args.dac_cert)}, + "dac_key": {'sec': True, "id": 3, "len": None, "data": get_private_key(args.dac_key)}, + "passcode": {'sec': False, "id": 4, "len": 4, "data": convert_to_bytes(args.passcode)}, + "pai_cert": {'sec': False, "id": 5, "len": None, "data": read_file(args.pai_cert)}, + "cd": {'sec': False, "id": 6, "len": None, "data": read_file(args.cd)}, + "sn": {'sec': False, "id": 7, "len": 32, "data": convert_to_bytes(args.sn)}, + "discriminator": {'sec': False, "id": 8, "len": 2, "data": convert_to_bytes(args.discriminator)}, + "uid": {'sec': False, "id": 9, "len": 32, "data": convert_to_bytes(args.unique_id)}, + "spake2p_it": {'sec': False, "id": 10, "len": 4, "data": convert_to_bytes(args.spake2p_it)}, + "spake2p_salt": {'sec': False, "id": 11, "len": 32, "data": convert_to_bytes(args.spake2p_salt)}, + "spake2p_verifier": {'sec': False, "id": 12, "len": None, "data": convert_to_bytes(args.spake2p_verifier)}, + "vendor_name": {'sec': False, "id": 13, "len": 32, "data": convert_to_bytes(args.vendor_name)}, + "vendor_id": {'sec': False, "id": 14, "len": 2, "data": convert_to_bytes(args.vendor_id)}, + "product_name": {'sec': False, "id": 15, "len": 32, "data": convert_to_bytes(args.product_name)}, + "product_id": {'sec': False, "id": 16, "len": 2, "data": convert_to_bytes(args.product_id)}, + "product_part_no": {'sec': False, "id": 17, "len": 32, "data": convert_to_bytes(args.product_part_no)}, + "product_url": {'sec': False, "id": 18, "len": 256, "data": convert_to_bytes(args.product_url)}, + "product_label": {'sec': False, "id": 19, "len": 64, "data": convert_to_bytes(args.product_label)}, + "manufactoring_date": {'sec': False, "id": 20, "len": 16, "data": convert_to_bytes(args.manufactoring_date)}, + "hardware_ver": {'sec': False, "id": 21, "len": 4, "data": convert_to_bytes(args.hardware_version)}, + "hardware_ver_str": {'sec': False, "id": 22, "len": 64, "data": convert_to_bytes(args.hardware_version_string)}, + } + + sec_tlvs, raw_tlvs = gen_tlvs(mfdDict, args.key) + + output = bytes([]) + + sec_tlvs = sec_tlvs and encrypt_data(sec_tlvs, args.key, mfdDict["aes_iv"]["data"]) + + output = int_to_4bytearray_l(len(sec_tlvs)) + output += sec_tlvs + output += int_to_4bytearray_l(binascii.crc32(sec_tlvs)) + output += int_to_4bytearray_l(len(raw_tlvs)) + output += raw_tlvs + output += int_to_4bytearray_l(binascii.crc32(raw_tlvs)) + + with open(mfd_output, "wb+") as fp: + fp.write(output) + + +def gen_onboarding_data(args, onboard_txt, onboard_png, rendez=6): + + try: + import qrcode + from SetupPayload import CommissioningFlow, SetupPayload + except ImportError: + sys.path.append(os.path.join(MATTER_ROOT, "src/setup_payload/python")) + try: + import qrcode + from SetupPayload import CommissioningFlow, SetupPayload + except Exception: + raise Exception("Please make sure qrcode has been installed.") + else: + raise Exception("Please make sure qrcode has been installed.") + + setup_payload = SetupPayload(discriminator=args.discriminator, + pincode=args.passcode, + rendezvous=rendez, + flow=CommissioningFlow.Standard, + vid=args.vendor_id, + pid=args.product_id) + with open(onboard_txt, "w") as manual_code_file: + manual_code_file.write("Manualcode : " + setup_payload.generate_manualcode() + "\n") + manual_code_file.write("QRCode : " + setup_payload.generate_qrcode()) + qr = qrcode.make(setup_payload.generate_qrcode()) + qr.save(onboard_png) + + return setup_payload.generate_manualcode(), setup_payload.generate_qrcode() + + +def main(): + + def check_arg(args): + + if not isinstance(args.output, str) or not os.path.exists(args.output): + raise Exception("output path is not specified or not existed.") + log.info("output path: {}".format(args.output)) + + if not isinstance(args.chip_cert, str) or not os.path.exists(args.chip_cert): + raise Exception("chip-cert should be built before and is specified.") + log.info("chip-cert path: {}".format(args.chip_cert)) + + def to_bytes(input): + if isinstance(input, str): + return bytearray.fromhex(input) + elif isinstance(input, bytes): + return input + else: + return None + + parser = argparse.ArgumentParser(description="Bouffalo Lab Factory Data generator tool") + + parser.add_argument("--dac_cert", type=str, help="DAC certificate file.") + parser.add_argument("--dac_key", type=str, help="DAC certificate privat key.") + parser.add_argument("--passcode", type=int, help="Setup pincode, optional.") + parser.add_argument("--pai_cert", type=str, default=TEST_PAI_CERT, help="PAI certificate file.") + parser.add_argument("--cd", type=str, help="Certificate Declaration file.") + parser.add_argument("--sn", type=str, default="Test SN", help="Serial Number, optional.") + parser.add_argument("--discriminator", type=int, help="Discriminator ID, optional.") + parser.add_argument("--unique_id", type=base64.b64decode, help="Rotating Unique ID in hex string, optional.") + parser.add_argument("--spake2p_it", type=int, default=None, help="Spake2+ iteration count, optional.") + parser.add_argument("--spake2p_salt", type=base64.b64decode, help="Spake2+ salt in hex string, optional.") + + parser.add_argument("--vendor_id", type=int, default=0x130D, help="Vendor Identification, mandatory.") + parser.add_argument("--vendor_name", type=str, default="Bouffalo Lab", help="Vendor Name string, optional.") + parser.add_argument("--product_id", type=int, default=0x1001, help="Product Identification, mandatory.") + parser.add_argument("--product_name", type=str, default="Test Product", help="Product Name string, optional.") + + parser.add_argument("--product_part_no", type=str, help="Product Part number, optional.") + parser.add_argument("--product_url", type=str, help="Product Web URL, optional.") + parser.add_argument("--product_label", type=str, help="Product Web URL, optional.") + parser.add_argument("--manufactoring_date", type=str, help="Product Web URL, optional.") + parser.add_argument("--hardware_version", type=int, help="Product Web URL, optional.") + parser.add_argument("--hardware_version_string", type=str, help="Product Web URL, optional.") + parser.add_argument("--rendezvous", type=int, default=6, help="Rendezvous Mode for QR code generation") + + parser.add_argument("--output", type=str, help="output path.") + parser.add_argument("--key", type=str, help="Encrypt private part in mfd.") + + parser.add_argument("--cd_cert", type=str, default=TEST_CD_CERT, help="for test, to sign certificate declaration.") + parser.add_argument("--cd_key", type=str, default=TEST_CD_KEY, help="for test, to sign certificate declaration.") + parser.add_argument("--paa_cert", type=str, default=TEST_PAA_CERT, help="for test, to verify certificate chain.") + parser.add_argument("--paa_key", type=str, default=TEST_PAA_KEY, help="for test, to sign pai certificate.") + parser.add_argument("--pai_key", type=str, default=TEST_PAI_KEY, help="for test, to sign dac certificate.") + parser.add_argument("--chip_cert", type=str, default=TEST_CHIP_CERT, help="for test, the tool to issue dac certificate.") + + args = parser.parse_args() + + log.basicConfig(format='[%(levelname)s] %(message)s', level=log.INFO) + + check_arg(args) + + passcode = gen_test_passcode(args.passcode) + discriminator = gen_test_discriminator(args.discriminator) + unique_id = gen_test_unique_id(args.unique_id) + spake2p_it, spake2p_salt, spake2p_verifier = gen_test_spake2(passcode, args.spake2p_it, args.spake2p_salt) + + vp_info = "{}_{}".format(hex(args.vendor_id), hex(args.product_id)) + vp_disc_info = "{}_{}_{}".format(hex(args.vendor_id), hex(args.product_id), discriminator) + if args.dac_cert is None: + args.dac_cert = os.path.join(args.output, "out_{}_dac_cert.pem".format(vp_disc_info)) + args.dac_key = os.path.join(args.output, "out_{}_dac_key.pem".format(vp_disc_info)) + + if args.cd is None: + args.cd = os.path.join(args.output, "out_{}_cd.der".format(vp_info)) + + cd, pai_cert_der, dac_cert_der, dac_key_der = gen_test_certs(args.chip_cert, + args.output, + args.vendor_id, + args.product_id, + args.vendor_name, + args.cd_cert, + args.cd_key, + args.cd, + args.paa_cert, + args.paa_key, + args.pai_cert, + args.pai_key, + args.dac_cert, + args.dac_key) + + mfd_output = os.path.join(args.output, "out_{}_mfd.bin".format(vp_disc_info)) + args.dac_cert = dac_cert_der + args.dac_key = dac_key_der + args.passcode = passcode + args.pai_cert = pai_cert_der + args.cd = cd + args.discriminator = discriminator + args.unique_id = unique_id + args.spake2p_it = spake2p_it + args.spake2p_salt = spake2p_salt + args.spake2p_verifier = spake2p_verifier + args.key = to_bytes(args.key) + gen_mfd_partition(args, mfd_output) + + onboard_txt = os.path.join(args.output, "out_{}_onboard.txt".format(vp_disc_info)) + onboard_png = os.path.join(args.output, "out_{}_onboard.png".format(vp_disc_info)) + manualcode, qrcode = gen_onboarding_data(args, onboard_txt, onboard_png, args.rendezvous) + + log.info("") + log.info("Output as below: ") + log.info("Passcode: {}".format(passcode)) + log.info("Discriminator ID: {}".format(discriminator)) + log.info("Rotating Unique ID: {}".format(unique_id.hex())) + log.info("Rotating Unique ID base64 code: {}".format(base64.b64encode(unique_id).decode())) + log.info("SPAKE2+ iteration: {}".format(spake2p_it)) + log.info("SPAKE2+ slat: {}".format(spake2p_salt.hex())) + log.info("SPAKE2+ slat base code: {}".format(base64.b64encode(spake2p_salt).decode())) + log.info("Manual code: {}".format(manualcode)) + log.info("QR code: {}".format(qrcode)) + + log.info("") + log.info("MFD partition file: {}".format(mfd_output)) + log.info("QR code PNG file: {}".format(onboard_png)) + + +if __name__ == "__main__": + main() diff --git a/scripts/tools/cancel_workflows_for_pr.py b/scripts/tools/cancel_workflows_for_pr.py new file mode 100755 index 0000000000..fe5f028bc3 --- /dev/null +++ b/scripts/tools/cancel_workflows_for_pr.py @@ -0,0 +1,183 @@ +#!/usr/bin/env python3 +# +# Copyright (c) 2024 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 datetime +import logging +import re +from typing import Optional, Set + +import click +import coloredlogs +from dateutil.tz import tzlocal +from github import Github +from github.Commit import Commit +from github.PullRequest import PullRequest + +__LOG_LEVELS__ = { + "debug": logging.DEBUG, + "info": logging.INFO, + "warn": logging.WARN, + "fatal": logging.FATAL, +} + +REPOSITORY = "project-chip/connectedhomeip" + + +class Canceller: + def __init__(self, token: str, dry_run: bool): + self.api = Github(token) + self.repo = self.api.get_repo(REPOSITORY) + self.dry_run = dry_run + + def check_all_pending_prs(self, max_age, required_runs): + cutoff = datetime.datetime.now(tzlocal()) - max_age + logging.info("Searching PRs updated after %s", cutoff) + for pr in self.repo.get_pulls(state="open", sort="updated", direction="desc"): + pr_update = pr.updated_at if pr.updated_at else pr.created_at + pr_update = pr_update.astimezone(tzlocal()) + + if pr_update < cutoff: + logging.warning( + "PR is too old (since %s, cutoff at %s). Skipping the rest...", + pr_update, + cutoff, + ) + break + logging.info( + "Examining PR %d updated at %s: %s", pr.number, pr_update, pr.title + ) + self.check_pr(pr, required_runs) + + def check_pr(self, pr: PullRequest, required_runs): + + last_commit: Optional[Commit] = None + + for commit in pr.get_commits(): + logging.debug(" Found commit %s", commit.sha) + if pr.head.sha == commit.sha: + last_commit = commit + break + + if last_commit is None: + logging.error("Could not find any commit in the pull request.") + return + + logging.info("Last commit is: %s", last_commit.sha) + + in_progress_workflows: Set[int] = set() + failed_check_names: Set[str] = set() + + # Gather all workflows along with failed workflow names + for check_suite in last_commit.get_check_suites(): + if check_suite.conclusion == "success": + # Finished without errors. Nothing to do here + continue + for run in check_suite.get_check_runs(): + if run.conclusion is not None and run.conclusion != "failure": + logging.debug( + " Run %s is not interesting: (state %s, conclusion %s)", + run.name, + run.status, + run.conclusion, + ) + continue + + # TODO: I am unclear how to really find the workflow id, however the + # HTML URL is like https://github.com/project-chip/connectedhomeip/actions/runs/11261874698/job/31316278705 + # so need whatever is after run. + m = re.match(r".*/actions/runs/([\d]+)/job/.*", run.html_url) + if not m: + logging.error( + "Failed to extract workflow number from %s", run.html_url + ) + continue + + workflow_id = int(m.group(1)) + if run.conclusion is None: + logging.info( + " Workflow %d (i.e. %s) still pending: %s", + workflow_id, + run.name, + run.status, + ) + in_progress_workflows.add(workflow_id) + elif run.conclusion == "failure": + workflow = self.repo.get_workflow_run(workflow_id) + logging.warning(" Workflow %s Failed", workflow.name) + failed_check_names.add(workflow.name) + + if not any([name in failed_check_names for name in required_runs]): + logging.info("No critical failures found") + return + + for id in in_progress_workflows: + workflow = self.repo.get_workflow_run(id) + if self.dry_run: + logging.warning("DRY RUN: Will not stop %s", workflow.name) + else: + workflow.cancel() + logging.warning("Stopping workflow %s", workflow.name) + + +@click.command() +@click.option( + "--log-level", + default="INFO", + type=click.Choice(list(__LOG_LEVELS__.keys()), case_sensitive=False), + help="Determines the verbosity of script output.", +) +@click.option("--gh-api-token", help="Github token to use") +@click.option("--token-file", help="Read github token from the given file") +@click.option("--dry-run", default=False, is_flag=True, help="Actually cancel or not") +@click.option( + "--max-pr-age-days", default=0, type=int, help="How many days to look at PRs" +) +@click.option( + "--max-pr-age-minutes", default=0, type=int, help="How many minutes to look at PRs" +) +@click.option("--require", multiple=True, default=[], help="Name of required runs") +def main( + log_level, + gh_api_token, + token_file, + dry_run, + max_pr_age_days, + max_pr_age_minutes, + require, +): + coloredlogs.install( + level=__LOG_LEVELS__[log_level], fmt="%(asctime)s %(levelname)-7s %(message)s" + ) + + if gh_api_token: + gh_token = gh_api_token + elif token_file: + gh_token = open(token_file, "rt").read().strip() + else: + raise Exception("Require a --gh-api-token or --token-file to access github") + + max_age = datetime.timedelta(days=max_pr_age_days, minutes=max_pr_age_minutes) + if max_age == datetime.timedelta(): + raise Exception( + "Please specifiy a max age of minutes or days (--max-pr-age-days or --max-pr-age-minutes)" + ) + + Canceller(gh_token, dry_run).check_all_pending_prs(max_age, require) + + +if __name__ == "__main__": + main() diff --git a/scripts/tools/file_size_from_nm.py b/scripts/tools/file_size_from_nm.py new file mode 100755 index 0000000000..a5d53b26dc --- /dev/null +++ b/scripts/tools/file_size_from_nm.py @@ -0,0 +1,432 @@ +#!/usr/bin/env -S python3 -B +# +# Copyright (c) 2024 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. +# + +# Displays a treemap code size as read by `nm` over a binary +# +# Example call: +# +# scripts/tools/file_size_from_nm.py \ +# --max-depth 5 \ +# out/nrf-nrf52840dk-light-data-model-enabled/nrfconnect/zephyr/zephyr.elf +# + +# Requires: +# click +# cxxfilt +# coloredlogs +# pandas +# plotly + +import logging +import subprocess +from dataclasses import dataclass +from enum import Enum, auto +from pathlib import Path +from typing import Optional + +import click +import coloredlogs +import cxxfilt +import plotly.express as px +import plotly.graph_objects as go + +# Supported log levels, mapping string values required for argument +# parsing into logging constants +__LOG_LEVELS__ = { + "debug": logging.DEBUG, + "info": logging.INFO, + "warn": logging.WARN, + "fatal": logging.FATAL, +} + + +class ChartStyle(Enum): + TREE_MAP = auto() + SUNBURST = auto() + + +__CHART_STYLES__ = { + "treemap": ChartStyle.TREE_MAP, + "sunburst": ChartStyle.SUNBURST, +} + + +@dataclass +class Symbol: + name: str + symbol_type: str + offset: int + size: int + + +def tree_display_name(name: str) -> list[str]: + """ + Convert the given name from NM into a tree path. + + It splits the name by C++ namespaces, however it also specifically handles + 'emberAf' prefixes to make them common and uses 'vtable for' information + """ + + name = cxxfilt.demangle(name) + + if name.startswith("non-virtual thunk to "): + name = name[21:] + if name.startswith("vtable for "): + name = name[11:] + + # These are C-style methods really, we have no top-level namespaces named + # like this but still want to see these differently + for special_prefix in {"emberAf", "Matter"}: + if name.startswith(special_prefix): + return [special_prefix, name] + + # If the first element contains a space, it is either within `<>` for templates or it means it is a + # separator of the type. Try to find the type separator + # + # Logic: + # - try to find the first space OUTSIDE <> and before '(' + space_pos = 0 + indent = 0 + type_prefix = "" + while space_pos < len(name): + c = name[space_pos] + if c == "<": + indent += 1 + elif c == ">": + indent -= 1 + elif c == " " and indent == 0: + # FOUND A SPACE, move it to the last + type_prefix = name[:space_pos] + " " + space_pos += 1 + name = name[space_pos:] + break + elif c == "(" and indent == 0: + # a bracket not within templates means we are done! + break + space_pos += 1 + + # completely skip any arguments ... i.e. anything after ( + brace_pos = 0 + indent = 0 + type_suffix = "" + while brace_pos < len(name): + c = name[brace_pos] + if c == "<": + indent += 1 + elif c == ">": + indent -= 1 + elif c == "(" and indent == 0: + # FOUND A SPACE, move it to the last + type_suffix = name[brace_pos:] + name = name[:brace_pos] + break + brace_pos += 1 + + # name may be split by namespace and looks like foo::bar::baz + # HOWEVER for templates we want to split foo::Bar::Baz into + # [foo, Bar::Baz] + # + # General way things look like: + # TYPE FUNC # notice the space + # CONSTRUCTOR() + result = [] + while "::" in name: + ns_idx = name.find("::") + less_idx = name.find("<") + if less_idx >= 0 and ns_idx > less_idx: + # at this point, we have to find the matched `>` for this, assuming there ARE + # nested `>` entries, including multiple of them + pos = less_idx + 1 + indent = 1 + while indent > 0: + if name[pos] == ">": + indent -= 1 + elif name[pos] == "<": + indent += 1 + pos += 1 + if pos == len(name): + break + result.append(name[:pos]) + name = name[pos:] + if name.startswith("::"): + name = name[2:] + else: + result.append(name[:ns_idx]) + ns_idx += 2 + name = name[ns_idx:] + result.append(type_prefix + name + type_suffix) + + if len(result) == 1: + if result[0].startswith("ot"): # Show openthread methods a bit grouped + result = ["ot"] + result + return ["C"] + result + + return result + + +# TO run the test, install pytest and do +# pytest file_size_from_nm.py +def test_tree_display_name(): + assert tree_display_name("fooBar") == ["C", "fooBar"] + assert tree_display_name("emberAfTest") == ["emberAf", "emberAfTest"] + assert tree_display_name("MatterSomeCall") == ["Matter", "MatterSomeCall"] + assert tree_display_name("chip::Some::Constructor()") == [ + "chip", + "Some", + "Constructor()", + ] + + assert tree_display_name("chip::Some::Constructor(int arg1, int arg2)") == [ + "chip", + "Some", + "Constructor(int arg1, int arg2)", + ] + + assert tree_display_name( + "chip::Some::Constructor(int arg1, int arg2)" + ) == [ + "chip", + "Some", + "Constructor(int arg1, int arg2)", + ] + + assert tree_display_name("void my::function::call()") == [ + "my", + "function", + "void call()", + ] + assert tree_display_name("chip::ChipError my::function::call()") == [ + "my", + "function", + "chip::ChipError call()", + ] + assert tree_display_name("chip::test::baz my::function::call()") == [ + "my", + "function", + "chip::test::baz call()", + ] + assert tree_display_name( + "chip::test::baz my::function::call()" + ) == [ + "my", + "function", + "chip::test::baz call()", + ] + assert tree_display_name( + "chip::app::CommandIsFabricScoped(unsigned int, unsigned int)" + ) == ["chip", "app", "CommandIsFabricScoped(unsigned int, unsigned int)"] + assert tree_display_name("chip::app::AdvertiseAsOperational()") == [ + "chip", + "app", + "AdvertiseAsOperational()", + ] + + assert tree_display_name( + "void foo::bar::method(my::arg name, other::arg::type)" + ) == ["foo", "bar", "void method(my::arg name, other::arg::type)"] + + +def build_treemap( + name: str, + symbols: list[Symbol], + style: ChartStyle, + max_depth: int, + zoom: Optional[str], + strip: Optional[str], +): + # A treemap is based on parents (with title) + + # Naming rules: + # namespaces/prefixes are "::(::)" + # Actual names will be parented by their suffixes + + root = f"FILE: {name}" + if zoom: + root = root + f" (FILTER: {zoom})" + data: dict[str, list] = dict(name=[root], parent=[""], size=[0], hover=[""]) + + known_parents: set[str] = set() + total_sizes: dict = {} + + for symbol in symbols: + tree_name = tree_display_name(symbol.name) + + if zoom is not None: + partial = "" + # try to filter out the tree name. If it contains the zoom item, keep it, otherwise discard + while tree_name and partial != zoom: + partial += "::" + tree_name[0] + tree_name = tree_name[1:] + if not tree_name: + continue + + if strip is not None: + partial = "" + for part_name in tree_name: + partial = "::" + part_name + if partial == strip: + break + if partial == strip: + continue + + partial = "" + for name in tree_name[:-1]: + next_value = partial + "::" + name + if next_value not in known_parents: + known_parents.add(next_value) + data["name"].append(next_value) + data["parent"].append(partial if partial else root) + data["size"].append(0) + data["hover"].append(next_value) + total_sizes[next_value] = total_sizes.get(next_value, 0) + symbol.size + partial = next_value + + # the name MUST be added + data["name"].append(cxxfilt.demangle(symbol.name)) + data["parent"].append(partial if partial else root) + data["size"].append(symbol.size) + data["hover"].append(f"{symbol.name} of type {symbol.symbol_type}") + + for idx, label in enumerate(data["name"]): + if data["size"][idx] == 0: + data["hover"][idx] = f"{label}: {total_sizes.get(label, 0)}" + + if style == ChartStyle.TREE_MAP: + fig = go.Figure( + go.Treemap( + labels=data["name"], + parents=data["parent"], + values=data["size"], + textinfo="label+value+percent parent", + hovertext=data["hover"], + maxdepth=max_depth, + ) + ) + else: + fig = px.sunburst( + data, + names="name", + parents="parent", + values="size", + maxdepth=max_depth, + ) + + fig.update_traces(root_color="lightgray") + fig.show() + + +@click.command() +@click.option( + "--log-level", + default="INFO", + show_default=True, + type=click.Choice(list(__LOG_LEVELS__.keys()), case_sensitive=False), + help="Determines the verbosity of script output.", +) +@click.option( + "--display-type", + default="TREEMAP", + show_default=True, + type=click.Choice(list(__CHART_STYLES__.keys()), case_sensitive=False), + help="Style of the chart", +) +@click.option( + "--max-depth", + default=4, + show_default=True, + type=int, + help="Display depth by default", +) +@click.option( + "--zoom", + default=None, + help="Zoom in the graph to ONLY the specified path as root (e.g. ::chip::app)", +) +@click.option( + "--strip", + default=None, + help="Strip out a tree subset (e.g. ::C)", +) +@click.argument("elf-file", type=Path) +def main( + log_level, + elf_file: Path, + display_type: str, + max_depth: int, + zoom: Optional[str], + strip: Optional[str], +): + log_fmt = "%(asctime)s %(levelname)-7s %(message)s" + coloredlogs.install(level=__LOG_LEVELS__[log_level], fmt=log_fmt) + + items = subprocess.check_output( + [ + "nm", + "--print-size", + "--size-sort", # Filters out empty entries + "--radix=d", + elf_file.absolute().as_posix(), + ] + ).decode("utf8") + + symbols = [] + + # OUTPUT FORMAT: + # + for line in items.split("\n"): + if not line.strip(): + continue + offset, size, t, name = line.split(" ") + + size = int(size, 10) + offset = int(offset, 10) + + if t in { + # Text section + "t", + "T", + # Weak defines + "w", + "W", + # Initialized data + "d", + "D", + # Readonly + "r", + "R", + # Weak object + "v", + "V", + }: + logging.debug("Found %s of size %d", name, size) + symbols.append(Symbol(name=name, symbol_type=t, offset=offset, size=size)) + elif t in { + # BSS - 0-initialized, not code + "b", + "B", + }: + pass + else: + logging.error("SKIPPING SECTION %s", t) + + build_treemap( + elf_file.name, symbols, __CHART_STYLES__[display_type], max_depth, zoom, strip + ) + + +if __name__ == "__main__": + main(auto_envvar_prefix="CHIP") diff --git a/scripts/tools/nxp/factory_data_generator/README.md b/scripts/tools/nxp/factory_data_generator/README.md index 0aacaeb81a..e218e5ffd8 100644 --- a/scripts/tools/nxp/factory_data_generator/README.md +++ b/scripts/tools/nxp/factory_data_generator/README.md @@ -1,7 +1,7 @@ # NXP Factory Data Generator For usage of the tool, please see -[Guide for writing manufacturing data on NXP devices](../../../../docs/guides/nxp/nxp_manufacturing_flow.md). +[Guide for writing manufacturing data on NXP devices](../../../../docs/platforms/nxp/nxp_manufacturing_flow.md). ## Tool implementation diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h index 08215244b0..ec8cbd6045 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h @@ -606,84 +606,82 @@ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* TemperatureUnit */ \ \ - /* Endpoint: 1, Cluster: On/Off (server) */ \ - { (uint16_t) 0xFF, (uint16_t) 0x0, (uint16_t) 0x2 }, /* StartUpOnOff */ \ - \ - /* Endpoint: 1, Cluster: Level Control (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* Options */ \ - { (uint16_t) 0x32, (uint16_t) 0x1, (uint16_t) 0xFF }, /* DefaultMoveRate */ \ - \ - /* Endpoint: 1, Cluster: Laundry Washer Controls (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1F }, /* SpinSpeedCurrent */ \ - \ - /* Endpoint: 1, Cluster: Smoke CO Alarm (server) */ \ - { (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x2 }, /* SmokeSensitivityLevel */ \ - \ - /* Endpoint: 1, Cluster: Valve Configuration and Control (server) */ \ - { (uint16_t) 0x64, (uint16_t) 0x1, (uint16_t) 0x64 }, /* DefaultOpenLevel */ \ - \ - /* Endpoint: 1, Cluster: Energy EVSE (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFFFE }, /* ApproximateEVEfficiency */ \ - \ - /* Endpoint: 1, Cluster: Window Covering (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xF }, /* Mode */ \ - \ - /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* OperationMode */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x7 }, /* ControlMode */ \ - \ - /* Endpoint: 1, Cluster: Thermostat (server) */ \ - { (uint16_t) 0xA28, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* OccupiedCoolingSetpoint */ \ - { (uint16_t) 0x7D0, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* OccupiedHeatingSetpoint */ \ - { (uint16_t) 0x2BC, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MinHeatSetpointLimit */ \ - { (uint16_t) 0xBB8, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MaxHeatSetpointLimit */ \ - { (uint16_t) 0x640, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MinCoolSetpointLimit */ \ - { (uint16_t) 0xC80, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MaxCoolSetpointLimit */ \ - { (uint16_t) 0x19, (uint16_t) 0x0, (uint16_t) 0x7F }, /* MinSetpointDeadBand */ \ - { (uint16_t) 0x4, (uint16_t) 0x0, (uint16_t) 0x5 }, /* ControlSequenceOfOperation */ \ - { (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x9 }, /* SystemMode */ \ - \ - /* Endpoint: 1, Cluster: Fan Control (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x6 }, /* FanMode */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x64 }, /* PercentSetting */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x64 }, /* SpeedSetting */ \ - \ - /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* TemperatureDisplayMode */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x5 }, /* KeypadLockout */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* ScheduleProgrammingVisibility */ \ - \ - /* Endpoint: 1, Cluster: Color Control (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* WhitePointX */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* WhitePointY */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointRX */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointRY */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointGX */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointGY */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointBX */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointBY */ \ - { (uint16_t) 0xFA, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* StartUpColorTemperatureMireds */ \ - \ - /* Endpoint: 1, Cluster: Ballast Configuration (server) */ \ - { (uint16_t) 0x1, (uint16_t) 0x1, (uint16_t) 0xFE }, /* MinLevel */ \ - { (uint16_t) 0xFE, (uint16_t) 0x1, (uint16_t) 0xFE }, /* MaxLevel */ \ - { (uint16_t) 0xFF, (uint16_t) 0x64, (uint16_t) 0xFFFF }, /* BallastFactorAdjustment */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* LampAlarmMode */ \ - \ - /* Endpoint: 1, Cluster: Unit Testing (server) */ \ - { (uint16_t) 0x46, (uint16_t) 0x14, (uint16_t) 0x64 }, /* range_restricted_int8u */ \ - { (uint16_t) -0x14, (uint16_t) -0x28, (uint16_t) 0x32 }, /* range_restricted_int8s */ \ - { (uint16_t) 0xC8, (uint16_t) 0x64, (uint16_t) 0x3E8 }, /* range_restricted_int16u */ \ - { (uint16_t) -0x64, (uint16_t) -0x96, (uint16_t) 0xC8 }, /* range_restricted_int16s */ \ - { (uint16_t) 0x46, (uint16_t) 0x14, (uint16_t) 0x64 }, /* nullable_range_restricted_int8u */ \ - { (uint16_t) -0x14, (uint16_t) -0x28, (uint16_t) 0x32 }, /* nullable_range_restricted_int8s */ \ - { (uint16_t) 0xC8, (uint16_t) 0x64, (uint16_t) 0x3E8 }, /* nullable_range_restricted_int16u */ \ - { (uint16_t) -0x64, (uint16_t) -0x96, (uint16_t) 0xC8 }, /* nullable_range_restricted_int16s */ \ + /* Endpoint: 1, Cluster: On/Off (server) */ \ + { (uint16_t) 0xFF, (uint16_t) 0x0, (uint16_t) 0x2 }, /* StartUpOnOff */ \ + \ + /* Endpoint: 1, Cluster: Level Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* Options */ \ + { (uint16_t) 0x32, (uint16_t) 0x1, (uint16_t) 0xFF }, /* DefaultMoveRate */ \ + \ + /* Endpoint: 1, Cluster: Laundry Washer Controls (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1F }, /* SpinSpeedCurrent */ \ + \ + /* Endpoint: 1, Cluster: Smoke CO Alarm (server) */ \ + { (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x2 }, /* SmokeSensitivityLevel */ \ + \ + /* Endpoint: 1, Cluster: Valve Configuration and Control (server) */ \ + { (uint16_t) 0x64, (uint16_t) 0x1, (uint16_t) 0x64 }, /* DefaultOpenLevel */ \ + \ + /* Endpoint: 1, Cluster: Energy EVSE (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFFFE }, /* ApproximateEVEfficiency */ \ + \ + /* Endpoint: 1, Cluster: Window Covering (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xF }, /* Mode */ \ + \ + /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* OperationMode */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x7 }, /* ControlMode */ \ + \ + /* Endpoint: 1, Cluster: Thermostat (server) */ \ + { (uint16_t) 0xA28, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* OccupiedCoolingSetpoint */ \ + { (uint16_t) 0x7D0, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* OccupiedHeatingSetpoint */ \ + { (uint16_t) 0x2BC, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MinHeatSetpointLimit */ \ + { (uint16_t) 0xBB8, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MaxHeatSetpointLimit */ \ + { (uint16_t) 0x640, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MinCoolSetpointLimit */ \ + { (uint16_t) 0xC80, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MaxCoolSetpointLimit */ \ + { (uint16_t) 0x19, (uint16_t) 0x0, (uint16_t) 0x7F }, /* MinSetpointDeadBand */ \ + { (uint16_t) 0x4, (uint16_t) 0x0, (uint16_t) 0x5 }, /* ControlSequenceOfOperation */ \ + { (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x9 }, /* SystemMode */ \ + \ + /* Endpoint: 1, Cluster: Fan Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x6 }, /* FanMode */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x64 }, /* PercentSetting */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x64 }, /* SpeedSetting */ \ + \ + /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* TemperatureDisplayMode */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x5 }, /* KeypadLockout */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* ScheduleProgrammingVisibility */ \ + \ + /* Endpoint: 1, Cluster: Color Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* WhitePointX */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* WhitePointY */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointRX */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointRY */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointGX */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointGY */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointBX */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointBY */ \ + { (uint16_t) 0xFA, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* StartUpColorTemperatureMireds */ \ + \ + /* Endpoint: 1, Cluster: Ballast Configuration (server) */ \ + { (uint16_t) 0x1, (uint16_t) 0x1, (uint16_t) 0xFE }, /* MinLevel */ \ + { (uint16_t) 0xFE, (uint16_t) 0x1, (uint16_t) 0xFE }, /* MaxLevel */ \ + { (uint16_t) 0xFF, (uint16_t) 0x64, (uint16_t) 0xFFFF }, /* BallastFactorAdjustment */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* LampAlarmMode */ \ + \ + /* Endpoint: 1, Cluster: Unit Testing (server) */ \ + { (uint16_t) 0x46, (uint16_t) 0x14, (uint16_t) 0x64 }, /* range_restricted_int8u */ \ + { (uint16_t) -0x14, (uint16_t) -0x28, (uint16_t) 0x32 }, /* range_restricted_int8s */ \ + { (uint16_t) 0xC8, (uint16_t) 0x64, (uint16_t) 0x3E8 }, /* range_restricted_int16u */ \ + { (uint16_t) -0x64, (uint16_t) -0x96, (uint16_t) 0xC8 }, /* range_restricted_int16s */ \ + { (uint16_t) 0x46, (uint16_t) 0x14, (uint16_t) 0x64 }, /* nullable_range_restricted_int8u */ \ + { (uint16_t) -0x14, (uint16_t) -0x28, (uint16_t) 0x32 }, /* nullable_range_restricted_int8s */ \ + { (uint16_t) 0xC8, (uint16_t) 0x64, (uint16_t) 0x3E8 }, /* nullable_range_restricted_int16u */ \ + { (uint16_t) -0x64, (uint16_t) -0x96, (uint16_t) 0xC8 }, /* nullable_range_restricted_int16s */ \ \ /* Endpoint: 2, Cluster: On/Off (server) */ \ - { \ - (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 \ - } /* StartUpOnOff */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 } /* StartUpOnOff */ \ } // This is an array of EmberAfAttributeMetadata structures. @@ -4394,12 +4392,8 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, // Array of device types #define FIXED_DEVICE_TYPES \ - { \ - { 0x00000011, 1 }, { 0x00000016, 1 }, { 0x00000100, 1 }, { 0x00000011, 1 }, { 0x00000100, 1 }, { 0x00000011, 1 }, \ - { \ - 0x00000019, 1 \ - } \ - } + { { 0x00000011, 1 }, { 0x00000016, 1 }, { 0x00000100, 1 }, { 0x00000011, 1 }, \ + { 0x00000100, 1 }, { 0x00000011, 1 }, { 0x00000019, 1 } } // Array of device type offsets #define FIXED_DEVICE_TYPE_OFFSETS { 0, 2, 4, 6 } diff --git a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h index fa214e1686..6395681cf3 100644 --- a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h @@ -118,14 +118,12 @@ /* Endpoint: 1, Cluster: On/Off (server) */ \ { (uint16_t) 0xFF, (uint16_t) 0x0, (uint16_t) 0x2 }, /* StartUpOnOff */ \ \ - /* Endpoint: 1, Cluster: Level Control (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* Options */ \ - { (uint16_t) 0x32, (uint16_t) 0x1, (uint16_t) 0xFF }, /* DefaultMoveRate */ \ + /* Endpoint: 1, Cluster: Level Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* Options */ \ + { (uint16_t) 0x32, (uint16_t) 0x1, (uint16_t) 0xFF }, /* DefaultMoveRate */ \ \ /* Endpoint: 1, Cluster: Color Control (server) */ \ - { \ - (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF \ - } /* StartUpColorTemperatureMireds */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF } /* StartUpColorTemperatureMireds */ \ } // This is an array of EmberAfAttributeMetadata structures. @@ -1233,13 +1231,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define FIXED_PROFILE_IDS { 0x0103, 0x0103 } // Array of device types -#define FIXED_DEVICE_TYPES \ - { \ - { 0x00000016, 1 }, \ - { \ - 0x00000101, 1 \ - } \ - } +#define FIXED_DEVICE_TYPES { { 0x00000016, 1 }, { 0x00000101, 1 } } // Array of device type offsets #define FIXED_DEVICE_TYPE_OFFSETS { 0, 1 } diff --git a/scripts/tools/zap/zap_execution.py b/scripts/tools/zap/zap_execution.py index 40bc2e2a4b..9ed0b0f222 100644 --- a/scripts/tools/zap/zap_execution.py +++ b/scripts/tools/zap/zap_execution.py @@ -23,7 +23,7 @@ # Use scripts/tools/zap/version_update.py to manage ZAP versioning as many # files may need updating for versions # -MIN_ZAP_VERSION = '2024.8.14' +MIN_ZAP_VERSION = '2024.10.15' class ZapTool: diff --git a/src/BUILD.gn b/src/BUILD.gn index e70025151c..722e0c8278 100644 --- a/src/BUILD.gn +++ b/src/BUILD.gn @@ -50,21 +50,25 @@ if (chip_build_tests) { chip_test_group("tests") { deps = [] tests = [ + "${chip_root}/src/access/tests", "${chip_root}/src/app/data-model/tests", "${chip_root}/src/app/cluster-building-blocks/tests", "${chip_root}/src/app/data-model-provider/tests", - "${chip_root}/src/access/tests", + "${chip_root}/src/app/icd/server/tests", "${chip_root}/src/crypto/tests", "${chip_root}/src/inet/tests", "${chip_root}/src/lib/address_resolve/tests", "${chip_root}/src/lib/asn1/tests", "${chip_root}/src/lib/core/tests", + "${chip_root}/src/lib/format/tests", "${chip_root}/src/messaging/tests", "${chip_root}/src/protocols/bdx/tests", "${chip_root}/src/protocols/interaction_model/tests", + "${chip_root}/src/protocols/secure_channel/tests", "${chip_root}/src/protocols/user_directed_commissioning/tests", + "${chip_root}/src/system/tests", "${chip_root}/src/transport/retransmit/tests", - "${chip_root}/src/app/icd/server/tests", + "${chip_root}/src/transport/tests", ] # Skip DNSSD tests for Mbed platform due to flash memory size limitations @@ -81,14 +85,12 @@ if (chip_build_tests) { tests += [ "${chip_root}/src/lib/dnssd/minimal_mdns/records/tests" ] } - if (current_os != "zephyr" && current_os != "mbed" && - chip_device_platform != "efr32") { + if (current_os != "zephyr" && current_os != "mbed") { # Avoid these items from "one single binary" test executions. Once tests - # are split, we can re-visit this (and likely many others) + # are split, we can re-visit this (and likely many others). # - # In particular: - # "app/codegen-data-model-provider/tests" contains symbols for ember mocks which - # are used by other tests + # In particular: "app/codegen-data-model-provider/tests" contains + # symbols for ember mocks which are used by other tests. tests += [ "${chip_root}/src/app/codegen-data-model-provider/tests", @@ -97,30 +99,27 @@ if (chip_build_tests) { ] } - # Skip on efr32 due to flash and/or ram limitations. if (chip_device_platform != "efr32") { + tests += [ "${chip_root}/src/app/tests" ] + + # Disabled for EFR32 because _open is not implemented. + # https://github.com/project-chip/connectedhomeip/issues/35624 tests += [ - "${chip_root}/src/app/tests", "${chip_root}/src/credentials/tests", - "${chip_root}/src/lib/format/tests", "${chip_root}/src/lib/support/tests", - "${chip_root}/src/protocols/secure_channel/tests", - "${chip_root}/src/system/tests", - "${chip_root}/src/transport/tests", ] + } - if (matter_enable_tracing_support && - matter_trace_config == "${chip_root}/src/tracing/multiplexed") { - tests += [ "${chip_root}/src/tracing/tests" ] - } + if (matter_enable_tracing_support && + matter_trace_config == "${chip_root}/src/tracing/multiplexed") { + tests += [ "${chip_root}/src/tracing/tests" ] } if (chip_device_platform != "none") { tests += [ "${chip_root}/src/lib/dnssd/minimal_mdns/tests" ] } - if (chip_device_platform != "esp32" && chip_device_platform != "efr32" && - chip_device_platform != "ameba") { + if (chip_device_platform != "esp32" && chip_device_platform != "ameba") { tests += [ "${chip_root}/src/platform/tests" ] } @@ -130,9 +129,7 @@ if (chip_build_tests) { # On nrfconnect, the controller tests run into # https://github.com/project-chip/connectedhomeip/issues/9630 - if (chip_device_platform != "nrfconnect" && - chip_device_platform != "efr32") { - # Doesn't compile on ef32. Multiple definitions issues with attribute storage and overflows flash memory. + if (chip_device_platform != "nrfconnect") { tests += [ "${chip_root}/src/controller/tests/data_model" ] # Skip controller test for Open IoT SDK diff --git a/src/access/AccessControl.cpp b/src/access/AccessControl.cpp index c9da05e510..ba149a6a22 100644 --- a/src/access/AccessControl.cpp +++ b/src/access/AccessControl.cpp @@ -232,7 +232,7 @@ CHIP_ERROR AccessControl::CreateEntry(const SubjectDescriptor * subjectDescripto VerifyOrReturnError((count + 1) <= maxCount, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!IsValid(entry), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(IsValid(entry), CHIP_ERROR_INVALID_ARGUMENT); size_t i = 0; ReturnErrorOnFailure(mDelegate->CreateEntry(&i, entry, &fabric)); @@ -250,7 +250,7 @@ CHIP_ERROR AccessControl::UpdateEntry(const SubjectDescriptor * subjectDescripto const Entry & entry) { VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(!IsValid(entry), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(IsValid(entry), CHIP_ERROR_INVALID_ARGUMENT); ReturnErrorOnFailure(mDelegate->UpdateEntry(index, entry, &fabric)); NotifyEntryChanged(subjectDescriptor, fabric, index, &entry, EntryListener::ChangeType::kUpdated); return CHIP_NO_ERROR; diff --git a/src/access/AccessControl.h b/src/access/AccessControl.h index df986864b8..638c8d71f8 100644 --- a/src/access/AccessControl.h +++ b/src/access/AccessControl.h @@ -501,7 +501,7 @@ class AccessControl */ CHIP_ERROR CreateEntry(size_t * index, const Entry & entry, FabricIndex * fabricIndex = nullptr) { - ReturnErrorCodeIf(!IsValid(entry), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(IsValid(entry), CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); return mDelegate->CreateEntry(index, entry, fabricIndex); } @@ -551,7 +551,7 @@ class AccessControl */ CHIP_ERROR UpdateEntry(size_t index, const Entry & entry, const FabricIndex * fabricIndex = nullptr) { - ReturnErrorCodeIf(!IsValid(entry), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(IsValid(entry), CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); return mDelegate->UpdateEntry(index, entry, fabricIndex); } diff --git a/src/access/examples/ExampleAccessControlDelegate.cpp b/src/access/examples/ExampleAccessControlDelegate.cpp index fc1c1b710d..9297740bf8 100644 --- a/src/access/examples/ExampleAccessControlDelegate.cpp +++ b/src/access/examples/ExampleAccessControlDelegate.cpp @@ -909,7 +909,7 @@ CHIP_ERROR CopyViaInterface(const Entry & entry, EntryStorage & storage) size_t subjectCount = 0; ReturnErrorOnFailure(entry.GetSubjectCount(subjectCount)); - ReturnErrorCodeIf(subjectCount > EntryStorage::kMaxSubjects, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(subjectCount <= EntryStorage::kMaxSubjects, CHIP_ERROR_BUFFER_TOO_SMALL); for (size_t i = 0; i < subjectCount; ++i) { NodeId subject = kUndefinedNodeId; @@ -919,7 +919,7 @@ CHIP_ERROR CopyViaInterface(const Entry & entry, EntryStorage & storage) size_t targetCount = 0; ReturnErrorOnFailure(entry.GetTargetCount(targetCount)); - ReturnErrorCodeIf(targetCount > EntryStorage::kMaxTargets, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(targetCount <= EntryStorage::kMaxTargets, CHIP_ERROR_BUFFER_TOO_SMALL); for (size_t i = 0; i < targetCount; ++i) { Target target; diff --git a/src/access/tests/TestAccessControl.cpp b/src/access/tests/TestAccessControl.cpp index 00b95baf39..b528d4a3bc 100644 --- a/src/access/tests/TestAccessControl.cpp +++ b/src/access/tests/TestAccessControl.cpp @@ -662,30 +662,30 @@ CHIP_ERROR CompareEntry(const Entry & entry, const EntryData & entryData) { AuthMode authMode = AuthMode::kNone; ReturnErrorOnFailure(entry.GetAuthMode(authMode)); - ReturnErrorCodeIf(authMode != entryData.authMode, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(authMode == entryData.authMode, CHIP_ERROR_INCORRECT_STATE); FabricIndex fabricIndex = kUndefinedFabricIndex; ReturnErrorOnFailure(entry.GetFabricIndex(fabricIndex)); - ReturnErrorCodeIf(fabricIndex != entryData.fabricIndex, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(fabricIndex == entryData.fabricIndex, CHIP_ERROR_INCORRECT_STATE); Privilege privilege = Privilege::kView; ReturnErrorOnFailure(entry.GetPrivilege(privilege)); - ReturnErrorCodeIf(privilege != entryData.privilege, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(privilege == entryData.privilege, CHIP_ERROR_INCORRECT_STATE); size_t subjectCount = 0; ReturnErrorOnFailure(entry.GetSubjectCount(subjectCount)); - ReturnErrorCodeIf(subjectCount != entryData.GetSubjectCount(), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(subjectCount == entryData.GetSubjectCount(), CHIP_ERROR_INCORRECT_STATE); for (size_t i = 0; i < subjectCount; ++i) { NodeId subject = kUndefinedNodeId; ReturnErrorOnFailure(entry.GetSubject(i, subject)); - ReturnErrorCodeIf(subject != entryData.subjects[i], CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(subject == entryData.subjects[i], CHIP_ERROR_INCORRECT_STATE); } size_t targetCount = 0; ReturnErrorOnFailure(entry.GetTargetCount(targetCount)); - ReturnErrorCodeIf(targetCount != entryData.GetTargetCount(), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(targetCount == entryData.GetTargetCount(), CHIP_ERROR_INCORRECT_STATE); for (size_t i = 0; i < targetCount; ++i) { Target target; ReturnErrorOnFailure(entry.GetTarget(i, target)); - ReturnErrorCodeIf(target != entryData.targets[i], CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(target == entryData.targets[i], CHIP_ERROR_INCORRECT_STATE); } return CHIP_NO_ERROR; } @@ -724,7 +724,7 @@ CHIP_ERROR CompareAccessControl(AccessControl & ac, const EntryData * entryData, ReturnErrorOnFailure(ac.ReadEntry(i, entry)); ReturnErrorOnFailure(CompareEntry(entry, *entryData)); } - ReturnErrorCodeIf(ac.ReadEntry(count, entry) == CHIP_NO_ERROR, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(ac.ReadEntry(count, entry) != CHIP_NO_ERROR, CHIP_ERROR_INCORRECT_STATE); return CHIP_NO_ERROR; } diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 98e7225549..f3565cf5d9 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -417,6 +417,7 @@ source_set("command-handler-impl") { "${chip_root}/src/access:types", "${chip_root}/src/app/MessageDef", "${chip_root}/src/app/data-model", + "${chip_root}/src/app/data-model-provider", "${chip_root}/src/app/util:callbacks", "${chip_root}/src/lib/support", "${chip_root}/src/messaging", diff --git a/src/app/CASEClient.h b/src/app/CASEClient.h index 7ef968d544..2cb43498f6 100644 --- a/src/app/CASEClient.h +++ b/src/app/CASEClient.h @@ -44,10 +44,10 @@ struct CASEClientInitParams { // sessionResumptionStorage can be nullptr when resumption is disabled. // certificateValidityPolicy is optional, too. - ReturnErrorCodeIf(sessionManager == nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(exchangeMgr == nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(fabricTable == nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(groupDataProvider == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(sessionManager != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(exchangeMgr != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(fabricTable != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(groupDataProvider != nullptr, CHIP_ERROR_INCORRECT_STATE); return CHIP_NO_ERROR; } diff --git a/src/app/CASESessionManager.cpp b/src/app/CASESessionManager.cpp index fa22748a50..766e60115d 100644 --- a/src/app/CASESessionManager.cpp +++ b/src/app/CASESessionManager.cpp @@ -146,7 +146,7 @@ CHIP_ERROR CASESessionManager::GetPeerAddress(const ScopedNodeId & peerId, Trans { ReturnErrorOnFailure(mConfig.sessionInitParams.Validate()); auto optionalSessionHandle = FindExistingSession(peerId, transportPayloadCapability); - ReturnErrorCodeIf(!optionalSessionHandle.HasValue(), CHIP_ERROR_NOT_CONNECTED); + VerifyOrReturnError(optionalSessionHandle.HasValue(), CHIP_ERROR_NOT_CONNECTED); addr = optionalSessionHandle.Value()->AsSecureSession()->GetPeerAddress(); return CHIP_NO_ERROR; } diff --git a/src/app/CommandHandlerImpl.cpp b/src/app/CommandHandlerImpl.cpp index 366199a3b9..2142af6349 100644 --- a/src/app/CommandHandlerImpl.cpp +++ b/src/app/CommandHandlerImpl.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -390,55 +391,16 @@ Status CommandHandlerImpl::ProcessCommandDataIB(CommandDataIB::Parser & aCommand VerifyOrReturnError(err == CHIP_NO_ERROR, Status::InvalidAction); { - Status commandExists = mpCallback->CommandExists(concretePath); - if (commandExists != Status::Success) - { - ChipLogDetail(DataManagement, "No command " ChipLogFormatMEI " in Cluster " ChipLogFormatMEI " on Endpoint 0x%x", - ChipLogValueMEI(concretePath.mCommandId), ChipLogValueMEI(concretePath.mClusterId), - concretePath.mEndpointId); - return FallibleAddStatus(concretePath, commandExists) != CHIP_NO_ERROR ? Status::Failure : Status::Success; - } - } - - { - Access::SubjectDescriptor subjectDescriptor = GetSubjectDescriptor(); - Access::RequestPath requestPath{ .cluster = concretePath.mClusterId, - .endpoint = concretePath.mEndpointId, - .requestType = Access::RequestType::kCommandInvokeRequest, - .entityId = concretePath.mCommandId }; - Access::Privilege requestPrivilege = RequiredPrivilege::ForInvokeCommand(concretePath); - err = Access::GetAccessControl().Check(subjectDescriptor, requestPath, requestPrivilege); - if (err != CHIP_NO_ERROR) - { - if ((err != CHIP_ERROR_ACCESS_DENIED) && (err != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL)) - { - return FallibleAddStatus(concretePath, Status::Failure) != CHIP_NO_ERROR ? Status::Failure : Status::Success; - } - // TODO: when wildcard invokes are supported, handle them to discard rather than fail with status - Status status = err == CHIP_ERROR_ACCESS_DENIED ? Status::UnsupportedAccess : Status::AccessRestricted; - return FallibleAddStatus(concretePath, status) != CHIP_NO_ERROR ? Status::Failure : Status::Success; - } - } + DataModel::InvokeRequest request; - if (CommandNeedsTimedInvoke(concretePath.mClusterId, concretePath.mCommandId) && !IsTimedInvoke()) - { - // TODO: when wildcard invokes are supported, discard a - // wildcard-expanded path instead of returning a status. - return FallibleAddStatus(concretePath, Status::NeedsTimedInteraction) != CHIP_NO_ERROR ? Status::Failure : Status::Success; - } - - if (CommandIsFabricScoped(concretePath.mClusterId, concretePath.mCommandId)) - { - // SPEC: Else if the command in the path is fabric-scoped and there is no accessing fabric, - // a CommandStatusIB SHALL be generated with the UNSUPPORTED_ACCESS Status Code. + request.path = concretePath; + request.subjectDescriptor = GetSubjectDescriptor(); + request.invokeFlags.Set(DataModel::InvokeFlags::kTimed, IsTimedInvoke()); - // Fabric-scoped commands are not allowed before a specific accessing fabric is available. - // This is mostly just during a PASE session before AddNOC. - if (GetAccessingFabricIndex() == kUndefinedFabricIndex) + Status preCheckStatus = mpCallback->ValidateCommandCanBeDispatched(request); + if (preCheckStatus != Status::Success) { - // TODO: when wildcard invokes are supported, discard a - // wildcard-expanded path instead of returning a status. - return FallibleAddStatus(concretePath, Status::UnsupportedAccess) != CHIP_NO_ERROR ? Status::Failure : Status::Success; + return FallibleAddStatus(concretePath, preCheckStatus) != CHIP_NO_ERROR ? Status::Failure : Status::Success; } } @@ -516,11 +478,19 @@ Status CommandHandlerImpl::ProcessGroupCommandDataIB(CommandDataIB::Parser & aCo // once up front and discard all the paths at once. Ordering with respect // to ACL and command presence checks does not matter, because the behavior // is the same for all of them: ignore the path. +#if !CHIP_CONFIG_USE_DATA_MODEL_INTERFACE + + // Without data model interface, we can query individual commands. + // Data model interface queries commands by a full path so we need endpointID as well. + // + // Since this is a performance update and group commands are never timed, + // missing this should not be that noticeable. if (CommandNeedsTimedInvoke(clusterId, commandId)) { // Group commands are never timed. return Status::Success; } +#endif // No check for `CommandIsFabricScoped` unlike in `ProcessCommandDataIB()` since group commands // always have an accessing fabric, by definition. @@ -542,30 +512,21 @@ Status CommandHandlerImpl::ProcessGroupCommandDataIB(CommandDataIB::Parser & aCo const ConcreteCommandPath concretePath(mapping.endpoint_id, clusterId, commandId); - if (mpCallback->CommandExists(concretePath) != Status::Success) { - ChipLogDetail(DataManagement, "No command " ChipLogFormatMEI " in Cluster " ChipLogFormatMEI " on Endpoint 0x%x", - ChipLogValueMEI(commandId), ChipLogValueMEI(clusterId), mapping.endpoint_id); + DataModel::InvokeRequest request; - continue; - } + request.path = concretePath; + request.subjectDescriptor = GetSubjectDescriptor(); + request.invokeFlags.Set(DataModel::InvokeFlags::kTimed, IsTimedInvoke()); - { - Access::SubjectDescriptor subjectDescriptor = GetSubjectDescriptor(); - Access::RequestPath requestPath{ .cluster = concretePath.mClusterId, - .endpoint = concretePath.mEndpointId, - .requestType = Access::RequestType::kCommandInvokeRequest, - .entityId = concretePath.mCommandId }; - Access::Privilege requestPrivilege = RequiredPrivilege::ForInvokeCommand(concretePath); - err = Access::GetAccessControl().Check(subjectDescriptor, requestPath, requestPrivilege); - if (err != CHIP_NO_ERROR) + Status preCheckStatus = mpCallback->ValidateCommandCanBeDispatched(request); + if (preCheckStatus != Status::Success) { - // NOTE: an expected error is CHIP_ERROR_ACCESS_DENIED, but there could be other unexpected errors; - // therefore, keep processing subsequent commands, and if any errors continue, those subsequent - // commands will likewise fail. + // Command failed for a specific path, but keep trying the rest of the paths. continue; } } + if ((err = DataModelCallbacks::GetInstance()->PreCommandReceived(concretePath, GetSubjectDescriptor())) == CHIP_NO_ERROR) { TLV::TLVReader dataReader(commandDataReader); diff --git a/src/app/CommandHandlerImpl.h b/src/app/CommandHandlerImpl.h index ddd499658e..2603b96f22 100644 --- a/src/app/CommandHandlerImpl.h +++ b/src/app/CommandHandlerImpl.h @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -50,21 +51,29 @@ class CommandHandlerImpl : public CommandHandler */ virtual void OnDone(CommandHandlerImpl & apCommandObj) = 0; + /** + * Perform pre-validation that the command dispatch can be performed. In particular: + * - check command existence/validity + * - validate ACL + * - validate timed-invoke and fabric-scoped requirements + * + * Returns Status::Success if the command can be dispatched, otherwise it will + * return the status to be forwarded to the client on failure. + * + * Possible error return codes: + * - UnsupportedEndpoint/UnsupportedCluster/UnsupportedCommand if the command path is invalid + * - NeedsTimedInteraction + * - UnsupportedAccess (ACL failure or fabric scoped without a valid fabric index) + * - AccessRestricted + */ + virtual Protocols::InteractionModel::Status ValidateCommandCanBeDispatched(const DataModel::InvokeRequest & request) = 0; + /* * Upon processing of a CommandDataIB, this method is invoked to dispatch the command * to the right server-side handler provided by the application. */ virtual void DispatchCommand(CommandHandlerImpl & apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & apPayload) = 0; - - /* - * Check to see if a command implementation exists for a specific - * concrete command path. If it does, Success will be returned. If - * not, one of UnsupportedEndpoint, UnsupportedCluster, or - * UnsupportedCommand will be returned, depending on how the command - * fails to exist. - */ - virtual Protocols::InteractionModel::Status CommandExists(const ConcreteCommandPath & aCommandPath) = 0; }; struct InvokeResponseParameters diff --git a/src/app/CommandResponseSender.cpp b/src/app/CommandResponseSender.cpp index f23786e28d..0b028510c0 100644 --- a/src/app/CommandResponseSender.cpp +++ b/src/app/CommandResponseSender.cpp @@ -132,10 +132,10 @@ void CommandResponseSender::DispatchCommand(CommandHandlerImpl & apCommandObj, c mpCommandHandlerCallback->DispatchCommand(apCommandObj, aCommandPath, apPayload); } -Status CommandResponseSender::CommandExists(const ConcreteCommandPath & aCommandPath) +Protocols::InteractionModel::Status CommandResponseSender::ValidateCommandCanBeDispatched(const DataModel::InvokeRequest & request) { - VerifyOrReturnValue(mpCommandHandlerCallback, Protocols::InteractionModel::Status::UnsupportedCommand); - return mpCommandHandlerCallback->CommandExists(aCommandPath); + VerifyOrReturnValue(mpCommandHandlerCallback, Protocols::InteractionModel::Status::Failure); + return mpCommandHandlerCallback->ValidateCommandCanBeDispatched(request); } CHIP_ERROR CommandResponseSender::SendCommandResponse() diff --git a/src/app/CommandResponseSender.h b/src/app/CommandResponseSender.h index 0e03a87f1e..f0b8f11d40 100644 --- a/src/app/CommandResponseSender.h +++ b/src/app/CommandResponseSender.h @@ -64,7 +64,7 @@ class CommandResponseSender : public Messaging::ExchangeDelegate, void DispatchCommand(CommandHandlerImpl & apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & apPayload) override; - Protocols::InteractionModel::Status CommandExists(const ConcreteCommandPath & aCommandPath) override; + Protocols::InteractionModel::Status ValidateCommandCanBeDispatched(const DataModel::InvokeRequest & request) override; /** * Gets the inner exchange context object, without ownership. diff --git a/src/app/DefaultAttributePersistenceProvider.cpp b/src/app/DefaultAttributePersistenceProvider.cpp index 6e7120999f..40ce521362 100644 --- a/src/app/DefaultAttributePersistenceProvider.cpp +++ b/src/app/DefaultAttributePersistenceProvider.cpp @@ -41,7 +41,7 @@ CHIP_ERROR DefaultAttributePersistenceProvider::InternalReadValue(const StorageK { VerifyOrReturnError(mStorage != nullptr, CHIP_ERROR_INCORRECT_STATE); - uint16_t size = static_cast(min(aValue.size(), static_cast(UINT16_MAX))); + uint16_t size = static_cast(std::min(aValue.size(), static_cast(UINT16_MAX))); ReturnErrorOnFailure(mStorage->SyncGetKeyValue(aKey.KeyName(), aValue.data(), size)); aValue.reduce_size(size); return CHIP_NO_ERROR; diff --git a/src/app/DeferredAttributePersistenceProvider.cpp b/src/app/DeferredAttributePersistenceProvider.cpp index 8265279280..26adcb18c8 100644 --- a/src/app/DeferredAttributePersistenceProvider.cpp +++ b/src/app/DeferredAttributePersistenceProvider.cpp @@ -28,7 +28,7 @@ CHIP_ERROR DeferredAttribute::PrepareWrite(System::Clock::Timestamp flushTime, c if (mValue.AllocatedSize() != value.size()) { mValue.Alloc(value.size()); - ReturnErrorCodeIf(!mValue, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(mValue, CHIP_ERROR_NO_MEMORY); } memcpy(mValue.Get(), value.data(), value.size()); @@ -81,7 +81,7 @@ void DeferredAttributePersistenceProvider::FlushAndScheduleNext() } else { - nextFlushTime = chip::min(nextFlushTime, da.GetFlushTime()); + nextFlushTime = std::min(nextFlushTime, da.GetFlushTime()); } } diff --git a/src/app/EventManagement.cpp b/src/app/EventManagement.cpp index 271f72ec10..4c01bedf4b 100644 --- a/src/app/EventManagement.cpp +++ b/src/app/EventManagement.cpp @@ -563,9 +563,9 @@ CHIP_ERROR EventManagement::CheckEventContext(EventLoadOutContext * eventLoadOut Access::GetAccessControl().Check(eventLoadOutContext->mSubjectDescriptor, requestPath, requestPrivilege); if (accessControlError != CHIP_NO_ERROR) { - ReturnErrorCodeIf((accessControlError != CHIP_ERROR_ACCESS_DENIED) && - (accessControlError != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL), - accessControlError); + VerifyOrReturnError((accessControlError == CHIP_ERROR_ACCESS_DENIED) || + (accessControlError == CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL), + accessControlError); ret = CHIP_ERROR_UNEXPECTED_EVENT; } diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index b122333ac2..d88299c29d 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -32,6 +32,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -42,10 +45,9 @@ #include #include #include +#include #if CHIP_CONFIG_USE_DATA_MODEL_INTERFACE -#include - // TODO: defaulting to codegen should eventually be an application choice and not // hard-coded in the interaction model #include @@ -89,6 +91,7 @@ CHIP_ERROR InteractionModelEngine::Init(Messaging::ExchangeManager * apExchangeM VerifyOrReturnError(apExchangeMgr != nullptr, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(reportScheduler != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + mState = State::kInitializing; mpExchangeMgr = apExchangeMgr; mpFabricTable = apFabricTable; mpCASESessionMgr = apCASESessionMgr; @@ -111,11 +114,14 @@ CHIP_ERROR InteractionModelEngine::Init(Messaging::ExchangeManager * apExchangeM ChipLogError(InteractionModel, "WARNING └────────────────────────────────────────────────────"); #endif + mState = State::kInitialized; return CHIP_NO_ERROR; } void InteractionModelEngine::Shutdown() { + VerifyOrReturn(State::kUninitialized != mState); + mpExchangeMgr->GetSessionManager()->SystemLayer()->CancelTimer(ResumeSubscriptionsTimerCallback, this); // TODO: individual object clears the entire command handler interface registry. @@ -187,6 +193,8 @@ void InteractionModelEngine::Shutdown() // // mpFabricTable = nullptr; // mpExchangeMgr = nullptr; + + mState = State::kUninitialized; } uint32_t InteractionModelEngine::GetNumActiveReadHandlers() const @@ -748,8 +756,8 @@ Protocols::InteractionModel::Status InteractionModelEngine::OnReadInitialRequest { TLV::TLVReader pathReader; attributePathListParser.GetReader(&pathReader); - ReturnErrorCodeIf(TLV::Utilities::Count(pathReader, requestedAttributePathCount, false) != CHIP_NO_ERROR, - Status::InvalidAction); + VerifyOrReturnError(TLV::Utilities::Count(pathReader, requestedAttributePathCount, false) == CHIP_NO_ERROR, + Status::InvalidAction); } else if (err != CHIP_ERROR_END_OF_TLV) { @@ -761,8 +769,8 @@ Protocols::InteractionModel::Status InteractionModelEngine::OnReadInitialRequest { TLV::TLVReader pathReader; eventpathListParser.GetReader(&pathReader); - ReturnErrorCodeIf(TLV::Utilities::Count(pathReader, requestedEventPathCount, false) != CHIP_NO_ERROR, - Status::InvalidAction); + VerifyOrReturnError(TLV::Utilities::Count(pathReader, requestedEventPathCount, false) == CHIP_NO_ERROR, + Status::InvalidAction); } else if (err != CHIP_ERROR_END_OF_TLV) { @@ -1499,20 +1507,14 @@ bool InteractionModelEngine::IsExistentAttributePath(const ConcreteAttributePath { #if CHIP_CONFIG_USE_DATA_MODEL_INTERFACE #if CHIP_CONFIG_USE_EMBER_DATA_MODEL - - bool providerResult = GetDataModelProvider() - ->GetAttributeInfo(ConcreteAttributePath(path.mEndpointId, path.mClusterId, path.mAttributeId)) - .has_value(); + bool providerResult = GetDataModelProvider()->GetAttributeInfo(path).has_value(); bool emberResult = emberAfContainsAttribute(path.mEndpointId, path.mClusterId, path.mAttributeId); // Ensure that Provider interface and ember are IDENTICAL in attribute location (i.e. "check" mode) VerifyOrDie(providerResult == emberResult); #endif - - return GetDataModelProvider() - ->GetAttributeInfo(ConcreteAttributePath(path.mEndpointId, path.mClusterId, path.mAttributeId)) - .has_value(); + return GetDataModelProvider()->GetAttributeInfo(path).has_value(); #else return emberAfContainsAttribute(path.mEndpointId, path.mClusterId, path.mAttributeId); #endif @@ -1646,6 +1648,8 @@ void InteractionModelEngine::DispatchCommand(CommandHandlerImpl & apCommandObj, DataModel::InvokeRequest request; request.path = aCommandPath; + request.invokeFlags.Set(DataModel::InvokeFlags::kTimed, apCommandObj.IsTimedInvoke()); + request.subjectDescriptor = apCommandObj.GetSubjectDescriptor(); std::optional status = GetDataModelProvider()->Invoke(request, apPayload, &apCommandObj); @@ -1678,7 +1682,91 @@ void InteractionModelEngine::DispatchCommand(CommandHandlerImpl & apCommandObj, #endif // CHIP_CONFIG_USE_DATA_MODEL_INTERFACE } -Protocols::InteractionModel::Status InteractionModelEngine::CommandExists(const ConcreteCommandPath & aCommandPath) +Protocols::InteractionModel::Status InteractionModelEngine::ValidateCommandCanBeDispatched(const DataModel::InvokeRequest & request) +{ + + Status status = CheckCommandExistence(request.path); + + if (status != Status::Success) + { + ChipLogDetail(DataManagement, "No command " ChipLogFormatMEI " in Cluster " ChipLogFormatMEI " on Endpoint %u", + ChipLogValueMEI(request.path.mCommandId), ChipLogValueMEI(request.path.mClusterId), request.path.mEndpointId); + return status; + } + + status = CheckCommandAccess(request); + VerifyOrReturnValue(status == Status::Success, status); + + return CheckCommandFlags(request); +} + +Protocols::InteractionModel::Status InteractionModelEngine::CheckCommandAccess(const DataModel::InvokeRequest & aRequest) +{ + if (!aRequest.subjectDescriptor.has_value()) + { + return Status::UnsupportedAccess; // we require a subject for invoke + } + + Access::RequestPath requestPath{ .cluster = aRequest.path.mClusterId, + .endpoint = aRequest.path.mEndpointId, + .requestType = Access::RequestType::kCommandInvokeRequest, + .entityId = aRequest.path.mCommandId }; +#if CHIP_CONFIG_USE_DATA_MODEL_INTERFACE + std::optional commandInfo = mDataModelProvider->GetAcceptedCommandInfo(aRequest.path); + Access::Privilege minimumRequiredPrivilege = + commandInfo.has_value() ? commandInfo->invokePrivilege : Access::Privilege::kOperate; +#else + Access::Privilege minimumRequiredPrivilege = RequiredPrivilege::ForInvokeCommand(aRequest.path); +#endif + CHIP_ERROR err = Access::GetAccessControl().Check(*aRequest.subjectDescriptor, requestPath, minimumRequiredPrivilege); + if (err != CHIP_NO_ERROR) + { + if ((err != CHIP_ERROR_ACCESS_DENIED) && (err != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL)) + { + return Status::Failure; + } + return err == CHIP_ERROR_ACCESS_DENIED ? Status::UnsupportedAccess : Status::AccessRestricted; + } + + return Status::Success; +} + +Protocols::InteractionModel::Status InteractionModelEngine::CheckCommandFlags(const DataModel::InvokeRequest & aRequest) +{ +#if CHIP_CONFIG_USE_DATA_MODEL_INTERFACE + std::optional commandInfo = mDataModelProvider->GetAcceptedCommandInfo(aRequest.path); + // This is checked by previous validations, so it should not happen + VerifyOrDie(commandInfo.has_value()); + + const bool commandNeedsTimedInvoke = commandInfo->flags.Has(DataModel::CommandQualityFlags::kTimed); + const bool commandIsFabricScoped = commandInfo->flags.Has(DataModel::CommandQualityFlags::kFabricScoped); +#else + const bool commandNeedsTimedInvoke = CommandNeedsTimedInvoke(aRequest.path.mClusterId, aRequest.path.mCommandId); + const bool commandIsFabricScoped = CommandIsFabricScoped(aRequest.path.mClusterId, aRequest.path.mCommandId); +#endif + + if (commandNeedsTimedInvoke && !aRequest.invokeFlags.Has(DataModel::InvokeFlags::kTimed)) + { + return Status::NeedsTimedInteraction; + } + + if (commandIsFabricScoped) + { + // SPEC: Else if the command in the path is fabric-scoped and there is no accessing fabric, + // a CommandStatusIB SHALL be generated with the UNSUPPORTED_ACCESS Status Code. + + // Fabric-scoped commands are not allowed before a specific accessing fabric is available. + // This is mostly just during a PASE session before AddNOC. + if (aRequest.GetAccessingFabricIndex() == kUndefinedFabricIndex) + { + return Status::UnsupportedAccess; + } + } + + return Status::Success; +} + +Protocols::InteractionModel::Status InteractionModelEngine::CheckCommandExistence(const ConcreteCommandPath & aCommandPath) { #if CHIP_CONFIG_USE_DATA_MODEL_INTERFACE auto provider = GetDataModelProvider(); @@ -1835,7 +1923,7 @@ uint16_t InteractionModelEngine::GetMinGuaranteedSubscriptionsPerFabric() const return UINT16_MAX; #else return static_cast( - min(GetReadHandlerPoolCapacityForSubscriptions() / GetConfigMaxFabrics(), static_cast(UINT16_MAX))); + std::min(GetReadHandlerPoolCapacityForSubscriptions() / GetConfigMaxFabrics(), static_cast(UINT16_MAX))); #endif } @@ -1894,9 +1982,9 @@ void InteractionModelEngine::OnFabricRemoved(const FabricTable & fabricTable, Fa CHIP_ERROR InteractionModelEngine::ResumeSubscriptions() { #if CHIP_CONFIG_PERSIST_SUBSCRIPTIONS - ReturnErrorCodeIf(!mpSubscriptionResumptionStorage, CHIP_NO_ERROR); + VerifyOrReturnError(mpSubscriptionResumptionStorage, CHIP_NO_ERROR); #if CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION - ReturnErrorCodeIf(mSubscriptionResumptionScheduled, CHIP_NO_ERROR); + VerifyOrReturnError(!mSubscriptionResumptionScheduled, CHIP_NO_ERROR); #endif // To avoid the case of a reboot loop causing rapid traffic generation / power consumption, subscription resumption should make diff --git a/src/app/InteractionModelEngine.h b/src/app/InteractionModelEngine.h index ba0a099bb7..ef4b041f19 100644 --- a/src/app/InteractionModelEngine.h +++ b/src/app/InteractionModelEngine.h @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -508,7 +509,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, void DispatchCommand(CommandHandlerImpl & apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & apPayload) override; - Protocols::InteractionModel::Status CommandExists(const ConcreteCommandPath & aCommandPath) override; + Protocols::InteractionModel::Status ValidateCommandCanBeDispatched(const DataModel::InvokeRequest & request) override; bool HasActiveRead(); @@ -612,6 +613,10 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, void ShutdownMatchingSubscriptions(const Optional & aFabricIndex = NullOptional, const Optional & aPeerNodeId = NullOptional); + Status CheckCommandExistence(const ConcreteCommandPath & aCommandPath); + Status CheckCommandAccess(const DataModel::InvokeRequest & aRequest); + Status CheckCommandFlags(const DataModel::InvokeRequest & aRequest); + /** * Check if the given attribute path is a valid path in the data model provider. */ @@ -713,6 +718,14 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, DataModel::Provider * mDataModelProvider = nullptr; Messaging::ExchangeContext * mCurrentExchange = nullptr; + enum class State : uint8_t + { + kUninitialized, // The object has not been initialized. + kInitializing, // Initial setup is in progress (e.g. setting up mpExchangeMgr). + kInitialized // The object has been fully initialized and is ready for use. + }; + State mState = State::kUninitialized; + // Changes the current exchange context of a InteractionModelEngine to a given context class CurrentExchangeValueScope { diff --git a/src/app/MessageDef/StatusIB.cpp b/src/app/MessageDef/StatusIB.cpp index 63012cc64f..e1f4d6a74b 100644 --- a/src/app/MessageDef/StatusIB.cpp +++ b/src/app/MessageDef/StatusIB.cpp @@ -168,7 +168,7 @@ bool FormatStatusIBError(char * buf, uint16_t bufSize, CHIP_ERROR err) // formatted string, as long as we account for the possible string formats. constexpr size_t statusNameMaxLength = #define CHIP_IM_STATUS_CODE(name, spec_name, value) \ - max(sizeof(#spec_name), + std::max(sizeof(#spec_name), #include #undef CHIP_IM_STATUS_CODE static_cast(0) @@ -177,7 +177,7 @@ bool FormatStatusIBError(char * buf, uint16_t bufSize, CHIP_ERROR err) #include #undef CHIP_IM_STATUS_CODE ; - constexpr size_t formattedSize = max(sizeof(generalFormat) + statusNameMaxLength, sizeof(clusterFormat)); + constexpr size_t formattedSize = std::max(sizeof(generalFormat) + statusNameMaxLength, sizeof(clusterFormat)); char formattedString[formattedSize]; StatusIB status(err); diff --git a/src/app/OperationalSessionSetup.cpp b/src/app/OperationalSessionSetup.cpp index 3a9c4be619..6b9b894314 100644 --- a/src/app/OperationalSessionSetup.cpp +++ b/src/app/OperationalSessionSetup.cpp @@ -318,7 +318,7 @@ CHIP_ERROR OperationalSessionSetup::EstablishConnection(const ResolveResult & re #endif mCASEClient = mClientPool->Allocate(); - ReturnErrorCodeIf(mCASEClient == nullptr, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(mCASEClient != nullptr, CHIP_ERROR_NO_MEMORY); MATTER_LOG_METRIC_BEGIN(kMetricDeviceCASESession); CHIP_ERROR err = mCASEClient->EstablishSession(mInitParams, mPeerId, mDeviceAddress, config, this); @@ -744,7 +744,7 @@ CHIP_ERROR OperationalSessionSetup::ScheduleSessionSetupReattempt(System::Clock: "Our backoff calculation will overflow."); System::Clock::Timeout actualTimerDelay = System::Clock::Seconds16( static_cast(CHIP_DEVICE_CONFIG_AUTOMATIC_CASE_RETRY_INITIAL_DELAY_SECONDS - << min((mAttemptsDone - 1), CHIP_DEVICE_CONFIG_AUTOMATIC_CASE_RETRY_MAX_BACKOFF))); + << std::min((mAttemptsDone - 1), CHIP_DEVICE_CONFIG_AUTOMATIC_CASE_RETRY_MAX_BACKOFF))); const bool responseWasBusy = mRequestedBusyDelay != System::Clock::kZero; if (responseWasBusy) { diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp index 1e9c7e727f..2d609eb1af 100644 --- a/src/app/ReadClient.cpp +++ b/src/app/ReadClient.cpp @@ -1081,10 +1081,14 @@ CHIP_ERROR ReadClient::ProcessSubscribeResponse(System::PacketBufferHandle && aP VerifyOrReturnError(IsMatchingSubscriptionId(subscriptionId), CHIP_ERROR_INVALID_SUBSCRIPTION); ReturnErrorOnFailure(subscribeResponse.GetMaxInterval(&mMaxInterval)); +#if CHIP_PROGRESS_LOGGING + auto duration = System::Clock::Milliseconds32(System::SystemClock().GetMonotonicTimestamp() - mSubscribeRequestTime); +#endif ChipLogProgress(DataManagement, - "Subscription established with SubscriptionID = 0x%08" PRIx32 " MinInterval = %u" + "Subscription established in %" PRIu32 "ms with SubscriptionID = 0x%08" PRIx32 " MinInterval = %u" "s MaxInterval = %us Peer = %02x:" ChipLogFormatX64, - mSubscriptionId, mMinIntervalFloorSeconds, mMaxInterval, GetFabricIndex(), ChipLogValueX64(GetPeerNodeId())); + duration.count(), mSubscriptionId, mMinIntervalFloorSeconds, mMaxInterval, GetFabricIndex(), + ChipLogValueX64(GetPeerNodeId())); ReturnErrorOnFailure(subscribeResponse.ExitContainer()); @@ -1144,6 +1148,10 @@ CHIP_ERROR ReadClient::SendSubscribeRequestImpl(const ReadPrepareParams & aReadP { MATTER_LOG_METRIC_BEGIN(Tracing::kMetricDeviceSubscriptionSetup); +#if CHIP_PROGRESS_LOGGING + mSubscribeRequestTime = System::SystemClock().GetMonotonicTimestamp(); +#endif + VerifyOrReturnError(ClientState::Idle == mState, CHIP_ERROR_INCORRECT_STATE); if (&aReadPrepareParams != &mReadPrepareParams) diff --git a/src/app/ReadClient.h b/src/app/ReadClient.h index fd27f0afc9..d8b8a971db 100644 --- a/src/app/ReadClient.h +++ b/src/app/ReadClient.h @@ -676,6 +676,12 @@ class ReadClient : public Messaging::ExchangeDelegate // of RequestMessage (another end of container)). static constexpr uint16_t kReservedSizeForTLVEncodingOverhead = kReservedSizeForEndOfContainer + kReservedSizeForIMRevision + kReservedSizeForEndOfContainer; + +#if CHIP_PROGRESS_LOGGING + // Tracks the time when a subscribe request is successfully sent. + // This timestamp allows for logging the duration taken to established the subscription. + System::Clock::Timestamp mSubscribeRequestTime = System::Clock::kZero; +#endif }; }; // namespace app diff --git a/src/app/ReadHandler.cpp b/src/app/ReadHandler.cpp index 43dae0a99f..4794ead97e 100644 --- a/src/app/ReadHandler.cpp +++ b/src/app/ReadHandler.cpp @@ -741,7 +741,9 @@ CHIP_ERROR ReadHandler::ProcessSubscribeRequest(System::PacketBufferHandle && aP ReturnErrorOnFailure(err); ReturnErrorOnFailure(subscribeRequestParser.GetMinIntervalFloorSeconds(&mMinIntervalFloorSeconds)); - ReturnErrorOnFailure(subscribeRequestParser.GetMaxIntervalCeilingSeconds(&mMaxInterval)); + ReturnErrorOnFailure(subscribeRequestParser.GetMaxIntervalCeilingSeconds(&mSubscriberRequestedMaxInterval)); + mMaxInterval = mSubscriberRequestedMaxInterval; + VerifyOrReturnError(mMinIntervalFloorSeconds <= mMaxInterval, CHIP_ERROR_INVALID_ARGUMENT); #if CHIP_CONFIG_ENABLE_ICD_SERVER diff --git a/src/app/ReadHandler.h b/src/app/ReadHandler.h index 1ddcb4ebf0..85976ec6bc 100644 --- a/src/app/ReadHandler.h +++ b/src/app/ReadHandler.h @@ -229,12 +229,31 @@ class ReadHandler : public Messaging::ExchangeDelegate const SingleLinkedListNode * GetEventPathList() const { return mpEventPathList; } const SingleLinkedListNode * GetDataVersionFilterList() const { return mpDataVersionFilterList; } + /** + * @brief Returns the reporting intervals that will used by the ReadHandler for the subscription being requested. + * After the subscription is established, these will be the set reporting intervals and cannot be changed. + * + * @param[out] aMinInterval minimum time delta between two reports for the subscription + * @param[in] aMaxInterval maximum time delta between two reports for the subscription + */ void GetReportingIntervals(uint16_t & aMinInterval, uint16_t & aMaxInterval) const { aMinInterval = mMinIntervalFloorSeconds; aMaxInterval = mMaxInterval; } + /** + * @brief Returns the maximum reporting interval that was initially requested by the subscriber + * This is the same value as the mMaxInterval member if the max interval is not changed by the publisher. + * + * @note If the device is an ICD, the MaxInterval of a subscription is automatically set to a multiple of the IdleModeDuration. + * This function is the only way to get the requested max interval once the OnSubscriptionRequested application callback + * is called. + * + * @return uint16_t subscriber requested maximum reporting interval + */ + inline uint16_t GetSubscriberRequestedMaxInterval() const { return mSubscriberRequestedMaxInterval; } + CHIP_ERROR SetMinReportingIntervalForTests(uint16_t aMinInterval) { VerifyOrReturnError(IsIdle(), CHIP_ERROR_INCORRECT_STATE); @@ -254,7 +273,7 @@ class ReadHandler : public Messaging::ExchangeDelegate { VerifyOrReturnError(IsIdle(), CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(mMinIntervalFloorSeconds <= aMaxInterval, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(aMaxInterval <= std::max(GetPublisherSelectedIntervalLimit(), mMaxInterval), + VerifyOrReturnError(aMaxInterval <= std::max(GetPublisherSelectedIntervalLimit(), mSubscriberRequestedMaxInterval), CHIP_ERROR_INVALID_ARGUMENT); mMaxInterval = aMaxInterval; return CHIP_NO_ERROR; @@ -542,9 +561,10 @@ class ReadHandler : public Messaging::ExchangeDelegate // engine, the "oldest" subscription is the subscription with the smallest generation. uint64_t mTransactionStartGeneration = 0; - SubscriptionId mSubscriptionId = 0; - uint16_t mMinIntervalFloorSeconds = 0; - uint16_t mMaxInterval = 0; + SubscriptionId mSubscriptionId = 0; + uint16_t mMinIntervalFloorSeconds = 0; + uint16_t mMaxInterval = 0; + uint16_t mSubscriberRequestedMaxInterval = 0; EventNumber mEventMin = 0; diff --git a/src/app/SimpleSubscriptionResumptionStorage.cpp b/src/app/SimpleSubscriptionResumptionStorage.cpp index e233c18af9..0818a75823 100644 --- a/src/app/SimpleSubscriptionResumptionStorage.cpp +++ b/src/app/SimpleSubscriptionResumptionStorage.cpp @@ -143,7 +143,7 @@ CHIP_ERROR SimpleSubscriptionResumptionStorage::Load(uint16_t subscriptionIndex, { Platform::ScopedMemoryBuffer backingBuffer; backingBuffer.Calloc(MaxSubscriptionSize()); - ReturnErrorCodeIf(backingBuffer.Get() == nullptr, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(backingBuffer.Get() != nullptr, CHIP_ERROR_NO_MEMORY); uint16_t len = static_cast(MaxSubscriptionSize()); ReturnErrorOnFailure(mStorage->SyncGetKeyValue(DefaultStorageKeyAllocator::SubscriptionResumption(subscriptionIndex).KeyName(), @@ -193,7 +193,7 @@ CHIP_ERROR SimpleSubscriptionResumptionStorage::Load(uint16_t subscriptionIndex, if (pathCount) { subscriptionInfo.mAttributePaths.Calloc(pathCount); - ReturnErrorCodeIf(subscriptionInfo.mAttributePaths.Get() == nullptr, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(subscriptionInfo.mAttributePaths.Get() != nullptr, CHIP_ERROR_NO_MEMORY); for (size_t pathIndex = 0; pathIndex < pathCount; pathIndex++) { ReturnErrorOnFailure(reader.Next(TLV::kTLVType_Structure, kAttributePathTag)); @@ -226,7 +226,7 @@ CHIP_ERROR SimpleSubscriptionResumptionStorage::Load(uint16_t subscriptionIndex, if (pathCount) { subscriptionInfo.mEventPaths.Calloc(pathCount); - ReturnErrorCodeIf(subscriptionInfo.mEventPaths.Get() == nullptr, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(subscriptionInfo.mEventPaths.Get() != nullptr, CHIP_ERROR_NO_MEMORY); for (size_t pathIndex = 0; pathIndex < pathCount; pathIndex++) { ReturnErrorOnFailure(reader.Next(TLV::kTLVType_Structure, kEventPathTag)); @@ -371,7 +371,7 @@ CHIP_ERROR SimpleSubscriptionResumptionStorage::Save(SubscriptionInfo & subscrip // Now construct subscription state and save Platform::ScopedMemoryBuffer backingBuffer; backingBuffer.Calloc(MaxSubscriptionSize()); - ReturnErrorCodeIf(backingBuffer.Get() == nullptr, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(backingBuffer.Get() != nullptr, CHIP_ERROR_NO_MEMORY); TLV::ScopedBufferTLVWriter writer(std::move(backingBuffer), MaxSubscriptionSize()); diff --git a/src/app/SubscriptionResumptionStorage.h b/src/app/SubscriptionResumptionStorage.h index 74158ecfd3..23a06c91e3 100644 --- a/src/app/SubscriptionResumptionStorage.h +++ b/src/app/SubscriptionResumptionStorage.h @@ -95,9 +95,9 @@ class SubscriptionResumptionStorage attributePathCount++; attributePath = attributePath->mpNext; } - ReturnErrorCodeIf((attributePathCount * sizeof(AttributePathParamsValues)) > UINT16_MAX, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError((attributePathCount * sizeof(AttributePathParamsValues)) <= UINT16_MAX, CHIP_ERROR_NO_MEMORY); mAttributePaths.Calloc(attributePathCount); - ReturnErrorCodeIf(mAttributePaths.Get() == nullptr, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(mAttributePaths.Get() != nullptr, CHIP_ERROR_NO_MEMORY); attributePath = pAttributePathList; for (size_t i = 0; i < attributePathCount; i++) { @@ -120,9 +120,9 @@ class SubscriptionResumptionStorage eventPathCount++; eventPath = eventPath->mpNext; } - ReturnErrorCodeIf((eventPathCount * sizeof(EventPathParamsValues)) > UINT16_MAX, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError((eventPathCount * sizeof(EventPathParamsValues)) <= UINT16_MAX, CHIP_ERROR_NO_MEMORY); mEventPaths.Calloc(eventPathCount); - ReturnErrorCodeIf(mEventPaths.Get() == nullptr, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(mEventPaths.Get() != nullptr, CHIP_ERROR_NO_MEMORY); eventPath = pEventPathList; for (size_t i = 0; i < eventPathCount; i++) { diff --git a/src/app/WriteClient.cpp b/src/app/WriteClient.cpp index da24d058f1..0f1aef9f74 100644 --- a/src/app/WriteClient.cpp +++ b/src/app/WriteClient.cpp @@ -142,7 +142,7 @@ CHIP_ERROR WriteClient::FinalizeMessage(bool aHasMoreChunks) VerifyOrReturnError(mState == State::AddAttribute, CHIP_ERROR_INCORRECT_STATE); TLV::TLVWriter * writer = mWriteRequestBuilder.GetWriter(); - ReturnErrorCodeIf(writer == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(writer != nullptr, CHIP_ERROR_INCORRECT_STATE); ReturnErrorOnFailure(writer->UnreserveBuffer(kReservedSizeForTLVEncodingOverhead)); ReturnErrorOnFailure(mWriteRequestBuilder.GetWriteRequests().EndOfAttributeDataIBs()); diff --git a/src/app/WriteHandler.cpp b/src/app/WriteHandler.cpp index 5050cbbee2..67a5c7a3ac 100644 --- a/src/app/WriteHandler.cpp +++ b/src/app/WriteHandler.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -32,6 +33,7 @@ #include #include #include +#include #include #include @@ -40,9 +42,33 @@ namespace chip { namespace app { +namespace { + +/// Wraps a EndpointIterator and ensures that `::Release()` is called +/// for the iterator (assuming it is non-null) +class AutoReleaseGroupEndpointIterator +{ +public: + explicit AutoReleaseGroupEndpointIterator(Credentials::GroupDataProvider::EndpointIterator * iterator) : mIterator(iterator) {} + ~AutoReleaseGroupEndpointIterator() + { + if (mIterator != nullptr) + { + mIterator->Release(); + } + } + + bool IsNull() const { return mIterator == nullptr; } + bool Next(Credentials::GroupDataProvider::GroupEndpoint & item) { return mIterator->Next(item); } + +private: + Credentials::GroupDataProvider::EndpointIterator * mIterator; +}; + +} // namespace + using namespace Protocols::InteractionModel; -using Status = Protocols::InteractionModel::Status; -constexpr uint8_t kListAttributeType = 0x48; +using Status = Protocols::InteractionModel::Status; CHIP_ERROR WriteHandler::Init(DataModel::Provider * apProvider, WriteHandlerDelegate * apWriteHandlerDelegate) { @@ -79,6 +105,30 @@ void WriteHandler::Close() MoveToState(State::Uninitialized); } +std::optional WriteHandler::IsListAttributePath(const ConcreteAttributePath & path) +{ +#if CHIP_CONFIG_USE_DATA_MODEL_INTERFACE + VerifyOrReturnValue(mDataModelProvider != nullptr, std::nullopt, + ChipLogError(DataManagement, "Null data model while checking attribute properties.")); + + auto info = mDataModelProvider->GetAttributeInfo(path); + if (!info.has_value()) + { + return std::nullopt; + } + + return info->flags.Has(DataModel::AttributeQualityFlags::kListAttribute); +#else + constexpr uint8_t kListAttributeType = 0x48; + const auto attributeMetadata = GetAttributeMetadata(path); + if (attributeMetadata == nullptr) + { + return std::nullopt; + } + return (attributeMetadata->attributeType == kListAttributeType); +#endif +} + Status WriteHandler::HandleWriteRequestMessage(Messaging::ExchangeContext * apExchangeContext, System::PacketBufferHandle && aPayload, bool aIsTimedWrite) { @@ -294,7 +344,7 @@ CHIP_ERROR WriteHandler::ProcessAttributeDataIBs(TLV::TLVReader & aAttributeData { CHIP_ERROR err = CHIP_NO_ERROR; - ReturnErrorCodeIf(!mExchangeCtx, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(mExchangeCtx, CHIP_ERROR_INTERNAL); const Access::SubjectDescriptor subjectDescriptor = mExchangeCtx->GetSessionHandle()->GetSubjectDescriptor(); while (CHIP_NO_ERROR == (err = aAttributeDataIBsReader.Next())) @@ -317,10 +367,7 @@ CHIP_ERROR WriteHandler::ProcessAttributeDataIBs(TLV::TLVReader & aAttributeData err = element.GetData(&dataReader); SuccessOrExit(err); - const auto attributeMetadata = GetAttributeMetadata(dataAttributePath); - bool currentAttributeIsList = (attributeMetadata != nullptr && attributeMetadata->attributeType == kListAttributeType); - - if (!dataAttributePath.IsListOperation() && currentAttributeIsList) + if (!dataAttributePath.IsListOperation() && IsListAttributePath(dataAttributePath).value_or(false)) { dataAttributePath.mListOp = ConcreteDataAttributePath::ListOperation::ReplaceAll; } @@ -399,7 +446,7 @@ CHIP_ERROR WriteHandler::ProcessGroupAttributeDataIBs(TLV::TLVReader & aAttribut { CHIP_ERROR err = CHIP_NO_ERROR; - ReturnErrorCodeIf(!mExchangeCtx, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(mExchangeCtx, CHIP_ERROR_INTERNAL); const Access::SubjectDescriptor subjectDescriptor = mExchangeCtx->GetSessionHandle()->AsIncomingGroupSession()->GetSubjectDescriptor(); @@ -414,10 +461,6 @@ CHIP_ERROR WriteHandler::ProcessGroupAttributeDataIBs(TLV::TLVReader & aAttribut ConcreteDataAttributePath dataAttributePath; TLV::TLVReader reader = aAttributeDataIBsReader; - Credentials::GroupDataProvider::GroupEndpoint mapping; - Credentials::GroupDataProvider * groupDataProvider = Credentials::GetGroupDataProvider(); - Credentials::GroupDataProvider::EndpointIterator * iterator; - err = element.Init(reader); SuccessOrExit(err); @@ -439,16 +482,17 @@ CHIP_ERROR WriteHandler::ProcessGroupAttributeDataIBs(TLV::TLVReader & aAttribut "Received group attribute write for Group=%u Cluster=" ChipLogFormatMEI " attribute=" ChipLogFormatMEI, groupId, ChipLogValueMEI(dataAttributePath.mClusterId), ChipLogValueMEI(dataAttributePath.mAttributeId)); - iterator = groupDataProvider->IterateEndpoints(fabric); - VerifyOrExit(iterator != nullptr, err = CHIP_ERROR_NO_MEMORY); + AutoReleaseGroupEndpointIterator iterator(Credentials::GetGroupDataProvider()->IterateEndpoints(fabric)); + VerifyOrExit(!iterator.IsNull(), err = CHIP_ERROR_NO_MEMORY); bool shouldReportListWriteEnd = ShouldReportListWriteEnd( mProcessingAttributePath, mStateFlags.Has(StateBits::kProcessingAttributeIsList), dataAttributePath); bool shouldReportListWriteBegin = false; // This will be set below. - const EmberAfAttributeMetadata * attributeMetadata = nullptr; + std::optional isListAttribute = std::nullopt; - while (iterator->Next(mapping)) + Credentials::GroupDataProvider::GroupEndpoint mapping; + while (iterator.Next(mapping)) { if (groupId != mapping.group_id) { @@ -460,11 +504,11 @@ CHIP_ERROR WriteHandler::ProcessGroupAttributeDataIBs(TLV::TLVReader & aAttribut // Try to get the metadata from for the attribute from one of the expanded endpoints (it doesn't really matter which // endpoint we pick, as long as it's valid) and update the path info according to it and recheck if we need to report // list write begin. - if (attributeMetadata == nullptr) + if (!isListAttribute.has_value()) { - attributeMetadata = GetAttributeMetadata(dataAttributePath); - bool currentAttributeIsList = - (attributeMetadata != nullptr && attributeMetadata->attributeType == kListAttributeType); + isListAttribute = IsListAttributePath(dataAttributePath); + bool currentAttributeIsList = isListAttribute.value_or(false); + if (!dataAttributePath.IsListOperation() && currentAttributeIsList) { dataAttributePath.mListOp = ConcreteDataAttributePath::ListOperation::ReplaceAll; @@ -530,7 +574,6 @@ CHIP_ERROR WriteHandler::ProcessGroupAttributeDataIBs(TLV::TLVReader & aAttribut dataAttributePath.mEndpointId = kInvalidEndpointId; mStateFlags.Set(StateBits::kProcessingAttributeIsList, dataAttributePath.IsListOperation()); mProcessingAttributePath.SetValue(dataAttributePath); - iterator->Release(); } if (CHIP_END_OF_TLV == err) diff --git a/src/app/WriteHandler.h b/src/app/WriteHandler.h index fe63e028b8..33c068b8cd 100644 --- a/src/app/WriteHandler.h +++ b/src/app/WriteHandler.h @@ -189,6 +189,12 @@ class WriteHandler : public Messaging::ExchangeDelegate CHIP_ERROR WriteClusterData(const Access::SubjectDescriptor & aSubject, const ConcreteDataAttributePath & aPath, TLV::TLVReader & aData); + /// Checks whether the given path corresponds to a list attribute + /// Return values: + /// true/false: valid attribute path, known if list or not + /// std::nulloptr - path not available/valid, unknown if attribute is a list or not + std::optional IsListAttributePath(const ConcreteAttributePath & path); + Messaging::ExchangeHolder mExchangeCtx; WriteResponseMessage::Builder mWriteResponseBuilder; Optional mProcessingAttributePath; diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake index e2d05adb01..11db6d4ec6 100644 --- a/src/app/chip_data_model.cmake +++ b/src/app/chip_data_model.cmake @@ -70,12 +70,17 @@ endfunction() # function(chip_configure_data_model APP_TARGET) set(SCOPE PRIVATE) - cmake_parse_arguments(ARG "" "SCOPE;ZAP_FILE;IDL" "EXTERNAL_CLUSTERS" ${ARGN}) + set(ADD_EMBER_INTERFACE_FILES TRUE) + cmake_parse_arguments(ARG "SKIP_EMBER_INTERFACE" "SCOPE;ZAP_FILE;IDL" "EXTERNAL_CLUSTERS" ${ARGN}) if(ARG_SCOPE) set(SCOPE ${ARG_SCOPE}) endif() + if(ARG_SKIP_EMBER_INTERFACE) + set(ADD_EMBER_INTERFACE_FILES FALSE) + endif() + # CMAKE data model auto-includes the server side implementation target_sources(${APP_TARGET} ${SCOPE} ${CHIP_APP_BASE_DIR}/server/AclStorage.cpp @@ -159,7 +164,6 @@ function(chip_configure_data_model APP_TARGET) ${CHIP_APP_BASE_DIR}/util/attribute-table.cpp ${CHIP_APP_BASE_DIR}/util/binding-table.cpp ${CHIP_APP_BASE_DIR}/util/DataModelHandler.cpp - ${CHIP_APP_BASE_DIR}/util/ember-compatibility-functions.cpp ${CHIP_APP_BASE_DIR}/util/ember-global-attribute-access-interface.cpp ${CHIP_APP_BASE_DIR}/util/ember-io-storage.cpp ${CHIP_APP_BASE_DIR}/util/generic-callback-stubs.cpp @@ -169,4 +173,10 @@ function(chip_configure_data_model APP_TARGET) ${APP_GEN_FILES} ${APP_TEMPLATES_GEN_FILES} ) + + if(ADD_EMBER_INTERFACE_FILES) + target_sources(${APP_TARGET} ${SCOPE} + ${CHIP_APP_BASE_DIR}/util/ember-compatibility-functions.cpp + ) + endif() endfunction() diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index 42b221c1a9..cc998948d8 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -209,11 +209,15 @@ template("chip_data_model") { "${_app_root}/util/DataModelHandler.cpp", "${_app_root}/util/attribute-storage.cpp", "${_app_root}/util/attribute-table.cpp", - "${_app_root}/util/ember-compatibility-functions.cpp", "${_app_root}/util/ember-global-attribute-access-interface.cpp", "${_app_root}/util/ember-io-storage.cpp", "${_app_root}/util/util.cpp", ] + + if (chip_use_data_model_interface != "enabled") { + # This applies to "check" or "disabled" (i.e. use ember-only or use ember for double-checking) + sources += [ "${_app_root}/util/ember-compatibility-functions.cpp" ] + } } if (defined(invoker.zap_file)) { diff --git a/src/app/clusters/access-control-server/access-control-server.cpp b/src/app/clusters/access-control-server/access-control-server.cpp index f6a47fb96d..e4c5688e6a 100644 --- a/src/app/clusters/access-control-server/access-control-server.cpp +++ b/src/app/clusters/access-control-server/access-control-server.cpp @@ -215,7 +215,7 @@ CHIP_ERROR AccessControlAttribute::ReadAcl(AttributeValueEncoder & aEncoder) { ReturnErrorOnFailure(encoder.Encode(encodableEntry)); } - ReturnErrorCodeIf(err != CHIP_NO_ERROR && err != CHIP_ERROR_SENTINEL, err); + VerifyOrReturnError(err == CHIP_NO_ERROR || err == CHIP_ERROR_SENTINEL, err); } return CHIP_NO_ERROR; }); @@ -233,7 +233,7 @@ CHIP_ERROR AccessControlAttribute::ReadExtension(AttributeValueEncoder & aEncode uint16_t size = static_cast(sizeof(buffer)); CHIP_ERROR errStorage = storage.SyncGetKeyValue( DefaultStorageKeyAllocator::AccessControlExtensionEntry(fabric.GetFabricIndex()).KeyName(), buffer, size); - ReturnErrorCodeIf(errStorage == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(errStorage != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_ERROR_INCORRECT_STATE); if (errStorage == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND) { continue; @@ -333,8 +333,8 @@ CHIP_ERROR AccessControlAttribute::WriteExtension(const ConcreteDataAttributePat uint16_t size = static_cast(sizeof(buffer)); CHIP_ERROR errStorage = storage.SyncGetKeyValue( DefaultStorageKeyAllocator::AccessControlExtensionEntry(accessingFabricIndex).KeyName(), buffer, size); - ReturnErrorCodeIf(errStorage == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(errStorage != CHIP_NO_ERROR && errStorage != CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND, errStorage); + VerifyOrReturnError(errStorage != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(errStorage == CHIP_NO_ERROR || errStorage == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND, errStorage); if (!aPath.IsListItemOperation()) { @@ -346,7 +346,7 @@ CHIP_ERROR AccessControlAttribute::WriteExtension(const ConcreteDataAttributePat if (count == 0) { - ReturnErrorCodeIf(errStorage == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND, CHIP_NO_ERROR); + VerifyOrReturnError(errStorage != CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND, CHIP_NO_ERROR); ReturnErrorOnFailure(storage.SyncDeleteKeyValue( DefaultStorageKeyAllocator::AccessControlExtensionEntry(accessingFabricIndex).KeyName())); AccessControlCluster::Structs::AccessControlExtensionStruct::Type item = { @@ -367,7 +367,7 @@ CHIP_ERROR AccessControlAttribute::WriteExtension(const ConcreteDataAttributePat } auto & item = iterator.GetValue(); // TODO(#13590): generated code doesn't automatically handle max length so do it manually - ReturnErrorCodeIf(item.data.size() > kExtensionDataMaxLength, CHIP_IM_GLOBAL_STATUS(ConstraintError)); + VerifyOrReturnError(item.data.size() <= kExtensionDataMaxLength, CHIP_IM_GLOBAL_STATUS(ConstraintError)); ReturnErrorOnFailure(CheckExtensionEntryDataFormat(item.data)); @@ -386,11 +386,11 @@ CHIP_ERROR AccessControlAttribute::WriteExtension(const ConcreteDataAttributePat } else if (aPath.mListOp == ConcreteDataAttributePath::ListOperation::AppendItem) { - ReturnErrorCodeIf(errStorage != CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND, CHIP_IM_GLOBAL_STATUS(ConstraintError)); + VerifyOrReturnError(errStorage == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND, CHIP_IM_GLOBAL_STATUS(ConstraintError)); AccessControlCluster::Structs::AccessControlExtensionStruct::DecodableType item; ReturnErrorOnFailure(aDecoder.Decode(item)); // TODO(#13590): generated code doesn't automatically handle max length so do it manually - ReturnErrorCodeIf(item.data.size() > kExtensionDataMaxLength, CHIP_IM_GLOBAL_STATUS(ConstraintError)); + VerifyOrReturnError(item.data.size() <= kExtensionDataMaxLength, CHIP_IM_GLOBAL_STATUS(ConstraintError)); ReturnErrorOnFailure(CheckExtensionEntryDataFormat(item.data)); diff --git a/src/app/clusters/bindings/bindings.cpp b/src/app/clusters/bindings/bindings.cpp index 409e667278..47e4d45715 100644 --- a/src/app/clusters/bindings/bindings.cpp +++ b/src/app/clusters/bindings/bindings.cpp @@ -114,8 +114,8 @@ CHIP_ERROR CheckValidBindingList(const EndpointId localEndpoint, const Decodable oldListSize++; } } - ReturnErrorCodeIf(BindingTable::GetInstance().Size() - oldListSize + listSize > MATTER_BINDING_TABLE_SIZE, - CHIP_IM_GLOBAL_STATUS(ResourceExhausted)); + VerifyOrReturnError(BindingTable::GetInstance().Size() - oldListSize + listSize <= MATTER_BINDING_TABLE_SIZE, + CHIP_IM_GLOBAL_STATUS(ResourceExhausted)); return CHIP_NO_ERROR; } diff --git a/src/app/clusters/color-control-server/color-control-server.cpp b/src/app/clusters/color-control-server/color-control-server.cpp index 2a85888422..d43590da31 100644 --- a/src/app/clusters/color-control-server/color-control-server.cpp +++ b/src/app/clusters/color-control-server/color-control-server.cpp @@ -1093,7 +1093,7 @@ void ColorControlServer::SetHSVRemainingTime(chip::EndpointId endpoint) { bool hsvTransitionStart = (hueTransitionState->stepsRemaining == hueTransitionState->stepsTotal) || (saturationTransitionState->stepsRemaining == saturationTransitionState->stepsTotal); - SetQuietReportRemainingTime(endpoint, max(hueTransitionState->timeRemaining, saturationTransitionState->timeRemaining), + SetQuietReportRemainingTime(endpoint, std::max(hueTransitionState->timeRemaining, saturationTransitionState->timeRemaining), hsvTransitionStart); } } @@ -1283,7 +1283,7 @@ Status ColorControlServer::moveToSaturation(uint8_t saturation, uint16_t transit // now, kick off the state machine. initSaturationTransitionState(endpoint, colorSaturationTransitionState); colorSaturationTransitionState->finalValue = saturation; - colorSaturationTransitionState->stepsRemaining = max(transitionTime, 1); + colorSaturationTransitionState->stepsRemaining = std::max(transitionTime, 1); colorSaturationTransitionState->stepsTotal = colorSaturationTransitionState->stepsRemaining; colorSaturationTransitionState->timeRemaining = transitionTime; colorSaturationTransitionState->transitionTime = transitionTime; @@ -1363,7 +1363,7 @@ Status ColorControlServer::moveToHueAndSaturation(uint16_t hue, uint8_t saturati } colorHueTransitionState->up = moveUp; - colorHueTransitionState->stepsRemaining = max(transitionTime, 1); + colorHueTransitionState->stepsRemaining = std::max(transitionTime, 1); colorHueTransitionState->stepsTotal = colorHueTransitionState->stepsRemaining; colorHueTransitionState->timeRemaining = transitionTime; colorHueTransitionState->transitionTime = transitionTime; @@ -1614,7 +1614,7 @@ bool ColorControlServer::moveToHueCommand(app::CommandHandler * commandObj, cons colorHueTransitionState->finalHue = static_cast(hue); } - colorHueTransitionState->stepsRemaining = max(transitionTime, 1); + colorHueTransitionState->stepsRemaining = std::max(transitionTime, 1); colorHueTransitionState->stepsTotal = colorHueTransitionState->stepsRemaining; colorHueTransitionState->timeRemaining = transitionTime; colorHueTransitionState->transitionTime = transitionTime; @@ -1758,7 +1758,7 @@ bool ColorControlServer::stepHueCommand(app::CommandHandler * commandObj, const } } - colorHueTransitionState->stepsRemaining = max(transitionTime, 1); + colorHueTransitionState->stepsRemaining = std::max(transitionTime, 1); colorHueTransitionState->stepsTotal = colorHueTransitionState->stepsRemaining; colorHueTransitionState->timeRemaining = transitionTime; colorHueTransitionState->transitionTime = transitionTime; @@ -1934,7 +1934,7 @@ bool ColorControlServer::stepSaturationCommand(app::CommandHandler * commandObj, { colorSaturationTransitionState->finalValue = subtractSaturation(currentSaturation, stepSize); } - colorSaturationTransitionState->stepsRemaining = max(transitionTime, 1); + colorSaturationTransitionState->stepsRemaining = std::max(transitionTime, 1); colorSaturationTransitionState->stepsTotal = colorSaturationTransitionState->stepsRemaining; colorSaturationTransitionState->timeRemaining = transitionTime; colorSaturationTransitionState->transitionTime = transitionTime; @@ -2276,7 +2276,7 @@ Status ColorControlServer::moveToColor(uint16_t colorX, uint16_t colorY, uint16_ Attributes::CurrentX::Get(endpoint, &(colorXTransitionState->initialValue)); Attributes::CurrentX::Get(endpoint, &(colorXTransitionState->currentValue)); colorXTransitionState->finalValue = colorX; - colorXTransitionState->stepsRemaining = max(transitionTime, 1); + colorXTransitionState->stepsRemaining = std::max(transitionTime, 1); colorXTransitionState->stepsTotal = colorXTransitionState->stepsRemaining; colorXTransitionState->timeRemaining = transitionTime; colorXTransitionState->transitionTime = transitionTime; @@ -2402,7 +2402,7 @@ bool ColorControlServer::moveColorCommand(app::CommandHandler * commandObj, cons colorYTransitionState->lowLimit = MIN_CIE_XY_VALUE; colorYTransitionState->highLimit = MAX_CIE_XY_VALUE; - SetQuietReportRemainingTime(endpoint, max(transitionTimeX, transitionTimeY), true /* isNewTransition */); + SetQuietReportRemainingTime(endpoint, std::max(transitionTimeX, transitionTimeY), true /* isNewTransition */); // kick off the state machine: scheduleTimerCallbackMs(configureXYEventControl(endpoint), TRANSITION_UPDATE_TIME_MS.count()); @@ -2463,7 +2463,7 @@ bool ColorControlServer::stepColorCommand(app::CommandHandler * commandObj, cons colorXTransitionState->initialValue = currentColorX; colorXTransitionState->currentValue = currentColorX; colorXTransitionState->finalValue = colorX; - colorXTransitionState->stepsRemaining = max(transitionTime, 1); + colorXTransitionState->stepsRemaining = std::max(transitionTime, 1); colorXTransitionState->stepsTotal = colorXTransitionState->stepsRemaining; colorXTransitionState->timeRemaining = transitionTime; colorXTransitionState->transitionTime = transitionTime; @@ -2507,7 +2507,7 @@ void ColorControlServer::updateXYCommand(EndpointId endpoint) bool isXTransitionDone = computeNewColor16uValue(colorXTransitionState); bool isYTransitionDone = computeNewColor16uValue(colorYTransitionState); - SetQuietReportRemainingTime(endpoint, max(colorXTransitionState->timeRemaining, colorYTransitionState->timeRemaining)); + SetQuietReportRemainingTime(endpoint, std::max(colorXTransitionState->timeRemaining, colorYTransitionState->timeRemaining)); if (isXTransitionDone && isYTransitionDone) { @@ -2607,7 +2607,7 @@ Status ColorControlServer::moveToColorTemp(EndpointId aEndpoint, uint16_t colorT Attributes::ColorTemperatureMireds::Get(endpoint, &(colorTempTransitionState->currentValue)); colorTempTransitionState->finalValue = colorTemperature; - colorTempTransitionState->stepsRemaining = max(transitionTime, 1); + colorTempTransitionState->stepsRemaining = std::max(transitionTime, 1); colorTempTransitionState->stepsTotal = colorTempTransitionState->stepsRemaining; colorTempTransitionState->timeRemaining = transitionTime; colorTempTransitionState->transitionTime = transitionTime; @@ -2990,7 +2990,7 @@ bool ColorControlServer::stepColorTempCommand(app::CommandHandler * commandObj, colorTempTransitionState->finalValue = static_cast(finalValue32u); } } - colorTempTransitionState->stepsRemaining = max(transitionTime, 1); + colorTempTransitionState->stepsRemaining = std::max(transitionTime, 1); colorTempTransitionState->stepsTotal = colorTempTransitionState->stepsRemaining; colorTempTransitionState->timeRemaining = transitionTime; colorTempTransitionState->transitionTime = transitionTime; diff --git a/src/app/clusters/commissioner-control-server/commissioner-control-server.cpp b/src/app/clusters/commissioner-control-server/commissioner-control-server.cpp index d6282f287a..ea0c9b1203 100644 --- a/src/app/clusters/commissioner-control-server/commissioner-control-server.cpp +++ b/src/app/clusters/commissioner-control-server/commissioner-control-server.cpp @@ -132,10 +132,11 @@ CommissionerControlServer::SetSupportedDeviceCategoriesValue(EndpointId endpoint } CHIP_ERROR -CommissionerControlServer::GenerateCommissioningRequestResultEvent(const Events::CommissioningRequestResult::Type & result) +CommissionerControlServer::GenerateCommissioningRequestResultEvent(EndpointId endpoint, + const Events::CommissioningRequestResult::Type & result) { EventNumber eventNumber; - CHIP_ERROR error = LogEvent(result, kRootEndpointId, eventNumber); + CHIP_ERROR error = LogEvent(result, endpoint, eventNumber); if (CHIP_NO_ERROR != error) { ChipLogError(Zcl, "CommissionerControl: Unable to emit CommissioningRequestResult event: %" CHIP_ERROR_FORMAT, diff --git a/src/app/clusters/commissioner-control-server/commissioner-control-server.h b/src/app/clusters/commissioner-control-server/commissioner-control-server.h index e63769de1d..56f43620b5 100644 --- a/src/app/clusters/commissioner-control-server/commissioner-control-server.h +++ b/src/app/clusters/commissioner-control-server/commissioner-control-server.h @@ -120,7 +120,8 @@ class CommissionerControlServer * @brief * Called after the server return SUCCESS to a correctly formatted RequestCommissioningApproval command. */ - CHIP_ERROR GenerateCommissioningRequestResultEvent(const Events::CommissioningRequestResult::Type & result); + CHIP_ERROR GenerateCommissioningRequestResultEvent(EndpointId endpoint, + const Events::CommissioningRequestResult::Type & result); private: CommissionerControlServer() = default; diff --git a/src/app/clusters/concentration-measurement-server/concentration-measurement-cluster-objects.h b/src/app/clusters/concentration-measurement-server/concentration-measurement-cluster-objects.h index d7fd36f439..90dc631514 100644 --- a/src/app/clusters/concentration-measurement-server/concentration-measurement-cluster-objects.h +++ b/src/app/clusters/concentration-measurement-server/concentration-measurement-cluster-objects.h @@ -245,10 +245,6 @@ namespace AcceptedCommandList { static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; } // namespace AcceptedCommandList -namespace EventList { -static constexpr AttributeId Id = Globals::Attributes::EventList::Id; -} // namespace EventList - namespace AttributeList { static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; } // namespace AttributeList diff --git a/src/app/clusters/ecosystem-information-server/ecosystem-information-server.cpp b/src/app/clusters/ecosystem-information-server/ecosystem-information-server.cpp index 4880c1058d..ec2f4f852b 100644 --- a/src/app/clusters/ecosystem-information-server/ecosystem-information-server.cpp +++ b/src/app/clusters/ecosystem-information-server/ecosystem-information-server.cpp @@ -215,9 +215,11 @@ EcosystemLocationStruct::Builder::SetLocationDescriptorLastEdit(uint64_t aLocati std::unique_ptr EcosystemLocationStruct::Builder::Build() { VerifyOrReturnValue(!mIsAlreadyBuilt, nullptr, ChipLogError(Zcl, "Build() already called")); - VerifyOrReturnValue(!mLocationDescriptor.mLocationName.empty(), nullptr, ChipLogError(Zcl, "Must Provided Location Name")); - VerifyOrReturnValue(mLocationDescriptor.mLocationName.size() <= kLocationDescriptorNameMaxSize, nullptr, - ChipLogError(Zcl, "Must Location Name must be less than 64 bytes")); + VerifyOrReturnValue(!mLocationDescriptor.mLocationName.empty(), nullptr, ChipLogError(Zcl, "Must Provide Location Name")); + static_assert(kLocationDescriptorNameMaxSize <= std::numeric_limits::max()); + VerifyOrReturnValue( + mLocationDescriptor.mLocationName.size() <= kLocationDescriptorNameMaxSize, nullptr, + ChipLogError(Zcl, "Location Name must be less than %u bytes", static_cast(kLocationDescriptorNameMaxSize))); // std::make_unique does not have access to private constructor we workaround with using new std::unique_ptr ret{ new EcosystemLocationStruct(std::move(mLocationDescriptor), @@ -262,6 +264,7 @@ CHIP_ERROR EcosystemInformationServer::AddDeviceInfo(EndpointId aEndpoint, std:: auto & deviceInfo = mDevicesMap[aEndpoint]; deviceInfo.mDeviceDirectory.push_back(std::move(aDevice)); + mMatterContext.MarkDirty(aEndpoint, Attributes::DeviceDirectory::Id); return CHIP_NO_ERROR; } @@ -271,6 +274,7 @@ CHIP_ERROR EcosystemInformationServer::AddLocationInfo(EndpointId aEndpoint, con VerifyOrReturnError(aLocation, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError((aEndpoint != kRootEndpointId && aEndpoint != kInvalidEndpointId), CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(!aLocationId.empty(), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(aLocationId.size() <= kUniqueLocationIdMaxSize, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(aFabricIndex >= kMinValidFabricIndex, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(aFabricIndex <= kMaxValidFabricIndex, CHIP_ERROR_INVALID_ARGUMENT); @@ -279,6 +283,7 @@ CHIP_ERROR EcosystemInformationServer::AddLocationInfo(EndpointId aEndpoint, con VerifyOrReturnError((deviceInfo.mLocationDirectory.find(key) == deviceInfo.mLocationDirectory.end()), CHIP_ERROR_INVALID_ARGUMENT); deviceInfo.mLocationDirectory[key] = std::move(aLocation); + mMatterContext.MarkDirty(aEndpoint, Attributes::LocationDirectory::Id); return CHIP_NO_ERROR; } diff --git a/src/app/clusters/ecosystem-information-server/ecosystem-information-server.h b/src/app/clusters/ecosystem-information-server/ecosystem-information-server.h index 3fe1621813..81cfcfab9c 100644 --- a/src/app/clusters/ecosystem-information-server/ecosystem-information-server.h +++ b/src/app/clusters/ecosystem-information-server/ecosystem-information-server.h @@ -26,6 +26,8 @@ #include #include +#include +#include #include @@ -34,6 +36,21 @@ namespace app { namespace Clusters { namespace EcosystemInformation { +class MatterContext +{ +public: + virtual ~MatterContext() = default; + // MarkDirty + virtual void MarkDirty(EndpointId endpointId, AttributeId attributeId) + { + MatterReportingAttributeChangeCallback(endpointId, Id, attributeId); + } +}; + +class TestOnlyParameter +{ +}; + // This intentionally mirrors Structs::EcosystemDeviceStruct::Type but has ownership // of underlying types. class EcosystemDeviceStruct @@ -143,11 +160,14 @@ class EcosystemLocationStruct uint64_t mLocationDescriptorLastEditEpochUs; }; -class EcosystemInformationServer +class EcosystemInformationServer : public MatterContext { public: static EcosystemInformationServer & Instance(); + EcosystemInformationServer() : mMatterContext(*this){}; + EcosystemInformationServer(TestOnlyParameter _, MatterContext & aMatterContext) : mMatterContext(aMatterContext){}; + /** * @brief Add EcosystemInformation Cluster to endpoint so we respond appropriately on endpoint * @@ -211,6 +231,7 @@ class EcosystemInformationServer CHIP_ERROR EncodeDeviceDirectoryAttribute(EndpointId aEndpoint, AttributeValueEncoder & aEncoder); CHIP_ERROR EncodeLocationStructAttribute(EndpointId aEndpoint, AttributeValueEncoder & aEncoder); + MatterContext & mMatterContext; std::map mDevicesMap; static EcosystemInformationServer mInstance; diff --git a/src/app/clusters/mode-base-server/mode-base-cluster-objects.h b/src/app/clusters/mode-base-server/mode-base-cluster-objects.h index 5d450c6714..8071cbca94 100644 --- a/src/app/clusters/mode-base-server/mode-base-cluster-objects.h +++ b/src/app/clusters/mode-base-server/mode-base-cluster-objects.h @@ -90,10 +90,6 @@ namespace AcceptedCommandList { static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; } // namespace AcceptedCommandList -namespace EventList { -static constexpr AttributeId Id = Globals::Attributes::EventList::Id; -} // namespace EventList - namespace AttributeList { static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; } // namespace AttributeList diff --git a/src/app/clusters/mode-select-server/mode-select-server.cpp b/src/app/clusters/mode-select-server/mode-select-server.cpp index 813d16d965..9159ad565b 100644 --- a/src/app/clusters/mode-select-server/mode-select-server.cpp +++ b/src/app/clusters/mode-select-server/mode-select-server.cpp @@ -30,9 +30,14 @@ #include #include #include +#include #include #include +#ifdef MATTER_DM_PLUGIN_SCENES_MANAGEMENT +#include +#endif // MATTER_DM_PLUGIN_SCENES_MANAGEMENT + #ifdef MATTER_DM_PLUGIN_ON_OFF #include #endif // MATTER_DM_PLUGIN_ON_OFF @@ -109,35 +114,200 @@ CHIP_ERROR ModeSelectAttrAccess::Read(const ConcreteReadAttributePath & aPath, A return CHIP_NO_ERROR; } -} // anonymous namespace - -bool emberAfModeSelectClusterChangeToModeCallback(CommandHandler * commandHandler, const ConcreteCommandPath & commandPath, - const ModeSelect::Commands::ChangeToMode::DecodableType & commandData) +Status ChangeToMode(EndpointId endpointId, uint8_t newMode) { MATTER_TRACE_SCOPE("ChangeToMode", "ModeSelect"); ChipLogProgress(Zcl, "ModeSelect: Entering emberAfModeSelectClusterChangeToModeCallback"); - EndpointId endpointId = commandPath.mEndpointId; - uint8_t newMode = commandData.newMode; + // Check that the newMode matches one of the supported options const ModeSelect::Structs::ModeOptionStruct::Type * modeOptionPtr; const ModeSelect::SupportedModesManager * gSupportedModeManager = ModeSelect::getSupportedModesManager(); if (gSupportedModeManager == nullptr) { ChipLogError(Zcl, "ModeSelect: SupportedModesManager is NULL"); - commandHandler->AddStatus(commandPath, Status::Failure); - return true; + return Status::Failure; } Status checkSupportedModeStatus = gSupportedModeManager->getModeOptionByMode(endpointId, newMode, &modeOptionPtr); if (Status::Success != checkSupportedModeStatus) { ChipLogProgress(Zcl, "ModeSelect: Failed to find the option with mode %u", newMode); - commandHandler->AddStatus(commandPath, checkSupportedModeStatus); - return true; + return checkSupportedModeStatus; } ModeSelect::Attributes::CurrentMode::Set(endpointId, newMode); + return Status::Success; +} + +} // anonymous namespace + +#if defined(MATTER_DM_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS +static constexpr size_t kModeSelectMaxEnpointCount = + MATTER_DM_MODE_SELECT_CLUSTER_SERVER_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; + +static void timerCallback(System::Layer *, void * callbackContext); +static void sceneModeSelectCallback(EndpointId endpoint); +using ModeSelectEndPointPair = scenes::DefaultSceneHandlerImpl::EndpointStatePair; +using ModeSelectTransitionTimeInterface = + scenes::DefaultSceneHandlerImpl::TransitionTimeInterface; + +class DefaultModeSelectSceneHandler : public scenes::DefaultSceneHandlerImpl +{ +public: + DefaultSceneHandlerImpl::StatePairBuffer mSceneEndpointStatePairs; + // As per spec, 1 attribute is scenable in the mode select cluster + static constexpr uint8_t kScenableAttributeCount = 1; + + DefaultModeSelectSceneHandler() = default; + ~DefaultModeSelectSceneHandler() override {} + + // Default function for the mode select cluster, only puts the mode select cluster ID in the span if supported on the given + // endpoint + virtual void GetSupportedClusters(EndpointId endpoint, Span & clusterBuffer) override + { + if (emberAfContainsServer(endpoint, ModeSelect::Id) && clusterBuffer.size() >= 1) + { + clusterBuffer[0] = ModeSelect::Id; + clusterBuffer.reduce_size(1); + } + else + { + clusterBuffer.reduce_size(0); + } + } + + // Default function for mode select cluster, only checks if mode select is enabled on the endpoint + bool SupportsCluster(EndpointId endpoint, ClusterId cluster) override + { + return (cluster == ModeSelect::Id) && (emberAfContainsServer(endpoint, ModeSelect::Id)); + } + + /// @brief Serialize the Cluster's EFS value + /// @param [in] endpoint target endpoint + /// @param [in] cluster target cluster + /// @param [out] serializedBytes data to serialize into EFS + /// @return CHIP_NO_ERROR if successfully serialized the data, CHIP_ERROR_INVALID_ARGUMENT otherwise + CHIP_ERROR SerializeSave(EndpointId endpoint, ClusterId cluster, MutableByteSpan & serializedBytes) override + { + using AttributeValuePair = ScenesManagement::Structs::AttributeValuePairStruct::Type; + + uint8_t currentMode; + // read CurrentMode value + Status status = Attributes::CurrentMode::Get(endpoint, ¤tMode); + if (status != Status::Success) + { + ChipLogError(Zcl, "ERR: reading CurrentMode 0x%02x", to_underlying(status)); + return CHIP_ERROR_READ_FAILED; + } + + AttributeValuePair pairs[kScenableAttributeCount]; + + pairs[0].attributeID = Attributes::CurrentMode::Id; + pairs[0].valueUnsigned8.SetValue(currentMode); + + app::DataModel::List attributeValueList(pairs); + + return EncodeAttributeValueList(attributeValueList, serializedBytes); + } + + /// @brief Default EFS interaction when applying scene to the ModeSelect Cluster + /// @param endpoint target endpoint + /// @param cluster target cluster + /// @param serializedBytes Data from nvm + /// @param timeMs transition time in ms + /// @return CHIP_NO_ERROR if value as expected, CHIP_ERROR_INVALID_ARGUMENT otherwise + CHIP_ERROR ApplyScene(EndpointId endpoint, ClusterId cluster, const ByteSpan & serializedBytes, + scenes::TransitionTimeMs timeMs) override + { + app::DataModel::DecodableList attributeValueList; + + VerifyOrReturnError(cluster == ModeSelect::Id, CHIP_ERROR_INVALID_ARGUMENT); + + ReturnErrorOnFailure(DecodeAttributeValueList(serializedBytes, attributeValueList)); + + size_t attributeCount = 0; + ReturnErrorOnFailure(attributeValueList.ComputeSize(&attributeCount)); + VerifyOrReturnError(attributeCount <= kScenableAttributeCount, CHIP_ERROR_BUFFER_TOO_SMALL); + + auto pair_iterator = attributeValueList.begin(); + while (pair_iterator.Next()) + { + auto & decodePair = pair_iterator.GetValue(); + VerifyOrReturnError(decodePair.attributeID == Attributes::CurrentMode::Id, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(decodePair.valueUnsigned8.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure(mSceneEndpointStatePairs.InsertPair( + ModeSelectEndPointPair(endpoint, static_cast(decodePair.valueUnsigned8.HasValue())))); + } + // Verify that the EFS was completely read + CHIP_ERROR err = pair_iterator.GetStatus(); + if (CHIP_NO_ERROR != err) + { + mSceneEndpointStatePairs.RemovePair(endpoint); + return err; + } + + VerifyOrReturnError(mTransitionTimeInterface.sceneEventControl(endpoint) != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Milliseconds32(timeMs), timerCallback, + mTransitionTimeInterface.sceneEventControl(endpoint)); + + return CHIP_NO_ERROR; + } + +private: + ModeSelectTransitionTimeInterface mTransitionTimeInterface = + ModeSelectTransitionTimeInterface(ModeSelect::Id, sceneModeSelectCallback); +}; +static DefaultModeSelectSceneHandler sModeSelectSceneHandler; + +static void timerCallback(System::Layer *, void * callbackContext) +{ + auto control = static_cast(callbackContext); + (control->callback)(control->endpoint); +} + +/** + * @brief This function is a callback to apply the mode that was saved when the ApplyScene was called with a transition time greater + * than 0. + * + * @param endpoint The endpoint ID that the scene mode selection is associated with. + * + */ +static void sceneModeSelectCallback(EndpointId endpoint) +{ + ModeSelectEndPointPair savedState; + ReturnOnFailure(sModeSelectSceneHandler.mSceneEndpointStatePairs.GetPair(endpoint, savedState)); + ChangeToMode(endpoint, savedState.mValue); + sModeSelectSceneHandler.mSceneEndpointStatePairs.RemovePair(endpoint); +} + +#endif // defined(MATTER_DM_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS + +bool emberAfModeSelectClusterChangeToModeCallback(CommandHandler * commandHandler, const ConcreteCommandPath & commandPath, + const ModeSelect::Commands::ChangeToMode::DecodableType & commandData) +{ + ChipLogProgress(Zcl, "ModeSelect: Entering emberAfModeSelectClusterChangeToModeCallback"); + + uint8_t currentMode = 0; + ModeSelect::Attributes::CurrentMode::Get(commandPath.mEndpointId, ¤tMode); +#ifdef MATTER_DM_PLUGIN_SCENES_MANAGEMENT + if (currentMode != commandData.newMode) + { + // the scene has been changed (the value of CurrentMode has changed) so + // the current scene as described in the scene table is invalid + ScenesManagement::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(commandPath.mEndpointId); + } +#endif // MATTER_DM_PLUGIN_SCENES_MANAGEMENT + + Status status = ChangeToMode(commandPath.mEndpointId, commandData.newMode); + + if (Status::Success != status) + { + commandHandler->AddStatus(commandPath, status); + return true; + } + ChipLogProgress(Zcl, "ModeSelect: ChangeToMode successful"); - commandHandler->AddStatus(commandPath, Status::Success); + commandHandler->AddStatus(commandPath, status); return true; } @@ -148,6 +318,10 @@ bool emberAfModeSelectClusterChangeToModeCallback(CommandHandler * commandHandle */ void emberAfModeSelectClusterServerInitCallback(EndpointId endpointId) { +#if defined(MATTER_DM_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS + ScenesManagement::ScenesServer::Instance().RegisterSceneHandler(endpointId, &sModeSelectSceneHandler); +#endif // defined(MATTER_DM_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS + // StartUp behavior relies on CurrentMode StartUpMode attributes being non-volatile. if (areStartUpModeAndCurrentModeNonVolatile(endpointId)) { @@ -161,6 +335,7 @@ void emberAfModeSelectClusterServerInitCallback(EndpointId endpointId) Status status = Attributes::StartUpMode::Get(endpointId, startUpMode); if (status == Status::Success && !startUpMode.IsNull()) { + #ifdef MATTER_DM_PLUGIN_ON_OFF // OnMode with Power Up // If the On/Off feature is supported and the On/Off cluster attribute StartUpOnOff is present, with a diff --git a/src/app/clusters/network-commissioning/network-commissioning.cpp b/src/app/clusters/network-commissioning/network-commissioning.cpp index 6bb3356b89..ea73b8ff23 100644 --- a/src/app/clusters/network-commissioning/network-commissioning.cpp +++ b/src/app/clusters/network-commissioning/network-commissioning.cpp @@ -233,7 +233,7 @@ class ThreadScanResponseToTLV : public chip::app::DataModel::EncodableToTLV CHIP_ERROR ThreadScanResponseToTLV::LoadResponses(Platform::ScopedMemoryBuffer & scanResponseArray, Span & validResponses) const { - VerifyOrReturnError(scanResponseArray.Alloc(chip::min(mNetworks->Count(), kMaxNetworksInScanResponse)), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(scanResponseArray.Alloc(std::min(mNetworks->Count(), kMaxNetworksInScanResponse)), CHIP_ERROR_NO_MEMORY); ThreadScanResponse scanResponse; size_t scanResponseArrayLength = 0; diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp index edd0b5729c..e8352d890d 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp +++ b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp @@ -593,7 +593,7 @@ CHIP_ERROR DefaultOTARequestor::ClearDefaultOtaProviderList(FabricIndex fabricIn CHIP_ERROR error = mDefaultOtaProviderList.Delete(fabricIndex); // Ignore the error if no entry for the associated fabric index has been found. - ReturnErrorCodeIf(error == CHIP_ERROR_NOT_FOUND, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_NOT_FOUND, CHIP_NO_ERROR); ReturnErrorOnFailure(error); return mStorage->StoreDefaultProviders(mDefaultOtaProviderList); diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.cpp b/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.cpp index d3efeaee6f..f8f54f940a 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.cpp +++ b/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.cpp @@ -219,17 +219,17 @@ CHIP_ERROR DefaultOTARequestorDriver::UpdateNotFound(UpdateNotFoundReason reason case UpdateNotFoundReason::kUpToDate: break; case UpdateNotFoundReason::kBusy: { - status = ScheduleQueryRetry(true, chip::max(kDefaultDelayedActionTime, delay)); + status = ScheduleQueryRetry(true, std::max(kDefaultDelayedActionTime, delay)); if (status == CHIP_ERROR_MAX_RETRY_EXCEEDED) { // If max retry exceeded with current provider, try a different provider - status = ScheduleQueryRetry(false, chip::max(kDefaultDelayedActionTime, delay)); + status = ScheduleQueryRetry(false, std::max(kDefaultDelayedActionTime, delay)); } break; } case UpdateNotFoundReason::kNotAvailable: { // Schedule a query only if a different provider is available - status = ScheduleQueryRetry(false, chip::max(kDefaultDelayedActionTime, delay)); + status = ScheduleQueryRetry(false, std::max(kDefaultDelayedActionTime, delay)); break; } } diff --git a/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp b/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp index 5996cfe01f..63bd6a2952 100644 --- a/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp +++ b/src/app/clusters/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp @@ -81,8 +81,8 @@ static void setEffectiveModes(EndpointId endpoint) // if this is not suitable, the application should override this value in // the post attribute change callback for the operation mode attribute const EmberAfAttributeMetadata * effectiveControlModeMetaData; - effectiveControlModeMetaData = GetAttributeMetadata( - app::ConcreteAttributePath(endpoint, PumpConfigurationAndControl::Id, Attributes::EffectiveControlMode::Id)); + effectiveControlModeMetaData = + emberAfLocateAttributeMetadata(endpoint, PumpConfigurationAndControl::Id, Attributes::EffectiveControlMode::Id); controlMode = static_cast(effectiveControlModeMetaData->defaultValue.defaultValue); } diff --git a/src/app/clusters/resource-monitoring-server/resource-monitoring-cluster-objects.h b/src/app/clusters/resource-monitoring-server/resource-monitoring-cluster-objects.h index 70e189bc02..fdf660ef96 100644 --- a/src/app/clusters/resource-monitoring-server/resource-monitoring-cluster-objects.h +++ b/src/app/clusters/resource-monitoring-server/resource-monitoring-cluster-objects.h @@ -229,14 +229,6 @@ struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::Typ }; } // 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 diff --git a/src/app/clusters/scenes-server/SceneTableImpl.cpp b/src/app/clusters/scenes-server/SceneTableImpl.cpp index 81cd05cd18..24d300e8f5 100644 --- a/src/app/clusters/scenes-server/SceneTableImpl.cpp +++ b/src/app/clusters/scenes-server/SceneTableImpl.cpp @@ -276,7 +276,7 @@ struct FabricSceneData : public PersistentData ReturnErrorOnFailure(reader.EnterContainer(fabricSceneContainer)); ReturnErrorOnFailure(reader.Next(TLV::ContextTag(TagScene::kSceneCount))); ReturnErrorOnFailure(reader.Get(scene_count)); - scene_count = min(scene_count, static_cast(max_scenes_per_fabric)); + scene_count = std::min(scene_count, static_cast(max_scenes_per_fabric)); ReturnErrorOnFailure(reader.Next(TLV::kTLVType_Array, TLV::ContextTag(TagScene::kStorageIDArray))); TLV::TLVType sceneMapContainer; ReturnErrorOnFailure(reader.EnterContainer(sceneMapContainer)); @@ -577,7 +577,7 @@ CHIP_ERROR DefaultSceneTableImpl::GetRemainingCapacity(FabricIndex fabric_index, remaining_capacity_fabric = static_cast(mMaxScenesPerFabric - fabric.scene_count); } - capacity = min(remaining_capacity_fabric, remaining_capacity_global); + capacity = std::min(remaining_capacity_fabric, remaining_capacity_global); return CHIP_NO_ERROR; } diff --git a/src/app/clusters/thermostat-server/thermostat-server-presets.cpp b/src/app/clusters/thermostat-server/thermostat-server-presets.cpp index 9413513fd0..1dede07161 100644 --- a/src/app/clusters/thermostat-server/thermostat-server-presets.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server-presets.cpp @@ -152,69 +152,36 @@ bool GetMatchingPresetInPresets(Delegate * delegate, const DataModel::NullableGetPendingPresetAtIndex(i, pendingPreset); - + PresetTypeStruct::Type presetType; + auto err = delegate->GetPresetTypeAtIndex(i, presetType); if (err == CHIP_ERROR_PROVIDER_LIST_EXHAUSTED) { - break; + // We exhausted the list trying to find the preset scenario + return CHIP_NO_ERROR; } if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "CountNumberOfPendingPresets: GetPendingPresetAtIndex failed with error %" CHIP_ERROR_FORMAT, - err.Format()); - return 0; + return err; } - numberOfPendingPresets++; - } - - return numberOfPendingPresets; -} - -/** - * @brief Checks if the presetScenario is present in the PresetTypes attribute. - * - * @param[in] delegate The delegate to use. - * @param[in] presetScenario The presetScenario to match with. - * - * @return true if the presetScenario is found, false otherwise. - */ -bool PresetScenarioExistsInPresetTypes(Delegate * delegate, PresetScenarioEnum presetScenario) -{ - VerifyOrReturnValue(delegate != nullptr, false); - - for (uint8_t i = 0; true; i++) - { - PresetTypeStruct::Type presetType; - auto err = delegate->GetPresetTypeAtIndex(i, presetType); - if (err != CHIP_NO_ERROR) - { - return false; - } - if (presetType.presetScenario == presetScenario) { - return true; + count = presetType.numberOfPresets; + return CHIP_NO_ERROR; } } - return false; + return CHIP_NO_ERROR; } /** @@ -410,8 +377,16 @@ CHIP_ERROR ThermostatAttrAccess::AppendPendingPreset(Thermostat::Delegate * dele } } - if (!PresetScenarioExistsInPresetTypes(delegate, preset.GetPresetScenario())) + size_t maximumPresetCount = delegate->GetNumberOfPresets(); + size_t maximumPresetScenarioCount = 0; + if (MaximumPresetScenarioCount(delegate, preset.GetPresetScenario(), maximumPresetScenarioCount) != CHIP_NO_ERROR) { + return CHIP_IM_GLOBAL_STATUS(InvalidInState); + } + + if (maximumPresetScenarioCount == 0) + { + // This is not a supported preset scenario return CHIP_IM_GLOBAL_STATUS(ConstraintError); } @@ -423,16 +398,42 @@ CHIP_ERROR ThermostatAttrAccess::AppendPendingPreset(Thermostat::Delegate * dele // Before adding this preset to the pending presets, if the expected length of the pending presets' list // exceeds the total number of presets supported, return RESOURCE_EXHAUSTED. Note that the preset has not been appended yet. - uint8_t numberOfPendingPresets = CountNumberOfPendingPresets(delegate); + // We're going to append this preset, so let's assume a count as though it had already been inserted + size_t presetCount = 1; + size_t presetScenarioCount = 1; + for (uint8_t i = 0; true; i++) + { + PresetStructWithOwnedMembers otherPreset; + CHIP_ERROR err = delegate->GetPendingPresetAtIndex(i, otherPreset); + + if (err == CHIP_ERROR_PROVIDER_LIST_EXHAUSTED) + { + break; + } + if (err != CHIP_NO_ERROR) + { + return CHIP_IM_GLOBAL_STATUS(InvalidInState); + } + presetCount++; + if (preset.GetPresetScenario() == otherPreset.GetPresetScenario()) + { + presetScenarioCount++; + } + } - // We will be adding one more preset, so reject if the length is already at max. - if (numberOfPendingPresets >= delegate->GetNumberOfPresets()) + if (presetCount > maximumPresetCount) { + ChipLogError(Zcl, "Preset count exceeded %u: %u ", static_cast(maximumPresetCount), + static_cast(presetCount)); return CHIP_IM_GLOBAL_STATUS(ResourceExhausted); } - // TODO #34556 : Check if the number of presets for each presetScenario exceeds the max number of presets supported for that - // scenario. We plan to support only one preset for each presetScenario for our use cases so defer this for re-evaluation. + if (presetScenarioCount > maximumPresetScenarioCount) + { + ChipLogError(Zcl, "Preset scenario count exceeded %u: %u ", static_cast(maximumPresetScenarioCount), + static_cast(presetScenarioCount)); + return CHIP_IM_GLOBAL_STATUS(ResourceExhausted); + } return delegate->AppendToPendingPresetList(preset); } diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index 9e6e0f074d..bda97c5cb1 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -778,8 +778,8 @@ MatterThermostatClusterServerPreAttributeChangedCallback(const app::ConcreteAttr return Status::InvalidValue; } auto RequestedSystemMode = static_cast(*value); - if (ControlSequenceOfOperation > ControlSequenceOfOperationEnum::kCoolingAndHeatingWithReheat || - RequestedSystemMode > SystemModeEnum::kFanOnly) + if (EnsureKnownEnumValue(ControlSequenceOfOperation) == ControlSequenceOfOperationEnum::kUnknownEnumValue || + EnsureKnownEnumValue(RequestedSystemMode) == SystemModeEnum::kUnknownEnumValue) { return Status::InvalidValue; } diff --git a/src/app/clusters/thread-border-router-management-server/thread-border-router-management-server.cpp b/src/app/clusters/thread-border-router-management-server/thread-border-router-management-server.cpp index 6988b83b46..81dc2125e1 100644 --- a/src/app/clusters/thread-border-router-management-server/thread-border-router-management-server.cpp +++ b/src/app/clusters/thread-border-router-management-server/thread-border-router-management-server.cpp @@ -126,7 +126,7 @@ Status ServerInstance::HandleSetPendingDatasetRequest(CommandHandlerInterface::H Thread::OperationalDataset pendingDataset; // If any of the parameters in the PendingDataset is invalid, the command SHALL fail with a status code // of INVALID_COMMAND. - ReturnErrorCodeIf(pendingDataset.Init(req.pendingDataset) != CHIP_NO_ERROR, Status::InvalidCommand); + VerifyOrReturnError(pendingDataset.Init(req.pendingDataset) == CHIP_NO_ERROR, Status::InvalidCommand); CHIP_ERROR err = mDelegate->SetPendingDataset(pendingDataset); return StatusIB(err).mStatus; } @@ -363,7 +363,7 @@ void ServerInstance::OnPlatformEventHandler(const DeviceLayer::ChipDeviceEvent * CHIP_ERROR ServerInstance::Init() { - ReturnErrorCodeIf(!mDelegate, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(mDelegate, CHIP_ERROR_INVALID_ARGUMENT); ReturnErrorOnFailure(CommandHandlerInterfaceRegistry::Instance().RegisterCommandHandler(this)); VerifyOrReturnError(chip::app::AttributeAccessInterfaceRegistry::Instance().Register(this), CHIP_ERROR_INCORRECT_STATE); ReturnErrorOnFailure(DeviceLayer::PlatformMgrImpl().AddEventHandler(OnPlatformEventHandler, reinterpret_cast(this))); diff --git a/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-provider.cpp b/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-provider.cpp index 69ec2a5e13..bf056d2e37 100644 --- a/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-provider.cpp +++ b/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-provider.cpp @@ -214,7 +214,7 @@ CHIP_ERROR WriteThreadNetworkDiagnosticAttributeToTlv(AttributeId attributeId, a } else { - lastRssi.SetNonNull(min(static_cast(0), neighInfo.mLastRssi)); + lastRssi.SetNonNull(std::min(static_cast(0), neighInfo.mLastRssi)); } neighborTable.averageRssi = averageRssi; diff --git a/src/app/clusters/user-label-server/user-label-server.cpp b/src/app/clusters/user-label-server/user-label-server.cpp index 5daae5ab17..e1ea85cf01 100644 --- a/src/app/clusters/user-label-server/user-label-server.cpp +++ b/src/app/clusters/user-label-server/user-label-server.cpp @@ -131,7 +131,7 @@ CHIP_ERROR UserLabelAttrAccess::WriteLabelList(const ConcreteDataAttributePath & LabelList::TypeInfo::DecodableType decodablelist; ReturnErrorOnFailure(aDecoder.Decode(decodablelist)); - ReturnErrorCodeIf(!IsValidLabelEntryList(decodablelist), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + VerifyOrReturnError(IsValidLabelEntryList(decodablelist), CHIP_IM_GLOBAL_STATUS(ConstraintError)); auto iter = decodablelist.begin(); while (iter.Next()) @@ -148,7 +148,7 @@ CHIP_ERROR UserLabelAttrAccess::WriteLabelList(const ConcreteDataAttributePath & Structs::LabelStruct::DecodableType entry; ReturnErrorOnFailure(aDecoder.Decode(entry)); - ReturnErrorCodeIf(!IsValidLabelEntry(entry), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + VerifyOrReturnError(IsValidLabelEntry(entry), CHIP_IM_GLOBAL_STATUS(ConstraintError)); return provider->AppendUserLabel(endpoint, entry); } diff --git a/src/app/codegen-data-model-provider/BUILD.gn b/src/app/codegen-data-model-provider/BUILD.gn index a3616b354c..3b414c595b 100644 --- a/src/app/codegen-data-model-provider/BUILD.gn +++ b/src/app/codegen-data-model-provider/BUILD.gn @@ -24,6 +24,8 @@ import("//build_overrides/chip.gni") # CodegenDataModelProvider.h # CodegenDataModelProvider_Read.cpp # CodegenDataModelProvider_Write.cpp +# EmberAttributeDataBuffer.cpp +# EmberAttributeDataBuffer.h # EmberMetadata.cpp # EmberMetadata.h # Instance.cpp diff --git a/src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp b/src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp index 972e056513..2fb542c768 100644 --- a/src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp +++ b/src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp @@ -318,7 +318,7 @@ bool operator==(const DataModel::DeviceTypeEntry & a, const EmberAfDeviceType & /// - index == types.size() // i.e. not found or there is no next /// /// hintWherePreviousMayBe represents a search hint where previous may exist. -unsigned FindNextDeviceTypeIndex(Span types, const DataModel::DeviceTypeEntry previous, +unsigned FindNextDeviceTypeIndex(Span types, const DataModel::DeviceTypeEntry & previous, unsigned hintWherePreviousMayBe) { if (hintWherePreviousMayBe < types.size()) @@ -619,8 +619,9 @@ std::optional CodegenDataModelProvider::TryFindAttributeIndex(const Em const EmberAfCluster * CodegenDataModelProvider::FindServerCluster(const ConcreteClusterPath & path) { - // cache things - if (mPreviouslyFoundCluster.has_value() && (mPreviouslyFoundCluster->path == path)) + if (mPreviouslyFoundCluster.has_value() && (mPreviouslyFoundCluster->path == path) && + (mEmberMetadataStructureGeneration == emberAfMetadataStructureGeneration())) + { return mPreviouslyFoundCluster->cluster; } @@ -628,7 +629,8 @@ const EmberAfCluster * CodegenDataModelProvider::FindServerCluster(const Concret const EmberAfCluster * cluster = emberAfFindServerCluster(path.mEndpointId, path.mClusterId); if (cluster != nullptr) { - mPreviouslyFoundCluster = std::make_optional(path, cluster); + mPreviouslyFoundCluster = std::make_optional(path, cluster); + mEmberMetadataStructureGeneration = emberAfMetadataStructureGeneration(); } return cluster; } diff --git a/src/app/codegen-data-model-provider/CodegenDataModelProvider.h b/src/app/codegen-data-model-provider/CodegenDataModelProvider.h index f6d6e4e4ed..085ae67ec3 100644 --- a/src/app/codegen-data-model-provider/CodegenDataModelProvider.h +++ b/src/app/codegen-data-model-provider/CodegenDataModelProvider.h @@ -137,6 +137,7 @@ class CodegenDataModelProvider : public chip::app::DataModel::Provider ClusterReference(const ConcreteClusterPath p, const EmberAfCluster * c) : path(p), cluster(c) {} }; std::optional mPreviouslyFoundCluster; + unsigned mEmberMetadataStructureGeneration = 0; /// Finds the specified ember cluster /// diff --git a/src/app/codegen-data-model-provider/CodegenDataModelProvider_Read.cpp b/src/app/codegen-data-model-provider/CodegenDataModelProvider_Read.cpp index 82baba4835..ea35356391 100644 --- a/src/app/codegen-data-model-provider/CodegenDataModelProvider_Read.cpp +++ b/src/app/codegen-data-model-provider/CodegenDataModelProvider_Read.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -41,6 +42,7 @@ #include #include #include +#include #include @@ -85,173 +87,6 @@ std::optional TryReadViaAccessInterface(const ConcreteAttributePath return encoder.TriedEncode() ? std::make_optional(CHIP_NO_ERROR) : std::nullopt; } -/// Metadata of what a ember/pascal short string means (prepended by a u8 length) -struct ShortPascalString -{ - using LengthType = uint8_t; - static constexpr LengthType kNullLength = 0xFF; - - static size_t GetLength(ByteSpan buffer) - { - VerifyOrDie(buffer.size() >= 1); - // NOTE: we do NOT use emberAfStringLength from ember-strings.h because that will result in 0 - // length for null sizes (i.e. 0xFF is translated to 0 and we do not want that here) - return buffer[0]; - } -}; - -/// Metadata of what a ember/pascal LONG string means (prepended by a u16 length) -struct LongPascalString -{ - using LengthType = uint16_t; - static constexpr LengthType kNullLength = 0xFFFF; - - static size_t GetLength(ByteSpan buffer) - { - // NOTE: we do NOT use emberAfLongStringLength from ember-strings.h because that will result in 0 - // length for null sizes (i.e. 0xFFFF is translated to 0 and we do not want that here) - VerifyOrDie(buffer.size() >= 2); - const uint8_t * data = buffer.data(); - return Encoding::LittleEndian::Read16(data); - } -}; - -// ember assumptions ... should just work -static_assert(sizeof(ShortPascalString::LengthType) == 1); -static_assert(sizeof(LongPascalString::LengthType) == 2); - -/// Given a ByteSpan containing data from ember, interpret it -/// as a span of type OUT (i.e. ByteSpan or CharSpan) given a ENCODING -/// where ENCODING is Short or Long pascal strings. -template -std::optional ExtractEmberString(ByteSpan data) -{ - constexpr size_t kLengthTypeSize = sizeof(typename ENCODING::LengthType); - VerifyOrDie(kLengthTypeSize <= data.size()); - auto len = ENCODING::GetLength(data); - - if (len == ENCODING::kNullLength) - { - return std::nullopt; - } - - VerifyOrDie(len + sizeof(len) <= data.size()); - return std::make_optional(reinterpret_cast(data.data() + kLengthTypeSize), len); -} - -/// Encode a value inside `encoder` -/// -/// The value encoded will be of type T (e.g. CharSpan or ByteSpan) and it will be decoded -/// via the given ENCODING (i.e. ShortPascalString or LongPascalString) -/// -/// isNullable defines if the value of NULL is allowed to be encoded. -template -CHIP_ERROR EncodeStringLike(ByteSpan data, bool isNullable, AttributeValueEncoder & encoder) -{ - std::optional value = ExtractEmberString(data); - if (!value.has_value()) - { - if (isNullable) - { - return encoder.EncodeNull(); - } - return CHIP_ERROR_INCORRECT_STATE; - } - - // encode value as-is - return encoder.Encode(*value); -} - -/// Encodes a numeric data value of type T from the given ember-encoded buffer `data`. -/// -/// isNullable defines if the value of NULL is allowed to be encoded. -template -CHIP_ERROR EncodeFromSpan(ByteSpan data, bool isNullable, AttributeValueEncoder & encoder) -{ - typename NumericAttributeTraits::StorageType value; - - VerifyOrReturnError(data.size() >= sizeof(value), CHIP_ERROR_INVALID_ARGUMENT); - memcpy(&value, data.data(), sizeof(value)); - - if (isNullable && NumericAttributeTraits::IsNullValue(value)) - { - return encoder.EncodeNull(); - } - - if (!NumericAttributeTraits::CanRepresentValue(isNullable, value)) - { - return CHIP_ERROR_INCORRECT_STATE; - } - - return encoder.Encode(NumericAttributeTraits::StorageToWorking(value)); -} - -/// Converts raw ember data from `data` into the encoder -/// -/// Uses the attribute `metadata` to determine how the data is encoded into `data` and -/// write a suitable value into `encoder`. -CHIP_ERROR EncodeEmberValue(ByteSpan data, const EmberAfAttributeMetadata * metadata, AttributeValueEncoder & encoder) -{ - VerifyOrReturnError(metadata != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - - const bool isNullable = metadata->IsNullable(); - - switch (AttributeBaseType(metadata->attributeType)) - { - case ZCL_NO_DATA_ATTRIBUTE_TYPE: // No data - return encoder.EncodeNull(); - case ZCL_BOOLEAN_ATTRIBUTE_TYPE: // Boolean - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_INT8U_ATTRIBUTE_TYPE: // Unsigned 8-bit integer - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_INT16U_ATTRIBUTE_TYPE: // Unsigned 16-bit integer - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_INT24U_ATTRIBUTE_TYPE: // Unsigned 24-bit integer - return EncodeFromSpan>(data, isNullable, encoder); - case ZCL_INT32U_ATTRIBUTE_TYPE: // Unsigned 32-bit integer - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_INT40U_ATTRIBUTE_TYPE: // Unsigned 40-bit integer - return EncodeFromSpan>(data, isNullable, encoder); - case ZCL_INT48U_ATTRIBUTE_TYPE: // Unsigned 48-bit integer - return EncodeFromSpan>(data, isNullable, encoder); - case ZCL_INT56U_ATTRIBUTE_TYPE: // Unsigned 56-bit integer - return EncodeFromSpan>(data, isNullable, encoder); - case ZCL_INT64U_ATTRIBUTE_TYPE: // Unsigned 64-bit integer - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_INT8S_ATTRIBUTE_TYPE: // Signed 8-bit integer - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_INT16S_ATTRIBUTE_TYPE: // Signed 16-bit integer - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_INT24S_ATTRIBUTE_TYPE: // Signed 24-bit integer - return EncodeFromSpan>(data, isNullable, encoder); - case ZCL_INT32S_ATTRIBUTE_TYPE: // Signed 32-bit integer - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_INT40S_ATTRIBUTE_TYPE: // Signed 40-bit integer - return EncodeFromSpan>(data, isNullable, encoder); - case ZCL_INT48S_ATTRIBUTE_TYPE: // Signed 48-bit integer - return EncodeFromSpan>(data, isNullable, encoder); - case ZCL_INT56S_ATTRIBUTE_TYPE: // Signed 56-bit integer - return EncodeFromSpan>(data, isNullable, encoder); - case ZCL_INT64S_ATTRIBUTE_TYPE: // Signed 64-bit integer - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_SINGLE_ATTRIBUTE_TYPE: // 32-bit float - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_DOUBLE_ATTRIBUTE_TYPE: // 64-bit float - return EncodeFromSpan(data, isNullable, encoder); - case ZCL_CHAR_STRING_ATTRIBUTE_TYPE: // Char string - return EncodeStringLike(data, isNullable, encoder); - case ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE: - return EncodeStringLike(data, isNullable, encoder); - case ZCL_OCTET_STRING_ATTRIBUTE_TYPE: // Octet string - return EncodeStringLike(data, isNullable, encoder); - case ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE: - return EncodeStringLike(data, isNullable, encoder); - default: - ChipLogError(DataManagement, "Attribute type 0x%x not handled", static_cast(metadata->attributeType)); - return CHIP_IM_GLOBAL_STATUS(Failure); - } -} - } // namespace /// separated-out ReadAttribute implementation (given existing complexity) @@ -271,7 +106,7 @@ DataModel::ActionReturnStatus CodegenDataModelProvider::ReadAttribute(const Data // ACL check for non-internal requests if (!request.operationFlags.Has(DataModel::OperationFlags::kInternal)) { - ReturnErrorCodeIf(!request.subjectDescriptor.has_value(), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(request.subjectDescriptor.has_value(), CHIP_ERROR_INVALID_ARGUMENT); Access::RequestPath requestPath{ .cluster = request.path.mClusterId, .endpoint = request.path.mEndpointId, @@ -281,7 +116,7 @@ DataModel::ActionReturnStatus CodegenDataModelProvider::ReadAttribute(const Data RequiredPrivilege::ForReadAttribute(request.path)); if (err != CHIP_NO_ERROR) { - ReturnErrorCodeIf((err != CHIP_ERROR_ACCESS_DENIED) && (err != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL), err); + VerifyOrReturnError((err == CHIP_ERROR_ACCESS_DENIED) || (err == CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL), err); // Implementation of 8.4.3.2 of the spec for path expansion if (request.path.mExpanded) @@ -319,7 +154,7 @@ DataModel::ActionReturnStatus CodegenDataModelProvider::ReadAttribute(const Data request.path, AttributeAccessInterfaceRegistry::Instance().Get(request.path.mEndpointId, request.path.mClusterId), encoder); } - ReturnErrorCodeIf(aai_result.has_value(), *aai_result); + VerifyOrReturnError(!aai_result.has_value(), *aai_result); if (!std::holds_alternative(metadata)) { @@ -343,7 +178,11 @@ DataModel::ActionReturnStatus CodegenDataModelProvider::ReadAttribute(const Data return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(status); } - return EncodeEmberValue(gEmberAttributeIOBufferSpan, attributeMetadata, encoder); + VerifyOrReturnError(attributeMetadata != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + MutableByteSpan data = gEmberAttributeIOBufferSpan; + Ember::EmberAttributeDataBuffer emberData(attributeMetadata, data); + return encoder.Encode(emberData); } } // namespace app diff --git a/src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp b/src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp index 76c283ae04..51807fe98c 100644 --- a/src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp +++ b/src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -85,198 +86,6 @@ std::optional TryWriteViaAccessInterface(const ConcreteDataAttribute return decoder.TriedDecode() ? std::make_optional(CHIP_NO_ERROR) : std::nullopt; } -/// Metadata of what a ember/pascal short string means (prepended by a u8 length) -struct ShortPascalString -{ - using LengthType = uint8_t; - static constexpr LengthType kNullLength = 0xFF; - - static void SetLength(uint8_t * buffer, LengthType value) { *buffer = value; } -}; - -/// Metadata of what a ember/pascal LONG string means (prepended by a u16 length) -struct LongPascalString -{ - using LengthType = uint16_t; - static constexpr LengthType kNullLength = 0xFFFF; - - // Encoding for ember string lengths is little-endian (see ember-strings.cpp) - static void SetLength(uint8_t * buffer, LengthType value) { Encoding::LittleEndian::Put16(buffer, value); } -}; - -// ember assumptions ... should just work -static_assert(sizeof(ShortPascalString::LengthType) == 1); -static_assert(sizeof(LongPascalString::LengthType) == 2); - -/// Convert the value stored in 'decoder' into an ember format span 'out' -/// -/// The value converted will be of type T (e.g. CharSpan or ByteSpan) and it will be converted -/// via the given ENCODING (i.e. ShortPascalString or LongPascalString) -/// -/// isNullable defines if the value of NULL is allowed to be converted. -template -CHIP_ERROR DecodeStringLikeIntoEmberBuffer(AttributeValueDecoder decoder, bool isNullable, MutableByteSpan & out) -{ - T workingValue; - - if (isNullable) - { - typename DataModel::Nullable nullableWorkingValue; - ReturnErrorOnFailure(decoder.Decode(nullableWorkingValue)); - - if (nullableWorkingValue.IsNull()) - { - VerifyOrReturnError(out.size() >= sizeof(typename ENCODING::LengthType), CHIP_ERROR_BUFFER_TOO_SMALL); - ENCODING::SetLength(out.data(), ENCODING::kNullLength); - out.reduce_size(sizeof(typename ENCODING::LengthType)); - return CHIP_NO_ERROR; - } - - // continue encoding non-null value - workingValue = nullableWorkingValue.Value(); - } - else - { - ReturnErrorOnFailure(decoder.Decode(workingValue)); - } - - auto len = static_cast(workingValue.size()); - VerifyOrReturnError(out.size() >= sizeof(len) + len, CHIP_ERROR_BUFFER_TOO_SMALL); - - uint8_t * output_buffer = out.data(); - - ENCODING::SetLength(output_buffer, len); - output_buffer += sizeof(len); - - memcpy(output_buffer, workingValue.data(), workingValue.size()); - output_buffer += workingValue.size(); - - out.reduce_size(static_cast(output_buffer - out.data())); - return CHIP_NO_ERROR; -} - -/// Decodes a numeric data value of type T from the `decoder` into a ember-encoded buffer `out` -/// -/// isNullable defines if the value of NULL is allowed to be decoded. -template -CHIP_ERROR DecodeIntoEmberBuffer(AttributeValueDecoder & decoder, bool isNullable, MutableByteSpan & out) -{ - using Traits = NumericAttributeTraits; - typename Traits::StorageType storageValue; - - if (isNullable) - { - DataModel::Nullable workingValue; - ReturnErrorOnFailure(decoder.Decode(workingValue)); - - if (workingValue.IsNull()) - { - Traits::SetNull(storageValue); - } - else - { - // This guards against trying to decode something that overlaps nullable, for example - // Nullable(0xFF) is not representable because 0xFF is the encoding of NULL in ember - // as well as odd-sized integers (e.g. full 32-bit value like 0x11223344 cannot be written - // to a 3-byte odd-sized integger). - VerifyOrReturnError(Traits::CanRepresentValue(isNullable, workingValue.Value()), CHIP_ERROR_INVALID_ARGUMENT); - Traits::WorkingToStorage(workingValue.Value(), storageValue); - } - - VerifyOrReturnError(out.size() >= sizeof(storageValue), CHIP_ERROR_INVALID_ARGUMENT); - } - else - { - typename Traits::WorkingType workingValue; - ReturnErrorOnFailure(decoder.Decode(workingValue)); - - Traits::WorkingToStorage(workingValue, storageValue); - - VerifyOrReturnError(out.size() >= sizeof(storageValue), CHIP_ERROR_INVALID_ARGUMENT); - - // Even non-nullable values may be outside range: e.g. odd-sized integers have working values - // that are larger than the storage values (e.g. a uint32_t being stored as a 3-byte integer) - VerifyOrReturnError(Traits::CanRepresentValue(isNullable, workingValue), CHIP_ERROR_INVALID_ARGUMENT); - } - - const uint8_t * data = Traits::ToAttributeStoreRepresentation(storageValue); - - // The decoding + ToAttributeStoreRepresentation will result in data being - // stored in native format/byteorder, suitable to directly be stored in the data store - memcpy(out.data(), data, sizeof(storageValue)); - out.reduce_size(sizeof(storageValue)); - - return CHIP_NO_ERROR; -} - -/// Read the data from "decoder" into an ember-formatted buffer "out" -/// -/// `out` is a in/out buffer: -/// - its initial size determines the maximum size of the buffer -/// - its output size reflects the actual data size -/// -/// Uses the attribute `metadata` to determine how the data is to be encoded into out. -CHIP_ERROR DecodeValueIntoEmberBuffer(AttributeValueDecoder & decoder, const EmberAfAttributeMetadata * metadata, - MutableByteSpan & out) -{ - VerifyOrReturnError(metadata != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - - const bool isNullable = metadata->IsNullable(); - - switch (AttributeBaseType(metadata->attributeType)) - { - case ZCL_BOOLEAN_ATTRIBUTE_TYPE: // Boolean - return DecodeIntoEmberBuffer(decoder, isNullable, out); - case ZCL_INT8U_ATTRIBUTE_TYPE: // Unsigned 8-bit integer - return DecodeIntoEmberBuffer(decoder, isNullable, out); - case ZCL_INT16U_ATTRIBUTE_TYPE: // Unsigned 16-bit integer - return DecodeIntoEmberBuffer(decoder, isNullable, out); - case ZCL_INT24U_ATTRIBUTE_TYPE: // Unsigned 24-bit integer - return DecodeIntoEmberBuffer>(decoder, isNullable, out); - case ZCL_INT32U_ATTRIBUTE_TYPE: // Unsigned 32-bit integer - return DecodeIntoEmberBuffer(decoder, isNullable, out); - case ZCL_INT40U_ATTRIBUTE_TYPE: // Unsigned 40-bit integer - return DecodeIntoEmberBuffer>(decoder, isNullable, out); - case ZCL_INT48U_ATTRIBUTE_TYPE: // Unsigned 48-bit integer - return DecodeIntoEmberBuffer>(decoder, isNullable, out); - case ZCL_INT56U_ATTRIBUTE_TYPE: // Unsigned 56-bit integer - return DecodeIntoEmberBuffer>(decoder, isNullable, out); - case ZCL_INT64U_ATTRIBUTE_TYPE: // Unsigned 64-bit integer - return DecodeIntoEmberBuffer(decoder, isNullable, out); - case ZCL_INT8S_ATTRIBUTE_TYPE: // Signed 8-bit integer - return DecodeIntoEmberBuffer(decoder, isNullable, out); - case ZCL_INT16S_ATTRIBUTE_TYPE: // Signed 16-bit integer - return DecodeIntoEmberBuffer(decoder, isNullable, out); - case ZCL_INT24S_ATTRIBUTE_TYPE: // Signed 24-bit integer - return DecodeIntoEmberBuffer>(decoder, isNullable, out); - case ZCL_INT32S_ATTRIBUTE_TYPE: // Signed 32-bit integer - return DecodeIntoEmberBuffer(decoder, isNullable, out); - case ZCL_INT40S_ATTRIBUTE_TYPE: // Signed 40-bit integer - return DecodeIntoEmberBuffer>(decoder, isNullable, out); - case ZCL_INT48S_ATTRIBUTE_TYPE: // Signed 48-bit integer - return DecodeIntoEmberBuffer>(decoder, isNullable, out); - case ZCL_INT56S_ATTRIBUTE_TYPE: // Signed 56-bit integer - return DecodeIntoEmberBuffer>(decoder, isNullable, out); - case ZCL_INT64S_ATTRIBUTE_TYPE: // Signed 64-bit integer - return DecodeIntoEmberBuffer(decoder, isNullable, out); - case ZCL_SINGLE_ATTRIBUTE_TYPE: // 32-bit float - return DecodeIntoEmberBuffer(decoder, isNullable, out); - case ZCL_DOUBLE_ATTRIBUTE_TYPE: // 64-bit float - return DecodeIntoEmberBuffer(decoder, isNullable, out); - case ZCL_CHAR_STRING_ATTRIBUTE_TYPE: // Char string - return DecodeStringLikeIntoEmberBuffer(decoder, isNullable, out); - case ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE: - return DecodeStringLikeIntoEmberBuffer(decoder, isNullable, out); - case ZCL_OCTET_STRING_ATTRIBUTE_TYPE: // Octet string - return DecodeStringLikeIntoEmberBuffer(decoder, isNullable, out); - case ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE: - return DecodeStringLikeIntoEmberBuffer(decoder, isNullable, out); - default: - ChipLogError(DataManagement, "Attribute type 0x%x not handled", static_cast(metadata->attributeType)); - return CHIP_IM_GLOBAL_STATUS(Failure); - } -} - } // namespace DataModel::ActionReturnStatus CodegenDataModelProvider::WriteAttribute(const DataModel::WriteAttributeRequest & request, @@ -350,7 +159,7 @@ DataModel::ActionReturnStatus CodegenDataModelProvider::WriteAttribute(const Dat if (checkAcl) { - ReturnErrorCodeIf(!request.subjectDescriptor.has_value(), Status::UnsupportedAccess); + VerifyOrReturnError(request.subjectDescriptor.has_value(), Status::UnsupportedAccess); Access::RequestPath requestPath{ .cluster = request.path.mClusterId, .endpoint = request.path.mEndpointId, @@ -414,7 +223,10 @@ DataModel::ActionReturnStatus CodegenDataModelProvider::WriteAttribute(const Dat } MutableByteSpan dataBuffer = gEmberAttributeIOBufferSpan; - ReturnErrorOnFailure(DecodeValueIntoEmberBuffer(decoder, *attributeMetadata, dataBuffer)); + { + Ember::EmberAttributeDataBuffer emberData(*attributeMetadata, dataBuffer); + ReturnErrorOnFailure(decoder.Decode(emberData)); + } Protocols::InteractionModel::Status status; diff --git a/src/app/codegen-data-model-provider/EmberAttributeDataBuffer.cpp b/src/app/codegen-data-model-provider/EmberAttributeDataBuffer.cpp new file mode 100644 index 0000000000..2c764241eb --- /dev/null +++ b/src/app/codegen-data-model-provider/EmberAttributeDataBuffer.cpp @@ -0,0 +1,574 @@ +/* + * Copyright (c) 2024 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 + +namespace chip { +namespace app { +namespace Ember { + +namespace { + +/// Maximum length of a string, inclusive +/// +/// the max size value (0xFF and 0xFFFF) is reserved for NULL representation so +/// it is not available +constexpr uint32_t MaxLength(EmberAttributeDataBuffer::PascalStringType s) +{ + if (s == EmberAttributeDataBuffer::PascalStringType::kShort) + { + return std::numeric_limits::max() - 1; + } + // EmberAttributeDataBuffer::PascalStringType::kLong: + return std::numeric_limits::max() - 1; +} + +struct UnsignedDecodeInfo +{ + unsigned byteCount; + uint64_t maxValue; + + constexpr UnsignedDecodeInfo(unsigned bytes) : byteCount(bytes), maxValue(NumericLimits::MaxUnsignedValue(bytes)) {} +}; + +constexpr UnsignedDecodeInfo GetUnsignedDecodeInfo(EmberAfAttributeType type) +{ + + switch (type) + { + case ZCL_INT8U_ATTRIBUTE_TYPE: // Unsigned 8-bit integer + return UnsignedDecodeInfo(1); + case ZCL_INT16U_ATTRIBUTE_TYPE: // Unsigned 16-bit integer + return UnsignedDecodeInfo(2); + case ZCL_INT24U_ATTRIBUTE_TYPE: // Unsigned 24-bit integer + return UnsignedDecodeInfo(3); + case ZCL_INT32U_ATTRIBUTE_TYPE: // Unsigned 32-bit integer + return UnsignedDecodeInfo(4); + case ZCL_INT40U_ATTRIBUTE_TYPE: // Unsigned 40-bit integer + return UnsignedDecodeInfo(5); + case ZCL_INT48U_ATTRIBUTE_TYPE: // Unsigned 48-bit integer + return UnsignedDecodeInfo(6); + case ZCL_INT56U_ATTRIBUTE_TYPE: // Unsigned 56-bit integer + return UnsignedDecodeInfo(7); + case ZCL_INT64U_ATTRIBUTE_TYPE: // Unsigned 64-bit integer + return UnsignedDecodeInfo(8); + } + chipDie(); +} + +struct SignedDecodeInfo +{ + unsigned byteCount; + int64_t minValue; + int64_t maxValue; + + constexpr SignedDecodeInfo(unsigned bytes) : + byteCount(bytes), minValue(NumericLimits::MinSignedValue(bytes)), maxValue(NumericLimits::MaxSignedValue(bytes)) + {} +}; + +constexpr SignedDecodeInfo GetSignedDecodeInfo(EmberAfAttributeType type) +{ + + switch (type) + { + case ZCL_INT8S_ATTRIBUTE_TYPE: // Signed 8-bit integer + return SignedDecodeInfo(1); + case ZCL_INT16S_ATTRIBUTE_TYPE: // Signed 16-bit integer + return SignedDecodeInfo(2); + case ZCL_INT24S_ATTRIBUTE_TYPE: // Signed 24-bit integer + return SignedDecodeInfo(3); + case ZCL_INT32S_ATTRIBUTE_TYPE: // Signed 32-bit integer + return SignedDecodeInfo(4); + case ZCL_INT40S_ATTRIBUTE_TYPE: // Signed 40-bit integer + return SignedDecodeInfo(5); + case ZCL_INT48S_ATTRIBUTE_TYPE: // Signed 48-bit integer + return SignedDecodeInfo(6); + case ZCL_INT56S_ATTRIBUTE_TYPE: // Signed 56-bit integer + return SignedDecodeInfo(7); + case ZCL_INT64S_ATTRIBUTE_TYPE: // Signed 64-bit integer + return SignedDecodeInfo(8); + } + chipDie(); +} + +/// Encodes the string of type stringType pointed to by `reader` into the TLV `writer`. +/// Then encoded string will be at tag `tag` and of type `tlvType` +CHIP_ERROR EncodeString(EmberAttributeDataBuffer::PascalStringType stringType, TLV::TLVType tlvType, TLV::TLVWriter & writer, + TLV::Tag tag, EmberAttributeDataBuffer::EndianReader & reader, bool nullable) +{ + unsigned stringLen; + if (stringType == EmberAttributeDataBuffer::PascalStringType::kShort) + { + uint8_t len; + if (!reader.Read8(&len).IsSuccess()) + { + return reader.StatusCode(); + } + if (len == NumericAttributeTraits::kNullValue) + { + VerifyOrReturnError(nullable, CHIP_ERROR_INVALID_ARGUMENT); + return writer.PutNull(tag); + } + stringLen = len; + } + else + { + uint16_t len; + if (!reader.Read16(&len).IsSuccess()) + { + return reader.StatusCode(); + } + if (len == NumericAttributeTraits::kNullValue) + { + VerifyOrReturnError(nullable, CHIP_ERROR_INVALID_ARGUMENT); + return writer.PutNull(tag); + } + stringLen = len; + } + + const uint8_t * data; + if (!reader.ZeroCopyProcessBytes(stringLen, &data).IsSuccess()) + { + return reader.StatusCode(); + } + + if (tlvType == TLV::kTLVType_UTF8String) + { + return writer.PutString(tag, reinterpret_cast(data), stringLen); + } + + return writer.PutBytes(tag, data, stringLen); +} + +} // namespace + +CHIP_ERROR EmberAttributeDataBuffer::DecodeUnsignedInteger(chip::TLV::TLVReader & reader, EndianWriter & writer) +{ + UnsignedDecodeInfo info = GetUnsignedDecodeInfo(mAttributeType); + + // Any size of integer can be read by TLV getting 64-bit integers + uint64_t value; + + if (reader.GetType() == TLV::kTLVType_Null) + { + // we know mIsNullable due to the check at the top of ::Decode + value = NumericLimits::UnsignedMaxValueToNullValue(info.maxValue); + } + else + { + ReturnErrorOnFailure(reader.Get(value)); + + bool valid = + // Value is in [0, max] RANGE + (value <= info.maxValue) + // Nullable values reserve a specific value to mean NULL + && !(mIsNullable && (value == NumericLimits::UnsignedMaxValueToNullValue(info.maxValue))); + + VerifyOrReturnError(valid, CHIP_IM_GLOBAL_STATUS(ConstraintError)); + } + + writer.EndianPut(value, info.byteCount); + return CHIP_NO_ERROR; +} + +CHIP_ERROR EmberAttributeDataBuffer::DecodeSignedInteger(chip::TLV::TLVReader & reader, EndianWriter & writer) +{ + SignedDecodeInfo info = GetSignedDecodeInfo(mAttributeType); + + // Any size of integer can be read by TLV getting 64-bit integers + int64_t value; + + if (reader.GetType() == TLV::kTLVType_Null) + { + // we know mIsNullable due to the check at the top of ::Decode + value = NumericLimits::SignedMinValueToNullValue(info.minValue); + } + else + { + ReturnErrorOnFailure(reader.Get(value)); + + bool valid = + // Value is in [min, max] RANGE + ((value >= info.minValue) && (value <= info.maxValue)) + // Nullable values reserve a specific value to mean NULL + && !(mIsNullable && (value == NumericLimits::SignedMinValueToNullValue(info.minValue))); + + VerifyOrReturnError(valid, CHIP_IM_GLOBAL_STATUS(ConstraintError)); + } + writer.EndianPutSigned(value, info.byteCount); + return CHIP_NO_ERROR; +} + +CHIP_ERROR EmberAttributeDataBuffer::DecodeAsString(chip::TLV::TLVReader & reader, PascalStringType stringType, + TLV::TLVType tlvType, EndianWriter & writer) +{ + // Handle null first, then the actual data + if (reader.GetType() == TLV::kTLVType_Null) + { + // we know mIsNullable due to the check at the top of ::Decode + switch (stringType) + { + case PascalStringType::kShort: + writer.Put8(NumericAttributeTraits::kNullValue); + break; + case PascalStringType::kLong: + writer.Put16(NumericAttributeTraits::kNullValue); + break; + } + + return CHIP_NO_ERROR; + } + + const uint32_t stringLength = reader.GetLength(); + + VerifyOrReturnError(reader.GetType() == tlvType, CHIP_ERROR_WRONG_TLV_TYPE); + VerifyOrReturnError(stringLength <= MaxLength(stringType), CHIP_ERROR_INVALID_ARGUMENT); + + // Size is a prefix, where 0xFF/0xFFFF is the null marker (if applicable) + switch (stringType) + { + case PascalStringType::kShort: + writer.Put8(static_cast(stringLength)); + break; + case PascalStringType::kLong: + writer.Put16(static_cast(stringLength)); + break; + } + + // data copy + const uint8_t * tlvData; + ReturnErrorOnFailure(reader.GetDataPtr(tlvData)); + writer.Put(tlvData, stringLength); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR EmberAttributeDataBuffer::Decode(chip::TLV::TLVReader & reader) +{ + // all methods below assume that nullable setting matches (this is to reduce code size + // even though clarity suffers) + VerifyOrReturnError(mIsNullable || reader.GetType() != TLV::kTLVType_Null, CHIP_ERROR_WRONG_TLV_TYPE); + + EndianWriter endianWriter(mDataBuffer.data(), mDataBuffer.size()); + + switch (mAttributeType) + { + case ZCL_BOOLEAN_ATTRIBUTE_TYPE: // Boolean + // Boolean values: + // 0x00 is FALSE + // 0x01 is TRUE + // 0xFF is NULL + if (reader.GetType() == TLV::kTLVType_Null) + { + // we know mIsNullable due to the check at the top of ::Decode + endianWriter.Put8(NumericAttributeTraits::kNullValue); + } + else + { + bool value; + ReturnErrorOnFailure(reader.Get(value)); + endianWriter.Put8(value ? 1 : 0); + } + break; + case ZCL_INT8U_ATTRIBUTE_TYPE: // Unsigned 8-bit integer + case ZCL_INT16U_ATTRIBUTE_TYPE: // Unsigned 16-bit integer + case ZCL_INT24U_ATTRIBUTE_TYPE: // Unsigned 24-bit integer + case ZCL_INT32U_ATTRIBUTE_TYPE: // Unsigned 32-bit integer + case ZCL_INT40U_ATTRIBUTE_TYPE: // Unsigned 40-bit integer + case ZCL_INT48U_ATTRIBUTE_TYPE: // Unsigned 48-bit integer + case ZCL_INT56U_ATTRIBUTE_TYPE: // Unsigned 56-bit integer + case ZCL_INT64U_ATTRIBUTE_TYPE: // Unsigned 64-bit integer + ReturnErrorOnFailure(DecodeUnsignedInteger(reader, endianWriter)); + break; + case ZCL_INT8S_ATTRIBUTE_TYPE: // Signed 8-bit integer + case ZCL_INT16S_ATTRIBUTE_TYPE: // Signed 16-bit integer + case ZCL_INT24S_ATTRIBUTE_TYPE: // Signed 24-bit integer + case ZCL_INT32S_ATTRIBUTE_TYPE: // Signed 32-bit integer + case ZCL_INT40S_ATTRIBUTE_TYPE: // Signed 40-bit integer + case ZCL_INT48S_ATTRIBUTE_TYPE: // Signed 48-bit integer + case ZCL_INT56S_ATTRIBUTE_TYPE: // Signed 56-bit integer + case ZCL_INT64S_ATTRIBUTE_TYPE: // Signed 64-bit integer + ReturnErrorOnFailure(DecodeSignedInteger(reader, endianWriter)); + break; + case ZCL_SINGLE_ATTRIBUTE_TYPE: { // 32-bit float + float value; + if (reader.GetType() == TLV::kTLVType_Null) + { + // we know mIsNullable due to the check at the top of ::Decode + NumericAttributeTraits::SetNull(value); + } + else + { + + ReturnErrorOnFailure(reader.Get(value)); + } + endianWriter.Put(&value, sizeof(value)); + break; + } + case ZCL_DOUBLE_ATTRIBUTE_TYPE: { // 64-bit float + double value; + if (reader.GetType() == TLV::kTLVType_Null) + { + // we know mIsNullable due to the check at the top of ::Decode + NumericAttributeTraits::SetNull(value); + } + else + { + ReturnErrorOnFailure(reader.Get(value)); + } + endianWriter.Put(&value, sizeof(value)); + break; + } + case ZCL_CHAR_STRING_ATTRIBUTE_TYPE: // Char string + ReturnErrorOnFailure(DecodeAsString(reader, PascalStringType::kShort, TLV::kTLVType_UTF8String, endianWriter)); + break; + case ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE: + ReturnErrorOnFailure(DecodeAsString(reader, PascalStringType::kLong, TLV::kTLVType_UTF8String, endianWriter)); + break; + case ZCL_OCTET_STRING_ATTRIBUTE_TYPE: // Octet string + ReturnErrorOnFailure(DecodeAsString(reader, PascalStringType::kShort, TLV::kTLVType_ByteString, endianWriter)); + break; + case ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE: + ReturnErrorOnFailure(DecodeAsString(reader, PascalStringType::kLong, TLV::kTLVType_ByteString, endianWriter)); + break; + default: + ChipLogError(DataManagement, "Attribute type 0x%x not handled", mAttributeType); + return CHIP_IM_GLOBAL_STATUS(Failure); + } + + size_t written; + if (!endianWriter.Fit(written)) + { + return CHIP_ERROR_NO_MEMORY; + } + + mDataBuffer.reduce_size(written); + return CHIP_NO_ERROR; +} + +CHIP_ERROR EmberAttributeDataBuffer::EncodeInteger(chip::TLV::TLVWriter & writer, TLV::Tag tag, EndianReader & reader) const +{ + // Encodes an integer by first reading as raw bytes and then + // bitshift-convert + // + // This optimizes code size rather than readability at this point. + + uint8_t raw_bytes[8]; + + bool isSigned = (mAttributeType == ZCL_INT8S_ATTRIBUTE_TYPE) // + || (mAttributeType == ZCL_INT16S_ATTRIBUTE_TYPE) // + || (mAttributeType == ZCL_INT24S_ATTRIBUTE_TYPE) // + || (mAttributeType == ZCL_INT32S_ATTRIBUTE_TYPE) // + || (mAttributeType == ZCL_INT40S_ATTRIBUTE_TYPE) // + || (mAttributeType == ZCL_INT48S_ATTRIBUTE_TYPE) // + || (mAttributeType == ZCL_INT56S_ATTRIBUTE_TYPE) // + || (mAttributeType == ZCL_INT64S_ATTRIBUTE_TYPE); + + unsigned byteCount; + uint64_t nullValue; + + if (isSigned) + { + const SignedDecodeInfo info = GetSignedDecodeInfo(mAttributeType); + byteCount = info.byteCount; + nullValue = static_cast(info.minValue); // just a bit cast for easy compare + } + else + { + const UnsignedDecodeInfo info = GetUnsignedDecodeInfo(mAttributeType); + byteCount = info.byteCount; + nullValue = info.maxValue; + } + + VerifyOrDie(sizeof(raw_bytes) >= byteCount); + if (!reader.ReadBytes(raw_bytes, byteCount).IsSuccess()) + { + return reader.StatusCode(); + } + + // At this point, RAW_VALUE contains the actual value, need to make it "real" + union + { + int64_t int_value; + uint64_t uint_value; + } value; + + value.uint_value = 0; + +#if CHIP_CONFIG_BIG_ENDIAN_TARGET + bool isNegative = isSigned && (raw_bytes[0] >= 0x80); + if (isNegative) + { + value.int_value = -1; + } + for (int i = 0; i < static_cast(byteCount); i++) + { +#else + bool isNegative = isSigned && (raw_bytes[byteCount - 1] >= 0x80); + if (isNegative) + { + value.int_value = -1; + } + for (int i = static_cast(byteCount) - 1; i >= 0; i--) + { +#endif + value.uint_value <<= 8; + value.uint_value = (value.uint_value & ~0xFFULL) | raw_bytes[i]; + } + + if (mIsNullable && (value.uint_value == nullValue)) + { + // MaxValue is used for NULL setting + return writer.PutNull(tag); + } + + switch (mAttributeType) + { + case ZCL_INT8U_ATTRIBUTE_TYPE: // Unsigned 8-bit integer + return writer.Put(tag, static_cast(value.uint_value)); + case ZCL_INT16U_ATTRIBUTE_TYPE: // Unsigned 16-bit integer + return writer.Put(tag, static_cast(value.uint_value)); + case ZCL_INT24U_ATTRIBUTE_TYPE: // Unsigned 24-bit integer + case ZCL_INT32U_ATTRIBUTE_TYPE: // Unsigned 32-bit integer + return writer.Put(tag, static_cast(value.uint_value)); + case ZCL_INT40U_ATTRIBUTE_TYPE: // Unsigned 40-bit integer + case ZCL_INT48U_ATTRIBUTE_TYPE: // Unsigned 48-bit integer + case ZCL_INT56U_ATTRIBUTE_TYPE: // Signed 56-bit integer + case ZCL_INT64U_ATTRIBUTE_TYPE: // Signed 64-bit integer + return writer.Put(tag, static_cast(value.uint_value)); + case ZCL_INT8S_ATTRIBUTE_TYPE: // Signed 8-bit integer + return writer.Put(tag, static_cast(value.int_value)); + case ZCL_INT16S_ATTRIBUTE_TYPE: // Signed 16-bit integer + return writer.Put(tag, static_cast(value.int_value)); + case ZCL_INT24S_ATTRIBUTE_TYPE: // Signed 24-bit integer + case ZCL_INT32S_ATTRIBUTE_TYPE: // Signed 32-bit integer + return writer.Put(tag, static_cast(value.int_value)); + default: + return writer.Put(tag, static_cast(value.int_value)); + } +} + +CHIP_ERROR EmberAttributeDataBuffer::Encode(chip::TLV::TLVWriter & writer, TLV::Tag tag) const +{ + EndianReader endianReader(mDataBuffer.data(), mDataBuffer.size()); + + switch (mAttributeType) + { + case ZCL_NO_DATA_ATTRIBUTE_TYPE: // No data + return writer.PutNull(tag); + case ZCL_BOOLEAN_ATTRIBUTE_TYPE: { // Boolean + uint8_t value; + if (!endianReader.Read8(&value).IsSuccess()) + { + return endianReader.StatusCode(); + } + switch (value) + { + case 0: + case 1: + return writer.PutBoolean(tag, value != 0); + case 0xFF: + return writer.PutNull(tag); + default: + // Unknown types + return CHIP_ERROR_INCORRECT_STATE; + } + } + case ZCL_INT8U_ATTRIBUTE_TYPE: // Unsigned 8-bit integer + case ZCL_INT16U_ATTRIBUTE_TYPE: // Unsigned 16-bit integer + case ZCL_INT24U_ATTRIBUTE_TYPE: // Unsigned 24-bit integer + case ZCL_INT32U_ATTRIBUTE_TYPE: // Unsigned 32-bit integer + case ZCL_INT40U_ATTRIBUTE_TYPE: // Unsigned 40-bit integer + case ZCL_INT48U_ATTRIBUTE_TYPE: // Unsigned 48-bit integer + case ZCL_INT56U_ATTRIBUTE_TYPE: // Unsigned 56-bit integer + case ZCL_INT64U_ATTRIBUTE_TYPE: // Unsigned 64-bit integer + case ZCL_INT8S_ATTRIBUTE_TYPE: // Signed 8-bit integer + case ZCL_INT16S_ATTRIBUTE_TYPE: // Signed 16-bit integer + case ZCL_INT24S_ATTRIBUTE_TYPE: // Signed 24-bit integer + case ZCL_INT32S_ATTRIBUTE_TYPE: // Signed 32-bit integer + case ZCL_INT40S_ATTRIBUTE_TYPE: // Signed 40-bit integer + case ZCL_INT48S_ATTRIBUTE_TYPE: // Signed 48-bit integer + case ZCL_INT56S_ATTRIBUTE_TYPE: // Signed 56-bit integer + case ZCL_INT64S_ATTRIBUTE_TYPE: // Signed 64-bit integer + return EncodeInteger(writer, tag, endianReader); + case ZCL_SINGLE_ATTRIBUTE_TYPE: { // 32-bit float + union + { + uint8_t raw[sizeof(float)]; + float value; + } value; + + if (!endianReader.ReadBytes(value.raw, sizeof(value)).IsSuccess()) + { + return endianReader.StatusCode(); + } + if (NumericAttributeTraits::IsNullValue(value.value)) + { + return writer.PutNull(tag); + } + return writer.Put(tag, value.value); + } + case ZCL_DOUBLE_ATTRIBUTE_TYPE: { // 64-bit float + union + { + uint8_t raw[sizeof(double)]; + double value; + } value; + + if (!endianReader.ReadBytes(value.raw, sizeof(value)).IsSuccess()) + { + return endianReader.StatusCode(); + } + if (NumericAttributeTraits::IsNullValue(value.value)) + { + return writer.PutNull(tag); + } + return writer.Put(tag, value.value); + } + + case ZCL_CHAR_STRING_ATTRIBUTE_TYPE: // Char string + return EncodeString(PascalStringType::kShort, TLV::kTLVType_UTF8String, writer, tag, endianReader, mIsNullable); + case ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE: + return EncodeString(PascalStringType::kLong, TLV::kTLVType_UTF8String, writer, tag, endianReader, mIsNullable); + case ZCL_OCTET_STRING_ATTRIBUTE_TYPE: // Octet string + return EncodeString(PascalStringType::kShort, TLV::kTLVType_ByteString, writer, tag, endianReader, mIsNullable); + case ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE: + return EncodeString(PascalStringType::kLong, TLV::kTLVType_ByteString, writer, tag, endianReader, mIsNullable); + default: + ChipLogError(DataManagement, "Attribute type 0x%x not handled", static_cast(mAttributeType)); + return CHIP_IM_GLOBAL_STATUS(Failure); + } +} + +} // namespace Ember +} // namespace app +} // namespace chip diff --git a/src/app/codegen-data-model-provider/EmberAttributeDataBuffer.h b/src/app/codegen-data-model-provider/EmberAttributeDataBuffer.h new file mode 100644 index 0000000000..c3d7acfcaf --- /dev/null +++ b/src/app/codegen-data-model-provider/EmberAttributeDataBuffer.h @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2024 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 "lib/core/TLVWriter.h" +#include +#include +#include +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Ember { + +/// This class represents a pointer to an ember-encoded attribute in a specific memory location. +/// +/// Ember attributes are stored as raw bytes for numeric types (i.e. memcpy-like storage except +/// unaligned) and strings are Pascal-like (short with 1-byte length prefix or long with 2-byte length +/// prefix). +/// +/// Class is to be used as a one-shot: +/// - create it out of metadata + data span +/// - call Decode (which modifies the input data span) +class EmberAttributeDataBuffer +{ +public: +#if CHIP_CONFIG_BIG_ENDIAN_TARGET + using EndianWriter = Encoding::BigEndian::BufferWriter; + using EndianReader = Encoding::BigEndian::Reader; +#else + using EndianWriter = Encoding::LittleEndian::BufferWriter; + using EndianReader = Encoding::LittleEndian::Reader; +#endif + + enum class PascalStringType + { + kShort, + kLong, + }; + + static constexpr bool kIsFabricScoped = false; + + EmberAttributeDataBuffer(const EmberAfAttributeMetadata * meta, MutableByteSpan & data) : + mIsNullable(meta->IsNullable()), mAttributeType(chip::app::Compatibility::Internal::AttributeBaseType(meta->attributeType)), + mDataBuffer(data) + {} + + /// Reads the data pointed into by `reader` and updates the data + /// internally into mDataBuffer (which is then reflected outwards) + /// + /// Generally should be called ONLY ONCE as the internal mutable byte span gets + /// modified by this call. + CHIP_ERROR Decode(chip::TLV::TLVReader & reader); + + /// Writes the data encoded in the underlying buffer into the given `writer` + /// + /// The data in the internal data buffer is assumed to be already formatted correctly + /// HOWEVER the size inside it will not be fully considered (i.e. encoding will use + /// the data encoding line integer or string sizes and NOT the databuffer max size) + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, TLV::Tag tag) const; + +private: + /// Decodes the UNSIGNED integer stored in `reader` and places its content into `writer` + /// Takes into account internal mIsNullable. + CHIP_ERROR DecodeUnsignedInteger(chip::TLV::TLVReader & reader, EndianWriter & writer); + + /// Decodes the SIGNED integer stored in `reader` and places its content into `writer` + /// Takes into account internal mIsNullable. + CHIP_ERROR DecodeSignedInteger(chip::TLV::TLVReader & reader, EndianWriter & writer); + + /// Encodes the UNSIGNED integer into `writer`. + /// Takes into account internal mIsNullable. + CHIP_ERROR EncodeInteger(chip::TLV::TLVWriter & writer, TLV::Tag tag, EndianReader & reader) const; + + /// Decodes the string/byte string contained in `reader` and stores it into `writer`. + /// String is encoded using a pascal-prefix of size `stringType`. + /// Takes into account internal mIsNullable. + /// + /// The string in `reader` is expected to be of type `tlvType` + CHIP_ERROR DecodeAsString(chip::TLV::TLVReader & reader, PascalStringType stringType, TLV::TLVType tlvType, + EndianWriter & writer); + + const bool mIsNullable; // Contains if the attribute metadata marks the field as NULLABLE + const EmberAfAttributeType mAttributeType; // Initialized with the attribute type from the metadata + MutableByteSpan & mDataBuffer; // output buffer, modified by `Decode` +}; + +} // namespace Ember + +namespace DataModel { + +/// Helper method to forward the decode of this type to the class specific implementation +inline CHIP_ERROR Decode(TLV::TLVReader & reader, Ember::EmberAttributeDataBuffer & buffer) +{ + return buffer.Decode(reader); +} + +inline CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag, Ember::EmberAttributeDataBuffer & buffer) +{ + return buffer.Encode(writer, tag); +} + +} // namespace DataModel +} // namespace app +} // namespace chip diff --git a/src/app/codegen-data-model-provider/model.cmake b/src/app/codegen-data-model-provider/model.cmake index 777219549e..5ce4fbc849 100644 --- a/src/app/codegen-data-model-provider/model.cmake +++ b/src/app/codegen-data-model-provider/model.cmake @@ -19,6 +19,8 @@ SET(CODEGEN_DATA_MODEL_SOURCES "${BASE_DIR}/CodegenDataModelProvider.h" "${BASE_DIR}/CodegenDataModelProvider_Read.cpp" "${BASE_DIR}/CodegenDataModelProvider_Write.cpp" + "${BASE_DIR}/EmberAttributeDataBuffer.cpp" + "${BASE_DIR}/EmberAttributeDataBuffer.h" "${BASE_DIR}/EmberMetadata.cpp" "${BASE_DIR}/EmberMetadata.h" "${BASE_DIR}/Instance.cpp" diff --git a/src/app/codegen-data-model-provider/model.gni b/src/app/codegen-data-model-provider/model.gni index b5909fb1c4..4205c6fcd7 100644 --- a/src/app/codegen-data-model-provider/model.gni +++ b/src/app/codegen-data-model-provider/model.gni @@ -29,6 +29,8 @@ codegen_data_model_SOURCES = [ "${chip_root}/src/app/codegen-data-model-provider/CodegenDataModelProvider.h", "${chip_root}/src/app/codegen-data-model-provider/CodegenDataModelProvider_Read.cpp", "${chip_root}/src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp", + "${chip_root}/src/app/codegen-data-model-provider/EmberAttributeDataBuffer.cpp", + "${chip_root}/src/app/codegen-data-model-provider/EmberAttributeDataBuffer.h", "${chip_root}/src/app/codegen-data-model-provider/EmberMetadata.cpp", "${chip_root}/src/app/codegen-data-model-provider/EmberMetadata.h", "${chip_root}/src/app/codegen-data-model-provider/Instance.cpp", diff --git a/src/app/codegen-data-model-provider/tests/BUILD.gn b/src/app/codegen-data-model-provider/tests/BUILD.gn index d8f82169b9..5bcfb9d911 100644 --- a/src/app/codegen-data-model-provider/tests/BUILD.gn +++ b/src/app/codegen-data-model-provider/tests/BUILD.gn @@ -52,7 +52,10 @@ source_set("mock_model") { chip_test_suite("tests") { output_name = "libCodegenDataModelProviderTests" - test_sources = [ "TestCodegenModelViaMocks.cpp" ] + test_sources = [ + "TestCodegenModelViaMocks.cpp", + "TestEmberAttributeDataBuffer.cpp", + ] cflags = [ "-Wconversion" ] diff --git a/src/app/codegen-data-model-provider/tests/TestCodegenModelViaMocks.cpp b/src/app/codegen-data-model-provider/tests/TestCodegenModelViaMocks.cpp index 3840de9c81..8ce369b7bd 100644 --- a/src/app/codegen-data-model-provider/tests/TestCodegenModelViaMocks.cpp +++ b/src/app/codegen-data-model-provider/tests/TestCodegenModelViaMocks.cpp @@ -2133,9 +2133,7 @@ TEST(TestCodegenModelViaMocks, EmberTestWriteOutOfRepresentableRangeOddIntegerNo using NullableType = chip::app::DataModel::Nullable; AttributeValueDecoder decoder = test.DecoderFor(0x1223344); - // write should fail: written value is not in range - // NOTE: this matches legacy behaviour, however realistically maybe ConstraintError would be more correct - ASSERT_EQ(model.WriteAttribute(test.GetRequest(), decoder), CHIP_ERROR_INVALID_ARGUMENT); + ASSERT_EQ(model.WriteAttribute(test.GetRequest(), decoder), CHIP_IM_GLOBAL_STATUS(ConstraintError)); } TEST(TestCodegenModelViaMocks, EmberTestWriteOutOfRepresentableRangeOddIntegerNullable) @@ -2151,12 +2149,10 @@ TEST(TestCodegenModelViaMocks, EmberTestWriteOutOfRepresentableRangeOddIntegerNu using NullableType = chip::app::DataModel::Nullable; AttributeValueDecoder decoder = test.DecoderFor(0x1223344); - // write should fail: written value is not in range - // NOTE: this matches legacy behaviour, however realistically maybe ConstraintError would be more correct - ASSERT_EQ(model.WriteAttribute(test.GetRequest(), decoder), CHIP_ERROR_INVALID_ARGUMENT); + ASSERT_EQ(model.WriteAttribute(test.GetRequest(), decoder), CHIP_IM_GLOBAL_STATUS(ConstraintError)); } -TEST(TestCodegenModelViaMoceNullValueToNullables, EmberAttributeWriteBasicTypesLowestValue) +TEST(TestCodegenModelViaMocksNullValueToNullables, EmberAttributeWriteBasicTypesLowestValue) { TestEmberScalarTypeWrite(-127); TestEmberScalarTypeWrite(-32767); diff --git a/src/app/codegen-data-model-provider/tests/TestEmberAttributeDataBuffer.cpp b/src/app/codegen-data-model-provider/tests/TestEmberAttributeDataBuffer.cpp new file mode 100644 index 0000000000..dc83773454 --- /dev/null +++ b/src/app/codegen-data-model-provider/tests/TestEmberAttributeDataBuffer.cpp @@ -0,0 +1,1136 @@ +/* + * Copyright (c) 2024 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 +#include +#include + +#include +#include + +using namespace chip; +using namespace chip::app; + +namespace { + +/// encodes a simple value in a TLV buffer +class TLVEncodedValue +{ +public: + TLVEncodedValue() = default; + ~TLVEncodedValue() = default; + + template + TLV::TLVReader EncodeValue(const T & value) + { + const auto kTag = TLV::ContextTag(AttributeDataIB::Tag::kData); + + TLV::TLVWriter writer; + writer.Init(mBuffer, sizeof(mBuffer)); + + TLV::TLVType outer; + + VerifyOrDie(writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, outer) == CHIP_NO_ERROR); + VerifyOrDie(DataModel::Encode(writer, kTag, value) == CHIP_NO_ERROR); + VerifyOrDie(writer.EndContainer(outer) == CHIP_NO_ERROR); + + VerifyOrDie(writer.Finalize() == CHIP_NO_ERROR); + size_t fill = writer.GetLengthWritten(); + + TLV::TLVReader reader; + reader.Init(mBuffer, fill); + VerifyOrDie(reader.Next() == CHIP_NO_ERROR); + VerifyOrDie(reader.GetTag() == TLV::AnonymousTag()); + VerifyOrDie(reader.EnterContainer(outer) == CHIP_NO_ERROR); + VerifyOrDie(reader.Next() == CHIP_NO_ERROR); + VerifyOrDie(reader.GetTag() == kTag); + + return reader; + } + +private: + static constexpr size_t kMaxSize = 128; + uint8_t mBuffer[kMaxSize]; +}; + +class EncodeResult +{ +public: + explicit EncodeResult() = default; + EncodeResult(CHIP_ERROR error) : mResult(error) { VerifyOrDie(error != CHIP_NO_ERROR); } + + static EncodeResult Ok() { return EncodeResult(); } + + bool IsSuccess() const { return !mResult.has_value(); } + + bool operator==(const CHIP_ERROR & other) const { return mResult.has_value() && (*mResult == other); } + + const std::optional & Value() const { return mResult; } + +private: + std::optional mResult; +}; + +template +bool IsEqual(const T & a, const T & b) +{ + return a == b; +} + +template <> +bool IsEqual(const ByteSpan & a, const ByteSpan & b) +{ + return a.data_equal(b); +} + +template <> +bool IsEqual(const CharSpan & a, const CharSpan & b) +{ + return a.data_equal(b); +} + +template +bool IsEqual(const std::optional & a, const std::optional & b) +{ + if (a.has_value() != b.has_value()) + { + return false; + } + + if (!a.has_value()) + { + return true; + } + + return IsEqual(*a, *b); +} + +template +bool IsEqual(const DataModel::Nullable & a, const DataModel::Nullable & b) +{ + if (a.IsNull() != b.IsNull()) + { + return false; + } + + if (a.IsNull()) + { + return true; + } + + return IsEqual(a.Value(), b.Value()); +} + +/// Validates that an encoded value in ember takes a specific format +template +class EncodeTester +{ +public: + EncodeTester(const EmberAfAttributeMetadata * meta) : mMetaData(meta) {} + ~EncodeTester() = default; + + template + EncodeResult TryEncode(const T & value, const uint8_t (&arr)[N]) + { + ByteSpan expected(arr); + MutableByteSpan out_span(mEmberAttributeDataBuffer); + Ember::EmberAttributeDataBuffer buffer(mMetaData, out_span); + + TLVEncodedValue tlvEncoded; + TLV::TLVReader reader = tlvEncoded.EncodeValue(value); + + CHIP_ERROR err = buffer.Decode(reader); + if (err != CHIP_NO_ERROR) + { + return err; + } + + if (expected.size() != out_span.size()) + { + ChipLogError(Test, "Decode mismatch in size: expected %u, got %u", static_cast(expected.size()), + static_cast(out_span.size())); + return CHIP_ERROR_INTERNAL; + } + + if (!expected.data_equal(out_span)) + { + ChipLogError(Test, "Decode mismatch in content for %u bytes", static_cast(expected.size())); + return CHIP_ERROR_INTERNAL; + } + + return EncodeResult::Ok(); + } + + template + EncodeResult TryDecode(const T & value, const uint8_t (&arr)[N]) + { + // Write data to TLV + { + uint8_t mutableBuffer[N]; + memcpy(mutableBuffer, arr, N); + + MutableByteSpan data_span(mutableBuffer); + Ember::EmberAttributeDataBuffer buffer(mMetaData, data_span); + + TLV::TLVWriter writer; + writer.Init(mEmberAttributeDataBuffer, sizeof(mEmberAttributeDataBuffer)); + ReturnErrorOnFailure(buffer.Encode(writer, TLV::AnonymousTag())); + ReturnErrorOnFailure(writer.Finalize()); + } + + // Data was written in TLV. Take it back out + + TLV::TLVReader reader; + reader.Init(mEmberAttributeDataBuffer, sizeof(mEmberAttributeDataBuffer)); + + ReturnErrorOnFailure(reader.Next()); + + T encodedValue; + ReturnErrorOnFailure(DataModel::Decode(reader, encodedValue)); + + if (!IsEqual(encodedValue, value)) + { + ChipLogError(Test, "Encode mismatch: different data"); + return CHIP_ERROR_INTERNAL; + } + + return EncodeResult::Ok(); + } + +private: + const EmberAfAttributeMetadata * mMetaData; + uint8_t mEmberAttributeDataBuffer[kMaxSize]; +}; + +const EmberAfAttributeMetadata * CreateFakeMeta(EmberAfAttributeType type, bool nullable) +{ + static EmberAfAttributeMetadata meta = { + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(static_cast(nullptr)), + .attributeId = 0, + .size = 0, // likely not valid, however not used for tests + .attributeType = ZCL_UNKNOWN_ATTRIBUTE_TYPE, + .mask = 0, + }; + + meta.attributeType = type; + meta.mask = nullable ? ATTRIBUTE_MASK_NULLABLE : 0; + + return &meta; +} + +} // namespace + +// All the tests below assume buffer ordering in little endian format +// Since currently all chip platforms in CI are little endian, we just kept tests +// as-is +static_assert(!CHIP_CONFIG_BIG_ENDIAN_TARGET); + +TEST(TestEmberAttributeBuffer, TestEncodeUnsignedTypes) +{ + { + EncodeTester tester(CreateFakeMeta(ZCL_INT8U_ATTRIBUTE_TYPE, false /* nullable */)); + + EXPECT_TRUE(tester.TryEncode(0, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(123, { 123 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(0xFD, { 0xFD }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(255, { 0xFF }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT8U_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryEncode(0, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(123, { 123 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(0xFD, { 0xFD }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode>(DataModel::NullNullable, { 0xFF }).IsSuccess()); + + // Not allowed to encode null-equivalent + EXPECT_EQ(tester.TryEncode(0xFF, { 0xFF }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT16U_ATTRIBUTE_TYPE, false /* nullable */)); + + EXPECT_TRUE(tester.TryEncode(0, { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(123, { 123, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(0xFD, { 0xFD, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(255, { 0xFF, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(0xABCD, { 0xCD, 0xAB }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(0xFFFF, { 0xFF, 0xFF }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT16U_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryEncode(0, { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(123, { 123, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(0xFD, { 0xFD, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(255, { 0xFF, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(0xABCD, { 0xCD, 0xAB }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode>(DataModel::NullNullable, { 0xFF, 0xFF }).IsSuccess()); + + // Not allowed to encode null-equivalent + EXPECT_EQ(tester.TryEncode(0xFFFF, { 0xFF, 0xFF }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT64U_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryEncode(0, { 0, 0, 0, 0, 0, 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(0x1234567, { 0x67, 0x45, 0x23, 0x01, 0, 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(0xAABBCCDDEEFF1122, { 0x22, 0x11, 0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA }).IsSuccess()); + EXPECT_TRUE( + tester.TryEncode(std::numeric_limits::max() - 1, { 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }) + .IsSuccess()); + + EXPECT_TRUE(tester + .TryEncode>(DataModel::NullNullable, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }) + .IsSuccess()); + + EXPECT_EQ( + tester.TryEncode(std::numeric_limits::max(), { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }), + CHIP_IM_GLOBAL_STATUS(ConstraintError)); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT64U_ATTRIBUTE_TYPE, false /* nullable */)); + + // we should be able to encode the maximum value + EXPECT_TRUE( + tester.TryEncode(std::numeric_limits::max(), { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }) + .IsSuccess()); + } + + /// Odd sized integers + { + EncodeTester tester(CreateFakeMeta(ZCL_INT24U_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryEncode(0, { 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(0x123456, { 0x56, 0x34, 0x12 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(0xFFFFFF, { 0xFF, 0xFF, 0xFF }).IsSuccess()); + + // Out of range + EXPECT_EQ(tester.TryEncode(0x1000000, { 0 }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + EXPECT_EQ(tester.TryEncode(0xFF000000, { 0 }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT24U_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryEncode(0, { 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(0x123456, { 0x56, 0x34, 0x12 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode>(DataModel::NullNullable, { 0xFF, 0xFF, 0xFF }).IsSuccess()); + + // Out of range + EXPECT_EQ(tester.TryEncode(0x1000000, { 0 }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + // cannot encode null equivalent value + EXPECT_EQ(tester.TryEncode(0xFFFFFF, { 0x56, 0x34, 0x12 }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT40U_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryEncode(0, { 0, 0, 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(0x123456, { 0x56, 0x34, 0x12, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(0x123456FFFF, { 0xFF, 0xFF, 0x56, 0x34, 0x12 }).IsSuccess()); + EXPECT_TRUE( + tester.TryEncode>(DataModel::NullNullable, { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }).IsSuccess()); + + // Out of range + EXPECT_EQ(tester.TryEncode(0x10011001100, { 0 }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + // cannot encode null equivalent value + EXPECT_EQ(tester.TryEncode(0xFFFFFFFFFF, { 0 }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + } + + // Double-check tests, not as exhaustive, to cover all other unsigned values and get + // more test line coverage + { + EncodeTester tester(CreateFakeMeta(ZCL_INT32U_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryEncode(0x1234, { 0x34, 0x12, 0, 0 }).IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT48U_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryEncode(0x1234, { 0x34, 0x12, 0, 0, 0, 0 }).IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT56U_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryEncode(0x1234, { 0x34, 0x12, 0, 0, 0, 0, 0 }).IsSuccess()); + } +} + +TEST(TestEmberAttributeBuffer, TestEncodeSignedTypes) +{ + { + EncodeTester tester(CreateFakeMeta(ZCL_INT8S_ATTRIBUTE_TYPE, false /* nullable */)); + + EXPECT_TRUE(tester.TryEncode(0, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(123, { 123 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(127, { 127 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(-10, { 0xF6 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(-128, { 0x80 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT8S_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryEncode(0, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(123, { 123 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(127, { 127 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(-10, { 0xF6 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(-127, { 0x81 }).IsSuccess()); + + // NULL canot be encoded + EXPECT_EQ(tester.TryEncode(std::numeric_limits::min(), { 0x80 }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + } + { + + EncodeTester tester(CreateFakeMeta(ZCL_INT16S_ATTRIBUTE_TYPE, false /* nullable */)); + + EXPECT_TRUE(tester.TryEncode(0, { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(123, { 123, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(127, { 127, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(-10, { 0xF6, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(-128, { 0x80, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(-1234, { 0x2E, 0xFB }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(std::numeric_limits::min(), { 0x0, 0x80 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT16S_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryEncode(0, { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(123, { 123, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(127, { 127, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(-10, { 0xF6, 0xFF }).IsSuccess()); + + // NULL canot be encoded + EXPECT_EQ(tester.TryEncode(std::numeric_limits::min(), { 0x80 }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + } + + // Odd size integers + { + EncodeTester tester(CreateFakeMeta(ZCL_INT24S_ATTRIBUTE_TYPE, false /* nullable */)); + + EXPECT_TRUE(tester.TryEncode(0, { 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(0x123456, { 0x56, 0x34, 0x12 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(-1, { 0xFF, 0xFF, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(-10, { 0xF6, 0xFF, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(-1234, { 0x2E, 0xFB, 0xFF }).IsSuccess()); + + // Out of range + EXPECT_EQ(tester.TryEncode(0x1000000, { 0 }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + EXPECT_EQ(tester.TryEncode(0x0F000000, { 0 }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + EXPECT_EQ(tester.TryEncode(-0x1000000, { 0 }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT24S_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryEncode(0, { 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(0x123456, { 0x56, 0x34, 0x12 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(-1, { 0xFF, 0xFF, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(-10, { 0xF6, 0xFF, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(-1234, { 0x2E, 0xFB, 0xFF }).IsSuccess()); + + EXPECT_TRUE(tester.TryEncode>(DataModel::NullNullable, { 0x00, 0x00, 0x80 }).IsSuccess()); + + // Out of range + EXPECT_EQ(tester.TryEncode(0x1000000, { 0 }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + // cannot encode null equivalent value - this is the minimum negative value + // for 24-bit + EXPECT_EQ(tester.TryEncode(-(1 << 24) - 1, { 0x56, 0x34, 0x12 }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + + // Out of range for signed - these are unsigned values that are larger + EXPECT_EQ(tester.TryEncode(0xFFFFFF, { 0x56, 0x34, 0x12 }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + EXPECT_EQ(tester.TryEncode(0x800000, { 0x56, 0x34, 0x12 }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT40S_ATTRIBUTE_TYPE, true /* nullable */)); + + // NOTE: to generate encoded values, you an use commands like: + // + // python -c 'import struct; print(", ".join(["0x%X" % v for v in struct.pack("(0, { 0, 0, 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(0x123456, { 0x56, 0x34, 0x12, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(-1234, { 0x2E, 0xFB, 0xFF, 0xFF, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(-123456789, { 0xeb, 0x32, 0xa4, 0xf8, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(-12345678910, { 0xc2, 0xe3, 0x23, 0x20, 0xfd }).IsSuccess()); + + EXPECT_TRUE( + tester.TryEncode>(DataModel::NullNullable, { 0x00, 0x00, 0x00, 0x00, 0x80 }).IsSuccess()); + + // Out of range + EXPECT_EQ(tester.TryEncode(0x10011001100, { 0 }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + // cannot encode null equivalent value + EXPECT_EQ(tester.TryEncode(-(1LL << 40) - 1, { 0 }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + // negative out of range + EXPECT_EQ(tester.TryEncode(-0x10000000000, { 0 }), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + } + + // Double-check tests, not as exhaustive, to cover all other unsigned values and get + // more test line coverage + { + EncodeTester tester(CreateFakeMeta(ZCL_INT32S_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryEncode(-1234, { 0x2E, 0xFB, 0xFF, 0xFF }).IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT48S_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryEncode(-1234, { 0x2E, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF }).IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT56S_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryEncode(-1234, { 0x2E, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT64S_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryEncode(-1234, { 0x2E, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }).IsSuccess()); + + // min/max ranges too + EXPECT_TRUE( + tester.TryEncode(std::numeric_limits::min() + 1, { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }) + .IsSuccess()); + EXPECT_TRUE( + tester.TryEncode(std::numeric_limits::max(), { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F }) + .IsSuccess()); + + // Reserved value for NULL + EXPECT_EQ( + tester.TryEncode(std::numeric_limits::min(), { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }), + CHIP_IM_GLOBAL_STATUS(ConstraintError)); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT64S_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryEncode(-1234, { 0x2E, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }).IsSuccess()); + + EXPECT_TRUE( + tester.TryEncode(std::numeric_limits::min(), { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }) + .IsSuccess()); + EXPECT_TRUE( + tester.TryEncode(std::numeric_limits::min() + 1, { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }) + .IsSuccess()); + EXPECT_TRUE( + tester.TryEncode(std::numeric_limits::max(), { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F }) + .IsSuccess()); + } +} + +TEST(TestEmberAttributeBuffer, TestEncodeBool) +{ + { + EncodeTester tester(CreateFakeMeta(ZCL_BOOLEAN_ATTRIBUTE_TYPE, false /* nullable */)); + + EXPECT_TRUE(tester.TryEncode(true, { 1 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(false, { 0 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_BOOLEAN_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryEncode(true, { 1 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(false, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode>(DataModel::NullNullable, { 0xFF }).IsSuccess()); + } +} + +TEST(TestEmberAttributeBuffer, TestEncodeFloatingPoint) +{ + // NOTE: to generate encoded values, you an use commands like: + // + // python -c 'import struct; print(", ".join(["0x%X" % v for v in struct.pack("(123.55f, { 0x9A, 0x19, 0xF7, 0x42 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_SINGLE_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryEncode(123.55f, { 0x9A, 0x19, 0xF7, 0x42 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode>(DataModel::NullNullable, { 0, 0, 0xC0, 0x7F }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_DOUBLE_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryEncode(123.55, { 0x33, 0x33, 0x33, 0x33, 0x33, 0xE3, 0x5E, 0x40 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_DOUBLE_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryEncode(123.55, { 0x33, 0x33, 0x33, 0x33, 0x33, 0xE3, 0x5E, 0x40 }).IsSuccess()); + EXPECT_TRUE( + tester.TryEncode>(DataModel::NullNullable, { 0, 0, 0, 0, 0, 0, 0xF8, 0x7F }).IsSuccess()); + } +} + +TEST(TestEmberAttributeBuffer, TestEncodeStrings) +{ + { + EncodeTester tester(CreateFakeMeta(ZCL_CHAR_STRING_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryEncode(""_span, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode("test"_span, { 4, 't', 'e', 's', 't' }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode("foo"_span, { 3, 'f', 'o', 'o' }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_CHAR_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryEncode(""_span, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode("test"_span, { 4, 't', 'e', 's', 't' }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode>(DataModel::NullNullable, { 0xFF }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryEncode(""_span, { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode("test"_span, { 4, 0, 't', 'e', 's', 't' }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode("foo"_span, { 3, 0, 'f', 'o', 'o' }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryEncode("test"_span, { 4, 0, 't', 'e', 's', 't' }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode>(DataModel::NullNullable, { 0xFF, 0xFF }).IsSuccess()); + } + + const uint8_t kOctetData[] = { 1, 2, 3 }; + + // Binary data + { + EncodeTester tester(CreateFakeMeta(ZCL_OCTET_STRING_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryEncode(ByteSpan({}), { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(ByteSpan(kOctetData), { 3, 1, 2, 3 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_OCTET_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryEncode(ByteSpan({}), { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(ByteSpan(kOctetData), { 3, 1, 2, 3 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode>(DataModel::NullNullable, { 0xFF }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryEncode(ByteSpan({}), { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(ByteSpan(kOctetData), { 3, 0, 1, 2, 3 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryEncode(ByteSpan({}), { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode(ByteSpan(kOctetData), { 3, 0, 1, 2, 3 }).IsSuccess()); + EXPECT_TRUE(tester.TryEncode>(DataModel::NullNullable, { 0xFF, 0xFF }).IsSuccess()); + } +} + +TEST(TestEmberAttributeBuffer, TestEncodeFailures) +{ + { + // attribute type that is not handled + EncodeTester tester(CreateFakeMeta(ZCL_UNKNOWN_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_EQ(tester.TryEncode>(DataModel::NullNullable, { 0 }), CHIP_IM_GLOBAL_STATUS(Failure)); + } + + { + // Insufficient space + EncodeTester<3> tester(CreateFakeMeta(ZCL_CHAR_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + + // Empty is ok + EXPECT_TRUE(tester.TryEncode(""_span, { 0 }).IsSuccess()); + + // Short strings (with and without count) is wrong. + EXPECT_EQ(tester.TryEncode("test"_span, { 0 }), CHIP_ERROR_NO_MEMORY); + EXPECT_EQ(tester.TryEncode("foo"_span, { 3, 'f', 'o' }), CHIP_ERROR_NO_MEMORY); + + EXPECT_TRUE(tester.TryEncode>(DataModel::NullNullable, { 0xFF }).IsSuccess()); + } + + { + // Insufficient space + EncodeTester<3> tester(CreateFakeMeta(ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + + // Empty is ok + EXPECT_TRUE(tester.TryEncode(""_span, { 0, 0 }).IsSuccess()); + + // Short strings (with and without count) is wrong. + EXPECT_EQ(tester.TryEncode("test"_span, { 0 }), CHIP_ERROR_NO_MEMORY); + EXPECT_EQ(tester.TryEncode("foo"_span, { 0, 3, 'f', 'o' }), CHIP_ERROR_NO_MEMORY); + EXPECT_EQ(tester.TryEncode("test"_span, { 0xFF }), CHIP_ERROR_NO_MEMORY); + + EXPECT_TRUE(tester.TryEncode>(DataModel::NullNullable, { 0xFF, 0xFF }).IsSuccess()); + } + + { + // Insufficient space even for length + EncodeTester<1> tester(CreateFakeMeta(ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_EQ(tester.TryEncode(""_span, { 0 }), CHIP_ERROR_NO_MEMORY); + } + + // bad type casts + { + EncodeTester tester(CreateFakeMeta(ZCL_CHAR_STRING_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_EQ(tester.TryEncode(ByteSpan({}), { 0 }), CHIP_ERROR_WRONG_TLV_TYPE); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT32U_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_EQ(tester.TryEncode(true, { 0 }), CHIP_ERROR_WRONG_TLV_TYPE); + } +} + +TEST(TestEmberAttributeBuffer, TestNoData) +{ + EncodeTester tester(CreateFakeMeta(ZCL_NO_DATA_ATTRIBUTE_TYPE, true /* nullable */)); + + // support a always-null type + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0 }).IsSuccess()); +} + +TEST(TestEmberAttributeBuffer, TestDecodeFailures) +{ + { + // attribute type that is not handled + EncodeTester tester(CreateFakeMeta(ZCL_UNKNOWN_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_EQ(tester.TryDecode>(DataModel::NullNullable, { 0 }), CHIP_IM_GLOBAL_STATUS(Failure)); + } + + { + // Insufficient input + EncodeTester<3> tester(CreateFakeMeta(ZCL_CHAR_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_EQ(tester.TryDecode("test"_span, { 10 }), CHIP_ERROR_BUFFER_TOO_SMALL); + EXPECT_EQ(tester.TryDecode("foo"_span, { 3, 'f', 'o' }), CHIP_ERROR_BUFFER_TOO_SMALL); + } + + { + // Insufficient data buffer - should never happen, but test that we will error out + EncodeTester tester(CreateFakeMeta(ZCL_INT32U_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_EQ(tester.TryDecode(123, { 1, 2, 3 }), CHIP_ERROR_BUFFER_TOO_SMALL); + } + + { + // Insufficient data buffer - should never happen, but test that we will error out + EncodeTester tester(CreateFakeMeta(ZCL_SINGLE_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_EQ(tester.TryDecode(1.5f, { 1, 2, 3 }), CHIP_ERROR_BUFFER_TOO_SMALL); + } + + { + // Insufficient data buffer - should never happen, but test that we will error out + EncodeTester tester(CreateFakeMeta(ZCL_DOUBLE_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_EQ(tester.TryDecode(1.5, { 1, 2, 3 }), CHIP_ERROR_BUFFER_TOO_SMALL); + } + + { + // Bad boolean data + EncodeTester tester(CreateFakeMeta(ZCL_BOOLEAN_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_EQ(tester.TryDecode(true, { 123 }), CHIP_ERROR_INCORRECT_STATE); + } +} + +TEST(TestEmberAttributeBuffer, TestDecodeSignedTypes) +{ + { + EncodeTester tester(CreateFakeMeta(ZCL_INT8S_ATTRIBUTE_TYPE, false /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(123, { 123 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(127, { 127 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-10, { 0xF6 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-128, { 0x80 }).IsSuccess()); + + // longer data is ok + EXPECT_TRUE(tester.TryDecode(-128, { 0x80, 1, 2, 3, 4 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT8S_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(123, { 123 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(127, { 127 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-10, { 0xF6 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-127, { 0x81 }).IsSuccess()); + + // NULL can be decoded + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0x80 }).IsSuccess()); + + // decoding as nullable proceeds as normal + EXPECT_TRUE(tester.TryDecode>(-127, { 0x81 }).IsSuccess()); + } + + { + + EncodeTester tester(CreateFakeMeta(ZCL_INT16S_ATTRIBUTE_TYPE, false /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(123, { 123, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(127, { 127, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-10, { 0xF6, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-128, { 0x80, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-1234, { 0x2E, 0xFB }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(std::numeric_limits::min(), { 0x0, 0x80 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT16S_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(123, { 123, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(127, { 127, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-10, { 0xF6, 0xFF }).IsSuccess()); + + // NULL decoding + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0x00, 0x80 }).IsSuccess()); + } + + // Odd size integers + { + EncodeTester tester(CreateFakeMeta(ZCL_INT24S_ATTRIBUTE_TYPE, false /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0x123456, { 0x56, 0x34, 0x12 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-1, { 0xFF, 0xFF, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-10, { 0xF6, 0xFF, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-1234, { 0x2E, 0xFB, 0xFF }).IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT24S_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0x123456, { 0x56, 0x34, 0x12 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-1, { 0xFF, 0xFF, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-10, { 0xF6, 0xFF, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-1234, { 0x2E, 0xFB, 0xFF }).IsSuccess()); + + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0x00, 0x00, 0x80 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT40S_ATTRIBUTE_TYPE, true /* nullable */)); + + // NOTE: to generate encoded values, you an use commands like: + // + // python -c 'import struct; print(", ".join(["0x%X" % v for v in struct.pack("(0, { 0, 0, 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0x123456, { 0x56, 0x34, 0x12, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-1234, { 0x2E, 0xFB, 0xFF, 0xFF, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-123456789, { 0xeb, 0x32, 0xa4, 0xf8, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(-12345678910, { 0xc2, 0xe3, 0x23, 0x20, 0xfd }).IsSuccess()); + + EXPECT_TRUE( + tester.TryDecode>(DataModel::NullNullable, { 0x00, 0x00, 0x00, 0x00, 0x80 }).IsSuccess()); + } + + // Double-check tests, not as exhaustive, to cover all other unsigned values and get + // more test line coverage + { + EncodeTester tester(CreateFakeMeta(ZCL_INT32S_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(-1234, { 0x2E, 0xFB, 0xFF, 0xFF }).IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT48S_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(-1234, { 0x2E, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF }).IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT56S_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(-1234, { 0x2E, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT64S_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(-1234, { 0x2E, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }).IsSuccess()); + + // min/max ranges too + EXPECT_TRUE( + tester.TryDecode(std::numeric_limits::min() + 1, { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }) + .IsSuccess()); + EXPECT_TRUE( + tester.TryDecode(std::numeric_limits::max(), { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F }) + .IsSuccess()); + + EXPECT_TRUE(tester + .TryDecode>(DataModel::NullNullable, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }) + .IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT64S_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryDecode(-1234, { 0x2E, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }).IsSuccess()); + + EXPECT_TRUE( + tester.TryDecode(std::numeric_limits::min(), { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }) + .IsSuccess()); + EXPECT_TRUE( + tester.TryDecode(std::numeric_limits::min() + 1, { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }) + .IsSuccess()); + EXPECT_TRUE( + tester.TryDecode(std::numeric_limits::max(), { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F }) + .IsSuccess()); + } +} + +TEST(TestEmberAttributeBuffer, TestDecodeUnsignedTypes) +{ + { + EncodeTester tester(CreateFakeMeta(ZCL_INT8U_ATTRIBUTE_TYPE, false /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(123, { 123 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0xFD, { 0xFD }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(255, { 0xFF }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT8U_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(123, { 123 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0xFD, { 0xFD }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF }).IsSuccess()); + + // NULL decoding should work + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT16U_ATTRIBUTE_TYPE, false /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(123, { 123, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0xFD, { 0xFD, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(255, { 0xFF, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0xABCD, { 0xCD, 0xAB }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0xFFFF, { 0xFF, 0xFF }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT16U_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(123, { 123, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0xFD, { 0xFD, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(255, { 0xFF, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0xABCD, { 0xCD, 0xAB }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF, 0xFF }).IsSuccess()); + + // NULL SUPPORT + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF, 0xFF }).IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT64U_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(0, { 0, 0, 0, 0, 0, 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0x1234567, { 0x67, 0x45, 0x23, 0x01, 0, 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0xAABBCCDDEEFF1122, { 0x22, 0x11, 0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA }).IsSuccess()); + EXPECT_TRUE( + tester.TryDecode(std::numeric_limits::max() - 1, { 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }) + .IsSuccess()); + + EXPECT_TRUE(tester + .TryDecode>(DataModel::NullNullable, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }) + .IsSuccess()); + + EXPECT_TRUE(tester + .TryDecode>(DataModel::NullNullable, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }) + .IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT64U_ATTRIBUTE_TYPE, false /* nullable */)); + + // we should be able to encode the maximum value + EXPECT_TRUE( + tester.TryDecode(std::numeric_limits::max(), { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }) + .IsSuccess()); + } + + /// Odd sized integers + { + EncodeTester tester(CreateFakeMeta(ZCL_INT24U_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryDecode(0, { 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0x123456, { 0x56, 0x34, 0x12 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0xFFFFFF, { 0xFF, 0xFF, 0xFF }).IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT24U_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(0, { 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0x123456, { 0x56, 0x34, 0x12 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF, 0xFF, 0xFF }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(0x1234, { 0x34, 0x12, 0x00 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_INT40U_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(0, { 0, 0, 0, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0x123456, { 0x56, 0x34, 0x12, 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(0x123456FFFF, { 0xFF, 0xFF, 0x56, 0x34, 0x12 }).IsSuccess()); + EXPECT_TRUE( + tester.TryDecode>(DataModel::NullNullable, { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }).IsSuccess()); + } + + // Double-check tests, not as exhaustive, to cover all other unsigned values and get + // more test line coverage + { + EncodeTester tester(CreateFakeMeta(ZCL_INT32U_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(0x1234, { 0x34, 0x12, 0, 0 }).IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT48U_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(0x1234, { 0x34, 0x12, 0, 0, 0, 0 }).IsSuccess()); + } + { + EncodeTester tester(CreateFakeMeta(ZCL_INT56U_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(0x1234, { 0x34, 0x12, 0, 0, 0, 0, 0 }).IsSuccess()); + } +} + +TEST(TestEmberAttributeBuffer, TestDecodeStrings) +{ + { + EncodeTester tester(CreateFakeMeta(ZCL_CHAR_STRING_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryDecode(""_span, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode("test"_span, { 4, 't', 'e', 's', 't' }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode("foo"_span, { 3, 'f', 'o', 'o' }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_CHAR_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(""_span, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode("test"_span, { 4, 't', 'e', 's', 't' }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryDecode(""_span, { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode("test"_span, { 4, 0, 't', 'e', 's', 't' }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode("foo"_span, { 3, 0, 'f', 'o', 'o' }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode("test"_span, { 4, 0, 't', 'e', 's', 't' }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF, 0xFF }).IsSuccess()); + } + + const uint8_t kOctetData[] = { 1, 2, 3 }; + + // Binary data + { + EncodeTester tester(CreateFakeMeta(ZCL_OCTET_STRING_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryDecode(ByteSpan({}), { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(ByteSpan(kOctetData), { 3, 1, 2, 3 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_OCTET_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(ByteSpan({}), { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(ByteSpan(kOctetData), { 3, 1, 2, 3 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryDecode(ByteSpan({}), { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(ByteSpan(kOctetData), { 3, 0, 1, 2, 3 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(ByteSpan({}), { 0, 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(ByteSpan(kOctetData), { 3, 0, 1, 2, 3 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF, 0xFF }).IsSuccess()); + } +} + +TEST(TestEmberAttributeBuffer, TestDecodeBool) +{ + { + EncodeTester tester(CreateFakeMeta(ZCL_BOOLEAN_ATTRIBUTE_TYPE, false /* nullable */)); + + EXPECT_TRUE(tester.TryDecode(true, { 1 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode(false, { 0 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_BOOLEAN_ATTRIBUTE_TYPE, true /* nullable */)); + + EXPECT_TRUE(tester.TryDecode>(true, { 1 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(false, { 0 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0xFF }).IsSuccess()); + } +} + +TEST(TestEmberAttributeBuffer, TestDecodeFloatingPoint) +{ + // NOTE: to generate encoded values, you an use commands like: + // + // python -c 'import struct; print(", ".join(["0x%X" % v for v in struct.pack("(123.55f, { 0x9A, 0x19, 0xF7, 0x42 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_SINGLE_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(123.55f, { 0x9A, 0x19, 0xF7, 0x42 }).IsSuccess()); + EXPECT_TRUE(tester.TryDecode>(DataModel::NullNullable, { 0, 0, 0xC0, 0x7F }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_DOUBLE_ATTRIBUTE_TYPE, false /* nullable */)); + EXPECT_TRUE(tester.TryDecode(123.55, { 0x33, 0x33, 0x33, 0x33, 0x33, 0xE3, 0x5E, 0x40 }).IsSuccess()); + } + + { + EncodeTester tester(CreateFakeMeta(ZCL_DOUBLE_ATTRIBUTE_TYPE, true /* nullable */)); + EXPECT_TRUE(tester.TryDecode(123.55, { 0x33, 0x33, 0x33, 0x33, 0x33, 0xE3, 0x5E, 0x40 }).IsSuccess()); + EXPECT_TRUE( + tester.TryDecode>(123.55, { 0x33, 0x33, 0x33, 0x33, 0x33, 0xE3, 0x5E, 0x40 }).IsSuccess()); + EXPECT_TRUE( + tester.TryDecode>(DataModel::NullNullable, { 0, 0, 0, 0, 0, 0, 0xF8, 0x7F }).IsSuccess()); + } +} diff --git a/src/app/data-model-provider/OperationTypes.h b/src/app/data-model-provider/OperationTypes.h index 8758e02ef8..6bfffccc65 100644 --- a/src/app/data-model-provider/OperationTypes.h +++ b/src/app/data-model-provider/OperationTypes.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -55,6 +56,15 @@ struct OperationRequest /// /// NOTE: once kInternal flag is removed, this will become non-optional std::optional subjectDescriptor; + + /// Accessing fabric index is the subjectDescriptor fabric index (if any). + /// This is a readability convenience function. + /// + /// Returns kUndefinedFabricIndex if no subject descriptor is available + FabricIndex GetAccessingFabricIndex() const + { + return subjectDescriptor.has_value() ? subjectDescriptor->fabricIndex : kUndefinedFabricIndex; + } }; enum class ReadFlags : uint32_t diff --git a/src/app/icd/client/CheckInHandler.cpp b/src/app/icd/client/CheckInHandler.cpp index 8f0a4de9c1..f4eaa48b11 100644 --- a/src/app/icd/client/CheckInHandler.cpp +++ b/src/app/icd/client/CheckInHandler.cpp @@ -52,8 +52,12 @@ CHIP_ERROR CheckInHandler::Init(Messaging::ExchangeManager * exchangeManager, IC { VerifyOrReturnError(exchangeManager != nullptr, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(clientStorage != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(delegate != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(engine != nullptr, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(mpExchangeManager == nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(mpICDClientStorage == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mpCheckInDelegate == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mpImEngine == nullptr, CHIP_ERROR_INCORRECT_STATE); mpExchangeManager = exchangeManager; mpICDClientStorage = clientStorage; @@ -113,6 +117,7 @@ CHIP_ERROR CheckInHandler::OnMessageReceived(Messaging::ExchangeContext * ec, co if (refreshKey) { + ChipLogProgress(ICD, "Key Refresh is required"); RefreshKeySender * refreshKeySender = mpCheckInDelegate->OnKeyRefreshNeeded(clientInfo, mpICDClientStorage); if (refreshKeySender == nullptr) { @@ -130,6 +135,7 @@ CHIP_ERROR CheckInHandler::OnMessageReceived(Messaging::ExchangeContext * ec, co } else { + mpICDClientStorage->StoreEntry(clientInfo); mpCheckInDelegate->OnCheckInComplete(clientInfo); #if CHIP_CONFIG_ENABLE_READ_CLIENT mpImEngine->OnActiveModeNotification(clientInfo.peer_node); diff --git a/src/app/icd/client/DefaultICDClientStorage.cpp b/src/app/icd/client/DefaultICDClientStorage.cpp index 2b6b3a1aff..2a1bc6a5d4 100644 --- a/src/app/icd/client/DefaultICDClientStorage.cpp +++ b/src/app/icd/client/DefaultICDClientStorage.cpp @@ -51,10 +51,15 @@ CHIP_ERROR DefaultICDClientStorage::UpdateFabricList(FabricIndex fabricIndex) mFabricList.push_back(fabricIndex); + return StoreFabricList(); +} + +CHIP_ERROR DefaultICDClientStorage::StoreFabricList() +{ Platform::ScopedMemoryBuffer backingBuffer; size_t counter = mFabricList.size(); size_t total = kFabricIndexTlvSize * counter + kArrayOverHead; - ReturnErrorCodeIf(!backingBuffer.Calloc(total), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(backingBuffer.Calloc(total), CHIP_ERROR_NO_MEMORY); TLV::ScopedBufferTLVWriter writer(std::move(backingBuffer), total); TLV::TLVType arrayType; @@ -68,7 +73,7 @@ CHIP_ERROR DefaultICDClientStorage::UpdateFabricList(FabricIndex fabricIndex) const auto len = writer.GetLengthWritten(); VerifyOrReturnError(CanCastTo(len), CHIP_ERROR_BUFFER_TOO_SMALL); - writer.Finalize(backingBuffer); + ReturnErrorOnFailure(writer.Finalize(backingBuffer)); return mpClientInfoStore->SyncSetKeyValue(DefaultStorageKeyAllocator::ICDFabricList().KeyName(), backingBuffer.Get(), static_cast(len)); } @@ -76,7 +81,7 @@ CHIP_ERROR DefaultICDClientStorage::UpdateFabricList(FabricIndex fabricIndex) CHIP_ERROR DefaultICDClientStorage::LoadFabricList() { Platform::ScopedMemoryBuffer backingBuffer; - ReturnErrorCodeIf(!backingBuffer.Calloc(kMaxFabricListTlvLength), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(backingBuffer.Calloc(kMaxFabricListTlvLength), CHIP_ERROR_NO_MEMORY); uint16_t length = kMaxFabricListTlvLength; ReturnErrorOnFailure( mpClientInfoStore->SyncGetKeyValue(DefaultStorageKeyAllocator::ICDFabricList().KeyName(), backingBuffer.Get(), length)); @@ -177,7 +182,7 @@ CHIP_ERROR DefaultICDClientStorage::LoadCounter(FabricIndex fabricIndex, size_t Platform::ScopedMemoryBuffer backingBuffer; size_t len = MaxICDCounterSize(); VerifyOrReturnError(CanCastTo(len), CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!backingBuffer.Calloc(len), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(backingBuffer.Calloc(len), CHIP_ERROR_NO_MEMORY); uint16_t length = static_cast(len); CHIP_ERROR err = mpClientInfoStore->SyncGetKeyValue( @@ -211,10 +216,11 @@ CHIP_ERROR DefaultICDClientStorage::Load(FabricIndex fabricIndex, std::vector 0, CHIP_NO_ERROR); size_t len = clientInfoSize * count + kArrayOverHead; Platform::ScopedMemoryBuffer backingBuffer; VerifyOrReturnError(CanCastTo(len), CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!backingBuffer.Calloc(len), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(backingBuffer.Calloc(len), CHIP_ERROR_NO_MEMORY); uint16_t length = static_cast(len); CHIP_ERROR err = mpClientInfoStore->SyncGetKeyValue(DefaultStorageKeyAllocator::ICDClientInfoKey(fabricIndex).KeyName(), backingBuffer.Get(), length); @@ -344,8 +350,21 @@ CHIP_ERROR DefaultICDClientStorage::SerializeToTlv(TLV::TLVWriter & writer, cons return writer.EndContainer(arrayType); } +bool DefaultICDClientStorage::FabricExists(FabricIndex fabricIndex) +{ + for (auto & fabric_idx : mFabricList) + { + if (fabric_idx == fabricIndex) + { + return true; + } + } + return false; +} + CHIP_ERROR DefaultICDClientStorage::StoreEntry(const ICDClientInfo & clientInfo) { + VerifyOrReturnError(FabricExists(clientInfo.peer_node.GetFabricIndex()), CHIP_ERROR_INVALID_FABRIC_INDEX); std::vector clientInfoVector; size_t clientInfoSize = MaxICDClientInfoSize(); ReturnErrorOnFailure(Load(clientInfo.peer_node.GetFabricIndex(), clientInfoVector, clientInfoSize)); @@ -359,11 +378,10 @@ CHIP_ERROR DefaultICDClientStorage::StoreEntry(const ICDClientInfo & clientInfo) break; } } - clientInfoVector.push_back(clientInfo); size_t total = clientInfoSize * clientInfoVector.size() + kArrayOverHead; Platform::ScopedMemoryBuffer backingBuffer; - ReturnErrorCodeIf(!backingBuffer.Calloc(total), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(backingBuffer.Calloc(total), CHIP_ERROR_NO_MEMORY); TLV::ScopedBufferTLVWriter writer(std::move(backingBuffer), total); ReturnErrorOnFailure(SerializeToTlv(writer, clientInfoVector)); @@ -371,12 +389,17 @@ CHIP_ERROR DefaultICDClientStorage::StoreEntry(const ICDClientInfo & clientInfo) const auto len = writer.GetLengthWritten(); VerifyOrReturnError(CanCastTo(len), CHIP_ERROR_BUFFER_TOO_SMALL); - writer.Finalize(backingBuffer); + ReturnErrorOnFailure(writer.Finalize(backingBuffer)); ReturnErrorOnFailure(mpClientInfoStore->SyncSetKeyValue( DefaultStorageKeyAllocator::ICDClientInfoKey(clientInfo.peer_node.GetFabricIndex()).KeyName(), backingBuffer.Get(), static_cast(len))); - return IncreaseEntryCountForFabric(clientInfo.peer_node.GetFabricIndex()); + ReturnErrorOnFailure(IncreaseEntryCountForFabric(clientInfo.peer_node.GetFabricIndex())); + ChipLogProgress(ICD, + "Store ICD entry successfully with peer nodeId " ChipLogFormatScopedNodeId + " and checkin nodeId " ChipLogFormatScopedNodeId, + ChipLogValueScopedNodeId(clientInfo.peer_node), ChipLogValueScopedNodeId(clientInfo.check_in_node)); + return CHIP_NO_ERROR; } CHIP_ERROR DefaultICDClientStorage::IncreaseEntryCountForFabric(FabricIndex fabricIndex) @@ -405,7 +428,7 @@ CHIP_ERROR DefaultICDClientStorage::UpdateEntryCountForFabric(FabricIndex fabric size_t total = MaxICDCounterSize(); Platform::ScopedMemoryBuffer backingBuffer; - ReturnErrorCodeIf(!backingBuffer.Calloc(total), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(backingBuffer.Calloc(total), CHIP_ERROR_NO_MEMORY); TLV::ScopedBufferTLVWriter writer(std::move(backingBuffer), total); TLV::TLVType structType; @@ -416,7 +439,7 @@ CHIP_ERROR DefaultICDClientStorage::UpdateEntryCountForFabric(FabricIndex fabric const auto len = writer.GetLengthWritten(); VerifyOrReturnError(CanCastTo(len), CHIP_ERROR_BUFFER_TOO_SMALL); - writer.Finalize(backingBuffer); + ReturnErrorOnFailure(writer.Finalize(backingBuffer)); return mpClientInfoStore->SyncSetKeyValue(DefaultStorageKeyAllocator::FabricICDClientInfoCounter(fabricIndex).KeyName(), backingBuffer.Get(), static_cast(len)); @@ -424,9 +447,11 @@ CHIP_ERROR DefaultICDClientStorage::UpdateEntryCountForFabric(FabricIndex fabric CHIP_ERROR DefaultICDClientStorage::DeleteEntry(const ScopedNodeId & peerNode) { + VerifyOrReturnError(FabricExists(peerNode.GetFabricIndex()), CHIP_NO_ERROR); size_t clientInfoSize = 0; std::vector clientInfoVector; ReturnErrorOnFailure(Load(peerNode.GetFabricIndex(), clientInfoVector, clientInfoSize)); + VerifyOrReturnError(clientInfoVector.size() > 0, CHIP_NO_ERROR); for (auto it = clientInfoVector.begin(); it != clientInfoVector.end(); it++) { @@ -440,10 +465,9 @@ CHIP_ERROR DefaultICDClientStorage::DeleteEntry(const ScopedNodeId & peerNode) ReturnErrorOnFailure( mpClientInfoStore->SyncDeleteKeyValue(DefaultStorageKeyAllocator::ICDClientInfoKey(peerNode.GetFabricIndex()).KeyName())); - size_t total = clientInfoSize * clientInfoVector.size() + kArrayOverHead; Platform::ScopedMemoryBuffer backingBuffer; - ReturnErrorCodeIf(!backingBuffer.Calloc(total), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(backingBuffer.Calloc(total), CHIP_ERROR_NO_MEMORY); TLV::ScopedBufferTLVWriter writer(std::move(backingBuffer), total); ReturnErrorOnFailure(SerializeToTlv(writer, clientInfoVector)); @@ -451,16 +475,21 @@ CHIP_ERROR DefaultICDClientStorage::DeleteEntry(const ScopedNodeId & peerNode) const auto len = writer.GetLengthWritten(); VerifyOrReturnError(CanCastTo(len), CHIP_ERROR_BUFFER_TOO_SMALL); - writer.Finalize(backingBuffer); + ReturnErrorOnFailure(writer.Finalize(backingBuffer)); ReturnErrorOnFailure( mpClientInfoStore->SyncSetKeyValue(DefaultStorageKeyAllocator::ICDClientInfoKey(peerNode.GetFabricIndex()).KeyName(), backingBuffer.Get(), static_cast(len))); - return DecreaseEntryCountForFabric(peerNode.GetFabricIndex()); + ReturnErrorOnFailure(DecreaseEntryCountForFabric(peerNode.GetFabricIndex())); + ChipLogProgress(ICD, "Remove ICD entry successfully with peer nodeId " ChipLogFormatScopedNodeId, + ChipLogValueScopedNodeId(peerNode)); + return CHIP_NO_ERROR; } CHIP_ERROR DefaultICDClientStorage::DeleteAllEntries(FabricIndex fabricIndex) { + VerifyOrReturnError(FabricExists(fabricIndex), CHIP_NO_ERROR); + size_t clientInfoSize = 0; std::vector clientInfoVector; ReturnErrorOnFailure(Load(fabricIndex, clientInfoVector, clientInfoSize)); @@ -471,7 +500,26 @@ CHIP_ERROR DefaultICDClientStorage::DeleteAllEntries(FabricIndex fabricIndex) } ReturnErrorOnFailure( mpClientInfoStore->SyncDeleteKeyValue(DefaultStorageKeyAllocator::ICDClientInfoKey(fabricIndex).KeyName())); - return mpClientInfoStore->SyncDeleteKeyValue(DefaultStorageKeyAllocator::FabricICDClientInfoCounter(fabricIndex).KeyName()); + ReturnErrorOnFailure( + mpClientInfoStore->SyncDeleteKeyValue(DefaultStorageKeyAllocator::FabricICDClientInfoCounter(fabricIndex).KeyName())); + + for (auto fabric = mFabricList.begin(); fabric != mFabricList.end(); fabric++) + { + if (*fabric == fabricIndex) + { + mFabricList.erase(fabric); + break; + } + } + + if (mFabricList.size() == 0) + { + return mpClientInfoStore->SyncDeleteKeyValue(DefaultStorageKeyAllocator::ICDFabricList().KeyName()); + } + + ReturnErrorOnFailure(StoreFabricList()); + ChipLogProgress(ICD, "Remove all ICD entries successfully for fabric index %u", fabricIndex); + return CHIP_NO_ERROR; } CHIP_ERROR DefaultICDClientStorage::ProcessCheckInPayload(const ByteSpan & payload, ICDClientInfo & clientInfo, diff --git a/src/app/icd/client/DefaultICDClientStorage.h b/src/app/icd/client/DefaultICDClientStorage.h index 76faeb9afc..13064fe649 100644 --- a/src/app/icd/client/DefaultICDClientStorage.h +++ b/src/app/icd/client/DefaultICDClientStorage.h @@ -120,6 +120,12 @@ class DefaultICDClientStorage : public ICDClientStorage CHIP_ERROR ProcessCheckInPayload(const ByteSpan & payload, ICDClientInfo & clientInfo, Protocols::SecureChannel::CounterType & counter) override; +#if CONFIG_BUILD_FOR_HOST_UNIT_TEST + size_t GetFabricListSize() { return mFabricList.size(); } + + PersistentStorageDelegate * GetClientInfoStore() { return mpClientInfoStore; } +#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST + protected: enum class ClientInfoTag : uint8_t { @@ -173,9 +179,12 @@ class DefaultICDClientStorage : public ICDClientStorage private: friend class ICDClientInfoIteratorImpl; + CHIP_ERROR StoreFabricList(); CHIP_ERROR LoadFabricList(); CHIP_ERROR LoadCounter(FabricIndex fabricIndex, size_t & count, size_t & clientInfoSize); + bool FabricExists(FabricIndex fabricIndex); + CHIP_ERROR IncreaseEntryCountForFabric(FabricIndex fabricIndex); CHIP_ERROR DecreaseEntryCountForFabric(FabricIndex fabricIndex); CHIP_ERROR UpdateEntryCountForFabric(FabricIndex fabricIndex, bool increase); diff --git a/src/app/icd/icd.gni b/src/app/icd/icd.gni index ed3fd0518f..b7fef896f5 100644 --- a/src/app/icd/icd.gni +++ b/src/app/icd/icd.gni @@ -14,23 +14,15 @@ declare_args() { # Matter SDK Configuration flag to enable ICD server functionality - # TODO - Add Specifics when the design is refined chip_enable_icd_server = false chip_enable_icd_lit = false - # Matter SDK Configuration flag to enable ICD client functionality - # TODO - Add Specifics when the design is refined - chip_enable_icd_client = false - # Matter SDK Configuration flag to make the ICD manager emit a report on entering active mode chip_icd_report_on_active_mode = false icd_max_notification_subscribers = 1 - # Set to true to enforce SIT Slow Polling Max value to 15seconds (spec 9.16.1.5) - icd_enforce_sit_slow_poll_limit = false - # Set to true if device supports dynamic switching from SIT to LIT operating modes (DSLS) chip_enable_icd_dsls = false } diff --git a/src/app/icd/server/BUILD.gn b/src/app/icd/server/BUILD.gn index e1967c23f5..bef9a0730a 100644 --- a/src/app/icd/server/BUILD.gn +++ b/src/app/icd/server/BUILD.gn @@ -39,7 +39,6 @@ buildconfig_header("icd-server-buildconfig") { "CHIP_CONFIG_ENABLE_ICD_DSLS=${chip_enable_icd_dsls}", "ICD_REPORT_ON_ENTER_ACTIVE_MODE=${chip_icd_report_on_active_mode}", "ICD_MAX_NOTIFICATION_SUBSCRIBERS=${icd_max_notification_subscribers}", - "ICD_ENFORCE_SIT_SLOW_POLL_LIMIT=${icd_enforce_sit_slow_poll_limit}", ] visibility = [ ":icd-server-config" ] diff --git a/src/app/icd/server/ICDConfigurationData.cpp b/src/app/icd/server/ICDConfigurationData.cpp index cfd2325671..44d78bfadf 100644 --- a/src/app/icd/server/ICDConfigurationData.cpp +++ b/src/app/icd/server/ICDConfigurationData.cpp @@ -16,7 +16,6 @@ */ #include "ICDConfigurationData.h" -#include #include namespace chip { @@ -25,15 +24,16 @@ ICDConfigurationData ICDConfigurationData::instance; System::Clock::Milliseconds32 ICDConfigurationData::GetSlowPollingInterval() { -#if ICD_ENFORCE_SIT_SLOW_POLL_LIMIT - // When in SIT mode, the slow poll interval SHOULDN'T be greater than the SIT mode polling threshold, per spec. +#if CHIP_CONFIG_ENABLE_ICD_LIT + // When in SIT mode, the slow poll interval SHALL NOT be greater than the SIT mode polling threshold, per spec. // This is important for ICD device configured for LIT operation but currently operating as a SIT // due to a lack of client registration if (mICDMode == ICDMode::SIT && mSlowPollingInterval > kSITPollingThreshold) { return kSITPollingThreshold; } -#endif +#endif // CHIP_CONFIG_ENABLE_ICD_LIT + return mSlowPollingInterval; } diff --git a/src/app/icd/server/ICDConfigurationData.h b/src/app/icd/server/ICDConfigurationData.h index 0d6e17e55e..4d2597ef26 100644 --- a/src/app/icd/server/ICDConfigurationData.h +++ b/src/app/icd/server/ICDConfigurationData.h @@ -17,6 +17,7 @@ #pragma once +#include #include #include #include @@ -77,14 +78,11 @@ class ICDConfigurationData System::Clock::Seconds32 GetMaximumCheckInBackoff() { return mMaximumCheckInBackOff; } /** - * If ICD_ENFORCE_SIT_SLOW_POLL_LIMIT is set to 0, function will always return the configured Slow Polling interval - * (CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL). - * - * If ICD_ENFORCE_SIT_SLOW_POLL_LIMIT is set to 1, the returned value will depend on the devices operating mode. + * The returned value will depend on the devices operating mode. * If ICDMode == SIT && the configured slow poll interval is superior to the maximum threshold (15s), the function will return - * the threshold (15s). If ICDMode == SIT but the configured slow poll interval is equal or inferior to the threshold, the - * function will the return the configured slow poll interval. If ICDMode == LIT, the function will return the configured slow - * poll interval. + * the threshold kSITPollingThreshold (<= 15s). If ICDMode == SIT but the configured slow poll interval is equal or inferior to + * the threshold, the function will the return the configured slow poll interval. If ICDMode == LIT, the function will return + * the configured slow poll interval. * * @return System::Clock::Milliseconds32 */ @@ -158,12 +156,18 @@ class ICDConfigurationData "Spec requires the MaximumCheckInBackOff to be equal or superior to the IdleModeDuration"); System::Clock::Seconds32 mMaximumCheckInBackOff = System::Clock::Seconds32(CHIP_CONFIG_ICD_MAXIMUM_CHECK_IN_BACKOFF_SEC); - // SIT ICDs should have a SlowPollingThreshold shorter than or equal to 15s (spec 9.16.1.5) - static_assert((CHIP_DEVICE_CONFIG_ICD_SIT_SLOW_POLL_LIMIT).count() <= 15000, + // SIT ICDs SHALL have a SlowPollingThreshold shorter than or equal to 15s (spec 9.16.1.5) + static constexpr System::Clock::Milliseconds32 kSitIcdSlowPollMaximum = System::Clock::Milliseconds32(15000); + static_assert((CHIP_DEVICE_CONFIG_ICD_SIT_SLOW_POLL_LIMIT).count() <= kSitIcdSlowPollMaximum.count(), "Spec requires the maximum slow poll interval for the SIT device to be smaller or equal than 15 s."); static constexpr System::Clock::Milliseconds32 kSITPollingThreshold = CHIP_DEVICE_CONFIG_ICD_SIT_SLOW_POLL_LIMIT; - System::Clock::Milliseconds32 mSlowPollingInterval = CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL; - System::Clock::Milliseconds32 mFastPollingInterval = CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL; + +#if CHIP_CONFIG_ENABLE_ICD_LIT == 0 + static_assert((CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL <= kSitIcdSlowPollMaximum), + "LIT support is required for slow polling intervals superior to 15 seconds"); +#endif + System::Clock::Milliseconds32 mSlowPollingInterval = CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL; + System::Clock::Milliseconds32 mFastPollingInterval = CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL; ICDMode mICDMode = ICDMode::SIT; }; diff --git a/src/app/icd/server/ICDManager.cpp b/src/app/icd/server/ICDManager.cpp index 3e89af1e16..6efa43875f 100644 --- a/src/app/icd/server/ICDManager.cpp +++ b/src/app/icd/server/ICDManager.cpp @@ -80,9 +80,6 @@ void ICDManager::Init() VerifyOrDieWithMsg(ICDConfigurationData::GetInstance().GetMinLitActiveModeThreshold() <= ICDConfigurationData::GetInstance().GetActiveModeThreshold(), AppServer, "The minimum ActiveModeThreshold value for a LIT ICD is 5 seconds."); - // Disabling check until LIT support is compelte - // VerifyOrDieWithMsg((GetSlowPollingInterval() <= GetSITPollingThreshold()) , AppServer, - // "LIT support is required for slow polling intervals superior to 15 seconds"); } #endif // CHIP_CONFIG_ENABLE_ICD_LIT @@ -120,13 +117,13 @@ void ICDManager::Shutdown() bool ICDManager::SupportsFeature(Feature feature) { // Can't use attribute accessors/Attributes::FeatureMap::Get in unit tests -#if !CONFIG_BUILD_FOR_HOST_UNIT_TEST +#if !(CONFIG_BUILD_FOR_HOST_UNIT_TEST) uint32_t featureMap = 0; bool success = (Attributes::FeatureMap::Get(kRootEndpointId, &featureMap) == Status::Success); return success ? ((featureMap & to_underlying(feature)) != 0) : false; #else return ((mFeatureMap & to_underlying(feature)) != 0); -#endif // !CONFIG_BUILD_FOR_HOST_UNIT_TEST +#endif // !(CONFIG_BUILD_FOR_HOST_UNIT_TEST) } uint32_t ICDManager::StayActiveRequest(uint32_t stayActiveDuration) @@ -148,7 +145,7 @@ uint32_t ICDManager::StayActiveRequest(uint32_t stayActiveDuration) #if CHIP_CONFIG_ENABLE_ICD_CIP void ICDManager::SendCheckInMsgs() { -#if !CONFIG_BUILD_FOR_HOST_UNIT_TEST +#if !(CONFIG_BUILD_FOR_HOST_UNIT_TEST) VerifyOrDie(mStorage != nullptr); VerifyOrDie(mFabricTable != nullptr); @@ -216,7 +213,7 @@ void ICDManager::SendCheckInMsgs() } } } -#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST +#endif // !(CONFIG_BUILD_FOR_HOST_UNIT_TEST) } bool ICDManager::CheckInMessagesWouldBeSent(const std::function & shouldCheckInMsgsBeSentFunction) @@ -399,7 +396,7 @@ void ICDManager::UpdateICDMode() ICDConfigurationData::GetInstance().SetICDMode(tempMode); // Can't use attribute accessors/Attributes::OperatingMode::Set in unit tests -#if !CONFIG_BUILD_FOR_HOST_UNIT_TEST +#if !(CONFIG_BUILD_FOR_HOST_UNIT_TEST) Attributes::OperatingMode::Set(kRootEndpointId, static_cast(tempMode)); #endif diff --git a/src/app/icd/server/ICDManager.h b/src/app/icd/server/ICDManager.h index dc516673df..eae0adbc1a 100644 --- a/src/app/icd/server/ICDManager.h +++ b/src/app/icd/server/ICDManager.h @@ -233,7 +233,7 @@ class ICDManager : public ICDListener, public TestEventTriggerHandler #if CHIP_CONFIG_PERSIST_SUBSCRIPTIONS && !CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION bool GetIsBootUpResumeSubscriptionExecuted() { return mIsBootUpResumeSubscriptionExecuted; }; #endif // !CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION && CHIP_CONFIG_PERSIST_SUBSCRIPTIONS -#endif +#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST // Implementation of ICDListener functions. // Callers must origin from the chip task context or hold the ChipStack lock. @@ -382,10 +382,10 @@ class ICDManager : public ICDListener, public TestEventTriggerHandler ObjectPool mICDSenderPool; #endif // CHIP_CONFIG_ENABLE_ICD_CIP -#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST +#if CONFIG_BUILD_FOR_HOST_UNIT_TEST // feature map that can be changed at runtime for testing purposes uint32_t mFeatureMap = 0; -#endif +#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST }; } // namespace app diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp index 2dd08739ad..45ebdeb7f6 100644 --- a/src/app/reporting/Engine.cpp +++ b/src/app/reporting/Engine.cpp @@ -852,7 +852,7 @@ bool Engine::MergeDirtyPathsUnderSameEndpoint() CHIP_ERROR Engine::InsertPathIntoDirtySet(const AttributePathParams & aAttributePath) { - ReturnErrorCodeIf(MergeOverlappedAttributePath(aAttributePath), CHIP_NO_ERROR); + VerifyOrReturnError(!MergeOverlappedAttributePath(aAttributePath), CHIP_NO_ERROR); if (mGlobalDirtySet.Exhausted() && !MergeDirtyPathsUnderSameCluster() && !MergeDirtyPathsUnderSameEndpoint()) { @@ -862,7 +862,7 @@ CHIP_ERROR Engine::InsertPathIntoDirtySet(const AttributePathParams & aAttribute object->mGeneration = GetDirtySetGeneration(); } - ReturnErrorCodeIf(MergeOverlappedAttributePath(aAttributePath), CHIP_NO_ERROR); + VerifyOrReturnError(!MergeOverlappedAttributePath(aAttributePath), CHIP_NO_ERROR); ChipLogDetail(DataManagement, "Cannot merge the new path into any existing path, create one."); auto object = mGlobalDirtySet.CreateObject(); diff --git a/src/app/server/AclStorage.cpp b/src/app/server/AclStorage.cpp index 03ebc7a134..913589ef82 100644 --- a/src/app/server/AclStorage.cpp +++ b/src/app/server/AclStorage.cpp @@ -152,14 +152,14 @@ CHIP_ERROR Convert(StagingSubject from, NodeId & to) switch (from.authMode) { case StagingAuthMode::kPase: - ReturnErrorCodeIf((from.nodeId & ~kMaskPAKEKeyId) != 0, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError((from.nodeId & ~kMaskPAKEKeyId) == 0, CHIP_ERROR_INVALID_ARGUMENT); to = NodeIdFromPAKEKeyId(static_cast(from.nodeId)); break; case StagingAuthMode::kCase: to = from.nodeId; break; case StagingAuthMode::kGroup: - ReturnErrorCodeIf((from.nodeId & ~kMaskGroupId) != 0, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError((from.nodeId & ~kMaskGroupId) == 0, CHIP_ERROR_INVALID_ARGUMENT); to = NodeIdFromGroupId(static_cast(from.nodeId)); break; default: diff --git a/src/app/server/CommissioningWindowManager.cpp b/src/app/server/CommissioningWindowManager.cpp index 110a729d8f..2a8611ba34 100644 --- a/src/app/server/CommissioningWindowManager.cpp +++ b/src/app/server/CommissioningWindowManager.cpp @@ -111,6 +111,8 @@ void CommissioningWindowManager::OnPlatformEvent(const DeviceLayer::ChipDeviceEv void CommissioningWindowManager::Shutdown() { + VerifyOrReturn(nullptr != mServer); + StopAdvertisement(/* aShuttingDown = */ true); ResetState(); diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 426e3c6865..9a32401bc7 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -19,8 +19,10 @@ #include +#include #include #include +#include #include #include #include @@ -81,6 +83,33 @@ using chip::Transport::TcpListenParameters; namespace { +#if CHIP_CONFIG_USE_DATA_MODEL_INTERFACE +class DeviceTypeResolver : public chip::Access::AccessControl::DeviceTypeResolver +{ +public: + bool IsDeviceTypeOnEndpoint(chip::DeviceTypeId deviceType, chip::EndpointId endpoint) override + { + chip::app::DataModel::Provider * model = chip::app::InteractionModelEngine::GetInstance()->GetDataModelProvider(); + + for (auto type = model->FirstDeviceType(endpoint); type.has_value(); type = model->NextDeviceType(endpoint, *type)) + { + if (type->deviceTypeId == deviceType) + { +#if CHIP_CONFIG_USE_EMBER_DATA_MODEL + VerifyOrDie(chip::app::IsDeviceTypeOnEndpoint(deviceType, endpoint)); +#endif // CHIP_CONFIG_USE_EMBER_DATA_MODEL + return true; + } + } +#if CHIP_CONFIG_USE_EMBER_DATA_MODEL + VerifyOrDie(!chip::app::IsDeviceTypeOnEndpoint(deviceType, endpoint)); +#endif // CHIP_CONFIG_USE_EMBER_DATA_MODEL + return false; + } +} sDeviceTypeResolver; +#else // CHIP_CONFIG_USE_DATA_MODEL_INTERFACE + +// Ember implementation of the device type resolver class DeviceTypeResolver : public chip::Access::AccessControl::DeviceTypeResolver { public: @@ -89,6 +118,7 @@ class DeviceTypeResolver : public chip::Access::AccessControl::DeviceTypeResolve return chip::app::IsDeviceTypeOnEndpoint(deviceType, endpoint); } } sDeviceTypeResolver; +#endif } // namespace @@ -313,9 +343,9 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) if (GetFabricTable().FabricCount() != 0) { +#if CONFIG_NETWORK_LAYER_BLE // The device is already commissioned, proactively disable BLE advertisement. ChipLogProgress(AppServer, "Fabric already commissioned. Disabling BLE advertisement"); -#if CONFIG_NETWORK_LAYER_BLE chip::DeviceLayer::ConnectivityMgr().SetBLEAdvertisingEnabled(false); #endif } diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index 104a57a2fc..9ebed234e5 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -154,6 +154,18 @@ source_set("thread-border-router-management-test-srcs") { ] } +source_set("ecosystem-information-test-srcs") { + sources = [ + "${chip_root}/src/app/clusters/ecosystem-information-server/ecosystem-information-server.cpp", + "${chip_root}/src/app/clusters/ecosystem-information-server/ecosystem-information-server.h", + ] + public_deps = [ + "${chip_root}/src/app:interaction-model", + "${chip_root}/src/app/common:cluster-objects", + "${chip_root}/src/lib/core", + ] +} + source_set("app-test-stubs") { sources = [ "test-ember-api.cpp", @@ -194,6 +206,7 @@ chip_test_suite("tests") { "TestBasicCommandPathRegistry.cpp", "TestBindingTable.cpp", "TestBuilderParser.cpp", + "TestCheckInHandler.cpp", "TestCommandHandlerInterfaceRegistry.cpp", "TestCommandInteraction.cpp", "TestCommandPathParams.cpp", @@ -201,6 +214,7 @@ chip_test_suite("tests") { "TestDataModelSerialization.cpp", "TestDefaultOTARequestorStorage.cpp", "TestDefaultThreadNetworkDirectoryStorage.cpp", + "TestEcosystemInformationCluster.cpp", "TestEventLoggingNoUTCTime.cpp", "TestEventOverflow.cpp", "TestEventPathParams.cpp", @@ -228,6 +242,7 @@ chip_test_suite("tests") { public_deps = [ ":app-test-stubs", ":binding-test-srcs", + ":ecosystem-information-test-srcs", ":operational-state-test-srcs", ":ota-requestor-test-srcs", ":power-cluster-test-srcs", @@ -236,6 +251,8 @@ chip_test_suite("tests") { "${chip_root}/src/app", "${chip_root}/src/app/codegen-data-model-provider:instance-header", "${chip_root}/src/app/common:cluster-objects", + "${chip_root}/src/app/data-model-provider/tests:encode-decode", + "${chip_root}/src/app/icd/client:handler", "${chip_root}/src/app/icd/client:manager", "${chip_root}/src/app/tests:helpers", "${chip_root}/src/app/util/mock:mock_codegen_data_model", diff --git a/src/app/tests/TestCheckInHandler.cpp b/src/app/tests/TestCheckInHandler.cpp new file mode 100644 index 0000000000..0d57eb6b42 --- /dev/null +++ b/src/app/tests/TestCheckInHandler.cpp @@ -0,0 +1,300 @@ +/* + * Copyright (c) 2024 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 + +using namespace chip; +using namespace app; +using namespace System; +using TestSessionKeystoreImpl = Crypto::DefaultSessionKeystore; + +constexpr uint8_t kKeyBuffer1[] = { + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f +}; + +constexpr uint8_t kKeyBuffer2[] = { + 0xf1, 0xe1, 0xd1, 0xc1, 0xb1, 0xa1, 0x91, 0x81, 0x71, 0x61, 0x51, 0x14, 0x31, 0x21, 0x11, 0x01 +}; + +class TestCheckInHandler : public chip::Test::AppContext +{ +}; + +class CheckInHandlerWrapper : public chip::app::CheckInHandler +{ +public: + CHIP_ERROR ValidateOnMessageReceived(Messaging::ExchangeContext * ec, const PayloadHeader & payloadHeader, + System::PacketBufferHandle && payload) + { + return OnMessageReceived(ec, payloadHeader, std::move(payload)); + } +}; + +TEST_F(TestCheckInHandler, TestOnMessageReceived) +{ + InteractionModelEngine * engine = InteractionModelEngine::GetInstance(); + EXPECT_EQ(engine->Init(&GetExchangeManager(), &GetFabricTable(), app::reporting::GetDefaultReportScheduler()), CHIP_NO_ERROR); + TestPersistentStorageDelegate clientInfoStorage; + TestSessionKeystoreImpl keystore; + + DefaultICDClientStorage manager; + EXPECT_EQ(manager.Init(&clientInfoStorage, &keystore), CHIP_NO_ERROR); + + DefaultCheckInDelegate checkInDelegate; + EXPECT_EQ(checkInDelegate.Init(&manager, engine), CHIP_NO_ERROR); + + CheckInHandlerWrapper checkInHandler; + EXPECT_EQ(checkInHandler.Init(&GetExchangeManager(), &manager, &checkInDelegate, engine), CHIP_NO_ERROR); + + FabricIndex fabricIdA = 1; + NodeId nodeIdA = 6666; + + ICDClientInfo clientInfoA; + clientInfoA.peer_node = ScopedNodeId(nodeIdA, fabricIdA); + clientInfoA.start_icd_counter = 0; + clientInfoA.offset = 0; + EXPECT_EQ(manager.UpdateFabricList(fabricIdA), CHIP_NO_ERROR); + EXPECT_EQ(manager.SetKey(clientInfoA, ByteSpan(kKeyBuffer1)), CHIP_NO_ERROR); + EXPECT_EQ(manager.StoreEntry(clientInfoA), CHIP_NO_ERROR); + + FabricIndex fabricIdB = 2; + NodeId nodeIdB = 6667; + + ICDClientInfo clientInfoB; + clientInfoB.peer_node = ScopedNodeId(nodeIdB, fabricIdB); + clientInfoB.offset = 0; + EXPECT_EQ(manager.UpdateFabricList(fabricIdB), CHIP_NO_ERROR); + EXPECT_EQ(manager.SetKey(clientInfoB, ByteSpan(kKeyBuffer2)), CHIP_NO_ERROR); + EXPECT_EQ(manager.StoreEntry(clientInfoB), CHIP_NO_ERROR); + + PayloadHeader payloadHeader; + payloadHeader.SetExchangeID(0); + payloadHeader.SetMessageType(chip::Protocols::SecureChannel::MsgType::ICD_CheckIn); + + uint32_t counter = 1; + System::PacketBufferHandle buffer1 = MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output1{ buffer1->Start(), buffer1->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfoA.aes_key_handle, clientInfoA.hmac_key_handle, counter, ByteSpan(), output1), + CHIP_NO_ERROR); + + buffer1->SetDataLength(static_cast(output1.size())); + EXPECT_EQ(checkInHandler.ValidateOnMessageReceived(nullptr, payloadHeader, std::move(buffer1)), CHIP_NO_ERROR); + + ICDClientInfo clientInfo1; + auto * iterator = manager.IterateICDClientInfo(); + ASSERT_NE(iterator, nullptr); + while (iterator->Next(clientInfo1)) + { + if (clientInfo1.peer_node.GetNodeId() == nodeIdA && clientInfo1.peer_node.GetFabricIndex() == fabricIdA) + { + break; + } + } + iterator->Release(); + + EXPECT_EQ(clientInfo1.offset, counter - clientInfoA.start_icd_counter); + + // Validate duplicate check-in message handling + chip::System::PacketBufferHandle buffer2 = + MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output2{ buffer2->Start(), buffer2->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfoA.aes_key_handle, clientInfoA.hmac_key_handle, counter, ByteSpan(), output2), + CHIP_NO_ERROR); + + buffer2->SetDataLength(static_cast(output2.size())); + EXPECT_EQ(checkInHandler.ValidateOnMessageReceived(nullptr, payloadHeader, std::move(buffer2)), CHIP_NO_ERROR); + + ICDClientInfo clientInfo2; + iterator = manager.IterateICDClientInfo(); + ASSERT_NE(iterator, nullptr); + while (iterator->Next(clientInfo2)) + { + if (clientInfo2.peer_node.GetNodeId() == nodeIdA && clientInfo2.peer_node.GetFabricIndex() == fabricIdA) + { + break; + } + } + iterator->Release(); + EXPECT_EQ(clientInfo2.offset, counter - clientInfoA.start_icd_counter); + + // Validate second check-in message with increased counter + counter++; + System::PacketBufferHandle buffer3 = MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output3{ buffer3->Start(), buffer3->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfoA.aes_key_handle, clientInfoA.hmac_key_handle, counter, ByteSpan(), output3), + CHIP_NO_ERROR); + buffer3->SetDataLength(static_cast(output3.size())); + EXPECT_EQ(checkInHandler.ValidateOnMessageReceived(nullptr, payloadHeader, std::move(buffer3)), CHIP_NO_ERROR); + ICDClientInfo clientInfo3; + iterator = manager.IterateICDClientInfo(); + ASSERT_NE(iterator, nullptr); + while (iterator->Next(clientInfo3)) + { + if (clientInfo3.peer_node.GetNodeId() == nodeIdA && clientInfo3.peer_node.GetFabricIndex() == fabricIdA) + { + break; + } + } + iterator->Release(); + EXPECT_EQ(clientInfo3.offset, counter - clientInfoA.start_icd_counter); + + // Validate check-in message from fabricB + counter++; + System::PacketBufferHandle buffer4 = MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output4{ buffer4->Start(), buffer4->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfoB.aes_key_handle, clientInfoB.hmac_key_handle, counter, ByteSpan(), output4), + CHIP_NO_ERROR); + buffer4->SetDataLength(static_cast(output4.size())); + EXPECT_EQ(checkInHandler.ValidateOnMessageReceived(nullptr, payloadHeader, std::move(buffer4)), CHIP_NO_ERROR); + ICDClientInfo clientInfo4; + iterator = manager.IterateICDClientInfo(); + ASSERT_NE(iterator, nullptr); + while (iterator->Next(clientInfo4)) + { + if (clientInfo4.peer_node.GetNodeId() == nodeIdB && clientInfo4.peer_node.GetFabricIndex() == fabricIdB) + { + break; + } + } + iterator->Release(); + EXPECT_EQ(clientInfo4.offset, counter - clientInfoB.start_icd_counter); + + // Validate check-in message from removed fabricB + counter++; + System::PacketBufferHandle buffer5 = MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output5{ buffer5->Start(), buffer5->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfoB.aes_key_handle, clientInfoB.hmac_key_handle, counter, ByteSpan(), output5), + CHIP_NO_ERROR); + + EXPECT_EQ(manager.DeleteAllEntries(fabricIdB), CHIP_NO_ERROR); + buffer5->SetDataLength(static_cast(output5.size())); + EXPECT_EQ(checkInHandler.ValidateOnMessageReceived(nullptr, payloadHeader, std::move(buffer5)), CHIP_NO_ERROR); + ICDClientInfo clientInfo5; + iterator = manager.IterateICDClientInfo(); + ASSERT_NE(iterator, nullptr); + bool located = false; + while (iterator->Next(clientInfo5)) + { + if (clientInfo5.peer_node.GetFabricIndex() == fabricIdB) + { + located = true; + break; + } + } + iterator->Release(); + EXPECT_FALSE(located); + + // Add back fabricB and validate check-in message again + EXPECT_EQ(manager.UpdateFabricList(fabricIdB), CHIP_NO_ERROR); + EXPECT_EQ(manager.SetKey(clientInfoB, ByteSpan(kKeyBuffer2)), CHIP_NO_ERROR); + EXPECT_EQ(manager.StoreEntry(clientInfoB), CHIP_NO_ERROR); + counter++; + System::PacketBufferHandle buffer6 = MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output6{ buffer6->Start(), buffer6->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfoB.aes_key_handle, clientInfoB.hmac_key_handle, counter, ByteSpan(), output6), + CHIP_NO_ERROR); + buffer6->SetDataLength(static_cast(output4.size())); + EXPECT_EQ(checkInHandler.ValidateOnMessageReceived(nullptr, payloadHeader, std::move(buffer6)), CHIP_NO_ERROR); + ICDClientInfo clientInfo6; + iterator = manager.IterateICDClientInfo(); + ASSERT_NE(iterator, nullptr); + while (iterator->Next(clientInfo6)) + { + if (clientInfo6.peer_node.GetNodeId() == nodeIdB && clientInfo6.peer_node.GetFabricIndex() == fabricIdB) + { + break; + } + } + iterator->Release(); + EXPECT_EQ(clientInfo6.offset, counter - clientInfoB.start_icd_counter); + + // Clear fabric table + EXPECT_EQ(manager.DeleteAllEntries(fabricIdA), CHIP_NO_ERROR); + EXPECT_EQ(manager.DeleteAllEntries(fabricIdB), CHIP_NO_ERROR); + // Add back fabricA and validate check-in message again + EXPECT_EQ(manager.UpdateFabricList(fabricIdA), CHIP_NO_ERROR); + EXPECT_EQ(manager.SetKey(clientInfoA, ByteSpan(kKeyBuffer1)), CHIP_NO_ERROR); + EXPECT_EQ(manager.StoreEntry(clientInfoA), CHIP_NO_ERROR); + counter++; + System::PacketBufferHandle buffer7 = MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output7{ buffer7->Start(), buffer7->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfoA.aes_key_handle, clientInfoA.hmac_key_handle, counter, ByteSpan(), output7), + CHIP_NO_ERROR); + buffer7->SetDataLength(static_cast(output7.size())); + EXPECT_EQ(checkInHandler.ValidateOnMessageReceived(nullptr, payloadHeader, std::move(buffer7)), CHIP_NO_ERROR); + ICDClientInfo clientInfo7; + iterator = manager.IterateICDClientInfo(); + ASSERT_NE(iterator, nullptr); + while (iterator->Next(clientInfo7)) + { + if (clientInfo7.peer_node.GetNodeId() == nodeIdA && clientInfo7.peer_node.GetFabricIndex() == fabricIdA) + { + break; + } + } + iterator->Release(); + EXPECT_EQ(clientInfo7.offset, counter - clientInfoA.start_icd_counter); + + // Validate IcdclientInfo is not updated when handling overlimited counter and fail to create case session + uint32_t old_start_icd_counter = clientInfo7.start_icd_counter; + uint32_t old_counter = counter; + counter = (1U << 31) + 100U + clientInfo7.start_icd_counter; + System::PacketBufferHandle buffer8 = MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output8{ buffer8->Start(), buffer8->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfoA.aes_key_handle, clientInfoA.hmac_key_handle, counter, ByteSpan(), output8), + CHIP_NO_ERROR); + + buffer8->SetDataLength(static_cast(output8.size())); + EXPECT_EQ(checkInHandler.ValidateOnMessageReceived(nullptr, payloadHeader, std::move(buffer8)), CHIP_NO_ERROR); + ICDClientInfo clientInfo8; + iterator = manager.IterateICDClientInfo(); + ASSERT_NE(iterator, nullptr); + while (iterator->Next(clientInfo8)) + { + if (clientInfo8.peer_node.GetNodeId() == nodeIdA && clientInfo8.peer_node.GetFabricIndex() == fabricIdA) + { + break; + } + } + iterator->Release(); + EXPECT_EQ(clientInfo8.offset, old_counter - clientInfoA.start_icd_counter); + EXPECT_EQ(clientInfo8.start_icd_counter, old_start_icd_counter); + + checkInHandler.Shutdown(); +} diff --git a/src/app/tests/TestCommandInteraction.cpp b/src/app/tests/TestCommandInteraction.cpp index e4465c119d..a44d76d1fc 100644 --- a/src/app/tests/TestCommandInteraction.cpp +++ b/src/app/tests/TestCommandInteraction.cpp @@ -25,7 +25,6 @@ #include #include -#include #include #include @@ -38,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -372,9 +372,21 @@ class MockCommandHandlerCallback : public CommandHandlerImpl::Callback { DispatchSingleClusterCommand(aCommandPath, apPayload, &apCommandObj); } - Protocols::InteractionModel::Status CommandExists(const ConcreteCommandPath & aCommandPath) + + Protocols::InteractionModel::Status ValidateCommandCanBeDispatched(const DataModel::InvokeRequest & request) override { - return ServerClusterCommandExists(aCommandPath); + using Protocols::InteractionModel::Status; + + Status status = ServerClusterCommandExists(request.path); + if (status != Status::Success) + { + return status; + } + + // NOTE: IM does more validation here, however for now we do minimal options + // to pass the test. + + return Status::Success; } void ResetCounter() { onFinalCalledTimes = 0; } diff --git a/src/app/tests/TestDefaultICDClientStorage.cpp b/src/app/tests/TestDefaultICDClientStorage.cpp index ac950fdbc7..0ea48d3326 100644 --- a/src/app/tests/TestDefaultICDClientStorage.cpp +++ b/src/app/tests/TestDefaultICDClientStorage.cpp @@ -103,6 +103,12 @@ TEST_F(TestDefaultICDClientStorage, TestClientInfoCount) iterator->Release(); + EXPECT_TRUE(manager.GetClientInfoStore()->SyncDoesKeyExist(DefaultStorageKeyAllocator::ICDFabricList().KeyName())); + EXPECT_TRUE(manager.GetClientInfoStore()->SyncDoesKeyExist( + DefaultStorageKeyAllocator::FabricICDClientInfoCounter(fabricId).KeyName())); + EXPECT_TRUE( + manager.GetClientInfoStore()->SyncDoesKeyExist(DefaultStorageKeyAllocator::ICDClientInfoKey(fabricId).KeyName())); + // Delete all and verify iterator counts 0 EXPECT_EQ(manager.DeleteAllEntries(fabricId), CHIP_NO_ERROR); iterator = manager.IterateICDClientInfo(); @@ -116,6 +122,14 @@ TEST_F(TestDefaultICDClientStorage, TestClientInfoCount) } iterator->Release(); EXPECT_EQ(count, 0u); + EXPECT_EQ(manager.GetFabricListSize(), 0u); + EXPECT_FALSE(manager.GetClientInfoStore()->SyncDoesKeyExist(DefaultStorageKeyAllocator::ICDFabricList().KeyName())); + EXPECT_FALSE(manager.GetClientInfoStore()->SyncDoesKeyExist( + DefaultStorageKeyAllocator::FabricICDClientInfoCounter(fabricId).KeyName())); + EXPECT_FALSE( + manager.GetClientInfoStore()->SyncDoesKeyExist(DefaultStorageKeyAllocator::ICDClientInfoKey(fabricId).KeyName())); + + EXPECT_EQ(manager.DeleteAllEntries(fabricId), CHIP_NO_ERROR); } { @@ -174,6 +188,15 @@ TEST_F(TestDefaultICDClientStorage, TestClientInfoCountMultipleFabric) EXPECT_EQ(manager.DeleteEntry(ScopedNodeId(nodeId3, fabricId2)), CHIP_NO_ERROR); EXPECT_EQ(iterator->Count(), 0u); + EXPECT_EQ(manager.GetFabricListSize(), 2u); + EXPECT_TRUE(manager.GetClientInfoStore()->SyncDoesKeyExist(DefaultStorageKeyAllocator::ICDFabricList().KeyName())); + EXPECT_TRUE(manager.GetClientInfoStore()->SyncDoesKeyExist( + DefaultStorageKeyAllocator::FabricICDClientInfoCounter(fabricId1).KeyName())); + EXPECT_TRUE(manager.GetClientInfoStore()->SyncDoesKeyExist(DefaultStorageKeyAllocator::ICDClientInfoKey(fabricId1).KeyName())); + EXPECT_TRUE(manager.GetClientInfoStore()->SyncDoesKeyExist( + DefaultStorageKeyAllocator::FabricICDClientInfoCounter(fabricId2).KeyName())); + EXPECT_TRUE(manager.GetClientInfoStore()->SyncDoesKeyExist(DefaultStorageKeyAllocator::ICDClientInfoKey(fabricId2).KeyName())); + // Verify ClientInfos manually count correctly size_t count = 0; ICDClientInfo clientInfo; @@ -183,6 +206,59 @@ TEST_F(TestDefaultICDClientStorage, TestClientInfoCountMultipleFabric) } EXPECT_FALSE(count); + + EXPECT_EQ(manager.DeleteEntry(ScopedNodeId(nodeId3, fabricId2)), CHIP_NO_ERROR); +} + +TEST_F(TestDefaultICDClientStorage, TestClientInfoCountMultipleFabricWithRemovingFabric) +{ + + FabricIndex fabricId1 = 1; + FabricIndex fabricId2 = 2; + NodeId nodeId1 = 6666; + NodeId nodeId2 = 6667; + NodeId nodeId3 = 6668; + DefaultICDClientStorage manager; + TestPersistentStorageDelegate clientInfoStorage; + TestSessionKeystoreImpl keystore; + EXPECT_EQ(manager.Init(&clientInfoStorage, &keystore), CHIP_NO_ERROR); + EXPECT_EQ(manager.UpdateFabricList(fabricId1), CHIP_NO_ERROR); + EXPECT_EQ(manager.UpdateFabricList(fabricId2), CHIP_NO_ERROR); + + // Write some ClientInfos and see the counts are correct + ICDClientInfo clientInfo1; + clientInfo1.peer_node = ScopedNodeId(nodeId1, fabricId1); + ICDClientInfo clientInfo2; + clientInfo2.peer_node = ScopedNodeId(nodeId2, fabricId1); + ICDClientInfo clientInfo3; + clientInfo3.peer_node = ScopedNodeId(nodeId3, fabricId2); + + EXPECT_EQ(manager.SetKey(clientInfo1, ByteSpan(kKeyBuffer1)), CHIP_NO_ERROR); + EXPECT_EQ(manager.StoreEntry(clientInfo1), CHIP_NO_ERROR); + + EXPECT_EQ(manager.SetKey(clientInfo2, ByteSpan(kKeyBuffer2)), CHIP_NO_ERROR); + EXPECT_EQ(manager.StoreEntry(clientInfo2), CHIP_NO_ERROR); + + EXPECT_EQ(manager.SetKey(clientInfo3, ByteSpan(kKeyBuffer3)), CHIP_NO_ERROR); + EXPECT_EQ(manager.StoreEntry(clientInfo3), CHIP_NO_ERROR); + // Make sure iterator counts correctly + auto * iterator = manager.IterateICDClientInfo(); + EXPECT_EQ(iterator->Count(), 3u); + iterator->Release(); + + EXPECT_EQ(manager.DeleteAllEntries(fabricId1), CHIP_NO_ERROR); + + iterator = manager.IterateICDClientInfo(); + ASSERT_NE(iterator, nullptr); + DefaultICDClientStorage::ICDClientInfoIteratorWrapper clientInfoIteratorWrapper(iterator); + EXPECT_EQ(iterator->Count(), 1u); + + EXPECT_EQ(manager.DeleteAllEntries(fabricId2), CHIP_NO_ERROR); + EXPECT_EQ(iterator->Count(), 0u); + + EXPECT_EQ(manager.StoreEntry(clientInfo1), CHIP_ERROR_INVALID_FABRIC_INDEX); + EXPECT_EQ(manager.StoreEntry(clientInfo2), CHIP_ERROR_INVALID_FABRIC_INDEX); + EXPECT_EQ(manager.StoreEntry(clientInfo3), CHIP_ERROR_INVALID_FABRIC_INDEX); } TEST_F(TestDefaultICDClientStorage, TestProcessCheckInPayload) @@ -214,9 +290,103 @@ TEST_F(TestDefaultICDClientStorage, TestProcessCheckInPayload) uint32_t checkInCounter = 0; ByteSpan payload{ buffer->Start(), buffer->DataLength() }; EXPECT_EQ(manager.ProcessCheckInPayload(payload, decodeClientInfo, checkInCounter), CHIP_NO_ERROR); + EXPECT_EQ(checkInCounter, counter); + + // Validate second check-in message with increased counter + counter++; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfo.aes_key_handle, clientInfo.hmac_key_handle, counter, ByteSpan(), output), + CHIP_NO_ERROR); + buffer->SetDataLength(static_cast(output.size())); + ByteSpan payload1{ buffer->Start(), buffer->DataLength() }; + EXPECT_EQ(manager.ProcessCheckInPayload(payload1, decodeClientInfo, checkInCounter), CHIP_NO_ERROR); + EXPECT_EQ(checkInCounter, counter); - // 2. Use a key not available in the storage for encoding + // Use a key not available in the storage for encoding EXPECT_EQ(manager.SetKey(clientInfo, ByteSpan(kKeyBuffer2)), CHIP_NO_ERROR); + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfo.aes_key_handle, clientInfo.hmac_key_handle, counter, ByteSpan(), output), + CHIP_NO_ERROR); + + buffer->SetDataLength(static_cast(output.size())); + ByteSpan payload2{ buffer->Start(), buffer->DataLength() }; + EXPECT_EQ(manager.ProcessCheckInPayload(payload2, decodeClientInfo, checkInCounter), CHIP_ERROR_NOT_FOUND); +} + +TEST_F(TestDefaultICDClientStorage, TestProcessCheckInPayloadWithRemovedKey) +{ + FabricIndex fabricId = 1; + NodeId nodeId = 6666; + TestPersistentStorageDelegate clientInfoStorage; + TestSessionKeystoreImpl keystore; + + DefaultICDClientStorage manager; + EXPECT_EQ(manager.Init(&clientInfoStorage, &keystore), CHIP_NO_ERROR); + EXPECT_EQ(manager.UpdateFabricList(fabricId), CHIP_NO_ERROR); + // Populate clientInfo + ICDClientInfo clientInfo; + clientInfo.peer_node = ScopedNodeId(nodeId, fabricId); + + EXPECT_EQ(manager.SetKey(clientInfo, ByteSpan(kKeyBuffer1)), CHIP_NO_ERROR); + EXPECT_EQ(manager.StoreEntry(clientInfo), CHIP_NO_ERROR); + + uint32_t counter = 1; + System::PacketBufferHandle buffer = MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output{ buffer->Start(), buffer->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfo.aes_key_handle, clientInfo.hmac_key_handle, counter, ByteSpan(), output), + CHIP_NO_ERROR); + + buffer->SetDataLength(static_cast(output.size())); + ICDClientInfo decodeClientInfo; + uint32_t checkInCounter = 0; + ByteSpan payload{ buffer->Start(), buffer->DataLength() }; + EXPECT_EQ(manager.ProcessCheckInPayload(payload, decodeClientInfo, checkInCounter), CHIP_NO_ERROR); + EXPECT_EQ(checkInCounter, counter); + + // Use a removed key in the storage for encoding + manager.RemoveKey(clientInfo), CHIP_NO_ERROR; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfo.aes_key_handle, clientInfo.hmac_key_handle, counter, ByteSpan(), output), + CHIP_NO_ERROR); + + buffer->SetDataLength(static_cast(output.size())); + ByteSpan payload1{ buffer->Start(), buffer->DataLength() }; + EXPECT_EQ(manager.ProcessCheckInPayload(payload1, decodeClientInfo, checkInCounter), CHIP_ERROR_NOT_FOUND); +} + +TEST_F(TestDefaultICDClientStorage, TestProcessCheckInPayloadWithEmptyIcdStorage) +{ + FabricIndex fabricId = 1; + NodeId nodeId = 6666; + TestPersistentStorageDelegate clientInfoStorage; + TestSessionKeystoreImpl keystore; + + DefaultICDClientStorage manager; + EXPECT_EQ(manager.Init(&clientInfoStorage, &keystore), CHIP_NO_ERROR); + EXPECT_EQ(manager.UpdateFabricList(fabricId), CHIP_NO_ERROR); + // Populate clientInfo + ICDClientInfo clientInfo; + clientInfo.peer_node = ScopedNodeId(nodeId, fabricId); + + EXPECT_EQ(manager.SetKey(clientInfo, ByteSpan(kKeyBuffer1)), CHIP_NO_ERROR); + EXPECT_EQ(manager.StoreEntry(clientInfo), CHIP_NO_ERROR); + + uint32_t counter = 1; + System::PacketBufferHandle buffer = MessagePacketBuffer::New(chip::Protocols::SecureChannel::CheckinMessage::kMinPayloadSize); + MutableByteSpan output{ buffer->Start(), buffer->MaxDataLength() }; + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( + clientInfo.aes_key_handle, clientInfo.hmac_key_handle, counter, ByteSpan(), output), + CHIP_NO_ERROR); + + buffer->SetDataLength(static_cast(output.size())); + ICDClientInfo decodeClientInfo; + uint32_t checkInCounter = 0; + ByteSpan payload{ buffer->Start(), buffer->DataLength() }; + EXPECT_EQ(manager.ProcessCheckInPayload(payload, decodeClientInfo, checkInCounter), CHIP_NO_ERROR); + EXPECT_EQ(checkInCounter, counter); + manager.DeleteAllEntries(fabricId); + EXPECT_EQ(chip::Protocols::SecureChannel::CheckinMessage::GenerateCheckinMessagePayload( clientInfo.aes_key_handle, clientInfo.hmac_key_handle, counter, ByteSpan(), output), CHIP_NO_ERROR); diff --git a/src/app/tests/TestEcosystemInformationCluster.cpp b/src/app/tests/TestEcosystemInformationCluster.cpp new file mode 100644 index 0000000000..8d7a2c217f --- /dev/null +++ b/src/app/tests/TestEcosystemInformationCluster.cpp @@ -0,0 +1,441 @@ +/* + * Copyright (c) 2024 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 "lib/support/CHIPMem.h" + +#include +#include +#include + +namespace chip { +namespace app { +namespace { + +using namespace Clusters; +using namespace Clusters::EcosystemInformation; + +const EndpointId kValidEndpointId = 1; +const Structs::DeviceTypeStruct::Type kValidDeviceType = { .deviceType = 0, .revision = 1 }; +constexpr Access::SubjectDescriptor kSubjectDescriptor = Testing::kAdminSubjectDescriptor; +const FabricIndex kValidFabricIndex = kSubjectDescriptor.fabricIndex; + +struct RequiredEcosystemDeviceParams +{ + EndpointId originalEndpointId = kValidEndpointId; + Structs::DeviceTypeStruct::Type deviceType = kValidDeviceType; + FabricIndex fabicIndex = kValidFabricIndex; +}; + +const RequiredEcosystemDeviceParams kDefaultRequiredDeviceParams; + +const EndpointId kAnotherValidEndpointId = 2; +static_assert(kValidEndpointId != kAnotherValidEndpointId); +const char * kValidLocationName = "AValidLocationName"; +const ClusterId kEcosystemInfoClusterId = EcosystemInformation::Id; +const AttributeId kDeviceDirectoryAttributeId = EcosystemInformation::Attributes::DeviceDirectory::Id; +const AttributeId kLocationDirectoryAttributeId = EcosystemInformation::Attributes::LocationDirectory::Id; + +class MockMatterContext : public MatterContext +{ +public: + virtual void MarkDirty(EndpointId endpointId, AttributeId attributeId) override + { + ConcreteAttributePath path(endpointId, kEcosystemInfoClusterId, attributeId); + mDirtyMarkedList.push_back(path); + } + + std::vector & GetDirtyList() { return mDirtyMarkedList; } + +private: + std::vector mDirtyMarkedList; +}; + +} // namespace + +class TestEcosystemInformationCluster : public ::testing::Test +{ +public: + TestEcosystemInformationCluster() : mClusterServer(TestOnlyParameter(), mMockMatterContext) {} + + static void SetUpTestSuite() { ASSERT_EQ(chip::Platform::MemoryInit(), CHIP_NO_ERROR); } + static void TearDownTestSuite() { chip::Platform::MemoryShutdown(); } + + Clusters::EcosystemInformation::EcosystemInformationServer & EcoInfoCluster() { return mClusterServer; } + + std::unique_ptr + CreateSimplestValidDeviceStruct(const RequiredEcosystemDeviceParams & requiredParams = kDefaultRequiredDeviceParams) + { + std::unique_ptr deviceInfo = EcosystemDeviceStruct::Builder() + .SetOriginalEndpoint(requiredParams.originalEndpointId) + .AddDeviceType(requiredParams.deviceType) + .SetFabricIndex(requiredParams.fabicIndex) + .Build(); + VerifyOrDie(deviceInfo); + return deviceInfo; + } + + std::unique_ptr CreateValidLocationStruct(const char * requiredLocationName = kValidLocationName) + { + std::string locationName(requiredLocationName); + std::unique_ptr locationInfo = + EcosystemLocationStruct::Builder().SetLocationName(locationName).Build(); + VerifyOrDie(locationInfo); + return locationInfo; + } + + MockMatterContext & GetMockMatterContext() { return mMockMatterContext; } + +private: + MockMatterContext mMockMatterContext; + Clusters::EcosystemInformation::EcosystemInformationServer mClusterServer; +}; + +TEST_F(TestEcosystemInformationCluster, UnsupportedClusterWhenReadingDeviceDirectoryOnNewClusterServer) +{ + ConcreteAttributePath path(kValidEndpointId, kEcosystemInfoClusterId, kDeviceDirectoryAttributeId); + + Testing::ReadOperation testRequest(path); + std::unique_ptr encoder = testRequest.StartEncoding(); + + ASSERT_EQ(EcoInfoCluster().ReadAttribute(path, *encoder), CHIP_IM_GLOBAL_STATUS(UnsupportedCluster)); +} + +TEST_F(TestEcosystemInformationCluster, UnsupportedClusterWhenReadingLocationDirectoryOnNewClusterServer) +{ + ConcreteAttributePath path(kValidEndpointId, kEcosystemInfoClusterId, kLocationDirectoryAttributeId); + + Testing::ReadOperation testRequest(path); + std::unique_ptr encoder = testRequest.StartEncoding(); + + ASSERT_EQ(EcoInfoCluster().ReadAttribute(path, *encoder), CHIP_IM_GLOBAL_STATUS(UnsupportedCluster)); +} + +TEST_F(TestEcosystemInformationCluster, EmptyReadAfterAddEcosystemInformationClusterToEndpoint) +{ + ConcreteAttributePath deviceDirectoryPath(kValidEndpointId, kEcosystemInfoClusterId, kDeviceDirectoryAttributeId); + ConcreteAttributePath locationDirectoryPath(kValidEndpointId, kEcosystemInfoClusterId, kLocationDirectoryAttributeId); + + ASSERT_EQ(EcoInfoCluster().AddEcosystemInformationClusterToEndpoint(kValidEndpointId), CHIP_NO_ERROR); + + Testing::ReadOperation testDeviceDirectoryRequest(deviceDirectoryPath); + std::unique_ptr deviceDirectoryEncoder = testDeviceDirectoryRequest.StartEncoding(); + ASSERT_EQ(EcoInfoCluster().ReadAttribute(deviceDirectoryPath, *deviceDirectoryEncoder), CHIP_NO_ERROR); + ASSERT_EQ(testDeviceDirectoryRequest.FinishEncoding(), CHIP_NO_ERROR); + std::vector deviceDirectoryAttributeData; + ASSERT_EQ(testDeviceDirectoryRequest.GetEncodedIBs().Decode(deviceDirectoryAttributeData), CHIP_NO_ERROR); + ASSERT_EQ(deviceDirectoryAttributeData.size(), 1u); + Testing::DecodedAttributeData & deviceDirectoryEncodedData = deviceDirectoryAttributeData[0]; + ASSERT_EQ(deviceDirectoryEncodedData.attributePath, testDeviceDirectoryRequest.GetRequest().path); + EcosystemInformation::Attributes::DeviceDirectory::TypeInfo::DecodableType decodableDeviceDirectory; + ASSERT_EQ(decodableDeviceDirectory.Decode(deviceDirectoryEncodedData.dataReader), CHIP_NO_ERROR); + size_t deviceDirectorySize = 0; + ASSERT_EQ(decodableDeviceDirectory.ComputeSize(&deviceDirectorySize), CHIP_NO_ERROR); + ASSERT_EQ(deviceDirectorySize, 0u); + + Testing::ReadOperation testLocationDirectoryRequest(locationDirectoryPath); + std::unique_ptr locationDirectoryEncoder = testLocationDirectoryRequest.StartEncoding(); + ASSERT_EQ(EcoInfoCluster().ReadAttribute(locationDirectoryPath, *locationDirectoryEncoder), CHIP_NO_ERROR); + ASSERT_EQ(testLocationDirectoryRequest.FinishEncoding(), CHIP_NO_ERROR); + std::vector locationDirectoryAttributeData; + ASSERT_EQ(testLocationDirectoryRequest.GetEncodedIBs().Decode(locationDirectoryAttributeData), CHIP_NO_ERROR); + ASSERT_EQ(locationDirectoryAttributeData.size(), 1u); + Testing::DecodedAttributeData & locationDirectoryEncodedData = locationDirectoryAttributeData[0]; + ASSERT_EQ(locationDirectoryEncodedData.attributePath, testLocationDirectoryRequest.GetRequest().path); + EcosystemInformation::Attributes::LocationDirectory::TypeInfo::DecodableType decodableLocationDirectory; + ASSERT_EQ(decodableLocationDirectory.Decode(locationDirectoryEncodedData.dataReader), CHIP_NO_ERROR); + size_t locationDirectorySize = 0; + ASSERT_EQ(decodableLocationDirectory.ComputeSize(&locationDirectorySize), CHIP_NO_ERROR); + ASSERT_EQ(locationDirectorySize, 0u); +} + +TEST_F(TestEcosystemInformationCluster, BuildingEcosystemDeviceStruct) +{ + EcosystemDeviceStruct::Builder deviceInfoBuilder; + std::unique_ptr deviceInfo = deviceInfoBuilder.Build(); + ASSERT_FALSE(deviceInfo); + + deviceInfoBuilder.SetOriginalEndpoint(1); + deviceInfo = deviceInfoBuilder.Build(); + ASSERT_FALSE(deviceInfo); + + auto deviceType = Structs::DeviceTypeStruct::Type(); + deviceType.revision = 1; + deviceInfoBuilder.AddDeviceType(deviceType); + deviceInfo = deviceInfoBuilder.Build(); + ASSERT_FALSE(deviceInfo); + + deviceInfoBuilder.SetFabricIndex(1); + deviceInfo = deviceInfoBuilder.Build(); + ASSERT_TRUE(deviceInfo); + + // Building a second device info with previously successfully built deviceInfoBuilder + // is expected to fail. + std::unique_ptr secondDeviceInfo = deviceInfoBuilder.Build(); + ASSERT_FALSE(secondDeviceInfo); +} + +TEST_F(TestEcosystemInformationCluster, BuildingInvalidEcosystemDeviceStruct) +{ + auto deviceType = Structs::DeviceTypeStruct::Type(); + deviceType.revision = 1; + const FabricIndex kFabricIndexTooLow = 0; + const FabricIndex kFabricIndexTooHigh = kMaxValidFabricIndex + 1; + + EcosystemDeviceStruct::Builder deviceInfoBuilder; + deviceInfoBuilder.SetOriginalEndpoint(1); + deviceInfoBuilder.AddDeviceType(deviceType); + deviceInfoBuilder.SetFabricIndex(kFabricIndexTooLow); + std::unique_ptr deviceInfo = deviceInfoBuilder.Build(); + ASSERT_FALSE(deviceInfo); + + deviceInfoBuilder.SetFabricIndex(kFabricIndexTooHigh); + deviceInfo = deviceInfoBuilder.Build(); + ASSERT_FALSE(deviceInfo); + + deviceInfoBuilder.SetFabricIndex(1); + // At this point deviceInfoBuilder would be able to be built successfully. + + std::string nameThatsTooLong(65, 'x'); + uint64_t nameEpochValueUs = 0; // This values doesn't matter. + deviceInfoBuilder.SetDeviceName(std::move(nameThatsTooLong), nameEpochValueUs); + deviceInfo = deviceInfoBuilder.Build(); + ASSERT_FALSE(deviceInfo); + + // Ending unit test by building something that should work just to make sure + // Builder isn't silently failing on building for some other reason. + std::string nameThatsMaxLength(64, 'x'); + deviceInfoBuilder.SetDeviceName(std::move(nameThatsMaxLength), nameEpochValueUs); + deviceInfo = deviceInfoBuilder.Build(); + ASSERT_TRUE(deviceInfo); +} + +TEST_F(TestEcosystemInformationCluster, AddDeviceInfoInvalidArguments) +{ + ASSERT_EQ(EcoInfoCluster().AddDeviceInfo(kValidEndpointId, nullptr), CHIP_ERROR_INVALID_ARGUMENT); + + std::unique_ptr deviceInfo = CreateSimplestValidDeviceStruct(); + ASSERT_TRUE(deviceInfo); + ASSERT_EQ(EcoInfoCluster().AddDeviceInfo(kRootEndpointId, std::move(deviceInfo)), CHIP_ERROR_INVALID_ARGUMENT); + + deviceInfo = CreateSimplestValidDeviceStruct(); + ASSERT_TRUE(deviceInfo); + ASSERT_EQ(EcoInfoCluster().AddDeviceInfo(kInvalidEndpointId, std::move(deviceInfo)), CHIP_ERROR_INVALID_ARGUMENT); +} + +TEST_F(TestEcosystemInformationCluster, AddDeviceInfo) +{ + std::unique_ptr deviceInfo = CreateSimplestValidDeviceStruct(); + // originalEndpoint and path endpoint do not need to be the same, for that reason we use a different value for + // path endpoint + static_assert(kAnotherValidEndpointId != kValidEndpointId); + ASSERT_EQ(EcoInfoCluster().AddDeviceInfo(kAnotherValidEndpointId, std::move(deviceInfo)), CHIP_NO_ERROR); + ConcreteAttributePath deviceDirectoryPath(kAnotherValidEndpointId, kEcosystemInfoClusterId, kDeviceDirectoryAttributeId); + Testing::ReadOperation testDeviceDirectoryRequest(deviceDirectoryPath); + testDeviceDirectoryRequest.SetSubjectDescriptor(kSubjectDescriptor); + std::unique_ptr deviceDirectoryEncoder = testDeviceDirectoryRequest.StartEncoding(); + + ASSERT_EQ(EcoInfoCluster().ReadAttribute(deviceDirectoryPath, *deviceDirectoryEncoder), CHIP_NO_ERROR); + ASSERT_EQ(testDeviceDirectoryRequest.FinishEncoding(), CHIP_NO_ERROR); + + std::vector attributeData; + ASSERT_EQ(testDeviceDirectoryRequest.GetEncodedIBs().Decode(attributeData), CHIP_NO_ERROR); + ASSERT_EQ(attributeData.size(), 1u); + Testing::DecodedAttributeData & encodedData = attributeData[0]; + ASSERT_EQ(encodedData.attributePath, testDeviceDirectoryRequest.GetRequest().path); + EcosystemInformation::Attributes::DeviceDirectory::TypeInfo::DecodableType decodableDeviceDirectory; + ASSERT_EQ(decodableDeviceDirectory.Decode(encodedData.dataReader), CHIP_NO_ERROR); + size_t size = 0; + ASSERT_EQ(decodableDeviceDirectory.ComputeSize(&size), CHIP_NO_ERROR); + ASSERT_EQ(size, 1u); + auto iterator = decodableDeviceDirectory.begin(); + ASSERT_TRUE(iterator.Next()); + auto deviceDirectoryEntry = iterator.GetValue(); + ASSERT_FALSE(deviceDirectoryEntry.deviceName.HasValue()); + ASSERT_FALSE(deviceDirectoryEntry.deviceNameLastEdit.HasValue()); + ASSERT_EQ(deviceDirectoryEntry.bridgedEndpoint, kInvalidEndpointId); + ASSERT_EQ(deviceDirectoryEntry.originalEndpoint, kValidEndpointId); + size_t deviceTypeListSize = 0; + ASSERT_EQ(deviceDirectoryEntry.deviceTypes.ComputeSize(&deviceTypeListSize), CHIP_NO_ERROR); + ASSERT_EQ(deviceTypeListSize, 1u); + auto deviceTypeIterator = deviceDirectoryEntry.deviceTypes.begin(); + ASSERT_TRUE(deviceTypeIterator.Next()); + auto deviceTypeEntry = deviceTypeIterator.GetValue(); + ASSERT_EQ(deviceTypeEntry.deviceType, 0u); + ASSERT_EQ(deviceTypeEntry.revision, 1); + ASSERT_FALSE(deviceTypeIterator.Next()); + size_t uniqueLocationIdListSize = 0; + ASSERT_EQ(deviceDirectoryEntry.uniqueLocationIDs.ComputeSize(&uniqueLocationIdListSize), CHIP_NO_ERROR); + ASSERT_EQ(uniqueLocationIdListSize, 0u); + ASSERT_EQ(deviceDirectoryEntry.uniqueLocationIDsLastEdit, 0u); + ASSERT_EQ(deviceDirectoryEntry.fabricIndex, kSubjectDescriptor.fabricIndex); + ASSERT_FALSE(iterator.Next()); +} + +TEST_F(TestEcosystemInformationCluster, AddDeviceInfoResultInMarkDirty) +{ + std::unique_ptr deviceInfo = CreateSimplestValidDeviceStruct(); + ASSERT_EQ(EcoInfoCluster().AddDeviceInfo(kValidEndpointId, std::move(deviceInfo)), CHIP_NO_ERROR); + + auto markedDirtyList = GetMockMatterContext().GetDirtyList(); + ASSERT_EQ(markedDirtyList.size(), 1u); + ConcreteAttributePath path = markedDirtyList[0]; + ASSERT_EQ(path.mEndpointId, kValidEndpointId); + ASSERT_EQ(path.mClusterId, kEcosystemInfoClusterId); + ASSERT_EQ(path.mAttributeId, kDeviceDirectoryAttributeId); +} + +TEST_F(TestEcosystemInformationCluster, BuildingEcosystemLocationStruct) +{ + EcosystemLocationStruct::Builder locationInfoBuilder; + + std::string validLocationName = "validName"; + locationInfoBuilder.SetLocationName(validLocationName); + + std::unique_ptr locationInfo = locationInfoBuilder.Build(); + ASSERT_TRUE(locationInfo); + + // Building a second device info with previously successfully built deviceInfoBuilder + // is expected to fail. + locationInfo = locationInfoBuilder.Build(); + ASSERT_FALSE(locationInfo); +} + +TEST_F(TestEcosystemInformationCluster, BuildingInvalidEcosystemLocationStruct) +{ + EcosystemLocationStruct::Builder locationInfoBuilder; + + std::string nameThatsTooLong(129, 'x'); + locationInfoBuilder.SetLocationName(nameThatsTooLong); + + std::unique_ptr locationInfo = locationInfoBuilder.Build(); + ASSERT_FALSE(locationInfo); + + // Ending unit test by building something that should work just to make sure + // Builder isn't silently failing on building for some other reason. + std::string nameThatsMaxLength(128, 'x'); + locationInfoBuilder.SetLocationName(nameThatsMaxLength); + locationInfo = locationInfoBuilder.Build(); + ASSERT_TRUE(locationInfo); +} + +TEST_F(TestEcosystemInformationCluster, AddLocationInfoInvalidArguments) +{ + const FabricIndex kFabricIndexTooLow = 0; + const FabricIndex kFabricIndexTooHigh = kMaxValidFabricIndex + 1; + const std::string kEmptyLocationIdStr; + const std::string kValidLocationIdStr = "SomeLocationString"; + const std::string kInvalidLocationIdTooLongStr(65, 'x'); + + std::unique_ptr locationInfo = CreateValidLocationStruct(); + ASSERT_TRUE(locationInfo); + ASSERT_EQ(EcoInfoCluster().AddLocationInfo(kInvalidEndpointId, kValidLocationIdStr, kValidFabricIndex, std::move(locationInfo)), + CHIP_ERROR_INVALID_ARGUMENT); + + locationInfo = CreateValidLocationStruct(); + ASSERT_TRUE(locationInfo); + ASSERT_EQ(EcoInfoCluster().AddLocationInfo(kRootEndpointId, kValidLocationIdStr, kValidFabricIndex, std::move(locationInfo)), + CHIP_ERROR_INVALID_ARGUMENT); + + locationInfo = CreateValidLocationStruct(); + ASSERT_TRUE(locationInfo); + ASSERT_EQ(EcoInfoCluster().AddLocationInfo(kValidEndpointId, kEmptyLocationIdStr, kValidFabricIndex, std::move(locationInfo)), + CHIP_ERROR_INVALID_ARGUMENT); + + locationInfo = CreateValidLocationStruct(); + ASSERT_TRUE(locationInfo); + ASSERT_EQ(EcoInfoCluster().AddLocationInfo(kValidEndpointId, kInvalidLocationIdTooLongStr, kValidFabricIndex, + std::move(locationInfo)), + CHIP_ERROR_INVALID_ARGUMENT); + + locationInfo = CreateValidLocationStruct(); + ASSERT_TRUE(locationInfo); + ASSERT_EQ(EcoInfoCluster().AddLocationInfo(kValidEndpointId, kValidLocationIdStr, kFabricIndexTooLow, std::move(locationInfo)), + CHIP_ERROR_INVALID_ARGUMENT); + + locationInfo = CreateValidLocationStruct(); + ASSERT_TRUE(locationInfo); + ASSERT_EQ(EcoInfoCluster().AddLocationInfo(kValidEndpointId, kValidLocationIdStr, kFabricIndexTooHigh, std::move(locationInfo)), + CHIP_ERROR_INVALID_ARGUMENT); + + // Sanity check that we can successfully add something after all the previously failed attempts + locationInfo = CreateValidLocationStruct(); + ASSERT_TRUE(locationInfo); + ASSERT_EQ(EcoInfoCluster().AddLocationInfo(kValidEndpointId, kValidLocationIdStr, kValidFabricIndex, std::move(locationInfo)), + CHIP_NO_ERROR); + + // Adding a second identical entry is expected to fail + locationInfo = CreateValidLocationStruct(); + ASSERT_TRUE(locationInfo); + ASSERT_EQ(EcoInfoCluster().AddLocationInfo(kValidEndpointId, kValidLocationIdStr, kValidFabricIndex, std::move(locationInfo)), + CHIP_ERROR_INVALID_ARGUMENT); +} + +TEST_F(TestEcosystemInformationCluster, AddLocationInfo) +{ + std::unique_ptr locationInfo = CreateValidLocationStruct(); + const char * kValidLocationIdStr = "SomeLocationIdString"; + ASSERT_EQ(EcoInfoCluster().AddLocationInfo(kValidEndpointId, kValidLocationIdStr, Testing::kAdminSubjectDescriptor.fabricIndex, + std::move(locationInfo)), + CHIP_NO_ERROR); + + ConcreteAttributePath locationDirectoryPath(kValidEndpointId, kEcosystemInfoClusterId, kLocationDirectoryAttributeId); + Testing::ReadOperation testLocationDirectoryRequest(locationDirectoryPath); + testLocationDirectoryRequest.SetSubjectDescriptor(Testing::kAdminSubjectDescriptor); + std::unique_ptr locationDirectoryEncoder = testLocationDirectoryRequest.StartEncoding(); + ASSERT_EQ(EcoInfoCluster().ReadAttribute(locationDirectoryPath, *locationDirectoryEncoder), CHIP_NO_ERROR); + ASSERT_EQ(testLocationDirectoryRequest.FinishEncoding(), CHIP_NO_ERROR); + + std::vector locationDirectoryAttributeData; + ASSERT_EQ(testLocationDirectoryRequest.GetEncodedIBs().Decode(locationDirectoryAttributeData), CHIP_NO_ERROR); + ASSERT_EQ(locationDirectoryAttributeData.size(), 1u); + Testing::DecodedAttributeData & locationDirectoryEncodedData = locationDirectoryAttributeData[0]; + ASSERT_EQ(locationDirectoryEncodedData.attributePath, testLocationDirectoryRequest.GetRequest().path); + EcosystemInformation::Attributes::LocationDirectory::TypeInfo::DecodableType decodableLocationDirectory; + ASSERT_EQ(decodableLocationDirectory.Decode(locationDirectoryEncodedData.dataReader), CHIP_NO_ERROR); + size_t locationDirectorySize = 0; + ASSERT_EQ(decodableLocationDirectory.ComputeSize(&locationDirectorySize), CHIP_NO_ERROR); + ASSERT_EQ(locationDirectorySize, 1u); + auto iterator = decodableLocationDirectory.begin(); + ASSERT_TRUE(iterator.Next()); + auto locationDirectoryEntry = iterator.GetValue(); + ASSERT_TRUE(locationDirectoryEntry.uniqueLocationID.data_equal(CharSpan::fromCharString(kValidLocationIdStr))); + ASSERT_TRUE(locationDirectoryEntry.locationDescriptor.locationName.data_equal(CharSpan::fromCharString(kValidLocationName))); + ASSERT_TRUE(locationDirectoryEntry.locationDescriptor.floorNumber.IsNull()); + ASSERT_TRUE(locationDirectoryEntry.locationDescriptor.areaType.IsNull()); + ASSERT_EQ(locationDirectoryEntry.locationDescriptorLastEdit, 0u); + ASSERT_EQ(locationDirectoryEntry.fabricIndex, Testing::kAdminSubjectDescriptor.fabricIndex); + ASSERT_FALSE(iterator.Next()); +} + +TEST_F(TestEcosystemInformationCluster, AddLocationInfoResultInMarkDirty) +{ + std::unique_ptr locationInfo = CreateValidLocationStruct(); + const char * kValidLocationIdStr = "SomeLocationIdString"; + ASSERT_EQ(EcoInfoCluster().AddLocationInfo(kValidEndpointId, kValidLocationIdStr, Testing::kAdminSubjectDescriptor.fabricIndex, + std::move(locationInfo)), + CHIP_NO_ERROR); + + auto markedDirtyList = GetMockMatterContext().GetDirtyList(); + ASSERT_EQ(markedDirtyList.size(), 1u); + ConcreteAttributePath path = markedDirtyList[0]; + ASSERT_EQ(path.mEndpointId, kValidEndpointId); + ASSERT_EQ(path.mClusterId, kEcosystemInfoClusterId); + ASSERT_EQ(path.mAttributeId, kLocationDirectoryAttributeId); +} + +} // namespace app +} // namespace chip diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index f8f192d92e..5baab570f6 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -343,6 +343,7 @@ class TestReadInteraction : public chip::Test::AppContext void TestReadClient(); void TestReadUnexpectedSubscriptionId(); void TestReadHandler(); + void TestReadHandlerSetMaxReportingInterval(); void TestReadClientGenerateAttributePathList(); void TestReadClientGenerateInvalidAttributePathList(); void TestReadClientInvalidReport(); @@ -568,6 +569,115 @@ TEST_F_FROM_FIXTURE(TestReadInteraction, TestReadHandler) EXPECT_EQ(GetExchangeManager().GetNumActiveExchanges(), 0u); } +TEST_F_FROM_FIXTURE(TestReadInteraction, TestReadHandlerSetMaxReportingInterval) +{ + System::PacketBufferTLVWriter writer; + System::PacketBufferHandle subscribeRequestbuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); + SubscribeRequestMessage::Builder subscribeRequestBuilder; + + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + EXPECT_EQ(engine->Init(&GetExchangeManager(), &GetFabricTable(), gReportScheduler), CHIP_NO_ERROR); + + uint16_t kIntervalInfMinInterval = 119; + uint16_t kMinInterval = 120; + uint16_t kMaxIntervalCeiling = 500; + + Messaging::ExchangeContext * exchangeCtx = NewExchangeToAlice(nullptr, false); + + { + + uint16_t minInterval; + uint16_t maxInterval; + + // Configure ReadHandler + ReadHandler readHandler(*engine, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, gReportScheduler, + CodegenDataModelProviderInstance()); + + writer.Init(std::move(subscribeRequestbuf)); + EXPECT_EQ(subscribeRequestBuilder.Init(&writer), CHIP_NO_ERROR); + + subscribeRequestBuilder.KeepSubscriptions(true); + EXPECT_EQ(subscribeRequestBuilder.GetError(), CHIP_NO_ERROR); + + subscribeRequestBuilder.MinIntervalFloorSeconds(kMinInterval); + EXPECT_EQ(subscribeRequestBuilder.GetError(), CHIP_NO_ERROR); + + subscribeRequestBuilder.MaxIntervalCeilingSeconds(kMaxIntervalCeiling); + EXPECT_EQ(subscribeRequestBuilder.GetError(), CHIP_NO_ERROR); + + AttributePathIBs::Builder & attributePathListBuilder = subscribeRequestBuilder.CreateAttributeRequests(); + EXPECT_EQ(attributePathListBuilder.GetError(), CHIP_NO_ERROR); + + AttributePathIB::Builder & attributePathBuilder = attributePathListBuilder.CreatePath(); + EXPECT_EQ(attributePathListBuilder.GetError(), CHIP_NO_ERROR); + + attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).ListIndex(5).EndOfAttributePathIB(); + EXPECT_EQ(attributePathBuilder.GetError(), CHIP_NO_ERROR); + + attributePathListBuilder.EndOfAttributePathIBs(); + EXPECT_EQ(attributePathListBuilder.GetError(), CHIP_NO_ERROR); + + subscribeRequestBuilder.IsFabricFiltered(false).EndOfSubscribeRequestMessage(); + EXPECT_EQ(subscribeRequestBuilder.GetError(), CHIP_NO_ERROR); + + EXPECT_EQ(subscribeRequestBuilder.GetError(), CHIP_NO_ERROR); + EXPECT_EQ(writer.Finalize(&subscribeRequestbuf), CHIP_NO_ERROR); + + EXPECT_EQ(readHandler.ProcessSubscribeRequest(std::move(subscribeRequestbuf)), CHIP_NO_ERROR); + +#if CHIP_CONFIG_ENABLE_ICD_SERVER + // When an ICD build, the default behavior is to select the IdleModeDuration as MaxInterval + kMaxIntervalCeiling = readHandler.GetPublisherSelectedIntervalLimit(); +#endif + // Try to change the MaxInterval while ReadHandler is active + EXPECT_EQ(readHandler.SetMaxReportingInterval(340), CHIP_ERROR_INCORRECT_STATE); + + readHandler.GetReportingIntervals(minInterval, maxInterval); + EXPECT_EQ(kMaxIntervalCeiling, maxInterval); + // Set ReadHandler to Idle to allow MaxInterval changes + readHandler.MoveToState(ReadHandler::HandlerState::Idle); + + // TC1: MaxInterval < MinIntervalFloor + EXPECT_EQ(readHandler.SetMaxReportingInterval(kIntervalInfMinInterval), CHIP_ERROR_INVALID_ARGUMENT); + + readHandler.GetReportingIntervals(minInterval, maxInterval); + EXPECT_EQ(kMaxIntervalCeiling, maxInterval); + + // TC2: MaxInterval == MinIntervalFloor + EXPECT_EQ(readHandler.SetMaxReportingInterval(kMinInterval), CHIP_NO_ERROR); + + readHandler.GetReportingIntervals(minInterval, maxInterval); + EXPECT_EQ(kMinInterval, maxInterval); + + // TC3: Minterval < MaxInterval < max(GetPublisherSelectedIntervalLimit(), mSubscriberRequestedMaxInterval) + EXPECT_EQ(readHandler.SetMaxReportingInterval(kMaxIntervalCeiling), CHIP_NO_ERROR); + + readHandler.GetReportingIntervals(minInterval, maxInterval); + EXPECT_EQ(kMaxIntervalCeiling, maxInterval); + + // TC4: MaxInterval == Subscriber Requested Max Interval + EXPECT_EQ(readHandler.SetMaxReportingInterval(readHandler.GetSubscriberRequestedMaxInterval()), CHIP_NO_ERROR); + + readHandler.GetReportingIntervals(minInterval, maxInterval); + EXPECT_EQ(readHandler.GetSubscriberRequestedMaxInterval(), maxInterval); + + // TC4: MaxInterval == GetPublisherSelectedIntervalLimit() + EXPECT_EQ(readHandler.SetMaxReportingInterval(readHandler.GetPublisherSelectedIntervalLimit()), CHIP_NO_ERROR); + + readHandler.GetReportingIntervals(minInterval, maxInterval); + EXPECT_EQ(readHandler.GetPublisherSelectedIntervalLimit(), maxInterval); + + // TC5: MaxInterval > max(GetPublisherSelectedIntervalLimit(), mSubscriberRequestedMaxInterval) + EXPECT_EQ(readHandler.SetMaxReportingInterval(std::numeric_limits::max()), CHIP_ERROR_INVALID_ARGUMENT); + + readHandler.GetReportingIntervals(minInterval, maxInterval); + EXPECT_EQ(readHandler.GetPublisherSelectedIntervalLimit(), maxInterval); + } + + engine->Shutdown(); + EXPECT_EQ(GetExchangeManager().GetNumActiveExchanges(), 0u); +} + TEST_F_FROM_FIXTURE(TestReadInteraction, TestReadClientGenerateAttributePathList) { MockInteractionModelApp delegate; @@ -1517,6 +1627,7 @@ TEST_F_FROM_FIXTURE(TestReadInteraction, TestICDProcessSubscribeRequestSupMaxInt EXPECT_EQ(minInterval, kMinInterval); EXPECT_EQ(maxInterval, idleModeDuration); + EXPECT_EQ(kMaxIntervalCeiling, readHandler.GetSubscriberRequestedMaxInterval()); } engine->Shutdown(); @@ -1584,6 +1695,7 @@ TEST_F_FROM_FIXTURE(TestReadInteraction, TestICDProcessSubscribeRequestInfMaxInt EXPECT_EQ(minInterval, kMinInterval); EXPECT_EQ(maxInterval, idleModeDuration); + EXPECT_EQ(kMaxIntervalCeiling, readHandler.GetSubscriberRequestedMaxInterval()); } engine->Shutdown(); @@ -1651,6 +1763,7 @@ TEST_F_FROM_FIXTURE(TestReadInteraction, TestICDProcessSubscribeRequestSupMinInt EXPECT_EQ(minInterval, kMinInterval); EXPECT_EQ(maxInterval, (2 * idleModeDuration)); + EXPECT_EQ(kMaxIntervalCeiling, readHandler.GetSubscriberRequestedMaxInterval()); } engine->Shutdown(); @@ -1716,6 +1829,7 @@ TEST_F_FROM_FIXTURE(TestReadInteraction, TestICDProcessSubscribeRequestMaxMinInt EXPECT_EQ(minInterval, kMinInterval); EXPECT_EQ(maxInterval, kMaxIntervalCeiling); + EXPECT_EQ(kMaxIntervalCeiling, readHandler.GetSubscriberRequestedMaxInterval()); } engine->Shutdown(); @@ -1781,6 +1895,7 @@ TEST_F_FROM_FIXTURE(TestReadInteraction, TestICDProcessSubscribeRequestInvalidId EXPECT_EQ(minInterval, kMinInterval); EXPECT_EQ(maxInterval, kMaxIntervalCeiling); + EXPECT_EQ(kMaxIntervalCeiling, readHandler.GetSubscriberRequestedMaxInterval()); } engine->Shutdown(); @@ -1959,6 +2074,7 @@ TEST_F_FROM_FIXTURE(TestReadInteraction, TestSubscribeRoundtrip) uint16_t minInterval; uint16_t maxInterval; delegate.mpReadHandler->GetReportingIntervals(minInterval, maxInterval); + EXPECT_EQ(readPrepareParams.mMaxIntervalCeilingSeconds, delegate.mpReadHandler->GetSubscriberRequestedMaxInterval()); // Test empty report // Advance monotonic timestamp for min interval to elapse @@ -2028,6 +2144,7 @@ TEST_F_FROM_FIXTURE(TestReadInteraction, TestSubscribeEarlyReport) uint16_t minInterval; uint16_t maxInterval; delegate.mpReadHandler->GetReportingIntervals(minInterval, maxInterval); + EXPECT_EQ(readPrepareParams.mMaxIntervalCeilingSeconds, delegate.mpReadHandler->GetSubscriberRequestedMaxInterval()); EXPECT_EQ(engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Subscribe), 1u); @@ -2760,6 +2877,7 @@ TEST_F_FROM_FIXTURE(TestReadInteraction, TestSubscribeInvalidAttributePathRoundt uint16_t minInterval; uint16_t maxInterval; delegate.mpReadHandler->GetReportingIntervals(minInterval, maxInterval); + EXPECT_EQ(readPrepareParams.mMaxIntervalCeilingSeconds, delegate.mpReadHandler->GetSubscriberRequestedMaxInterval()); // Advance monotonic timestamp for min interval to elapse gMockClock.AdvanceMonotonic(System::Clock::Seconds16(maxInterval)); diff --git a/src/app/tests/suites/TestScenesFabricSceneInfo.yaml b/src/app/tests/suites/TestScenesFabricSceneInfo.yaml index ba83953588..2d4a09c07e 100644 --- a/src/app/tests/suites/TestScenesFabricSceneInfo.yaml +++ b/src/app/tests/suites/TestScenesFabricSceneInfo.yaml @@ -253,6 +253,11 @@ tests: }, ], }, + { + ClusterID: 0x0050, + AttributeValueList: + [{ AttributeID: 0x0003, ValueUnsigned8: 0x01 }], + }, ] response: values: @@ -349,6 +354,11 @@ tests: }, ], }, + { + ClusterID: 0x0050, + AttributeValueList: + [{ AttributeID: 0x0003, ValueUnsigned8: 0x01 }], + }, ] - label: "Read the FabricSceneInfo attribute (0x0007) " diff --git a/src/app/tests/suites/TestThermostat.yaml b/src/app/tests/suites/TestThermostat.yaml new file mode 100644 index 0000000000..70307db442 --- /dev/null +++ b/src/app/tests/suites/TestThermostat.yaml @@ -0,0 +1,91 @@ +# Copyright (c) 2024 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: Thermostat basic functionality tests + +config: + nodeId: 0x12344321 + cluster: "Thermostat" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Read current SystemMode value" + command: "readAttribute" + attribute: "SystemMode" + response: + saveAs: originalSystemMode + + - label: "Try to set SystemMode to Sleep" + command: "writeAttribute" + attribute: "SystemMode" + arguments: + value: SystemModeEnum.Sleep + + - label: "Check that the new value is set now" + command: "readAttribute" + attribute: "SystemMode" + response: + value: SystemModeEnum.Sleep + + - label: "Try to set SystemMode to an invalid value" + # Have to use WriteById, because normal write enforces valid values for enums. + cluster: "AnyCommands" + command: "WriteById" + attribute: "SystemMode" + arguments: + values: + - name: "ClusterId" + value: 0x0201 # Thermostat + - name: "AttributeId" + value: 0x001C # SystemMode + - name: "Value" + # Note: At some point this might become a valid value, + # and then this test will need to be adjusted, but that + # seems fairly low-probability. + value: 254 + response: + error: CONSTRAINT_ERROR + + - label: "Verify that WriteById would work correctly with a valid value" + cluster: "AnyCommands" + command: "WriteById" + attribute: "SystemMode" + arguments: + values: + - name: "ClusterId" + value: 0x0201 # Thermostat + - name: "AttributeId" + value: 0x001C # SystemMode + - name: "Value" + value: 8 # SystemModeEnum.Dry + + - label: "Check that the new value is set by id" + command: "readAttribute" + attribute: "SystemMode" + response: + value: SystemModeEnum.Dry + + - label: "reset SystemMode to original value" + command: "writeAttribute" + attribute: "SystemMode" + arguments: + value: originalSystemMode diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index 32ea708bd8..e211192595 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -339,6 +339,13 @@ PICS: "Does commissionee provide a Firmware Information field in the AttestationResponse?" id: MCORE.DA.ATTESTELEMENT_FW_INFO + + # + # Fabric Synchronization + # + - label: "Does the device implement Fabric Synchronization capabilities?" + id: MCORE.FS + # #IDM # diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml deleted file mode 100644 index 26503486dd..0000000000 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml +++ /dev/null @@ -1,377 +0,0 @@ -# Copyright (c) 2021 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 4.1.11. [TC-CADMIN-1.11] Open commissioning window on DUT twice using ECM - then BCM [DUT - Commissionee] - -PICS: - - CADMIN.S - - CADMIN.S.F00 - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Precondition" - verification: | - Reset Devices to factory defaults - disabled: true - - - label: "Step 1: TH_CR1 starts a commissioning process with DUT_CE" - PICS: CADMIN.S - verification: | - "1. Provision the DUT_CE (all-cluster-app) device using TH_CR1 (chip-tool ) on the raspi" - disabled: true - - - label: - "Step 2: TH_CR1 opens a commissioning window on DUT_CE using a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.S.C00.Rsp - verification: | - On TH_CR1 send the below command - - ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 - - Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: - - [1660904553.796857][3537:3537] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 - [1660904553.796951][3537:3537] CHIP:ZCL: Received command to open commissioning window - [1660904553.797255][3537:3537] CHIP:IN: SecureSession[0xaaab142ef7f0]: Allocated Type:1 LSID:34523 - - Verify the Manual pairing code on the TH_CR1(chip-tool) Log: - - [1635864513.699433][3850:3855] CHIP:DMG: ICR moving to [CommandSen] - [1635864513.699489][3850:3855] CHIP:CTL: Manual pairing code: [36177160937] - [1635864513.699566][3850:3855] CHIP:CTL: SetupQRCode: [MT:00000CQM00YZN476420] - [1635864513.699636][3850:3855] CHIP:EM: Sending Standalone Ack for MessageCounter:2599714227 on exchange 60688i - [1635864513.699685][3850:3855] CHIP:IN: Prepared plaintext message 0xffff8a7cd960 to 0x0000000000000000 of type - disabled: true - - - label: "Step 3: DNS-SD records shows DUT_CE advertising" - verification: | - On TH_CR1 send the below command - - avahi-browse -rt _matterc._udp - + wlp5s0 IPv6 C326228BDB082BF4 _matterc._udp local - + wlp5s0 IPv6 7B6545A75C5330BE _matterc._udp local - = wlp5s0 IPv6 7B6545A75C5330BE _matterc._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2755] - port = [5540] - txt = ["PI=" "PH=33" "CM=1" "D=3841" "T=1" "CRA=300" "CRI=5000" "VP=65521+32769"] - = wlp5s0 IPv6 C326228BDB082BF4 _matterc._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2755] - port = [5540] - txt = ["PI=" "PH=36" "CM=2" "D=3840" "T=1" "CRA=300" "CRI=5000" "VP=65521+32769"] - grl@grl-ThinkPad-L480:~/2nd_cntrl/connectedhomeip/examples/chip-tool/out/debug$ On TH_CR1 send the below command - disabled: true - - - label: "Step 4: TH_CR3 Commissions with DUT_CE" - PICS: CADMIN.S - verification: | - On TH_CR3 send the below command - - ./chip-tool pairing code 3 35484132896 --commissioner-name gamma - - Verify you got below message TH_CR3(chip-tool) log - Device commissioning completed with success - disabled: true - - - label: - "Step 5: TH_CR1 opens a commissioning window on DUT_CE using a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM and - TH_CR2 Commissions with DUT_CE" - PICS: CADMIN.S.C00.Rsp - verification: | - On TH_CR1 send the below command - - ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 - - Verify Manual pairing code on TH1(chip-tool) Log - - 0x0000000000000001 at monotonic time: 16129075 msec - [1635874557.417449][4549:4554] CHIP:DMG: ICR moving to [CommandSen] - [1635874557.417505][4549:4554] CHIP:CTL: Manual pairing code: [35484132896] - [1635874557.417577][4549:4554] CHIP:CTL: SetupQRCode: [MT:00000CQM00AT-F5A510] - - On TH_CR2 send the below command - - ./chip-tool pairing code 2 35484132896 --commissioner-name beta - - Verify you got below message on TH_CR2(chip-tool) log - Device commissioning completed with success - disabled: true - - - label: - "Step 6: TH_CR1 opens a commissioning window on DUT_CE using a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.S.C00.Rsp - verification: | - On TH_CR1 send the below command - - ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 - - Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: - - [1660904553.796857][3537:3537] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 - [1660904553.796951][3537:3537] CHIP:ZCL: Received command to open commissioning window - [1660904553.797255][3537:3537] CHIP:IN: SecureSession[0xaaab142ef7f0]: Allocated Type:1 LSID:34523 - - Verify the Manual pairing code on the TH_CR1(chip-tool) Log: - - [1635874557.417271][4549:4554] CHIP:IN: Sending encrypted msg 0xaaaac5947d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 16129075 msec - [1635874557.417449][4549:4554] CHIP:DMG: ICR moving to [CommandSen] - [1635874557.417505][4549:4554] CHIP:CTL: Manual pairing code: [35484132896] - [1635874557.417577][4549:4554] CHIP:CTL: SetupQRCode: [MT:00000CQM00AT-F5A510] - disabled: true - - - label: - "Step 7: Before the expiration of PIXIT.CADMIN.CwDuration seconds - which was set in step 5, TH_CR1 opens a 2nd commissioning window on - DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration - seconds using ECM" - PICS: CADMIN.S.C00.Rsp - verification: | - On TH_CR1 send the below command - - Verify that the DUT_CE is rejecting the opening of second commissioning session with the response status 0x01 failure - - - ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 - - Verify cluster status 1 on TH_CR1(chip-tool) Log - - - [1650527291.952431][8566:8571] CHIP:DMG: - [1650527291.952458][8566:8571] CHIP:DMG: StatusIB = - [1650527291.952488][8566:8571] CHIP:DMG: { - [1650527291.952519][8566:8571] CHIP:DMG: status = 0x01 (FAILURE), - [1650527291.952555][8566:8571] CHIP:DMG: cluster-status = 0x2, - [1650527291.952578][8566:8571] CHIP:DMG: }, - [1650527291.952612][8566:8571] CHIP:DMG: - [1650527291.952634][8566:8571] CHIP:DMG: }, - disabled: true - - - label: "Step 8: TH_CR1 reads the list of Fabrics on DUT_CE" - PICS: OPCREDS.S.A0001 - verification: | - On TH_CR1 send the below command - - ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 - - Verify the list of Fabrics consists of FabricIndex 1, FabricIndex 2, FabricIndex 3 on TH_CR1(chip-tool) log - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 268962768 - [1650527361.425870][15792:15797] CHIP:TOO: Fabrics: 3 entries - [1650527361.426777][15792:15797] CHIP:TOO: [1]: { - [1650527361.426859][15792:15797] CHIP:TOO: RootPublicKey: 0429A71383F336D80918C9EC655112513E428C073AF7FB44820EC793535302C6E3825C56EE6DD1A683EAA7B59E3F261B46FFA24A6D911E8D88839F4C1B3C84BA01 - [1650527361.426923][15792:15797] CHIP:TOO: VendorId: 65521 - [1650527361.426979][15792:15797] CHIP:TOO: FabricId: 1 - [1650527361.427033][15792:15797] CHIP:TOO: NodeId: 1 - [1650527361.427088][15792:15797] CHIP:TOO: Label: - [1650527361.427166][15792:15797] CHIP:TOO: FabricIndex: 1 - [1650527361.427376][15792:15797] CHIP:TOO: } - [1650527361.427464][15792:15797] CHIP:TOO: [2]: { - [1650527361.427532][15792:15797] CHIP:TOO: RootPublicKey: 04781BCEE70118049ED61DD5B4E401CF1A09D2F78AE7F5770BE5506AD24238E5E0777277DABAFD062659651C95CC2CA7DEAACE40DB579A946CC07CADB141BE05D7 - [1650527361.427595][15792:15797] CHIP:TOO: VendorId: 65521 - [1650527361.427649][15792:15797] CHIP:TOO: FabricId: 1 - [1650527361.427703][15792:15797] CHIP:TOO: NodeId: 3 - [1650527361.427756][15792:15797] CHIP:TOO: Label: - [1650527361.427811][15792:15797] CHIP:TOO: FabricIndex: 2 - [1650527361.427868][15792:15797] CHIP:TOO: } - [1650527361.427943][15792:15797] CHIP:TOO: [3]: { - [1650527361.428008][15792:15797] CHIP:TOO: RootPublicKey: 0403EDB5B461030A34EF7EA2F9DB0D46A36185E4755C365AF9344C4959F049EF21D55EAB903A2C7FBFC305EEFA42989250D7517A73E6156062390A60C0D4C41EBD - [1650527361.428067][15792:15797] CHIP:TOO: VendorId: 65521 - [1650527361.428122][15792:15797] CHIP:TOO: FabricId: 1 - [1650527361.428176][15792:15797] CHIP:TOO: NodeId: 2 - [1650527361.428229][15792:15797] CHIP:TOO: Label: - [1650527361.428282][15792:15797] CHIP:TOO: FabricIndex: 3 - [1650527361.428335][15792:15797] CHIP:TOO: } - disabled: true - - - label: - "Step 9: Wait for the expiration of PIXIT.CADMIN.CwDuration seconds - that was set in step 6" - verification: | - Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 6 - disabled: true - - - label: - "Step 10: TH_CR1 re-opens a commissioning window on DUT_CE using a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" - PICS: CADMIN.S.C01.Rsp - verification: | - On TH_CR1 send the below command - - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 - - Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: - - [1660904553.796857][3537:3537] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 - [1660904553.796951][3537:3537] CHIP:ZCL: Received command to open commissioning window - [1660904553.797255][3537:3537] CHIP:IN: SecureSession[0xaaab142ef7f0]: Allocated Type:1 LSID:34523 - - Verify the Manual pairing code on the TH_CR1(chip-tool) Log: - - [1650278416.249347][11064:11069] CHIP:DMG: }, - [1650278416.249430][11064:11069] CHIP:DMG: - [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = - [1650278416.249581][11064:11069] CHIP:DMG: { - [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), - [1650278416.249738][11064:11069] CHIP:DMG: }, - [1650278416.249823][11064:11069] CHIP:DMG: - disabled: true - - - label: "Step 11: DNS-SD records shows DUT_CE advertising" - verification: | - On TH_CR1 send the below command - avahi-browse -rt _matterc._udp - + eth0 IPv6 2664ED6939FC373C _matterc._udp local - = eth0 IPv6 2664ED6939FC373C _matterc._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2753] - port = [5540] - txt = ["PI=" "PH=36" "CM=1" "D=3840" "T=1" "SAI=300" "SII=5000" "VP=65521+32769"] - ubuntu@ubuntu:~/may16_cntrl/connectedhomeip/examples/chip-tool/out/debug$ - disabled: true - - - label: - "Step 12: Before the expiration of PIXIT.CADMIN.CwDuration seconds - that was set in step 10, TH_CR3 opens a 2nd commissioning window on - DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration - seconds using BCM" - PICS: CADMIN.S.C01.Rsp - verification: | - On TH_CR3 send the below command - - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 3 0 --timedInteractionTimeoutMs 1000 --commissioner-name gamma - - Verify that the DUT_CE is rejecting the opening of second commissioning session with the response status 0x01 failure - - - - [1650527565.991042][24618:24623] CHIP:DMG: { - [1650527565.991112][24618:24623] CHIP:DMG: EndpointId = 0x0, - [1650527565.991186][24618:24623] CHIP:DMG: ClusterId = 0x3c, - [1650527565.991257][24618:24623] CHIP:DMG: CommandId = 0x1, - [1650527565.991332][24618:24623] CHIP:DMG: }, - [1650527565.991441][24618:24623] CHIP:DMG: - [1650527565.991505][24618:24623] CHIP:DMG: StatusIB = - [1650527565.991574][24618:24623] CHIP:DMG: { - [1650527565.991645][24618:24623] CHIP:DMG: status = 0x01 (FAILURE), - [1650527565.991743][24618:24623] CHIP:DMG: cluster-status = 0x2, - [1650527565.991830][24618:24623] CHIP:DMG: }, - [1650527565.991918][24618:24623] CHIP:DMG: - [1650527565.991976][24618:24623] CHIP:DMG: }, - [1650527565.992061][24618:24623] CHIP:DMG: - [1650527565.992116][24618:24623] CHIP:DMG: }, - disabled: true - - - label: - "Step 13: Wait for the expiration of PIXIT.CADMIN.CwDuration seconds - that was set in step 11" - verification: | - Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 10 - disabled: true - - - label: "Step 14: TH_CR1 reads the list of Fabrics on DUT_CE" - PICS: OPCREDS.S.A0001 - verification: | - On TH_CR1 send the below command - - ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 - - Verify the list of Fabrics consists of FabricIndex 1, FabricIndex 2, FabricIndex 3 on TH_CR1(chip-tool) log - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 268962768 - [1678866402.096093][704851:704853] CHIP:TOO: Fabrics: 3 entries - [1678866402.096119][704851:704853] CHIP:TOO: [1]: { - [1678866402.096131][704851:704853] CHIP:TOO: RootPublicKey: 045F808373B5CED7FC2AFF99D98C2DEE6CA3889A9B078E87DAD9E263C9DEDB47AD7D31703024B72F4CB68A3017963128748FC7E97C6CBB419AF8AA914CE67D7457 - [1678866402.096141][704851:704853] CHIP:TOO: VendorID: 65521 - [1678866402.096147][704851:704853] CHIP:TOO: FabricID: 1 - [1678866402.096154][704851:704853] CHIP:TOO: NodeID: 1 - [1678866402.096160][704851:704853] CHIP:TOO: Label: - [1678866402.096167][704851:704853] CHIP:TOO: FabricIndex: 1 - [1678866402.096173][704851:704853] CHIP:TOO: } - [1678866402.096185][704851:704853] CHIP:TOO: [2]: { - [1678866402.096194][704851:704853] CHIP:TOO: RootPublicKey: 0458F2B4AD99F579EC01AA271EFDDF14526CE5222BADE218C703902544430F32FA9B951963C6C03713AC63E2D95785CFCD997946098957C4F5844BD2B3916B7148 - [1678866402.096201][704851:704853] CHIP:TOO: VendorID: 65521 - [1678866402.096207][704851:704853] CHIP:TOO: FabricID: 3 - [1678866402.096213][704851:704853] CHIP:TOO: NodeID: 3 - [1678866402.096219][704851:704853] CHIP:TOO: Label: - [1678866402.096224][704851:704853] CHIP:TOO: FabricIndex: 2 - [1678866402.096230][704851:704853] CHIP:TOO: } - [1678866402.096241][704851:704853] CHIP:TOO: [3]: { - [1678866402.096250][704851:704853] CHIP:TOO: RootPublicKey: 04CE10BA136D610089C4810BF963C354CE93BA61D267E8B9594977E3CC5FF30741941CE3D2A0A9E62A66AEF02CAA9F25A614F033D304D9F2ACF4204FAB68E8F773 - [1678866402.096257][704851:704853] CHIP:TOO: VendorID: 65521 - [1678866402.096263][704851:704853] CHIP:TOO: FabricID: 2 - [1678866402.096269][704851:704853] CHIP:TOO: NodeID: 2 - [1678866402.096274][704851:704853] CHIP:TOO: Label: - [1678866402.096280][704851:704853] CHIP:TOO: FabricIndex: 3 - [1678866402.096286][704851:704853] CHIP:TOO: } - disabled: true - - - label: - "Step 15: TH_CR1 opens a commissioning window on DUT_CE using a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" - PICS: CADMIN.S.C01.Rsp - verification: | - On TH_CR1 send the below command - - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 - - Verify success response On TH_CR1(chip-tool) Log - - [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, - [1650278416.249347][11064:11069] CHIP:DMG: }, - [1650278416.249430][11064:11069] CHIP:DMG: - [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = - [1650278416.249581][11064:11069] CHIP:DMG: { - [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), - [1650278416.249738][11064:11069] CHIP:DMG: }, - [1650278416.249823][11064:11069] CHIP:DMG: - disabled: true - - - label: - "Step 16: Before the expiration of PIXIT.CADMIN.CwDuration seconds - that was set in step 14, TH_CR2 opens a second commissioning window on - DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration - seconds using BCM" - PICS: CADMIN.S.C01.Rsp - verification: | - On TH_CR2 send the below command - - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta - - - Verify that the DUT_CE is rejecting the opening of second commissioning session with the response status 0x01 failure - - - - [1650527622.374682][15824:15829] CHIP:DMG: }, - [1650527622.374799][15824:15829] CHIP:DMG: - [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = - [1650527622.374979][15824:15829] CHIP:DMG: { - [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), - [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x2, - [1650527622.375320][15824:15829] CHIP:DMG: }, - [1650527622.375426][15824:15829] CHIP:DMG: - [1650527622.375527][15824:15829] CHIP:DMG: }, - [1650527622.375616][15824:15829] CHIP:DMG: - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml deleted file mode 100644 index 963156554c..0000000000 --- a/src/app/tests/suites/certification/Test_TC_CDOCONC_1_1.yaml +++ /dev/null @@ -1,336 +0,0 @@ -# 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: 145.1.1. [TC-CDOCONC-1.1] Global Attributes with DUT as Server - -PICS: - - CDOCONC.S - -config: - nodeId: 0x12344321 - cluster: "Carbon Dioxide Concentration Measurement" - endpoint: 1 - -tests: - - label: "Step 1: Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: Read the global attribute: ClusterRevision" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 3 - constraints: - type: int16u - - - label: - "Step 3a: Read the global attribute: FeatureMap and check for either - bit 0 or 1 set" - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x03] - - - label: - "Step 3b: Given CDOCONC.S.F00(MEA) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: CDOCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x1] - - - label: - "Step 3c: Given CDOCONC.S.F00(MEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !CDOCONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x1] - - - label: - "Step 3d: Given CDOCONC.S.F01(LEV) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: CDOCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2] - - - label: - "Step 3e: Given CDOCONC.S.F01(LEV) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !CDOCONC.S.F01 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x2] - - - label: - "Step 3f: Given CDOCONC.S.F02(MED) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: CDOCONC.S.F02 && CDOCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x4, 0x2] - - - label: - "Step 3g: Given CDOCONC.S.F02(MED) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !CDOCONC.S.F02 && !CDOCONC.S.F01" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x4, 0x2] - - - label: - "Step 3h: Given CDOCONC.S.F03(CRI) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: CDOCONC.S.F03 && CDOCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x8, 0x2] - - - label: - "Step 3i: Given CDOCONC.S.F03(CRI) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !CDOCONC.S.F03 && !CDOCONC.S.F01" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x8, 0x2] - - - label: - "Step 3j: Given CDOCONC.S.F04(PEA) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: CDOCONC.S.F04 && CDOCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x10, 0x1] - - - label: - "Step 3k: Given CDOCONC.S.F04(PEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !CDOCONC.S.F04 && !CDOCONC.S.F00" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x10, 0x1] - - - label: - "Step 3l: Given CDOCONC.S.F05(AVG) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: CDOCONC.S.F05 && CDOCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x20, 0x1] - - - label: - "Step 3m: Given CDOCONC.S.F05(AVG) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !CDOCONC.S.F05 && !CDOCONC.S.F00" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x20, 0x1] - - - label: "Step 4a: Read the global attribute: AttributeList" - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] - - - label: "Step 4a: Read the global attribute: AttributeList" - PICS: " !PICS_EVENT_LIST_ENABLED " - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [9, 65528, 65529, 65531, 65532, 65533] - - - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: CDOCONC.S.A0007 && CDOCONC.S.F00 - response: - constraints: - type: list - contains: [7] - - - label: - "Step 4c: Check the optional attribute Uncertainty is excluded from - AttributeList when CDOCONC.S.A0007 is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !CDOCONC.S.A0007 " - response: - constraints: - type: list - excludes: [7] - - - label: - "Step 4d: Read the optional, feature dependent attributes - MeasuredValue, MinMeasuredValue, MaxMeasuredValue and Measurement Unit - in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: CDOCONC.S.F00 - response: - constraints: - type: list - contains: [0, 1, 2, 8] - - - label: - "Step 4e: Check that MeasuredValue, MinMeasuredValue, - MaxMeasuredValue, Measurement Unit and Uncertainty are excluded from - AttributeList when CDOCONC.S.F00 (MEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !CDOCONC.S.F00 " - response: - constraints: - type: list - excludes: [0, 1, 2, 7, 8] - - - label: - "Step 4f: Read the optional, feature dependent attributes - PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: CDOCONC.S.F04 - response: - constraints: - type: list - contains: [3, 4] - - - label: - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are - excluded from AttributeList when CDOCONC.S.F04 (PEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !CDOCONC.S.F04 " - response: - constraints: - type: list - excludes: [3, 4] - - - label: - "Step 4h: Read the optional, feature dependent attributes - AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: CDOCONC.S.F05 - response: - constraints: - type: list - contains: [5, 6] - - - label: - "Step 4i: Check that AverageMeasuredValue and - AverageMeasuredValueWindow are excluded from AttributeList when - CDOCONC.S.F05 (AVG) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !CDOCONC.S.F05 " - response: - constraints: - type: list - excludes: [5, 6] - - - label: - "Step 4j: Read the optional, feature dependent attribute LevelValue in - AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: CDOCONC.S.F01 - response: - constraints: - type: list - contains: [10] - - - label: - "Step 4k: Check that LevelValue is excluded from AttributeList when - CDOCONC.S.F01 (LEV) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !CDOCONC.S.F01 " - response: - constraints: - type: list - excludes: [10] - - - label: "Step 5: Read the global attribute: EventList" - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "EventList" - response: - value: [] - constraints: - type: list - - - label: "Step 6: Read the global attribute: AcceptedCommandList" - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [] - constraints: - type: list - - - label: "Step 7: Read the global attribute: GeneratedCommandList" - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list diff --git a/src/app/tests/suites/certification/Test_TC_CMOCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CMOCONC_1_1.yaml deleted file mode 100644 index dfa949e6ff..0000000000 --- a/src/app/tests/suites/certification/Test_TC_CMOCONC_1_1.yaml +++ /dev/null @@ -1,336 +0,0 @@ -# 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: 145.1.1. [TC-CMOCONC-1.1] Global Attributes with DUT as Server - -PICS: - - CMOCONC.S - -config: - nodeId: 0x12344321 - cluster: "Carbon Monoxide Concentration Measurement" - endpoint: 1 - -tests: - - label: "Step 1: Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: Read the global attribute: ClusterRevision" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 3 - constraints: - type: int16u - - - label: - "Step 3a: Read the global attribute: FeatureMap and check for either - bit 0 or 1 set" - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x03] - - - label: - "Step 3b: Given CMOCONC.S.F00(MEA) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: CMOCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x1] - - - label: - "Step 3c: Given CMOCONC.S.F00(MEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !CMOCONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x1] - - - label: - "Step 3d: Given CMOCONC.S.F01(LEV) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: CMOCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2] - - - label: - "Step 3e: Given CMOCONC.S.F01(LEV) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !CMOCONC.S.F01 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x2] - - - label: - "Step 3f: Given CMOCONC.S.F02(MED) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: CMOCONC.S.F02 && CMOCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x4, 0x2] - - - label: - "Step 3g: Given CMOCONC.S.F02(MED) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !CMOCONC.S.F02 && !CMOCONC.S.F01" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x4] - - - label: - "Step 3h: Given CMOCONC.S.F03(CRI) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: CMOCONC.S.F03 && CMOCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x8, 0x2] - - - label: - "Step 3i: Given CMOCONC.S.F03(CRI) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !CMOCONC.S.F03 && !CMOCONC.S.F01" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x8] - - - label: - "Step 3j: Given CMOCONC.S.F04(PEA) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: CMOCONC.S.F04 && CMOCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x10, 0x1] - - - label: - "Step 3k: Given CMOCONC.S.F04(PEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !CMOCONC.S.F04 && !CMOCONC.S.F00" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x10] - - - label: - "Step 3l: Given CMOCONC.S.F05(AVG) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: CMOCONC.S.F05 && CMOCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x20, 0x1] - - - label: - "Step 3m: Given CMOCONC.S.F05(AVG) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !CMOCONC.S.F05 && !CMOCONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x20] - - - label: "Step 4a: Read the global attribute: AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED - response: - constraints: - type: list - contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] - - - label: "Step 4a: Read the global attribute: AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED" - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [9, 65528, 65529, 65531, 65532, 65533] - - - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: CMOCONC.S.A0007 && CMOCONC.S.F00 - response: - constraints: - type: list - contains: [7] - - - label: - "Step 4c: Check the optional attribute Uncertainty is excluded from - AttributeList when CMOCONC.S.A0007 is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !CMOCONC.S.A0007 " - response: - constraints: - type: list - excludes: [7] - - - label: - "Step 4d: Read the optional, feature dependent attributes - MeasuredValue, MinMeasuredValue, MaxMeasuredValue and Measurement Unit - in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: CMOCONC.S.F00 - response: - constraints: - type: list - contains: [0, 1, 2, 8] - - - label: - "Step 4e: Check that MeasuredValue, MinMeasuredValue, - MaxMeasuredValue, Measurement Unit and Uncertainty are excluded from - AttributeList when CMOCONC.S.F00 (MEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !CMOCONC.S.F00 " - response: - constraints: - type: list - excludes: [0, 1, 2, 7, 8] - - - label: - "Step 4f: Read the optional, feature dependent attributes - PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: CMOCONC.S.F04 - response: - constraints: - type: list - contains: [3, 4] - - - label: - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are - excluded from AttributeList when CMOCONC.S.F04 (PEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !CMOCONC.S.F04 " - response: - constraints: - type: list - excludes: [3, 4] - - - label: - "Step 4h: Read the optional, feature dependent attributes - AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: CMOCONC.S.F05 - response: - constraints: - type: list - contains: [5, 6] - - - label: - "Step 4i: Check that AverageMeasuredValue and - AverageMeasuredValueWindow are excluded from AttributeList when - CMOCONC.S.F05 (AVG) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !CMOCONC.S.F05 " - response: - constraints: - type: list - excludes: [5, 6] - - - label: - "Step 4j: Read the optional, feature dependent attribute LevelValue in - AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: CMOCONC.S.F01 - response: - constraints: - type: list - contains: [10] - - - label: - "Step 4k: Check that LevelValue is excluded from AttributeList when - CMOCONC.S.F01 (LEV) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !CMOCONC.S.F01 " - response: - constraints: - type: list - excludes: [10] - - - label: "Step 5: Read the global attribute: EventList" - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "EventList" - response: - value: [] - constraints: - type: list - - - label: "Step 6: Read the global attribute: AcceptedCommandList" - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [] - constraints: - type: list - - - label: "Step 7: Read the global attribute: GeneratedCommandList" - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list diff --git a/src/app/tests/suites/certification/Test_TC_CNET_1_3.yaml b/src/app/tests/suites/certification/Test_TC_CNET_1_3.yaml deleted file mode 100644 index afa472af0a..0000000000 --- a/src/app/tests/suites/certification/Test_TC_CNET_1_3.yaml +++ /dev/null @@ -1,219 +0,0 @@ -# Copyright (c) 2021 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: 12.1.3. [TC-CNET-1.3] Global Attributes with DUT as Server - -PICS: - - CNET.S - -config: - nodeId: 0x12344321 - cluster: "Network Commissioning" - endpoint: 0 - -tests: - - label: "Step 1: Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the ClusterRevision attribute" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 2 - constraints: - type: int16u - - - label: "Step 3a: TH reads from the DUT the FeatureMap attribute" - PICS: " !CNET.S.F00 && !CNET.S.F01 && !CNET.S.F02 " - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 0 - - - label: - "Step 3b: TH reads the global attribute: FeatureMap when CNET.S.F00 is - set" - PICS: CNET.S.F00 - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 1 - - - label: - "Step 3c: TH reads the global attribute: FeatureMap when CNET.S.F01 is - set" - PICS: CNET.S.F01 - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 2 - - - label: - "Step 3d: TH reads the global attribute: FeatureMap when CNET.S.F02 is - set" - PICS: CNET.S.F02 - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 4 - - - label: "Step 4a: TH reads from the DUT the AttributeList attribute" - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [65528, 65529, 65530, 65531, 65532, 65533] - - - label: "Step 4b: TH reads from the DUT the AttributeList attribute." - PICS: "!PICS_EVENT_LIST_ENABLED" - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [65528, 65529, 65531, 65532, 65533] - - - label: - "Step 4c: TH reads mandatory attributes in AttributeList if - CNET.S.F00(WI)/CNET.S.F01(TH)/CNET.S.F02(ET) is true" - PICS: CNET.S.F00 || CNET.S.F01 || CNET.S.F02 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [0, 1, 4, 5, 6, 7] - - - label: - "Step 4d: TH reads the feature dependent - attribute(ScanMaxTimeSeconds): AttributeList" - PICS: CNET.S.F00 || CNET.S.F01 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [2] - - - label: - "Step 4e: TH reads the feature dependent - attribute(ConnectMaxTimeSeconds) in AttributeList" - PICS: CNET.S.F00 || CNET.S.F01 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [3] - - - label: - "Step 4f: TH reads WIFI related attribute (SupportedWiFiBands) in - AttributeList" - PICS: CNET.S.F00 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [8] - - - label: - "Step 4g: TH reads Thread related attribute (SupportedWiFiBands and - ThreadVersion) in AttributeList" - PICS: CNET.S.F01 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [9, 10] - - - label: "Step 5: TH reads from the DUT the EventList attribute" - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "EventList" - response: - value: [] - constraints: - type: list - - - label: - "Step 6a: TH reads AcceptedCommandList attribute from DUT. If DUT - supports Wi-Fi/Thread related features CNET.S.F00(WI),CNET.S.F01(TH)" - PICS: ( CNET.S.F00 || CNET.S.F01 ) - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - constraints: - type: list - contains: [0, 4, 6, 8] - - - label: - "Step 6b: TH reads AcceptedCommandList attribute from DUT. If DUT - supports Wi-Fi related features (CNET.S.F00(WI) is true)" - PICS: CNET.S.F00 - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - constraints: - type: list - contains: [2] - - - label: - "Step 6c: TH reads AcceptedCommandList attribute from DUT. If DUT - supports Thread related features(CNET.S.F01(TH) is true)" - PICS: CNET.S.F01 - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - constraints: - type: list - contains: [3] - - - label: - "Step 6d: TH reads AcceptedCommandList attribute from DUT. If DUT - supports Ethernet related features(CNET.S.F02(TH) is true)" - PICS: CNET.S.F02 - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [] - - - label: - "Step 7a: TH reads the GeneratedCommandList attribute from DUT. If DUT - supports Wi-Fi/Thread related features(CNET.S.F00(WI) or - CNET.S.F01(TH) is true)" - PICS: ( CNET.S.F00 || CNET.S.F01 ) - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - constraints: - type: list - contains: [1, 5, 7] - - - label: - "Step 7b: Read the GeneratedCommandList attribute from DUT. If DUT - supports Ethernet related features(CNET.S.F02(ET) must be true)" - PICS: CNET.S.F02 - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] diff --git a/src/app/tests/suites/certification/Test_TC_DEM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DEM_1_1.yaml deleted file mode 100644 index e69e5a62b0..0000000000 --- a/src/app/tests/suites/certification/Test_TC_DEM_1_1.yaml +++ /dev/null @@ -1,123 +0,0 @@ -# Copyright (c) 2024 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 237.1.1. [TC-DEM-1.1] Global Attributes with DUT as Server - -PICS: - - DEM.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." - verification: | - ./chip-tool deviceenergymanagement read cluster-revision 1 1 - - On TH(chip-tool), Verify the ClusterRevision attribute value as 2: - Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1705565332.698601][7061:7063] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0098 Attribute 0x0000_FFFD DataVersion: 1117764527 - [1705565332.698668][7061:7063] CHIP:TOO: ClusterRevision: 3 - disabled: true - - - label: "Step 3: TH reads from the DUT the FeatureMap attribute." - verification: | - ./chip-tool deviceenergymanagement read feature-map 1 1 - - Via the TH (chip-tool), verify that theFeatureMap attribute contains the value. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - - [1705565302.904580][7054:7056] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0098 Attribute 0x0000_FFFC DataVersion: 1117764527 - [1705565302.904631][7054:7056] CHIP:TOO: FeatureMap: 127 - disabled: true - - - label: "Step 4: TH reads from the DUT the AttributeList attribute." - verification: | - ./chip-tool deviceenergymanagement read attribute-list 1 1 - - Via the TH (chip-tool), verify that the AttributeList attribute contains - - Mandatory entries:0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0xfff8, 0xfff9, 0xfffb, 0xfffc and 0xfffd - - Based on feature support:- 0x0005, 0x0006, 0x0007 - Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1723642027.628] [328171:328173] [TOO] Endpoint: 1 Cluster: 0x0000_0098 Attribute 0x0000_FFFB DataVersion: 3122179410 - [1723642027.628] [328171:328173] [TOO] AttributeList: 13 entries - [1723642027.628] [328171:328173] [TOO] [1]: 0 (ESAType) - [1723642027.628] [328171:328173] [TOO] [2]: 1 (ESACanGenerate) - [1723642027.628] [328171:328173] [TOO] [3]: 2 (ESAState) - [1723642027.628] [328171:328173] [TOO] [4]: 3 (AbsMinPower) - [1723642027.628] [328171:328173] [TOO] [5]: 4 (AbsMaxPower) - [1723642027.628] [328171:328173] [TOO] [6]: 5 (PowerAdjustmentCapability) - [1723642027.628] [328171:328173] [TOO] [7]: 6 (Forecast) - [1723642027.628] [328171:328173] [TOO] [8]: 7 (OptOutState) - [1723642027.628] [328171:328173] [TOO] [9]: 65528 (GeneratedCommandList) - [1723642027.628] [328171:328173] [TOO] [10]: 65529 (AcceptedCommandList) - [1723642027.628] [328171:328173] [TOO] [11]: 65531 (AttributeList) - [1723642027.628] [328171:328173] [TOO] [12]: 65532 (FeatureMap) - [1723642027.628] [328171:328173] [TOO] [13]: 65533 (ClusterRevision) - disabled: true - - - label: "Step 5*: TH reads from the DUT the EventList attribute." - verification: | - EventList is currently not supported and SHALL be skipped. - - ./chip-tool deviceenergymanagement read event-list 1 1 - - Via the TH (chip-tool), verify that the EventList attribute. Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1703745599.166331][1300:1302] CHIP:DMG: StatusIB = - [1703745599.166364][1300:1302] CHIP:DMG: { - [1703745599.166419][1300:1302] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1703745599.166450][1300:1302] CHIP:DMG: }, - disabled: true - - - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." - verification: | - ./chip-tool deviceenergymanagement read accepted-command-list 1 1 - - On TH(chip-tool), Verify the AcceptedCommandList attribute that contains 7 entries: - Below mentioned log is based on the RPI implementation, Value may vary on real DUT - - [1705649342.947638][6221:6223] [TOO] Endpoint: 1 Cluster: 0x0000_0098 Attribute 0x0000_FFF9 DataVersion: 633673396 - [1705649342.947712][6221:6223] [TOO] AcceptedCommandList: 8 entries - [1705649342.947754][6221:6223] [TOO] [1]: 0 (PowerAdjustRequest) - [1705649342.947779][6221:6223] [TOO] [2]: 1 (CancelPowerAdjustRequest) - [1705649342.947802][6221:6223] [TOO] [3]: 2 (StartTimeAdjustRequest) - [1705649342.947825][6221:6223] [TOO] [4]: 3 (PauseRequest) - [1705649342.947848][6221:6223] [TOO] [5]: 4 (ResumeRequest) - [1705649342.947871][6221:6223] [TOO] [6]: 5 (ModifyForecastRequest) - [1705649342.947894][6221:6223] [TOO] [7]: 6 (RequestConstraintBasedForecast) - [1705649342.947917][6221:6223] [TOO] [8]: 7 (CancelRequest) - disabled: true - - - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." - verification: | - ./chip-tool deviceenergymanagement read generated-command-list 1 1 - - On TH(chip-tool), Verify the GeneratedCommandList attribute that contains 1 entries: - - [1705567897.076935][7141:7143] [TOO] Endpoint: 1 Cluster: 0x0000_0098 Attribute 0x0000_FFF8 DataVersion: 1117764527 - [1705567897.076989][7141:7143] [TOO] GeneratedCommandList: 0 entries - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml deleted file mode 100644 index 5b3cbf40b3..0000000000 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml +++ /dev/null @@ -1,219 +0,0 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 263.4.1. [TC-DISHM-3.1] On Mode functionality with DUT as Server - -PICS: - - DISHM.S.A0003 - - MOD.S.F00 - - OO.S.C00.Rsp - - OO.S.C01.Rsp - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Precondition" - verification: | - 1 Dishwasher Mode and OnOff clusters are available on the same endpoint - - 2 The OnMode attribute is set to a non-NULL value from the mode values indicated by the SupportedModes attribute. - - Read the SupportedModes attribute, select a value from SupportedModes and save the value as OnMode_value - - ./chip-tool dishwashermode read supported-modes 1 1 - - On TH(chip-tool) log, Verify the list of SupportedModes and below is the sample log provided for the raspi platform: - - [1692170674.471882][3058:3061] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 2502960191 - [1692170674.472010][3058:3061] CHIP:TOO: SupportedModes: 3 entries - [1692170674.472081][3058:3061] CHIP:TOO: [1]: { - [1692170674.472110][3058:3061] CHIP:TOO: Label: Normal - [1692170674.472135][3058:3061] CHIP:TOO: Mode: 0 - [1692170674.472163][3058:3061] CHIP:TOO: ModeTags: 1 entries - [1692170674.472223][3058:3061] CHIP:TOO: [1]: { - [1692170674.472252][3058:3061] CHIP:TOO: Value: 16384 - [1692170674.472288][3058:3061] CHIP:TOO: } - [1692170674.472314][3058:3061] CHIP:TOO: } - [1692170674.472385][3058:3061] CHIP:TOO: [2]: { - [1692170674.472411][3058:3061] CHIP:TOO: Label: Heavy - [1692170674.472435][3058:3061] CHIP:TOO: Mode: 1 - [1692170674.472475][3058:3061] CHIP:TOO: ModeTags: 2 entries - [1692170674.472506][3058:3061] CHIP:TOO: [1]: { - [1692170674.472542][3058:3061] CHIP:TOO: Value: 7 - [1692170674.472567][3058:3061] CHIP:TOO: } - [1692170674.472595][3058:3061] CHIP:TOO: [2]: { - [1692170674.472632][3058:3061] CHIP:TOO: Value: 16385 - [1692170674.472658][3058:3061] CHIP:TOO: } - [1692170674.472683][3058:3061] CHIP:TOO: } - [1692170674.472730][3058:3061] CHIP:TOO: [3]: { - [1692170674.472755][3058:3061] CHIP:TOO: Label: Light - [1692170674.472778][3058:3061] CHIP:TOO: Mode: 2 - [1692170674.472820][3058:3061] CHIP:TOO: ModeTags: 3 entries - [1692170674.472851][3058:3061] CHIP:TOO: [1]: { - [1692170674.472886][3058:3061] CHIP:TOO: Value: 16386 - [1692170674.472910][3058:3061] CHIP:TOO: } - [1692170674.472938][3058:3061] CHIP:TOO: [2]: { - [1692170674.472973][3058:3061] CHIP:TOO: Value: 8 - [1692170674.472996][3058:3061] CHIP:TOO: } - [1692170674.473024][3058:3061] CHIP:TOO: [3]: { - [1692170674.473048][3058:3061] CHIP:TOO: Value: 2 - [1692170674.473071][3058:3061] CHIP:TOO: } - [1692170674.473095][3058:3061] CHIP:TOO: } - - Set the OnMode attribute value to OnMode_value - - ./chip-tool dishwashermode write on-mode 0 1 1 - - On TH(chip-tool) log, Verify DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1692170913.264454][3071:3073] CHIP:DMG: StatusIB = - [1692170913.264489][3071:3073] CHIP:DMG: { - [1692170913.264522][3071:3073] CHIP:DMG: status = 0x00 (SUCCESS), - [1692170913.264557][3071:3073] CHIP:DMG: }, - disabled: true - - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the OnMode attribute." - PICS: DISHM.S.A0003 && MOD.S.F00 - verification: | - ./chip-tool dishwashermode read on-mode 1 1 - - On TH(chip-tool), Verify that OnMode attribute value is an Integer - Save the value as on_mode_dut and below is the sample log provided for the raspi platform, here OnMode value is 0 - - [1690188734.934221][15978:15980] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0003 DataVersion: 74242734 - [1690188734.934259][15978:15980] CHIP:TOO: OnMode: 0 - disabled: true - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 && MOD.S.F00 - verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute is an integer. - Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 - - NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. - - [1690188747.957507][15982:15984] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 74242734 - [1690188747.957564][15982:15984] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." - PICS: DISHM.S.A0000 && MOD.S.F00 - verification: | - ./chip-tool dishwashermode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1690188771.532158][15986:15988] CHIP:DMG: } - [1690188771.532258][15986:15988] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 74242734 - [1690188771.532287][15986:15988] CHIP:TOO: SupportedModes: 3 entries - [1690188771.532305][15986:15988] CHIP:TOO: [1]: { - [1690188771.532309][15986:15988] CHIP:TOO: Label: Normal - [1690188771.532316][15986:15988] CHIP:TOO: Mode: 0 - [1690188771.532321][15986:15988] CHIP:TOO: ModeTags: 1 entries - [1690188771.532327][15986:15988] CHIP:TOO: [1]: { - [1690188771.532331][15986:15988] CHIP:TOO: Value: 16384 - [1690188771.532334][15986:15988] CHIP:TOO: } - [1690188771.532338][15986:15988] CHIP:TOO: } - [1690188771.532345][15986:15988] CHIP:TOO: [2]: { - [1690188771.532348][15986:15988] CHIP:TOO: Label: Heavy - [1690188771.532352][15986:15988] CHIP:TOO: Mode: 1 - [1690188771.532358][15986:15988] CHIP:TOO: ModeTags: 2 entries - [1690188771.532363][15986:15988] CHIP:TOO: [1]: { - [1690188771.532366][15986:15988] CHIP:TOO: Value: 7 - [1690188771.532368][15986:15988] CHIP:TOO: } - [1690188771.532372][15986:15988] CHIP:TOO: [2]: { - [1690188771.532374][15986:15988] CHIP:TOO: Value: 16385 - [1690188771.532376][15986:15988] CHIP:TOO: } - [1690188771.532379][15986:15988] CHIP:TOO: } - [1690188771.532386][15986:15988] CHIP:TOO: [3]: { - [1690188771.532388][15986:15988] CHIP:TOO: Label: Light - [1690188771.532390][15986:15988] CHIP:TOO: Mode: 2 - [1690188771.532395][15986:15988] CHIP:TOO: ModeTags: 3 entries - [1690188771.532398][15986:15988] CHIP:TOO: [1]: { - [1690188771.532401][15986:15988] CHIP:TOO: Value: 16386 - [1690188771.532403][15986:15988] CHIP:TOO: } - [1690188771.532406][15986:15988] CHIP:TOO: [2]: { - [1690188771.532409][15986:15988] CHIP:TOO: Value: 8 - [1690188771.532411][15986:15988] CHIP:TOO: } - [1690188771.532414][15986:15988] CHIP:TOO: [3]: { - [1690188771.532417][15986:15988] CHIP:TOO: Value: 2 - [1690188771.532419][15986:15988] CHIP:TOO: } - [1690188771.532421][15986:15988] CHIP:TOO: } - disabled: true - - - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - PICS: DISHM.S.C00.Rsp && MOD.S.F00 - verification: | - ./chip-tool dishwashermode change-to-mode 2 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690198333.074192][17405:17407] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Command 0x0000_0001 - [1690198333.074208][17405:17407] CHIP:TOO: ChangeToModeResponse: { - [1690198333.074213][17405:17407] CHIP:TOO: status: 0 - [1690198333.074216][17405:17407] CHIP:TOO: } - disabled: true - - - label: "Step 6: TH sends a Off command to the DUT" - PICS: OO.S.C00.Rsp && MOD.S.F00 - verification: | - ./chip-tool onoff off 1 1 - - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931101.118659][20709:20711] CHIP:DMG: { - [1684931101.118663][20709:20711] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931101.118665][20709:20711] CHIP:DMG: }, - disabled: true - - - label: "Step 7: TH sends a On command to the DUT" - PICS: OO.S.C01.Rsp && MOD.S.F00 - verification: | - ./chip-tool onoff on 1 1 - - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931217.055517][20729:20731] CHIP:DMG: { - [1684931217.055520][20729:20731] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931217.055523][20729:20731] CHIP:DMG: }, - disabled: true - - - label: "Step 8: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 && MOD.S.F00 - verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and equal to on_mode_dut, below is the sample log provided for the raspi platform, here CurrentMode attribute value is 0 - - [1690188859.713934][16004:16006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 74242736 - [1690188859.713980][16004:16006] CHIP:TOO: CurrentMode: 0 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml deleted file mode 100644 index c53124e903..0000000000 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml +++ /dev/null @@ -1,237 +0,0 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 263.4.2. [TC-DISHM-3.2] Startup Mode functionality with DUT as Server - -PICS: - - DISHM.S.A0002 - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Preconditions" - verification: | - !DISHM.S.F00 | OnOff cluster’s StartUpOnOff attribute is NULL | StartUpOnOff is 0 | OnMode is NULL - disabled: true - - - label: "Note" - verification: | - To Execute the TC-DISHM-3.2 test case using reboot in raspi device we followed the below suggested way: - - To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps - - step-1: create a file using touch command , something like touch mytest.txt - step-2: chmod 777 mytest.txt - step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt - - if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. - disabled: true - - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: DISHM.S.A0002 - verification: | - ./chip-tool dishwashermode read start-up-mode 1 1 - - On TH(chip-tool), Verify StartUpMode attribute value is an integer or null - - Save the value as startup_mode_dut and below is the sample log provided for the raspi platform, Here StartUpMode value is null - - NOTE: if startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. - - [1690188941.380388][16015:16017] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 74242738 - [1690188941.380430][16015:16017] CHIP:TOO: StartUpMode: null - disabled: true - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - PICS: DISHM.S.A0000 - verification: | - ./chip-tool dishwashermode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: - - [1690188996.754102][16022:16024] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 74242738 - [1690188996.754208][16022:16024] CHIP:TOO: SupportedModes: 3 entries - [1690188996.754248][16022:16024] CHIP:TOO: [1]: { - [1690188996.754258][16022:16024] CHIP:TOO: Label: Normal - [1690188996.754270][16022:16024] CHIP:TOO: Mode: 0 - [1690188996.754285][16022:16024] CHIP:TOO: ModeTags: 1 entries - [1690188996.754302][16022:16024] CHIP:TOO: [1]: { - [1690188996.754314][16022:16024] CHIP:TOO: Value: 16384 - [1690188996.754325][16022:16024] CHIP:TOO: } - [1690188996.754336][16022:16024] CHIP:TOO: } - [1690188996.754360][16022:16024] CHIP:TOO: [2]: { - [1690188996.754369][16022:16024] CHIP:TOO: Label: Heavy - [1690188996.754378][16022:16024] CHIP:TOO: Mode: 1 - [1690188996.754393][16022:16024] CHIP:TOO: ModeTags: 2 entries - [1690188996.754407][16022:16024] CHIP:TOO: [1]: { - [1690188996.754416][16022:16024] CHIP:TOO: Value: 7 - [1690188996.754425][16022:16024] CHIP:TOO: } - [1690188996.754439][16022:16024] CHIP:TOO: [2]: { - [1690188996.754450][16022:16024] CHIP:TOO: Value: 16385 - [1690188996.754459][16022:16024] CHIP:TOO: } - [1690188996.754469][16022:16024] CHIP:TOO: } - [1690188996.754493][16022:16024] CHIP:TOO: [3]: { - [1690188996.754501][16022:16024] CHIP:TOO: Label: Light - [1690188996.754511][16022:16024] CHIP:TOO: Mode: 2 - [1690188996.754548][16022:16024] CHIP:TOO: ModeTags: 3 entries - [1690188996.754564][16022:16024] CHIP:TOO: [1]: { - [1690188996.754574][16022:16024] CHIP:TOO: Value: 16386 - [1690188996.754583][16022:16024] CHIP:TOO: } - [1690188996.754597][16022:16024] CHIP:TOO: [2]: { - [1690188996.754606][16022:16024] CHIP:TOO: Value: 8 - [1690188996.754615][16022:16024] CHIP:TOO: } - [1690188996.754629][16022:16024] CHIP:TOO: [3]: { - [1690188996.754638][16022:16024] CHIP:TOO: Value: 2 - [1690188996.754646][16022:16024] CHIP:TOO: } - [1690188996.754654][16022:16024] CHIP:TOO: } - disabled: true - - - label: - "Step 4: TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - PICS: DISHM.S.A0002 - verification: | - ./chip-tool dishwashermode write start-up-mode 0 1 1 - - On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690188912.259778][16011:16013] CHIP:DMG: { - [1690188912.259790][16011:16013] CHIP:DMG: status = 0x00 (SUCCESS), - [1690188912.259800][16011:16013] CHIP:DMG: }, - [1690188912.259813][16011:16013] CHIP:DMG: - - ./chip-tool dishwashermode read start-up-mode 1 1 - - On TH(chip-tool), Verify that StartUpMode attribute value is 0 and below is the sample log provided for the raspi platform . - - [1692171314.157274][3112:3114] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 2502960195 - [1692171314.157331][3112:3114] CHIP:TOO: StartUpMode: 0 - disabled: true - - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 - verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer value - - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 6. Else proceed to step 8. - - [1690189040.789208][16040:16042] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 1012425326 - [1690189040.789223][16040:16042] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - PICS: DISHM.S.A0000 - verification: | - ./chip-tool dishwashermode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1690188996.754102][16022:16024] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 74242738 - [1690188996.754208][16022:16024] CHIP:TOO: SupportedModes: 3 entries - [1690188996.754248][16022:16024] CHIP:TOO: [1]: { - [1690188996.754258][16022:16024] CHIP:TOO: Label: Normal - [1690188996.754270][16022:16024] CHIP:TOO: Mode: 0 - [1690188996.754285][16022:16024] CHIP:TOO: ModeTags: 1 entries - [1690188996.754302][16022:16024] CHIP:TOO: [1]: { - [1690188996.754314][16022:16024] CHIP:TOO: Value: 16384 - [1690188996.754325][16022:16024] CHIP:TOO: } - [1690188996.754336][16022:16024] CHIP:TOO: } - [1690188996.754360][16022:16024] CHIP:TOO: [2]: { - [1690188996.754369][16022:16024] CHIP:TOO: Label: Heavy - [1690188996.754378][16022:16024] CHIP:TOO: Mode: 1 - [1690188996.754393][16022:16024] CHIP:TOO: ModeTags: 2 entries - [1690188996.754407][16022:16024] CHIP:TOO: [1]: { - [1690188996.754416][16022:16024] CHIP:TOO: Value: 7 - [1690188996.754425][16022:16024] CHIP:TOO: } - [1690188996.754439][16022:16024] CHIP:TOO: [2]: { - [1690188996.754450][16022:16024] CHIP:TOO: Value: 16385 - [1690188996.754459][16022:16024] CHIP:TOO: } - [1690188996.754469][16022:16024] CHIP:TOO: } - [1690188996.754493][16022:16024] CHIP:TOO: [3]: { - [1690188996.754501][16022:16024] CHIP:TOO: Label: Light - [1690188996.754511][16022:16024] CHIP:TOO: Mode: 2 - [1690188996.754548][16022:16024] CHIP:TOO: ModeTags: 3 entries - [1690188996.754564][16022:16024] CHIP:TOO: [1]: { - [1690188996.754574][16022:16024] CHIP:TOO: Value: 16386 - [1690188996.754583][16022:16024] CHIP:TOO: } - [1690188996.754597][16022:16024] CHIP:TOO: [2]: { - [1690188996.754606][16022:16024] CHIP:TOO: Value: 8 - [1690188996.754615][16022:16024] CHIP:TOO: } - [1690188996.754629][16022:16024] CHIP:TOO: [3]: { - [1690188996.754638][16022:16024] CHIP:TOO: Value: 2 - [1690188996.754646][16022:16024] CHIP:TOO: } - [1690188996.754654][16022:16024] CHIP:TOO: } - disabled: true - - - label: - "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - PICS: DISHM.S.C00.Rsp - verification: | - ./chip-tool dishwashermode change-to-mode 2 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690265961.529808][30174:30176] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Command 0x0000_0001 - [1690265961.529857][30174:30176] CHIP:TOO: ChangeToModeResponse: { - [1690265961.529880][30174:30176] CHIP:TOO: status: 0 - [1690265961.529891][30174:30176] CHIP:TOO: } - disabled: true - - - label: "Step 8: Physically power cycle the device" - verification: | - Physically power cycle the device. - disabled: true - - - label: "Step 9: TH reads from the DUT the StartUpMode attribute." - PICS: DISHM.S.A0002 - verification: | - ./chip-tool dishwashermode read start-up-mode 1 1 - - On TH(chip-tool), Verify StartUpMode attribute value is an integer. - - Save the value as new_start_up_mode_dut and is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform, Here StartUpMode value is 0 - - [1690188941.380388][16015:16017] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 74242738 - [1690188941.380430][16015:16017] CHIP:TOO: StartUpMode: 0 - disabled: true - - - label: "Step 10: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 - verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_start_up_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690189040.789208][16040:16042] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 1012425326 - [1690189040.789223][16040:16042] CHIP:TOO: CurrentMode: 0 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml deleted file mode 100644 index c9e788d45a..0000000000 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml +++ /dev/null @@ -1,274 +0,0 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 189.3.3.[TC-DISHM-3.3] On Mode and Startup Mode functionality with DUT as - Server - -PICS: - - DISHM.S.A0002 - - DISHM.S.A0003 - - MOD.S.F00 - - OO.S.A4003 - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - To Execute the TC-DISH-3.3 test case using reboot in raspi device we followed the below suggested way: - - To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps - - step-1: create a file using touch command , something like touch mytest.txt - step-2: chmod 777 mytest.txt - step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt - - if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. - disabled: true - - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: DISHM.S.A0002 - verification: | - ./chip-tool dishwashermode read start-up-mode 1 1 - - On TH(chip-tool), Verify that StartUpMode attribute value is an integer or Null - - Save the value as startup_mode_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is null - - NOTE: if startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. - - [1651099663211] [82177:7560652] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 2609052118 - [1651099663212] [82177:7560652] CHIP: [TOO] StartUpMode: null - disabled: true - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - PICS: DISHM.S.A0000 - verification: | - ./chip-tool dishwashermode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: - - [1690189296.612007][16077:16079] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 1012425327 - [1690189296.612104][16077:16079] CHIP:TOO: SupportedModes: 3 entries - [1690189296.612139][16077:16079] CHIP:TOO: [1]: { - [1690189296.612149][16077:16079] CHIP:TOO: Label: Normal - [1690189296.612168][16077:16079] CHIP:TOO: Mode: 0 - [1690189296.612189][16077:16079] CHIP:TOO: ModeTags: 1 entries - [1690189296.612214][16077:16079] CHIP:TOO: [1]: { - [1690189296.612224][16077:16079] CHIP:TOO: Value: 16384 - [1690189296.612234][16077:16079] CHIP:TOO: } - [1690189296.612243][16077:16079] CHIP:TOO: } - [1690189296.612264][16077:16079] CHIP:TOO: [2]: { - [1690189296.612273][16077:16079] CHIP:TOO: Label: Heavy - [1690189296.612282][16077:16079] CHIP:TOO: Mode: 1 - [1690189296.612296][16077:16079] CHIP:TOO: ModeTags: 2 entries - [1690189296.612309][16077:16079] CHIP:TOO: [1]: { - [1690189296.612318][16077:16079] CHIP:TOO: Value: 7 - [1690189296.612327][16077:16079] CHIP:TOO: } - [1690189296.612339][16077:16079] CHIP:TOO: [2]: { - [1690189296.612348][16077:16079] CHIP:TOO: Value: 16385 - [1690189296.612356][16077:16079] CHIP:TOO: } - [1690189296.612365][16077:16079] CHIP:TOO: } - [1690189296.612384][16077:16079] CHIP:TOO: [3]: { - [1690189296.612392][16077:16079] CHIP:TOO: Label: Light - [1690189296.612398][16077:16079] CHIP:TOO: Mode: 2 - [1690189296.612413][16077:16079] CHIP:TOO: ModeTags: 3 entries - [1690189296.612425][16077:16079] CHIP:TOO: [1]: { - [1690189296.612433][16077:16079] CHIP:TOO: Value: 16386 - [1690189296.612443][16077:16079] CHIP:TOO: } - [1690189296.612456][16077:16079] CHIP:TOO: [2]: { - [1690189296.612465][16077:16079] CHIP:TOO: Value: 8 - [1690189296.612473][16077:16079] CHIP:TOO: } - [1690189296.612485][16077:16079] CHIP:TOO: [3]: { - [1690189296.612494][16077:16079] CHIP:TOO: Value: 2 - [1690189296.612502][16077:16079] CHIP:TOO: } - [1690189296.612511][16077:16079] CHIP:TOO: } - disabled: true - - - label: - "Step 4: TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - PICS: DISHM.S.A0002 - verification: | - ./chip-tool dishwashermode write start-up-mode 0 1 1 - - On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690188912.259766][16011:16013] CHIP:DMG: StatusIB = - [1690188912.259778][16011:16013] CHIP:DMG: { - [1690188912.259790][16011:16013] CHIP:DMG: status = 0x00 (SUCCESS), - [1690188912.259800][16011:16013] CHIP:DMG: }, - [1690188912.259813][16011:16013] CHIP:DMG: - - ./chip-tool dishwashermode read start-up-mode 1 1 - - On TH(chip-tool), Verify that StartUpMode attribute value is 0 and below is the sample log provided for the raspi platform . - - [1692171314.157274][3112:3114] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 2502960195 - [1692171314.157331][3112:3114] CHIP:TOO: StartUpMode: 0 - disabled: true - - - label: "Step 5: TH reads from the DUT the OnMode attribute." - PICS: DISHM.S.A0003 && DISHM.S.A0002 - verification: | - As default value of OnMode attribute is NULL. Set the OnMode to any mode value listed in the SupportedModes entries. - - ./chip-tool dishwashermode write on-mode 0 1 1 - - On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690189187.414225][16062:16064] CHIP:DMG: StatusIB = - [1690189187.414237][16062:16064] CHIP:DMG: { - [1690189187.414249][16062:16064] CHIP:DMG: status = 0x00 (SUCCESS), - [1690189187.414260][16062:16064] CHIP:DMG: }, - - - ./chip-tool dishwashermode read on-mode 1 1 - - On TH(chip-tool), Verify that OnMode attribute value is an integer value - - Save the value as old_on_mode_dut, below is the sample log provided for the raspi platform, here OnMode attribute value is 0 - - NOTE: If startup_mode_dut is equal to old_on_mode_dut proceed to step 6. Else proceed to step 8. - - [1690189501.554415][16104:16106] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0003 DataVersion: 1012425329 - [1690189501.554429][16104:16106] CHIP:TOO: OnMode: 0 - disabled: true - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - PICS: DISHM.S.A0000 && DISHM.S.A0002 - verification: | - ./chip-tool dishwashermode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1690189296.612007][16077:16079] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 1012425327 - [1690189296.612104][16077:16079] CHIP:TOO: SupportedModes: 3 entries - [1690189296.612139][16077:16079] CHIP:TOO: [1]: { - [1690189296.612149][16077:16079] CHIP:TOO: Label: Normal - [1690189296.612168][16077:16079] CHIP:TOO: Mode: 0 - [1690189296.612189][16077:16079] CHIP:TOO: ModeTags: 1 entries - [1690189296.612214][16077:16079] CHIP:TOO: [1]: { - [1690189296.612224][16077:16079] CHIP:TOO: Value: 16384 - [1690189296.612234][16077:16079] CHIP:TOO: } - [1690189296.612243][16077:16079] CHIP:TOO: } - [1690189296.612264][16077:16079] CHIP:TOO: [2]: { - [1690189296.612273][16077:16079] CHIP:TOO: Label: Heavy - [1690189296.612282][16077:16079] CHIP:TOO: Mode: 1 - [1690189296.612296][16077:16079] CHIP:TOO: ModeTags: 2 entries - [1690189296.612309][16077:16079] CHIP:TOO: [1]: { - [1690189296.612318][16077:16079] CHIP:TOO: Value: 7 - [1690189296.612327][16077:16079] CHIP:TOO: } - [1690189296.612339][16077:16079] CHIP:TOO: [2]: { - [1690189296.612348][16077:16079] CHIP:TOO: Value: 16385 - [1690189296.612356][16077:16079] CHIP:TOO: } - [1690189296.612365][16077:16079] CHIP:TOO: } - [1690189296.612384][16077:16079] CHIP:TOO: [3]: { - [1690189296.612392][16077:16079] CHIP:TOO: Label: Light - [1690189296.612398][16077:16079] CHIP:TOO: Mode: 2 - [1690189296.612413][16077:16079] CHIP:TOO: ModeTags: 3 entries - [1690189296.612425][16077:16079] CHIP:TOO: [1]: { - [1690189296.612433][16077:16079] CHIP:TOO: Value: 16386 - [1690189296.612443][16077:16079] CHIP:TOO: } - [1690189296.612456][16077:16079] CHIP:TOO: [2]: { - [1690189296.612465][16077:16079] CHIP:TOO: Value: 8 - [1690189296.612473][16077:16079] CHIP:TOO: } - [1690189296.612485][16077:16079] CHIP:TOO: [3]: { - [1690189296.612494][16077:16079] CHIP:TOO: Value: 2 - [1690189296.612502][16077:16079] CHIP:TOO: } - [1690189296.612511][16077:16079] CHIP:TOO: } - disabled: true - - - label: - "Step 7: TH writes to the DUT the OnMode attribute with the - new_mode_th value" - PICS: DISHM.S.A0003 - verification: | - ./chip-tool dishwashermode write on-mode 2 1 1 - - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690189470.746137][16086:16088] CHIP:DMG: { - [1690189470.746140][16086:16088] CHIP:DMG: status = 0x00 (SUCCESS), - [1690189470.746142][16086:16088] CHIP:DMG: }, - disabled: true - - - label: "Step 8: TH reads from the DUT the OnMode attribute." - PICS: DISHM.S.A0003 && MOD.S.F00 - verification: | - ./chip-tool dishwashermode read on-mode 1 1 - - On TH(chip-tool), Verify that OnMode attribute value is an integer - - Save the value as new_on_mode_dut and is equal to new_mode_th and below is the sample log provided for the raspi platform, here OnMode attribute value is 2 - - [1690189501.554415][16104:16106] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0003 DataVersion: 1012425329 - [1690189501.554429][16104:16106] CHIP:TOO: OnMode: 2 - disabled: true - - - label: - "Step 9: TH writes to the DUT the StartUpOnOff attribute with the - value 1." - PICS: OO.S.A4003 - verification: | - ./chip-tool onoff write start-up-on-off 1 1 1 - - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1651101661960] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651101661960] [90832:7598169] CHIP: [DMG] }, - disabled: true - - - label: "Step 10: Physically power cycle the device" - verification: | - Physically power cycle the device. - disabled: true - - - label: "Step 11: TH reads from the DUT the StartUpMode attribute." - PICS: DISHM.S.A0002 - verification: | - ./chip-tool dishwashermode read start-up-mode 1 1 - - On TH(chip-tool), Verify that StartUpMode attribute value is an integer and is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is 0 - - [1651099663211] [82177:7560652] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 2609052118 - [1651099663212] [82177:7560652] CHIP: [TOO] StartUpMode: 0 - disabled: true - - - label: "Step 12: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 - verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_on_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 2 - - [1690189536.790233][16118:16120] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 4080703118 - [1690189536.790280][16118:16120] CHIP:TOO: CurrentMode: 2 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml index 8954d44a65..47393f4493 100755 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml @@ -194,9 +194,7 @@ tests: value: 2 - label: "Step 1j: Simulate a not fully locked scenario on the DUT." - PICS: - DRLK.S.A0000 && DRLK.S.M.SimulateNotFullyLocked && - PICS_SKIP_SAMPLE_APP + PICS: DRLK.S.A0000 && DRLK.S.M.SimulateNotFullyLocked && PICS_USER_PROMPT verification: | vendor will give instructions on how to simulate if applicable and if that is possible, then send the below command to read the lock state attribute. @@ -317,7 +315,7 @@ tests: #Test plan issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/2863 - label: "Step 5c: TH reads DoorOpenEvents attribute from DUT" - PICS: DRLK.S.A0004 && PICS_SKIP_SAMPLE_APP + PICS: DRLK.S.A0004 && PICS_USER_PROMPT verification: | This is an Optional attribute, so its not compulsory to get the expected outcome @@ -371,7 +369,7 @@ tests: #Test plan issue: https://github.com/CHIP-Specifications/chip-test-plans/issues/2863 - label: "Step 6c: TH reads DoorOpenEvents attribute from DUT" - PICS: DRLK.S.A0005 && PICS_SKIP_SAMPLE_APP + PICS: DRLK.S.A0005 && PICS_USER_PROMPT verification: | This is an Optional attribute, so its not compulsory to get the expected outcome diff --git a/src/app/tests/suites/certification/Test_TC_EEVSEM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_EEVSEM_3_1.yaml deleted file mode 100644 index 2d38a6c146..0000000000 --- a/src/app/tests/suites/certification/Test_TC_EEVSEM_3_1.yaml +++ /dev/null @@ -1,134 +0,0 @@ -# Copyright (c) 2024 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: 183.3.1. [TC-EEVSEM-3.1] On Mode functionality with DUT as Server - -PICS: - - EEVSEM.S.A0003 - - MOD.S.F00 - - OO.S.C00.Rsp - - OO.S.C01.Rsp - -config: - nodeId: 0x12344321 - cluster: "Energy EVSE Mode" - endpoint: 1 - - ConfigureOnMode: - type: int8u - defaultValue: 0 - new_mode_th: - type: int8u - defaultValue: 2 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: - "Precondition: TH writes from the DUT the OnMode attribute.NOTE: To - execute this test case set onmode to any integer value because as - default it value has null." - PICS: EEVSEM.S.A0003 && MOD.S.F00 - command: "writeAttribute" - attribute: "OnMode" - arguments: - value: ConfigureOnMode - - - label: "Step 2: TH reads from the DUT the OnMode attribute." - PICS: EEVSEM.S.A0003 && MOD.S.F00 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: on_mode_dut - constraints: - type: int8u - minValue: 0 - maxValue: 254 - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: EEVSEM.S.A0001 && MOD.S.F00 - command: "readAttribute" - attribute: "CurrentMode" - response: - saveAs: old_current_mode_dut - constraints: - type: int8u - minValue: 0 - maxValue: 254 - - - label: - "If on_mode_dut is equal to old_current_mode_dut proceed to step 4. - Else proceed to step 6." - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: on_mode_dut - - name: "Value2" - value: old_current_mode_dut - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." - runIf: IsExpectedValue - PICS: EEVSEM.S.A0000 && MOD.S.F00 - command: "readAttribute" - attribute: "SupportedModes" - response: - constraints: - type: list - minLength: 2 - - - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - runIf: IsExpectedValue - PICS: EEVSEM.S.C00.Rsp && MOD.S.F00 - command: "ChangeToMode" - arguments: - values: - - name: "NewMode" - value: new_mode_th - response: - values: - - name: "Status" - value: 0x00 - - - label: "Step 6:TH sends a Off command to the DUT" - PICS: OO.S.C00.Rsp - cluster: "On/Off" - command: "Off" - - - label: "Step 7:TH sends a On command to the DUT" - PICS: OO.S.C01.Rsp - cluster: "On/Off" - command: "On" - - - label: "Step 8: TH reads from the DUT the CurrentMode attribute." - PICS: EEVSEM.S.A0001 && EEVSEM.S.A0003 && MOD.S.F00 - command: "readAttribute" - attribute: "CurrentMode" - response: - value: on_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_EEVSEM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_EEVSEM_3_2.yaml deleted file mode 100644 index 0251528f9f..0000000000 --- a/src/app/tests/suites/certification/Test_TC_EEVSEM_3_2.yaml +++ /dev/null @@ -1,172 +0,0 @@ -# Copyright (c) 2024 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: 269.3.2. [TC-EEVSEM-3.2] Startup Mode functionality with DUT as Server - -PICS: - - EEVSEM.S.A0002 - -config: - nodeId: 0x12344321 - cluster: "Energy EVSE Mode" - endpoint: 1 - - new_start_up_mode_th: - type: int8u - defaultValue: 0 - new_mode_th: - type: int8u - defaultValue: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: EEVSEM.S.A0002 - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: startup_mode_dut - - - label: - "Step 2: If startup_mode_dut is null proceed to step 3. Else save - startup_mode_dut as new_start_up_mode_th and proceed to step 5." - PICS: EEVSEM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: null - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - runIf: IsExpectedValue - PICS: EEVSEM.S.A0000 - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: supported_modes_dut - constraints: - type: list - minLength: 2 - - label: - "Step 4: TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - PICS: EEVSEM.S.A0002 - runIf: IsExpectedValue - command: "writeAttribute" - attribute: "StartUpMode" - arguments: - value: new_start_up_mode_th - - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." - PICS: EEVSEM.S.A0001 - command: "readAttribute" - attribute: "CurrentMode" - response: - saveAs: old_current_mode_dut - - - label: - "Step 5: If startup_mode_dut is equal to old_current_mode_dut proceed - to step 6. Else proceed to step 8." - PICS: EEVSEM.S.A0001 && EEVSEM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: old_current_mode_dut - response: - - values: - - name: "Equals" - saveAs: Step5_IsExpectedValue - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - PICS: EEVSEM.S.A0000 - runIf: Step5_IsExpectedValue - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: Step6_supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - PICS: EEVSEM.S.C00.Rsp - runIf: Step5_IsExpectedValue - command: "ChangeToMode" - arguments: - values: - - name: "NewMode" - value: new_mode_th - response: - values: - - name: "Status" - value: 0x00 - - - label: "Step 8: Physically power cycle the device" - verification: | - Physically power cycle the device. - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - 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 9: TH reads from the DUT the StartUpMode attribute." - PICS: EEVSEM.S.A0002 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: new_start_up_mode_dut - constraints: - anyOf: [startup_mode_dut, new_start_up_mode_th] - - - label: "Step 10: TH reads from the DUT the CurrentMode attribute." - PICS: EEVSEM.S.A0001 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "CurrentMode" - response: - value: new_start_up_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_EEVSEM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_EEVSEM_3_3.yaml deleted file mode 100644 index e60aa1ca60..0000000000 --- a/src/app/tests/suites/certification/Test_TC_EEVSEM_3_3.yaml +++ /dev/null @@ -1,189 +0,0 @@ -# Copyright (c) 2024 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: - 269.3.3. [TC-EEVSEM-3.3] On Mode and Startup Mode functionality with DUT as - Server - -PICS: - - EEVSEM.S.A0002 - - EEVSEM.S.A0003 - - MOD.S.F00 - - OO.S.A4003 - -config: - nodeId: 0x12344321 - cluster: "Energy EVSE Mode" - endpoint: 1 - - new_start_up_mode_th: - type: int8u - defaultValue: 0 - new_mode_th: - type: int8u - defaultValue: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: EEVSEM.S.A0002 - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: startup_mode_dut - - - label: - "Step 2: If startup_mode_dut is null proceed to step 3. Else save - startup_mode_dut as new_start_up_mode_th and proceed to step 5." - PICS: EEVSEM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: null - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - runIf: IsExpectedValue - PICS: EEVSEM.S.A0000 - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 4: TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - PICS: EEVSEM.S.A0002 - runIf: IsExpectedValue - command: "writeAttribute" - attribute: "StartUpMode" - arguments: - value: new_start_up_mode_th - - - label: "Step 5: TH reads from the DUT the OnMode attribute." - PICS: EEVSEM.S.A0003 && EEVSEM.S.A0002 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: old_on_mode_dut - - - label: - "Step 5: If startup_mode_dut is equal to old_on_mode_dut proceed to - step 6. Else proceed to step 8." - PICS: EEVSEM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: old_on_mode_dut - - name: "Value2" - value: startup_mode_dut - response: - - values: - - name: "Equals" - saveAs: Step5_IsExpectedValue - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - PICS: EEVSEM.S.A0000 && EEVSEM.S.A0002 - runIf: Step5_IsExpectedValue - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: Step6_supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 7: TH writes to the DUT the OnMode attribute with the - new_mode_th value" - PICS: EEVSEM.S.A0003 - runIf: Step5_IsExpectedValue - command: "writeAttribute" - attribute: "OnMode" - arguments: - value: new_mode_th - - - label: "Step 8: TH reads from the DUT the OnMode attribute." - PICS: EEVSEM.S.A0003 && MOD.S.F00 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: new_on_mode_dut - - - label: - "Step 9: TH writes to the DUT the StartUpOnOff attribute with the - value 1." - PICS: OO.S.A4003 - cluster: "On/Off" - command: "writeAttribute" - attribute: "StartUpOnOff" - arguments: - value: 1 - - - label: "Step 10: Physically power cycle the device" - verification: | - Physically power cycle the device. - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - 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 11: TH reads from the DUT the StartUpMode attribute." - PICS: EEVSEM.S.A0002 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "StartUpMode" - response: - constraints: - anyOf: [new_start_up_mode_th, startup_mode_dut] - - - label: "Step 12: TH reads from the DUT the CurrentMode attribute." - PICS: EEVSEM.S.A0001 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "CurrentMode" - response: - value: new_on_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_FLDCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FLDCONC_1_1.yaml deleted file mode 100644 index 14f37e7cbb..0000000000 --- a/src/app/tests/suites/certification/Test_TC_FLDCONC_1_1.yaml +++ /dev/null @@ -1,339 +0,0 @@ -# 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: 145.1.1. [TC-FLDCONC-1.1] Global Attributes with DUT as Server - -PICS: - - FLDCONC.S - -config: - nodeId: 0x12344321 - cluster: "Formaldehyde Concentration Measurement" - endpoint: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 3 - constraints: - type: int16u - - - label: - "Step 3a: TH reads from the DUT the FeatureMap attribute. and check - for either bit 0 or 1 set" - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x03] - - - label: - "Step 3b: Given FLDCONC.S.F00(MEA) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: FLDCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x1] - - - label: - "Step 3c: Given FLDCONC.S.F00(MEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !FLDCONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x1] - - - label: - "Step 3d: Given FLDCONC.S.F01(LEV) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: FLDCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2] - - - label: - "Step 3e: Given FLDCONC.S.F01(LEV) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !FLDCONC.S.F01 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x2] - - - label: - "Step 3f: Given FLDCONC.S.F02(MED) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: FLDCONC.S.F02 && FLDCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x4, 0x2] - - - label: - "Step 3g: Given FLDCONC.S.F02(MED) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !FLDCONC.S.F02 && !FLDCONC.S.F01" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x4] - - - label: - "Step 3h: Given FLDCONC.S.F03(CRI) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: FLDCONC.S.F03 && FLDCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x8, 0x2] - - - label: - "Step 3i: Given FLDCONC.S.F03(CRI) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !FLDCONC.S.F03 && !FLDCONC.S.F01 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x8] - - - label: - "Step 3j: Given FLDCONC.S.F04(PEA) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: FLDCONC.S.F04 && FLDCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x10, 0x1] - - - label: - "Step 3k: Given FLDCONC.S.F04(PEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !FLDCONC.S.F04 && !FLDCONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x10] - - - label: - "Step 3l: Given FLDCONC.S.F05(AVG) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: FLDCONC.S.F05 && FLDCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x20, 0x1] - - - label: - "Step 3m: Given FLDCONC.S.F05(AVG) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !FLDCONC.S.F05 && !FLDCONC.S.F00" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x20] - - - label: "Step 4a: TH reads from the DUT the AttributeList attribute." - command: "readAttribute" - attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED - response: - constraints: - type: list - contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] - - - label: "Step 4a: TH reads from the DUT the AttributeList attribute." - command: "readAttribute" - attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED" - response: - constraints: - type: list - contains: [9, 65528, 65529, 65531, 65532, 65533] - - - label: - "Step 4b: TH reads the optional attribute Uncertainty in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: FLDCONC.S.A0007 && FLDCONC.S.F00 - response: - constraints: - type: list - contains: [7] - - - label: - "Step 4c: Check the optional attribute Uncertainty is excluded from - AttributeList when FLDCONC.S.A0007 is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !FLDCONC.S.A0007 " - response: - constraints: - type: list - excludes: [7] - - - label: - "Step 4d: TH reads the optional, feature dependent attributes - MeasuredValue, MinMeasuredValue, MaxMeasuredValue and Measurement Unit - in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: FLDCONC.S.F00 - response: - constraints: - type: list - contains: [0, 1, 2, 8] - - - label: - "Step 4e: Check that MeasuredValue, MinMeasuredValue, - MaxMeasuredValue, Measurement Unit and Uncertainty are excluded from - AttributeList when FLDCONC.S.F00 (MEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !FLDCONC.S.F00 " - response: - constraints: - type: list - excludes: [0, 1, 2, 7, 8] - - - label: - "Step 4f: TH reads the optional, feature dependent attributes - PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: FLDCONC.S.F04 - response: - constraints: - type: list - contains: [3, 4] - - - label: - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are - excluded from AttributeList when FLDCONC.S.F04 (PEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !FLDCONC.S.F04 " - response: - constraints: - type: list - excludes: [3, 4] - - - label: - "Step 4h: TH reads the optional, feature dependent attributes - AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: FLDCONC.S.F05 - response: - constraints: - type: list - contains: [5, 6] - - - label: - "Step 4i: Check that AverageMeasuredValue and - AverageMeasuredValueWindow are excluded from AttributeList when - FLDCONC.S.F05 (AVG) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !FLDCONC.S.F05 " - response: - constraints: - type: list - excludes: [5, 6] - - - label: - "Step 4j: TH reads the optional, feature dependent attribute - LevelValue in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: FLDCONC.S.F01 - response: - constraints: - type: list - contains: [10] - - - label: - "Step 4k: Check that LevelValue is excluded from AttributeList when - FLDCONC.S.F01 (LEV) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !FLDCONC.S.F01 " - response: - constraints: - type: list - excludes: [10] - - - label: "Step 5: TH reads from the DUT the EventList attribute." - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "EventList" - response: - value: [] - constraints: - type: list - - - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [] - constraints: - type: list - - - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list diff --git a/src/app/tests/suites/certification/Test_TC_ICDM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ICDM_1_1.yaml deleted file mode 100755 index fb507fd7a8..0000000000 --- a/src/app/tests/suites/certification/Test_TC_ICDM_1_1.yaml +++ /dev/null @@ -1,223 +0,0 @@ -# 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: 312.1.1. [TC-ICDM-1.1] Global attributes with DUT as Server - -PICS: - - ICDM.S - -config: - nodeId: 0x12344321 - cluster: "ICD Management" - endpoint: 0 - -tests: - - label: "Step 1: Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads ClusterRevision attribute from DUT" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 3 - constraints: - type: int16u - - - label: "Step 3: TH reads FeatureMap attribute from DUT" - PICS: " !ICDM.S.F00 && !ICDM.S.F01 && !ICDM.S.F02 " - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 0 - constraints: - type: bitmap32 - - - label: - "Step 3: TH reads FeatureMap attribute from DUT, bit 0 is set to 1 if - ICDM.S.F00(UAT) is true," - PICS: ICDM.S.F00 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - hasMasksSet: [0x1] - type: bitmap32 - - - label: - "Step 3: TH reads FeatureMap attribute from DUT, bit 1 is set to 1 if - ICDM.S.F01(CIP) is true" - PICS: ICDM.S.F01 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - hasMasksSet: [0x2] - type: bitmap32 - - - label: - "Step 3: TH reads FeatureMap attribute from DUT, bit 2 is set to 1 if - ICDM.S.F02(UAT) is true," - PICS: ICDM.S.F02 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - hasMasksSet: [0x4] - type: bitmap32 - - - label: "Step 4a: TH reads AttributeList attribute from DUT" - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [0, 1, 2, 65528, 65529, 65530, 65531, 65532, 65533] - - - label: "Step 4a: TH reads AttributeList attribute from DUT" - PICS: "!PICS_EVENT_LIST_ENABLED" - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [0, 1, 2, 65528, 65529, 65531, 65532, 65533] - - - label: - "Step 4b: Read the optional attribute(RegisteredClients) in - AttributeList" - PICS: ICDM.S.A0003 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [3] - - - label: "Step 4c: Read the optional attribute(IcdCounter) in AttributeList" - PICS: ICDM.S.A0004 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [4] - - - label: - "Step 4d: Read the optional attribute(ClientsSupportedPerFabric) in - AttributeList" - PICS: ICDM.S.A0005 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [5] - - - label: - "Step 4d: Read the optional attribute(UserActiveModeTriggerHint) in - AttributeList" - PICS: ICDM.S.A0006 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [6] - - - label: - "Step 4d: Read the optional - attribute(UserActiveModeTriggerInstruction) in AttributeList" - PICS: ICDM.S.A0007 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [7] - - - label: "Step 5: Read the global attribute: EventList" - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "EventList" - response: - value: [] - constraints: - type: list - - - label: "Step 6a: TH reads AcceptedCommandList attribute from DUT" - PICS: " !ICDM.S.F00 && !ICDM.S.C03.Rsp " - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [] - constraints: - type: list - - - label: - "Step 6b: TH reads AcceptedCommandList attribute from DUT if - ICDM.S.F00 is true" - PICS: ICDM.S.F00 - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - constraints: - type: list - contains: [0, 2] - - - label: - "Step 6c: Read the optional command (StayActiveRequest) in - AttributeList" - PICS: ICDM.S.C03.Rsp - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - constraints: - type: list - contains: [3] - - - label: "Step 7: TH reads GeneratedCommandList attribute from DUT" - PICS: " !ICDM.S.F00 " - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list - - - label: "Step 7: TH reads GeneratedCommandList attribute from DUT" - PICS: ICDM.S.F00 - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - constraints: - type: list - contains: [1] - - - label: - "Step 7: TH reads GeneratedCommandList attribute from DUT. The list - MAY include these optional entries: 0x04: SHALL be included if and - only if ICDM.S.C04.Tx(StayActiveResponse) " - PICS: ICDM.S.C04.Tx - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - constraints: - type: list - contains: [4] diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml deleted file mode 100644 index cb10e8a1d1..0000000000 --- a/src/app/tests/suites/certification/Test_TC_LTIME_1_2.yaml +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright (c) 2021 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: 108.1.2. [TC-LTIME-1.2] Global Attributes with DUT as Server - -PICS: - - LTIME.S - -config: - nodeId: 0x12344321 - cluster: "Time Format Localization" - endpoint: 0 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 1 - constraints: - type: int16u - - - label: "Step 3: TH reads from the DUT the FeatureMap attribute." - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - minValue: 0 - maxValue: 1 - - - label: "Step 4a: TH reads from the DUT the AttributeList attribute." - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [0, 65528, 65529, 65530, 65531, 65532, 65533] - - - label: "Step 4a: TH reads from the DUT the AttributeList attribute." - PICS: "!PICS_EVENT_LIST_ENABLED" - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [0, 65528, 65529, 65531, 65532, 65533] - - - label: - "Step 4b: TH reads Feature dependent attribute(ActiveCalendarType) in - AttributeList from DUT" - PICS: LTIME.S.F00 && LTIME.S.A0001 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [1] - - - label: - "Step 4c: TH reads Feature dependent attribute(SupportedCalendarTypes) - in AttributeList from DUT" - PICS: LTIME.S.F00 && LTIME.S.A0002 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [2] - - - label: "Step 5: TH reads from the DUT the EventList attribute." - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "EventList" - response: - value: [] - constraints: - type: list - - - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [] - constraints: - type: list - - - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list diff --git a/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml index 8e9ee05b33..aa0fbcfddc 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml @@ -188,6 +188,16 @@ tests: minValue: MinLevelFeatureMapNotSupportedValue maxValue: MaxLevelFeatureMapNotSupportedValue + - label: "Step 9c: TH reads the OnLevel attribute from the DUT" + PICS: LVL.S.A0011 && !LVL.S.F01 && !LVL.S.A0002 && !LVL.S.A0003 + command: "readAttribute" + attribute: "OnLevel" + response: + constraints: + type: int8u + minValue: 0 + maxValue: 254 + - label: "Step 10: TH reads the OnTransitionTime attribute from the DUT" PICS: LVL.S.A0012 command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_LWM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LWM_3_1.yaml deleted file mode 100644 index 2bafddfa30..0000000000 --- a/src/app/tests/suites/certification/Test_TC_LWM_3_1.yaml +++ /dev/null @@ -1,134 +0,0 @@ -# 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: 183.3.1. [TC-LWM-3.1] On Mode functionality with DUT as Server - -PICS: - - LWM.S.A0003 - - MOD.S.F00 - - OO.S.C00.Rsp - - OO.S.C01.Rsp - -config: - nodeId: 0x12344321 - cluster: "Laundry Washer Mode" - endpoint: 1 - - ConfigureOnMode: - type: int8u - defaultValue: 0 - new_mode_th: - type: int8u - defaultValue: 2 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: - "Precondition: TH writes from the DUT the OnMode attribute.NOTE: To - execute this test case set onmode to any integer value because as - default it value has null." - PICS: LWM.S.A0003 && MOD.S.F00 - command: "writeAttribute" - attribute: "OnMode" - arguments: - value: ConfigureOnMode - - - label: "Step 2: TH reads from the DUT the OnMode attribute." - PICS: LWM.S.A0003 && MOD.S.F00 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: on_mode_dut - constraints: - type: int8u - minValue: 0 - maxValue: 254 - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: LWM.S.A0001 && MOD.S.F00 - command: "readAttribute" - attribute: "CurrentMode" - response: - saveAs: old_current_mode_dut - constraints: - type: int8u - minValue: 0 - maxValue: 254 - - - label: - "If on_mode_dut is equal to old_current_mode_dut proceed to step 4. - Else proceed to step 6." - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: on_mode_dut - - name: "Value2" - value: old_current_mode_dut - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." - runIf: IsExpectedValue - PICS: LWM.S.A0000 && MOD.S.F00 - command: "readAttribute" - attribute: "SupportedModes" - response: - constraints: - type: list - minLength: 2 - - - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - runIf: IsExpectedValue - PICS: LWM.S.C00.Rsp && MOD.S.F00 - command: "ChangeToMode" - arguments: - values: - - name: "NewMode" - value: new_mode_th - response: - values: - - name: "Status" - value: 0x00 - - - label: "Step 6:TH sends a Off command to the DUT" - PICS: OO.S.C00.Rsp && MOD.S.F00 - cluster: "On/Off" - command: "Off" - - - label: "Step 7:TH sends a On command to the DUT" - PICS: OO.S.C01.Rsp && MOD.S.F00 - cluster: "On/Off" - command: "On" - - - label: "Step 8: TH reads from the DUT the CurrentMode attribute." - PICS: LWM.S.A0001 && MOD.S.F00 - command: "readAttribute" - attribute: "CurrentMode" - response: - value: on_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_LWM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_LWM_3_2.yaml deleted file mode 100644 index fe8ff87e21..0000000000 --- a/src/app/tests/suites/certification/Test_TC_LWM_3_2.yaml +++ /dev/null @@ -1,172 +0,0 @@ -# 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: 183.3.2. [TC-LWM-3.2] Startup Mode functionality with DUT as Server - -PICS: - - LWM.S.A0002 - -config: - nodeId: 0x12344321 - cluster: "Laundry Washer Mode" - endpoint: 1 - - new_start_up_mode_th: - type: int8u - defaultValue: 0 - new_mode_th: - type: int8u - defaultValue: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: LWM.S.A0002 - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: startup_mode_dut - - - label: - "Step 2: If startup_mode_dut is null proceed to step 3. Else save - startup_mode_dut as new_start_up_mode_th and proceed to step 5." - PICS: LWM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: null - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - runIf: IsExpectedValue - PICS: LWM.S.A0000 - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: supported_modes_dut - constraints: - type: list - minLength: 2 - - label: - "Step 4: TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - PICS: LWM.S.A0002 - runIf: IsExpectedValue - command: "writeAttribute" - attribute: "StartUpMode" - arguments: - value: new_start_up_mode_th - - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." - PICS: LWM.S.A0001 - command: "readAttribute" - attribute: "CurrentMode" - response: - saveAs: old_current_mode_dut - - - label: - "Step 5: If startup_mode_dut is equal to old_current_mode_dut proceed - to step 6. Else proceed to step 8." - PICS: LWM.S.A0001 && LWM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: old_current_mode_dut - response: - - values: - - name: "Equals" - saveAs: Step5_IsExpectedValue - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - PICS: LWM.S.A0000 - runIf: Step5_IsExpectedValue - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: Step6_supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - PICS: LWM.S.C00.Rsp - runIf: Step5_IsExpectedValue - command: "ChangeToMode" - arguments: - values: - - name: "NewMode" - value: new_mode_th - response: - values: - - name: "Status" - value: 0x00 - - - label: "Step 8: Physically power cycle the device" - verification: | - Physically power cycle the device. - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - 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 9: TH reads from the DUT the StartUpMode attribute." - PICS: LWM.S.A0002 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: new_start_up_mode_dut - constraints: - anyOf: [startup_mode_dut, new_start_up_mode_th] - - - label: "Step 10: TH reads from the DUT the CurrentMode attribute." - PICS: LWM.S.A0001 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "CurrentMode" - response: - value: new_start_up_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_LWM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_LWM_3_3.yaml deleted file mode 100644 index bf97f17f28..0000000000 --- a/src/app/tests/suites/certification/Test_TC_LWM_3_3.yaml +++ /dev/null @@ -1,189 +0,0 @@ -# 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: - 183.3.3. [TC-LWM-3.3] On Mode and Startup Mode functionality with DUT as - Server - -PICS: - - LWM.S.A0002 - - LWM.S.A0003 - - MOD.S.F00 - - OO.S.A4003 - -config: - nodeId: 0x12344321 - cluster: "Laundry Washer Mode" - endpoint: 1 - - new_start_up_mode_th: - type: int8u - defaultValue: 0 - new_mode_th: - type: int8u - defaultValue: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: LWM.S.A0002 - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: startup_mode_dut - - - label: - "Step 2: If startup_mode_dut is null proceed to step 3. Else save - startup_mode_dut as new_start_up_mode_th and proceed to step 5." - PICS: LWM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: null - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - runIf: IsExpectedValue - PICS: LWM.S.A0000 - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 4: TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - PICS: LWM.S.A0002 - runIf: IsExpectedValue - command: "writeAttribute" - attribute: "StartUpMode" - arguments: - value: new_start_up_mode_th - - - label: "Step 5: TH reads from the DUT the OnMode attribute." - PICS: LWM.S.A0003 && LWM.S.A0002 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: old_on_mode_dut - - - label: - "Step 5: If startup_mode_dut is equal to old_on_mode_dut proceed to - step 6. Else proceed to step 8." - PICS: LWM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: old_on_mode_dut - - name: "Value2" - value: startup_mode_dut - response: - - values: - - name: "Equals" - saveAs: Step5_IsExpectedValue - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - PICS: LWM.S.A0000 && LWM.S.A0002 - runIf: Step5_IsExpectedValue - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: Step6_supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 7: TH writes to the DUT the OnMode attribute with the - new_mode_th value" - PICS: LWM.S.A0003 - runIf: Step5_IsExpectedValue - command: "writeAttribute" - attribute: "OnMode" - arguments: - value: new_mode_th - - - label: "Step 8: TH reads from the DUT the OnMode attribute." - PICS: LWM.S.A0003 && MOD.S.F00 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: new_on_mode_dut - - - label: - "Step 9: TH writes to the DUT the StartUpOnOff attribute with the - value 1." - PICS: OO.S.A4003 - cluster: "On/Off" - command: "writeAttribute" - attribute: "StartUpOnOff" - arguments: - value: 1 - - - label: "Step 10: Physically power cycle the device" - verification: | - Physically power cycle the device. - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - 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 11: TH reads from the DUT the StartUpMode attribute." - PICS: LWM.S.A0002 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "StartUpMode" - response: - constraints: - anyOf: [new_start_up_mode_th, startup_mode_dut] - - - label: "Step 12: TH reads from the DUT the CurrentMode attribute." - PICS: LWM.S.A0001 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "CurrentMode" - response: - value: new_on_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml b/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml deleted file mode 100644 index 51f389b6af..0000000000 --- a/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml +++ /dev/null @@ -1,722 +0,0 @@ -# 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 81.1.3. [TC-MOD-1.3] Attributes with client as DUT - -PICS: - - MOD.C - - MOD.C.AM-READ - - MOD.C.AO-READ - - MOD.C.AM-WRITE - - MOD.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: DUT reads all supported mandatory attributes from TH one at a - time in a manufacturer specific order" - PICS: MOD.C.AM-READ - verification: | - ./chip-tool modeselect read supported-modes 1 1 - - Verify the "SupportedModes response" on the TH (all-cluster-app) log: - - [1666940683.282921][9718:9718] CHIP:DMG: ReportDataMessage = - [1666940683.282923][9718:9718] CHIP:DMG: { - [1666940683.282925][9718:9718] CHIP:DMG: AttributeReportIBs = - [1666940683.282928][9718:9718] CHIP:DMG: [ - [1666940683.282929][9718:9718] CHIP:DMG: AttributeReportIB = - [1666940683.282933][9718:9718] CHIP:DMG: { - [1666940683.282935][9718:9718] CHIP:DMG: AttributeDataIB = - [1666940683.282937][9718:9718] CHIP:DMG: { - [1666940683.282939][9718:9718] CHIP:DMG: DataVersion = 0xb4a9126f, - [1666940683.282941][9718:9718] CHIP:DMG: AttributePathIB = - [1666940683.282944][9718:9718] CHIP:DMG: { - [1666940683.282946][9718:9718] CHIP:DMG: Endpoint = 0x1, - [1666940683.282948][9718:9718] CHIP:DMG: Cluster = 0x50, - [1666940683.282950][9718:9718] CHIP:DMG: Attribute = 0x0000_0002, - [1666940683.282952][9718:9718] CHIP:DMG: } - [1666940683.282955][9718:9718] CHIP:DMG: - [1666940683.282957][9718:9718] CHIP:DMG: Data = [ - [1666940683.282959][9718:9718] CHIP:DMG: - [1666940683.282962][9718:9718] CHIP:DMG: ], - [1666940683.282964][9718:9718] CHIP:DMG: }, - [1666940683.282966][9718:9718] CHIP:DMG: - [1666940683.282968][9718:9718] CHIP:DMG: }, - [1666940683.282972][9718:9718] CHIP:DMG: - [1666940683.282974][9718:9718] CHIP:DMG: AttributeReportIB = - [1666940683.282978][9718:9718] CHIP:DMG: { - [1666940683.282980][9718:9718] CHIP:DMG: AttributeDataIB = - [1666940683.282982][9718:9718] CHIP:DMG: { - [1666940683.282984][9718:9718] CHIP:DMG: DataVersion = 0xb4a9126f, - [1666940683.282986][9718:9718] CHIP:DMG: AttributePathIB = - [1666940683.282988][9718:9718] CHIP:DMG: { - [1666940683.282990][9718:9718] CHIP:DMG: Endpoint = 0x1, - [1666940683.282992][9718:9718] CHIP:DMG: Cluster = 0x50, - [1666940683.282995][9718:9718] CHIP:DMG: Attribute = 0x0000_0002, - [1666940683.282997][9718:9718] CHIP:DMG: ListIndex = Null, - [1666940683.282999][9718:9718] CHIP:DMG: } - [1666940683.283001][9718:9718] CHIP:DMG: - [1666940683.283003][9718:9718] CHIP:DMG: Data = - [1666940683.283005][9718:9718] CHIP:DMG: { - [1666940683.283008][9718:9718] CHIP:DMG: 0x0 = "Black" (5 chars), - [1666940683.283011][9718:9718] CHIP:DMG: 0x1 = 0, - [1666940683.283013][9718:9718] CHIP:DMG: 0x2 = [ - [1666940683.283015][9718:9718] CHIP:DMG: - [1666940683.283020][9718:9718] CHIP:DMG: { - [1666940683.283022][9718:9718] CHIP:DMG: 0x0 = 0, - [1666940683.283025][9718:9718] CHIP:DMG: 0x1 = 0, - [1666940683.283027][9718:9718] CHIP:DMG: }, - [1666940683.283030][9718:9718] CHIP:DMG: ], - [1666940683.283032][9718:9718] CHIP:DMG: }, - [1666940683.283034][9718:9718] CHIP:DMG: }, - [1666940683.283037][9718:9718] CHIP:DMG: - [1666940683.283039][9718:9718] CHIP:DMG: }, - [1666940683.283044][9718:9718] CHIP:DMG: - [1666940683.283046][9718:9718] CHIP:DMG: AttributeReportIB = - [1666940683.283049][9718:9718] CHIP:DMG: { - [1666940683.283051][9718:9718] CHIP:DMG: AttributeDataIB = - [1666940683.283053][9718:9718] CHIP:DMG: { - [1666940683.283055][9718:9718] CHIP:DMG: DataVersion = 0xb4a9126f, - [1666940683.283057][9718:9718] CHIP:DMG: AttributePathIB = - [1666940683.283059][9718:9718] CHIP:DMG: { - [1666940683.283061][9718:9718] CHIP:DMG: Endpoint = 0x1, - [1666940683.283064][9718:9718] CHIP:DMG: Cluster = 0x50, - [1666940683.283066][9718:9718] CHIP:DMG: Attribute = 0x0000_0002, - [1666940683.283068][9718:9718] CHIP:DMG: ListIndex = Null, - [1666940683.283070][9718:9718] CHIP:DMG: } - [1666940683.283072][9718:9718] CHIP:DMG: - [1666940683.283074][9718:9718] CHIP:DMG: Data = - [1666940683.283076][9718:9718] CHIP:DMG: { - [1666940683.283079][9718:9718] CHIP:DMG: 0x0 = "Cappuccino" (10 chars), - [1666940683.283081][9718:9718] CHIP:DMG: 0x1 = 4, - [1666940683.283084][9718:9718] CHIP:DMG: 0x2 = [ - [1666940683.283086][9718:9718] CHIP:DMG: - [1666940683.283088][9718:9718] CHIP:DMG: { - [1666940683.283091][9718:9718] CHIP:DMG: 0x0 = 0, - [1666940683.283093][9718:9718] CHIP:DMG: 0x1 = 0, - [1666940683.283095][9718:9718] CHIP:DMG: }, - [1666940683.283098][9718:9718] CHIP:DMG: ], - [1666940683.283100][9718:9718] CHIP:DMG: }, - [1666940683.283102][9718:9718] CHIP:DMG: }, - [1666940683.283105][9718:9718] CHIP:DMG: - [1666940683.283107][9718:9718] CHIP:DMG: }, - [1666940683.283112][9718:9718] CHIP:DMG: - [1666940683.283114][9718:9718] CHIP:DMG: AttributeReportIB = - [1666940683.283117][9718:9718] CHIP:DMG: { - [1666940683.283119][9718:9718] CHIP:DMG: AttributeDataIB = - [1666940683.283121][9718:9718] CHIP:DMG: { - [1666940683.283123][9718:9718] CHIP:DMG: DataVersion = 0xb4a9126f, - [1666940683.283125][9718:9718] CHIP:DMG: AttributePathIB = - [1666940683.283128][9718:9718] CHIP:DMG: { - [1666940683.283130][9718:9718] CHIP:DMG: Endpoint = 0x1, - [1666940683.283132][9718:9718] CHIP:DMG: Cluster = 0x50, - [1666940683.283134][9718:9718] CHIP:DMG: Attribute = 0x0000_0002, - [1666940683.283136][9718:9718] CHIP:DMG: ListIndex = Null, - [1666940683.283138][9718:9718] CHIP:DMG: } - [1666940683.283141][9718:9718] CHIP:DMG: - [1666940683.283143][9718:9718] CHIP:DMG: Data = - [1666940683.283145][9718:9718] CHIP:DMG: { - [1666940683.283148][9718:9718] CHIP:DMG: 0x0 = "Espresso" (8 chars), - [1666940683.283150][9718:9718] CHIP:DMG: 0x1 = 7, - [1666940683.283152][9718:9718] CHIP:DMG: 0x2 = [ - [1666940683.283154][9718:9718] CHIP:DMG: - [1666940683.283157][9718:9718] CHIP:DMG: { - [1666940683.283159][9718:9718] CHIP:DMG: 0x0 = 0, - [1666940683.283161][9718:9718] CHIP:DMG: 0x1 = 0, - [1666940683.283164][9718:9718] CHIP:DMG: }, - [1666940683.283167][9718:9718] CHIP:DMG: ], - [1666940683.283169][9718:9718] CHIP:DMG: }, - [1666940683.283171][9718:9718] CHIP:DMG: }, - [1666940683.283174][9718:9718] CHIP:DMG: - [1666940683.283176][9718:9718] CHIP:DMG: }, - [1666940683.283179][9718:9718] CHIP:DMG: - [1666940683.283181][9718:9718] CHIP:DMG: ], - [1666940683.283188][9718:9718] CHIP:DMG: - [1666940683.283190][9718:9718] CHIP:DMG: SuppressResponse = true, - [1666940683.283192][9718:9718] CHIP:DMG: InteractionModelRevision = 1 - - - ./chip-tool modeselect read current-mode 1 1 - - Verify the "CurrentMode response" on the TH (all-cluster-app) log: - - [1666940720.150375][9718:9718] CHIP:DMG: ReportDataMessage = - [1666940720.150377][9718:9718] CHIP:DMG: { - [1666940720.150379][9718:9718] CHIP:DMG: AttributeReportIBs = - [1666940720.150382][9718:9718] CHIP:DMG: [ - [1666940720.150384][9718:9718] CHIP:DMG: AttributeReportIB = - [1666940720.150387][9718:9718] CHIP:DMG: { - [1666940720.150389][9718:9718] CHIP:DMG: AttributeDataIB = - [1666940720.150391][9718:9718] CHIP:DMG: { - [1666940720.150394][9718:9718] CHIP:DMG: DataVersion = 0xb4a9126f, - [1666940720.150396][9718:9718] CHIP:DMG: AttributePathIB = - [1666940720.150399][9718:9718] CHIP:DMG: { - [1666940720.150402][9718:9718] CHIP:DMG: Endpoint = 0x1, - [1666940720.150404][9718:9718] CHIP:DMG: Cluster = 0x50, - [1666940720.150406][9718:9718] CHIP:DMG: Attribute = 0x0000_0003, - [1666940720.150408][9718:9718] CHIP:DMG: } - [1666940720.150411][9718:9718] CHIP:DMG: - [1666940720.150414][9718:9718] CHIP:DMG: Data = 0, - [1666940720.150416][9718:9718] CHIP:DMG: }, - [1666940720.150419][9718:9718] CHIP:DMG: - [1666940720.150421][9718:9718] CHIP:DMG: }, - [1666940720.150424][9718:9718] CHIP:DMG: - [1666940720.150426][9718:9718] CHIP:DMG: ], - [1666940720.150429][9718:9718] CHIP:DMG: - [1666940720.150431][9718:9718] CHIP:DMG: SuppressResponse = true, - [1666940720.150433][9718:9718] CHIP:DMG: InteractionModelRevision = 1 - - ./chip-tool modeselect read standard-namespace 1 1 - - Verify the "StandardNamespace response" on the TH (all-cluster-app) log: - - 1668497274.561088][9289:9289] CHIP:DMG: ReportDataMessage = - [1668497274.561091][9289:9289] CHIP:DMG: { - [1668497274.561094][9289:9289] CHIP:DMG: AttributeReportIBs = - [1668497274.561100][9289:9289] CHIP:DMG: [ - [1668497274.561103][9289:9289] CHIP:DMG: AttributeReportIB = - [1668497274.561108][9289:9289] CHIP:DMG: { - [1668497274.561111][9289:9289] CHIP:DMG: AttributeDataIB = - [1668497274.561115][9289:9289] CHIP:DMG: { - [1668497274.561119][9289:9289] CHIP:DMG: DataVersion = 0x6c775d5f, - [1668497274.561123][9289:9289] CHIP:DMG: AttributePathIB = - [1668497274.561126][9289:9289] CHIP:DMG: { - [1668497274.561129][9289:9289] CHIP:DMG: Endpoint = 0x1, - [1668497274.561133][9289:9289] CHIP:DMG: Cluster = 0x50, - [1668497274.561137][9289:9289] CHIP:DMG: Attribute = 0x0000_0001, - [1668497274.561142][9289:9289] CHIP:DMG: } - [1668497274.561147][9289:9289] CHIP:DMG: - [1668497274.561153][9289:9289] CHIP:DMG: Data = 0, - [1668497274.561157][9289:9289] CHIP:DMG: }, - [1668497274.561162][9289:9289] CHIP:DMG: - [1668497274.561165][9289:9289] CHIP:DMG: }, - [1668497274.561169][9289:9289] CHIP:DMG: - [1668497274.561172][9289:9289] CHIP:DMG: ], - [1668497274.561177][9289:9289] CHIP:DMG: - [1668497274.561180][9289:9289] CHIP:DMG: SuppressResponse = true, - [1668497274.561183][9289:9289] CHIP:DMG: InteractionModelRevision = 1 - [1668497274.561185][9289:9289] CHIP:DMG: } - - ./chip-tool modeselect read description 1 1 - - Verify the "Description response" on the TH (all-cluster-app) log: - - [1668497391.858312][9289:9289] CHIP:DMG: ReportDataMessage = - [1668497391.858315][9289:9289] CHIP:DMG: { - [1668497391.858318][9289:9289] CHIP:DMG: AttributeReportIBs = - [1668497391.858324][9289:9289] CHIP:DMG: [ - [1668497391.858327][9289:9289] CHIP:DMG: AttributeReportIB = - [1668497391.858331][9289:9289] CHIP:DMG: { - [1668497391.858334][9289:9289] CHIP:DMG: AttributeDataIB = - [1668497391.858338][9289:9289] CHIP:DMG: { - [1668497391.858342][9289:9289] CHIP:DMG: DataVersion = 0x6c775d5f, - [1668497391.858345][9289:9289] CHIP:DMG: AttributePathIB = - [1668497391.858348][9289:9289] CHIP:DMG: { - [1668497391.858352][9289:9289] CHIP:DMG: Endpoint = 0x1, - [1668497391.858355][9289:9289] CHIP:DMG: Cluster = 0x50, - [1668497391.858359][9289:9289] CHIP:DMG: Attribute = 0x0000_0000, - [1668497391.858363][9289:9289] CHIP:DMG: } - [1668497391.858368][9289:9289] CHIP:DMG: - [1668497391.858372][9289:9289] CHIP:DMG: Data = "Coffee" (6 chars), - [1668497391.858375][9289:9289] CHIP:DMG: }, - [1668497391.858380][9289:9289] CHIP:DMG: - [1668497391.858383][9289:9289] CHIP:DMG: }, - [1668497391.858387][9289:9289] CHIP:DMG: - [1668497391.858390][9289:9289] CHIP:DMG: ], - [1668497391.858395][9289:9289] CHIP:DMG: - [1668497391.858398][9289:9289] CHIP:DMG: SuppressResponse = true, - [1668497391.858403][9289:9289] CHIP:DMG: InteractionModelRevision = 1 - [1668497391.858406][9289:9289] CHIP:DMG: } - disabled: true - - - label: - "Step 2: DUT reads all supported optional attributes from TH one at a - time in a manufacturer specific order" - PICS: MOD.C.AO-READ - verification: | - ./chip-tool modeselect read on-mode 1 1 - - Verify the "OnMode response" on the TH (all-cluster-app) log: - - [1666940828.515256][9718:9718] CHIP:DMG: ReportDataMessage = - [1666940828.515259][9718:9718] CHIP:DMG: { - [1666940828.515261][9718:9718] CHIP:DMG: AttributeReportIBs = - [1666940828.515265][9718:9718] CHIP:DMG: [ - [1666940828.515267][9718:9718] CHIP:DMG: AttributeReportIB = - [1666940828.515272][9718:9718] CHIP:DMG: { - [1666940828.515275][9718:9718] CHIP:DMG: AttributeDataIB = - [1666940828.515277][9718:9718] CHIP:DMG: { - [1666940828.515280][9718:9718] CHIP:DMG: DataVersion = 0xb4a9126f, - [1666940828.515282][9718:9718] CHIP:DMG: AttributePathIB = - [1666940828.515285][9718:9718] CHIP:DMG: { - [1666940828.515288][9718:9718] CHIP:DMG: Endpoint = 0x1, - [1666940828.515290][9718:9718] CHIP:DMG: Cluster = 0x50, - [1666940828.515293][9718:9718] CHIP:DMG: Attribute = 0x0000_0005, - [1666940828.515295][9718:9718] CHIP:DMG: } - [1666940828.515298][9718:9718] CHIP:DMG: - [1666940828.515301][9718:9718] CHIP:DMG: Data = NULL - [1666940828.515304][9718:9718] CHIP:DMG: }, - [1666940828.515307][9718:9718] CHIP:DMG: - [1666940828.515309][9718:9718] CHIP:DMG: }, - [1666940828.515312][9718:9718] CHIP:DMG: - [1666940828.515314][9718:9718] CHIP:DMG: ], - [1666940828.515317][9718:9718] CHIP:DMG: - [1666940828.515320][9718:9718] CHIP:DMG: SuppressResponse = true, - [1666940828.515322][9718:9718] CHIP:DMG: InteractionModelRevision = 1 - - ./chip-tool modeselect read start-up-mode 1 1 - - Verify the "StartUpMode response" on the TH (all-cluster-app) log: - - [1666940848.925393][9718:9718] CHIP:DMG: ReportDataMessage = - [1666940848.925396][9718:9718] CHIP:DMG: { - [1666940848.925397][9718:9718] CHIP:DMG: AttributeReportIBs = - [1666940848.925401][9718:9718] CHIP:DMG: [ - [1666940848.925403][9718:9718] CHIP:DMG: AttributeReportIB = - [1666940848.925407][9718:9718] CHIP:DMG: { - [1666940848.925410][9718:9718] CHIP:DMG: AttributeDataIB = - [1666940848.925414][9718:9718] CHIP:DMG: { - [1666940848.925416][9718:9718] CHIP:DMG: DataVersion = 0xb4a9126f, - [1666940848.925418][9718:9718] CHIP:DMG: AttributePathIB = - [1666940848.925421][9718:9718] CHIP:DMG: { - [1666940848.925423][9718:9718] CHIP:DMG: Endpoint = 0x1, - [1666940848.925428][9718:9718] CHIP:DMG: Cluster = 0x50, - [1666940848.925431][9718:9718] CHIP:DMG: Attribute = 0x0000_0004, - [1666940848.925433][9718:9718] CHIP:DMG: } - [1666940848.925436][9718:9718] CHIP:DMG: - [1666940848.925438][9718:9718] CHIP:DMG: Data = 0, - [1666940848.925440][9718:9718] CHIP:DMG: }, - [1666940848.925443][9718:9718] CHIP:DMG: - [1666940848.925445][9718:9718] CHIP:DMG: }, - [1666940848.925448][9718:9718] CHIP:DMG: - [1666940848.925450][9718:9718] CHIP:DMG: ], - [1666940848.925454][9718:9718] CHIP:DMG: - [1666940848.925456][9718:9718] CHIP:DMG: SuppressResponse = true, - [1666940848.925458][9718:9718] CHIP:DMG: InteractionModelRevision = 1 - disabled: true - - - label: - "Step 3: DUT writes a suitable value to all supported mandatory - attributes on the TH one at a time in a manufacturer specific order" - PICS: MOD.C.AM-WRITE - verification: | - This cluster doesn't have any writable attributes - disabled: true - - - label: - "Step 4: DUT writes a suitable value to all supported optional - attributes on the TH one at a time in a manufacturer specific order" - PICS: MOD.C.AO-WRITE - verification: | - ./chip-tool modeselect write on-mode 0 1 1 - - Verify the "WriteRequestMessage" on TH(all-cluster-app) log: - - WriteRequestMessage = - [1673335946.283857][10561:10561] CHIP:DMG: { - [1673335946.283866][10561:10561] CHIP:DMG: suppressResponse = false, - [1673335946.283878][10561:10561] CHIP:DMG: timedRequest = false, - [1673335946.283887][10561:10561] CHIP:DMG: AttributeDataIBs = - [1673335946.283905][10561:10561] CHIP:DMG: [ - [1673335946.283914][10561:10561] CHIP:DMG: AttributeDataIB = - [1673335946.283926][10561:10561] CHIP:DMG: { - [1673335946.283935][10561:10561] CHIP:DMG: AttributePathIB = - [1673335946.283947][10561:10561] CHIP:DMG: { - [1673335946.283959][10561:10561] CHIP:DMG: Endpoint = 0x1, - [1673335946.283971][10561:10561] CHIP:DMG: Cluster = 0x50, - [1673335946.283983][10561:10561] CHIP:DMG: Attribute = 0x0000_0005, - [1673335946.283994][10561:10561] CHIP:DMG: } - [1673335946.284008][10561:10561] CHIP:DMG: - [1673335946.284022][10561:10561] CHIP:DMG: Data = 0, - [1673335946.284032][10561:10561] CHIP:DMG: }, - [1673335946.284046][10561:10561] CHIP:DMG: - [1673335946.284055][10561:10561] CHIP:DMG: ], - [1673335946.284070][10561:10561] CHIP:DMG: - [1673335946.284081][10561:10561] CHIP:DMG: moreChunkedMessages = false, - [1673335946.284091][10561:10561] CHIP:DMG: InteractionModelRevision = 1 - [1673335946.284099][10561:10561] CHIP:DMG: }, - - ./chip-tool modeselect write start-up-mode 0 1 1 - - Verify the "WriteRequestMessage" on TH(all-cluster-app) log: - - WriteRequestMessage = - [1673336054.600463][10561:10561] CHIP:DMG: { - [1673336054.600470][10561:10561] CHIP:DMG: suppressResponse = false, - [1673336054.600479][10561:10561] CHIP:DMG: timedRequest = false, - [1673336054.600486][10561:10561] CHIP:DMG: AttributeDataIBs = - [1673336054.600501][10561:10561] CHIP:DMG: [ - [1673336054.600509][10561:10561] CHIP:DMG: AttributeDataIB = - [1673336054.600521][10561:10561] CHIP:DMG: { - [1673336054.600531][10561:10561] CHIP:DMG: AttributePathIB = - [1673336054.600544][10561:10561] CHIP:DMG: { - [1673336054.600557][10561:10561] CHIP:DMG: Endpoint = 0x1, - [1673336054.600569][10561:10561] CHIP:DMG: Cluster = 0x50, - [1673336054.600582][10561:10561] CHIP:DMG: Attribute = 0x0000_0004, - [1673336054.600593][10561:10561] CHIP:DMG: } - [1673336054.600608][10561:10561] CHIP:DMG: - [1673336054.600621][10561:10561] CHIP:DMG: Data = 0, - [1673336054.600631][10561:10561] CHIP:DMG: }, - [1673336054.600646][10561:10561] CHIP:DMG: - [1673336054.600656][10561:10561] CHIP:DMG: ], - [1673336054.600673][10561:10561] CHIP:DMG: - [1673336054.600683][10561:10561] CHIP:DMG: moreChunkedMessages = false, - [1673336054.600695][10561:10561] CHIP:DMG: InteractionModelRevision = 1 - [1673336054.600704][10561:10561] CHIP:DMG: }, - disabled: true - - - label: - "Step 5: Configure TH such that it implements mandatory and none of - the optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList. Commission DUT to TH again" - verification: | - ./chip-tool modeselect read attribute-list 1 1 - - Verify the "AttributeList response" on the TH (all-cluster-minimal-app) log: - - [1689750639.773775][3545:3547] CHIP:DMG: ReportDataMessage = - [1689750639.773815][3545:3547] CHIP:DMG: { - [1689750639.773846][3545:3547] CHIP:DMG: AttributeReportIBs = - [1689750639.773896][3545:3547] CHIP:DMG: [ - [1689750639.773928][3545:3547] CHIP:DMG: AttributeReportIB = - [1689750639.773980][3545:3547] CHIP:DMG: { - [1689750639.774014][3545:3547] CHIP:DMG: AttributeDataIB = - [1689750639.774052][3545:3547] CHIP:DMG: { - [1689750639.774093][3545:3547] CHIP:DMG: DataVersion = 0x346e22fd, - [1689750639.774132][3545:3547] CHIP:DMG: AttributePathIB = - [1689750639.774174][3545:3547] CHIP:DMG: { - [1689750639.774217][3545:3547] CHIP:DMG: Endpoint = 0x1, - [1689750639.774261][3545:3547] CHIP:DMG: Cluster = 0x50, - [1689750639.774304][3545:3547] CHIP:DMG: Attribute = 0x0000_FFFB, - [1689750639.774347][3545:3547] CHIP:DMG: } - [1689750639.774390][3545:3547] CHIP:DMG: - [1689750639.774430][3545:3547] CHIP:DMG: Data = [ - [1689750639.774515][3545:3547] CHIP:DMG: 0, 1, 2, 3, 65528, 65529, 65530, 65531, 65532, 65533, - [1689750639.774565][3545:3547] CHIP:DMG: ], - [1689750639.774604][3545:3547] CHIP:DMG: }, - [1689750639.774652][3545:3547] CHIP:DMG: - [1689750639.774685][3545:3547] CHIP:DMG: }, - [1689750639.774731][3545:3547] CHIP:DMG: - [1689750639.774761][3545:3547] CHIP:DMG: ], - [1689750639.774804][3545:3547] CHIP:DMG: - [1689750639.774835][3545:3547] CHIP:DMG: SuppressResponse = true, - [1689750639.774867][3545:3547] CHIP:DMG: InteractionModelRevision = 1 - [1689750639.774896][3545:3547] CHIP:DMG: } - - - ./chip-tool modeselect read feature-map 1 1 - - Verify the " FeatureMap " on the TH (all-cluster-minimal-app) log: - - [1666943338.908026][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943338.908028][12769:12769] CHIP:DMG: { - [1666943338.908031][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943338.908035][12769:12769] CHIP:DMG: [ - [1666943338.908038][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943338.908042][12769:12769] CHIP:DMG: { - [1666943338.908045][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943338.908048][12769:12769] CHIP:DMG: { - [1666943338.908051][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943338.908054][12769:12769] CHIP:DMG: AttributePathIB = - [1666943338.908057][12769:12769] CHIP:DMG: { - [1666943338.908060][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943338.908064][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943338.908067][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666943338.908070][12769:12769] CHIP:DMG: } - [1666943338.908074][12769:12769] CHIP:DMG: - [1666943338.908077][12769:12769] CHIP:DMG: Data = 0, - [1666943338.908080][12769:12769] CHIP:DMG: }, - [1666943338.908084][12769:12769] CHIP:DMG: - [1666943338.908086][12769:12769] CHIP:DMG: }, - [1666943338.908090][12769:12769] CHIP:DMG: - [1666943338.908092][12769:12769] CHIP:DMG: ], - [1666943338.908096][12769:12769] CHIP:DMG: - [1666943338.908099][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943338.908102][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666943338.908104][12769:12769] CHIP:DMG: } - - - ./chip-tool modeselect read supported-modes 1 1 - - Verify the "SupportedModes response" on the TH (all-cluster-minimal-app) log: - - 1666943362.813636][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943362.813638][12769:12769] CHIP:DMG: { - [1666943362.813640][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943362.813643][12769:12769] CHIP:DMG: [ - [1666943362.813645][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943362.813650][12769:12769] CHIP:DMG: { - [1666943362.813652][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943362.813655][12769:12769] CHIP:DMG: { - [1666943362.813657][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943362.813659][12769:12769] CHIP:DMG: AttributePathIB = - [1666943362.813662][12769:12769] CHIP:DMG: { - [1666943362.813664][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943362.813666][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943362.813669][12769:12769] CHIP:DMG: Attribute = 0x0000_0002, - [1666943362.813671][12769:12769] CHIP:DMG: } - [1666943362.813674][12769:12769] CHIP:DMG: - [1666943362.813676][12769:12769] CHIP:DMG: Data = [ - [1666943362.813679][12769:12769] CHIP:DMG: - [1666943362.813681][12769:12769] CHIP:DMG: ], - [1666943362.813683][12769:12769] CHIP:DMG: }, - [1666943362.813686][12769:12769] CHIP:DMG: - [1666943362.813688][12769:12769] CHIP:DMG: }, - [1666943362.813692][12769:12769] CHIP:DMG: - [1666943362.813694][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943362.813699][12769:12769] CHIP:DMG: { - [1666943362.813701][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943362.813703][12769:12769] CHIP:DMG: { - [1666943362.813705][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943362.813707][12769:12769] CHIP:DMG: AttributePathIB = - [1666943362.813709][12769:12769] CHIP:DMG: { - [1666943362.813711][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943362.813714][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943362.813716][12769:12769] CHIP:DMG: Attribute = 0x0000_0002, - [1666943362.813719][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943362.813721][12769:12769] CHIP:DMG: } - [1666943362.813725][12769:12769] CHIP:DMG: - [1666943362.813727][12769:12769] CHIP:DMG: Data = - [1666943362.813729][12769:12769] CHIP:DMG: { - [1666943362.813732][12769:12769] CHIP:DMG: 0x0 = "Black" (5 chars), - [1666943362.813735][12769:12769] CHIP:DMG: 0x1 = 0, - [1666943362.813737][12769:12769] CHIP:DMG: 0x2 = [ - [1666943362.813740][12769:12769] CHIP:DMG: - [1666943362.813742][12769:12769] CHIP:DMG: { - [1666943362.813745][12769:12769] CHIP:DMG: 0x0 = 0, - [1666943362.813748][12769:12769] CHIP:DMG: 0x1 = 0, - [1666943362.813750][12769:12769] CHIP:DMG: }, - [1666943362.813752][12769:12769] CHIP:DMG: ], - [1666943362.813755][12769:12769] CHIP:DMG: }, - [1666943362.813756][12769:12769] CHIP:DMG: }, - [1666943362.813760][12769:12769] CHIP:DMG: - [1666943362.813762][12769:12769] CHIP:DMG: }, - [1666943362.813768][12769:12769] CHIP:DMG: - [1666943362.813770][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943362.813775][12769:12769] CHIP:DMG: { - [1666943362.813776][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943362.813779][12769:12769] CHIP:DMG: { - [1666943362.813781][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943362.813783][12769:12769] CHIP:DMG: AttributePathIB = - [1666943362.813786][12769:12769] CHIP:DMG: { - [1666943362.813788][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943362.813790][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943362.813793][12769:12769] CHIP:DMG: Attribute = 0x0000_0002, - [1666943362.813795][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943362.813797][12769:12769] CHIP:DMG: } - [1666943362.813801][12769:12769] CHIP:DMG: - [1666943362.813803][12769:12769] CHIP:DMG: Data = - [1666943362.813805][12769:12769] CHIP:DMG: { - [1666943362.813807][12769:12769] CHIP:DMG: 0x0 = "Cappuccino" (10 chars), - [1666943362.813810][12769:12769] CHIP:DMG: 0x1 = 4, - [1666943362.813812][12769:12769] CHIP:DMG: 0x2 = [ - [1666943362.813814][12769:12769] CHIP:DMG: - [1666943362.813817][12769:12769] CHIP:DMG: { - [1666943362.813820][12769:12769] CHIP:DMG: 0x0 = 0, - [1666943362.813823][12769:12769] CHIP:DMG: 0x1 = 0, - [1666943362.813826][12769:12769] CHIP:DMG: }, - [1666943362.813828][12769:12769] CHIP:DMG: ], - [1666943362.813830][12769:12769] CHIP:DMG: }, - [1666943362.813832][12769:12769] CHIP:DMG: }, - [1666943362.813836][12769:12769] CHIP:DMG: - [1666943362.813838][12769:12769] CHIP:DMG: }, - [1666943362.813844][12769:12769] CHIP:DMG: - [1666943362.813846][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943362.813850][12769:12769] CHIP:DMG: { - [1666943362.813852][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943362.813855][12769:12769] CHIP:DMG: { - [1666943362.813857][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943362.813860][12769:12769] CHIP:DMG: AttributePathIB = - [1666943362.813862][12769:12769] CHIP:DMG: { - [1666943362.813864][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943362.813866][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943362.813869][12769:12769] CHIP:DMG: Attribute = 0x0000_0002, - [1666943362.813871][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943362.813873][12769:12769] CHIP:DMG: } - [1666943362.813876][12769:12769] CHIP:DMG: - [1666943362.813878][12769:12769] CHIP:DMG: Data = - [1666943362.813881][12769:12769] CHIP:DMG: { - [1666943362.813883][12769:12769] CHIP:DMG: 0x0 = "Espresso" (8 chars), - [1666943362.813886][12769:12769] CHIP:DMG: 0x1 = 7, - [1666943362.813888][12769:12769] CHIP:DMG: 0x2 = [ - [1666943362.813890][12769:12769] CHIP:DMG: - [1666943362.813893][12769:12769] CHIP:DMG: { - [1666943362.813895][12769:12769] CHIP:DMG: 0x0 = 0, - [1666943362.813898][12769:12769] CHIP:DMG: 0x1 = 0, - [1666943362.813900][12769:12769] CHIP:DMG: }, - [1666943362.813903][12769:12769] CHIP:DMG: ], - [1666943362.813905][12769:12769] CHIP:DMG: }, - [1666943362.813907][12769:12769] CHIP:DMG: }, - [1666943362.813911][12769:12769] CHIP:DMG: - [1666943362.813913][12769:12769] CHIP:DMG: }, - [1666943362.813917][12769:12769] CHIP:DMG: - [1666943362.813918][12769:12769] CHIP:DMG: ], - [1666943362.813926][12769:12769] CHIP:DMG: - [1666943362.813928][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943362.813931][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666943362.813934][12769:12769] CHIP:DMG: } - [1666943362.813936][12769:12769] CHIP:DMG: - - - ./chip-tool modeselect read current-mode 1 1 - - Verify the "CurrentMode response" on the TH (all-cluster-minimal-app) log: - - 1666943427.104790][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943427.104798][12769:12769] CHIP:DMG: { - [1666943427.104804][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943427.104814][12769:12769] CHIP:DMG: [ - [1666943427.104820][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943427.104838][12769:12769] CHIP:DMG: { - [1666943427.104846][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943427.104858][12769:12769] CHIP:DMG: { - [1666943427.104869][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943427.104880][12769:12769] CHIP:DMG: AttributePathIB = - [1666943427.104891][12769:12769] CHIP:DMG: { - [1666943427.104904][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943427.104916][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943427.104931][12769:12769] CHIP:DMG: Attribute = 0x0000_0003, - [1666943427.104939][12769:12769] CHIP:DMG: } - [1666943427.104948][12769:12769] CHIP:DMG: - [1666943427.104956][12769:12769] CHIP:DMG: Data = 0, - [1666943427.104963][12769:12769] CHIP:DMG: }, - [1666943427.104974][12769:12769] CHIP:DMG: - [1666943427.104981][12769:12769] CHIP:DMG: }, - [1666943427.104991][12769:12769] CHIP:DMG: - [1666943427.105001][12769:12769] CHIP:DMG: ], - [1666943427.105017][12769:12769] CHIP:DMG: - [1666943427.105027][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943427.105037][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666943427.105045][12769:12769] CHIP:DMG: } - - - ./chip-tool modeselect read standard-namespace 1 1 - - Verify the "StandardNamespace response" on the TH (all-cluster-minimal-app) log: - - [1666943453.966995][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943453.966997][12769:12769] CHIP:DMG: { - [1666943453.966999][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943453.967003][12769:12769] CHIP:DMG: [ - [1666943453.967005][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943453.967008][12769:12769] CHIP:DMG: { - [1666943453.967010][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943453.967014][12769:12769] CHIP:DMG: { - [1666943453.967017][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943453.967019][12769:12769] CHIP:DMG: AttributePathIB = - [1666943453.967021][12769:12769] CHIP:DMG: { - [1666943453.967025][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943453.967027][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943453.967029][12769:12769] CHIP:DMG: Attribute = 0x0000_0001, - [1666943453.967033][12769:12769] CHIP:DMG: } - [1666943453.967035][12769:12769] CHIP:DMG: - [1666943453.967038][12769:12769] CHIP:DMG: Data = 0, - [1666943453.967040][12769:12769] CHIP:DMG: }, - [1666943453.967043][12769:12769] CHIP:DMG: - [1666943453.967045][12769:12769] CHIP:DMG: }, - [1666943453.967047][12769:12769] CHIP:DMG: - [1666943453.967050][12769:12769] CHIP:DMG: ], - [1666943453.967053][12769:12769] CHIP:DMG: - [1666943453.967055][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943453.967057][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - - ./chip-tool modeselect read description 1 1 - - Verify the "Description response" on the TH (all-cluster-minimal-app) log: - - [1666941093.845092][9718:9718] CHIP:DMG: ReportDataMessage = - [1666941093.845094][9718:9718] CHIP:DMG: { - [1666941093.845096][9718:9718] CHIP:DMG: AttributeReportIBs = - [1666941093.845099][9718:9718] CHIP:DMG: [ - [1666941093.845101][9718:9718] CHIP:DMG: AttributeReportIB = - [1666941093.845105][9718:9718] CHIP:DMG: { - [1666941093.845107][9718:9718] CHIP:DMG: AttributeDataIB = - [1666941093.845110][9718:9718] CHIP:DMG: { - [1666941093.845112][9718:9718] CHIP:DMG: DataVersion = 0xb4a9126f, - [1666941093.845115][9718:9718] CHIP:DMG: AttributePathIB = - [1666941093.845117][9718:9718] CHIP:DMG: { - [1666941093.845119][9718:9718] CHIP:DMG: Endpoint = 0x1, - [1666941093.845122][9718:9718] CHIP:DMG: Cluster = 0x50, - [1666941093.845124][9718:9718] CHIP:DMG: Attribute = 0x0000_0000, - [1666941093.845126][9718:9718] CHIP:DMG: } - [1666941093.845129][9718:9718] CHIP:DMG: - [1666941093.845132][9718:9718] CHIP:DMG: Data = "Coffee" (6 chars), - [1666941093.845134][9718:9718] CHIP:DMG: }, - [1666941093.845137][9718:9718] CHIP:DMG: - [1666941093.845139][9718:9718] CHIP:DMG: }, - [1666941093.845142][9718:9718] CHIP:DMG: - [1666941093.845144][9718:9718] CHIP:DMG: ], - [1666941093.845147][9718:9718] CHIP:DMG: - [1666941093.845149][9718:9718] CHIP:DMG: SuppressResponse = true, - [1666941093.845152][9718:9718] CHIP:DMG: InteractionModelRevision = 1 - disabled: true - - - label: - "Step 6: DUT reads all supported optional attributes from TH one at a - time in a manufacturer specific order" - PICS: MOD.C.AO-READ - verification: | - ./chip-tool modeselect read on-mode 1 1 - - Verify status response as UNSUPPORTED_ATTRIBUTE on the TH (all-cluster-minimal-app) log: - - [1684929635.593547][20278:20280] CHIP:DMG: StatusIB = - [1684929635.593551][20278:20280] CHIP:DMG: { - [1684929635.593555][20278:20280] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1684929635.593558][20278:20280] CHIP:DMG: }, - - - ./chip-tool modeselect read start-up-mode 1 1 - - Verify status response as UNSUPPORTED_ATTRIBUTE on the TH (all-cluster-minimal-app) log: - - [1684929665.428885][20285:20287] CHIP:DMG: StatusIB = - [1684929665.428891][20285:20287] CHIP:DMG: { - [1684929665.428895][20285:20287] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1684929665.428900][20285:20287] CHIP:DMG: }, - disabled: true - - - label: - "Step 7: DUT writes a suitable value to all supported optional - attributes on the TH one at a time in a manufacturer specific order" - PICS: MOD.C.AO-WRITE - verification: | - ./chip-tool modeselect write on-mode 0 1 1 - - Verify status response as UNSUPPORTED_ATTRIBUTE on the TH (all-cluster-minimal-app) log: - - [1684929889.679386][20348:20350] CHIP:DMG: StatusIB = - [1684929889.679389][20348:20350] CHIP:DMG: { - [1684929889.679392][20348:20350] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1684929889.679395][20348:20350] CHIP:DMG: }, - [1684929889.679398][20348:20350] CHIP:DMG: - - - ./chip-tool modeselect write start-up-mode 0 1 1 - - Verify status response as UNSUPPORTED_ATTRIBUTE on the TH (all-cluster-minimal-app) log: - - [1684929889.679386][20348:20350] CHIP:DMG: StatusIB = - [1684929889.679389][20348:20350] CHIP:DMG: { - [1684929889.679392][20348:20350] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1684929889.679395][20348:20350] CHIP:DMG: }, - [1684929889.679398][20348:20350] CHIP:DMG: - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MWOCTRL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_MWOCTRL_1_1.yaml deleted file mode 100644 index d06db8ae77..0000000000 --- a/src/app/tests/suites/certification/Test_TC_MWOCTRL_1_1.yaml +++ /dev/null @@ -1,170 +0,0 @@ -# Copyright (c) 2024 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: 263.1.1. [TC-MWOCTRL-1.1] Global attributes with DUT as Server - -PICS: - - MWOCTRL.S - -config: - nodeId: 0x12344321 - cluster: "Microwave Oven Control" - endpoint: 1 - -tests: - - label: "Step 1: Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: Read the global attribute: ClusterRevision" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 1 - constraints: - type: int16u - - - label: "Step 3a: Check for no features selected." - command: "readAttribute" - attribute: "FeatureMap" - PICS: "!MWOCTRL.S.F00 && !MWOCTRL.S.F01 && !MWOCTRL.S.F02" - response: - value: 0 - constraints: - type: bitmap32 - - - label: "Step 3b: Check for PWRNUM feature support" - command: "readAttribute" - attribute: "FeatureMap" - PICS: MWOCTRL.S.F00 - response: - saveAs: powerNumSupported - constraints: - type: bitmap32 - hasMasksSet: [0x1] - hasMasksClear: [0x2] - - - label: "Step 3c: Check for WATTS feature support" - command: "readAttribute" - attribute: "FeatureMap" - PICS: MWOCTRL.S.F01 - response: - saveAs: wattsSupported - constraints: - type: bitmap32 - hasMasksClear: [0x1, 0x4] - hasMasksSet: [0x2] - - - label: "Step 3d: Check for PWRLMTS feature support" - command: "readAttribute" - attribute: "FeatureMap" - PICS: MWOCTRL.S.F02 - response: - saveAs: wattsSupported - constraints: - type: bitmap32 - hasMasksSet: [0x1, 0x4] - hasMasksClear: [0x2] - - - label: "Step 4a: Read the global attribute: AttributeList" - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [0, 1, 65528, 65529, 65530, 65531, 65532, 65533] - - - label: "Step 4b: Read the global attribute: AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED" - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [0, 1, 65528, 65529, 65531, 65532, 65533] - - - label: "Step 4c: Check for mandatory attribute support for PWRNUM feature" - PICS: MWOCTRL.S.F00 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [2] - - - label: "Step 4d: Check for optional attribute support for PWRNUM feature" - PICS: MWOCTRL.S.F02 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [3, 4, 5] - - - label: "Step 4e: Check for mandatory attribute support for WATTS feaure" - PICS: MWOCTRL.S.F01 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [6, 7] - - - label: "Step 4f: Check for optional WattRating attribute support" - PICS: MWOCTRL.S.A0008 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [8] - - - label: "Step 5: TH reads EventList attribute from DUT" - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "EventList" - response: - value: [] - constraints: - type: list - - - label: "Step 6a: Check for mandatory commands." - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - constraints: - type: list - contains: [0] - - - label: "Step 6b: Check for optional command AddMoreTime." - PICS: MWOCTRL.S.C01.Rsp - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - constraints: - type: list - contains: [1] - - - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - constraints: - type: list - contains: [] diff --git a/src/app/tests/suites/certification/Test_TC_NDOCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_NDOCONC_1_1.yaml deleted file mode 100644 index a28dae6509..0000000000 --- a/src/app/tests/suites/certification/Test_TC_NDOCONC_1_1.yaml +++ /dev/null @@ -1,339 +0,0 @@ -# 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: 145.1.1. [TC-NDOCONC-1.1] Global Attributes with DUT as Server - -PICS: - - NDOCONC.S - -config: - nodeId: 0x12344321 - cluster: "Nitrogen Dioxide Concentration Measurement" - endpoint: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 3 - constraints: - type: int16u - - - label: - "Step 3a: TH reads from the DUT the FeatureMap attribute. and check - for either bit 0 or 1 set" - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x03] - - - label: - "Step 3b: Given NDOCONC.S.F00(MEA) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: NDOCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x1] - - - label: - "Step 3c: Given NDOCONC.S.F00(MEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !NDOCONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x1] - - - label: - "Step 3d: Given NDOCONC.S.F01(LEV) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: NDOCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2] - - - label: - "Step 3e: Given NDOCONC.S.F01(LEV) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !NDOCONC.S.F01 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x2] - - - label: - "Step 3f: Given NDOCONC.S.F02(MED) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: NDOCONC.S.F02 && NDOCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x4, 0x2] - - - label: - "Step 3g: Given NDOCONC.S.F02(MED) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !NDOCONC.S.F02 && !NDOCONC.S.F01 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x4] - - - label: - "Step 3h: Given NDOCONC.S.F03(CRI) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: NDOCONC.S.F03 && NDOCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x8, 0x2] - - - label: - "Step 3i: Given NDOCONC.S.F03(CRI) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !NDOCONC.S.F03 && !NDOCONC.S.F01 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x8] - - - label: - "Step 3j: Given NDOCONC.S.F04(PEA) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: NDOCONC.S.F04 && NDOCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x10, 0x1] - - - label: - "Step 3k: Given NDOCONC.S.F04(PEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !NDOCONC.S.F04 && NDOCONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x10] - - - label: - "Step 3l: Given NDOCONC.S.F05(AVG) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: NDOCONC.S.F05 && NDOCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x20, 0x1] - - - label: - "Step 3m: Given NDOCONC.S.F05(AVG) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !NDOCONC.S.F05 && !NDOCONC.S.F00" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x20] - - - label: "Step 4a: TH reads from the DUT the AttributeList attribute." - command: "readAttribute" - attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED - response: - constraints: - type: list - contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] - - - label: "Step 4a: TH reads from the DUT the AttributeList attribute." - PICS: "!PICS_EVENT_LIST_ENABLED" - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [9, 65528, 65529, 65531, 65532, 65533] - - - label: - "Step 4b: TH reads the optional attribute Uncertainty in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: NDOCONC.S.A0007 && NDOCONC.S.F00 - response: - constraints: - type: list - contains: [7] - - - label: - "Step 4c: Check the optional attribute Uncertainty is excluded from - AttributeList when NDOCONC.S.A0007 is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !NDOCONC.S.A0007 " - response: - constraints: - type: list - excludes: [7] - - - label: - "Step 4d: TH reads the optional, feature dependent attributes - MeasuredValue, MinMeasuredValue, MaxMeasuredValue and Measurement Unit - in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: NDOCONC.S.F00 - response: - constraints: - type: list - contains: [0, 1, 2, 8] - - - label: - "Step 4e: Check that MeasuredValue, MinMeasuredValue, - MaxMeasuredValue, Measurement Unit and Uncertainty are excluded from - AttributeList when NDOCONC.S.F00 (MEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !NDOCONC.S.F00 " - response: - constraints: - type: list - excludes: [0, 1, 2, 7, 8] - - - label: - "Step 4f: TH reads the optional, feature dependent attributes - PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: NDOCONC.S.F04 - response: - constraints: - type: list - contains: [3, 4] - - - label: - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are - excluded from AttributeList when NDOCONC.S.F04 (PEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !NDOCONC.S.F04 " - response: - constraints: - type: list - excludes: [3, 4] - - - label: - "Step 4h: TH reads the optional, feature dependent attributes - AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: NDOCONC.S.F05 - response: - constraints: - type: list - contains: [5, 6] - - - label: - "Step 4i: TH reads that AverageMeasuredValue and - AverageMeasuredValueWindow are excluded from AttributeList when - NDOCONC.S.F05 (AVG) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !NDOCONC.S.F05 " - response: - constraints: - type: list - excludes: [5, 6] - - - label: - "Step 4j: TH reads the optional, feature dependent attribute - LevelValue in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: NDOCONC.S.F01 - response: - constraints: - type: list - contains: [10] - - - label: - "Step 4k: Check that LevelValue is excluded from AttributeList when - NDOCONC.S.F01 (LEV) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !NDOCONC.S.F01 " - response: - constraints: - type: list - excludes: [10] - - - label: "Step 5: TH reads from the DUT the EventList attribute." - command: "readAttribute" - attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED - response: - value: [] - constraints: - type: list - - - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [] - constraints: - type: list - - - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list diff --git a/src/app/tests/suites/certification/Test_TC_OTCCM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_OTCCM_3_1.yaml deleted file mode 100644 index 3d886d15ab..0000000000 --- a/src/app/tests/suites/certification/Test_TC_OTCCM_3_1.yaml +++ /dev/null @@ -1,131 +0,0 @@ -# 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: 3.4 [TC-OTCCM-3.1] On Mode functionality with DUT as Server - -PICS: - - OTCCM.S.A0003 - - MOD.S.F00 - - OO.S.C00.Rsp - - OO.S.C01.Rsp - -config: - nodeId: 0x12344321 - cluster: "Oven Mode" - endpoint: 1 - - ConfigureOnMode: - type: int8u - defaultValue: 0 - new_mode_th: - type: int8u - defaultValue: 2 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: - "Precondition: TH writes from the DUT the OnMode attribute.NOTE: To - execute this test case set onmode to any integer value because as - default it value has null." - PICS: OTCCM.S.A0003 && MOD.S.F00 - command: "writeAttribute" - attribute: "OnMode" - arguments: - value: ConfigureOnMode - - - label: "Step 2: TH reads from the DUT the OnMode attribute." - PICS: OTCCM.S.A0003 && MOD.S.F00 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: on_mode_dut - constraints: - type: int8u - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: OTCCM.S.A0001 && MOD.S.F00 - command: "readAttribute" - attribute: "CurrentMode" - response: - saveAs: old_current_mode_dut - constraints: - type: int8u - - - label: - "If on_mode_dut is equal to old_current_mode_dut proceed to step 4. - Else proceed to step 6." - PICS: OTCCM.S.A0001 && MOD.S.F00 && OTCCM.S.A0003 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: on_mode_dut - - name: "Value2" - value: old_current_mode_dut - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." - runIf: IsExpectedValue - PICS: OTCCM.S.A0000 && MOD.S.F00 - command: "readAttribute" - attribute: "SupportedModes" - response: - constraints: - type: list - minLength: 2 - - - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - runIf: IsExpectedValue - PICS: OTCCM.S.C00.Rsp && MOD.S.F00 - command: "ChangeToMode" - arguments: - values: - - name: "NewMode" - value: new_mode_th - response: - values: - - name: "Status" - value: 0x00 - - - label: "Step 6:TH sends a Off command to the DUT" - PICS: OO.S.C00.Rsp && MOD.S.F00 - cluster: "On/Off" - command: "Off" - - - label: "Step 7:TH sends a On command to the DUT" - PICS: OO.S.C01.Rsp && MOD.S.F00 - cluster: "On/Off" - command: "On" - - - label: "Step 8: TH reads from the DUT the CurrentMode attribute." - PICS: OTCCM.S.A0001 && MOD.S.F00 - command: "readAttribute" - attribute: "CurrentMode" - response: - value: on_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_OTCCM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_OTCCM_3_2.yaml deleted file mode 100644 index e1220de758..0000000000 --- a/src/app/tests/suites/certification/Test_TC_OTCCM_3_2.yaml +++ /dev/null @@ -1,171 +0,0 @@ -# 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: 3.5 [TC-OTCCM-3.2] Startup Mode functionality with DUT as Server - -PICS: - - OTCCM.S.A0002 - -config: - nodeId: 0x12344321 - cluster: "Oven Mode" - endpoint: 1 - - new_start-up_mode_th: - type: int8u - defaultValue: 0 - new_mode_th: - type: int8u - defaultValue: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: OTCCM.S.A0002 - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: startup_mode_dut - - - label: - "Step 2: If startup_mode_dut is null proceed to step 3. Else save - startup_mode_dut as new_start_up_mode_th and proceed to step 5." - PICS: OTCCM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: null - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - runIf: IsExpectedValue - PICS: OTCCM.S.A0000 - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: supported_modes_dut - constraints: - type: list - minLength: 2 - - label: - "Step 4: TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - PICS: OTCCM.S.A0002 - runIf: IsExpectedValue - command: "writeAttribute" - attribute: "StartUpMode" - arguments: - value: new_start_up_mode_th - - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." - PICS: OTCCM.S.A0001 - command: "readAttribute" - attribute: "CurrentMode" - response: - saveAs: old_current_mode_dut - - - label: - "Step 5: If startup_mode_dut is equal to old_current_mode_dut proceed - to step 6. Else proceed to step 8." - PICS: OTCCM.S.A0001 && OTCCM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: old_current_mode_dut - response: - - values: - - name: "Equals" - saveAs: Step5_IsExpectedValue - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - PICS: OTCCM.S.A0000 - runIf: Step5_IsExpectedValue - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: Step6_supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - PICS: OTCCM.S.C00.Rsp - runIf: Step5_IsExpectedValue - command: "ChangeToMode" - arguments: - values: - - name: "NewMode" - value: new_mode_th - response: - values: - - name: "Status" - value: 0x00 - - - label: "Step 8: Physically power cycle the device" - verification: | - Physically power cycle the device. - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - 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 9: TH reads from the DUT the StartUpMode attribute." - PICS: OTCCM.S.A0002 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: new_start_up_mode_dut - value: new_start_up_mode_th - - - label: "Step 10: TH reads from the DUT the CurrentMode attribute." - PICS: OTCCM.S.A0001 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "CurrentMode" - response: - value: new_start_up_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_OTCCM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_OTCCM_3_3.yaml deleted file mode 100644 index 27184569f5..0000000000 --- a/src/app/tests/suites/certification/Test_TC_OTCCM_3_3.yaml +++ /dev/null @@ -1,187 +0,0 @@ -# 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: - 3.6 [TC-OTCCM-3.3] On Mode and Startup Mode functionality with DUT as Server - -PICS: - - OTCCM.S.A0002 - - OTCCM.S.A0003 - - MOD.S.F00 - - OO.S.A4003 - -config: - nodeId: 0x12344321 - cluster: "Oven Mode" - endpoint: 1 - - new_start_up_mode_th: - type: int8u - defaultValue: 0 - new_mode_th: - type: int8u - defaultValue: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: OTCCM.S.A0002 - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: startup_mode_dut - - - label: - "Step 2: If startup_mode_dut is null proceed to step 3. Else save - startup_mode_dut as new_start_up_mode_th and proceed to step 5." - PICS: OTCCM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: null - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - runIf: IsExpectedValue - PICS: OTCCM.S.A0000 - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 4: TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - PICS: OTCCM.S.A0002 - runIf: IsExpectedValue - command: "writeAttribute" - attribute: "StartUpMode" - arguments: - value: new_start_up_mode_th - - - label: "Step 5: TH reads from the DUT the OnMode attribute." - PICS: OTCCM.S.A0003 && OTCCM.S.A0002 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: old_on_mode_dut - - - label: - "Step 5: If startup_mode_dut is equal to old_on_mode_dut proceed to - step 6. Else proceed to step 8." - PICS: OTCCM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: old_on_mode_dut - - name: "Value2" - value: startup_mode_dut - response: - - values: - - name: "Equals" - saveAs: Step5_IsExpectedValue - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - PICS: OTCCM.S.A0000 && OTCCM.S.A0002 - runIf: Step5_IsExpectedValue - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: Step6_supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 7: TH writes to the DUT the OnMode attribute with the - new_mode_th value" - PICS: OTCCM.S.A0003 - runIf: Step5_IsExpectedValue - command: "writeAttribute" - attribute: "OnMode" - arguments: - value: new_mode_th - - - label: "Step 8: TH reads from the DUT the OnMode attribute." - PICS: OTCCM.S.A0003 && MOD.S.F00 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: new_on_mode_dut - - - label: - "Step 9: TH writes to the DUT the StartUpOnOff attribute with the - value 1." - PICS: OO.S.A4003 - cluster: "On/Off" - command: "writeAttribute" - attribute: "StartUpOnOff" - arguments: - value: 1 - - - label: "Step 10: Physically power cycle the device" - verification: | - Physically power cycle the device. - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - 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 11: TH reads from the DUT the StartUpMode attribute." - PICS: OTCCM.S.A0002 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "StartUpMode" - response: - value: new_start_up_mode_th - - - label: "Step 12: TH reads from the DUT the CurrentMode attribute." - PICS: OTCCM.S.A0001 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "CurrentMode" - response: - value: new_on_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_OZCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OZCONC_1_1.yaml deleted file mode 100644 index 25b6e3af2d..0000000000 --- a/src/app/tests/suites/certification/Test_TC_OZCONC_1_1.yaml +++ /dev/null @@ -1,339 +0,0 @@ -# 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: 145.1.1. [TC-OZCONC-1.1] Global Attributes with DUT as Server - -PICS: - - OZCONC.S - -config: - nodeId: 0x12344321 - cluster: "Ozone Concentration Measurement" - endpoint: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 3 - constraints: - type: int16u - - - label: - "Step 3a: TH reads from the DUT the FeatureMap attribute and check for - either bit 0 or 1 set" - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x03] - - - label: - "Step 3b: Given OZCONC.S.F00(MEA) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: OZCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x1] - - - label: - "Step 3c: Given OZCONC.S.F00(MEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !OZCONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x1] - - - label: - "Step 3d: Given OZCONC.S.F01(LEV) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: OZCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2] - - - label: - "Step 3e: Given OZCONC.S.F01(LEV) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !OZCONC.S.F01 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x2] - - - label: - "Step 3f: Given OZCONC.S.F02(MED) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: OZCONC.S.F02 && OZCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x4, 0x2] - - - label: - "Step 3g: Given OZCONC.S.F02(MED) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !OZCONC.S.F02 && !OZCONC.S.F01" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x4] - - - label: - "Step 3h: Given OZCONC.S.F03(CRI) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: OZCONC.S.F03 && OZCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x8, 0x2] - - - label: - "Step 3i: Given OZCONC.S.F03(CRI) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !OZCONC.S.F03 && !OZCONC.S.F01 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x8] - - - label: - "Step 3j: Given OZCONC.S.F04(PEA) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: OZCONC.S.F04 && OZCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x10, 0x1] - - - label: - "Step 3k: Given OZCONC.S.F04(PEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !OZCONC.S.F04 && !OZCONC.S.F00" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x10] - - - label: - "Step 3l: Given OZCONC.S.F05(AVG) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: OZCONC.S.F05 && OZCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x20, 0x1] - - - label: - "Step 3m: Given OZCONC.S.F05(AVG) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !OZCONC.S.F05 && !OZCONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x20] - - - label: "Step 4a: TH reads from the DUT the AttributeList attribute." - command: "readAttribute" - attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED - response: - constraints: - type: list - contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] - - - label: "Step 4a: TH reads from the DUT the AttributeList attribute." - command: "readAttribute" - attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED" - response: - constraints: - type: list - contains: [9, 65528, 65529, 65531, 65532, 65533] - - - label: - "Step 4b: TH reads the optional attribute Uncertainty in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: OZCONC.S.A0007 && OZCONC.S.F00 - response: - constraints: - type: list - contains: [7] - - - label: - "Step 4c: Check the optional attribute Uncertainty is excluded from - AttributeList when OZCONC.S.A0007 is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !OZCONC.S.A0007 " - response: - constraints: - type: list - excludes: [7] - - - label: - "Step 4d: TH reads the optional, feature dependent attributes - MeasuredValue, MinMeasuredValue, MaxMeasuredValue and Measurement Unit - in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: OZCONC.S.F00 - response: - constraints: - type: list - contains: [0, 1, 2, 8] - - - label: - "Step 4e: Check that MeasuredValue, MinMeasuredValue, - MaxMeasuredValue, Measurement Unit and Uncertainty are excluded from - AttributeList when OZCONC.S.F00 (MEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !OZCONC.S.F00 " - response: - constraints: - type: list - excludes: [0, 1, 2, 7, 8] - - - label: - "Step 4f: TH reads the optional, feature dependent attributes - PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: OZCONC.S.F04 - response: - constraints: - type: list - contains: [3, 4] - - - label: - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are - excluded from AttributeList when OZCONC.S.F04 (PEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !OZCONC.S.F04 " - response: - constraints: - type: list - excludes: [3, 4] - - - label: - "Step 4h: TH reads the optional, feature dependent attributes - AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: OZCONC.S.F05 - response: - constraints: - type: list - contains: [5, 6] - - - label: - "Step 4i: Check that AverageMeasuredValue and - AverageMeasuredValueWindow are excluded from AttributeList when - OZCONC.S.F05 (AVG) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !OZCONC.S.F05 " - response: - constraints: - type: list - excludes: [5, 6] - - - label: - "Step 4j: TH reads the optional, feature dependent attribute - LevelValue in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: OZCONC.S.F01 - response: - constraints: - type: list - contains: [10] - - - label: - "Step 4k: Check that LevelValue is excluded from AttributeList when - OZCONC.S.F01 (LEV) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !OZCONC.S.F01 " - response: - constraints: - type: list - excludes: [10] - - - label: "Step 5: TH reads from the DUT the EventList attribute." - command: "readAttribute" - attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED - response: - value: [] - constraints: - type: list - - - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [] - constraints: - type: list - - - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list diff --git a/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml deleted file mode 100644 index d6f5970010..0000000000 --- a/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml +++ /dev/null @@ -1,555 +0,0 @@ -# Copyright (c) 2021 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: 15.1.1. [TC-PCC-1.1] Global attributes with server as DUT - -PICS: - - PCC.S - -config: - nodeId: 0x12344321 - cluster: "Pump Configuration and Control" - endpoint: 1 - -tests: - - label: "Step 1: Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads the ClusterRevision attribute from the DUT" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 4 - constraints: - type: int16u - - - label: "Step 3a: TH reads the FeatureMap attribute from the DUT" - PICS: - " !PCC.S.F00 && !PCC.S.F01 && !PCC.S.F02 && !PCC.S.F03 && !PCC.S.F04 - && !PCC.S.F05 && !PCC.S.F06 " - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 0 - constraints: - type: bitmap32 - - - label: - "Step 3b: Given PCC.S.F00(PRSCONST) ensure featuremap has the correct - bit set" - PICS: PCC.S.F00 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x1] - - - label: - "Step 3c: Given PCC.S.F01(PRSCOMP) ensure featuremap has the correct - bit set" - PICS: PCC.S.F01 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2] - - - label: - "Step 3d: Given PCC.S.F02(FLW) ensure featuremap has the correct bit - set" - PICS: PCC.S.F02 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x4] - - - label: - "Step 3e: Given PCC.S.F03(SPD) ensure featuremap has the correct bit - set" - PICS: PCC.S.F03 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x8] - - - label: - "Step 3f: Given PCC.S.F04(TEMP) ensure featuremap has the correct bit - set" - PICS: PCC.S.F04 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x10] - - - label: - "Step 3g: Given PCC.S.F05(AUTO) ensure featuremap has the correct bit - set" - PICS: PCC.S.F05 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x20] - - - label: - "Step 3h: Given PCC.S.F06(LOCAL) ensure featuremap has the correct bit - set" - PICS: PCC.S.F06 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x40] - - - label: "Step 4a: TH reads the AttributeList attribute from the DUT" - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: - [ - 0, - 1, - 2, - 17, - 18, - 19, - 32, - 65528, - 65529, - 65530, - 65531, - 65532, - 65533, - ] - - - label: "Step 4a: TH reads the AttributeList attribute from the DUT" - PICS: "!PICS_EVENT_LIST_ENABLED" - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: - [0, 1, 2, 17, 18, 19, 32, 65528, 65529, 65531, 65532, 65533] - - - label: - "Step 4b: TH reads optional attribute(MinConstPressure) attribute in - AttributeList from the DUT" - PICS: PCC.S.A0003 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [3] - - - label: - "Step 4c TH reads optional attribute(MaxConstPressure) attribute in - AttributeList from the DUT" - PICS: PCC.S.A0004 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [4] - - - label: - "Step 4d: TH reads optional attribute(MinCompPressure) attribute in - AttributeList from the DUT" - PICS: PCC.S.A0005 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [5] - - - label: - "Step 4e: TH reads optional attribute(MaxCompPressure) attribute in - AttributeList from the DUT" - PICS: PCC.S.A0006 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [6] - - - label: - "Step 4f: TH reads optional attribute(MinConstSpeed) attribute in - AttributeList from the DUT" - PICS: PCC.S.A0007 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [7] - - - label: - "Step 4g: TH reads optional attribute(MaxConstSpeed) attribute in - AttributeList from the DUT" - PICS: PCC.S.A0008 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [8] - - - label: - "Step 4h: TH reads optional attribute(MinConstFlow) attribute in - AttributeList from the DUT" - PICS: PCC.S.A0009 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [9] - - - label: - "Step 4i: TH reads optional attribute(MaxConstFlow) attribute in - AttributeList from the DUT" - PICS: PCC.S.A000a - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [10] - - - label: - "Step 4j: TH reads optional attribute(MinConstTemp) attribute in - AttributeList from the DUT" - PICS: PCC.S.A000b - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [11] - - - label: - "Step 4k: TH reads optional attribute(MaxConstTemp) attribute in - AttributeList from the DUT" - PICS: PCC.S.A000c - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [12] - - - label: - "Step 4l: TH reads optional attribute(PumpStatus) attribute in - AttributeList from the DUT" - PICS: PCC.S.A0010 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [16] - - - label: - "Step 4m: TH reads optional attribute(Speed) attribute in - AttributeList from the DUT" - PICS: PCC.S.A0014 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [20] - - - label: - "Step 4n: TH reads optional attribute(LifetimeRunningHours) attribute - in AttributeList from the DUT" - PICS: PCC.S.A0015 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [21] - - - label: - "Step 4o: TH reads optional attribute(Power) attribute in - AttributeList from the DUT" - PICS: PCC.S.A0016 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [22] - - - label: - "Step 4p: TH reads optional attribute(LifetimeEnergyConsumed) - attribute in AttributeList from the DUT" - PICS: PCC.S.A0017 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [23] - - - label: - "Step 4q: TH reads optional attribute(ControlMode) attribute in - AttributeList from the DUT" - PICS: PCC.S.A0021 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [33] - - - label: "Step 5a: TH reads EventList from DUT" - PICS: - "PICS_EVENT_LIST_ENABLED && !PCC.S.E00 && !PCC.S.E01 && !PCC.S.E02 && - !PCC.S.E03 && !PCC.S.E04 && !PCC.S.E05 && !PCC.S.E06 && !PCC.S.E07 && - !PCC.S.E08 && !PCC.S.E09 && !PCC.S.E0a && !PCC.S.E0b && !PCC.S.E0c && - !PCC.S.E0d && !PCC.S.E0e && !PCC.S.E0f && !PCC.S.E10 " - command: "readAttribute" - attribute: "EventList" - response: - value: [] - constraints: - type: list - - - label: - "Step 5b: TH reads from the DUT the EventList optional - (SupplyVoltageLow)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E00 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [0x00] - - - label: - "Step 5c: TH reads from the DUT the EventList optional - (SupplyVoltageHigh)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E01 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [0x01] - - - label: - "Step 5d: TH reads from the DUT the EventList optional - (PowerMissingPhase)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E02 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [0x02] - - - label: - "Step 5e: TH reads from the DUT the EventList optional - (SystemPressureLow)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E03 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [0x03] - - - label: - "Step 5f: TH reads from the DUT the EventList optional - (SystemPressureHigh)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E04 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [0x04] - - - label: - "Step 5g: TH reads from the DUT the EventList optional - (DryRunning)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E05 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [0x05] - - - label: - "Step 5h: TH reads from the DUT the EventList optional - (MotorTemperatureHigh)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E06 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [0x06] - - - label: - "Step 5i: TH reads from the DUT the EventList optional - (PumpMotorFatalFailure)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E07 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [0x07] - - - label: - "Step 5j: TH reads from the DUT the EventList optional - (ElectronicTemperatureHigh)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E08 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [0x08] - - - label: - "Step 5k: TH reads from the DUT the EventList optional - (PumpBlocked)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E09 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [0x09] - - - label: - "Step 5l: TH reads from the DUT the EventList optional - (SensorFailure)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0a - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [0x0a] - - - label: - "Step 5m: TH reads from the DUT the EventList optional - (ElectronicNonFatalFailure)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0b - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [0x0b] - - - label: - "Step 5n: TH reads from the DUT the EventList optional - (ElectronicFatalFailure)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0c - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [0x0c] - - - label: - "Step 5o: TH reads from the DUT the EventList optional - (GeneralFault)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0d - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [0x0d] - - - label: - "Step 5p: TH reads from the DUT the EventList optional - (Leakage)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0e - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [0x0e] - - - label: - "Step 5q: TH reads from the DUT the EventList optional - (AirDetection)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E0f - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [0x0f] - - - label: - "Step 5r: TH reads from the DUT the EventList optional - (TurbineOperation)attribute." - PICS: PICS_EVENT_LIST_ENABLED && PCC.S.E10 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [0x10] - - - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [] - constraints: - type: list - - - label: - "Step 7: TH reads from the DUT the GeneratedCommandList attribute." - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list diff --git a/src/app/tests/suites/certification/Test_TC_PMHCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PMHCONC_1_1.yaml deleted file mode 100644 index 9bbd216e6b..0000000000 --- a/src/app/tests/suites/certification/Test_TC_PMHCONC_1_1.yaml +++ /dev/null @@ -1,336 +0,0 @@ -# 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: 145.1.1. [TC-PMHCONC-1.1] Global Attributes with DUT as Server - -PICS: - - PMHCONC.S - -config: - nodeId: 0x12344321 - cluster: "PM1 Concentration Measurement" - endpoint: 1 - -tests: - - label: "Step 1: Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: Read the global attribute: ClusterRevision" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 3 - constraints: - type: int16u - - - label: - "Step 3a: Read the global attribute: FeatureMap and check for either - bit 0 or 1 set" - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x03] - - - label: - "Step 3b: Given PMHCONC.S.F00(MEA) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: PMHCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x1] - - - label: - "Step 3c: Given PMHCONC.S.F00(MEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !PMHCONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x1] - - - label: - "Step 3d: Given PMHCONC.S.F01(LEV) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: PMHCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2] - - - label: - "Step 3e: Given PMHCONC.S.F01(LEV) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !PMHCONC.S.F01 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x2] - - - label: - "Step 3f: Given PMHCONC.S.F02(MED) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: PMHCONC.S.F02 && PMHCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x4, 0x2] - - - label: - "Step 3g: Given PMHCONC.S.F02(MED) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !PMHCONC.S.F02 && !PMHCONC.S.F01" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x4] - - - label: - "Step 3h: Given PMHCONC.S.F03(CRI) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: PMHCONC.S.F03 && PMHCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x8, 0x2] - - - label: - "Step 3i: Given PMHCONC.S.F03(CRI) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !PMHCONC.S.F03 && !PMHCONC.S.F01 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x8] - - - label: - "Step 3j: Given PMHCONC.S.F04(PEA) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: PMHCONC.S.F04 && PMHCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x10, 0x1] - - - label: - "Step 3k: Given PMHCONC.S.F04(PEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !PMHCONC.S.F04 && PMHCONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x10] - - - label: - "Step 3l: Given PMHCONC.S.F05(AVG) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: PMHCONC.S.F05 && PMHCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x20, 0x1] - - - label: - "Step 3m: Given PMHCONC.S.F05(AVG) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !PMHCONC.S.F05 && !PMHCONC.S.F00" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x20] - - - label: "Step 4a: Read the global attribute: AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED - response: - constraints: - type: list - contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] - - - label: "Step 4a: Read the global attribute: AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED" - response: - constraints: - type: list - contains: [9, 65528, 65529, 65531, 65532, 65533] - - - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: PMHCONC.S.A0007 && PMHCONC.S.F00 - response: - constraints: - type: list - contains: [7] - - - label: - "Step 4c: Check the optional attribute Uncertainty is excluded from - AttributeList when PMHCONC.S.A0007 is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !PMHCONC.S.A0007 " - response: - constraints: - type: list - excludes: [7] - - - label: - "Step 4d: Read the optional, feature dependent attributes - MeasuredValue, MinMeasuredValue, MaxMeasuredValue and Measurement Unit - in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: PMHCONC.S.F00 - response: - constraints: - type: list - contains: [0, 1, 2, 8] - - - label: - "Step 4e: Check that MeasuredValue, MinMeasuredValue, - MaxMeasuredValue, Measurement Unit and Uncertainty are excluded from - AttributeList when PMHCONC.S.F00 (MEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !PMHCONC.S.F00 " - response: - constraints: - type: list - excludes: [0, 1, 2, 7, 8] - - - label: - "Step 4f: Read the optional, feature dependent attributes - PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: PMHCONC.S.F04 - response: - constraints: - type: list - contains: [3, 4] - - - label: - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are - excluded from AttributeList when PMHCONC.S.F04 (PEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !PMHCONC.S.F04 " - response: - constraints: - type: list - excludes: [3, 4] - - - label: - "Step 4h: Read the optional, feature dependent attributes - AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: PMHCONC.S.F05 - response: - constraints: - type: list - contains: [5, 6] - - - label: - "Step 4i: Check that AverageMeasuredValue and - AverageMeasuredValueWindow are excluded from AttributeList when - PMHCONC.S.F05 (AVG) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !PMHCONC.S.F05 " - response: - constraints: - type: list - excludes: [5, 6] - - - label: - "Step 4j: Read the optional, feature dependent attribute LevelValue in - AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: PMHCONC.S.F01 - response: - constraints: - type: list - contains: [10] - - - label: - "Step 4k: Check that LevelValue is excluded from AttributeList when - PMHCONC.S.F01 (LEV) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !PMHCONC.S.F01 " - response: - constraints: - type: list - excludes: [10] - - - label: "Step 5: Read the global attribute: EventList" - command: "readAttribute" - attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED - response: - value: [] - constraints: - type: list - - - label: "Step 6: Read the global attribute: AcceptedCommandList" - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [] - constraints: - type: list - - - label: "Step 7: Read the global attribute: GeneratedCommandList" - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list diff --git a/src/app/tests/suites/certification/Test_TC_PMICONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PMICONC_1_1.yaml deleted file mode 100644 index 57d14f10ca..0000000000 --- a/src/app/tests/suites/certification/Test_TC_PMICONC_1_1.yaml +++ /dev/null @@ -1,336 +0,0 @@ -# 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: 145.1.1. [TC-PMICONC-1.1] Global Attributes with DUT as Server - -PICS: - - PMICONC.S - -config: - nodeId: 0x12344321 - cluster: "PM2.5 Concentration Measurement" - endpoint: 1 - -tests: - - label: "Step 1: Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: Read the global attribute: ClusterRevision" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 3 - constraints: - type: int16u - - - label: - "Step 3a: Read the global attribute: FeatureMap and check for either - bit 0 or 1 set" - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x03] - - - label: - "Step 3b: Given PMICONC.S.F00(MEA) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: PMICONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x1] - - - label: - "Step 3c: Given PMICONC.S.F00(MEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !PMICONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x1] - - - label: - "Step 3d: Given PMICONC.S.F01(LEV) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: PMICONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2] - - - label: - "Step 3e: Given PMICONC.S.F01(LEV) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !PMICONC.S.F01 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x2] - - - label: - "Step 3f: Given PMICONC.S.F02(MED) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: PMICONC.S.F02 && PMICONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x4, 0x2] - - - label: - "Step 3g: Given PMICONC.S.F02(MED) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !PMICONC.S.F02 && !PMICONC.S.F01" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x4] - - - label: - "Step 3h: Given PMICONC.S.F03(CRI) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: PMICONC.S.F03 && PMICONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x8, 0x2] - - - label: - "Step 3i: Given PMICONC.S.F03(CRI) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !PMICONC.S.F03 && !PMICONC.S.F01" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x8] - - - label: - "Step 3j: Given PMICONC.S.F04(PEA) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: PMICONC.S.F04 && PMICONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x10, 0x1] - - - label: - "Step 3k: Given PMICONC.S.F04(PEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !PMICONC.S.F04 && !PMICONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x10] - - - label: - "Step 3l: Given PMICONC.S.F05(AVG) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: PMICONC.S.F05 && PMICONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x20, 0x1] - - - label: - "Step 3m: Given PMICONC.S.F05(AVG) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !PMICONC.S.F05 && !PMICONC.S.F00" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x20] - - - label: "Step 4a: Read the global attribute: AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED - response: - constraints: - type: list - contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] - - - label: "Step 4a: Read the global attribute: AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED" - response: - constraints: - type: list - contains: [9, 65528, 65529, 65531, 65532, 65533] - - - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: PMICONC.S.A0007 && PMICONC.S.F00 - response: - constraints: - type: list - contains: [7] - - - label: - "Step 4c: Check the optional attribute Uncertainty is excluded from - AttributeList when PMICONC.S.A0007 is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !PMICONC.S.A0007 " - response: - constraints: - type: list - excludes: [7] - - - label: - "Step 4d: Read the optional, feature dependent attributes - MeasuredValue, MinMeasuredValue, MaxMeasuredValue and Measurement Unit - in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: PMICONC.S.F00 - response: - constraints: - type: list - contains: [0, 1, 2, 8] - - - label: - "Step 4e: Check that MeasuredValue, MinMeasuredValue, - MaxMeasuredValue, Measurement Unit and Uncertainty are excluded from - AttributeList when PMICONC.S.F00 (MEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !PMICONC.S.F00 " - response: - constraints: - type: list - excludes: [0, 1, 2, 7, 8] - - - label: - "Step 4f: Read the optional, feature dependent attributes - PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: PMICONC.S.F04 - response: - constraints: - type: list - contains: [3, 4] - - - label: - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are - excluded from AttributeList when PMICONC.S.F04 (PEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !PMICONC.S.F04 " - response: - constraints: - type: list - excludes: [3, 4] - - - label: - "Step 4h: Read the optional, feature dependent attributes - AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: PMICONC.S.F05 - response: - constraints: - type: list - contains: [5, 6] - - - label: - "Step 4i: Check that AverageMeasuredValue and - AverageMeasuredValueWindow are excluded from AttributeList when - PMICONC.S.F05 (AVG) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !PMICONC.S.F05 " - response: - constraints: - type: list - excludes: [5, 6] - - - label: - "Step 4j: Read the optional, feature dependent attribute LevelValue in - AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: PMICONC.S.F01 - response: - constraints: - type: list - contains: [10] - - - label: - "Step 4k: Check that LevelValue is excluded from AttributeList when - PMICONC.S.F01 (LEV) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !PMICONC.S.F01 " - response: - constraints: - type: list - excludes: [10] - - - label: "Step 5: Read the global attribute: EventList" - command: "readAttribute" - attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED - response: - value: [] - constraints: - type: list - - - label: "Step 6: Read the global attribute: AcceptedCommandList" - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [] - constraints: - type: list - - - label: "Step 7: Read the global attribute: GeneratedCommandList" - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list diff --git a/src/app/tests/suites/certification/Test_TC_PMKCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PMKCONC_1_1.yaml deleted file mode 100644 index 26c5797b17..0000000000 --- a/src/app/tests/suites/certification/Test_TC_PMKCONC_1_1.yaml +++ /dev/null @@ -1,336 +0,0 @@ -# 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: 145.1.1. [TC-PMKCONC-1.1] Global Attributes with DUT as Server - -PICS: - - PMKCONC.S - -config: - nodeId: 0x12344321 - cluster: "PM10 Concentration Measurement" - endpoint: 1 - -tests: - - label: "Step 1: Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: Read the global attribute: ClusterRevision" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 3 - constraints: - type: int16u - - - label: - "Step 3a: Read the global attribute: FeatureMap and check for either - bit 0 or 1 set" - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x03] - - - label: - "Step 3b: Given PMKCONC.S.F00(MEA) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: PMKCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x1] - - - label: - "Step 3c: Given PMKCONC.S.F00(MEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !PMKCONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x1] - - - label: - "Step 3d: Given PMKCONC.S.F01(LEV) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: PMKCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2] - - - label: - "Step 3e: Given PMKCONC.S.F01(LEV) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !PMKCONC.S.F01 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x2] - - - label: - "Step 3f: Given PMKCONC.S.F02(MED) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: PMKCONC.S.F02 && PMKCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x4, 0x2] - - - label: - "Step 3g: Given PMKCONC.S.F02(MED) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !PMKCONC.S.F02 && !PMKCONC.S.F01 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x4] - - - label: - "Step 3h: Given PMKCONC.S.F03(CRI) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: PMKCONC.S.F03 && PMKCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x8, 0x2] - - - label: - "Step 3i: Given PMKCONC.S.F03(CRI) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !PMKCONC.S.F03 && !PMKCONC.S.F01" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x8] - - - label: - "Step 3j: Given PMKCONC.S.F04(PEA) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: PMKCONC.S.F04 && PMKCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x10, 0x1] - - - label: - "Step 3k: Given PMKCONC.S.F04(PEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !PMKCONC.S.F04 && !PMKCONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x10] - - - label: - "Step 3l: Given PMKCONC.S.F05(AVG) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: PMKCONC.S.F05 && PMKCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x20, 0x1] - - - label: - "Step 3m: Given PMKCONC.S.F05(AVG) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !PMKCONC.S.F05 && !PMKCONC.S.F00" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x20] - - - label: "Step 4a: Read the global attribute: AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED - response: - constraints: - type: list - contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] - - - label: "Step 4a: Read the global attribute: AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED" - response: - constraints: - type: list - contains: [9, 65528, 65529, 65531, 65532, 65533] - - - label: "Step 4b: Read the optional attribute Uncertainty in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: PMKCONC.S.A0007 && PMKCONC.S.F00 - response: - constraints: - type: list - contains: [7] - - - label: - "Step 4c: Check the optional attribute Uncertainty is excluded from - AttributeList when PMKCONC.S.A0007 is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !PMKCONC.S.A0007 " - response: - constraints: - type: list - excludes: [7] - - - label: - "Step 4d: Read the optional, feature dependent attributes - MeasuredValue, MinMeasuredValue, MaxMeasuredValue and Measurement Unit - in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: PMKCONC.S.F00 - response: - constraints: - type: list - contains: [0, 1, 2, 8] - - - label: - "Step 4e: Check that MeasuredValue, MinMeasuredValue, - MaxMeasuredValue, Measurement Unit and Uncertainty are excluded from - AttributeList when PMKCONC.S.F00 (MEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !PMKCONC.S.F00 " - response: - constraints: - type: list - excludes: [0, 1, 2, 7, 8] - - - label: - "Step 4f: Read the optional, feature dependent attributes - PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: PMKCONC.S.F04 - response: - constraints: - type: list - contains: [3, 4] - - - label: - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are - excluded from AttributeList when PMKCONC.S.F04 (PEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !PMKCONC.S.F04 " - response: - constraints: - type: list - excludes: [3, 4] - - - label: - "Step 4h: Read the optional, feature dependent attributes - AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: PMKCONC.S.F05 - response: - constraints: - type: list - contains: [5, 6] - - - label: - "Step 4i: Check that AverageMeasuredValue and - AverageMeasuredValueWindow are excluded from AttributeList when - PMKCONC.S.F05 (AVG) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !PMKCONC.S.F05 " - response: - constraints: - type: list - excludes: [5, 6] - - - label: - "Step 4j: Read the optional, feature dependent attribute LevelValue in - AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: PMKCONC.S.F01 - response: - constraints: - type: list - contains: [10] - - - label: - "Step 4k: Check that LevelValue is excluded from AttributeList when - PMKCONC.S.F01 (LEV) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !PMKCONC.S.F01 " - response: - constraints: - type: list - excludes: [10] - - - label: "Step 5: Read the global attribute: EventList" - command: "readAttribute" - attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED - response: - value: [] - constraints: - type: list - - - label: "Step 6: Read the global attribute: AcceptedCommandList" - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [] - constraints: - type: list - - - label: "Step 7: Read the global attribute: GeneratedCommandList" - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list diff --git a/src/app/tests/suites/certification/Test_TC_PWRTL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PWRTL_1_1.yaml deleted file mode 100644 index 5d64bedf47..0000000000 --- a/src/app/tests/suites/certification/Test_TC_PWRTL_1_1.yaml +++ /dev/null @@ -1,143 +0,0 @@ -# Copyright (c) 2021 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: 44.1.1. [TC-PWRTL-1.1] Global Attributes with DUT as Server - -PICS: - - PWRTL.S - -config: - nodeId: 0x12344321 - cluster: "Power Topology" - endpoint: 1 - -tests: - - label: "Step 1: Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads the ClusterRevision from DUT" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 1 - constraints: - type: int16u - - - label: - "Step 3a: Given PWRTL.S.F00(Node) ensure featuremap has the correct - bit set" - PICS: PWRTL.S.F00 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x1] - hasMasksClear: [0x2, 0x4, 0x8] - - - label: - "Step 3b: Given PWRTL.S.F01(Leaf) ensure featuremap has the correct - bit set" - PICS: PWRTL.S.F01 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2] - hasMasksClear: [0x1, 0x4, 0x8] - - - label: - "Step 3c: Given PWRTL.S.F02(Set) ensure featuremap has the correct bit - set" - PICS: PWRTL.S.F02 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x4] - hasMasksClear: [0x1, 0x2] - - - label: - "Step 3d: Given PWRTL.S.F03(Dynamic Power Flow) ensure featuremap has - the correct bit set" - PICS: PWRTL.S.F03 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x4, 0x8] - - - label: "Step 4a: TH reads AttributeList from DUT" - PICS: " !PWRTL.S.F02 && !PWRTL.S.F03 " - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [] - - - label: - "Step 4b: TH reads feature dependent attribute(AvailableEndpoints) - AttributeList from DUT" - PICS: PWRTL.S.F02 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [0] - - - label: - "Step 4c: TH reads feature dependent attribute(ActiveEndpoints) - AttributeList from DUT" - PICS: "PWRTL.S.F02 && PWRTL.S.F03" - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [0, 1] - - - label: "Step 5*: TH reads EventList attribute from DUT" - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "EventList" - response: - value: [] - constraints: - type: list - - - label: "Step 6: TH reads the AcceptedCommandList attribute from the DUT" - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [] - constraints: - type: list - - - label: "Step 7: TH reads the GeneratedCommandList attribute from the DUT" - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list diff --git a/src/app/tests/suites/certification/Test_TC_RNCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RNCONC_1_1.yaml deleted file mode 100644 index 8efffd3ec6..0000000000 --- a/src/app/tests/suites/certification/Test_TC_RNCONC_1_1.yaml +++ /dev/null @@ -1,339 +0,0 @@ -# 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: 145.1.1. [TC-RNCONC-1.1] Global Attributes with DUT as Server - -PICS: - - RNCONC.S - -config: - nodeId: 0x12344321 - cluster: "Radon Concentration Measurement" - endpoint: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 3 - constraints: - type: int16u - - - label: - "Step 3a: TH reads from the DUT the FeatureMap attribute and check for - either bit 0 or 1 set" - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x03] - - - label: - "Step 3b: Given RNCONC.S.F00(MEA) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: RNCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x1] - - - label: - "Step 3c: Given RNCONC.S.F00(MEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !RNCONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x1] - - - label: - "Step 3d: Given RNCONC.S.F01(LEV) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: RNCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2] - - - label: - "Step 3e: Given RNCONC.S.F01(LEV) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !RNCONC.S.F01 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x2] - - - label: - "Step 3f: Given RNCONC.S.F02(MED) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: RNCONC.S.F02 && RNCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x4, 0x2] - - - label: - "Step 3g: Given RNCONC.S.F02(MED) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !RNCONC.S.F02 && !RNCONC.S.F01" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x4] - - - label: - "Step 3h: Given RNCONC.S.F03(CRI) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: RNCONC.S.F03 && RNCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x8, 0x2] - - - label: - "Step 3i: Given RNCONC.S.F03(CRI) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !RNCONC.S.F03 && !RNCONC.S.F01" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x8] - - - label: - "Step 3j: Given RNCONC.S.F04(PEA) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: RNCONC.S.F04 && RNCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x10, 0x1] - - - label: - "Step 3k: Given RNCONC.S.F04(PEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !RNCONC.S.F04 && RNCONC.S.F00" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x10] - - - label: - "Step 3l: Given RNCONC.S.F05(AVG) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: RNCONC.S.F05 && RNCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x20, 0x1] - - - label: - "Step 3m: Given RNCONC.S.F05(AVG) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !RNCONC.S.F05 && !RNCONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x20] - - - label: "Step 4a: TH reads from the DUT the AttributeList attribute." - command: "readAttribute" - attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED - response: - constraints: - type: list - contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] - - - label: "Step 4a: TH reads from the DUT the AttributeList attribute." - command: "readAttribute" - attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED" - response: - constraints: - type: list - contains: [9, 65528, 65529, 65531, 65532, 65533] - - - label: - "Step 4b: TH reads the optional attribute Uncertainty in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: RNCONC.S.A0007 && RNCONC.S.F00 - response: - constraints: - type: list - contains: [7] - - - label: - "Step 4c: Check the optional attribute Uncertainty is excluded from - AttributeList when RNCONC.S.A0007 is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !RNCONC.S.A0007 " - response: - constraints: - type: list - excludes: [7] - - - label: - "Step 4d: TH reads the optional, feature dependent attributes - MeasuredValue, MinMeasuredValue, MaxMeasuredValue and Measurement Unit - in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: RNCONC.S.F00 - response: - constraints: - type: list - contains: [0, 1, 2, 8] - - - label: - "Step 4e: Check that MeasuredValue, MinMeasuredValue, - MaxMeasuredValue, Measurement Unit and Uncertainty are excluded from - AttributeList when RNCONC.S.F00 (MEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !RNCONC.S.F00 " - response: - constraints: - type: list - excludes: [0, 1, 2, 7, 8] - - - label: - "Step 4f: TH reads the optional, feature dependent attributes - PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: RNCONC.S.F04 - response: - constraints: - type: list - contains: [3, 4] - - - label: - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are - excluded from AttributeList when RNCONC.S.F04 (PEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !RNCONC.S.F04 " - response: - constraints: - type: list - excludes: [3, 4] - - - label: - "Step 4h: TH reads the optional, feature dependent attributes - AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: RNCONC.S.F05 - response: - constraints: - type: list - contains: [5, 6] - - - label: - "Step 4i: Check that AverageMeasuredValue and - AverageMeasuredValueWindow are excluded from AttributeList when - RNCONC.S.F05 (AVG) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !RNCONC.S.F05 " - response: - constraints: - type: list - excludes: [5, 6] - - - label: - "Step 4j: TH reads the optional, feature dependent attribute - LevelValue in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: RNCONC.S.F01 - response: - constraints: - type: list - contains: [10] - - - label: - "Step 4k: Check that LevelValue is excluded from AttributeList when - RNCONC.S.F01 (LEV) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !RNCONC.S.F01 " - response: - constraints: - type: list - excludes: [10] - - - label: "Step 5: TH reads from the DUT the EventList attribute." - command: "readAttribute" - attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED - response: - value: [] - constraints: - type: list - - - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [] - constraints: - type: list - - - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list diff --git a/src/app/tests/suites/certification/Test_TC_SMOKECO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_SMOKECO_1_1.yaml deleted file mode 100644 index c1f997bb39..0000000000 --- a/src/app/tests/suites/certification/Test_TC_SMOKECO_1_1.yaml +++ /dev/null @@ -1,269 +0,0 @@ -# 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: 4.1.1. [TC-SMOKECO-1.1] Global Attributes with DUT as Server - -PICS: - - SMOKECO.S - -config: - nodeId: 0x12344321 - cluster: "Smoke CO Alarm" - endpoint: 1 - -tests: - - label: "Step 1: Commission DUT to TH" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads the ClusterRevision attribute from the DUT" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 1 - constraints: - type: int16u - - - label: "Step 3a: TH reads from the DUT the FeatureMap attribute" - PICS: "!SMOKECO.S.F00 && !SMOKECO.S.F01" - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 0 - constraints: - type: bitmap32 - - - label: - "Step 3b: TH reads from the DUT the FeatureMap attribute(Smoke Alarm)" - PICS: SMOKECO.S.F00 && !SMOKECO.S.F01 - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 1 - constraints: - type: bitmap32 - - - label: "Step 3c: TH reads from the DUT the FeatureMap attribute(CO Alarm)" - PICS: SMOKECO.S.F01 && !SMOKECO.S.F00 - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 2 - constraints: - type: bitmap32 - - - label: - "Step 3d: TH reads from the DUT the FeatureMap attribute(Smoke Alarm & - CO Alarm)" - PICS: SMOKECO.S.F00 && SMOKECO.S.F01 - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 3 - constraints: - type: bitmap32 - - - label: "Step 4a: TH reads from the DUT the AttributeList attribute" - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [0, 3, 5, 6, 7, 65528, 65529, 65531, 65532, 65533] - - - label: - "Step 4b: TH reads from the DUT the AttributeList - attribute(SmokeState)" - PICS: SMOKECO.S.A0001 && SMOKECO.S.F00 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [1] - - - label: - "Step 4c: TH reads from the DUT the AttributeList attribute(COState)" - PICS: SMOKECO.S.A0002 && SMOKECO.S.F01 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [2] - - - label: - "Step 4d: TH reads from the DUT the AttributeList - attribute(DeviceMuted)" - PICS: SMOKECO.S.A0004 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [4] - - - label: - "Step 4e: TH reads from the DUT the AttributeList - attribute(InterconnectSmokeAlarm)" - PICS: SMOKECO.S.A0008 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [8] - - - label: - "Step 4f: TH reads from the DUT the AttributeList - attribute(InterconnectCOAlarm)" - PICS: SMOKECO.S.A0009 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [9] - - - label: - "Step 4g: TH reads from the DUT the AttributeList - attribute(ContaminationState)" - PICS: SMOKECO.S.A000a - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [10] - - - label: - "Step 4h: TH reads from the DUT the AttributeList - attribute(SmokeSensitivityLevel)" - PICS: SMOKECO.S.A000b - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [11] - - - label: - "Step 4i: TH reads from the DUT the AttributeList - attribute(ExpiryDate)" - PICS: SMOKECO.S.A000c - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [12] - - - label: "Step 5a: TH reads from the DUT the EventList attribute" - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [2, 3, 4, 5, 10] - - - label: - "Step 5b: TH reads from the DUT the EventList attribute(SmokeAlarm)" - PICS: PICS_EVENT_LIST_ENABLED && SMOKECO.S.E00 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [0] - - - label: "Step 5c: TH reads from the DUT the EventList attribute(COAlarm)" - PICS: PICS_EVENT_LIST_ENABLED && SMOKECO.S.E01 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [1] - - - label: - "Step 5d: TH reads from the DUT the EventList attribute(AlarmMuted)" - PICS: PICS_EVENT_LIST_ENABLED && SMOKECO.S.E06 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [6] - - - label: "Step 5e: TH reads from the DUT the EventList attribute(MuteEnded)" - PICS: PICS_EVENT_LIST_ENABLED && SMOKECO.S.E07 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [7] - - - label: - "Step 5f: TH reads from the DUT the EventList - attribute(InterconnectSmokeAlarm)" - PICS: PICS_EVENT_LIST_ENABLED && SMOKECO.S.E08 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [8] - - - label: - "Step 5g: TH reads from the DUT the EventList - attribute(InterconnectCOAlarm)" - PICS: PICS_EVENT_LIST_ENABLED && SMOKECO.S.E09 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [9] - - - label: "Step 6a: TH reads from the DUT the AcceptedCommandList attribute" - PICS: "!SMOKECO.S.C00.Rsp" - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [] - constraints: - type: list - - - label: "Step 6b: TH reads from the DUT the AcceptedCommandList attribute" - PICS: SMOKECO.S.C00.Rsp - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - constraints: - type: list - contains: [0] - - - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute" - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml deleted file mode 100644 index fdb1e4137c..0000000000 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml +++ /dev/null @@ -1,184 +0,0 @@ -# Copyright (c) 2021 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: 74.1.1. [TC-SWTCH-1.1] Global Attributes with DUT as Server - -PICS: - - SWTCH.S - -config: - nodeId: 0x12344321 - cluster: "Switch" - endpoint: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 2 - constraints: - type: int16u - - - label: - "Step 3: TH reads from the DUT the FeatureMap attribute and ensures no - invalid bits." - PICS: - "!SWTCH.S.F00 && !SWTCH.S.F01 && !SWTCH.S.F02 && !SWTCH.S.F03 && - !SWTCH.S.F04 && !SWTCH.S.F05" - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 0 - constraints: - type: bitmap32 - - - label: - "Step 3a: Given SWTCH.S.F00(LS) ensure featuremap has the correct bits - set" - PICS: SWTCH.S.F00 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x01] - hasMasksClear: [0x02, 0x04, 0x08, 0x10, 0x20] - - - label: - "Step 3b: Given SWTCH.S.F01(MS) ensure featuremap has the correct bits - set: checks on !MSL when MS feature present." - PICS: SWTCH.S.F01 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2] - hasMasksClear: [0x1] - - - label: - "Step 3b: Given SWTCH.S.F02(MSR) ensure featuremap has the correct - bits set: checks on MS & !AS & MSR." - PICS: SWTCH.S.F02 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2, 0x4] - hasMasksClear: [0x1, 0x20] - - - label: - "Step 3b: Given SWTCH.S.F03(MSL) ensure featuremap has the correct - bits set: LS cannot be enabled if MSL." - PICS: SWTCH.S.F03 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2, 0x8] - hasMasksClear: [0x1] - - - label: - "Step 3b: Given SWTCH.S.F04(MSM) ensure featuremap has the correct - bits set: LS cannot be enabled if MSM." - PICS: SWTCH.S.F04 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2, 0x10] - hasMasksClear: [0x1] - - - label: - "Step 3b: Given SWTCH.S.F05(AS) ensure featuremap has the correct bits - set: LS and MSR cannot be enabled if AS, and MSM is required by AS." - PICS: SWTCH.S.F05 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2, 0x10, 0x20] - hasMasksClear: [0x1, 0x4] - - - label: "Step 3c: LS and MS are mutually exclusive (1/2)." - PICS: "SWTCH.S.F00" - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x1] - hasMasksClear: [0x2] - - - label: "Step 3c: LS and MS are mutually exclusive (2/2)." - PICS: "SWTCH.S.F01" - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2] - hasMasksClear: [0x1] - - - label: - "Step 4: TH reads from the DUT the AttributeList attribute, verify - that attribute MultiPressMax is present with MSM feature." - PICS: "SWTCH.S.F04" - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [2] - - - label: - "Step 4: TH reads from the DUT the AttributeList attribute, verify - mandatory attributes." - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [0, 1, 65528, 65529, 65531, 65532, 65533] - - - label: "Step 5: TH reads from the DUT the AcceptedCommandList attribute." - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [] - constraints: - type: list - - - label: "Step 6: TH reads from the DUT the GeneratedCommandList attribute." - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list diff --git a/src/app/tests/suites/certification/Test_TC_S_2_5.yaml b/src/app/tests/suites/certification/Test_TC_S_2_5.yaml index 8616c15665..46cee01c3c 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_5.yaml @@ -27,8 +27,8 @@ tests: - label: "Precondition" verification: | - Commission DUT to TH - - A given fabric SHALL NOT consume more than half (rounded down towards 0) of the Scene Table entries (as indicated in the SceneTableSize attribute). - - MaxRemainingCapacity is SceneTableSize/2. + - The Scene Table capacity for a given fabric SHALL be less than half (rounded down towards 0) of the Scene Table entries (as indicated in the SceneTableSize attribute). + - MaxRemainingCapacity is (SceneTableSize-1)/2. disabled: true - label: @@ -181,56 +181,56 @@ tests: Set up the subscription between DUT and TH by sending the command mentioned below, and verify that the subscription is activated successfully - scenesmanagement subscribe fabric-scene-info 0 200 1 1 + scenesmanagement subscribe fabric-scene-info 5 100 1 1 Verify the DUT sends a report data for FabricSceneInfo after the MinIntervalFloor time; store the RemainingCapacity field from this fabric’s entry reported in FabricSceneInfo into RemainingCapacity and is equals to (MaxRemainingCapacity) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - [1706764401.002841][4438:4440] CHIP:DMG: ReportDataMessage = - [1706764401.002862][4438:4440] CHIP:DMG: { - [1706764401.002879][4438:4440] CHIP:DMG: SubscriptionId = 0x679cab48, - [1706764401.002891][4438:4440] CHIP:DMG: AttributeReportIBs = - [1706764401.002916][4438:4440] CHIP:DMG: [ - [1706764401.002926][4438:4440] CHIP:DMG: AttributeReportIB = - [1706764401.002950][4438:4440] CHIP:DMG: { - [1706764401.002960][4438:4440] CHIP:DMG: AttributeDataIB = - [1706764401.002972][4438:4440] CHIP:DMG: { - [1706764401.002985][4438:4440] CHIP:DMG: DataVersion = 0xec4c4ebe, - [1706764401.002996][4438:4440] CHIP:DMG: AttributePathIB = - [1706764401.003008][4438:4440] CHIP:DMG: { - [1706764401.003021][4438:4440] CHIP:DMG: Endpoint = 0x1, - [1706764401.003035][4438:4440] CHIP:DMG: Cluster = 0x62, - [1706764401.003048][4438:4440] CHIP:DMG: Attribute = 0x0000_0002, - [1706764401.003059][4438:4440] CHIP:DMG: } - [1706764401.003076][4438:4440] CHIP:DMG: - [1706764401.003088][4438:4440] CHIP:DMG: Data = [ - [1706764401.003105][4438:4440] CHIP:DMG: - [1706764401.003121][4438:4440] CHIP:DMG: { - [1706764401.003136][4438:4440] CHIP:DMG: 0x0 = 0, - [1706764401.003150][4438:4440] CHIP:DMG: 0x1 = 1, - [1706764401.003162][4438:4440] CHIP:DMG: 0x2 = 1, - [1706764401.003175][4438:4440] CHIP:DMG: 0x3 = false, - [1706764401.003190][4438:4440] CHIP:DMG: 0x4 = 7, - [1706764401.003203][4438:4440] CHIP:DMG: 0xfe = 1, - [1706764401.003216][4438:4440] CHIP:DMG: }, - [1706764401.003229][4438:4440] CHIP:DMG: ], - [1706764401.003239][4438:4440] CHIP:DMG: }, - [1706764401.003260][4438:4440] CHIP:DMG: - [1706764401.003270][4438:4440] CHIP:DMG: }, - [1706764401.003292][4438:4440] CHIP:DMG: - [1706764401.003301][4438:4440] CHIP:DMG: ], - [1706764401.003324][4438:4440] CHIP:DMG: - [1706764401.003334][4438:4440] CHIP:DMG: InteractionModelRevision = 11 - [1706764401.003343][4438:4440] CHIP:DMG: } - [1706764401.003557][4438:4440] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0062 Attribute 0x0000_0002 DataVersion: 3964423870 - [1706764401.003615][4438:4440] CHIP:TOO: FabricSceneInfo: 1 entries - [1706764401.003676][4438:4440] CHIP:TOO: [1]: { - [1706764401.003698][4438:4440] CHIP:TOO: SceneCount: 0 - [1706764401.003708][4438:4440] CHIP:TOO: CurrentScene: 1 - [1706764401.003718][4438:4440] CHIP:TOO: CurrentGroup: 1 - [1706764401.003728][4438:4440] CHIP:TOO: SceneValid: FALSE - [1706764401.003740][4438:4440] CHIP:TOO: RemainingCapacity: 7 - [1706764401.003750][4438:4440] CHIP:TOO: FabricIndex: 1 - [1706764401.003761][4438:4440] CHIP:TOO: } + [1720506229.849] [3777:3779] [DMG] ReportDataMessage = + [1720506229.849] [3777:3779] [DMG] { + [1720506229.849] [3777:3779] [DMG] SubscriptionId = 0x5da2bd16, + [1720506229.849] [3777:3779] [DMG] AttributeReportIBs = + [1720506229.849] [3777:3779] [DMG] [ + [1720506229.849] [3777:3779] [DMG] AttributeReportIB = + [1720506229.849] [3777:3779] [DMG] { + [1720506229.849] [3777:3779] [DMG] AttributeDataIB = + [1720506229.850] [3777:3779] [DMG] { + [1720506229.850] [3777:3779] [DMG] DataVersion = 0xdcafe47f, + [1720506229.850] [3777:3779] [DMG] AttributePathIB = + [1720506229.850] [3777:3779] [DMG] { + [1720506229.850] [3777:3779] [DMG] Endpoint = 0x1, + [1720506229.850] [3777:3779] [DMG] Cluster = 0x62, + [1720506229.850] [3777:3779] [DMG] Attribute = 0x0000_0002, + [1720506229.850] [3777:3779] [DMG] } + [1720506229.850] [3777:3779] [DMG] + [1720506229.850] [3777:3779] [DMG] Data = [ + [1720506229.850] [3777:3779] [DMG] + [1720506229.850] [3777:3779] [DMG] { + [1720506229.850] [3777:3779] [DMG] 0x0 = 0 (unsigned), + [1720506229.850] [3777:3779] [DMG] 0x1 = 0 (unsigned), + [1720506229.850] [3777:3779] [DMG] 0x2 = 0 (unsigned), + [1720506229.850] [3777:3779] [DMG] 0x3 = false, + [1720506229.850] [3777:3779] [DMG] 0x4 = 7 (unsigned), + [1720506229.850] [3777:3779] [DMG] 0xfe = 1 (unsigned), + [1720506229.850] [3777:3779] [DMG] }, + [1720506229.851] [3777:3779] [DMG] ], + [1720506229.851] [3777:3779] [DMG] }, + [1720506229.851] [3777:3779] [DMG] + [1720506229.851] [3777:3779] [DMG] }, + [1720506229.851] [3777:3779] [DMG] + [1720506229.851] [3777:3779] [DMG] ], + [1720506229.851] [3777:3779] [DMG] + [1720506229.851] [3777:3779] [DMG] InteractionModelRevision = 11 + [1720506229.851] [3777:3779] [DMG] } + [1720506229.851] [3777:3779] [TOO] Endpoint: 1 Cluster: 0x0000_0062 Attribute 0x0000_0002 DataVersion: 3702514815 + [1720506229.851] [3777:3779] [TOO] FabricSceneInfo: 1 entries + [1720506229.851] [3777:3779] [TOO] [1]: { + [1720506229.852] [3777:3779] [TOO] SceneCount: 0 + [1720506229.852] [3777:3779] [TOO] CurrentScene: 0 + [1720506229.852] [3777:3779] [TOO] CurrentGroup: 0 + [1720506229.852] [3777:3779] [TOO] SceneValid: FALSE + [1720506229.852] [3777:3779] [TOO] RemainingCapacity: 7 + [1720506229.852] [3777:3779] [TOO] FabricIndex: 1 + [1720506229.852] [3777:3779] [TOO] } disabled: true - label: @@ -275,52 +275,52 @@ tests: verification: | Verify that the DUT sends a report data for FabricSceneInfo after the MinIntervalFloor time; store the RemainingCapacity field from this fabric’s entry reported in FabricSceneInfo into RemainingCapacity and is equals to (MaxRemainingCapacity-1). - [1706764465.493922][4438:4440] CHIP:DMG: ReportDataMessage = - [1706764465.493926][4438:4440] CHIP:DMG: { - [1706764465.493928][4438:4440] CHIP:DMG: SubscriptionId = 0xcd5a528f, - [1706764465.493931][4438:4440] CHIP:DMG: AttributeReportIBs = - [1706764465.493937][4438:4440] CHIP:DMG: [ - [1706764465.493939][4438:4440] CHIP:DMG: AttributeReportIB = - [1706764465.493944][4438:4440] CHIP:DMG: { - [1706764465.493947][4438:4440] CHIP:DMG: AttributeDataIB = - [1706764465.493949][4438:4440] CHIP:DMG: { - [1706764465.493952][4438:4440] CHIP:DMG: DataVersion = 0xec4c4ec0, - [1706764465.493955][4438:4440] CHIP:DMG: AttributePathIB = - [1706764465.493958][4438:4440] CHIP:DMG: { - [1706764465.493961][4438:4440] CHIP:DMG: Endpoint = 0x1, - [1706764465.493963][4438:4440] CHIP:DMG: Cluster = 0x62, - [1706764465.493966][4438:4440] CHIP:DMG: Attribute = 0x0000_0002, - [1706764465.493969][4438:4440] CHIP:DMG: } - [1706764465.493974][4438:4440] CHIP:DMG: - [1706764465.493979][4438:4440] CHIP:DMG: Data = [ - [1706764465.493985][4438:4440] CHIP:DMG: - [1706764465.493990][4438:4440] CHIP:DMG: { - [1706764465.493997][4438:4440] CHIP:DMG: 0x0 = 1, - [1706764465.494002][4438:4440] CHIP:DMG: 0x1 = 1, - [1706764465.494007][4438:4440] CHIP:DMG: 0x2 = 1, - [1706764465.494013][4438:4440] CHIP:DMG: 0x3 = false, - [1706764465.494018][4438:4440] CHIP:DMG: 0x4 = 6, - [1706764465.494023][4438:4440] CHIP:DMG: 0xfe = 1, - [1706764465.494029][4438:4440] CHIP:DMG: }, - [1706764465.494034][4438:4440] CHIP:DMG: ], - [1706764465.494038][4438:4440] CHIP:DMG: }, - [1706764465.494047][4438:4440] CHIP:DMG: - [1706764465.494050][4438:4440] CHIP:DMG: }, - [1706764465.494059][4438:4440] CHIP:DMG: - [1706764465.494062][4438:4440] CHIP:DMG: ], - [1706764465.494070][4438:4440] CHIP:DMG: - [1706764465.494073][4438:4440] CHIP:DMG: InteractionModelRevision = 11 - [1706764465.494077][4438:4440] CHIP:DMG: } - [1706764465.494130][4438:4440] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0062 Attribute 0x0000_0002 DataVersion: 3964423872 - [1706764465.494142][4438:4440] CHIP:TOO: FabricSceneInfo: 1 entries - [1706764465.494152][4438:4440] CHIP:TOO: [1]: { - [1706764465.494155][4438:4440] CHIP:TOO: SceneCount: 1 - [1706764465.494158][4438:4440] CHIP:TOO: CurrentScene: 1 - [1706764465.494161][4438:4440] CHIP:TOO: CurrentGroup: 1 - [1706764465.494164][4438:4440] CHIP:TOO: SceneValid: FALSE - [1706764465.494167][4438:4440] CHIP:TOO: RemainingCapacity: 6 - [1706764465.494170][4438:4440] CHIP:TOO: FabricIndex: 1 - [1706764465.494174][4438:4440] CHIP:TOO: } + [1720506650.012] [3835:3837] [DMG] ReportDataMessage = + [1720506650.012] [3835:3837] [DMG] { + [1720506650.012] [3835:3837] [DMG] SubscriptionId = 0x8e3fb466, + [1720506650.012] [3835:3837] [DMG] AttributeReportIBs = + [1720506650.012] [3835:3837] [DMG] [ + [1720506650.012] [3835:3837] [DMG] AttributeReportIB = + [1720506650.012] [3835:3837] [DMG] { + [1720506650.012] [3835:3837] [DMG] AttributeDataIB = + [1720506650.012] [3835:3837] [DMG] { + [1720506650.013] [3835:3837] [DMG] DataVersion = 0xd2aec24e, + [1720506650.013] [3835:3837] [DMG] AttributePathIB = + [1720506650.013] [3835:3837] [DMG] { + [1720506650.013] [3835:3837] [DMG] Endpoint = 0x1, + [1720506650.013] [3835:3837] [DMG] Cluster = 0x62, + [1720506650.013] [3835:3837] [DMG] Attribute = 0x0000_0002, + [1720506650.013] [3835:3837] [DMG] } + [1720506650.013] [3835:3837] [DMG] + [1720506650.013] [3835:3837] [DMG] Data = [ + [1720506650.014] [3835:3837] [DMG] + [1720506650.014] [3835:3837] [DMG] { + [1720506650.014] [3835:3837] [DMG] 0x0 = 1 (unsigned), + [1720506650.014] [3835:3837] [DMG] 0x1 = 0 (unsigned), + [1720506650.014] [3835:3837] [DMG] 0x2 = 0 (unsigned), + [1720506650.014] [3835:3837] [DMG] 0x3 = false, + [1720506650.014] [3835:3837] [DMG] 0x4 = 6 (unsigned), + [1720506650.014] [3835:3837] [DMG] 0xfe = 1 (unsigned), + [1720506650.014] [3835:3837] [DMG] }, + [1720506650.015] [3835:3837] [DMG] ], + [1720506650.015] [3835:3837] [DMG] }, + [1720506650.015] [3835:3837] [DMG] + [1720506650.015] [3835:3837] [DMG] }, + [1720506650.015] [3835:3837] [DMG] + [1720506650.015] [3835:3837] [DMG] ], + [1720506650.015] [3835:3837] [DMG] + [1720506650.015] [3835:3837] [DMG] InteractionModelRevision = 11 + [1720506650.015] [3835:3837] [DMG] } + [1720506650.016] [3835:3837] [TOO] Endpoint: 1 Cluster: 0x0000_0062 Attribute 0x0000_0002 DataVersion: 3534668366 + [1720506650.016] [3835:3837] [TOO] FabricSceneInfo: 1 entries + [1720506650.016] [3835:3837] [TOO] [1]: { + [1720506650.016] [3835:3837] [TOO] SceneCount: 1 + [1720506650.016] [3835:3837] [TOO] CurrentScene: 0 + [1720506650.016] [3835:3837] [TOO] CurrentGroup: 0 + [1720506650.016] [3835:3837] [TOO] SceneValid: FALSE + [1720506650.016] [3835:3837] [TOO] RemainingCapacity: 6 + [1720506650.016] [3835:3837] [TOO] FabricIndex: 1 + [1720506650.016] [3835:3837] [TOO] } disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_S_2_6.yaml b/src/app/tests/suites/certification/Test_TC_S_2_6.yaml index 5a578eeb8a..40f4fa89d4 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_6.yaml @@ -28,8 +28,15 @@ config: tests: - label: "Precondition: Commission DUT to TH1" verification: | - Once DUT reach the commissionable state send the following command on TH1: - pairing onnetwork 1 20202021 + - DUT should be commissioned onto TH1, TH2, and TH3. + - The Scene Table capacity for a given fabric SHALL be less than half (rounded down towards 0) of the Scene Table entries (as indicated in the SceneTableSize attribute). + - MaxRemainingCapacity is (SceneTableSize-1)/2. + - TH1, TH2, and TH3 should be on separate, distinct fabrics. + + Send the below command in respective DUT + ./chip-all-clusters-app + + Once DUT reach the commissionable state send the following command ./chip-tool pairing onnetwork 1 20202021 command on TH1. Verify the commissioning completed with success on TH(chip-tool) from DUT [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success disabled: true @@ -38,7 +45,7 @@ tests: verification: | Open a commissioning window On TH1(Chiptool)using below command - pairing open-commissioning-window 1 1 400 2000 3841 + ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 Verify the Successfully opened pairing window On TH1(Chiptool)e device @@ -52,7 +59,7 @@ tests: verification: | Now send the below command for commissionin DUT to TH2 with Manual pairing code generated in TH1 using open commission window - pairing code 2 36253605617 --commissioner-name beta + ./chip-tool pairing code 2 36253605617 --commissioner-name beta Verify the commissioning completed with success on TH2(chip-tool) from DUT @@ -64,7 +71,7 @@ tests: verification: | Open a commissioning window On TH1(Chiptool)using below command - pairing open-commissioning-window 1 1 400 2000 3842 + ./chip-tool pairing open-commissioning-window 1 1 400 2000 3842 Verify the Successfully opened pairing window On TH1(Chiptool)e device @@ -78,7 +85,7 @@ tests: verification: | send the below command for commissionin DUT to TH3 with Manual pairing code generated in TH1 using open commission window - pairing code 3 36545248276 --commissioner-name gamma + ./chip-tool pairing code 3 36545248276 --commissioner-name gamma Verify the commissioning completed with success on TH3(chip-tool) from DUT @@ -91,7 +98,7 @@ tests: field set to 0x0000." PICS: S.S.C03.Rsp verification: | - scenesmanagement remove-all-scenes 0x0000 1 1 + ./chip-tool scenesmanagement remove-all-scenes 0x0000 1 1 Verify the RemoveAllScenesResponse with following fields: Status is SUCCESS @@ -107,11 +114,11 @@ tests: - label: "Step 1b: Repeat Step 1a with TH2." PICS: S.S.C03.Rsp verification: | - scenesmanagement remove-all-scenes 0x0000 2 1 --commissioner-name beta + ./chip-tool scenesmanagement remove-all-scenes 0x0000 2 1 --commissioner-name beta Verify the RemoveAllScenesResponse with following fields: Status is SUCCESS - Group ID is 0x0000 on the TH(Chip-tool) log and below is the sample log provided for the raspi platform: + Group ID is 0x0000 on the TH2(Chip-tool) log and below is the sample log provided for the raspi platform: [1700826575.191275][15971:15973] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0062 Command=0x0000_0003 [1700826575.191321][15971:15973] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0062 Command 0x0000_0003 @@ -124,11 +131,11 @@ tests: - label: "Step 1C: Repeat Step 1a with TH3." PICS: S.S.C03.Rsp verification: | - scenesmanagement remove-all-scenes 0x0000 3 1 --commissioner-name gamma + ./chip-tool scenesmanagement remove-all-scenes 0x0000 3 1 --commissioner-name gamma Verify the RemoveAllScenesResponse with following fields: Status is SUCCESS - Group ID is 0x0000 on the TH(Chip-tool) log and below is the sample log provided for the raspi platform: + Group ID is 0x0000 on the TH3(Chip-tool) log and below is the sample log provided for the raspi platform: [1700826595.190538][15975:15977] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0062 Command=0x0000_0003 [1700826595.190578][15975:15977] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0062 Command 0x0000_0003 @@ -140,7 +147,7 @@ tests: - label: "Step 2a: TH1 reads from the DUT the SceneTableSize attribute" verification: | - scenesmanagement read scene-table-size 1 1 + ./chip-tool scenesmanagement read scene-table-size 1 1 Verify the "SceneTableSize" attribute value is SceneTableSize(minimum=16) which is recorded into SceneTableSize on the TH (Chip-tool) and below is the sample log provided for the raspi platform: @@ -155,7 +162,7 @@ tests: verification: | Please use Interactive mode to Verify the subscription Here the command to enter interactive mode:-- - interactive start + ./chip-tool interactive start Set up the subscription between DUT and TH by sending the command mentioned below, and verify that the subscription is activated successfully @@ -229,13 +236,13 @@ tests: CHIP:DMG: Refresh LivenessCheckTime for 9224 milliseconds with SubscriptionId = 0xce6a96bc Peer = 01:0000000000000001 disabled: true - - label: "Step 2d: Repeat Step 2b and 2c with TH2 and TH3" + - label: "Step 2d: Repeat Step 2b and 2c with TH2." verification: | TH2: Please use Interactive mode to Verify the subscription of an event Here the command to enter interactive mode:-- - interactive start + ./chip-tool interactive start Set up the subscription between DUT and TH by sending the command mentioned below, and verify that the subscription is activated successfully @@ -295,7 +302,7 @@ tests: verification: | Please use Interactive mode to Verify the subscription of an event Here the command to enter interactive mode:-- - interactive start + ./chip-tool interactive start Set up the subscription between DUT and TH by sending the command mentioned below, and verify that the subscription is activated successfully @@ -967,44 +974,40 @@ tests: - label: "Step 7: TH3 sends a StoreScene command to DUT with the GroupID field - set to 0x0000, the SceneID field set to 0x01." + set to 0x0000, the SceneID field set to 0xfe." PICS: S.S.C04.Rsp verification: | - scenesmanagement store-scene 0x0000 0x01 3 1 --commissioner-name gamma + scenesmanagement store-scene 0x0000 0xfe 3 1 --commissioner-name gamma Verify the StoreSceneResponse with following fields: Status is RESOURCE_EXHAUSTED(0x89) on the TH3(Chip-tool) log and below is the sample log provided for the raspi platform: - [1705915551.740537][21417:21419] CHIP:DMG: }, - [1705915551.740557][21417:21419] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0062 Command=0x0000_0004 - [1705915551.740566][21417:21419] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0062 Command 0x0000_0004 - [1705915551.740585][21417:21419] CHIP:TOO: StoreSceneResponse: { - [1705915551.740590][21417:21419] CHIP:TOO: status: 137 - [1705915551.740593][21417:21419] CHIP:TOO: groupID: 0 - [1705915551.740596][21417:21419] CHIP:TOO: sceneID: 1 - [1705915551.740598][21417:21419] CHIP:TOO: } + [1718862868.462786][6330:6332] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0062 Command 0x0000_0004 + [1718862868.462834][6330:6332] CHIP:TOO: StoreSceneResponse: { + [1718862868.462862][6330:6332] CHIP:TOO: status: 137 + [1718862868.462885][6330:6332] CHIP:TOO: groupID: 0 + [1718862868.462908][6330:6332] CHIP:TOO: sceneID: 254 + [1718862868.462930][6330:6332] CHIP:TOO: } disabled: true - label: "Step 8: TH sends a CopyScene command to DUT with the mode field set to 0x00, the group identifier from field set to 0x0000, the scene identifier from field set to 0x01, the group identifier to field set - to 0x0000 and the scene identifier to field set to 0xFE." + to 0x0000 and the scene identifier to field set to 0x02." PICS: S.S.C40.Rsp verification: | - scenesmanagement copy-scene 0x00 0x0000 0x02 0x0000 0x00 3 1 --commissioner-name gamma + scenesmanagement copy-scene 0x00 0x0000 0x01 0x0000 0x02 1 1 Verify the CopySceneResponse with following fields: - Status is RESOURCE_EXHAUSTED(0x89) on the TH(Chip-tool) log and below is the sample log provided for the raspi platform: - - [1705915659.672801][21417:21419] CHIP:DMG: }, - [1705915659.672875][21417:21419] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0062 Command=0x0000_0040 - [1705915659.672891][21417:21419] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0062 Command 0x0000_0040 - [1705915659.672923][21417:21419] CHIP:TOO: CopySceneResponse: { - [1705915659.672937][21417:21419] CHIP:TOO: status: 133 - [1705915659.672950][21417:21419] CHIP:TOO: groupIdentifierFrom: 0 - [1705915659.672979][21417:21419] CHIP:TOO: sceneIdentifierFrom: 2 - [1705915659.672991][21417:21419] CHIP:TOO: } + Status is RESOURCE_EXHAUSTED(0x89), the group identifier from field set to 0x0000 and the scene identifier from field set to 1 on the TH(Chip-tool) log and below is the sample log provided for the raspi platform: + + [1708499075.003907][25643:25645] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0062 Command 0x0000_0040 + [1708499075.004059][25643:25645] CHIP:TOO: CopySceneResponse: { + [1708499075.004128][25643:25645] CHIP:TOO: status: 137 + [1708499075.004185][25643:25645] CHIP:TOO: groupIdentifierFrom: 0 + [1708499075.004240][25643:25645] CHIP:TOO: sceneIdentifierFrom: 1 + [1708499075.004293][25643:25645] CHIP:TOO: } disabled: true - label: @@ -1140,32 +1143,30 @@ tests: "Step 11a: TH1 removes the TH2 fabric by sending the RemoveFabric command to the DUT with the FabricIndex set to th2FabricIndex" verification: | - operationalcredentials remove-fabric th2FabricIndex 1 0 + operationalcredentials remove-fabric 2 1 0 - On TH1(chip-tool) verify the success with the nocresponse with statuscode is success(0) + Verify the DUT sends a response to TH with the Status field set to 0x00 (SUCCESS) and the FabricIndex field set to th2FabricIndex on TH1(Chip-tool) log and below is the sample log provided for the raspi platform: - [1784416866.004187][21433:21435] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 - [1784416866.004214][21433:21435] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 - [1784416866.004236][21433:21435] CHIP:TOO: NOCResponse: { - [1784416866.004250][21433:21435] CHIP:TOO: statusCode: 0 - [1784416866.004255][21433:21435] CHIP:TOO: fabricIndex: th2FabricIndex - [1784416866.004259][21433:21435] CHIP:TOO: } - [1784416866.004270][21433:21435] CHIP:DMG: ICR moving to [AwaitingDe] + [1708332262.744710][18447:18449] CHIP:DMG: }, + [1708332262.744728][18447:18449] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 + [1708332262.744737][18447:18449] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 + [1708332262.744755][18447:18449] CHIP:TOO: NOCResponse: { + [1708332262.744761][18447:18449] CHIP:TOO: statusCode: 0 + [1708332262.744765][18447:18449] CHIP:TOO: fabricIndex: 2 + [1708332262.744768][18447:18449] CHIP:TOO: } disabled: true - label: "Step 11b: TH1 removes the TH3 fabric by sending the RemoveFabric command to the DUT with the FabricIndex set to th3FabricIndex" verification: | - operationalcredentials remove-fabric th3FabricIndex 1 0 + operationalcredentials remove-fabric 3 1 0 - On TH1(chip-tool) verify the success with the nocresponse with statuscode is success(0) + Verify the DUT sends a response to TH with the Status field set to 0x00 (SUCCESS) and the FabricIndex field set to th3FabricIndex on TH1(Chip-tool) log and below is the sample log provided for the raspi platform: - [1784416866.004187][21433:21435] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 - [1784416866.004214][21433:21435] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 - [1784416866.004236][21433:21435] CHIP:TOO: NOCResponse: { - [1784416866.004250][21433:21435] CHIP:TOO: statusCode: 0 - [1784416866.004255][21433:21435] CHIP:TOO: fabricIndex: th3FabricIndex - [1784416866.004259][21433:21435] CHIP:TOO: } - [1784416866.004270][21433:21435] CHIP:DMG: ICR moving to [AwaitingDe] + [1708332339.212544][18440:18442] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 + [1708332339.212553][18440:18442] CHIP:TOO: NOCResponse: { + [1708332339.212557][18440:18442] CHIP:TOO: statusCode: 0 + [1708332339.212560][18440:18442] CHIP:TOO: fabricIndex: 3 + [1708332339.212562][18440:18442] CHIP:TOO: } disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml deleted file mode 100644 index 1783570274..0000000000 --- a/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml +++ /dev/null @@ -1,127 +0,0 @@ -# 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: 219.3.1. [TC-TCCM-3.1] On Mode functionality with DUT as Server - -PICS: - - TCCM.S.A0003 - - MOD.S.F00 - - OO.S.C00.Rsp - - OO.S.C01.Rsp - -config: - nodeId: 0x12344321 - cluster: "Refrigerator And Temperature Controlled Cabinet Mode" - endpoint: 1 - #Configure newmode value - new_mode_th: - type: int8u - defaultValue: 2 - nonNull_OnMode_value: - type: int8u - defaultValue: 0 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: - "Preconditions: The OnMode attribute is set to a non-NULL value from - the mode values indicated by the SupportedModes attribute." - PICS: TCCM.S.A0003 && MOD.S.F00 - command: "writeAttribute" - attribute: "OnMode" - arguments: - value: nonNull_OnMode_value - - - label: "Step 2: TH reads from the DUT the OnMode attribute." - PICS: TCCM.S.A0003 && MOD.S.F00 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: on_mode_dut - - - label: "Step 3a: TH reads from the DUT the CurrentMode attribute." - PICS: TCCM.S.A0001 && MOD.S.F00 - command: "readAttribute" - attribute: "CurrentMode" - response: - saveAs: old_current_mode_dut - - - label: - "Step 3b: If the OnMode and CurrentMode attributes have the same - value, proceed to step 4, Otherwise proceed to step 6" - PICS: TCCM.S.A0003 && TCCM.S.A0001 && MOD.S.F00 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: on_mode_dut - - name: "Value2" - value: old_current_mode_dut - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 4:TH reads the SupportedModes attribute from the DUT" - runIf: IsExpectedValue - PICS: TCCM.S.A0000 && MOD.S.F00 - command: "readAttribute" - attribute: "SupportedModes" - response: - constraints: - type: list - minLength: 2 - - - label: - "Step 5: Select a value from supported_modes_dut different from - on_mode_dut. Save the value as new_mode_th. TH sends a ChangeToMode - command to the DUT with NewMode set to new_mode_th" - runIf: IsExpectedValue - PICS: TCCM.S.C00.Rsp && MOD.S.F00 - command: "ChangeToMode" - arguments: - values: - - name: "NewMode" - value: new_mode_th - response: - values: - - name: "Status" - value: 0x00 - - - label: "Step 6: TH sends an Off command to the DUT" - PICS: OO.S.C00.Rsp && MOD.S.F00 - cluster: "On/Off" - command: "Off" - - - label: "Step 7: TH sends an On command to the DUT" - PICS: OO.S.C01.Rsp && MOD.S.F00 - cluster: "On/Off" - command: "On" - - - label: "Step 8: TH reads the CurrentMode attribute from the DUT" - PICS: TCCM.S.A0001 && MOD.S.F00 - command: "readAttribute" - attribute: "CurrentMode" - response: - value: on_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml deleted file mode 100644 index b89db6a419..0000000000 --- a/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml +++ /dev/null @@ -1,176 +0,0 @@ -# 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: 219.3.2. [TC-TCCM-3.2] Startup Mode functionality with DUT as Server - -PICS: - - TCCM.S.A0002 - -config: - nodeId: 0x12344321 - cluster: "Refrigerator And Temperature Controlled Cabinet Mode" - endpoint: 1 - - new_start_up_mode_th: - type: int8u - defaultValue: 0 - new_mode_th: - type: int8u - defaultValue: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: TCCM.S.A0002 - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: startup_mode_dut - constraints: - type: int8u - - - label: - "If startup_mode_dut is null proceed to step 3. Else save - startup_mode_dut as new_start_up_mode_th and proceed to step 5" - PICS: TCCM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: null - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - runIf: IsExpectedValue - PICS: TCCM.S.A0000 - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 4:TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - runIf: IsExpectedValue - PICS: TCCM.S.A0002 - command: "writeAttribute" - attribute: "StartUpMode" - arguments: - value: new_start_up_mode_th - - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." - PICS: TCCM.S.A0001 - command: "readAttribute" - attribute: "CurrentMode" - response: - saveAs: old_current_mode_dut - constraints: - type: int8u - - - label: - "If startup_mode_dut is equal to old_current_mode_dut proceed to step - 6. Else proceed to step 8" - PICS: TCCM.S.A0002 && TCCM.S.A0001 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: old_current_mode_dut - response: - - values: - - name: "Equals" - saveAs: Step5_IsExpectedValue - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - runIf: Step5_IsExpectedValue - PICS: TCCM.S.A0000 - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: Step6_supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - runIf: Step5_IsExpectedValue - PICS: DISHM.S.C00.Rsp - command: "ChangeToMode" - arguments: - values: - - name: "NewMode" - value: new_mode_th - - - label: "Step 8: Physically power cycle the device." - verification: | - Physically power cycle the device. - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - 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 9: TH reads from the DUT the StartUpMode attribute." - PICS: TCCM.S.A0002 && PICS_SKIP_SAMPLE_APP - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: new_start_up_mode_dut - constraints: - type: int8u - anyOf: [new_start_up_mode_th, startup_mode_dut] - - - label: "Step 10: TH reads from the DUT the CurrentMode attribute." - PICS: TCCM.S.A0001 && PICS_SKIP_SAMPLE_APP - command: "readAttribute" - attribute: "CurrentMode" - response: - value: new_start_up_mode_dut - constraints: - type: int8u diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml deleted file mode 100644 index 64d8b3f7d6..0000000000 --- a/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml +++ /dev/null @@ -1,195 +0,0 @@ -# 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: - 219.3.3. [TC-TCCM-3.3] On Mode and Startup Mode functionality with DUT as - Server - -PICS: - - TCCM.S.A0002 - - TCCM.S.A0003 - - MOD.S.F00 - - OO.S.A4003 - -config: - nodeId: 0x12344321 - cluster: "Refrigerator And Temperature Controlled Cabinet Mode" - endpoint: 1 - - new_start_up_mode_th: - type: int8u - defaultValue: 0 - new_mode_th: - type: int8u - defaultValue: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the SupportedModes attribute." - PICS: TCCM.S.A0002 - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: startup_mode_dut - constraints: - type: int8u - - - label: - "If startup_mode_dut is null proceed to step 3. Else save - startup_mode_dut as new_start_up_mode_th and proceed to step 5" - PICS: TCCM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: null - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - runIf: IsExpectedValue - PICS: TCCM.S.A0000 - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 4:TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - runIf: IsExpectedValue - PICS: TCCM.S.A0002 - command: "writeAttribute" - attribute: "StartUpMode" - arguments: - value: new_start_up_mode_th - - - label: "Step 5: TH reads from the DUT the OnMode attribute." - PICS: TCCM.S.A0003 && TCCM.S.A0002 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: old_on_mode_dut - constraints: - type: int8u - - - label: - "If startup_mode_dut is equal to old_on_mode_dut proceed to step 6. - Else proceed to step 8." - PICS: TCCM.S.A0003 && TCCM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: old_on_mode_dut - response: - - values: - - name: "Equals" - saveAs: Step5_IsExpectedValue - - - label: "Step 6: TH reads the SupportedModes attribute from the DUT" - runIf: Step5_IsExpectedValue - PICS: TCCM.S.A0000 && TCCM.S.A0002 - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: step6_supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 7:TH writes to the DUT the OnMode attribute with the new_mode_th - value" - runIf: Step5_IsExpectedValue - PICS: TCCM.S.A0003 - command: "writeAttribute" - attribute: "OnMode" - arguments: - value: new_mode_th - - - label: "Step 8: TH reads from the DUT the OnMode attribute." - PICS: TCCM.S.A0003 && MOD.S.F00 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: new_on_mode_dut - constraints: - anyOf: [new_mode_th, old_on_mode_dut] - - - label: - "Step 9:TH writes to the DUT the StartUpOnOff attribute with the value - 1" - PICS: OO.S.A4003 - cluster: "On/Off" - command: "writeAttribute" - attribute: "StartUpOnOff" - arguments: - value: 1 - - - label: "Step 10: Physically power cycle the device." - verification: | - Physically power cycle the device. - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - 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 11: TH reads from the DUT the StartUpMode attribute." - PICS: TCCM.S.A0002 && PICS_SKIP_SAMPLE_APP - command: "readAttribute" - attribute: "StartUpMode" - response: - constraints: - anyOf: [new_start_up_mode_th, startup_mode_dut] - - - label: "Step 12: TH reads from the DUT the CurrentMode attribute." - PICS: TCCM.S.A0001 && PICS_SKIP_SAMPLE_APP - command: "readAttribute" - attribute: "CurrentMode" - response: - value: new_on_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_TCTL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TCTL_1_1.yaml deleted file mode 100644 index 680b359d2b..0000000000 --- a/src/app/tests/suites/certification/Test_TC_TCTL_1_1.yaml +++ /dev/null @@ -1,158 +0,0 @@ -# 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: 178.1.1. [TC-TCTL-1.1] Global attributes with DUT as Server - -PICS: - - TCTL.S - -config: - nodeId: 0x12344321 - cluster: "Temperature Control" - endpoint: 1 - -tests: - - label: "Step 1: Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the ClusterRevision attribute" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 1 - constraints: - type: int16u - - - label: "Step 3a: TH reads from the DUT the FeatureMap attribute" - command: "readAttribute" - attribute: "FeatureMap" - PICS: "!TCTL.S.F00 && !TCTL.S.F01 && !TCTL.S.F02" - response: - value: 0 - constraints: - type: bitmap32 - - - label: - "Step 3b: TH reads from the DUT the FeatureMap attribute. bit 0: SHALL - be 1 if and only if TCTL.S.F00(TN) & !TCTL.S.F01(TL)" - command: "readAttribute" - attribute: "FeatureMap" - PICS: TCTL.S.F00 && !TCTL.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x1] - - - label: - "Step 3c: TH reads from the DUT the FeatureMap attribute. bit 1: SHALL - be 1 if and only if TCTL.S.F01(TL) & !TCTL.S.F00(TN)" - command: "readAttribute" - attribute: "FeatureMap" - PICS: TCTL.S.F01 && !TCTL.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2] - - - label: - "Step 3d: TH reads from the DUT the FeatureMap attribute. bit 2: SHALL - be 1 if and only if TCTL.S.F02(A_STEP) & TCTL.S.F00(TN)" - command: "readAttribute" - attribute: "FeatureMap" - PICS: TCTL.S.F02 && TCTL.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x4] - - - label: "Step 4a: TH reads from the DUT the AttributeList attribute." - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [65528, 65529, 65530, 65531, 65532, 65533] - - - label: "Step 4a: TH reads from the DUT the AttributeList attribute." - PICS: "!PICS_EVENT_LIST_ENABLED" - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [65528, 65529, 65531, 65532, 65533] - - - label: - "Step 4b: TH reads from the DUT the AttributeList attribute. 0x0000, - 0x0001, 0x0002: SHALL be included if and only if TCTL.S.F00(TN)" - PICS: TCTL.S.F00 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [0, 1, 2] - - - label: - "Step 4c: TH reads from the DUT the AttributeList attribute. 0x0003: - SHALL be included if and only if TCTL.S.F02(A_STEP)" - PICS: TCTL.S.F02 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [3] - - - label: - "Step 4d: TH reads from the DUT the AttributeList attribute. 0x0004 & - 0x0005: SHALL be included if and only if TCTL.S.F01(TL)" - PICS: TCTL.S.F01 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [4, 5] - - - label: "Step 5: TH reads from the DUT the AcceptedCommandList attribute." - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - constraints: - type: list - contains: [0] - - - label: "Step 6: TH reads from the DUT the GeneratedCommandList attribute." - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list - - - label: "Step 7: TH reads from the DUT the EventList attribute." - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "EventList" - response: - value: [] - constraints: - type: list diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml deleted file mode 100644 index ef8f688bf5..0000000000 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml +++ /dev/null @@ -1,639 +0,0 @@ -# Copyright (c) 2021 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: 42.1.1. [TC-TSTAT-1.1] Global Attributes with DUT as Server - -PICS: - - TSTAT.S - -config: - nodeId: 0x12344321 - cluster: "Thermostat" - endpoint: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 7 - constraints: - type: int16u - - - label: "Step 3a: TH reads from the DUT the FeatureMap attribute." - PICS: - "!TSTAT.S.F00 && !TSTAT.S.F01 && !TSTAT.S.F02 && !TSTAT.S.F03 && - !TSTAT.S.F04 && !TSTAT.S.F05" - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 0 - constraints: - type: bitmap32 - - - label: - "Step 3b: Given TSTAT.S.F00(HEAT ensure featuremap has the correct bit - set" - PICS: TSTAT.S.F00 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x1] - - - label: - "Step 3c: Given TSTAT.S.F01(COOL) ensure featuremap has the correct - bit set" - PICS: TSTAT.S.F01 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2] - - - label: - "Step 3d: Given TSTAT.S.F02(OCC) ensure featuremap has the correct bit - set" - PICS: TSTAT.S.F02 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x4] - - - label: - "Step 3e: Given TSTAT.S.F03(SCH) ensure featuremap has the correct bit - set" - PICS: TSTAT.S.F03 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x8] - - - label: - "Step 3f: Given TSTAT.S.F04(SB) ensure featuremap has the correct bit - set" - PICS: TSTAT.S.F04 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x10] - - - label: - "Step 3g: Given TSTAT.S.F05(AUTO) ensure featuremap has the correct - bit set" - PICS: TSTAT.S.F05 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x20] - - - label: - "Step 3h: Given TSTAT.S.F06(LTNE) ensure featuremap has the correct - bit set" - PICS: TSTAT.S.F06 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x40] - - - label: - "Step 3i: Given TSTAT.S.F08(PRES ensure featuremap has the correct bit - set" - PICS: TSTAT.S.F08 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x100] - - - label: "Step 4a: TH reads from the DUT the AttributeList attribute." - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [0, 27, 28, 65528, 65529, 65530, 65531, 65532, 65533] - - - label: "Step 4a: TH reads from the DUT the AttributeList attribute." - PICS: "!PICS_EVENT_LIST_ENABLED" - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [0, 27, 28, 65528, 65529, 65531, 65532, 65533] - - - label: - "Step 4b: TH reads the Feature dependent(TSTAT.S.F00(HEAT)) attribute - in AttributeList" - PICS: TSTAT.S.F00 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [18] - - label: - "Step 4c: TH reads the Feature dependent(TSTAT.S.F01(COOL)) attribute - in AttributeList" - PICS: TSTAT.S.F01 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [17] - - - label: - "Step 4d: TH reads the Feature dependent(TSTAT.S.F02(OCC)) attribute - in AttributeList" - PICS: TSTAT.S.F02 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [2] - - - label: - "Step 4e: TH reads the Feature dependent(TSTAT.S.F00(HEAT) & - TSTAT.S.F02(OCC)) attribute in AttributeList" - PICS: TSTAT.S.F00 && TSTAT.S.F02 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [20] - - - label: - "Step 4f: TH reads the Feature dependent(TSTAT.S.F01(COOL) & - TSTAT.S.F02(OCC)) attribute in AttributeList" - PICS: TSTAT.S.F01 && TSTAT.S.F02 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [19] - - - label: - "Step 4g: TH reads the Feature dependent(TSTAT.S.F05(AUTO)) attribute - in AttributeList" - PICS: TSTAT.S.F05 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [17, 18, 25] - - - label: - "Step 4h: TH reads the Feature dependent(TSTAT.S.F03(SCH)) attribute - in AttributeList" - PICS: TSTAT.S.F03 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [32, 33, 34] - - - label: - "Step 4i: TH reads the Feature dependent(TSTAT.S.F04(SB)) attribute in - AttributeList" - PICS: TSTAT.S.F04 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [52, 53, 54] - - - label: - "Step 4j: TH reads the Feature dependent(TSTAT.S.F04(SB) & - TSTAT.S.F02(OCC)) attribute in AttributeList" - PICS: TSTAT.S.F04 && TSTAT.S.F02 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [55, 56, 57] - - - label: "Step 4k: TH reads the optional attribute in AttributeList" - PICS: TSTAT.S.A0001 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [1] - - - label: "Step 4l: TH reads the optional attribute in AttributeList" - PICS: TSTAT.S.A0009 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [9] - - - label: "Step 4m: TH reads the optional attribute in AttributeList" - PICS: TSTAT.S.A0010 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [16] - - - label: "Step 4n: TH reads the optional attribute in AttributeList" - PICS: TSTAT.S.A001a - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [26] - - - label: "Step 4o: TH reads the optional attribute in AttributeList" - PICS: TSTAT.S.A001d - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [29] - - - label: "Step 4p: TH reads the optional attribute in AttributeList" - PICS: TSTAT.S.A0023 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [35] - - - label: "Step 4q: TH reads the optional attribute in AttributeList" - PICS: TSTAT.S.A0024 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [36] - - - label: "Step 4r: TH reads the optional attribute in AttributeList" - PICS: TSTAT.S.A0025 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [37] - - - label: "Step 4s: TH reads the optional attribute in AttributeList" - PICS: TSTAT.S.A0029 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [41] - - - label: "Step 4t: TH reads the optional attribute in AttributeList" - PICS: TSTAT.S.A0030 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [48] - - - label: "Step 4u: TH reads the optional attribute in AttributeList" - PICS: TSTAT.S.A0031 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [49] - - - label: "Step 4x: TH reads the optional attribute in AttributeList" - PICS: TSTAT.S.A0032 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [50] - - - label: "Step 4y: TH reads the optional attribute: AttributeList" - PICS: TSTAT.S.A003a - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [58] - - - label: "Step 4z: TH reads the optional attribute in AttributeList" - PICS: TSTAT.S.A0040 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [64] - - - label: "Step 4A: TH reads the optional attribute in AttributeList" - PICS: TSTAT.S.A0041 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [65] - - - label: "Step 4B: TH reads the optional attribute in AttributeList" - PICS: TSTAT.S.A0042 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [66] - - - label: "Step 4C: TH reads the optional attribute in AttributeList" - PICS: TSTAT.S.A0043 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [67] - - - label: "Step 4D: TH reads the optional attribute: AttributeList" - PICS: TSTAT.S.A0044 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [68] - - - label: "Step 4E: TH reads the optional attribute in AttributeList" - PICS: TSTAT.S.A0045 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [69] - - - label: "Step 4F: TH reads the optional attribute in AttributeList" - PICS: TSTAT.S.A0046 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [70] - - - label: "Step 4g: TH reads the optional attribute: AttributeList" - PICS: TSTAT.S.A0047 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [71] - - - label: - "Step 4H: TH reads the Feature dependent(TSTAT.S.F00(HEAT)) optional - attribute in AttributeList" - PICS: TSTAT.S.F00 && TSTAT.S.A0003 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [3] - - - label: - "Step 4I: TH reads the Feature dependent(TSTAT.S.F00(HEAT)) optional - attribute in AttributeList" - PICS: TSTAT.S.F00 && TSTAT.S.A0004 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [4] - - - label: - "Step 4J: TH reads the Feature dependent(TSTAT.S.F00(HEAT)) optional - attribute in AttributeList" - PICS: TSTAT.S.F00 && TSTAT.S.A0008 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [8] - - - label: - "Step 4K: TH reads the Feature dependent(TSTAT.S.F00(HEAT)) optional - attribute in AttributeList" - PICS: TSTAT.S.F00 && TSTAT.S.A0015 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [21] - - - label: - "Step 4L: TH reads the Feature dependent(TSTAT.S.F00(HEAT)) optional - attribute in AttributeList" - PICS: TSTAT.S.F00 && TSTAT.S.A0016 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [22] - - - label: - "Step 4M: TH reads the Feature dependent(TSTAT.S.F01(COOL)) optional - attribute in AttributeList" - PICS: TSTAT.S.F01 && TSTAT.S.A0005 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [5] - - - label: - "Step 4N: TH reads the Feature dependent(TSTAT.S.F01(COOL)) optional - attribute in AttributeList" - PICS: TSTAT.S.F01 && TSTAT.S.A0007 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [6] - - - label: - "Step 4O: TH reads the Feature dependent(TSTAT.S.F01(COOL)) optional - attribute in AttributeList" - PICS: TSTAT.S.F01 && TSTAT.S.A0007 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [7] - - - label: - "Step 4P: TH reads the Feature dependent(TSTAT.S.F01(COOL)) optional - attribute in AttributeList" - PICS: TSTAT.S.F01 && TSTAT.S.A0017 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [23] - - - label: - "Step 4Q: TH reads the Feature dependent(TSTAT.S.F01(COOL)) optional - attribute in AttributeList" - PICS: TSTAT.S.F01 && TSTAT.S.A0018 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [24] - - - label: - "Step 4R: TH reads the Feature dependent(TSTAT.S.F05(AUTO)) optional - attribute in AttributeList" - PICS: TSTAT.S.F05 && TSTAT.S.A001e - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [30] - - - label: - "Step 4j: TH reads the Feature dependent(TSTAT.S.F08(PRES) attribute - in AttributeList" - PICS: TSTAT.S.F08 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [72, 74, 78, 80] - - - label: "Step 5: TH reads EventList attribute from the DUT." - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "EventList" - response: - value: [] - constraints: - type: list - - - label: "Step 6a: TH reads from the DUT the AcceptedCommandList attribute." - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - constraints: - type: list - contains: [0] - - - label: - "Step 6b: TH reads Feature dependent(TSTAT.S.F03(SCH)) commands in - AcceptedCommandList" - PICS: TSTAT.S.F03 - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - constraints: - type: list - contains: [1, 2, 3] - - - label: - "Step 6c: TH reads Feature dependent(TSTAT.S.F08(PRES)) commands in - AcceptedCommandList" - PICS: TSTAT.S.F08 - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - constraints: - type: list - contains: [6, 254] - - - label: - "Step 7a: TH reads Feature dependent(TSTAT.S.F03(SCH)) commands in - GeneratedCommandList" - PICS: TSTAT.S.F03 - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - constraints: - type: list - contains: [0] - - - label: - "Step 7b: TH reads Feature dependent(TSTAT.S.F08(PRES)) commands in - the GeneratedCommandList attribute." - PICS: TSTAT.S.F08 & TSTAT.S.Cfe.Rsp - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [0xFD] # AtomicResponse - constraints: - type: list diff --git a/src/app/tests/suites/certification/Test_TC_TVOCCONC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TVOCCONC_1_1.yaml deleted file mode 100644 index 8ccf182579..0000000000 --- a/src/app/tests/suites/certification/Test_TC_TVOCCONC_1_1.yaml +++ /dev/null @@ -1,339 +0,0 @@ -# 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: 145.1.1. [TC-TVOCCONC-1.1] Global Attributes with DUT as Server - -PICS: - - TVOCCONC.S - -config: - nodeId: 0x12344321 - cluster: "Total Volatile Organic Compounds Concentration Measurement" - endpoint: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the ClusterRevision attribute." - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 3 - constraints: - type: int16u - - - label: - "Step 3a: TH reads from the DUT the FeatureMap attribute and check for - either bit 0 or 1 set" - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x03] - - - label: - "Step 3b: Given TVOCCONC.S.F00(MEA) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: TVOCCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x1] - - - label: - "Step 3c: Given TVOCCONC.S.F00(MEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !TVOCCONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x1] - - - label: - "Step 3d: Given TVOCCONC.S.F01(LEV) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: TVOCCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2] - - - label: - "Step 3e: Given TVOCCONC.S.F01(LEV) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !TVOCCONC.S.F01 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x2] - - - label: - "Step 3f: Given TVOCCONC.S.F02(MED) ensure featuremap has the correct - bit set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: TVOCCONC.S.F02 && TVOCCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x4, 0x2] - - - label: - "Step 3g: Given TVOCCONC.S.F02(MED) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !TVOCCONC.S.F02 && !TVOCCONC.S.F01 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x4] - - - label: - "Step 3h: Given TVOCCONC.S.F03(CRI) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: TVOCCONC.S.F03 && TVOCCONC.S.F01 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x8, 0x2] - - - label: - "Step 3i: Given TVOCCONC.S.F03(CRI) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !TVOCCONC.S.F03 && !TVOCCONC.S.F01" - response: - constraints: - type: bitmap32 - hasMasksClear: [0x8] - - - label: - "Step 3j: Given TVOCCONC.S.F04(PEA) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: TVOCCONC.S.F04 && TVOCCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x10, 0x1] - - - label: - "Step 3k: Given TVOCCONC.S.F04(PEA) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !TVOCCONC.S.F04 && !TVOCCONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x10] - - - label: - "Step 3l: Given TVOCCONC.S.F05(AVG) ensure featuremap has the correct - bits set" - command: "readAttribute" - attribute: "FeatureMap" - PICS: TVOCCONC.S.F05 && TVOCCONC.S.F00 - response: - constraints: - type: bitmap32 - hasMasksSet: [0x20, 0x1] - - - label: - "Step 3m: Given TVOCCONC.S.F05(AVG) is not set, ensure featuremap has - the correct bit clear" - command: "readAttribute" - attribute: "FeatureMap" - PICS: " !TVOCCONC.S.F05 && !TVOCCONC.S.F00 " - response: - constraints: - type: bitmap32 - hasMasksClear: [0x20] - - - label: "Step 4a: TH reads from the DUT the AttributeList attribute" - command: "readAttribute" - attribute: "AttributeList" - PICS: PICS_EVENT_LIST_ENABLED - response: - constraints: - type: list - contains: [9, 65528, 65529, 65530, 65531, 65532, 65533] - - - label: "Step 4a: TH reads from the DUT the AttributeList attribute." - command: "readAttribute" - attribute: "AttributeList" - PICS: "!PICS_EVENT_LIST_ENABLED" - response: - constraints: - type: list - contains: [9, 65528, 65529, 65531, 65532, 65533] - - - label: - "Step 4b: TH reads the optional attribute Uncertainty in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: TVOCCONC.S.A0007 && TVOCCONC.S.F00 - response: - constraints: - type: list - contains: [7] - - - label: - "Step 4c: Check the optional attribute Uncertainty is excluded from - AttributeList when TVOCCONC.S.A0007 is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !TVOCCONC.S.A0007 " - response: - constraints: - type: list - excludes: [7] - - - label: - "Step 4d: TH reads the optional, feature dependent attributes - MeasuredValue, MinMeasuredValue, MaxMeasuredValue and Measurement Unit - in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: TVOCCONC.S.F00 - response: - constraints: - type: list - contains: [0, 1, 2, 8] - - - label: - "Step 4e: Check that MeasuredValue, MinMeasuredValue, - MaxMeasuredValue, Measurement Unit and Uncertainty are excluded from - AttributeList when TVOCCONC.S.F00 (MEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !TVOCCONC.S.F00 " - response: - constraints: - type: list - excludes: [0, 1, 2, 7, 8] - - - label: - "Step 4f: TH reads the optional, feature dependent attributes - PeakMeasuredValue & PeakMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: TVOCCONC.S.F04 - response: - constraints: - type: list - contains: [3, 4] - - - label: - "Step 4g: Check that PeakMeasuredValue & PeakMeasuredValueWindow are - excluded from AttributeList when TVOCCONC.S.F04 (PEA) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !TVOCCONC.S.F04 " - response: - constraints: - type: list - excludes: [3, 4] - - - label: - "Step 4h: TH reads the optional, feature dependent attributes - AverageMeasuredValue AverageMeasuredValueWindow in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: TVOCCONC.S.F05 - response: - constraints: - type: list - contains: [5, 6] - - - label: - "Step 4i: Check that AverageMeasuredValue and - AverageMeasuredValueWindow are excluded from AttributeList when - TVOCCONC.S.F05 (AVG) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !TVOCCONC.S.F05 " - response: - constraints: - type: list - excludes: [5, 6] - - - label: - "Step 4j: TH reads the optional, feature dependent attribute - LevelValue in AttributeList" - command: "readAttribute" - attribute: "AttributeList" - PICS: TVOCCONC.S.F01 - response: - constraints: - type: list - contains: [10] - - - label: - "Step 4k: Check that LevelValue is excluded from AttributeList when - TVOCCONC.S.F01 (LEV) is not set" - command: "readAttribute" - attribute: "AttributeList" - PICS: " !TVOCCONC.S.F01 " - response: - constraints: - type: list - excludes: [10] - - - label: "Step 5: TH reads from the DUT the EventList attribute" - command: "readAttribute" - attribute: "EventList" - PICS: PICS_EVENT_LIST_ENABLED - response: - value: [] - constraints: - type: list - - - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [] - constraints: - type: list - - - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml deleted file mode 100644 index cde5ae4934..0000000000 --- a/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml +++ /dev/null @@ -1,248 +0,0 @@ -# Copyright (c) 2021 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: Window Covering [TC-WNCV-1.1] Global attributes [DUT as Server] - -PICS: - - WNCV.S - -config: - nodeId: 0x12344321 - cluster: "Window Covering" - endpoint: 1 - -tests: - - label: "Step 1: Commission DUT to TH" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - ### MANDATORY GLOBAL Attributes - ### Attribute[0xFFFD]: ClusterRevision ======================================= - - label: - "Step 2: TH reads from the DUT the (0xFFFD) ClusterRevision attribute" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 5 - constraints: - type: int16u - minValue: 5 - maxValue: 200 - - - label: "Step 3a: TH reads from the DUT the (0xFFFC) FeatureMap attribute" - PICS: - "!WNCV.S.F00 && !WNCV.S.F01 && !WNCV.S.F02 && !WNCV.S.F03 && - !WNCV.S.F04 " - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 0 - constraints: - type: bitmap32 - - - label: - "Step 3b: Given WNCV.S.F00(LF) ensure featuremap has the correct bit - set" - PICS: WNCV.S.F00 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x1] - - - label: - "Step 3c: Given WNCV.S.F01(TL) ensure featuremap has the correct bit - set" - PICS: WNCV.S.F01 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x2] - - - label: - "Step 3d: Given WNCV.S.F02(PA_LF) ensure featuremap has the correct - bit set" - PICS: WNCV.S.F02 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x4] - - - label: - "Step 3e: Given WNCV.S.F03(ABS) ensure featuremap has the correct bit - set" - PICS: WNCV.S.F03 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x8] - - - label: - "Step 3f: Given WNCV.S.F04(PA_TL) ensure featuremap has the correct - bit set" - PICS: WNCV.S.F04 - command: "readAttribute" - attribute: "FeatureMap" - response: - constraints: - type: bitmap32 - hasMasksSet: [0x10] - - - label: - "Step 4a: TH reads from the DUT the (0xFFFB) AttributeList attribute" - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: - [0, 7, 10, 13, 23, 65528, 65529, 65530, 65531, 65532, 65533] - - - label: - "Step 4a: TH reads from the DUT the (0xFFFB) AttributeList attribute" - PICS: "!PICS_EVENT_LIST_ENABLED" - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [0, 7, 10, 13, 23, 65528, 65529, 65531, 65532, 65533] - - - label: - "Step 4b: TH reads optional attribute(SafetyStatus) in AttributeList" - PICS: WNCV.S.A001a - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [26] - - - label: - "Step 4c: TH reads the Feature dependent(WNCV.S.F00 & WNCV.S.F02 & - WNCV.S.F03) attribute in AttributeList" - PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.F03 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [16, 17] - - - label: - "Step 4d: TH reads the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) - attribute in AttributeList" - PICS: WNCV.S.F00 && WNCV.S.F02 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [11, 14] - - - label: - "Step 4e: TH reads the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & - WNCV.S.F03) attribute in AttributeList" - PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.F03 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [18, 19] - - - label: - "Step 4f: TH reads the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) - attribute in AttributeList" - PICS: WNCV.S.F01 && WNCV.S.F04 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [12, 15] - - - label: "Step 5: TH reads from the DUT the (0xFFFA) EventList attribute" - PICS: PICS_EVENT_LIST_ENABLED - command: "readAttribute" - attribute: "EventList" - response: - value: [] - constraints: - type: list - - - label: - "Step 6a: TH reads from the DUT the (0xFFF9) AcceptedCommandList - attribute" - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - constraints: - type: list - contains: [0, 1, 2] - - - label: - "Step 6b: TH reads Feature dependent(WNCV.S.F00 & WNCV.S.F02) command - in AcceptedCommandList" - PICS: WNCV.S.F00 && WNCV.S.F02 - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - constraints: - type: list - contains: [5] - - - label: - "Step 6c: TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F03) command - in AcceptedCommandList" - PICS: WNCV.S.F01 && WNCV.S.F03 - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - constraints: - type: list - contains: [7] - - - label: - "Step 6d: TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F04) command - in AcceptedCommandList" - PICS: WNCV.S.F01 && WNCV.S.F04 - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - constraints: - type: list - contains: [8] - - - label: - "Step 7: TH reads from the DUT the (0xFFF8) GeneratedCommandList - attribute" - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 892961a965..1f4f1f66e9 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -922,6 +922,9 @@ MCORE.BDX.Sender=0 MCORE.BDX.SynchronousReceiver=0 MCORE.BDX.SynchronousSender=0 +# Fabric Synchronization +MCORE.FS=1 + # General Diagnostics Cluster DGGEN.S=1 diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index 3b0b354840..01d98213b3 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -171,7 +171,6 @@ "Test_TC_CADMIN_1_2", "Test_TC_CADMIN_1_7", "Test_TC_CADMIN_1_8", - "Test_TC_CADMIN_1_11", "Test_TC_CADMIN_1_12", "Test_TC_CADMIN_1_14", "Test_TC_CADMIN_1_15", diff --git a/src/app/util/attribute-storage-null-handling.h b/src/app/util/attribute-storage-null-handling.h index 826e5aff53..22dd0e6dab 100644 --- a/src/app/util/attribute-storage-null-handling.h +++ b/src/app/util/attribute-storage-null-handling.h @@ -246,7 +246,6 @@ struct NumericAttributeTraits static uint8_t MaxValue(bool isNullable) { return 1; } -private: static constexpr StorageType kNullValue = 0xFF; }; diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 0d1b3827e8..51c01c7e43 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -93,6 +93,11 @@ uint8_t singletonAttributeData[ACTUAL_SINGLETONS_SIZE]; uint16_t emberEndpointCount = 0; +/// Determines a incremental unique index for ember +/// metadata that is increased whenever a structural change is made to the +/// ember metadata (e.g. changing dynamic endpoints or enabling/disabling endpoints) +unsigned emberMetadataStructureGeneration = 0; + // If we have attributes that are more than 4 bytes, then // we need this data block for the defaults #if (defined(GENERATED_DEFAULTS) && GENERATED_DEFAULTS_COUNT) @@ -255,7 +260,7 @@ uint16_t emberAfGetDynamicIndexFromEndpoint(EndpointId id) { if (emAfEndpoints[index].endpoint == id) { - return static_cast(index - FIXED_ENDPOINT_COUNT); + return static_cast(index - FIXED_ENDPOINT_COUNT); } } return kEmberInvalidEndpointIndex; @@ -315,6 +320,7 @@ CHIP_ERROR emberAfSetDynamicEndpoint(uint16_t index, EndpointId id, const EmberA // Now enable the endpoint. emberAfEndpointEnableDisable(id, true); + emberMetadataStructureGeneration++; return CHIP_NO_ERROR; } @@ -322,7 +328,7 @@ EndpointId emberAfClearDynamicEndpoint(uint16_t index) { EndpointId ep = 0; - index = static_cast(index + FIXED_ENDPOINT_COUNT); + index = static_cast(index + FIXED_ENDPOINT_COUNT); if ((index < MAX_ENDPOINT_COUNT) && (emAfEndpoints[index].endpoint != kInvalidEndpointId) && (emberAfEndpointIndexIsEnabled(index))) @@ -332,6 +338,7 @@ EndpointId emberAfClearDynamicEndpoint(uint16_t index) emAfEndpoints[index].endpoint = kInvalidEndpointId; } + emberMetadataStructureGeneration++; return ep; } @@ -944,9 +951,15 @@ bool emberAfEndpointEnableDisable(EndpointId endpoint, bool enable) emberAfGlobalInteractionModelAttributesChangedListener()); } + emberMetadataStructureGeneration++; return true; } +unsigned emberAfMetadataStructureGeneration() +{ + return emberMetadataStructureGeneration; +} + // Returns the index of a given endpoint. Does not consider disabled endpoints. uint16_t emberAfIndexFromEndpoint(EndpointId endpoint) { diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 9d2dcc60bb..711f6a7cff 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -312,6 +312,14 @@ void emberAfAttributeChanged(chip::EndpointId endpoint, chip::ClusterId clusterI /// any cluster data versions. void emberAfEndpointChanged(chip::EndpointId endpoint, chip::app::AttributesChangedListener * listener); +/// Maintains a increasing index of structural changes within ember +/// that determine if existing "indexes" and metadata pointers within ember +/// are still valid or not. +/// +/// Changes to metadata structure (e.g. endpoint enable/disable and dynamic endpoint changes) +/// are reflected in this generation count changing. +unsigned emberAfMetadataStructureGeneration(); + namespace chip { namespace app { diff --git a/src/app/util/attribute-table.cpp b/src/app/util/attribute-table.cpp index 0d68701b63..40e690b1de 100644 --- a/src/app/util/attribute-table.cpp +++ b/src/app/util/attribute-table.cpp @@ -342,8 +342,8 @@ Status emAfWriteAttribute(const ConcreteAttributePath & path, const EmberAfWrite // if we dont support that attribute if (metadata == nullptr) { - ChipLogProgress(Zcl, "%p ep %x clus " ChipLogFormatMEI " attr " ChipLogFormatMEI " not supported", - "WRITE ERR: ", path.mEndpointId, ChipLogValueMEI(path.mClusterId), ChipLogValueMEI(path.mAttributeId)); + ChipLogProgress(Zcl, "WRITE ERR: ep %x clus " ChipLogFormatMEI " attr " ChipLogFormatMEI " not supported", path.mEndpointId, + ChipLogValueMEI(path.mClusterId), ChipLogValueMEI(path.mAttributeId)); return status; } @@ -352,13 +352,13 @@ Status emAfWriteAttribute(const ConcreteAttributePath & path, const EmberAfWrite { if (input.dataType != metadata->attributeType) { - ChipLogProgress(Zcl, "%p invalid data type", "WRITE ERR: "); + ChipLogProgress(Zcl, "WRITE ERR: invalid data type"); return Status::InvalidDataType; } if (metadata->IsReadOnly()) { - ChipLogProgress(Zcl, "%p attr not writable", "WRITE ERR: "); + ChipLogProgress(Zcl, "WRITE ERR: attr not writable"); return Status::UnsupportedWrite; } } diff --git a/src/app/util/binding-table.cpp b/src/app/util/binding-table.cpp index ce3c45f196..7ca3c4ba18 100644 --- a/src/app/util/binding-table.cpp +++ b/src/app/util/binding-table.cpp @@ -219,7 +219,7 @@ CHIP_ERROR BindingTable::LoadEntryFromStorage(uint8_t index, uint8_t & nextIndex else { entry.type = MATTER_MULTICAST_BINDING; - ReturnErrorCodeIf(reader.GetTag() != TLV::ContextTag(kTagGroupId), CHIP_ERROR_INVALID_TLV_TAG); + VerifyOrReturnError(reader.GetTag() == TLV::ContextTag(kTagGroupId), CHIP_ERROR_INVALID_TLV_TAG); ReturnErrorOnFailure(reader.Get(entry.groupId)); } ReturnErrorOnFailure(reader.Next(TLV::ContextTag(kTagNextEntry))); diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index 0ea63cba30..e50b55975f 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -302,7 +302,7 @@ CHIP_ERROR ReadSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, b CHIP_ERROR err = Access::GetAccessControl().Check(aSubjectDescriptor, requestPath, requestPrivilege); if (err != CHIP_NO_ERROR) { - ReturnErrorCodeIf((err != CHIP_ERROR_ACCESS_DENIED) && (err != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL), err); + VerifyOrReturnError((err == CHIP_ERROR_ACCESS_DENIED) || (err == CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL), err); if (aPath.mExpanded) { return CHIP_NO_ERROR; @@ -324,7 +324,7 @@ CHIP_ERROR ReadSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, b bool triedEncode = false; ReturnErrorOnFailure(ReadViaAccessInterface(aSubjectDescriptor, aIsFabricFiltered, aPath, aAttributeReports, apEncoderState, attributeOverride, &triedEncode)); - ReturnErrorCodeIf(triedEncode, CHIP_NO_ERROR); + VerifyOrReturnError(!triedEncode, CHIP_NO_ERROR); } } @@ -704,7 +704,7 @@ CHIP_ERROR WriteSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, } if (err != CHIP_NO_ERROR) { - ReturnErrorCodeIf((err != CHIP_ERROR_ACCESS_DENIED) && (err != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL), err); + VerifyOrReturnError((err == CHIP_ERROR_ACCESS_DENIED) || (err == CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL), err); // TODO: when wildcard/group writes are supported, handle them to discard rather than fail with status return apWriteHandler->AddStatus(aPath, err == CHIP_ERROR_ACCESS_DENIED diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp index 256d0a3a88..57f3d1e521 100644 --- a/src/app/util/mock/attribute-storage.cpp +++ b/src/app/util/mock/attribute-storage.cpp @@ -61,8 +61,9 @@ using namespace Clusters::Globals::Attributes; namespace { -DataVersion dataVersion = 0; -const MockNodeConfig * mockConfig = nullptr; +unsigned metadataStructureGeneration = 0; +DataVersion dataVersion = 0; +const MockNodeConfig * mockConfig = nullptr; const MockNodeConfig & DefaultMockNodeConfig() { @@ -342,6 +343,11 @@ void emberAfAttributeChanged(EndpointId endpoint, ClusterId clusterId, Attribute listener->MarkDirty(AttributePathParams(endpoint, clusterId, attributeId)); } +unsigned emberAfMetadataStructureGeneration() +{ + return metadataStructureGeneration; +} + namespace chip { namespace app { @@ -494,12 +500,14 @@ CHIP_ERROR ReadSingleMockClusterData(FabricIndex aAccessingFabricIndex, const Co void SetMockNodeConfig(const MockNodeConfig & config) { + metadataStructureGeneration++; mockConfig = &config; } /// Resets the mock attribute storage to the default configuration. void ResetMockNodeConfig() { + metadataStructureGeneration++; mockConfig = nullptr; } diff --git a/src/app/util/odd-sized-integers.h b/src/app/util/odd-sized-integers.h index 32f2c8793b..447f56444c 100644 --- a/src/app/util/odd-sized-integers.h +++ b/src/app/util/odd-sized-integers.h @@ -20,6 +20,7 @@ #include #include +#include #include namespace chip { @@ -91,6 +92,59 @@ struct IntegerByteIndexing }; } // namespace detail +namespace NumericLimits { + +// Generic size information for unsigned values. +// +// Assumes non-nullable types. Nullable types reserve one of the values as NULL (the max) +inline constexpr uint64_t MaxUnsignedValue(unsigned ByteSize) +{ + if (ByteSize == 8) + { + return std::numeric_limits::max(); + } + return (1ULL << (8 * ByteSize)) - 1; +} + +/// Readability-method to express that the maximum unsigned value is a null value +/// +/// Our encoding states that max int value is the NULL value +inline constexpr uint64_t UnsignedMaxValueToNullValue(uint64_t value) +{ + return value; +} + +// Generic size information for signed values. +// +// Assumes non-nullable types. Nullable types reserve one of the values as NULL (the min) +inline constexpr int64_t MaxSignedValue(unsigned ByteSize) +{ + if (ByteSize == 8) + { + return std::numeric_limits::max(); + } + return (static_cast(1) << (8 * ByteSize - 1)) - 1; +} + +inline constexpr int64_t MinSignedValue(unsigned ByteSize) +{ + if (ByteSize == 8) + { + return std::numeric_limits::min(); + } + return -(static_cast(1) << (8 * ByteSize - 1)); +} + +/// Readability-method to express that the maximum signed value is a null value +/// +/// Our encoding states that min int value is the NULL value +inline constexpr int64_t SignedMinValueToNullValue(int64_t value) +{ + return value; +} + +} // namespace NumericLimits + template struct NumericAttributeTraits, IsBigEndian> : detail::IntegerByteIndexing { diff --git a/src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml new file mode 100644 index 0000000000..5cbf1d28ec --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml @@ -0,0 +1,478 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Camera AV Stream Management + 0x0551 + CAMERA_AV_STREAM_MANAGEMENT_CLUSTER + The Camera AV Stream Management cluster is used to allow clients to manage, control, and configure various audio, video, and snapshot streams on a camera. + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + MaxConcurrentVideoEncoders + MaxEncodedPixelRate + VideoSensorParams + NightVisionCapable + MinViewport + RateDistortionTradeOffPoints + MaxContentBufferSize + MicrophoneCapabilities + SpeakerCapabilities + TwoWayTalkSupport + SupportedSnapshotParams + MaxNetworkBandwidth + CurrentFrameRate + + HDRModeEnabled + + + + CurrentVideoCodecs + CurrentSnapshotConfig + FabricsUsingCamera + AllocatedVideoStreams + AllocatedAudioStreams + AllocatedSnapshotStreams + + RankedVideoStreamPrioritiesList + + + + SoftRecordingPrivacyModeEnabled + SoftLivestreamPrivacyModeEnabled + HardPrivacyModeOn + + NightVision + + + + + NightVisionIllum + + + + + AWBEnabled + + + + + AutoShutterSpeedEnabled + + + + + AutoISOEnabled + + + + Viewport + + SpeakerMuted + + + + + SpeakerVolumeLevel + + + + + SpeakerMaxLevel + + + + + SpeakerMinLevel + + + + + MicrophoneMuted + + + + + MicrophoneVolumeLevel + + + + + MicrophoneMaxLevel + + + + + MicrophoneMinLevel + + + + + MicrophoneAGCEnabled + + + + ImageRotation + ImageFlipHorizontal + ImageFlipVertical + + LocalVideoRecordingEnabled + + + + + LocalSnapshotRecordingEnabled + + + + + StatusLightEnabled + + + + + StatusLightBrightness + + + + + DepthSensorStatus + + + + + This command SHALL allocate an audio stream on the camera and return an allocated audio stream identifier. + + + + + + + + + + + This command SHALL be sent by the camera in response to the AudioStreamAllocate command, carrying the newly allocated audio stream identifier. + + + + + This command SHALL deallocate an audio stream on the camera, corresponding to the given audio stream identifier. + + + + + + This command SHALL allocate a video stream on the camera and return an allocated video stream identifier. + + + + + + + + + + + + + + + + + This command SHALL be sent by the camera in response to the VideoStreamAllocate command, carrying the newly allocated video stream identifier. + + + + + This command SHALL be used to modify the resolution of a stream specified by the VideoStreamID. + + + + + + + + + This command SHALL deallocate a video stream on the camera, corresponding to the given video stream identifier. + + + + + + This command SHALL allocate a snapshot stream on the device and return an allocated snapshot stream identifier. + + + + + + + + + + + This command SHALL be sent by the device in response to the SnapshotStreamAllocate command, carrying the newly allocated snapshot stream identifier. + + + + + This command SHALL deallocate an snapshot stream on the camera, corresponding to the given snapshot stream identifier. + + + + + + This command SHALL set the relative priorities of the various stream types on the camera. + + + + + + This command SHALL return a Snapshot from the camera. + + + + + + + This command SHALL be sent by the device in response to the CaptureSnapshot command, carrying the requested snapshot. + + + + + + + This command sets the viewport in all video streams. + + + + + + The data fields for this command SHALL be as follows: + + + + + + The data fields for this command SHALL be as follows: + + + + + + The data fields for this command SHALL be as follows: + + + + + + + + + + + + + + + + + This event SHALL be generated when there is a modification in the corresponding video stream. + + + + + + + + + + + This event SHALL be generated when there is a modification in the corresponding audio stream. + + + + + + + + + + + This event SHALL be generated when there is a modification in the corresponding snapshot stream. + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml index 42a538e7a0..379caa47ce 100644 --- a/src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml @@ -18,7 +18,7 @@ limitations under the License. XML generated by Alchemy; DO NOT EDIT. Source: src/app_clusters/Chime.adoc Parameters: in-progress -Git: 0.9-fall2024-225-g1da0e33be +Git: 0.9-fall2024-301-g4e2f0c1c4 --> @@ -29,7 +29,7 @@ Git: 0.9-fall2024-225-g1da0e33be - + Chime 0x0556 CHIME_CLUSTER diff --git a/src/app/zap-templates/zcl/data-model/chip/device-energy-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/device-energy-management-cluster.xml index b087f3c162..3550dd0301 100644 --- a/src/app/zap-templates/zcl/data-model/chip/device-energy-management-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/device-energy-management-cluster.xml @@ -1,6 +1,6 @@ - + + Device Energy Management @@ -26,12 +32,10 @@ limitations under the License. This cluster allows a client to manage the power draw of a device. An example of such a client could be an Energy Management System (EMS) which controls an Energy Smart Appliance (ESA). - + - + @@ -49,28 +53,23 @@ future power consumption vs time."> - + - + - + - + - + @@ -126,26 +125,26 @@ planned operation.">
- Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command + Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command. - PowerAdjustStart + This event SHALL be generated when the Power Adjustment session is started. - PowerAdjustEnd + This event SHALL be generated when the Power Adjustment session ends. - Paused + This event SHALL be generated when the ESA enters the Paused state. - Resumed + This event SHALL be generated when the ESA leaves the Paused state and resumes operation. diff --git a/src/app/zap-templates/zcl/data-model/chip/device-energy-management-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/device-energy-management-mode-cluster.xml index 3ee32897b4..c3440adebe 100644 --- a/src/app/zap-templates/zcl/data-model/chip/device-energy-management-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/device-energy-management-mode-cluster.xml @@ -14,9 +14,14 @@ 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. --> - + + - - - - - + + + + - General + Energy Management Device Energy Management Mode 0x009F DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER true true Attributes and commands for selecting a mode from a list of supported options. - - + - + - - SupportedModes - CurrentMode - StartUpMode - OnMode - + SupportedModes + CurrentMode - - This command is used to change device modes. - On receipt of this command the device SHALL respond with a ChangeToModeResponse command. - - + This command is used to change device modes. + - - This command is sent by the device on receipt of the ChangeToModeWithStatus command. - - - + This command is sent by the device on receipt of the ChangeToMode command. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml index 94774774d5..7a4a40d2e3 100644 --- a/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml @@ -1,6 +1,6 @@ - + + @@ -94,25 +100,31 @@ limitations under the License. true true Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. - + + + + - + - - - - + + + + - + + + + @@ -146,7 +158,7 @@ limitations under the License. NextChargeTargetSoC - + ApproximateEVEfficiency @@ -169,13 +181,13 @@ limitations under the License. - This command allows a client to enable the EVSE to charge an EV, + This command allows a client to enable the EVSE to charge an EV, and to provide or update the maximum and minimum charge current. - Upon receipt, this SHALL allow a client to enable the discharge of an EV, + Upon receipt, this SHALL allow a client to enable the discharge of an EV, and to provide or update the maximum discharge current. @@ -201,12 +213,12 @@ limitations under the License. - EVConnected + This event SHALL be generated when the EV is plugged in. - EVNotDetected + This event SHALL be generated when the EV is unplugged or not detected (having been previously plugged in). @@ -215,7 +227,7 @@ limitations under the License. - EnergyTransferStarted + This event SHALL be generated whenever the EV starts charging or discharging, except when an EV has switched between charging and discharging under the control of the PowerAdjustment feature of the Device Energy Management cluster of the associated Device Energy Management device. @@ -223,7 +235,7 @@ limitations under the License. - EnergyTransferStopped + This event SHALL be generated whenever the EV stops charging or discharging, except when an EV has switched between charging and discharging under the control of the PowerAdjustment feature of the Device Energy Management cluster of the associated Device Energy Management device. @@ -232,7 +244,7 @@ limitations under the License. - Fault + If the EVSE detects a fault it SHALL generate a Fault Event. @@ -240,7 +252,7 @@ limitations under the License. - RFID + This event SHALL be generated when a RFID card has been read. diff --git a/src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml index b5dc566821..b28daf8899 100644 --- a/src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml @@ -14,9 +14,14 @@ 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. --> - + + - + - General + Energy Management Energy EVSE Mode 0x009D ENERGY_EVSE_MODE_CLUSTER true true Attributes and commands for selecting a mode from a list of supported options. - - + - + - - SupportedModes - CurrentMode - StartUpMode - OnMode - + SupportedModes + CurrentMode - - This command is used to change device modes. - On receipt of this command the device SHALL respond with a ChangeToModeResponse command. - - + This command is used to change device modes. + - - This command is sent by the device on receipt of the ChangeToModeWithStatus command. - - - + This command is sent by the device on receipt of the ChangeToMode command. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml index da813b60fe..167f7d13e3 100644 --- a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml @@ -77,6 +77,10 @@ limitations under the License. TCAcknowledgementsRequired + + TCUpdateDeadline + + Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock diff --git a/src/app/zap-templates/zcl/data-model/chip/global-attributes.xml b/src/app/zap-templates/zcl/data-model/chip/global-attributes.xml index bad94e46df..c196b39189 100644 --- a/src/app/zap-templates/zcl/data-model/chip/global-attributes.xml +++ b/src/app/zap-templates/zcl/data-model/chip/global-attributes.xml @@ -19,7 +19,6 @@ limitations under the License. ClusterRevision FeatureMap AttributeList - EventList AcceptedCommandList GeneratedCommandList diff --git a/src/app/zap-templates/zcl/data-model/chip/global-enums.xml b/src/app/zap-templates/zcl/data-model/chip/global-enums.xml index 81ebd8506a..277ceb01aa 100644 --- a/src/app/zap-templates/zcl/data-model/chip/global-enums.xml +++ b/src/app/zap-templates/zcl/data-model/chip/global-enums.xml @@ -34,6 +34,18 @@ TODO: Make these structures global rather than defining them for each cluster. + + + + + + + + + + + + - + + @@ -76,12 +82,12 @@ limitations under the License. - BoostStarted + This event SHALL be generated whenever a Boost command is accepted. - BoostEnded + This event SHALL be generated whenever the BoostState transitions from Active to Inactive. diff --git a/src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml index 502f9e3f03..d9211e8084 100644 --- a/src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml @@ -14,12 +14,16 @@ 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. --> - + + - - @@ -33,7 +37,6 @@ limitations under the License. - @@ -41,7 +44,7 @@ limitations under the License. - General + Energy Management Water Heater Mode 0x009E WATER_HEATER_MODE_CLUSTER @@ -49,34 +52,25 @@ limitations under the License. true Attributes and commands for selecting a mode from a list of supported options. - - + - - SupportedModes - CurrentMode - StartUpMode - OnMode - + SupportedModes + CurrentMode - - This command is used to change device modes. - On receipt of this command the device SHALL respond with a ChangeToModeResponse command. - - + This command is used to change device modes. + - - This command is sent by the device on receipt of the ChangeToModeWithStatus command. - - - + This command is sent by the device on receipt of the ChangeToMode command. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml index 9e338efee7..63a9d99bf9 100644 --- a/src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/webrtc-provider-cluster.xml @@ -23,15 +23,6 @@ Git: 0.9-fall2024-234-gf4d359001 - - - - - - - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/webrtc-requestor-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/webrtc-requestor-cluster.xml new file mode 100644 index 0000000000..557ebf8e7b --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/chip/webrtc-requestor-cluster.xml @@ -0,0 +1,62 @@ + + + + + + + Cameras + WebRTC Transport Requestor + 0x0554 + WEBRTC_TRANSPORT_REQUESTOR_CLUSTER + The WebRTC transport requestor cluster provides a way for stream consumers (e.g. Matter Stream Viewer) to establish a WebRTC connection with a stream provider. + true + true + + CurrentSessions + + This command provides the stream requestor with WebRTC session details. It is sent following the receipt of a SolicitOffer command or a re-Offer initiated by the Provider. + + + + + + + + This command provides the stream requestor with the WebRTC session details (i.e. Session ID and SDP answer). It is the next command in the Offer/Answer flow to the ProvideOffer command. + + + + + + This command provides an ICE candidate to the stream requestor in a WebRTC session. + + + + + + This command notifies the stream requestor that the provider has ended the WebRTC session. + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/zone-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/zone-management-cluster.xml new file mode 100644 index 0000000000..27a947b561 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/chip/zone-management-cluster.xml @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Zone Management + 0x0550 + ZONE_MANAGEMENT_CLUSTER + This cluster provides an interface to manage regions of interest, or Zones, which can be either manufacturer or user defined. + true + + + + + + true + + SupportedZoneSources + Zones + TimeControl + Sensitivity + + This command SHALL create and store a TwoD Cartesian Zone. + + + + + + + + + + + The UpdateTwoDCartesianZone SHALL update a stored TwoD Cartesian Zone. + + + + + + + The GetTwoDCartesianZone SHALL return the TwoD Cartesian Zone for the passed in ZoneID. + + + + + + This command SHALL be generated in response to a GetTwoDCartesianZone command. + + + + + This command SHALL remove the Zone mapped to the passed in ZoneID. + + + + + + + + This event SHALL be generated when a Zone is first triggered. + + + + + + This event SHALL be generated when either when the TriggerDetectedDuration value is exceeded by the TimeSinceInitialTrigger value or when the MaxDuration value is exceeded by the TimeSinceInitialTrigger value as described in ZoneTriggeringTimeControlStruct. + + + + 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 e4c9a18e6c..0eba8fc692 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -27,6 +27,7 @@ "boolean-state-configuration-cluster.xml", "actions-cluster.xml", "bridged-device-basic-information.xml", + "camera-av-stream-management-cluster.xml", "chime-cluster.xml", "chip-ota.xml", "channel-cluster.xml", @@ -132,6 +133,7 @@ "water-heater-management-cluster.xml", "water-heater-mode-cluster.xml", "webrtc-provider-cluster.xml", + "webrtc-requestor-cluster.xml", "wifi-network-diagnostics-cluster.xml", "wifi-network-management-cluster.xml", "window-covering.xml", @@ -139,7 +141,8 @@ "sample-mei-cluster.xml", "types/door-lock.xml", "types/occupancy-sensing.xml", - "types/thermostat-user-interface-configuration.xml" + "types/thermostat-user-interface-configuration.xml", + "zone-management-cluster.xml" ], "manufacturersXml": "../../../../src/app/zap-templates/zcl/data-model/manufacturers.xml", "options": { @@ -287,7 +290,8 @@ "ActiveModeThreshold", "RegisteredClients", "ICDCounter", - "ClientsSupportedPerFabric" + "ClientsSupportedPerFabric", + "MaximumCheckInBackOff" ], "Occupancy Sensing": ["HoldTimeLimits", "HoldTime", "FeatureMap"], "Operational Credentials": [ @@ -666,7 +670,15 @@ "ThreadNetworks", "ThreadNetworkTableSize" ], - "Service Area": ["CurrentArea", "EstimatedEndTime", "FeatureMap"] + "Service Area": ["CurrentArea", "EstimatedEndTime", "FeatureMap"], + "Camera AV Stream Management": [ + "VideoSensorParams", + "MinViewport", + "MicrophoneCapabilities", + "SpeakerCapabilities", + "CurrentSnapshotConfig", + "Viewport" + ] }, "mandatoryDeviceTypes": "0x0016", "defaultReportingPolicy": "mandatory", diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index b306dba223..6907cfea0e 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -22,6 +22,7 @@ "boolean-state-configuration-cluster.xml", "actions-cluster.xml", "bridged-device-basic-information.xml", + "camera-av-stream-management-cluster.xml", "chime-cluster.xml", "chip-ota.xml", "channel-cluster.xml", @@ -126,6 +127,7 @@ "water-heater-management-cluster.xml", "water-heater-mode-cluster.xml", "webrtc-provider-cluster.xml", + "webrtc-requestor-cluster.xml", "wifi-network-diagnostics-cluster.xml", "wifi-network-management-cluster.xml", "window-covering.xml", @@ -133,7 +135,8 @@ "sample-mei-cluster.xml", "types/door-lock.xml", "types/occupancy-sensing.xml", - "types/thermostat-user-interface-configuration.xml" + "types/thermostat-user-interface-configuration.xml", + "zone-management-cluster.xml" ], "manufacturersXml": "../../../../src/app/zap-templates/zcl/data-model/manufacturers.xml", "options": { @@ -281,7 +284,8 @@ "ActiveModeThreshold", "RegisteredClients", "ICDCounter", - "ClientsSupportedPerFabric" + "ClientsSupportedPerFabric", + "MaximumCheckInBackOff" ], "Occupancy Sensing": ["HoldTimeLimits", "HoldTime", "FeatureMap"], "Operational Credentials": [ @@ -660,7 +664,15 @@ "ThreadNetworks", "ThreadNetworkTableSize" ], - "Service Area": ["CurrentArea", "EstimatedEndTime", "FeatureMap"] + "Service Area": ["CurrentArea", "EstimatedEndTime", "FeatureMap"], + "Camera AV Stream Management": [ + "VideoSensorParams", + "MinViewport", + "MicrophoneCapabilities", + "SpeakerCapabilities", + "CurrentSnapshotConfig", + "Viewport" + ] }, "mandatoryDeviceTypes": "0x0016", "defaultReportingPolicy": "mandatory", diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json index c240008e1c..e38e880961 100644 --- a/src/app/zap_cluster_list.json +++ b/src/app/zap_cluster_list.json @@ -16,6 +16,7 @@ "BOOLEAN_STATE_CLUSTER": [], "BOOLEAN_STATE_CONFIGURATION_CLUSTER": [], "BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER": [], + "CAMERA_AV_STREAM_MANAGEMENT_CLUSTER": [], "CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [], "CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [], "CHANNEL_CLUSTER": [], @@ -132,8 +133,10 @@ "WATER_HEATER_MANAGEMENT_CLUSTER": [], "WATER_HEATER_MODE_CLUSTER": [], "WEB_RTC_PROVIDER_CLUSTER": [], + "WEBRTC_REQUESTOR_CLUSTER": [], "WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [], - "WINDOW_COVERING_CLUSTER": [] + "WINDOW_COVERING_CLUSTER": [], + "ZONE_MANAGEMENT_CLUSTER": [] }, "ServerDirectories": { "ACCESS_CONTROL_CLUSTER": ["access-control-server"], @@ -160,6 +163,7 @@ "BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER": [ "bridged-device-basic-information-server" ], + "CAMERA_AV_STREAM_MANAGEMENT_CLUSTER": [], "CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [ "concentration-measurement-server" ], @@ -312,10 +316,12 @@ "LAUNDRY_WASHER_CONTROLS_CLUSTER": ["laundry-washer-controls-server"], "LAUNDRY_DRYER_CONTROLS_CLUSTER": ["laundry-dryer-controls-server"], "WEB_RTC_PROVIDER_CLUSTER": [], + "WEBRTC_REQUESTOR_CLUSTER": [], "WIFI_NETWORK_DIAGNOSTICS_CLUSTER": ["wifi-network-diagnostics-server"], "WIFI_NETWORK_MANAGEMENT_CLUSTER": ["wifi-network-management-server"], "WINDOW_COVERING_CLUSTER": ["window-covering-server"], "WATER_HEATER_MANAGEMENT_CLUSTER": ["water-heater-management-server"], - "WATER_HEATER_MODE_CLUSTER": ["mode-base-server"] + "WATER_HEATER_MODE_CLUSTER": ["mode-base-server"], + "ZONE_MANAGEMENT_CLUSTER": [] } } diff --git a/src/ble/BLEEndPoint.cpp b/src/ble/BLEEndPoint.cpp index d8e2a7b2a4..a035626781 100644 --- a/src/ble/BLEEndPoint.cpp +++ b/src/ble/BLEEndPoint.cpp @@ -1001,7 +1001,7 @@ CHIP_ERROR BLEEndPoint::HandleCapabilitiesRequestReceived(PacketBufferHandle && if (mtu > 0) // If one or both device knows connection's MTU... { resp.mFragmentSize = - chip::min(static_cast(mtu - 3), BtpEngine::sMaxFragmentSize); // Reserve 3 bytes of MTU for ATT header. + std::min(static_cast(mtu - 3), BtpEngine::sMaxFragmentSize); // Reserve 3 bytes of MTU for ATT header. } else // Else, if neither device knows MTU... { @@ -1012,7 +1012,7 @@ CHIP_ERROR BLEEndPoint::HandleCapabilitiesRequestReceived(PacketBufferHandle && // Select local and remote max receive window size based on local resources available for both incoming writes AND // GATT confirmations. mRemoteReceiveWindowSize = mLocalReceiveWindowSize = mReceiveWindowMaxSize = - chip::min(req.mWindowSize, static_cast(BLE_MAX_RECEIVE_WINDOW_SIZE)); + std::min(req.mWindowSize, static_cast(BLE_MAX_RECEIVE_WINDOW_SIZE)); resp.mWindowSize = mReceiveWindowMaxSize; ChipLogProgress(Ble, "local and remote recv window sizes = %u", resp.mWindowSize); @@ -1068,7 +1068,7 @@ CHIP_ERROR BLEEndPoint::HandleCapabilitiesResponseReceived(PacketBufferHandle && } // Set fragment size as minimum of (reported ATT MTU, BTP characteristic size) - resp.mFragmentSize = chip::min(resp.mFragmentSize, BtpEngine::sMaxFragmentSize); + resp.mFragmentSize = std::min(resp.mFragmentSize, BtpEngine::sMaxFragmentSize); mBtpEngine.SetRxFragmentSize(resp.mFragmentSize); mBtpEngine.SetTxFragmentSize(resp.mFragmentSize); diff --git a/src/ble/BtpEngine.cpp b/src/ble/BtpEngine.cpp index 75958169a7..4f52b59906 100644 --- a/src/ble/BtpEngine.cpp +++ b/src/ble/BtpEngine.cpp @@ -274,7 +274,7 @@ CHIP_ERROR BtpEngine::HandleCharacteristicReceived(System::PacketBufferHandle && // mRxFragmentSize may be smaller than the characteristic size. Make sure // we're not truncating to a data length smaller than what we have already consumed. VerifyOrExit(reader.OctetsRead() <= mRxFragmentSize, err = BLE_ERROR_REASSEMBLER_INCORRECT_STATE); - data->SetDataLength(chip::min(data->DataLength(), static_cast(mRxFragmentSize))); + data->SetDataLength(std::min(data->DataLength(), static_cast(mRxFragmentSize))); // Now mark the bytes we consumed as consumed. data->ConsumeHead(static_cast(reader.OctetsRead())); diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 346867226e..0c4f7ac996 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -182,9 +182,9 @@ CHIP_ERROR DeviceController::InitControllerNOCChain(const ControllerInitParams & externalOperationalKeypair = params.operationalKeypair; } - ReturnErrorCodeIf(!rcacBuf.Alloc(chipCertAllocatedLen), CHIP_ERROR_NO_MEMORY); - ReturnErrorCodeIf(!icacBuf.Alloc(chipCertAllocatedLen), CHIP_ERROR_NO_MEMORY); - ReturnErrorCodeIf(!nocBuf.Alloc(chipCertAllocatedLen), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(rcacBuf.Alloc(chipCertAllocatedLen), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(icacBuf.Alloc(chipCertAllocatedLen), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(nocBuf.Alloc(chipCertAllocatedLen), CHIP_ERROR_NO_MEMORY); MutableByteSpan rcacSpan(rcacBuf.Get(), chipCertAllocatedLen); @@ -2745,7 +2745,7 @@ void DeviceCommissioner::OnScanNetworksResponse(void * context, CHIP_ERROR DeviceCommissioner::NetworkCredentialsReady() { - ReturnErrorCodeIf(mCommissioningStage != CommissioningStage::kNeedsNetworkCreds, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mCommissioningStage == CommissioningStage::kNeedsNetworkCreds, CHIP_ERROR_INCORRECT_STATE); // need to advance to next step CommissioningStageComplete(CHIP_NO_ERROR); @@ -2755,7 +2755,7 @@ CHIP_ERROR DeviceCommissioner::NetworkCredentialsReady() CHIP_ERROR DeviceCommissioner::ICDRegistrationInfoReady() { - ReturnErrorCodeIf(mCommissioningStage != CommissioningStage::kICDGetRegistrationInfo, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mCommissioningStage == CommissioningStage::kICDGetRegistrationInfo, CHIP_ERROR_INCORRECT_STATE); // need to advance to next step CommissioningStageComplete(CHIP_NO_ERROR); diff --git a/src/controller/CHIPDeviceControllerFactory.cpp b/src/controller/CHIPDeviceControllerFactory.cpp index dbc55dd7b7..e7e718964d 100644 --- a/src/controller/CHIPDeviceControllerFactory.cpp +++ b/src/controller/CHIPDeviceControllerFactory.cpp @@ -132,8 +132,8 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) // OperationalCertificateStore needs to be provided to init the fabric table if fabric table is // not provided wholesale. - ReturnErrorCodeIf((params.fabricTable == nullptr) && (params.opCertStore == nullptr), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(params.sessionKeystore == nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError((params.fabricTable != nullptr) || (params.opCertStore != nullptr), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(params.sessionKeystore != nullptr, CHIP_ERROR_INVALID_ARGUMENT); #if CONFIG_NETWORK_LAYER_BLE #if CONFIG_DEVICE_LAYER @@ -197,7 +197,7 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) { // TODO(#16231): Previously (and still) the objects new-ed in this entire method seem expected to last forever... auto newFabricTable = Platform::MakeUnique(); - ReturnErrorCodeIf(!newFabricTable, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(newFabricTable, CHIP_ERROR_NO_MEMORY); FabricTable::InitParams fabricTableInitParams; fabricTableInitParams.storage = params.fabricIndependentStorage; diff --git a/src/controller/ExampleOperationalCredentialsIssuer.cpp b/src/controller/ExampleOperationalCredentialsIssuer.cpp index 516b3ece2b..346b9012c1 100644 --- a/src/controller/ExampleOperationalCredentialsIssuer.cpp +++ b/src/controller/ExampleOperationalCredentialsIssuer.cpp @@ -59,7 +59,7 @@ CHIP_ERROR IssueX509Cert(uint32_t now, uint32_t validity, ChipDN issuerDn, ChipD constexpr uint8_t sOID_Extension_SubjectAltName[] = { 0x55, 0x1d, 0x11 }; Platform::ScopedMemoryBuffer derBuf; - ReturnErrorCodeIf(!derBuf.Alloc(kMaxDERCertLength), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(derBuf.Alloc(kMaxDERCertLength), CHIP_ERROR_NO_MEMORY); MutableByteSpan derSpan{ derBuf.Get(), kMaxDERCertLength }; int64_t serialNumber = 1; @@ -88,16 +88,16 @@ CHIP_ERROR IssueX509Cert(uint32_t now, uint32_t validity, ChipDN issuerDn, ChipD if (maximizeSize) { Platform::ScopedMemoryBuffer paddedTlvBuf; - ReturnErrorCodeIf(!paddedTlvBuf.Alloc(kMaxCHIPCertLength + kMaxCertPaddingLength), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(paddedTlvBuf.Alloc(kMaxCHIPCertLength + kMaxCertPaddingLength), CHIP_ERROR_NO_MEMORY); MutableByteSpan paddedTlvSpan{ paddedTlvBuf.Get(), kMaxCHIPCertLength + kMaxCertPaddingLength }; ReturnErrorOnFailure(ConvertX509CertToChipCert(derSpan, paddedTlvSpan)); Platform::ScopedMemoryBuffer paddedDerBuf; - ReturnErrorCodeIf(!paddedDerBuf.Alloc(kMaxDERCertLength + kMaxCertPaddingLength), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(paddedDerBuf.Alloc(kMaxDERCertLength + kMaxCertPaddingLength), CHIP_ERROR_NO_MEMORY); MutableByteSpan paddedDerSpan{ paddedDerBuf.Get(), kMaxDERCertLength + kMaxCertPaddingLength }; Platform::ScopedMemoryBuffer fillerBuf; - ReturnErrorCodeIf(!fillerBuf.Alloc(kMaxCertPaddingLength), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(fillerBuf.Alloc(kMaxCertPaddingLength), CHIP_ERROR_NO_MEMORY); memset(fillerBuf.Get(), 'A', kMaxCertPaddingLength); int derPaddingLen = static_cast(kMaxDERCertLength - kDERCertFutureExtEncodingOverhead - derSpan.size()); @@ -361,15 +361,15 @@ CHIP_ERROR ExampleOperationalCredentialsIssuer::GenerateNOCChain(const ByteSpan ReturnErrorOnFailure(VerifyCertificateSigningRequest(csr.data(), csr.size(), pubkey)); chip::Platform::ScopedMemoryBuffer noc; - ReturnErrorCodeIf(!noc.Alloc(kMaxDERCertLength), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(noc.Alloc(kMaxDERCertLength), CHIP_ERROR_NO_MEMORY); MutableByteSpan nocSpan(noc.Get(), kMaxDERCertLength); chip::Platform::ScopedMemoryBuffer icac; - ReturnErrorCodeIf(!icac.Alloc(kMaxDERCertLength), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(icac.Alloc(kMaxDERCertLength), CHIP_ERROR_NO_MEMORY); MutableByteSpan icacSpan(icac.Get(), kMaxDERCertLength); chip::Platform::ScopedMemoryBuffer rcac; - ReturnErrorCodeIf(!rcac.Alloc(kMaxDERCertLength), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(rcac.Alloc(kMaxDERCertLength), CHIP_ERROR_NO_MEMORY); MutableByteSpan rcacSpan(rcac.Get(), kMaxDERCertLength); ReturnErrorOnFailure( @@ -387,7 +387,7 @@ CHIP_ERROR ExampleOperationalCredentialsIssuer::GenerateNOCChain(const ByteSpan uint8_t ipkValue[CHIP_CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES]; Crypto::IdentityProtectionKeySpan ipkSpan(ipkValue); - ReturnErrorCodeIf(defaultIpkSpan.size() != sizeof(ipkValue), CHIP_ERROR_INTERNAL); + VerifyOrReturnError(defaultIpkSpan.size() == sizeof(ipkValue), CHIP_ERROR_INTERNAL); memcpy(&ipkValue[0], defaultIpkSpan.data(), defaultIpkSpan.size()); // Callback onto commissioner. diff --git a/src/controller/ExamplePersistentStorage.cpp b/src/controller/ExamplePersistentStorage.cpp index 27ea886a77..599f0980db 100644 --- a/src/controller/ExamplePersistentStorage.cpp +++ b/src/controller/ExamplePersistentStorage.cpp @@ -102,20 +102,20 @@ CHIP_ERROR PersistentStorage::SyncGetKeyValue(const char * key, void * value, ui { std::string iniValue; - ReturnErrorCodeIf(((value == nullptr) && (size != 0)), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError((value != nullptr) || (size == 0), CHIP_ERROR_INVALID_ARGUMENT); auto section = mConfig.sections[kDefaultSectionName]; - ReturnErrorCodeIf(!SyncDoesKeyExist(key), CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(SyncDoesKeyExist(key), CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); std::string escapedKey = EscapeKey(key); - ReturnErrorCodeIf(!inipp::extract(section[escapedKey], iniValue), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(inipp::extract(section[escapedKey], iniValue), CHIP_ERROR_INVALID_ARGUMENT); iniValue = Base64ToString(iniValue); uint16_t dataSize = static_cast(iniValue.size()); - ReturnErrorCodeIf(size == 0 && dataSize == 0, CHIP_NO_ERROR); - ReturnErrorCodeIf(value == nullptr, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(size != 0 || dataSize != 0, CHIP_NO_ERROR); + VerifyOrReturnError(value != nullptr, CHIP_ERROR_BUFFER_TOO_SMALL); uint16_t sizeToCopy = std::min(size, dataSize); @@ -126,7 +126,7 @@ CHIP_ERROR PersistentStorage::SyncGetKeyValue(const char * key, void * value, ui CHIP_ERROR PersistentStorage::SyncSetKeyValue(const char * key, const void * value, uint16_t size) { - ReturnErrorCodeIf((value == nullptr) && (size != 0), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError((value != nullptr) || (size == 0), CHIP_ERROR_INVALID_ARGUMENT); auto section = mConfig.sections[kDefaultSectionName]; @@ -148,7 +148,7 @@ CHIP_ERROR PersistentStorage::SyncDeleteKeyValue(const char * key) { auto section = mConfig.sections[kDefaultSectionName]; - ReturnErrorCodeIf(!SyncDoesKeyExist(key), CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(SyncDoesKeyExist(key), CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); std::string escapedKey = EscapeKey(key); section.erase(escapedKey); diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index c222fa904e..24c7e00c62 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -1582,6 +1582,7 @@ cluster GeneralCommissioning = 48 { provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + provisional readonly attribute access(read: administer) optional int32u TCUpdateDeadline = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5259,13 +5260,13 @@ provisional cluster DeviceEnergyManagement = 152 { command ModifyForecastRequest(ModifyForecastRequestRequest): DefaultSuccess = 5; /** Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. */ command RequestConstraintBasedForecast(RequestConstraintBasedForecastRequest): DefaultSuccess = 6; - /** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command */ + /** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command. */ command CancelRequest(): DefaultSuccess = 7; } /** Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. */ cluster EnergyEvse = 153 { - revision 4; + revision 3; enum EnergyTransferStoppedReasonEnum : enum8 { kEVStopped = 0; @@ -5430,9 +5431,9 @@ cluster EnergyEvse = 153 { /** Allows a client to disable the EVSE from charging and discharging. */ timed command Disable(): DefaultSuccess = 1; - /** This command allows a client to enable the EVSE to charge an EV, */ + /** This command allows a client to enable the EVSE to charge an EV, and to provide or update the maximum and minimum charge current. */ timed command EnableCharging(EnableChargingRequest): DefaultSuccess = 2; - /** Upon receipt, this SHALL allow a client to enable the discharge of an EV, */ + /** Upon receipt, this SHALL allow a client to enable the discharge of an EV, and to provide or update the maximum discharge current. */ timed command EnableDischarging(EnableDischargingRequest): DefaultSuccess = 3; /** Allows a client to put the EVSE into a self-diagnostics mode. */ timed command StartDiagnostics(): DefaultSuccess = 4; @@ -5501,7 +5502,7 @@ cluster PowerTopology = 156 { /** Attributes and commands for selecting a mode from a list of supported options. */ cluster EnergyEvseMode = 157 { - revision 1; + revision 2; enum ModeTag : enum16 { kAuto = 0; @@ -5517,6 +5518,7 @@ cluster EnergyEvseMode = 157 { kManual = 16384; kTimeOfUse = 16385; kSolarCharging = 16386; + kV2X = 16387; } bitmap Feature : bitmap32 { @@ -5536,8 +5538,6 @@ cluster EnergyEvseMode = 157 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u startUpMode = 2; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5554,8 +5554,7 @@ cluster EnergyEvseMode = 157 { optional char_string<64> statusText = 1; } - /** This command is used to change device modes. - On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + /** This command is used to change device modes. */ command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } @@ -5596,8 +5595,6 @@ cluster WaterHeaterMode = 158 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u startUpMode = 2; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5611,17 +5608,16 @@ cluster WaterHeaterMode = 158 { response struct ChangeToModeResponse = 1 { enum8 status = 0; - optional char_string statusText = 1; + optional char_string<64> statusText = 1; } - /** This command is used to change device modes. - On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + /** This command is used to change device modes. */ command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } /** Attributes and commands for selecting a mode from a list of supported options. */ provisional cluster DeviceEnergyManagementMode = 159 { - revision 1; + revision 2; enum ModeTag : enum16 { kAuto = 0; @@ -5657,8 +5653,6 @@ provisional cluster DeviceEnergyManagementMode = 159 { readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute int8u currentMode = 1; - attribute optional nullable int8u startUpMode = 2; - attribute optional nullable int8u onMode = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5675,8 +5669,7 @@ provisional cluster DeviceEnergyManagementMode = 159 { optional char_string<64> statusText = 1; } - /** This command is used to change device modes. - On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + /** This command is used to change device modes. */ command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } @@ -9415,6 +9408,464 @@ provisional cluster ContentAppObserver = 1296 { command ContentAppMessage(ContentAppMessageRequest): ContentAppMessageResponse = 0; } +/** This cluster provides an interface to manage regions of interest, or Zones, which can be either manufacturer or user defined. */ +provisional cluster ZoneManagement = 1360 { + revision 1; + + enum StatusCodeEnum : enum8 { + kZoneNotFound = 2; + kZoneInUse = 3; + } + + enum ZoneEventStoppedReasonEnum : enum8 { + kActionStopped = 0; + kTimeout = 1; + } + + enum ZoneEventTriggeredReasonEnum : enum8 { + kMotion = 0; + } + + enum ZoneSourceEnum : enum8 { + kMfg = 0; + kUser = 1; + } + + enum ZoneTypeEnum : enum8 { + kTwoDCARTZone = 0; + } + + enum ZoneUseEnum : enum8 { + kMotion = 0; + kPrivacy = 1; + kFocus = 2; + } + + bitmap Feature : bitmap32 { + kTwoDimensionalCartesianZone = 0x1; + } + + struct TwoDCartesianVertexStruct { + int16u x = 0; + int16u y = 1; + } + + struct TwoDCartesianZoneStruct { + char_string<16> name = 0; + ZoneUseEnum use = 1; + TwoDCartesianVertexStruct vertices[] = 2; + optional char_string<9> color = 3; + } + + struct ZoneInformationStruct { + int16u zoneID = 0; + ZoneTypeEnum zoneType = 1; + ZoneSourceEnum zoneSource = 2; + } + + struct ZoneTriggeringTimeControlStruct { + int16u initialDuration = 0; + int16u augmentationDuration = 1; + elapsed_s maxDuration = 2; + int16u blindDuration = 3; + } + + info event ZoneTriggered = 0 { + int16u zones[] = 0; + ZoneEventTriggeredReasonEnum reason = 1; + } + + info event ZoneStopped = 1 { + int16u zones[] = 0; + ZoneEventStoppedReasonEnum reason = 1; + } + + readonly attribute ZoneSourceEnum supportedZoneSources[] = 0; + readonly attribute optional ZoneInformationStruct zones[] = 1; + attribute ZoneTriggeringTimeControlStruct timeControl[] = 2; + attribute int8u sensitivity = 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 CreateTwoDCartesianZoneRequest { + TwoDCartesianZoneStruct zone = 0; + } + + response struct CreateTwoDCartesianZoneResponse = 1 { + int16u zoneID = 0; + } + + request struct UpdateTwoDCartesianZoneRequest { + int16u zoneID = 0; + TwoDCartesianZoneStruct zone = 1; + } + + request struct GetTwoDCartesianZoneRequest { + optional nullable int16u zoneID = 0; + } + + response struct GetTwoDCartesianZoneResponse = 4 { + TwoDCartesianZoneStruct zones[] = 0; + } + + request struct RemoveZoneRequest { + int16u zoneID = 0; + } + + /** This command SHALL create and store a TwoD Cartesian Zone. */ + command access(invoke: manage) CreateTwoDCartesianZone(CreateTwoDCartesianZoneRequest): CreateTwoDCartesianZoneResponse = 0; + /** The UpdateTwoDCartesianZone SHALL update a stored TwoD Cartesian Zone. */ + command access(invoke: manage) UpdateTwoDCartesianZone(UpdateTwoDCartesianZoneRequest): DefaultSuccess = 2; + /** The GetTwoDCartesianZone SHALL return the TwoD Cartesian Zone for the passed in ZoneID. */ + command access(invoke: manage) GetTwoDCartesianZone(GetTwoDCartesianZoneRequest): GetTwoDCartesianZoneResponse = 3; + /** This command SHALL remove the Zone mapped to the passed in ZoneID. */ + command access(invoke: manage) RemoveZone(RemoveZoneRequest): DefaultSuccess = 5; +} + +/** The Camera AV Stream Management cluster is used to allow clients to manage, control, and configure various audio, video, and snapshot streams on a camera. */ +provisional cluster CameraAvStreamManagement = 1361 { + revision 1; + + enum AudioCodecEnum : enum8 { + kOPUS = 0; + kAACLC = 1; + } + + enum ImageCodecEnum : enum8 { + kJPEG = 0; + } + + enum StreamTypeEnum : enum8 { + kInternal = 0; + kRecording = 1; + kAnalysis = 2; + kLiveView = 3; + } + + enum TriStateAutoEnum : enum8 { + kOff = 0; + kOn = 1; + kAuto = 2; + } + + enum TwoWayTalkSupportTypeEnum : enum8 { + kNotSupported = 0; + kHalfDuplex = 1; + kFullDuplex = 2; + } + + enum VideoCodecEnum : enum8 { + kH264 = 0; + kHEVC = 1; + kVVC = 2; + kAV1 = 3; + } + + bitmap Feature : bitmap32 { + kPrivacy = 0x1; + kAudio = 0x2; + kSpeaker = 0x4; + kImageControl = 0x8; + kVideo = 0x10; + kSnapshot = 0x20; + kWatermark = 0x40; + kOnScreenDisplay = 0x80; + kLocalStorage = 0x100; + } + + struct VideoResolutionStruct { + int16u width = 0; + int16u height = 1; + } + + struct VideoStreamStruct { + int16u videoStreamID = 0; + StreamTypeEnum streamType = 1; + VideoCodecEnum videoCodec = 2; + int16u minFrameRate = 3; + int16u maxFrameRate = 4; + VideoResolutionStruct minResolution = 5; + VideoResolutionStruct maxResolution = 6; + int32u minBitRate = 7; + int32u maxBitRate = 8; + int16u minFragmentLen = 9; + int16u maxFragmentLen = 10; + optional boolean watermarkEnabled = 11; + optional boolean OSDEnabled = 12; + int8u referenceCount = 13; + } + + struct SnapshotStreamStruct { + int16u snapshotStreamID = 0; + ImageCodecEnum imageCodec = 1; + int16u frameRate = 2; + int32u bitRate = 3; + VideoResolutionStruct minResolution = 4; + VideoResolutionStruct maxResolution = 5; + int8u quality = 6; + int8u referenceCount = 7; + } + + struct SnapshotParamsStruct { + VideoResolutionStruct resolution = 0; + int16u maxFrameRate = 1; + ImageCodecEnum imageCodec = 2; + } + + struct RateDistortionTradeOffPointsStruct { + VideoCodecEnum codec = 0; + VideoResolutionStruct resolution = 1; + int32u minBitRate = 2; + } + + struct AudioCapabilitiesStruct { + int8u maxNumberOfChannels = 0; + AudioCodecEnum supportedCodecs[] = 1; + int32u supportedSampleRates[] = 2; + int8u supportedBitDepths[] = 3; + } + + struct AudioStreamStruct { + int16u audioStreamID = 0; + StreamTypeEnum streamType = 1; + AudioCodecEnum audioCodec = 2; + int8u channelCount = 3; + int32u sampleRate = 4; + int32u bitRate = 5; + int8u bitDepth = 6; + int8u referenceCount = 7; + } + + struct VideoSensorParamsStruct { + int16u sensorWidth = 0; + int16u sensorHeight = 1; + boolean HDRCapable = 2; + int16u maxFPS = 3; + int16u maxHDRFPS = 4; + } + + struct ViewportStruct { + int16u x1 = 0; + int16u y1 = 1; + int16u x2 = 2; + int16u y2 = 3; + } + + info event VideoStreamChanged = 0 { + int16u videoStreamID = 0; + optional StreamTypeEnum streamType = 1; + optional VideoCodecEnum videoCodec = 2; + optional int16u minFrameRate = 3; + optional int16u maxFrameRate = 4; + optional VideoResolutionStruct minResolution = 5; + optional VideoResolutionStruct maxResolution = 6; + optional int32u minBitRate = 7; + optional int32u maxBitRate = 8; + optional int16u minFragmentLen = 9; + optional int16u maxFragmentLen = 10; + } + + info event AudioStreamChanged = 1 { + int16u audioStreamID = 0; + optional StreamTypeEnum streamType = 1; + optional AudioCodecEnum audioCodec = 2; + optional int8u channelCount = 3; + optional int32u sampleRate = 4; + optional int32u bitRate = 5; + optional int8u bitDepth = 6; + } + + info event SnapshotStreamChanged = 2 { + int16u snapshotStreamID = 0; + optional ImageCodecEnum imageCodec = 1; + optional int16u frameRate = 2; + optional int32u bitRate = 3; + optional VideoResolutionStruct minResolution = 4; + optional VideoResolutionStruct maxResolution = 5; + optional int8u quality = 6; + } + + readonly attribute optional int8u maxConcurrentVideoEncoders = 0; + readonly attribute optional int32u maxEncodedPixelRate = 1; + readonly attribute optional VideoSensorParamsStruct videoSensorParams = 2; + readonly attribute optional boolean nightVisionCapable = 3; + readonly attribute optional VideoResolutionStruct minViewport = 4; + readonly attribute optional RateDistortionTradeOffPointsStruct rateDistortionTradeOffPoints[] = 5; + readonly attribute optional int32u maxContentBufferSize = 6; + readonly attribute optional AudioCapabilitiesStruct microphoneCapabilities = 7; + readonly attribute optional AudioCapabilitiesStruct speakerCapabilities = 8; + readonly attribute optional TwoWayTalkSupportTypeEnum twoWayTalkSupport = 9; + readonly attribute optional SnapshotParamsStruct supportedSnapshotParams[] = 10; + readonly attribute int32u maxNetworkBandwidth = 11; + readonly attribute optional int16u currentFrameRate = 12; + attribute access(read: manage, write: manage) optional boolean HDRModeEnabled = 13; + readonly attribute optional VideoCodecEnum currentVideoCodecs[] = 14; + readonly attribute optional SnapshotParamsStruct currentSnapshotConfig = 15; + readonly attribute fabric_idx fabricsUsingCamera[] = 16; + readonly attribute optional VideoStreamStruct allocatedVideoStreams[] = 17; + readonly attribute optional AudioStreamStruct allocatedAudioStreams[] = 18; + readonly attribute optional SnapshotStreamStruct allocatedSnapshotStreams[] = 19; + attribute access(read: administer, write: administer) optional StreamTypeEnum rankedVideoStreamPrioritiesList[] = 20; + attribute optional boolean softRecordingPrivacyModeEnabled = 21; + attribute optional boolean softLivestreamPrivacyModeEnabled = 22; + readonly attribute optional boolean hardPrivacyModeOn = 23; + attribute access(read: manage, write: manage) optional TriStateAutoEnum nightVision = 24; + attribute access(read: manage, write: manage) optional TriStateAutoEnum nightVisionIllum = 25; + attribute access(read: manage, write: manage) optional boolean AWBEnabled = 26; + attribute access(read: manage, write: manage) optional boolean autoShutterSpeedEnabled = 27; + attribute access(read: manage, write: manage) optional boolean autoISOEnabled = 28; + readonly attribute optional ViewportStruct viewport = 29; + attribute access(read: manage, write: manage) optional boolean speakerMuted = 30; + attribute access(read: manage, write: manage) optional int8u speakerVolumeLevel = 31; + attribute access(read: manage, write: manage) optional int8u speakerMaxLevel = 32; + attribute access(read: manage, write: manage) optional int8u speakerMinLevel = 33; + attribute access(read: manage, write: manage) optional boolean microphoneMuted = 34; + attribute access(read: manage, write: manage) optional int8u microphoneVolumeLevel = 35; + attribute access(read: manage, write: manage) optional int8u microphoneMaxLevel = 36; + attribute access(read: manage, write: manage) optional int8u microphoneMinLevel = 37; + attribute access(read: manage, write: manage) optional boolean microphoneAGCEnabled = 38; + readonly attribute optional int16u imageRotation = 39; + readonly attribute optional boolean imageFlipHorizontal = 40; + readonly attribute optional boolean imageFlipVertical = 41; + attribute access(read: manage, write: manage) optional boolean localVideoRecordingEnabled = 42; + attribute access(read: manage, write: manage) optional boolean localSnapshotRecordingEnabled = 43; + attribute access(read: manage, write: manage) optional boolean statusLightEnabled = 44; + attribute access(read: manage, write: manage) optional ThreeLevelAutoEnum statusLightBrightness = 45; + attribute access(read: manage, write: manage) optional TriStateAutoEnum depthSensorStatus = 46; + 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 AudioStreamAllocateRequest { + StreamTypeEnum streamType = 0; + AudioCodecEnum audioCodec = 1; + int8u channelCount = 2; + int32u sampleRate = 3; + int32u bitRate = 4; + int8u bitDepth = 5; + } + + response struct AudioStreamAllocateResponse = 1 { + int16u audioStreamID = 0; + } + + request struct AudioStreamDeallocateRequest { + int16u audioStreamID = 0; + } + + request struct VideoStreamAllocateRequest { + StreamTypeEnum streamType = 0; + VideoCodecEnum videoCodec = 1; + int16u minFrameRate = 2; + int16u maxFrameRate = 3; + VideoResolutionStruct minResolution = 4; + VideoResolutionStruct maxResolution = 5; + int32u minBitRate = 6; + int32u maxBitRate = 7; + int16u minFragmentLen = 8; + int16u maxFragmentLen = 9; + optional boolean watermarkEnabled = 10; + optional boolean OSDEnabled = 11; + } + + response struct VideoStreamAllocateResponse = 4 { + int16u videoStreamID = 0; + } + + request struct VideoStreamModifyRequest { + int16u videoStreamID = 0; + optional VideoResolutionStruct resolution = 1; + optional boolean watermarkEnabled = 2; + optional boolean OSDEnabled = 3; + } + + request struct VideoStreamDeallocateRequest { + int16u videoStreamID = 0; + } + + request struct SnapshotStreamAllocateRequest { + ImageCodecEnum imageCodec = 0; + int16u frameRate = 1; + int32u bitRate = 2; + VideoResolutionStruct minResolution = 3; + VideoResolutionStruct maxResolution = 4; + int8u quality = 5; + } + + response struct SnapshotStreamAllocateResponse = 8 { + int16u snapshotStreamID = 0; + } + + request struct SnapshotStreamDeallocateRequest { + int16u snapshotStreamID = 0; + } + + request struct SetStreamPrioritiesRequest { + StreamTypeEnum streamPriorities[] = 0; + } + + request struct CaptureSnapshotRequest { + int16u snapshotStreamID = 0; + VideoResolutionStruct requestedResolution = 1; + } + + response struct CaptureSnapshotResponse = 12 { + octet_string data = 0; + ImageCodecEnum imageCodec = 1; + VideoResolutionStruct resolution = 2; + } + + request struct SetViewportRequest { + ViewportStruct viewport = 0; + } + + request struct SetImageRotationRequest { + int16u angle = 0; + } + + request struct SetImageFlipHorizontalRequest { + boolean enabled = 0; + } + + request struct SetImageFlipVerticalRequest { + boolean enabled = 0; + } + + /** This command SHALL allocate an audio stream on the camera and return an allocated audio stream identifier. */ + command access(invoke: manage) AudioStreamAllocate(AudioStreamAllocateRequest): AudioStreamAllocateResponse = 0; + /** This command SHALL deallocate an audio stream on the camera, corresponding to the given audio stream identifier. */ + command access(invoke: manage) AudioStreamDeallocate(AudioStreamDeallocateRequest): DefaultSuccess = 2; + /** This command SHALL allocate a video stream on the camera and return an allocated video stream identifier. */ + command access(invoke: manage) VideoStreamAllocate(VideoStreamAllocateRequest): VideoStreamAllocateResponse = 3; + /** This command SHALL be used to modify the resolution of a stream specified by the VideoStreamID. */ + command access(invoke: manage) VideoStreamModify(VideoStreamModifyRequest): DefaultSuccess = 5; + /** This command SHALL deallocate a video stream on the camera, corresponding to the given video stream identifier. */ + command access(invoke: manage) VideoStreamDeallocate(VideoStreamDeallocateRequest): DefaultSuccess = 6; + /** This command SHALL allocate a snapshot stream on the device and return an allocated snapshot stream identifier. */ + command access(invoke: manage) SnapshotStreamAllocate(SnapshotStreamAllocateRequest): SnapshotStreamAllocateResponse = 7; + /** This command SHALL deallocate an snapshot stream on the camera, corresponding to the given snapshot stream identifier. */ + command access(invoke: manage) SnapshotStreamDeallocate(SnapshotStreamDeallocateRequest): DefaultSuccess = 9; + /** This command SHALL set the relative priorities of the various stream types on the camera. */ + command access(invoke: administer) SetStreamPriorities(SetStreamPrioritiesRequest): DefaultSuccess = 10; + /** This command SHALL return a Snapshot from the camera. */ + command access(invoke: manage) CaptureSnapshot(CaptureSnapshotRequest): DefaultSuccess = 11; + /** This command sets the viewport in all video streams. */ + command access(invoke: manage) SetViewport(SetViewportRequest): DefaultSuccess = 13; + /** The data fields for this command SHALL be as follows: */ + command access(invoke: manage) SetImageRotation(SetImageRotationRequest): DefaultSuccess = 14; + /** The data fields for this command SHALL be as follows: */ + command access(invoke: manage) SetImageFlipHorizontal(SetImageFlipHorizontalRequest): DefaultSuccess = 15; + /** The data fields for this command SHALL be as follows: */ + command access(invoke: manage) SetImageFlipVertical(SetImageFlipVerticalRequest): DefaultSuccess = 16; +} + /** The WebRTC transport provider cluster provides a way for stream providers (e.g. Cameras) to stream or receive their data through WebRTC. */ provisional cluster WebRTCTransportProvider = 1363 { revision 1; @@ -9530,6 +9981,93 @@ provisional cluster WebRTCTransportProvider = 1363 { command EndSession(EndSessionRequest): DefaultSuccess = 7; } +/** The WebRTC transport requestor cluster provides a way for stream consumers (e.g. Matter Stream Viewer) to establish a WebRTC connection with a stream provider. */ +cluster WebRTCTransportRequestor = 1364 { + revision 1; + + enum StreamTypeEnum : enum8 { + kInternal = 0; + kRecording = 1; + kAnalysis = 2; + kLiveView = 3; + } + + enum WebRTCEndReasonEnum : enum8 { + kIceFailed = 0; + kIceTimeout = 1; + kUserHangup = 2; + kUserBusy = 3; + kReplaced = 4; + kNoUserMedia = 5; + kInviteTimeout = 6; + kAnsweredElsewhere = 7; + kOutOfResources = 8; + kMediaTimeout = 9; + kLowPower = 10; + kUnknownReason = 11; + } + + bitmap WebRTCMetadataOptions : bitmap8 { + kDataTLV = 0x1; + } + + struct ICEServerStruct { + char_string urls[] = 1; + optional char_string username = 2; + optional char_string credential = 3; + optional int16u caid = 4; + } + + struct WebRTCSessionStruct { + int16u id = 1; + node_id peerNodeID = 2; + fabric_idx peerFabricIndex = 3; + StreamTypeEnum streamType = 4; + nullable int16u videoStreamID = 5; + nullable int16u audioStreamID = 6; + WebRTCMetadataOptions metadataOptions = 7; + } + + readonly attribute WebRTCSessionStruct currentSessions[] = 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 OfferRequest { + int16u webRTCSessionID = 0; + char_string sdp = 1; + optional ICEServerStruct ICEServers[] = 2; + optional char_string ICETransportPolicy = 3; + } + + request struct AnswerRequest { + int16u webRTCSessionID = 0; + char_string sdp = 1; + } + + request struct ICECandidateRequest { + int16u webRTCSessionID = 0; + char_string ICECandidate = 1; + } + + request struct EndRequest { + int16u webRTCSessionID = 0; + WebRTCEndReasonEnum reason = 1; + } + + /** This command provides the stream requestor with WebRTC session details. It is sent following the receipt of a SolicitOffer command or a re-Offer initiated by the Provider. */ + command Offer(OfferRequest): DefaultSuccess = 1; + /** This command provides the stream requestor with the WebRTC session details (i.e. Session ID and SDP answer). It is the next command in the Offer/Answer flow to the ProvideOffer command. */ + command Answer(AnswerRequest): DefaultSuccess = 2; + /** This command provides an ICE candidate to the stream requestor in a WebRTC session. */ + command ICECandidate(ICECandidateRequest): DefaultSuccess = 3; + /** This command notifies the stream requestor that the provider has ended the WebRTC session. */ + command End(EndRequest): DefaultSuccess = 4; +} + /** This cluster provides facilities to configure and play Chime sounds, such as those used in a doorbell. */ provisional cluster Chime = 1366 { revision 1; diff --git a/src/controller/java/AndroidCallbacks-ForTestJNI.cpp b/src/controller/java/AndroidCallbacks-ForTestJNI.cpp index 568e0ee847..1657aef819 100644 --- a/src/controller/java/AndroidCallbacks-ForTestJNI.cpp +++ b/src/controller/java/AndroidCallbacks-ForTestJNI.cpp @@ -43,7 +43,7 @@ JNI_METHOD(void, GetConnectedDeviceCallbackForTestJni, onDeviceConnected) } JNI_METHOD(void, GetConnectedDeviceCallbackForTestJni, onDeviceConnectionFailure) -(JNIEnv * env, jobject self, jlong callbackHandle, jint errorCode) +(JNIEnv * env, jobject self, jlong callbackHandle, jlong errorCode) { GetConnectedDeviceCallback * connectedDeviceCallback = reinterpret_cast(callbackHandle); VerifyOrReturn(connectedDeviceCallback != nullptr, ChipLogError(Controller, "GetConnectedDeviceCallbackJni handle is nullptr")); diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index f634f8a26f..ba0342629a 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -508,28 +508,50 @@ CHIP_ERROR AndroidDeviceControllerWrapper::ApplyICDRegistrationInfo(chip::Contro VerifyOrReturnError(icdRegistrationInfo != nullptr, CHIP_ERROR_INVALID_ARGUMENT); JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Controller, "Failed to retrieve JNIEnv in %s.", __func__); + return CHIP_ERROR_INCORRECT_STATE; + } + + jmethodID getICDStayActiveDurationMsecMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, icdRegistrationInfo, "getICDStayActiveDurationMsec", + "()Ljava/lang/Long;", &getICDStayActiveDurationMsecMethod); + ReturnErrorOnFailure(err); + jobject jStayActiveMsec = env->CallObjectMethod(icdRegistrationInfo, getICDStayActiveDurationMsecMethod); + if (jStayActiveMsec != nullptr) + { + jlong stayActiveMsec = chip::JniReferences::GetInstance().LongToPrimitive(jStayActiveMsec); + if (!chip::CanCastTo(stayActiveMsec)) + { + ChipLogError(Controller, "Failed to process stayActiveMsec in %s since this is not a valid 32-bit integer.", __func__); + return CHIP_ERROR_INVALID_ARGUMENT; + } + params.SetICDStayActiveDurationMsec(static_cast(stayActiveMsec)); + } + jmethodID getCheckInNodeIdMethod; err = chip::JniReferences::GetInstance().FindMethod(env, icdRegistrationInfo, "getCheckInNodeId", "()Ljava/lang/Long;", &getCheckInNodeIdMethod); - VerifyOrReturnError(err == CHIP_NO_ERROR, err); + ReturnErrorOnFailure(err); jobject jCheckInNodeId = env->CallObjectMethod(icdRegistrationInfo, getCheckInNodeIdMethod); jmethodID getMonitoredSubjectMethod; err = chip::JniReferences::GetInstance().FindMethod(env, icdRegistrationInfo, "getMonitoredSubject", "()Ljava/lang/Long;", &getMonitoredSubjectMethod); - VerifyOrReturnError(err == CHIP_NO_ERROR, err); + ReturnErrorOnFailure(err); jobject jMonitoredSubject = env->CallObjectMethod(icdRegistrationInfo, getMonitoredSubjectMethod); jmethodID getSymmetricKeyMethod; err = chip::JniReferences::GetInstance().FindMethod(env, icdRegistrationInfo, "getSymmetricKey", "()[B", &getSymmetricKeyMethod); - VerifyOrReturnError(err == CHIP_NO_ERROR, err); + ReturnErrorOnFailure(err); jbyteArray jSymmetricKey = static_cast(env->CallObjectMethod(icdRegistrationInfo, getSymmetricKeyMethod)); jmethodID getClientTypeMethod; err = chip::JniReferences::GetInstance().FindMethod(env, icdRegistrationInfo, "getClientType", "()Ljava/lang/Integer;", &getClientTypeMethod); - VerifyOrReturnError(err == CHIP_NO_ERROR, err); + ReturnErrorOnFailure(err); jobject jClientType = env->CallObjectMethod(icdRegistrationInfo, getClientTypeMethod); chip::NodeId checkInNodeId = chip::kUndefinedNodeId; diff --git a/src/controller/java/AndroidOperationalCredentialsIssuer.cpp b/src/controller/java/AndroidOperationalCredentialsIssuer.cpp index d87e4f9482..4873f21c1a 100644 --- a/src/controller/java/AndroidOperationalCredentialsIssuer.cpp +++ b/src/controller/java/AndroidOperationalCredentialsIssuer.cpp @@ -295,7 +295,7 @@ CHIP_ERROR AndroidOperationalCredentialsIssuer::NOCChainGenerated(CHIP_ERROR sta Optional ipk, Optional adminSubject) { - ReturnErrorCodeIf(mOnNOCCompletionCallback == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mOnNOCCompletionCallback != nullptr, CHIP_ERROR_INCORRECT_STATE); Callback::Callback * onCompletion = mOnNOCCompletionCallback; mOnNOCCompletionCallback = nullptr; @@ -357,11 +357,11 @@ CHIP_ERROR AndroidOperationalCredentialsIssuer::LocalGenerateNOCChain(const Byte ChipLogProgress(chipTool, "VerifyCertificateSigningRequest"); Platform::ScopedMemoryBuffer noc; - ReturnErrorCodeIf(!noc.Alloc(kMaxCHIPDERCertLength), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(noc.Alloc(kMaxCHIPDERCertLength), CHIP_ERROR_NO_MEMORY); MutableByteSpan nocSpan(noc.Get(), kMaxCHIPDERCertLength); Platform::ScopedMemoryBuffer rcac; - ReturnErrorCodeIf(!rcac.Alloc(kMaxCHIPDERCertLength), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(rcac.Alloc(kMaxCHIPDERCertLength), CHIP_ERROR_NO_MEMORY); MutableByteSpan rcacSpan(rcac.Get(), kMaxCHIPDERCertLength); MutableByteSpan icacSpan; @@ -380,7 +380,7 @@ CHIP_ERROR AndroidOperationalCredentialsIssuer::LocalGenerateNOCChain(const Byte uint8_t ipkValue[CHIP_CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES]; Crypto::IdentityProtectionKeySpan ipkSpan(ipkValue); - ReturnErrorCodeIf(defaultIpkSpan.size() != sizeof(ipkValue), CHIP_ERROR_INTERNAL); + VerifyOrReturnError(defaultIpkSpan.size() == sizeof(ipkValue), CHIP_ERROR_INTERNAL); memcpy(&ipkValue[0], defaultIpkSpan.data(), defaultIpkSpan.size()); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 88e4e0fb90..06b8dd8ff0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -7987,6 +7987,7 @@ public static class GeneralCommissioningCluster extends BaseChipCluster { private static final long TC_MIN_REQUIRED_VERSION_ATTRIBUTE_ID = 6L; private static final long TC_ACKNOWLEDGEMENTS_ATTRIBUTE_ID = 7L; private static final long TC_ACKNOWLEDGEMENTS_REQUIRED_ATTRIBUTE_ID = 8L; + private static final long TC_UPDATE_DEADLINE_ATTRIBUTE_ID = 9L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -8436,6 +8437,32 @@ public void onSuccess(byte[] tlv) { }, TC_ACKNOWLEDGEMENTS_REQUIRED_ATTRIBUTE_ID, minInterval, maxInterval); } + public void readTCUpdateDeadlineAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TC_UPDATE_DEADLINE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, TC_UPDATE_DEADLINE_ATTRIBUTE_ID, true); + } + + public void subscribeTCUpdateDeadlineAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TC_UPDATE_DEADLINE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, TC_UPDATE_DEADLINE_ATTRIBUTE_ID, minInterval, maxInterval); + } + public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); @@ -33277,8 +33304,6 @@ public static class EnergyEvseModeCluster extends BaseChipCluster { private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; - private static final long START_UP_MODE_ATTRIBUTE_ID = 2L; - private static final long ON_MODE_ATTRIBUTE_ID = 3L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -33341,14 +33366,6 @@ public interface SupportedModesAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public interface StartUpModeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface OnModeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -33417,76 +33434,6 @@ public void onSuccess(byte[] tlv) { }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readStartUpModeAttribute( - StartUpModeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, START_UP_MODE_ATTRIBUTE_ID, true); - } - - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpModeAttribute(callback, value, 0); - } - - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), START_UP_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeStartUpModeAttribute( - StartUpModeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, START_UP_MODE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readOnModeAttribute( - OnModeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ON_MODE_ATTRIBUTE_ID, true); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(callback, value, 0); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), ON_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeOnModeAttribute( - OnModeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ON_MODE_ATTRIBUTE_ID, minInterval, maxInterval); - } - public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); @@ -33649,8 +33596,6 @@ public static class WaterHeaterModeCluster extends BaseChipCluster { private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; - private static final long START_UP_MODE_ATTRIBUTE_ID = 2L; - private static final long ON_MODE_ATTRIBUTE_ID = 3L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -33713,14 +33658,6 @@ public interface SupportedModesAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public interface StartUpModeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface OnModeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -33789,76 +33726,6 @@ public void onSuccess(byte[] tlv) { }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readStartUpModeAttribute( - StartUpModeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, START_UP_MODE_ATTRIBUTE_ID, true); - } - - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpModeAttribute(callback, value, 0); - } - - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), START_UP_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeStartUpModeAttribute( - StartUpModeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, START_UP_MODE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readOnModeAttribute( - OnModeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ON_MODE_ATTRIBUTE_ID, true); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(callback, value, 0); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), ON_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeOnModeAttribute( - OnModeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ON_MODE_ATTRIBUTE_ID, minInterval, maxInterval); - } - public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); @@ -34021,8 +33888,6 @@ public static class DeviceEnergyManagementModeCluster extends BaseChipCluster { private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; - private static final long START_UP_MODE_ATTRIBUTE_ID = 2L; - private static final long ON_MODE_ATTRIBUTE_ID = 3L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -34085,14 +33950,6 @@ public interface SupportedModesAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public interface StartUpModeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface OnModeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -34161,76 +34018,6 @@ public void onSuccess(byte[] tlv) { }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readStartUpModeAttribute( - StartUpModeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, START_UP_MODE_ATTRIBUTE_ID, true); - } - - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpModeAttribute(callback, value, 0); - } - - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), START_UP_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeStartUpModeAttribute( - StartUpModeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, START_UP_MODE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readOnModeAttribute( - OnModeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ON_MODE_ATTRIBUTE_ID, true); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(callback, value, 0); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), ON_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeOnModeAttribute( - OnModeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ON_MODE_ATTRIBUTE_ID, minInterval, maxInterval); - } - public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); @@ -59491,6 +59278,2576 @@ public void onSuccess(byte[] tlv) { } } + public static class ZoneManagementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1360L; + + private static final long SUPPORTED_ZONE_SOURCES_ATTRIBUTE_ID = 0L; + private static final long ZONES_ATTRIBUTE_ID = 1L; + private static final long TIME_CONTROL_ATTRIBUTE_ID = 2L; + private static final long SENSITIVITY_ATTRIBUTE_ID = 3L; + private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; + private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; + private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public ZoneManagementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public void createTwoDCartesianZone(CreateTwoDCartesianZoneResponseCallback callback, ChipStructs.ZoneManagementClusterTwoDCartesianZoneStruct zone) { + createTwoDCartesianZone(callback, zone, 0); + } + + public void createTwoDCartesianZone(CreateTwoDCartesianZoneResponseCallback callback, ChipStructs.ZoneManagementClusterTwoDCartesianZoneStruct zone, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long zoneFieldID = 0L; + BaseTLVType zonetlvValue = zone.encodeTlv(); + elements.add(new StructElement(zoneFieldID, zonetlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long zoneIDFieldID = 0L; + Integer zoneID = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == zoneIDFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + zoneID = castingValue.value(Integer.class); + } + } + } + callback.onSuccess(zoneID); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void updateTwoDCartesianZone(DefaultClusterCallback callback, Integer zoneID, ChipStructs.ZoneManagementClusterTwoDCartesianZoneStruct zone) { + updateTwoDCartesianZone(callback, zoneID, zone, 0); + } + + public void updateTwoDCartesianZone(DefaultClusterCallback callback, Integer zoneID, ChipStructs.ZoneManagementClusterTwoDCartesianZoneStruct zone, int timedInvokeTimeoutMs) { + final long commandId = 2L; + + ArrayList elements = new ArrayList<>(); + final long zoneIDFieldID = 0L; + BaseTLVType zoneIDtlvValue = new UIntType(zoneID); + elements.add(new StructElement(zoneIDFieldID, zoneIDtlvValue)); + + final long zoneFieldID = 1L; + BaseTLVType zonetlvValue = zone.encodeTlv(); + elements.add(new StructElement(zoneFieldID, zonetlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void getTwoDCartesianZone(GetTwoDCartesianZoneResponseCallback callback, @Nullable Optional zoneID) { + getTwoDCartesianZone(callback, zoneID, 0); + } + + public void getTwoDCartesianZone(GetTwoDCartesianZoneResponseCallback callback, @Nullable Optional zoneID, int timedInvokeTimeoutMs) { + final long commandId = 3L; + + ArrayList elements = new ArrayList<>(); + final long zoneIDFieldID = 0L; + BaseTLVType zoneIDtlvValue = zoneID != null ? zoneID.map((nonOptionalzoneID) -> new UIntType(nonOptionalzoneID)).orElse(new EmptyType()) : new NullType(); + elements.add(new StructElement(zoneIDFieldID, zoneIDtlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long zonesFieldID = 0L; + ArrayList zones = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == zonesFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + zones = castingValue.map((elementcastingValue) -> ChipStructs.ZoneManagementClusterTwoDCartesianZoneStruct.decodeTlv(elementcastingValue)); + } + } + } + callback.onSuccess(zones); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void removeZone(DefaultClusterCallback callback, Integer zoneID) { + removeZone(callback, zoneID, 0); + } + + public void removeZone(DefaultClusterCallback callback, Integer zoneID, int timedInvokeTimeoutMs) { + final long commandId = 5L; + + ArrayList elements = new ArrayList<>(); + final long zoneIDFieldID = 0L; + BaseTLVType zoneIDtlvValue = new UIntType(zoneID); + elements.add(new StructElement(zoneIDFieldID, zoneIDtlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public interface CreateTwoDCartesianZoneResponseCallback extends BaseClusterCallback { + void onSuccess(Integer zoneID); + } + + public interface GetTwoDCartesianZoneResponseCallback extends BaseClusterCallback { + void onSuccess(ArrayList zones); + } + + public interface SupportedZoneSourcesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface ZonesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface TimeControlAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readSupportedZoneSourcesAttribute( + SupportedZoneSourcesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_ZONE_SOURCES_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SUPPORTED_ZONE_SOURCES_ATTRIBUTE_ID, true); + } + + public void subscribeSupportedZoneSourcesAttribute( + SupportedZoneSourcesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_ZONE_SOURCES_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SUPPORTED_ZONE_SOURCES_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readZonesAttribute( + ZonesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ZONES_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ZONES_ATTRIBUTE_ID, true); + } + + public void subscribeZonesAttribute( + ZonesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ZONES_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ZONES_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readTimeControlAttribute( + TimeControlAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TIME_CONTROL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, TIME_CONTROL_ATTRIBUTE_ID, true); + } + + public void writeTimeControlAttribute(DefaultClusterCallback callback, ArrayList value) { + writeTimeControlAttribute(callback, value, 0); + } + + public void writeTimeControlAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = ArrayType.generateArrayType(value, (elementvalue) -> elementvalue.encodeTlv()); + writeAttribute(new WriteAttributesCallbackImpl(callback), TIME_CONTROL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeTimeControlAttribute( + TimeControlAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TIME_CONTROL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, TIME_CONTROL_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSensitivityAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SENSITIVITY_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SENSITIVITY_ATTRIBUTE_ID, true); + } + + public void writeSensitivityAttribute(DefaultClusterCallback callback, Integer value) { + writeSensitivityAttribute(callback, value, 0); + } + + public void writeSensitivityAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), SENSITIVITY_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeSensitivityAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SENSITIVITY_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SENSITIVITY_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, true); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + + public static class CameraAvStreamManagementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1361L; + + private static final long MAX_CONCURRENT_VIDEO_ENCODERS_ATTRIBUTE_ID = 0L; + private static final long MAX_ENCODED_PIXEL_RATE_ATTRIBUTE_ID = 1L; + private static final long VIDEO_SENSOR_PARAMS_ATTRIBUTE_ID = 2L; + private static final long NIGHT_VISION_CAPABLE_ATTRIBUTE_ID = 3L; + private static final long MIN_VIEWPORT_ATTRIBUTE_ID = 4L; + private static final long RATE_DISTORTION_TRADE_OFF_POINTS_ATTRIBUTE_ID = 5L; + private static final long MAX_CONTENT_BUFFER_SIZE_ATTRIBUTE_ID = 6L; + private static final long MICROPHONE_CAPABILITIES_ATTRIBUTE_ID = 7L; + private static final long SPEAKER_CAPABILITIES_ATTRIBUTE_ID = 8L; + private static final long TWO_WAY_TALK_SUPPORT_ATTRIBUTE_ID = 9L; + private static final long SUPPORTED_SNAPSHOT_PARAMS_ATTRIBUTE_ID = 10L; + private static final long MAX_NETWORK_BANDWIDTH_ATTRIBUTE_ID = 11L; + private static final long CURRENT_FRAME_RATE_ATTRIBUTE_ID = 12L; + private static final long HDR_MODE_ENABLED_ATTRIBUTE_ID = 13L; + private static final long CURRENT_VIDEO_CODECS_ATTRIBUTE_ID = 14L; + private static final long CURRENT_SNAPSHOT_CONFIG_ATTRIBUTE_ID = 15L; + private static final long FABRICS_USING_CAMERA_ATTRIBUTE_ID = 16L; + private static final long ALLOCATED_VIDEO_STREAMS_ATTRIBUTE_ID = 17L; + private static final long ALLOCATED_AUDIO_STREAMS_ATTRIBUTE_ID = 18L; + private static final long ALLOCATED_SNAPSHOT_STREAMS_ATTRIBUTE_ID = 19L; + private static final long RANKED_VIDEO_STREAM_PRIORITIES_LIST_ATTRIBUTE_ID = 20L; + private static final long SOFT_RECORDING_PRIVACY_MODE_ENABLED_ATTRIBUTE_ID = 21L; + private static final long SOFT_LIVESTREAM_PRIVACY_MODE_ENABLED_ATTRIBUTE_ID = 22L; + private static final long HARD_PRIVACY_MODE_ON_ATTRIBUTE_ID = 23L; + private static final long NIGHT_VISION_ATTRIBUTE_ID = 24L; + private static final long NIGHT_VISION_ILLUM_ATTRIBUTE_ID = 25L; + private static final long AWB_ENABLED_ATTRIBUTE_ID = 26L; + private static final long AUTO_SHUTTER_SPEED_ENABLED_ATTRIBUTE_ID = 27L; + private static final long AUTO_ISO_ENABLED_ATTRIBUTE_ID = 28L; + private static final long VIEWPORT_ATTRIBUTE_ID = 29L; + private static final long SPEAKER_MUTED_ATTRIBUTE_ID = 30L; + private static final long SPEAKER_VOLUME_LEVEL_ATTRIBUTE_ID = 31L; + private static final long SPEAKER_MAX_LEVEL_ATTRIBUTE_ID = 32L; + private static final long SPEAKER_MIN_LEVEL_ATTRIBUTE_ID = 33L; + private static final long MICROPHONE_MUTED_ATTRIBUTE_ID = 34L; + private static final long MICROPHONE_VOLUME_LEVEL_ATTRIBUTE_ID = 35L; + private static final long MICROPHONE_MAX_LEVEL_ATTRIBUTE_ID = 36L; + private static final long MICROPHONE_MIN_LEVEL_ATTRIBUTE_ID = 37L; + private static final long MICROPHONE_AGC_ENABLED_ATTRIBUTE_ID = 38L; + private static final long IMAGE_ROTATION_ATTRIBUTE_ID = 39L; + private static final long IMAGE_FLIP_HORIZONTAL_ATTRIBUTE_ID = 40L; + private static final long IMAGE_FLIP_VERTICAL_ATTRIBUTE_ID = 41L; + private static final long LOCAL_VIDEO_RECORDING_ENABLED_ATTRIBUTE_ID = 42L; + private static final long LOCAL_SNAPSHOT_RECORDING_ENABLED_ATTRIBUTE_ID = 43L; + private static final long STATUS_LIGHT_ENABLED_ATTRIBUTE_ID = 44L; + private static final long STATUS_LIGHT_BRIGHTNESS_ATTRIBUTE_ID = 45L; + private static final long DEPTH_SENSOR_STATUS_ATTRIBUTE_ID = 46L; + private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; + private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; + private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public CameraAvStreamManagementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public void audioStreamAllocate(AudioStreamAllocateResponseCallback callback, Integer streamType, Integer audioCodec, Integer channelCount, Long sampleRate, Long bitRate, Integer bitDepth) { + audioStreamAllocate(callback, streamType, audioCodec, channelCount, sampleRate, bitRate, bitDepth, 0); + } + + public void audioStreamAllocate(AudioStreamAllocateResponseCallback callback, Integer streamType, Integer audioCodec, Integer channelCount, Long sampleRate, Long bitRate, Integer bitDepth, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long streamTypeFieldID = 0L; + BaseTLVType streamTypetlvValue = new UIntType(streamType); + elements.add(new StructElement(streamTypeFieldID, streamTypetlvValue)); + + final long audioCodecFieldID = 1L; + BaseTLVType audioCodectlvValue = new UIntType(audioCodec); + elements.add(new StructElement(audioCodecFieldID, audioCodectlvValue)); + + final long channelCountFieldID = 2L; + BaseTLVType channelCounttlvValue = new UIntType(channelCount); + elements.add(new StructElement(channelCountFieldID, channelCounttlvValue)); + + final long sampleRateFieldID = 3L; + BaseTLVType sampleRatetlvValue = new UIntType(sampleRate); + elements.add(new StructElement(sampleRateFieldID, sampleRatetlvValue)); + + final long bitRateFieldID = 4L; + BaseTLVType bitRatetlvValue = new UIntType(bitRate); + elements.add(new StructElement(bitRateFieldID, bitRatetlvValue)); + + final long bitDepthFieldID = 5L; + BaseTLVType bitDepthtlvValue = new UIntType(bitDepth); + elements.add(new StructElement(bitDepthFieldID, bitDepthtlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long audioStreamIDFieldID = 0L; + Integer audioStreamID = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == audioStreamIDFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + audioStreamID = castingValue.value(Integer.class); + } + } + } + callback.onSuccess(audioStreamID); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void audioStreamDeallocate(DefaultClusterCallback callback, Integer audioStreamID) { + audioStreamDeallocate(callback, audioStreamID, 0); + } + + public void audioStreamDeallocate(DefaultClusterCallback callback, Integer audioStreamID, int timedInvokeTimeoutMs) { + final long commandId = 2L; + + ArrayList elements = new ArrayList<>(); + final long audioStreamIDFieldID = 0L; + BaseTLVType audioStreamIDtlvValue = new UIntType(audioStreamID); + elements.add(new StructElement(audioStreamIDFieldID, audioStreamIDtlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void videoStreamAllocate(VideoStreamAllocateResponseCallback callback, Integer streamType, Integer videoCodec, Integer minFrameRate, Integer maxFrameRate, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct minResolution, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct maxResolution, Long minBitRate, Long maxBitRate, Integer minFragmentLen, Integer maxFragmentLen, Optional watermarkEnabled, Optional OSDEnabled) { + videoStreamAllocate(callback, streamType, videoCodec, minFrameRate, maxFrameRate, minResolution, maxResolution, minBitRate, maxBitRate, minFragmentLen, maxFragmentLen, watermarkEnabled, OSDEnabled, 0); + } + + public void videoStreamAllocate(VideoStreamAllocateResponseCallback callback, Integer streamType, Integer videoCodec, Integer minFrameRate, Integer maxFrameRate, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct minResolution, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct maxResolution, Long minBitRate, Long maxBitRate, Integer minFragmentLen, Integer maxFragmentLen, Optional watermarkEnabled, Optional OSDEnabled, int timedInvokeTimeoutMs) { + final long commandId = 3L; + + ArrayList elements = new ArrayList<>(); + final long streamTypeFieldID = 0L; + BaseTLVType streamTypetlvValue = new UIntType(streamType); + elements.add(new StructElement(streamTypeFieldID, streamTypetlvValue)); + + final long videoCodecFieldID = 1L; + BaseTLVType videoCodectlvValue = new UIntType(videoCodec); + elements.add(new StructElement(videoCodecFieldID, videoCodectlvValue)); + + final long minFrameRateFieldID = 2L; + BaseTLVType minFrameRatetlvValue = new UIntType(minFrameRate); + elements.add(new StructElement(minFrameRateFieldID, minFrameRatetlvValue)); + + final long maxFrameRateFieldID = 3L; + BaseTLVType maxFrameRatetlvValue = new UIntType(maxFrameRate); + elements.add(new StructElement(maxFrameRateFieldID, maxFrameRatetlvValue)); + + final long minResolutionFieldID = 4L; + BaseTLVType minResolutiontlvValue = minResolution.encodeTlv(); + elements.add(new StructElement(minResolutionFieldID, minResolutiontlvValue)); + + final long maxResolutionFieldID = 5L; + BaseTLVType maxResolutiontlvValue = maxResolution.encodeTlv(); + elements.add(new StructElement(maxResolutionFieldID, maxResolutiontlvValue)); + + final long minBitRateFieldID = 6L; + BaseTLVType minBitRatetlvValue = new UIntType(minBitRate); + elements.add(new StructElement(minBitRateFieldID, minBitRatetlvValue)); + + final long maxBitRateFieldID = 7L; + BaseTLVType maxBitRatetlvValue = new UIntType(maxBitRate); + elements.add(new StructElement(maxBitRateFieldID, maxBitRatetlvValue)); + + final long minFragmentLenFieldID = 8L; + BaseTLVType minFragmentLentlvValue = new UIntType(minFragmentLen); + elements.add(new StructElement(minFragmentLenFieldID, minFragmentLentlvValue)); + + final long maxFragmentLenFieldID = 9L; + BaseTLVType maxFragmentLentlvValue = new UIntType(maxFragmentLen); + elements.add(new StructElement(maxFragmentLenFieldID, maxFragmentLentlvValue)); + + final long watermarkEnabledFieldID = 10L; + BaseTLVType watermarkEnabledtlvValue = watermarkEnabled.map((nonOptionalwatermarkEnabled) -> new BooleanType(nonOptionalwatermarkEnabled)).orElse(new EmptyType()); + elements.add(new StructElement(watermarkEnabledFieldID, watermarkEnabledtlvValue)); + + final long OSDEnabledFieldID = 11L; + BaseTLVType OSDEnabledtlvValue = OSDEnabled.map((nonOptionalOSDEnabled) -> new BooleanType(nonOptionalOSDEnabled)).orElse(new EmptyType()); + elements.add(new StructElement(OSDEnabledFieldID, OSDEnabledtlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long videoStreamIDFieldID = 0L; + Integer videoStreamID = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == videoStreamIDFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + videoStreamID = castingValue.value(Integer.class); + } + } + } + callback.onSuccess(videoStreamID); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void videoStreamModify(DefaultClusterCallback callback, Integer videoStreamID, Optional resolution, Optional watermarkEnabled, Optional OSDEnabled) { + videoStreamModify(callback, videoStreamID, resolution, watermarkEnabled, OSDEnabled, 0); + } + + public void videoStreamModify(DefaultClusterCallback callback, Integer videoStreamID, Optional resolution, Optional watermarkEnabled, Optional OSDEnabled, int timedInvokeTimeoutMs) { + final long commandId = 5L; + + ArrayList elements = new ArrayList<>(); + final long videoStreamIDFieldID = 0L; + BaseTLVType videoStreamIDtlvValue = new UIntType(videoStreamID); + elements.add(new StructElement(videoStreamIDFieldID, videoStreamIDtlvValue)); + + final long resolutionFieldID = 1L; + BaseTLVType resolutiontlvValue = resolution.map((nonOptionalresolution) -> nonOptionalresolution.encodeTlv()).orElse(new EmptyType()); + elements.add(new StructElement(resolutionFieldID, resolutiontlvValue)); + + final long watermarkEnabledFieldID = 2L; + BaseTLVType watermarkEnabledtlvValue = watermarkEnabled.map((nonOptionalwatermarkEnabled) -> new BooleanType(nonOptionalwatermarkEnabled)).orElse(new EmptyType()); + elements.add(new StructElement(watermarkEnabledFieldID, watermarkEnabledtlvValue)); + + final long OSDEnabledFieldID = 3L; + BaseTLVType OSDEnabledtlvValue = OSDEnabled.map((nonOptionalOSDEnabled) -> new BooleanType(nonOptionalOSDEnabled)).orElse(new EmptyType()); + elements.add(new StructElement(OSDEnabledFieldID, OSDEnabledtlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void videoStreamDeallocate(DefaultClusterCallback callback, Integer videoStreamID) { + videoStreamDeallocate(callback, videoStreamID, 0); + } + + public void videoStreamDeallocate(DefaultClusterCallback callback, Integer videoStreamID, int timedInvokeTimeoutMs) { + final long commandId = 6L; + + ArrayList elements = new ArrayList<>(); + final long videoStreamIDFieldID = 0L; + BaseTLVType videoStreamIDtlvValue = new UIntType(videoStreamID); + elements.add(new StructElement(videoStreamIDFieldID, videoStreamIDtlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void snapshotStreamAllocate(SnapshotStreamAllocateResponseCallback callback, Integer imageCodec, Integer frameRate, Long bitRate, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct minResolution, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct maxResolution, Integer quality) { + snapshotStreamAllocate(callback, imageCodec, frameRate, bitRate, minResolution, maxResolution, quality, 0); + } + + public void snapshotStreamAllocate(SnapshotStreamAllocateResponseCallback callback, Integer imageCodec, Integer frameRate, Long bitRate, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct minResolution, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct maxResolution, Integer quality, int timedInvokeTimeoutMs) { + final long commandId = 7L; + + ArrayList elements = new ArrayList<>(); + final long imageCodecFieldID = 0L; + BaseTLVType imageCodectlvValue = new UIntType(imageCodec); + elements.add(new StructElement(imageCodecFieldID, imageCodectlvValue)); + + final long frameRateFieldID = 1L; + BaseTLVType frameRatetlvValue = new UIntType(frameRate); + elements.add(new StructElement(frameRateFieldID, frameRatetlvValue)); + + final long bitRateFieldID = 2L; + BaseTLVType bitRatetlvValue = new UIntType(bitRate); + elements.add(new StructElement(bitRateFieldID, bitRatetlvValue)); + + final long minResolutionFieldID = 3L; + BaseTLVType minResolutiontlvValue = minResolution.encodeTlv(); + elements.add(new StructElement(minResolutionFieldID, minResolutiontlvValue)); + + final long maxResolutionFieldID = 4L; + BaseTLVType maxResolutiontlvValue = maxResolution.encodeTlv(); + elements.add(new StructElement(maxResolutionFieldID, maxResolutiontlvValue)); + + final long qualityFieldID = 5L; + BaseTLVType qualitytlvValue = new UIntType(quality); + elements.add(new StructElement(qualityFieldID, qualitytlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long snapshotStreamIDFieldID = 0L; + Integer snapshotStreamID = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == snapshotStreamIDFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + snapshotStreamID = castingValue.value(Integer.class); + } + } + } + callback.onSuccess(snapshotStreamID); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void snapshotStreamDeallocate(DefaultClusterCallback callback, Integer snapshotStreamID) { + snapshotStreamDeallocate(callback, snapshotStreamID, 0); + } + + public void snapshotStreamDeallocate(DefaultClusterCallback callback, Integer snapshotStreamID, int timedInvokeTimeoutMs) { + final long commandId = 9L; + + ArrayList elements = new ArrayList<>(); + final long snapshotStreamIDFieldID = 0L; + BaseTLVType snapshotStreamIDtlvValue = new UIntType(snapshotStreamID); + elements.add(new StructElement(snapshotStreamIDFieldID, snapshotStreamIDtlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void setStreamPriorities(DefaultClusterCallback callback, ArrayList streamPriorities) { + setStreamPriorities(callback, streamPriorities, 0); + } + + public void setStreamPriorities(DefaultClusterCallback callback, ArrayList streamPriorities, int timedInvokeTimeoutMs) { + final long commandId = 10L; + + ArrayList elements = new ArrayList<>(); + final long streamPrioritiesFieldID = 0L; + BaseTLVType streamPrioritiestlvValue = ArrayType.generateArrayType(streamPriorities, (elementstreamPriorities) -> new UIntType(elementstreamPriorities)); + elements.add(new StructElement(streamPrioritiesFieldID, streamPrioritiestlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void captureSnapshot(DefaultClusterCallback callback, Integer snapshotStreamID, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct requestedResolution) { + captureSnapshot(callback, snapshotStreamID, requestedResolution, 0); + } + + public void captureSnapshot(DefaultClusterCallback callback, Integer snapshotStreamID, ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct requestedResolution, int timedInvokeTimeoutMs) { + final long commandId = 11L; + + ArrayList elements = new ArrayList<>(); + final long snapshotStreamIDFieldID = 0L; + BaseTLVType snapshotStreamIDtlvValue = new UIntType(snapshotStreamID); + elements.add(new StructElement(snapshotStreamIDFieldID, snapshotStreamIDtlvValue)); + + final long requestedResolutionFieldID = 1L; + BaseTLVType requestedResolutiontlvValue = requestedResolution.encodeTlv(); + elements.add(new StructElement(requestedResolutionFieldID, requestedResolutiontlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void setViewport(DefaultClusterCallback callback, ChipStructs.CameraAvStreamManagementClusterViewportStruct viewport) { + setViewport(callback, viewport, 0); + } + + public void setViewport(DefaultClusterCallback callback, ChipStructs.CameraAvStreamManagementClusterViewportStruct viewport, int timedInvokeTimeoutMs) { + final long commandId = 13L; + + ArrayList elements = new ArrayList<>(); + final long viewportFieldID = 0L; + BaseTLVType viewporttlvValue = viewport.encodeTlv(); + elements.add(new StructElement(viewportFieldID, viewporttlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void setImageRotation(DefaultClusterCallback callback, Integer angle) { + setImageRotation(callback, angle, 0); + } + + public void setImageRotation(DefaultClusterCallback callback, Integer angle, int timedInvokeTimeoutMs) { + final long commandId = 14L; + + ArrayList elements = new ArrayList<>(); + final long angleFieldID = 0L; + BaseTLVType angletlvValue = new UIntType(angle); + elements.add(new StructElement(angleFieldID, angletlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void setImageFlipHorizontal(DefaultClusterCallback callback, Boolean enabled) { + setImageFlipHorizontal(callback, enabled, 0); + } + + public void setImageFlipHorizontal(DefaultClusterCallback callback, Boolean enabled, int timedInvokeTimeoutMs) { + final long commandId = 15L; + + ArrayList elements = new ArrayList<>(); + final long enabledFieldID = 0L; + BaseTLVType enabledtlvValue = new BooleanType(enabled); + elements.add(new StructElement(enabledFieldID, enabledtlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void setImageFlipVertical(DefaultClusterCallback callback, Boolean enabled) { + setImageFlipVertical(callback, enabled, 0); + } + + public void setImageFlipVertical(DefaultClusterCallback callback, Boolean enabled, int timedInvokeTimeoutMs) { + final long commandId = 16L; + + ArrayList elements = new ArrayList<>(); + final long enabledFieldID = 0L; + BaseTLVType enabledtlvValue = new BooleanType(enabled); + elements.add(new StructElement(enabledFieldID, enabledtlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public interface AudioStreamAllocateResponseCallback extends BaseClusterCallback { + void onSuccess(Integer audioStreamID); + } + + public interface VideoStreamAllocateResponseCallback extends BaseClusterCallback { + void onSuccess(Integer videoStreamID); + } + + public interface SnapshotStreamAllocateResponseCallback extends BaseClusterCallback { + void onSuccess(Integer snapshotStreamID); + } + + public interface VideoSensorParamsAttributeCallback extends BaseAttributeCallback { + void onSuccess(ChipStructs.CameraAvStreamManagementClusterVideoSensorParamsStruct value); + } + + public interface MinViewportAttributeCallback extends BaseAttributeCallback { + void onSuccess(ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct value); + } + + public interface RateDistortionTradeOffPointsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface MicrophoneCapabilitiesAttributeCallback extends BaseAttributeCallback { + void onSuccess(ChipStructs.CameraAvStreamManagementClusterAudioCapabilitiesStruct value); + } + + public interface SpeakerCapabilitiesAttributeCallback extends BaseAttributeCallback { + void onSuccess(ChipStructs.CameraAvStreamManagementClusterAudioCapabilitiesStruct value); + } + + public interface SupportedSnapshotParamsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface CurrentVideoCodecsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface CurrentSnapshotConfigAttributeCallback extends BaseAttributeCallback { + void onSuccess(ChipStructs.CameraAvStreamManagementClusterSnapshotParamsStruct value); + } + + public interface FabricsUsingCameraAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AllocatedVideoStreamsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AllocatedAudioStreamsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AllocatedSnapshotStreamsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface RankedVideoStreamPrioritiesListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface ViewportAttributeCallback extends BaseAttributeCallback { + void onSuccess(ChipStructs.CameraAvStreamManagementClusterViewportStruct value); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readMaxConcurrentVideoEncodersAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_CONCURRENT_VIDEO_ENCODERS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MAX_CONCURRENT_VIDEO_ENCODERS_ATTRIBUTE_ID, true); + } + + public void subscribeMaxConcurrentVideoEncodersAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_CONCURRENT_VIDEO_ENCODERS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MAX_CONCURRENT_VIDEO_ENCODERS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readMaxEncodedPixelRateAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_ENCODED_PIXEL_RATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MAX_ENCODED_PIXEL_RATE_ATTRIBUTE_ID, true); + } + + public void subscribeMaxEncodedPixelRateAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_ENCODED_PIXEL_RATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MAX_ENCODED_PIXEL_RATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readVideoSensorParamsAttribute( + VideoSensorParamsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VIDEO_SENSOR_PARAMS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.CameraAvStreamManagementClusterVideoSensorParamsStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, VIDEO_SENSOR_PARAMS_ATTRIBUTE_ID, true); + } + + public void subscribeVideoSensorParamsAttribute( + VideoSensorParamsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VIDEO_SENSOR_PARAMS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.CameraAvStreamManagementClusterVideoSensorParamsStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, VIDEO_SENSOR_PARAMS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readNightVisionCapableAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NIGHT_VISION_CAPABLE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NIGHT_VISION_CAPABLE_ATTRIBUTE_ID, true); + } + + public void subscribeNightVisionCapableAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NIGHT_VISION_CAPABLE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NIGHT_VISION_CAPABLE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readMinViewportAttribute( + MinViewportAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_VIEWPORT_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MIN_VIEWPORT_ATTRIBUTE_ID, true); + } + + public void subscribeMinViewportAttribute( + MinViewportAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_VIEWPORT_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MIN_VIEWPORT_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readRateDistortionTradeOffPointsAttribute( + RateDistortionTradeOffPointsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RATE_DISTORTION_TRADE_OFF_POINTS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, RATE_DISTORTION_TRADE_OFF_POINTS_ATTRIBUTE_ID, true); + } + + public void subscribeRateDistortionTradeOffPointsAttribute( + RateDistortionTradeOffPointsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RATE_DISTORTION_TRADE_OFF_POINTS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, RATE_DISTORTION_TRADE_OFF_POINTS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readMaxContentBufferSizeAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_CONTENT_BUFFER_SIZE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MAX_CONTENT_BUFFER_SIZE_ATTRIBUTE_ID, true); + } + + public void subscribeMaxContentBufferSizeAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_CONTENT_BUFFER_SIZE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MAX_CONTENT_BUFFER_SIZE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readMicrophoneCapabilitiesAttribute( + MicrophoneCapabilitiesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MICROPHONE_CAPABILITIES_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.CameraAvStreamManagementClusterAudioCapabilitiesStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MICROPHONE_CAPABILITIES_ATTRIBUTE_ID, true); + } + + public void subscribeMicrophoneCapabilitiesAttribute( + MicrophoneCapabilitiesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MICROPHONE_CAPABILITIES_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.CameraAvStreamManagementClusterAudioCapabilitiesStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MICROPHONE_CAPABILITIES_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSpeakerCapabilitiesAttribute( + SpeakerCapabilitiesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPEAKER_CAPABILITIES_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.CameraAvStreamManagementClusterAudioCapabilitiesStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SPEAKER_CAPABILITIES_ATTRIBUTE_ID, true); + } + + public void subscribeSpeakerCapabilitiesAttribute( + SpeakerCapabilitiesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPEAKER_CAPABILITIES_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.CameraAvStreamManagementClusterAudioCapabilitiesStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SPEAKER_CAPABILITIES_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readTwoWayTalkSupportAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TWO_WAY_TALK_SUPPORT_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, TWO_WAY_TALK_SUPPORT_ATTRIBUTE_ID, true); + } + + public void subscribeTwoWayTalkSupportAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TWO_WAY_TALK_SUPPORT_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, TWO_WAY_TALK_SUPPORT_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSupportedSnapshotParamsAttribute( + SupportedSnapshotParamsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_SNAPSHOT_PARAMS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SUPPORTED_SNAPSHOT_PARAMS_ATTRIBUTE_ID, true); + } + + public void subscribeSupportedSnapshotParamsAttribute( + SupportedSnapshotParamsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_SNAPSHOT_PARAMS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SUPPORTED_SNAPSHOT_PARAMS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readMaxNetworkBandwidthAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_NETWORK_BANDWIDTH_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MAX_NETWORK_BANDWIDTH_ATTRIBUTE_ID, true); + } + + public void subscribeMaxNetworkBandwidthAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_NETWORK_BANDWIDTH_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MAX_NETWORK_BANDWIDTH_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readCurrentFrameRateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_FRAME_RATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CURRENT_FRAME_RATE_ATTRIBUTE_ID, true); + } + + public void subscribeCurrentFrameRateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_FRAME_RATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CURRENT_FRAME_RATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readHDRModeEnabledAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HDR_MODE_ENABLED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, HDR_MODE_ENABLED_ATTRIBUTE_ID, true); + } + + public void writeHDRModeEnabledAttribute(DefaultClusterCallback callback, Boolean value) { + writeHDRModeEnabledAttribute(callback, value, 0); + } + + public void writeHDRModeEnabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new BooleanType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), HDR_MODE_ENABLED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeHDRModeEnabledAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HDR_MODE_ENABLED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, HDR_MODE_ENABLED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readCurrentVideoCodecsAttribute( + CurrentVideoCodecsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_VIDEO_CODECS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CURRENT_VIDEO_CODECS_ATTRIBUTE_ID, true); + } + + public void subscribeCurrentVideoCodecsAttribute( + CurrentVideoCodecsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_VIDEO_CODECS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CURRENT_VIDEO_CODECS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readCurrentSnapshotConfigAttribute( + CurrentSnapshotConfigAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_SNAPSHOT_CONFIG_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.CameraAvStreamManagementClusterSnapshotParamsStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CURRENT_SNAPSHOT_CONFIG_ATTRIBUTE_ID, true); + } + + public void subscribeCurrentSnapshotConfigAttribute( + CurrentSnapshotConfigAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_SNAPSHOT_CONFIG_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.CameraAvStreamManagementClusterSnapshotParamsStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CURRENT_SNAPSHOT_CONFIG_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFabricsUsingCameraAttribute( + FabricsUsingCameraAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FABRICS_USING_CAMERA_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FABRICS_USING_CAMERA_ATTRIBUTE_ID, true); + } + + public void subscribeFabricsUsingCameraAttribute( + FabricsUsingCameraAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FABRICS_USING_CAMERA_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FABRICS_USING_CAMERA_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAllocatedVideoStreamsAttribute( + AllocatedVideoStreamsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALLOCATED_VIDEO_STREAMS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ALLOCATED_VIDEO_STREAMS_ATTRIBUTE_ID, true); + } + + public void subscribeAllocatedVideoStreamsAttribute( + AllocatedVideoStreamsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALLOCATED_VIDEO_STREAMS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ALLOCATED_VIDEO_STREAMS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAllocatedAudioStreamsAttribute( + AllocatedAudioStreamsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALLOCATED_AUDIO_STREAMS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ALLOCATED_AUDIO_STREAMS_ATTRIBUTE_ID, true); + } + + public void subscribeAllocatedAudioStreamsAttribute( + AllocatedAudioStreamsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALLOCATED_AUDIO_STREAMS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ALLOCATED_AUDIO_STREAMS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAllocatedSnapshotStreamsAttribute( + AllocatedSnapshotStreamsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALLOCATED_SNAPSHOT_STREAMS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ALLOCATED_SNAPSHOT_STREAMS_ATTRIBUTE_ID, true); + } + + public void subscribeAllocatedSnapshotStreamsAttribute( + AllocatedSnapshotStreamsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALLOCATED_SNAPSHOT_STREAMS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ALLOCATED_SNAPSHOT_STREAMS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readRankedVideoStreamPrioritiesListAttribute( + RankedVideoStreamPrioritiesListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RANKED_VIDEO_STREAM_PRIORITIES_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, RANKED_VIDEO_STREAM_PRIORITIES_LIST_ATTRIBUTE_ID, true); + } + + public void writeRankedVideoStreamPrioritiesListAttribute(DefaultClusterCallback callback, ArrayList value) { + writeRankedVideoStreamPrioritiesListAttribute(callback, value, 0); + } + + public void writeRankedVideoStreamPrioritiesListAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = ArrayType.generateArrayType(value, (elementvalue) -> new UIntType(elementvalue)); + writeAttribute(new WriteAttributesCallbackImpl(callback), RANKED_VIDEO_STREAM_PRIORITIES_LIST_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeRankedVideoStreamPrioritiesListAttribute( + RankedVideoStreamPrioritiesListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RANKED_VIDEO_STREAM_PRIORITIES_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, RANKED_VIDEO_STREAM_PRIORITIES_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSoftRecordingPrivacyModeEnabledAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SOFT_RECORDING_PRIVACY_MODE_ENABLED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SOFT_RECORDING_PRIVACY_MODE_ENABLED_ATTRIBUTE_ID, true); + } + + public void writeSoftRecordingPrivacyModeEnabledAttribute(DefaultClusterCallback callback, Boolean value) { + writeSoftRecordingPrivacyModeEnabledAttribute(callback, value, 0); + } + + public void writeSoftRecordingPrivacyModeEnabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new BooleanType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), SOFT_RECORDING_PRIVACY_MODE_ENABLED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeSoftRecordingPrivacyModeEnabledAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SOFT_RECORDING_PRIVACY_MODE_ENABLED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SOFT_RECORDING_PRIVACY_MODE_ENABLED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSoftLivestreamPrivacyModeEnabledAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SOFT_LIVESTREAM_PRIVACY_MODE_ENABLED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SOFT_LIVESTREAM_PRIVACY_MODE_ENABLED_ATTRIBUTE_ID, true); + } + + public void writeSoftLivestreamPrivacyModeEnabledAttribute(DefaultClusterCallback callback, Boolean value) { + writeSoftLivestreamPrivacyModeEnabledAttribute(callback, value, 0); + } + + public void writeSoftLivestreamPrivacyModeEnabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new BooleanType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), SOFT_LIVESTREAM_PRIVACY_MODE_ENABLED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeSoftLivestreamPrivacyModeEnabledAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SOFT_LIVESTREAM_PRIVACY_MODE_ENABLED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SOFT_LIVESTREAM_PRIVACY_MODE_ENABLED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readHardPrivacyModeOnAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARD_PRIVACY_MODE_ON_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, HARD_PRIVACY_MODE_ON_ATTRIBUTE_ID, true); + } + + public void subscribeHardPrivacyModeOnAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARD_PRIVACY_MODE_ON_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, HARD_PRIVACY_MODE_ON_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readNightVisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NIGHT_VISION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NIGHT_VISION_ATTRIBUTE_ID, true); + } + + public void writeNightVisionAttribute(DefaultClusterCallback callback, Integer value) { + writeNightVisionAttribute(callback, value, 0); + } + + public void writeNightVisionAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), NIGHT_VISION_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeNightVisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NIGHT_VISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NIGHT_VISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readNightVisionIllumAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NIGHT_VISION_ILLUM_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NIGHT_VISION_ILLUM_ATTRIBUTE_ID, true); + } + + public void writeNightVisionIllumAttribute(DefaultClusterCallback callback, Integer value) { + writeNightVisionIllumAttribute(callback, value, 0); + } + + public void writeNightVisionIllumAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), NIGHT_VISION_ILLUM_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeNightVisionIllumAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NIGHT_VISION_ILLUM_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NIGHT_VISION_ILLUM_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAWBEnabledAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AWB_ENABLED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, AWB_ENABLED_ATTRIBUTE_ID, true); + } + + public void writeAWBEnabledAttribute(DefaultClusterCallback callback, Boolean value) { + writeAWBEnabledAttribute(callback, value, 0); + } + + public void writeAWBEnabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new BooleanType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), AWB_ENABLED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeAWBEnabledAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AWB_ENABLED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, AWB_ENABLED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAutoShutterSpeedEnabledAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AUTO_SHUTTER_SPEED_ENABLED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, AUTO_SHUTTER_SPEED_ENABLED_ATTRIBUTE_ID, true); + } + + public void writeAutoShutterSpeedEnabledAttribute(DefaultClusterCallback callback, Boolean value) { + writeAutoShutterSpeedEnabledAttribute(callback, value, 0); + } + + public void writeAutoShutterSpeedEnabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new BooleanType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), AUTO_SHUTTER_SPEED_ENABLED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeAutoShutterSpeedEnabledAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AUTO_SHUTTER_SPEED_ENABLED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, AUTO_SHUTTER_SPEED_ENABLED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAutoISOEnabledAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AUTO_ISO_ENABLED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, AUTO_ISO_ENABLED_ATTRIBUTE_ID, true); + } + + public void writeAutoISOEnabledAttribute(DefaultClusterCallback callback, Boolean value) { + writeAutoISOEnabledAttribute(callback, value, 0); + } + + public void writeAutoISOEnabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new BooleanType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), AUTO_ISO_ENABLED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeAutoISOEnabledAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AUTO_ISO_ENABLED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, AUTO_ISO_ENABLED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readViewportAttribute( + ViewportAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VIEWPORT_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.CameraAvStreamManagementClusterViewportStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, VIEWPORT_ATTRIBUTE_ID, true); + } + + public void subscribeViewportAttribute( + ViewportAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VIEWPORT_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.CameraAvStreamManagementClusterViewportStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, VIEWPORT_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSpeakerMutedAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPEAKER_MUTED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SPEAKER_MUTED_ATTRIBUTE_ID, true); + } + + public void writeSpeakerMutedAttribute(DefaultClusterCallback callback, Boolean value) { + writeSpeakerMutedAttribute(callback, value, 0); + } + + public void writeSpeakerMutedAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new BooleanType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), SPEAKER_MUTED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeSpeakerMutedAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPEAKER_MUTED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SPEAKER_MUTED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSpeakerVolumeLevelAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPEAKER_VOLUME_LEVEL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SPEAKER_VOLUME_LEVEL_ATTRIBUTE_ID, true); + } + + public void writeSpeakerVolumeLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeSpeakerVolumeLevelAttribute(callback, value, 0); + } + + public void writeSpeakerVolumeLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), SPEAKER_VOLUME_LEVEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeSpeakerVolumeLevelAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPEAKER_VOLUME_LEVEL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SPEAKER_VOLUME_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSpeakerMaxLevelAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPEAKER_MAX_LEVEL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SPEAKER_MAX_LEVEL_ATTRIBUTE_ID, true); + } + + public void writeSpeakerMaxLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeSpeakerMaxLevelAttribute(callback, value, 0); + } + + public void writeSpeakerMaxLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), SPEAKER_MAX_LEVEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeSpeakerMaxLevelAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPEAKER_MAX_LEVEL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SPEAKER_MAX_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSpeakerMinLevelAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPEAKER_MIN_LEVEL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SPEAKER_MIN_LEVEL_ATTRIBUTE_ID, true); + } + + public void writeSpeakerMinLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeSpeakerMinLevelAttribute(callback, value, 0); + } + + public void writeSpeakerMinLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), SPEAKER_MIN_LEVEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeSpeakerMinLevelAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPEAKER_MIN_LEVEL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SPEAKER_MIN_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readMicrophoneMutedAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MICROPHONE_MUTED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MICROPHONE_MUTED_ATTRIBUTE_ID, true); + } + + public void writeMicrophoneMutedAttribute(DefaultClusterCallback callback, Boolean value) { + writeMicrophoneMutedAttribute(callback, value, 0); + } + + public void writeMicrophoneMutedAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new BooleanType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), MICROPHONE_MUTED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeMicrophoneMutedAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MICROPHONE_MUTED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MICROPHONE_MUTED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readMicrophoneVolumeLevelAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MICROPHONE_VOLUME_LEVEL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MICROPHONE_VOLUME_LEVEL_ATTRIBUTE_ID, true); + } + + public void writeMicrophoneVolumeLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeMicrophoneVolumeLevelAttribute(callback, value, 0); + } + + public void writeMicrophoneVolumeLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), MICROPHONE_VOLUME_LEVEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeMicrophoneVolumeLevelAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MICROPHONE_VOLUME_LEVEL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MICROPHONE_VOLUME_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readMicrophoneMaxLevelAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MICROPHONE_MAX_LEVEL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MICROPHONE_MAX_LEVEL_ATTRIBUTE_ID, true); + } + + public void writeMicrophoneMaxLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeMicrophoneMaxLevelAttribute(callback, value, 0); + } + + public void writeMicrophoneMaxLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), MICROPHONE_MAX_LEVEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeMicrophoneMaxLevelAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MICROPHONE_MAX_LEVEL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MICROPHONE_MAX_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readMicrophoneMinLevelAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MICROPHONE_MIN_LEVEL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MICROPHONE_MIN_LEVEL_ATTRIBUTE_ID, true); + } + + public void writeMicrophoneMinLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeMicrophoneMinLevelAttribute(callback, value, 0); + } + + public void writeMicrophoneMinLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), MICROPHONE_MIN_LEVEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeMicrophoneMinLevelAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MICROPHONE_MIN_LEVEL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MICROPHONE_MIN_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readMicrophoneAGCEnabledAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MICROPHONE_AGC_ENABLED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MICROPHONE_AGC_ENABLED_ATTRIBUTE_ID, true); + } + + public void writeMicrophoneAGCEnabledAttribute(DefaultClusterCallback callback, Boolean value) { + writeMicrophoneAGCEnabledAttribute(callback, value, 0); + } + + public void writeMicrophoneAGCEnabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new BooleanType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), MICROPHONE_AGC_ENABLED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeMicrophoneAGCEnabledAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MICROPHONE_AGC_ENABLED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MICROPHONE_AGC_ENABLED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readImageRotationAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IMAGE_ROTATION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, IMAGE_ROTATION_ATTRIBUTE_ID, true); + } + + public void subscribeImageRotationAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IMAGE_ROTATION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, IMAGE_ROTATION_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readImageFlipHorizontalAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IMAGE_FLIP_HORIZONTAL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, IMAGE_FLIP_HORIZONTAL_ATTRIBUTE_ID, true); + } + + public void subscribeImageFlipHorizontalAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IMAGE_FLIP_HORIZONTAL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, IMAGE_FLIP_HORIZONTAL_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readImageFlipVerticalAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IMAGE_FLIP_VERTICAL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, IMAGE_FLIP_VERTICAL_ATTRIBUTE_ID, true); + } + + public void subscribeImageFlipVerticalAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IMAGE_FLIP_VERTICAL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, IMAGE_FLIP_VERTICAL_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readLocalVideoRecordingEnabledAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOCAL_VIDEO_RECORDING_ENABLED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, LOCAL_VIDEO_RECORDING_ENABLED_ATTRIBUTE_ID, true); + } + + public void writeLocalVideoRecordingEnabledAttribute(DefaultClusterCallback callback, Boolean value) { + writeLocalVideoRecordingEnabledAttribute(callback, value, 0); + } + + public void writeLocalVideoRecordingEnabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new BooleanType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), LOCAL_VIDEO_RECORDING_ENABLED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeLocalVideoRecordingEnabledAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOCAL_VIDEO_RECORDING_ENABLED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, LOCAL_VIDEO_RECORDING_ENABLED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readLocalSnapshotRecordingEnabledAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOCAL_SNAPSHOT_RECORDING_ENABLED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, LOCAL_SNAPSHOT_RECORDING_ENABLED_ATTRIBUTE_ID, true); + } + + public void writeLocalSnapshotRecordingEnabledAttribute(DefaultClusterCallback callback, Boolean value) { + writeLocalSnapshotRecordingEnabledAttribute(callback, value, 0); + } + + public void writeLocalSnapshotRecordingEnabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new BooleanType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), LOCAL_SNAPSHOT_RECORDING_ENABLED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeLocalSnapshotRecordingEnabledAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOCAL_SNAPSHOT_RECORDING_ENABLED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, LOCAL_SNAPSHOT_RECORDING_ENABLED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readStatusLightEnabledAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATUS_LIGHT_ENABLED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, STATUS_LIGHT_ENABLED_ATTRIBUTE_ID, true); + } + + public void writeStatusLightEnabledAttribute(DefaultClusterCallback callback, Boolean value) { + writeStatusLightEnabledAttribute(callback, value, 0); + } + + public void writeStatusLightEnabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new BooleanType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), STATUS_LIGHT_ENABLED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeStatusLightEnabledAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATUS_LIGHT_ENABLED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, STATUS_LIGHT_ENABLED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readStatusLightBrightnessAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATUS_LIGHT_BRIGHTNESS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, STATUS_LIGHT_BRIGHTNESS_ATTRIBUTE_ID, true); + } + + public void writeStatusLightBrightnessAttribute(DefaultClusterCallback callback, Integer value) { + writeStatusLightBrightnessAttribute(callback, value, 0); + } + + public void writeStatusLightBrightnessAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), STATUS_LIGHT_BRIGHTNESS_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeStatusLightBrightnessAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATUS_LIGHT_BRIGHTNESS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, STATUS_LIGHT_BRIGHTNESS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readDepthSensorStatusAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEPTH_SENSOR_STATUS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, DEPTH_SENSOR_STATUS_ATTRIBUTE_ID, true); + } + + public void writeDepthSensorStatusAttribute(DefaultClusterCallback callback, Integer value) { + writeDepthSensorStatusAttribute(callback, value, 0); + } + + public void writeDepthSensorStatusAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), DEPTH_SENSOR_STATUS_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeDepthSensorStatusAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEPTH_SENSOR_STATUS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, DEPTH_SENSOR_STATUS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, true); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + public static class WebRTCTransportProviderCluster extends BaseChipCluster { public static final long CLUSTER_ID = 1363L; @@ -59938,6 +62295,334 @@ public void onSuccess(byte[] tlv) { } } + public static class WebRTCTransportRequestorCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 1364L; + + private static final long CURRENT_SESSIONS_ATTRIBUTE_ID = 0L; + private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; + private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; + private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public WebRTCTransportRequestorCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public void offer(DefaultClusterCallback callback, Integer webRTCSessionID, String sdp, Optional> ICEServers, Optional ICETransportPolicy) { + offer(callback, webRTCSessionID, sdp, ICEServers, ICETransportPolicy, 0); + } + + public void offer(DefaultClusterCallback callback, Integer webRTCSessionID, String sdp, Optional> ICEServers, Optional ICETransportPolicy, int timedInvokeTimeoutMs) { + final long commandId = 1L; + + ArrayList elements = new ArrayList<>(); + final long webRTCSessionIDFieldID = 0L; + BaseTLVType webRTCSessionIDtlvValue = new UIntType(webRTCSessionID); + elements.add(new StructElement(webRTCSessionIDFieldID, webRTCSessionIDtlvValue)); + + final long sdpFieldID = 1L; + BaseTLVType sdptlvValue = new StringType(sdp); + elements.add(new StructElement(sdpFieldID, sdptlvValue)); + + final long ICEServersFieldID = 2L; + BaseTLVType ICEServerstlvValue = ICEServers.map((nonOptionalICEServers) -> ArrayType.generateArrayType(nonOptionalICEServers, (elementnonOptionalICEServers) -> elementnonOptionalICEServers.encodeTlv())).orElse(new EmptyType()); + elements.add(new StructElement(ICEServersFieldID, ICEServerstlvValue)); + + final long ICETransportPolicyFieldID = 3L; + BaseTLVType ICETransportPolicytlvValue = ICETransportPolicy.map((nonOptionalICETransportPolicy) -> new StringType(nonOptionalICETransportPolicy)).orElse(new EmptyType()); + elements.add(new StructElement(ICETransportPolicyFieldID, ICETransportPolicytlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void answer(DefaultClusterCallback callback, Integer webRTCSessionID, String sdp) { + answer(callback, webRTCSessionID, sdp, 0); + } + + public void answer(DefaultClusterCallback callback, Integer webRTCSessionID, String sdp, int timedInvokeTimeoutMs) { + final long commandId = 2L; + + ArrayList elements = new ArrayList<>(); + final long webRTCSessionIDFieldID = 0L; + BaseTLVType webRTCSessionIDtlvValue = new UIntType(webRTCSessionID); + elements.add(new StructElement(webRTCSessionIDFieldID, webRTCSessionIDtlvValue)); + + final long sdpFieldID = 1L; + BaseTLVType sdptlvValue = new StringType(sdp); + elements.add(new StructElement(sdpFieldID, sdptlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void ICECandidate(DefaultClusterCallback callback, Integer webRTCSessionID, String ICECandidate) { + ICECandidate(callback, webRTCSessionID, ICECandidate, 0); + } + + public void ICECandidate(DefaultClusterCallback callback, Integer webRTCSessionID, String ICECandidate, int timedInvokeTimeoutMs) { + final long commandId = 3L; + + ArrayList elements = new ArrayList<>(); + final long webRTCSessionIDFieldID = 0L; + BaseTLVType webRTCSessionIDtlvValue = new UIntType(webRTCSessionID); + elements.add(new StructElement(webRTCSessionIDFieldID, webRTCSessionIDtlvValue)); + + final long ICECandidateFieldID = 1L; + BaseTLVType ICECandidatetlvValue = new StringType(ICECandidate); + elements.add(new StructElement(ICECandidateFieldID, ICECandidatetlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public void end(DefaultClusterCallback callback, Integer webRTCSessionID, Integer reason) { + end(callback, webRTCSessionID, reason, 0); + } + + public void end(DefaultClusterCallback callback, Integer webRTCSessionID, Integer reason, int timedInvokeTimeoutMs) { + final long commandId = 4L; + + ArrayList elements = new ArrayList<>(); + final long webRTCSessionIDFieldID = 0L; + BaseTLVType webRTCSessionIDtlvValue = new UIntType(webRTCSessionID); + elements.add(new StructElement(webRTCSessionIDFieldID, webRTCSessionIDtlvValue)); + + final long reasonFieldID = 1L; + BaseTLVType reasontlvValue = new UIntType(reason); + elements.add(new StructElement(reasonFieldID, reasontlvValue)); + + StructType commandArgs = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, commandArgs, timedInvokeTimeoutMs); + } + + public interface CurrentSessionsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readCurrentSessionsAttribute( + CurrentSessionsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_SESSIONS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CURRENT_SESSIONS_ATTRIBUTE_ID, true); + } + + public void subscribeCurrentSessionsAttribute( + CurrentSessionsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_SESSIONS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CURRENT_SESSIONS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, true); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + public static class ChimeCluster extends BaseChipCluster { public static final long CLUSTER_ID = 1366L; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java index 737462f3da..59892d0518 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java @@ -6187,6 +6187,596 @@ public String toString() { return output.toString(); } } +public static class ZoneManagementClusterZoneTriggeredEvent { + public ArrayList zones; + public Integer reason; + private static final long ZONES_ID = 0L; + private static final long REASON_ID = 1L; + + public ZoneManagementClusterZoneTriggeredEvent( + ArrayList zones, + Integer reason + ) { + this.zones = zones; + this.reason = reason; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(ZONES_ID, ArrayType.generateArrayType(zones, (elementzones) -> new UIntType(elementzones)))); + values.add(new StructElement(REASON_ID, new UIntType(reason))); + + return new StructType(values); + } + + public static ZoneManagementClusterZoneTriggeredEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + ArrayList zones = null; + Integer reason = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == ZONES_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + zones = castingValue.map((elementcastingValue) -> elementcastingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == REASON_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + reason = castingValue.value(Integer.class); + } + } + } + return new ZoneManagementClusterZoneTriggeredEvent( + zones, + reason + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ZoneManagementClusterZoneTriggeredEvent {\n"); + output.append("\tzones: "); + output.append(zones); + output.append("\n"); + output.append("\treason: "); + output.append(reason); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ZoneManagementClusterZoneStoppedEvent { + public ArrayList zones; + public Integer reason; + private static final long ZONES_ID = 0L; + private static final long REASON_ID = 1L; + + public ZoneManagementClusterZoneStoppedEvent( + ArrayList zones, + Integer reason + ) { + this.zones = zones; + this.reason = reason; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(ZONES_ID, ArrayType.generateArrayType(zones, (elementzones) -> new UIntType(elementzones)))); + values.add(new StructElement(REASON_ID, new UIntType(reason))); + + return new StructType(values); + } + + public static ZoneManagementClusterZoneStoppedEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + ArrayList zones = null; + Integer reason = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == ZONES_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + zones = castingValue.map((elementcastingValue) -> elementcastingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == REASON_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + reason = castingValue.value(Integer.class); + } + } + } + return new ZoneManagementClusterZoneStoppedEvent( + zones, + reason + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ZoneManagementClusterZoneStoppedEvent {\n"); + output.append("\tzones: "); + output.append(zones); + output.append("\n"); + output.append("\treason: "); + output.append(reason); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class CameraAvStreamManagementClusterVideoStreamChangedEvent { + public Integer videoStreamID; + public Optional streamType; + public Optional videoCodec; + public Optional minFrameRate; + public Optional maxFrameRate; + public Optional minResolution; + public Optional maxResolution; + public Optional minBitRate; + public Optional maxBitRate; + public Optional minFragmentLen; + public Optional maxFragmentLen; + private static final long VIDEO_STREAM_ID_ID = 0L; + private static final long STREAM_TYPE_ID = 1L; + private static final long VIDEO_CODEC_ID = 2L; + private static final long MIN_FRAME_RATE_ID = 3L; + private static final long MAX_FRAME_RATE_ID = 4L; + private static final long MIN_RESOLUTION_ID = 5L; + private static final long MAX_RESOLUTION_ID = 6L; + private static final long MIN_BIT_RATE_ID = 7L; + private static final long MAX_BIT_RATE_ID = 8L; + private static final long MIN_FRAGMENT_LEN_ID = 9L; + private static final long MAX_FRAGMENT_LEN_ID = 10L; + + public CameraAvStreamManagementClusterVideoStreamChangedEvent( + Integer videoStreamID, + Optional streamType, + Optional videoCodec, + Optional minFrameRate, + Optional maxFrameRate, + Optional minResolution, + Optional maxResolution, + Optional minBitRate, + Optional maxBitRate, + Optional minFragmentLen, + Optional maxFragmentLen + ) { + this.videoStreamID = videoStreamID; + this.streamType = streamType; + this.videoCodec = videoCodec; + this.minFrameRate = minFrameRate; + this.maxFrameRate = maxFrameRate; + this.minResolution = minResolution; + this.maxResolution = maxResolution; + this.minBitRate = minBitRate; + this.maxBitRate = maxBitRate; + this.minFragmentLen = minFragmentLen; + this.maxFragmentLen = maxFragmentLen; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(VIDEO_STREAM_ID_ID, new UIntType(videoStreamID))); + values.add(new StructElement(STREAM_TYPE_ID, streamType.map((nonOptionalstreamType) -> new UIntType(nonOptionalstreamType)).orElse(new EmptyType()))); + values.add(new StructElement(VIDEO_CODEC_ID, videoCodec.map((nonOptionalvideoCodec) -> new UIntType(nonOptionalvideoCodec)).orElse(new EmptyType()))); + values.add(new StructElement(MIN_FRAME_RATE_ID, minFrameRate.map((nonOptionalminFrameRate) -> new UIntType(nonOptionalminFrameRate)).orElse(new EmptyType()))); + values.add(new StructElement(MAX_FRAME_RATE_ID, maxFrameRate.map((nonOptionalmaxFrameRate) -> new UIntType(nonOptionalmaxFrameRate)).orElse(new EmptyType()))); + values.add(new StructElement(MIN_RESOLUTION_ID, minResolution.map((nonOptionalminResolution) -> nonOptionalminResolution.encodeTlv()).orElse(new EmptyType()))); + values.add(new StructElement(MAX_RESOLUTION_ID, maxResolution.map((nonOptionalmaxResolution) -> nonOptionalmaxResolution.encodeTlv()).orElse(new EmptyType()))); + values.add(new StructElement(MIN_BIT_RATE_ID, minBitRate.map((nonOptionalminBitRate) -> new UIntType(nonOptionalminBitRate)).orElse(new EmptyType()))); + values.add(new StructElement(MAX_BIT_RATE_ID, maxBitRate.map((nonOptionalmaxBitRate) -> new UIntType(nonOptionalmaxBitRate)).orElse(new EmptyType()))); + values.add(new StructElement(MIN_FRAGMENT_LEN_ID, minFragmentLen.map((nonOptionalminFragmentLen) -> new UIntType(nonOptionalminFragmentLen)).orElse(new EmptyType()))); + values.add(new StructElement(MAX_FRAGMENT_LEN_ID, maxFragmentLen.map((nonOptionalmaxFragmentLen) -> new UIntType(nonOptionalmaxFragmentLen)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static CameraAvStreamManagementClusterVideoStreamChangedEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer videoStreamID = null; + Optional streamType = Optional.empty(); + Optional videoCodec = Optional.empty(); + Optional minFrameRate = Optional.empty(); + Optional maxFrameRate = Optional.empty(); + Optional minResolution = Optional.empty(); + Optional maxResolution = Optional.empty(); + Optional minBitRate = Optional.empty(); + Optional maxBitRate = Optional.empty(); + Optional minFragmentLen = Optional.empty(); + Optional maxFragmentLen = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == VIDEO_STREAM_ID_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + videoStreamID = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == STREAM_TYPE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + streamType = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == VIDEO_CODEC_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + videoCodec = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == MIN_FRAME_RATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + minFrameRate = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == MAX_FRAME_RATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + maxFrameRate = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == MIN_RESOLUTION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + minResolution = Optional.of(ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct.decodeTlv(castingValue)); + } + } else if (element.contextTagNum() == MAX_RESOLUTION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + maxResolution = Optional.of(ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct.decodeTlv(castingValue)); + } + } else if (element.contextTagNum() == MIN_BIT_RATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + minBitRate = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == MAX_BIT_RATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + maxBitRate = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == MIN_FRAGMENT_LEN_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + minFragmentLen = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == MAX_FRAGMENT_LEN_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + maxFragmentLen = Optional.of(castingValue.value(Integer.class)); + } + } + } + return new CameraAvStreamManagementClusterVideoStreamChangedEvent( + videoStreamID, + streamType, + videoCodec, + minFrameRate, + maxFrameRate, + minResolution, + maxResolution, + minBitRate, + maxBitRate, + minFragmentLen, + maxFragmentLen + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("CameraAvStreamManagementClusterVideoStreamChangedEvent {\n"); + output.append("\tvideoStreamID: "); + output.append(videoStreamID); + output.append("\n"); + output.append("\tstreamType: "); + output.append(streamType); + output.append("\n"); + output.append("\tvideoCodec: "); + output.append(videoCodec); + output.append("\n"); + output.append("\tminFrameRate: "); + output.append(minFrameRate); + output.append("\n"); + output.append("\tmaxFrameRate: "); + output.append(maxFrameRate); + output.append("\n"); + output.append("\tminResolution: "); + output.append(minResolution); + output.append("\n"); + output.append("\tmaxResolution: "); + output.append(maxResolution); + output.append("\n"); + output.append("\tminBitRate: "); + output.append(minBitRate); + output.append("\n"); + output.append("\tmaxBitRate: "); + output.append(maxBitRate); + output.append("\n"); + output.append("\tminFragmentLen: "); + output.append(minFragmentLen); + output.append("\n"); + output.append("\tmaxFragmentLen: "); + output.append(maxFragmentLen); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class CameraAvStreamManagementClusterAudioStreamChangedEvent { + public Integer audioStreamID; + public Optional streamType; + public Optional audioCodec; + public Optional channelCount; + public Optional sampleRate; + public Optional bitRate; + public Optional bitDepth; + private static final long AUDIO_STREAM_ID_ID = 0L; + private static final long STREAM_TYPE_ID = 1L; + private static final long AUDIO_CODEC_ID = 2L; + private static final long CHANNEL_COUNT_ID = 3L; + private static final long SAMPLE_RATE_ID = 4L; + private static final long BIT_RATE_ID = 5L; + private static final long BIT_DEPTH_ID = 6L; + + public CameraAvStreamManagementClusterAudioStreamChangedEvent( + Integer audioStreamID, + Optional streamType, + Optional audioCodec, + Optional channelCount, + Optional sampleRate, + Optional bitRate, + Optional bitDepth + ) { + this.audioStreamID = audioStreamID; + this.streamType = streamType; + this.audioCodec = audioCodec; + this.channelCount = channelCount; + this.sampleRate = sampleRate; + this.bitRate = bitRate; + this.bitDepth = bitDepth; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(AUDIO_STREAM_ID_ID, new UIntType(audioStreamID))); + values.add(new StructElement(STREAM_TYPE_ID, streamType.map((nonOptionalstreamType) -> new UIntType(nonOptionalstreamType)).orElse(new EmptyType()))); + values.add(new StructElement(AUDIO_CODEC_ID, audioCodec.map((nonOptionalaudioCodec) -> new UIntType(nonOptionalaudioCodec)).orElse(new EmptyType()))); + values.add(new StructElement(CHANNEL_COUNT_ID, channelCount.map((nonOptionalchannelCount) -> new UIntType(nonOptionalchannelCount)).orElse(new EmptyType()))); + values.add(new StructElement(SAMPLE_RATE_ID, sampleRate.map((nonOptionalsampleRate) -> new UIntType(nonOptionalsampleRate)).orElse(new EmptyType()))); + values.add(new StructElement(BIT_RATE_ID, bitRate.map((nonOptionalbitRate) -> new UIntType(nonOptionalbitRate)).orElse(new EmptyType()))); + values.add(new StructElement(BIT_DEPTH_ID, bitDepth.map((nonOptionalbitDepth) -> new UIntType(nonOptionalbitDepth)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static CameraAvStreamManagementClusterAudioStreamChangedEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer audioStreamID = null; + Optional streamType = Optional.empty(); + Optional audioCodec = Optional.empty(); + Optional channelCount = Optional.empty(); + Optional sampleRate = Optional.empty(); + Optional bitRate = Optional.empty(); + Optional bitDepth = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == AUDIO_STREAM_ID_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + audioStreamID = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == STREAM_TYPE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + streamType = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == AUDIO_CODEC_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + audioCodec = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == CHANNEL_COUNT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + channelCount = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == SAMPLE_RATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sampleRate = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == BIT_RATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + bitRate = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == BIT_DEPTH_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + bitDepth = Optional.of(castingValue.value(Integer.class)); + } + } + } + return new CameraAvStreamManagementClusterAudioStreamChangedEvent( + audioStreamID, + streamType, + audioCodec, + channelCount, + sampleRate, + bitRate, + bitDepth + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("CameraAvStreamManagementClusterAudioStreamChangedEvent {\n"); + output.append("\taudioStreamID: "); + output.append(audioStreamID); + output.append("\n"); + output.append("\tstreamType: "); + output.append(streamType); + output.append("\n"); + output.append("\taudioCodec: "); + output.append(audioCodec); + output.append("\n"); + output.append("\tchannelCount: "); + output.append(channelCount); + output.append("\n"); + output.append("\tsampleRate: "); + output.append(sampleRate); + output.append("\n"); + output.append("\tbitRate: "); + output.append(bitRate); + output.append("\n"); + output.append("\tbitDepth: "); + output.append(bitDepth); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class CameraAvStreamManagementClusterSnapshotStreamChangedEvent { + public Integer snapshotStreamID; + public Optional imageCodec; + public Optional frameRate; + public Optional bitRate; + public Optional minResolution; + public Optional maxResolution; + public Optional quality; + private static final long SNAPSHOT_STREAM_ID_ID = 0L; + private static final long IMAGE_CODEC_ID = 1L; + private static final long FRAME_RATE_ID = 2L; + private static final long BIT_RATE_ID = 3L; + private static final long MIN_RESOLUTION_ID = 4L; + private static final long MAX_RESOLUTION_ID = 5L; + private static final long QUALITY_ID = 6L; + + public CameraAvStreamManagementClusterSnapshotStreamChangedEvent( + Integer snapshotStreamID, + Optional imageCodec, + Optional frameRate, + Optional bitRate, + Optional minResolution, + Optional maxResolution, + Optional quality + ) { + this.snapshotStreamID = snapshotStreamID; + this.imageCodec = imageCodec; + this.frameRate = frameRate; + this.bitRate = bitRate; + this.minResolution = minResolution; + this.maxResolution = maxResolution; + this.quality = quality; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(SNAPSHOT_STREAM_ID_ID, new UIntType(snapshotStreamID))); + values.add(new StructElement(IMAGE_CODEC_ID, imageCodec.map((nonOptionalimageCodec) -> new UIntType(nonOptionalimageCodec)).orElse(new EmptyType()))); + values.add(new StructElement(FRAME_RATE_ID, frameRate.map((nonOptionalframeRate) -> new UIntType(nonOptionalframeRate)).orElse(new EmptyType()))); + values.add(new StructElement(BIT_RATE_ID, bitRate.map((nonOptionalbitRate) -> new UIntType(nonOptionalbitRate)).orElse(new EmptyType()))); + values.add(new StructElement(MIN_RESOLUTION_ID, minResolution.map((nonOptionalminResolution) -> nonOptionalminResolution.encodeTlv()).orElse(new EmptyType()))); + values.add(new StructElement(MAX_RESOLUTION_ID, maxResolution.map((nonOptionalmaxResolution) -> nonOptionalmaxResolution.encodeTlv()).orElse(new EmptyType()))); + values.add(new StructElement(QUALITY_ID, quality.map((nonOptionalquality) -> new UIntType(nonOptionalquality)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static CameraAvStreamManagementClusterSnapshotStreamChangedEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer snapshotStreamID = null; + Optional imageCodec = Optional.empty(); + Optional frameRate = Optional.empty(); + Optional bitRate = Optional.empty(); + Optional minResolution = Optional.empty(); + Optional maxResolution = Optional.empty(); + Optional quality = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == SNAPSHOT_STREAM_ID_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + snapshotStreamID = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == IMAGE_CODEC_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + imageCodec = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == FRAME_RATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + frameRate = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == BIT_RATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + bitRate = Optional.of(castingValue.value(Long.class)); + } + } else if (element.contextTagNum() == MIN_RESOLUTION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + minResolution = Optional.of(ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct.decodeTlv(castingValue)); + } + } else if (element.contextTagNum() == MAX_RESOLUTION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + maxResolution = Optional.of(ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct.decodeTlv(castingValue)); + } + } else if (element.contextTagNum() == QUALITY_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + quality = Optional.of(castingValue.value(Integer.class)); + } + } + } + return new CameraAvStreamManagementClusterSnapshotStreamChangedEvent( + snapshotStreamID, + imageCodec, + frameRate, + bitRate, + minResolution, + maxResolution, + quality + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("CameraAvStreamManagementClusterSnapshotStreamChangedEvent {\n"); + output.append("\tsnapshotStreamID: "); + output.append(snapshotStreamID); + output.append("\n"); + output.append("\timageCodec: "); + output.append(imageCodec); + output.append("\n"); + output.append("\tframeRate: "); + output.append(frameRate); + output.append("\n"); + output.append("\tbitRate: "); + output.append(bitRate); + output.append("\n"); + output.append("\tminResolution: "); + output.append(minResolution); + output.append("\n"); + output.append("\tmaxResolution: "); + output.append(maxResolution); + output.append("\n"); + output.append("\tquality: "); + output.append(quality); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class CommissionerControlClusterCommissioningRequestResultEvent { public Long requestID; public Long clientNodeID; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index 4c04d0ec0e..b3fcd6df3b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java @@ -12724,6 +12724,1369 @@ public String toString() { return output.toString(); } } +public static class ZoneManagementClusterTwoDCartesianVertexStruct { + public Integer x; + public Integer y; + private static final long X_ID = 0L; + private static final long Y_ID = 1L; + + public ZoneManagementClusterTwoDCartesianVertexStruct( + Integer x, + Integer y + ) { + this.x = x; + this.y = y; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(X_ID, new UIntType(x))); + values.add(new StructElement(Y_ID, new UIntType(y))); + + return new StructType(values); + } + + public static ZoneManagementClusterTwoDCartesianVertexStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer x = null; + Integer y = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == X_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + x = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == Y_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + y = castingValue.value(Integer.class); + } + } + } + return new ZoneManagementClusterTwoDCartesianVertexStruct( + x, + y + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ZoneManagementClusterTwoDCartesianVertexStruct {\n"); + output.append("\tx: "); + output.append(x); + output.append("\n"); + output.append("\ty: "); + output.append(y); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ZoneManagementClusterTwoDCartesianZoneStruct { + public String name; + public Integer use; + public ArrayList vertices; + public Optional color; + private static final long NAME_ID = 0L; + private static final long USE_ID = 1L; + private static final long VERTICES_ID = 2L; + private static final long COLOR_ID = 3L; + + public ZoneManagementClusterTwoDCartesianZoneStruct( + String name, + Integer use, + ArrayList vertices, + Optional color + ) { + this.name = name; + this.use = use; + this.vertices = vertices; + this.color = color; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(NAME_ID, new StringType(name))); + values.add(new StructElement(USE_ID, new UIntType(use))); + values.add(new StructElement(VERTICES_ID, ArrayType.generateArrayType(vertices, (elementvertices) -> elementvertices.encodeTlv()))); + values.add(new StructElement(COLOR_ID, color.map((nonOptionalcolor) -> new StringType(nonOptionalcolor)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static ZoneManagementClusterTwoDCartesianZoneStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + String name = null; + Integer use = null; + ArrayList vertices = null; + Optional color = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == NAME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + name = castingValue.value(String.class); + } + } else if (element.contextTagNum() == USE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + use = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == VERTICES_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + vertices = castingValue.map((elementcastingValue) -> ChipStructs.ZoneManagementClusterTwoDCartesianVertexStruct.decodeTlv(elementcastingValue)); + } + } else if (element.contextTagNum() == COLOR_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + color = Optional.of(castingValue.value(String.class)); + } + } + } + return new ZoneManagementClusterTwoDCartesianZoneStruct( + name, + use, + vertices, + color + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ZoneManagementClusterTwoDCartesianZoneStruct {\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("\tuse: "); + output.append(use); + output.append("\n"); + output.append("\tvertices: "); + output.append(vertices); + output.append("\n"); + output.append("\tcolor: "); + output.append(color); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ZoneManagementClusterZoneInformationStruct { + public Integer zoneID; + public Integer zoneType; + public Integer zoneSource; + private static final long ZONE_ID_ID = 0L; + private static final long ZONE_TYPE_ID = 1L; + private static final long ZONE_SOURCE_ID = 2L; + + public ZoneManagementClusterZoneInformationStruct( + Integer zoneID, + Integer zoneType, + Integer zoneSource + ) { + this.zoneID = zoneID; + this.zoneType = zoneType; + this.zoneSource = zoneSource; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(ZONE_ID_ID, new UIntType(zoneID))); + values.add(new StructElement(ZONE_TYPE_ID, new UIntType(zoneType))); + values.add(new StructElement(ZONE_SOURCE_ID, new UIntType(zoneSource))); + + return new StructType(values); + } + + public static ZoneManagementClusterZoneInformationStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer zoneID = null; + Integer zoneType = null; + Integer zoneSource = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == ZONE_ID_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + zoneID = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == ZONE_TYPE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + zoneType = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == ZONE_SOURCE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + zoneSource = castingValue.value(Integer.class); + } + } + } + return new ZoneManagementClusterZoneInformationStruct( + zoneID, + zoneType, + zoneSource + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ZoneManagementClusterZoneInformationStruct {\n"); + output.append("\tzoneID: "); + output.append(zoneID); + output.append("\n"); + output.append("\tzoneType: "); + output.append(zoneType); + output.append("\n"); + output.append("\tzoneSource: "); + output.append(zoneSource); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ZoneManagementClusterZoneTriggeringTimeControlStruct { + public Integer initialDuration; + public Integer augmentationDuration; + public Long maxDuration; + public Integer blindDuration; + private static final long INITIAL_DURATION_ID = 0L; + private static final long AUGMENTATION_DURATION_ID = 1L; + private static final long MAX_DURATION_ID = 2L; + private static final long BLIND_DURATION_ID = 3L; + + public ZoneManagementClusterZoneTriggeringTimeControlStruct( + Integer initialDuration, + Integer augmentationDuration, + Long maxDuration, + Integer blindDuration + ) { + this.initialDuration = initialDuration; + this.augmentationDuration = augmentationDuration; + this.maxDuration = maxDuration; + this.blindDuration = blindDuration; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(INITIAL_DURATION_ID, new UIntType(initialDuration))); + values.add(new StructElement(AUGMENTATION_DURATION_ID, new UIntType(augmentationDuration))); + values.add(new StructElement(MAX_DURATION_ID, new UIntType(maxDuration))); + values.add(new StructElement(BLIND_DURATION_ID, new UIntType(blindDuration))); + + return new StructType(values); + } + + public static ZoneManagementClusterZoneTriggeringTimeControlStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer initialDuration = null; + Integer augmentationDuration = null; + Long maxDuration = null; + Integer blindDuration = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == INITIAL_DURATION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + initialDuration = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == AUGMENTATION_DURATION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + augmentationDuration = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == MAX_DURATION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + maxDuration = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == BLIND_DURATION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + blindDuration = castingValue.value(Integer.class); + } + } + } + return new ZoneManagementClusterZoneTriggeringTimeControlStruct( + initialDuration, + augmentationDuration, + maxDuration, + blindDuration + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ZoneManagementClusterZoneTriggeringTimeControlStruct {\n"); + output.append("\tinitialDuration: "); + output.append(initialDuration); + output.append("\n"); + output.append("\taugmentationDuration: "); + output.append(augmentationDuration); + output.append("\n"); + output.append("\tmaxDuration: "); + output.append(maxDuration); + output.append("\n"); + output.append("\tblindDuration: "); + output.append(blindDuration); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class CameraAvStreamManagementClusterVideoResolutionStruct { + public Integer width; + public Integer height; + private static final long WIDTH_ID = 0L; + private static final long HEIGHT_ID = 1L; + + public CameraAvStreamManagementClusterVideoResolutionStruct( + Integer width, + Integer height + ) { + this.width = width; + this.height = height; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(WIDTH_ID, new UIntType(width))); + values.add(new StructElement(HEIGHT_ID, new UIntType(height))); + + return new StructType(values); + } + + public static CameraAvStreamManagementClusterVideoResolutionStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer width = null; + Integer height = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == WIDTH_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + width = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == HEIGHT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + height = castingValue.value(Integer.class); + } + } + } + return new CameraAvStreamManagementClusterVideoResolutionStruct( + width, + height + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("CameraAvStreamManagementClusterVideoResolutionStruct {\n"); + output.append("\twidth: "); + output.append(width); + output.append("\n"); + output.append("\theight: "); + output.append(height); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class CameraAvStreamManagementClusterVideoStreamStruct { + public Integer videoStreamID; + public Integer streamType; + public Integer videoCodec; + public Integer minFrameRate; + public Integer maxFrameRate; + public ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct minResolution; + public ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct maxResolution; + public Long minBitRate; + public Long maxBitRate; + public Integer minFragmentLen; + public Integer maxFragmentLen; + public Optional watermarkEnabled; + public Optional OSDEnabled; + public Integer referenceCount; + private static final long VIDEO_STREAM_ID_ID = 0L; + private static final long STREAM_TYPE_ID = 1L; + private static final long VIDEO_CODEC_ID = 2L; + private static final long MIN_FRAME_RATE_ID = 3L; + private static final long MAX_FRAME_RATE_ID = 4L; + private static final long MIN_RESOLUTION_ID = 5L; + private static final long MAX_RESOLUTION_ID = 6L; + private static final long MIN_BIT_RATE_ID = 7L; + private static final long MAX_BIT_RATE_ID = 8L; + private static final long MIN_FRAGMENT_LEN_ID = 9L; + private static final long MAX_FRAGMENT_LEN_ID = 10L; + private static final long WATERMARK_ENABLED_ID = 11L; + private static final long OSD_ENABLED_ID = 12L; + private static final long REFERENCE_COUNT_ID = 13L; + + public CameraAvStreamManagementClusterVideoStreamStruct( + Integer videoStreamID, + Integer streamType, + Integer videoCodec, + Integer minFrameRate, + Integer maxFrameRate, + ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct minResolution, + ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct maxResolution, + Long minBitRate, + Long maxBitRate, + Integer minFragmentLen, + Integer maxFragmentLen, + Optional watermarkEnabled, + Optional OSDEnabled, + Integer referenceCount + ) { + this.videoStreamID = videoStreamID; + this.streamType = streamType; + this.videoCodec = videoCodec; + this.minFrameRate = minFrameRate; + this.maxFrameRate = maxFrameRate; + this.minResolution = minResolution; + this.maxResolution = maxResolution; + this.minBitRate = minBitRate; + this.maxBitRate = maxBitRate; + this.minFragmentLen = minFragmentLen; + this.maxFragmentLen = maxFragmentLen; + this.watermarkEnabled = watermarkEnabled; + this.OSDEnabled = OSDEnabled; + this.referenceCount = referenceCount; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(VIDEO_STREAM_ID_ID, new UIntType(videoStreamID))); + values.add(new StructElement(STREAM_TYPE_ID, new UIntType(streamType))); + values.add(new StructElement(VIDEO_CODEC_ID, new UIntType(videoCodec))); + values.add(new StructElement(MIN_FRAME_RATE_ID, new UIntType(minFrameRate))); + values.add(new StructElement(MAX_FRAME_RATE_ID, new UIntType(maxFrameRate))); + values.add(new StructElement(MIN_RESOLUTION_ID, minResolution.encodeTlv())); + values.add(new StructElement(MAX_RESOLUTION_ID, maxResolution.encodeTlv())); + values.add(new StructElement(MIN_BIT_RATE_ID, new UIntType(minBitRate))); + values.add(new StructElement(MAX_BIT_RATE_ID, new UIntType(maxBitRate))); + values.add(new StructElement(MIN_FRAGMENT_LEN_ID, new UIntType(minFragmentLen))); + values.add(new StructElement(MAX_FRAGMENT_LEN_ID, new UIntType(maxFragmentLen))); + values.add(new StructElement(WATERMARK_ENABLED_ID, watermarkEnabled.map((nonOptionalwatermarkEnabled) -> new BooleanType(nonOptionalwatermarkEnabled)).orElse(new EmptyType()))); + values.add(new StructElement(OSD_ENABLED_ID, OSDEnabled.map((nonOptionalOSDEnabled) -> new BooleanType(nonOptionalOSDEnabled)).orElse(new EmptyType()))); + values.add(new StructElement(REFERENCE_COUNT_ID, new UIntType(referenceCount))); + + return new StructType(values); + } + + public static CameraAvStreamManagementClusterVideoStreamStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer videoStreamID = null; + Integer streamType = null; + Integer videoCodec = null; + Integer minFrameRate = null; + Integer maxFrameRate = null; + ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct minResolution = null; + ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct maxResolution = null; + Long minBitRate = null; + Long maxBitRate = null; + Integer minFragmentLen = null; + Integer maxFragmentLen = null; + Optional watermarkEnabled = Optional.empty(); + Optional OSDEnabled = Optional.empty(); + Integer referenceCount = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == VIDEO_STREAM_ID_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + videoStreamID = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == STREAM_TYPE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + streamType = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == VIDEO_CODEC_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + videoCodec = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == MIN_FRAME_RATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + minFrameRate = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == MAX_FRAME_RATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + maxFrameRate = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == MIN_RESOLUTION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + minResolution = ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct.decodeTlv(castingValue); + } + } else if (element.contextTagNum() == MAX_RESOLUTION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + maxResolution = ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct.decodeTlv(castingValue); + } + } else if (element.contextTagNum() == MIN_BIT_RATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + minBitRate = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == MAX_BIT_RATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + maxBitRate = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == MIN_FRAGMENT_LEN_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + minFragmentLen = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == MAX_FRAGMENT_LEN_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + maxFragmentLen = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == WATERMARK_ENABLED_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Boolean) { + BooleanType castingValue = element.value(BooleanType.class); + watermarkEnabled = Optional.of(castingValue.value(Boolean.class)); + } + } else if (element.contextTagNum() == OSD_ENABLED_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Boolean) { + BooleanType castingValue = element.value(BooleanType.class); + OSDEnabled = Optional.of(castingValue.value(Boolean.class)); + } + } else if (element.contextTagNum() == REFERENCE_COUNT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + referenceCount = castingValue.value(Integer.class); + } + } + } + return new CameraAvStreamManagementClusterVideoStreamStruct( + videoStreamID, + streamType, + videoCodec, + minFrameRate, + maxFrameRate, + minResolution, + maxResolution, + minBitRate, + maxBitRate, + minFragmentLen, + maxFragmentLen, + watermarkEnabled, + OSDEnabled, + referenceCount + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("CameraAvStreamManagementClusterVideoStreamStruct {\n"); + output.append("\tvideoStreamID: "); + output.append(videoStreamID); + output.append("\n"); + output.append("\tstreamType: "); + output.append(streamType); + output.append("\n"); + output.append("\tvideoCodec: "); + output.append(videoCodec); + output.append("\n"); + output.append("\tminFrameRate: "); + output.append(minFrameRate); + output.append("\n"); + output.append("\tmaxFrameRate: "); + output.append(maxFrameRate); + output.append("\n"); + output.append("\tminResolution: "); + output.append(minResolution); + output.append("\n"); + output.append("\tmaxResolution: "); + output.append(maxResolution); + output.append("\n"); + output.append("\tminBitRate: "); + output.append(minBitRate); + output.append("\n"); + output.append("\tmaxBitRate: "); + output.append(maxBitRate); + output.append("\n"); + output.append("\tminFragmentLen: "); + output.append(minFragmentLen); + output.append("\n"); + output.append("\tmaxFragmentLen: "); + output.append(maxFragmentLen); + output.append("\n"); + output.append("\twatermarkEnabled: "); + output.append(watermarkEnabled); + output.append("\n"); + output.append("\tOSDEnabled: "); + output.append(OSDEnabled); + output.append("\n"); + output.append("\treferenceCount: "); + output.append(referenceCount); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class CameraAvStreamManagementClusterSnapshotStreamStruct { + public Integer snapshotStreamID; + public Integer imageCodec; + public Integer frameRate; + public Long bitRate; + public ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct minResolution; + public ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct maxResolution; + public Integer quality; + public Integer referenceCount; + private static final long SNAPSHOT_STREAM_ID_ID = 0L; + private static final long IMAGE_CODEC_ID = 1L; + private static final long FRAME_RATE_ID = 2L; + private static final long BIT_RATE_ID = 3L; + private static final long MIN_RESOLUTION_ID = 4L; + private static final long MAX_RESOLUTION_ID = 5L; + private static final long QUALITY_ID = 6L; + private static final long REFERENCE_COUNT_ID = 7L; + + public CameraAvStreamManagementClusterSnapshotStreamStruct( + Integer snapshotStreamID, + Integer imageCodec, + Integer frameRate, + Long bitRate, + ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct minResolution, + ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct maxResolution, + Integer quality, + Integer referenceCount + ) { + this.snapshotStreamID = snapshotStreamID; + this.imageCodec = imageCodec; + this.frameRate = frameRate; + this.bitRate = bitRate; + this.minResolution = minResolution; + this.maxResolution = maxResolution; + this.quality = quality; + this.referenceCount = referenceCount; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(SNAPSHOT_STREAM_ID_ID, new UIntType(snapshotStreamID))); + values.add(new StructElement(IMAGE_CODEC_ID, new UIntType(imageCodec))); + values.add(new StructElement(FRAME_RATE_ID, new UIntType(frameRate))); + values.add(new StructElement(BIT_RATE_ID, new UIntType(bitRate))); + values.add(new StructElement(MIN_RESOLUTION_ID, minResolution.encodeTlv())); + values.add(new StructElement(MAX_RESOLUTION_ID, maxResolution.encodeTlv())); + values.add(new StructElement(QUALITY_ID, new UIntType(quality))); + values.add(new StructElement(REFERENCE_COUNT_ID, new UIntType(referenceCount))); + + return new StructType(values); + } + + public static CameraAvStreamManagementClusterSnapshotStreamStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer snapshotStreamID = null; + Integer imageCodec = null; + Integer frameRate = null; + Long bitRate = null; + ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct minResolution = null; + ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct maxResolution = null; + Integer quality = null; + Integer referenceCount = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == SNAPSHOT_STREAM_ID_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + snapshotStreamID = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == IMAGE_CODEC_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + imageCodec = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == FRAME_RATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + frameRate = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == BIT_RATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + bitRate = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == MIN_RESOLUTION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + minResolution = ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct.decodeTlv(castingValue); + } + } else if (element.contextTagNum() == MAX_RESOLUTION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + maxResolution = ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct.decodeTlv(castingValue); + } + } else if (element.contextTagNum() == QUALITY_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + quality = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == REFERENCE_COUNT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + referenceCount = castingValue.value(Integer.class); + } + } + } + return new CameraAvStreamManagementClusterSnapshotStreamStruct( + snapshotStreamID, + imageCodec, + frameRate, + bitRate, + minResolution, + maxResolution, + quality, + referenceCount + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("CameraAvStreamManagementClusterSnapshotStreamStruct {\n"); + output.append("\tsnapshotStreamID: "); + output.append(snapshotStreamID); + output.append("\n"); + output.append("\timageCodec: "); + output.append(imageCodec); + output.append("\n"); + output.append("\tframeRate: "); + output.append(frameRate); + output.append("\n"); + output.append("\tbitRate: "); + output.append(bitRate); + output.append("\n"); + output.append("\tminResolution: "); + output.append(minResolution); + output.append("\n"); + output.append("\tmaxResolution: "); + output.append(maxResolution); + output.append("\n"); + output.append("\tquality: "); + output.append(quality); + output.append("\n"); + output.append("\treferenceCount: "); + output.append(referenceCount); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class CameraAvStreamManagementClusterSnapshotParamsStruct { + public ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct resolution; + public Integer maxFrameRate; + public Integer imageCodec; + private static final long RESOLUTION_ID = 0L; + private static final long MAX_FRAME_RATE_ID = 1L; + private static final long IMAGE_CODEC_ID = 2L; + + public CameraAvStreamManagementClusterSnapshotParamsStruct( + ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct resolution, + Integer maxFrameRate, + Integer imageCodec + ) { + this.resolution = resolution; + this.maxFrameRate = maxFrameRate; + this.imageCodec = imageCodec; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(RESOLUTION_ID, resolution.encodeTlv())); + values.add(new StructElement(MAX_FRAME_RATE_ID, new UIntType(maxFrameRate))); + values.add(new StructElement(IMAGE_CODEC_ID, new UIntType(imageCodec))); + + return new StructType(values); + } + + public static CameraAvStreamManagementClusterSnapshotParamsStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct resolution = null; + Integer maxFrameRate = null; + Integer imageCodec = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == RESOLUTION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + resolution = ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct.decodeTlv(castingValue); + } + } else if (element.contextTagNum() == MAX_FRAME_RATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + maxFrameRate = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == IMAGE_CODEC_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + imageCodec = castingValue.value(Integer.class); + } + } + } + return new CameraAvStreamManagementClusterSnapshotParamsStruct( + resolution, + maxFrameRate, + imageCodec + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("CameraAvStreamManagementClusterSnapshotParamsStruct {\n"); + output.append("\tresolution: "); + output.append(resolution); + output.append("\n"); + output.append("\tmaxFrameRate: "); + output.append(maxFrameRate); + output.append("\n"); + output.append("\timageCodec: "); + output.append(imageCodec); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct { + public Integer codec; + public ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct resolution; + public Long minBitRate; + private static final long CODEC_ID = 0L; + private static final long RESOLUTION_ID = 1L; + private static final long MIN_BIT_RATE_ID = 2L; + + public CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct( + Integer codec, + ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct resolution, + Long minBitRate + ) { + this.codec = codec; + this.resolution = resolution; + this.minBitRate = minBitRate; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(CODEC_ID, new UIntType(codec))); + values.add(new StructElement(RESOLUTION_ID, resolution.encodeTlv())); + values.add(new StructElement(MIN_BIT_RATE_ID, new UIntType(minBitRate))); + + return new StructType(values); + } + + public static CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer codec = null; + ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct resolution = null; + Long minBitRate = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == CODEC_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + codec = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == RESOLUTION_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Struct) { + StructType castingValue = element.value(StructType.class); + resolution = ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct.decodeTlv(castingValue); + } + } else if (element.contextTagNum() == MIN_BIT_RATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + minBitRate = castingValue.value(Long.class); + } + } + } + return new CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct( + codec, + resolution, + minBitRate + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct {\n"); + output.append("\tcodec: "); + output.append(codec); + output.append("\n"); + output.append("\tresolution: "); + output.append(resolution); + output.append("\n"); + output.append("\tminBitRate: "); + output.append(minBitRate); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class CameraAvStreamManagementClusterAudioCapabilitiesStruct { + public Integer maxNumberOfChannels; + public ArrayList supportedCodecs; + public ArrayList supportedSampleRates; + public ArrayList supportedBitDepths; + private static final long MAX_NUMBER_OF_CHANNELS_ID = 0L; + private static final long SUPPORTED_CODECS_ID = 1L; + private static final long SUPPORTED_SAMPLE_RATES_ID = 2L; + private static final long SUPPORTED_BIT_DEPTHS_ID = 3L; + + public CameraAvStreamManagementClusterAudioCapabilitiesStruct( + Integer maxNumberOfChannels, + ArrayList supportedCodecs, + ArrayList supportedSampleRates, + ArrayList supportedBitDepths + ) { + this.maxNumberOfChannels = maxNumberOfChannels; + this.supportedCodecs = supportedCodecs; + this.supportedSampleRates = supportedSampleRates; + this.supportedBitDepths = supportedBitDepths; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(MAX_NUMBER_OF_CHANNELS_ID, new UIntType(maxNumberOfChannels))); + values.add(new StructElement(SUPPORTED_CODECS_ID, ArrayType.generateArrayType(supportedCodecs, (elementsupportedCodecs) -> new UIntType(elementsupportedCodecs)))); + values.add(new StructElement(SUPPORTED_SAMPLE_RATES_ID, ArrayType.generateArrayType(supportedSampleRates, (elementsupportedSampleRates) -> new UIntType(elementsupportedSampleRates)))); + values.add(new StructElement(SUPPORTED_BIT_DEPTHS_ID, ArrayType.generateArrayType(supportedBitDepths, (elementsupportedBitDepths) -> new UIntType(elementsupportedBitDepths)))); + + return new StructType(values); + } + + public static CameraAvStreamManagementClusterAudioCapabilitiesStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer maxNumberOfChannels = null; + ArrayList supportedCodecs = null; + ArrayList supportedSampleRates = null; + ArrayList supportedBitDepths = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == MAX_NUMBER_OF_CHANNELS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + maxNumberOfChannels = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == SUPPORTED_CODECS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + supportedCodecs = castingValue.map((elementcastingValue) -> elementcastingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == SUPPORTED_SAMPLE_RATES_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + supportedSampleRates = castingValue.map((elementcastingValue) -> elementcastingValue.value(Long.class)); + } + } else if (element.contextTagNum() == SUPPORTED_BIT_DEPTHS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + supportedBitDepths = castingValue.map((elementcastingValue) -> elementcastingValue.value(Integer.class)); + } + } + } + return new CameraAvStreamManagementClusterAudioCapabilitiesStruct( + maxNumberOfChannels, + supportedCodecs, + supportedSampleRates, + supportedBitDepths + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("CameraAvStreamManagementClusterAudioCapabilitiesStruct {\n"); + output.append("\tmaxNumberOfChannels: "); + output.append(maxNumberOfChannels); + output.append("\n"); + output.append("\tsupportedCodecs: "); + output.append(supportedCodecs); + output.append("\n"); + output.append("\tsupportedSampleRates: "); + output.append(supportedSampleRates); + output.append("\n"); + output.append("\tsupportedBitDepths: "); + output.append(supportedBitDepths); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class CameraAvStreamManagementClusterAudioStreamStruct { + public Integer audioStreamID; + public Integer streamType; + public Integer audioCodec; + public Integer channelCount; + public Long sampleRate; + public Long bitRate; + public Integer bitDepth; + public Integer referenceCount; + private static final long AUDIO_STREAM_ID_ID = 0L; + private static final long STREAM_TYPE_ID = 1L; + private static final long AUDIO_CODEC_ID = 2L; + private static final long CHANNEL_COUNT_ID = 3L; + private static final long SAMPLE_RATE_ID = 4L; + private static final long BIT_RATE_ID = 5L; + private static final long BIT_DEPTH_ID = 6L; + private static final long REFERENCE_COUNT_ID = 7L; + + public CameraAvStreamManagementClusterAudioStreamStruct( + Integer audioStreamID, + Integer streamType, + Integer audioCodec, + Integer channelCount, + Long sampleRate, + Long bitRate, + Integer bitDepth, + Integer referenceCount + ) { + this.audioStreamID = audioStreamID; + this.streamType = streamType; + this.audioCodec = audioCodec; + this.channelCount = channelCount; + this.sampleRate = sampleRate; + this.bitRate = bitRate; + this.bitDepth = bitDepth; + this.referenceCount = referenceCount; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(AUDIO_STREAM_ID_ID, new UIntType(audioStreamID))); + values.add(new StructElement(STREAM_TYPE_ID, new UIntType(streamType))); + values.add(new StructElement(AUDIO_CODEC_ID, new UIntType(audioCodec))); + values.add(new StructElement(CHANNEL_COUNT_ID, new UIntType(channelCount))); + values.add(new StructElement(SAMPLE_RATE_ID, new UIntType(sampleRate))); + values.add(new StructElement(BIT_RATE_ID, new UIntType(bitRate))); + values.add(new StructElement(BIT_DEPTH_ID, new UIntType(bitDepth))); + values.add(new StructElement(REFERENCE_COUNT_ID, new UIntType(referenceCount))); + + return new StructType(values); + } + + public static CameraAvStreamManagementClusterAudioStreamStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer audioStreamID = null; + Integer streamType = null; + Integer audioCodec = null; + Integer channelCount = null; + Long sampleRate = null; + Long bitRate = null; + Integer bitDepth = null; + Integer referenceCount = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == AUDIO_STREAM_ID_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + audioStreamID = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == STREAM_TYPE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + streamType = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == AUDIO_CODEC_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + audioCodec = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == CHANNEL_COUNT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + channelCount = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == SAMPLE_RATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sampleRate = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == BIT_RATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + bitRate = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == BIT_DEPTH_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + bitDepth = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == REFERENCE_COUNT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + referenceCount = castingValue.value(Integer.class); + } + } + } + return new CameraAvStreamManagementClusterAudioStreamStruct( + audioStreamID, + streamType, + audioCodec, + channelCount, + sampleRate, + bitRate, + bitDepth, + referenceCount + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("CameraAvStreamManagementClusterAudioStreamStruct {\n"); + output.append("\taudioStreamID: "); + output.append(audioStreamID); + output.append("\n"); + output.append("\tstreamType: "); + output.append(streamType); + output.append("\n"); + output.append("\taudioCodec: "); + output.append(audioCodec); + output.append("\n"); + output.append("\tchannelCount: "); + output.append(channelCount); + output.append("\n"); + output.append("\tsampleRate: "); + output.append(sampleRate); + output.append("\n"); + output.append("\tbitRate: "); + output.append(bitRate); + output.append("\n"); + output.append("\tbitDepth: "); + output.append(bitDepth); + output.append("\n"); + output.append("\treferenceCount: "); + output.append(referenceCount); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class CameraAvStreamManagementClusterVideoSensorParamsStruct { + public Integer sensorWidth; + public Integer sensorHeight; + public Boolean HDRCapable; + public Integer maxFPS; + public Integer maxHDRFPS; + private static final long SENSOR_WIDTH_ID = 0L; + private static final long SENSOR_HEIGHT_ID = 1L; + private static final long HDR_CAPABLE_ID = 2L; + private static final long MAX_FPS_ID = 3L; + private static final long MAX_HDRFPS_ID = 4L; + + public CameraAvStreamManagementClusterVideoSensorParamsStruct( + Integer sensorWidth, + Integer sensorHeight, + Boolean HDRCapable, + Integer maxFPS, + Integer maxHDRFPS + ) { + this.sensorWidth = sensorWidth; + this.sensorHeight = sensorHeight; + this.HDRCapable = HDRCapable; + this.maxFPS = maxFPS; + this.maxHDRFPS = maxHDRFPS; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(SENSOR_WIDTH_ID, new UIntType(sensorWidth))); + values.add(new StructElement(SENSOR_HEIGHT_ID, new UIntType(sensorHeight))); + values.add(new StructElement(HDR_CAPABLE_ID, new BooleanType(HDRCapable))); + values.add(new StructElement(MAX_FPS_ID, new UIntType(maxFPS))); + values.add(new StructElement(MAX_HDRFPS_ID, new UIntType(maxHDRFPS))); + + return new StructType(values); + } + + public static CameraAvStreamManagementClusterVideoSensorParamsStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer sensorWidth = null; + Integer sensorHeight = null; + Boolean HDRCapable = null; + Integer maxFPS = null; + Integer maxHDRFPS = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == SENSOR_WIDTH_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sensorWidth = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == SENSOR_HEIGHT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sensorHeight = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == HDR_CAPABLE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Boolean) { + BooleanType castingValue = element.value(BooleanType.class); + HDRCapable = castingValue.value(Boolean.class); + } + } else if (element.contextTagNum() == MAX_FPS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + maxFPS = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == MAX_HDRFPS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + maxHDRFPS = castingValue.value(Integer.class); + } + } + } + return new CameraAvStreamManagementClusterVideoSensorParamsStruct( + sensorWidth, + sensorHeight, + HDRCapable, + maxFPS, + maxHDRFPS + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("CameraAvStreamManagementClusterVideoSensorParamsStruct {\n"); + output.append("\tsensorWidth: "); + output.append(sensorWidth); + output.append("\n"); + output.append("\tsensorHeight: "); + output.append(sensorHeight); + output.append("\n"); + output.append("\tHDRCapable: "); + output.append(HDRCapable); + output.append("\n"); + output.append("\tmaxFPS: "); + output.append(maxFPS); + output.append("\n"); + output.append("\tmaxHDRFPS: "); + output.append(maxHDRFPS); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class CameraAvStreamManagementClusterViewportStruct { + public Integer x1; + public Integer y1; + public Integer x2; + public Integer y2; + private static final long X1_ID = 0L; + private static final long Y1_ID = 1L; + private static final long X2_ID = 2L; + private static final long Y2_ID = 3L; + + public CameraAvStreamManagementClusterViewportStruct( + Integer x1, + Integer y1, + Integer x2, + Integer y2 + ) { + this.x1 = x1; + this.y1 = y1; + this.x2 = x2; + this.y2 = y2; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(X1_ID, new UIntType(x1))); + values.add(new StructElement(Y1_ID, new UIntType(y1))); + values.add(new StructElement(X2_ID, new UIntType(x2))); + values.add(new StructElement(Y2_ID, new UIntType(y2))); + + return new StructType(values); + } + + public static CameraAvStreamManagementClusterViewportStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer x1 = null; + Integer y1 = null; + Integer x2 = null; + Integer y2 = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == X1_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + x1 = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == Y1_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + y1 = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == X2_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + x2 = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == Y2_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + y2 = castingValue.value(Integer.class); + } + } + } + return new CameraAvStreamManagementClusterViewportStruct( + x1, + y1, + x2, + y2 + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("CameraAvStreamManagementClusterViewportStruct {\n"); + output.append("\tx1: "); + output.append(x1); + output.append("\n"); + output.append("\ty1: "); + output.append(y1); + output.append("\n"); + output.append("\tx2: "); + output.append(x2); + output.append("\n"); + output.append("\ty2: "); + output.append(y2); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class WebRTCTransportProviderClusterICEServerStruct { public ArrayList urls; public Optional username; @@ -12951,6 +14314,233 @@ public String toString() { return output.toString(); } } +public static class WebRTCTransportRequestorClusterICEServerStruct { + public ArrayList urls; + public Optional username; + public Optional credential; + public Optional caid; + private static final long URLS_ID = 1L; + private static final long USERNAME_ID = 2L; + private static final long CREDENTIAL_ID = 3L; + private static final long CAID_ID = 4L; + + public WebRTCTransportRequestorClusterICEServerStruct( + ArrayList urls, + Optional username, + Optional credential, + Optional caid + ) { + this.urls = urls; + this.username = username; + this.credential = credential; + this.caid = caid; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(URLS_ID, ArrayType.generateArrayType(urls, (elementurls) -> new StringType(elementurls)))); + values.add(new StructElement(USERNAME_ID, username.map((nonOptionalusername) -> new StringType(nonOptionalusername)).orElse(new EmptyType()))); + values.add(new StructElement(CREDENTIAL_ID, credential.map((nonOptionalcredential) -> new StringType(nonOptionalcredential)).orElse(new EmptyType()))); + values.add(new StructElement(CAID_ID, caid.map((nonOptionalcaid) -> new UIntType(nonOptionalcaid)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static WebRTCTransportRequestorClusterICEServerStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + ArrayList urls = null; + Optional username = Optional.empty(); + Optional credential = Optional.empty(); + Optional caid = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == URLS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + urls = castingValue.map((elementcastingValue) -> elementcastingValue.value(String.class)); + } + } else if (element.contextTagNum() == USERNAME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + username = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == CREDENTIAL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + credential = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == CAID_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + caid = Optional.of(castingValue.value(Integer.class)); + } + } + } + return new WebRTCTransportRequestorClusterICEServerStruct( + urls, + username, + credential, + caid + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("WebRTCTransportRequestorClusterICEServerStruct {\n"); + output.append("\turls: "); + output.append(urls); + output.append("\n"); + output.append("\tusername: "); + output.append(username); + output.append("\n"); + output.append("\tcredential: "); + output.append(credential); + output.append("\n"); + output.append("\tcaid: "); + output.append(caid); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class WebRTCTransportRequestorClusterWebRTCSessionStruct { + public Integer id; + public Long peerNodeID; + public Integer peerFabricIndex; + public Integer streamType; + public @Nullable Integer videoStreamID; + public @Nullable Integer audioStreamID; + public Integer metadataOptions; + private static final long ID_ID = 1L; + private static final long PEER_NODE_ID_ID = 2L; + private static final long PEER_FABRIC_INDEX_ID = 3L; + private static final long STREAM_TYPE_ID = 4L; + private static final long VIDEO_STREAM_ID_ID = 5L; + private static final long AUDIO_STREAM_ID_ID = 6L; + private static final long METADATA_OPTIONS_ID = 7L; + + public WebRTCTransportRequestorClusterWebRTCSessionStruct( + Integer id, + Long peerNodeID, + Integer peerFabricIndex, + Integer streamType, + @Nullable Integer videoStreamID, + @Nullable Integer audioStreamID, + Integer metadataOptions + ) { + this.id = id; + this.peerNodeID = peerNodeID; + this.peerFabricIndex = peerFabricIndex; + this.streamType = streamType; + this.videoStreamID = videoStreamID; + this.audioStreamID = audioStreamID; + this.metadataOptions = metadataOptions; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(ID_ID, new UIntType(id))); + values.add(new StructElement(PEER_NODE_ID_ID, new UIntType(peerNodeID))); + values.add(new StructElement(PEER_FABRIC_INDEX_ID, new UIntType(peerFabricIndex))); + values.add(new StructElement(STREAM_TYPE_ID, new UIntType(streamType))); + values.add(new StructElement(VIDEO_STREAM_ID_ID, videoStreamID != null ? new UIntType(videoStreamID) : new NullType())); + values.add(new StructElement(AUDIO_STREAM_ID_ID, audioStreamID != null ? new UIntType(audioStreamID) : new NullType())); + values.add(new StructElement(METADATA_OPTIONS_ID, new UIntType(metadataOptions))); + + return new StructType(values); + } + + public static WebRTCTransportRequestorClusterWebRTCSessionStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer id = null; + Long peerNodeID = null; + Integer peerFabricIndex = null; + Integer streamType = null; + @Nullable Integer videoStreamID = null; + @Nullable Integer audioStreamID = null; + Integer metadataOptions = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == ID_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + id = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == PEER_NODE_ID_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + peerNodeID = castingValue.value(Long.class); + } + } else if (element.contextTagNum() == PEER_FABRIC_INDEX_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + peerFabricIndex = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == STREAM_TYPE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + streamType = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == VIDEO_STREAM_ID_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + videoStreamID = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == AUDIO_STREAM_ID_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + audioStreamID = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == METADATA_OPTIONS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + metadataOptions = castingValue.value(Integer.class); + } + } + } + return new WebRTCTransportRequestorClusterWebRTCSessionStruct( + id, + peerNodeID, + peerFabricIndex, + streamType, + videoStreamID, + audioStreamID, + metadataOptions + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("WebRTCTransportRequestorClusterWebRTCSessionStruct {\n"); + output.append("\tid: "); + output.append(id); + output.append("\n"); + output.append("\tpeerNodeID: "); + output.append(peerNodeID); + output.append("\n"); + output.append("\tpeerFabricIndex: "); + output.append(peerFabricIndex); + output.append("\n"); + output.append("\tstreamType: "); + output.append(streamType); + output.append("\n"); + output.append("\tvideoStreamID: "); + output.append(videoStreamID); + output.append("\n"); + output.append("\taudioStreamID: "); + output.append(audioStreamID); + output.append("\n"); + output.append("\tmetadataOptions: "); + output.append(metadataOptions); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class ChimeClusterChimeSoundStruct { public Integer chimeID; public String name; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index af30b0eb34..354f49ed6c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -379,9 +379,18 @@ public static BaseCluster getCluster(long clusterId) { if (clusterId == ContentAppObserver.ID) { return new ContentAppObserver(); } + if (clusterId == ZoneManagement.ID) { + return new ZoneManagement(); + } + if (clusterId == CameraAvStreamManagement.ID) { + return new CameraAvStreamManagement(); + } if (clusterId == WebRTCTransportProvider.ID) { return new WebRTCTransportProvider(); } + if (clusterId == WebRTCTransportRequestor.ID) { + return new WebRTCTransportRequestor(); + } if (clusterId == Chime.ID) { return new Chime(); } @@ -2872,6 +2881,7 @@ public enum Attribute { TCMinRequiredVersion(6L), TCAcknowledgements(7L), TCAcknowledgementsRequired(8L), + TCUpdateDeadline(9L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -10217,8 +10227,6 @@ public long getID() { public enum Attribute { SupportedModes(0L), CurrentMode(1L), - StartUpMode(2L), - OnMode(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -10339,8 +10347,6 @@ public long getID() { public enum Attribute { SupportedModes(0L), CurrentMode(1L), - StartUpMode(2L), - OnMode(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -10461,8 +10467,6 @@ public long getID() { public enum Attribute { SupportedModes(0L), CurrentMode(1L), - StartUpMode(2L), - OnMode(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -16884,14 +16888,17 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class WebRTCTransportProvider implements BaseCluster { - public static final long ID = 1363L; + public static class ZoneManagement implements BaseCluster { + public static final long ID = 1360L; public long getID() { return ID; } public enum Attribute { - CurrentSessions(0L), + SupportedZoneSources(0L), + Zones(1L), + TimeControl(2L), + Sensitivity(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -16917,7 +16924,9 @@ public static Attribute value(long id) throws NoSuchFieldError { } } - public enum Event {; + public enum Event { + ZoneTriggered(0L), + ZoneStopped(1L),; private final long id; Event(long id) { this.id = id; @@ -16938,11 +16947,10 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - SolicitOffer(1L), - ProvideOffer(3L), - ProvideAnswer(5L), - ProvideICECandidate(6L), - EndSession(7L),; + CreateTwoDCartesianZone(0L), + UpdateTwoDCartesianZone(2L), + GetTwoDCartesianZone(3L), + RemoveZone(5L),; private final long id; Command(long id) { this.id = id; @@ -16960,85 +16968,816 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum SolicitOfferCommandField {StreamType(0),VideoStreamID(1),AudioStreamID(2),ICEServers(3),ICETransportPolicy(4),MetadataOptions(5),; + }public enum CreateTwoDCartesianZoneCommandField {Zone(0),; private final int id; - SolicitOfferCommandField(int id) { + CreateTwoDCartesianZoneCommandField(int id) { this.id = id; } public int getID() { return id; } - public static SolicitOfferCommandField value(int id) throws NoSuchFieldError { - for (SolicitOfferCommandField field : SolicitOfferCommandField.values()) { + public static CreateTwoDCartesianZoneCommandField value(int id) throws NoSuchFieldError { + for (CreateTwoDCartesianZoneCommandField field : CreateTwoDCartesianZoneCommandField.values()) { if (field.getID() == id) { return field; } } throw new NoSuchFieldError(); } - }public enum ProvideOfferCommandField {WebRTCSessionID(0),Sdp(1),StreamType(2),VideoStreamID(3),AudioStreamID(4),ICEServers(5),ICETransportPolicy(6),MetadataOptions(7),; + }public enum UpdateTwoDCartesianZoneCommandField {ZoneID(0),Zone(1),; private final int id; - ProvideOfferCommandField(int id) { + UpdateTwoDCartesianZoneCommandField(int id) { this.id = id; } public int getID() { return id; } - public static ProvideOfferCommandField value(int id) throws NoSuchFieldError { - for (ProvideOfferCommandField field : ProvideOfferCommandField.values()) { + public static UpdateTwoDCartesianZoneCommandField value(int id) throws NoSuchFieldError { + for (UpdateTwoDCartesianZoneCommandField field : UpdateTwoDCartesianZoneCommandField.values()) { if (field.getID() == id) { return field; } } throw new NoSuchFieldError(); } - }public enum ProvideAnswerCommandField {WebRTCSessionID(0),Sdp(1),; + }public enum GetTwoDCartesianZoneCommandField {ZoneID(0),; private final int id; - ProvideAnswerCommandField(int id) { + GetTwoDCartesianZoneCommandField(int id) { this.id = id; } public int getID() { return id; } - public static ProvideAnswerCommandField value(int id) throws NoSuchFieldError { - for (ProvideAnswerCommandField field : ProvideAnswerCommandField.values()) { + public static GetTwoDCartesianZoneCommandField value(int id) throws NoSuchFieldError { + for (GetTwoDCartesianZoneCommandField field : GetTwoDCartesianZoneCommandField.values()) { if (field.getID() == id) { return field; } } throw new NoSuchFieldError(); } - }public enum ProvideICECandidateCommandField {WebRTCSessionID(0),ICECandidate(1),; + }public enum RemoveZoneCommandField {ZoneID(0),; private final int id; - ProvideICECandidateCommandField(int id) { + RemoveZoneCommandField(int id) { this.id = id; } public int getID() { return id; } - public static ProvideICECandidateCommandField value(int id) throws NoSuchFieldError { - for (ProvideICECandidateCommandField field : ProvideICECandidateCommandField.values()) { + public static RemoveZoneCommandField value(int id) throws NoSuchFieldError { + for (RemoveZoneCommandField field : RemoveZoneCommandField.values()) { if (field.getID() == id) { return field; } } throw new NoSuchFieldError(); } - }public enum EndSessionCommandField {WebRTCSessionID(0),Reason(1),; + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class CameraAvStreamManagement implements BaseCluster { + public static final long ID = 1361L; + public long getID() { + return ID; + } + + public enum Attribute { + MaxConcurrentVideoEncoders(0L), + MaxEncodedPixelRate(1L), + VideoSensorParams(2L), + NightVisionCapable(3L), + MinViewport(4L), + RateDistortionTradeOffPoints(5L), + MaxContentBufferSize(6L), + MicrophoneCapabilities(7L), + SpeakerCapabilities(8L), + TwoWayTalkSupport(9L), + SupportedSnapshotParams(10L), + MaxNetworkBandwidth(11L), + CurrentFrameRate(12L), + HDRModeEnabled(13L), + CurrentVideoCodecs(14L), + CurrentSnapshotConfig(15L), + FabricsUsingCamera(16L), + AllocatedVideoStreams(17L), + AllocatedAudioStreams(18L), + AllocatedSnapshotStreams(19L), + RankedVideoStreamPrioritiesList(20L), + SoftRecordingPrivacyModeEnabled(21L), + SoftLivestreamPrivacyModeEnabled(22L), + HardPrivacyModeOn(23L), + NightVision(24L), + NightVisionIllum(25L), + AWBEnabled(26L), + AutoShutterSpeedEnabled(27L), + AutoISOEnabled(28L), + Viewport(29L), + SpeakerMuted(30L), + SpeakerVolumeLevel(31L), + SpeakerMaxLevel(32L), + SpeakerMinLevel(33L), + MicrophoneMuted(34L), + MicrophoneVolumeLevel(35L), + MicrophoneMaxLevel(36L), + MicrophoneMinLevel(37L), + MicrophoneAGCEnabled(38L), + ImageRotation(39L), + ImageFlipHorizontal(40L), + ImageFlipVertical(41L), + LocalVideoRecordingEnabled(42L), + LocalSnapshotRecordingEnabled(43L), + StatusLightEnabled(44L), + StatusLightBrightness(45L), + DepthSensorStatus(46L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event { + VideoStreamChanged(0L), + AudioStreamChanged(1L), + SnapshotStreamChanged(2L),; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + AudioStreamAllocate(0L), + AudioStreamDeallocate(2L), + VideoStreamAllocate(3L), + VideoStreamModify(5L), + VideoStreamDeallocate(6L), + SnapshotStreamAllocate(7L), + SnapshotStreamDeallocate(9L), + SetStreamPriorities(10L), + CaptureSnapshot(11L), + SetViewport(13L), + SetImageRotation(14L), + SetImageFlipHorizontal(15L), + SetImageFlipVertical(16L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum AudioStreamAllocateCommandField {StreamType(0),AudioCodec(1),ChannelCount(2),SampleRate(3),BitRate(4),BitDepth(5),; private final int id; - EndSessionCommandField(int id) { + AudioStreamAllocateCommandField(int id) { this.id = id; } public int getID() { return id; } - public static EndSessionCommandField value(int id) throws NoSuchFieldError { - for (EndSessionCommandField field : EndSessionCommandField.values()) { + public static AudioStreamAllocateCommandField value(int id) throws NoSuchFieldError { + for (AudioStreamAllocateCommandField field : AudioStreamAllocateCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum AudioStreamDeallocateCommandField {AudioStreamID(0),; + private final int id; + AudioStreamDeallocateCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static AudioStreamDeallocateCommandField value(int id) throws NoSuchFieldError { + for (AudioStreamDeallocateCommandField field : AudioStreamDeallocateCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum VideoStreamAllocateCommandField {StreamType(0),VideoCodec(1),MinFrameRate(2),MaxFrameRate(3),MinResolution(4),MaxResolution(5),MinBitRate(6),MaxBitRate(7),MinFragmentLen(8),MaxFragmentLen(9),WatermarkEnabled(10),OSDEnabled(11),; + private final int id; + VideoStreamAllocateCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static VideoStreamAllocateCommandField value(int id) throws NoSuchFieldError { + for (VideoStreamAllocateCommandField field : VideoStreamAllocateCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum VideoStreamModifyCommandField {VideoStreamID(0),Resolution(1),WatermarkEnabled(2),OSDEnabled(3),; + private final int id; + VideoStreamModifyCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static VideoStreamModifyCommandField value(int id) throws NoSuchFieldError { + for (VideoStreamModifyCommandField field : VideoStreamModifyCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum VideoStreamDeallocateCommandField {VideoStreamID(0),; + private final int id; + VideoStreamDeallocateCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static VideoStreamDeallocateCommandField value(int id) throws NoSuchFieldError { + for (VideoStreamDeallocateCommandField field : VideoStreamDeallocateCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum SnapshotStreamAllocateCommandField {ImageCodec(0),FrameRate(1),BitRate(2),MinResolution(3),MaxResolution(4),Quality(5),; + private final int id; + SnapshotStreamAllocateCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SnapshotStreamAllocateCommandField value(int id) throws NoSuchFieldError { + for (SnapshotStreamAllocateCommandField field : SnapshotStreamAllocateCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum SnapshotStreamDeallocateCommandField {SnapshotStreamID(0),; + private final int id; + SnapshotStreamDeallocateCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SnapshotStreamDeallocateCommandField value(int id) throws NoSuchFieldError { + for (SnapshotStreamDeallocateCommandField field : SnapshotStreamDeallocateCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum SetStreamPrioritiesCommandField {StreamPriorities(0),; + private final int id; + SetStreamPrioritiesCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SetStreamPrioritiesCommandField value(int id) throws NoSuchFieldError { + for (SetStreamPrioritiesCommandField field : SetStreamPrioritiesCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum CaptureSnapshotCommandField {SnapshotStreamID(0),RequestedResolution(1),; + private final int id; + CaptureSnapshotCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static CaptureSnapshotCommandField value(int id) throws NoSuchFieldError { + for (CaptureSnapshotCommandField field : CaptureSnapshotCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum SetViewportCommandField {Viewport(0),; + private final int id; + SetViewportCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SetViewportCommandField value(int id) throws NoSuchFieldError { + for (SetViewportCommandField field : SetViewportCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum SetImageRotationCommandField {Angle(0),; + private final int id; + SetImageRotationCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SetImageRotationCommandField value(int id) throws NoSuchFieldError { + for (SetImageRotationCommandField field : SetImageRotationCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum SetImageFlipHorizontalCommandField {Enabled(0),; + private final int id; + SetImageFlipHorizontalCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SetImageFlipHorizontalCommandField value(int id) throws NoSuchFieldError { + for (SetImageFlipHorizontalCommandField field : SetImageFlipHorizontalCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum SetImageFlipVerticalCommandField {Enabled(0),; + private final int id; + SetImageFlipVerticalCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SetImageFlipVerticalCommandField value(int id) throws NoSuchFieldError { + for (SetImageFlipVerticalCommandField field : SetImageFlipVerticalCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class WebRTCTransportProvider implements BaseCluster { + public static final long ID = 1363L; + public long getID() { + return ID; + } + + public enum Attribute { + CurrentSessions(0L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event {; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + SolicitOffer(1L), + ProvideOffer(3L), + ProvideAnswer(5L), + ProvideICECandidate(6L), + EndSession(7L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum SolicitOfferCommandField {StreamType(0),VideoStreamID(1),AudioStreamID(2),ICEServers(3),ICETransportPolicy(4),MetadataOptions(5),; + private final int id; + SolicitOfferCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SolicitOfferCommandField value(int id) throws NoSuchFieldError { + for (SolicitOfferCommandField field : SolicitOfferCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum ProvideOfferCommandField {WebRTCSessionID(0),Sdp(1),StreamType(2),VideoStreamID(3),AudioStreamID(4),ICEServers(5),ICETransportPolicy(6),MetadataOptions(7),; + private final int id; + ProvideOfferCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ProvideOfferCommandField value(int id) throws NoSuchFieldError { + for (ProvideOfferCommandField field : ProvideOfferCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum ProvideAnswerCommandField {WebRTCSessionID(0),Sdp(1),; + private final int id; + ProvideAnswerCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ProvideAnswerCommandField value(int id) throws NoSuchFieldError { + for (ProvideAnswerCommandField field : ProvideAnswerCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum ProvideICECandidateCommandField {WebRTCSessionID(0),ICECandidate(1),; + private final int id; + ProvideICECandidateCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ProvideICECandidateCommandField value(int id) throws NoSuchFieldError { + for (ProvideICECandidateCommandField field : ProvideICECandidateCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum EndSessionCommandField {WebRTCSessionID(0),Reason(1),; + private final int id; + EndSessionCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static EndSessionCommandField value(int id) throws NoSuchFieldError { + for (EndSessionCommandField field : EndSessionCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class WebRTCTransportRequestor implements BaseCluster { + public static final long ID = 1364L; + public long getID() { + return ID; + } + + public enum Attribute { + CurrentSessions(0L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event {; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + Offer(1L), + Answer(2L), + ICECandidate(3L), + End(4L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum OfferCommandField {WebRTCSessionID(0),Sdp(1),ICEServers(2),ICETransportPolicy(3),; + private final int id; + OfferCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static OfferCommandField value(int id) throws NoSuchFieldError { + for (OfferCommandField field : OfferCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum AnswerCommandField {WebRTCSessionID(0),Sdp(1),; + private final int id; + AnswerCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static AnswerCommandField value(int id) throws NoSuchFieldError { + for (AnswerCommandField field : AnswerCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum ICECandidateCommandField {WebRTCSessionID(0),ICECandidate(1),; + private final int id; + ICECandidateCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ICECandidateCommandField value(int id) throws NoSuchFieldError { + for (ICECandidateCommandField field : ICECandidateCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum EndCommandField {WebRTCSessionID(0),Reason(1),; + private final int id; + EndCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static EndCommandField value(int id) throws NoSuchFieldError { + for (EndCommandField field : EndCommandField.values()) { if (field.getID() == id) { return field; } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index 295ada1c57..d0e83258a3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -11742,48 +11742,6 @@ public void onError(Exception ex) { } } - public static class DelegatedEnergyEvseModeClusterStartUpModeAttributeCallback implements ChipClusters.EnergyEvseModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(@Nullable Integer value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedEnergyEvseModeClusterOnModeAttributeCallback implements ChipClusters.EnergyEvseModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(@Nullable Integer value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - public static class DelegatedEnergyEvseModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.EnergyEvseModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -11913,48 +11871,6 @@ public void onError(Exception ex) { } } - public static class DelegatedWaterHeaterModeClusterStartUpModeAttributeCallback implements ChipClusters.WaterHeaterModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(@Nullable Integer value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedWaterHeaterModeClusterOnModeAttributeCallback implements ChipClusters.WaterHeaterModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(@Nullable Integer value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - public static class DelegatedWaterHeaterModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.WaterHeaterModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -12084,48 +12000,6 @@ public void onError(Exception ex) { } } - public static class DelegatedDeviceEnergyManagementModeClusterStartUpModeAttributeCallback implements ChipClusters.DeviceEnergyManagementModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(@Nullable Integer value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedDeviceEnergyManagementModeClusterOnModeAttributeCallback implements ChipClusters.DeviceEnergyManagementModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(@Nullable Integer value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - public static class DelegatedDeviceEnergyManagementModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.DeviceEnergyManagementModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -19995,7 +19869,7 @@ public void onError(Exception ex) { } - public static class DelegatedWebRTCTransportProviderClusterSolicitOfferResponseCallback implements ChipClusters.WebRTCTransportProviderCluster.SolicitOfferResponseCallback, DelegatedClusterCallback { + public static class DelegatedZoneManagementClusterCreateTwoDCartesianZoneResponseCallback implements ChipClusters.ZoneManagementCluster.CreateTwoDCartesianZoneResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20003,17 +19877,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer webRTCSessionID, Boolean deferredOffer, @Nullable Optional videoStreamID, @Nullable Optional audioStreamID) { + public void onSuccess(Integer zoneID) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo webRTCSessionIDResponseValue = new CommandResponseInfo("webRTCSessionID", "Integer"); - responseValues.put(webRTCSessionIDResponseValue, webRTCSessionID); - CommandResponseInfo deferredOfferResponseValue = new CommandResponseInfo("deferredOffer", "Boolean"); - responseValues.put(deferredOfferResponseValue, deferredOffer); - CommandResponseInfo videoStreamIDResponseValue = new CommandResponseInfo("videoStreamID", "Optional"); - responseValues.put(videoStreamIDResponseValue, videoStreamID); - CommandResponseInfo audioStreamIDResponseValue = new CommandResponseInfo("audioStreamID", "Optional"); - responseValues.put(audioStreamIDResponseValue, audioStreamID); + CommandResponseInfo zoneIDResponseValue = new CommandResponseInfo("zoneID", "Integer"); + responseValues.put(zoneIDResponseValue, zoneID); callback.onSuccess(responseValues); } @@ -20023,7 +19891,7 @@ public void onError(Exception error) { } } - public static class DelegatedWebRTCTransportProviderClusterProvideOfferResponseCallback implements ChipClusters.WebRTCTransportProviderCluster.ProvideOfferResponseCallback, DelegatedClusterCallback { + public static class DelegatedZoneManagementClusterGetTwoDCartesianZoneResponseCallback implements ChipClusters.ZoneManagementCluster.GetTwoDCartesianZoneResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20031,15 +19899,12 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer webRTCSessionID, Integer videoStreamID, Integer audioStreamID) { + public void onSuccess(ArrayList zones) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo webRTCSessionIDResponseValue = new CommandResponseInfo("webRTCSessionID", "Integer"); - responseValues.put(webRTCSessionIDResponseValue, webRTCSessionID); - CommandResponseInfo videoStreamIDResponseValue = new CommandResponseInfo("videoStreamID", "Integer"); - responseValues.put(videoStreamIDResponseValue, videoStreamID); - CommandResponseInfo audioStreamIDResponseValue = new CommandResponseInfo("audioStreamID", "Integer"); - responseValues.put(audioStreamIDResponseValue, audioStreamID); + // zones: TwoDCartesianZoneStruct + // Conversion from this type to Java is not properly implemented yet + callback.onSuccess(responseValues); } @@ -20048,7 +19913,7 @@ public void onError(Exception error) { callback.onFailure(error); } } - public static class DelegatedWebRTCTransportProviderClusterCurrentSessionsAttributeCallback implements ChipClusters.WebRTCTransportProviderCluster.CurrentSessionsAttributeCallback, DelegatedClusterCallback { + public static class DelegatedZoneManagementClusterSupportedZoneSourcesAttributeCallback implements ChipClusters.ZoneManagementCluster.SupportedZoneSourcesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20056,9 +19921,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -20069,7 +19934,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWebRTCTransportProviderClusterGeneratedCommandListAttributeCallback implements ChipClusters.WebRTCTransportProviderCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedZoneManagementClusterZonesAttributeCallback implements ChipClusters.ZoneManagementCluster.ZonesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20077,9 +19942,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -20090,7 +19955,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWebRTCTransportProviderClusterAcceptedCommandListAttributeCallback implements ChipClusters.WebRTCTransportProviderCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedZoneManagementClusterTimeControlAttributeCallback implements ChipClusters.ZoneManagementCluster.TimeControlAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20098,9 +19963,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -20111,7 +19976,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWebRTCTransportProviderClusterEventListAttributeCallback implements ChipClusters.WebRTCTransportProviderCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedZoneManagementClusterGeneratedCommandListAttributeCallback implements ChipClusters.ZoneManagementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20132,7 +19997,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWebRTCTransportProviderClusterAttributeListAttributeCallback implements ChipClusters.WebRTCTransportProviderCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedZoneManagementClusterAcceptedCommandListAttributeCallback implements ChipClusters.ZoneManagementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20153,7 +20018,7 @@ public void onError(Exception ex) { } } - public static class DelegatedChimeClusterInstalledChimeSoundsAttributeCallback implements ChipClusters.ChimeCluster.InstalledChimeSoundsAttributeCallback, DelegatedClusterCallback { + public static class DelegatedZoneManagementClusterEventListAttributeCallback implements ChipClusters.ZoneManagementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20161,9 +20026,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -20174,7 +20039,7 @@ public void onError(Exception ex) { } } - public static class DelegatedChimeClusterGeneratedCommandListAttributeCallback implements ChipClusters.ChimeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedZoneManagementClusterAttributeListAttributeCallback implements ChipClusters.ZoneManagementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20195,7 +20060,8 @@ public void onError(Exception ex) { } } - public static class DelegatedChimeClusterAcceptedCommandListAttributeCallback implements ChipClusters.ChimeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedCameraAvStreamManagementClusterAudioStreamAllocateResponseCallback implements ChipClusters.CameraAvStreamManagementCluster.AudioStreamAllocateResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20203,20 +20069,21 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer audioStreamID) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo audioStreamIDResponseValue = new CommandResponseInfo("audioStreamID", "Integer"); + responseValues.put(audioStreamIDResponseValue, audioStreamID); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedChimeClusterEventListAttributeCallback implements ChipClusters.ChimeCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCameraAvStreamManagementClusterVideoStreamAllocateResponseCallback implements ChipClusters.CameraAvStreamManagementCluster.VideoStreamAllocateResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20224,20 +20091,21 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer videoStreamID) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo videoStreamIDResponseValue = new CommandResponseInfo("videoStreamID", "Integer"); + responseValues.put(videoStreamIDResponseValue, videoStreamID); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedChimeClusterAttributeListAttributeCallback implements ChipClusters.ChimeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCameraAvStreamManagementClusterSnapshotStreamAllocateResponseCallback implements ChipClusters.CameraAvStreamManagementCluster.SnapshotStreamAllocateResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20245,20 +20113,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(Integer snapshotStreamID) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + + CommandResponseInfo snapshotStreamIDResponseValue = new CommandResponseInfo("snapshotStreamID", "Integer"); + responseValues.put(snapshotStreamIDResponseValue, snapshotStreamID); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedEcosystemInformationClusterDeviceDirectoryAttributeCallback implements ChipClusters.EcosystemInformationCluster.DeviceDirectoryAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCameraAvStreamManagementClusterVideoSensorParamsAttributeCallback implements ChipClusters.CameraAvStreamManagementCluster.VideoSensorParamsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20266,10 +20134,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(ChipStructs.CameraAvStreamManagementClusterVideoSensorParamsStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.CameraAvStreamManagementClusterVideoSensorParamsStruct"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -20279,7 +20147,7 @@ public void onError(Exception ex) { } } - public static class DelegatedEcosystemInformationClusterLocationDirectoryAttributeCallback implements ChipClusters.EcosystemInformationCluster.LocationDirectoryAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCameraAvStreamManagementClusterMinViewportAttributeCallback implements ChipClusters.CameraAvStreamManagementCluster.MinViewportAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20287,10 +20155,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -20300,7 +20168,7 @@ public void onError(Exception ex) { } } - public static class DelegatedEcosystemInformationClusterGeneratedCommandListAttributeCallback implements ChipClusters.EcosystemInformationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCameraAvStreamManagementClusterRateDistortionTradeOffPointsAttributeCallback implements ChipClusters.CameraAvStreamManagementCluster.RateDistortionTradeOffPointsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20308,9 +20176,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -20321,7 +20189,7 @@ public void onError(Exception ex) { } } - public static class DelegatedEcosystemInformationClusterAcceptedCommandListAttributeCallback implements ChipClusters.EcosystemInformationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCameraAvStreamManagementClusterMicrophoneCapabilitiesAttributeCallback implements ChipClusters.CameraAvStreamManagementCluster.MicrophoneCapabilitiesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20329,10 +20197,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(ChipStructs.CameraAvStreamManagementClusterAudioCapabilitiesStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.CameraAvStreamManagementClusterAudioCapabilitiesStruct"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -20342,7 +20210,7 @@ public void onError(Exception ex) { } } - public static class DelegatedEcosystemInformationClusterEventListAttributeCallback implements ChipClusters.EcosystemInformationCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCameraAvStreamManagementClusterSpeakerCapabilitiesAttributeCallback implements ChipClusters.CameraAvStreamManagementCluster.SpeakerCapabilitiesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20350,10 +20218,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(ChipStructs.CameraAvStreamManagementClusterAudioCapabilitiesStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.CameraAvStreamManagementClusterAudioCapabilitiesStruct"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -20363,7 +20231,7 @@ public void onError(Exception ex) { } } - public static class DelegatedEcosystemInformationClusterAttributeListAttributeCallback implements ChipClusters.EcosystemInformationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCameraAvStreamManagementClusterSupportedSnapshotParamsAttributeCallback implements ChipClusters.CameraAvStreamManagementCluster.SupportedSnapshotParamsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20371,9 +20239,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -20384,8 +20252,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedCommissionerControlClusterReverseOpenCommissioningWindowCallback implements ChipClusters.CommissionerControlCluster.ReverseOpenCommissioningWindowCallback, DelegatedClusterCallback { + public static class DelegatedCameraAvStreamManagementClusterCurrentVideoCodecsAttributeCallback implements ChipClusters.CameraAvStreamManagementCluster.CurrentVideoCodecsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20393,28 +20260,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer commissioningTimeout, byte[] PAKEPasscodeVerifier, Integer discriminator, Long iterations, byte[] salt) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo commissioningTimeoutResponseValue = new CommandResponseInfo("commissioningTimeout", "Integer"); - responseValues.put(commissioningTimeoutResponseValue, commissioningTimeout); - CommandResponseInfo PAKEPasscodeVerifierResponseValue = new CommandResponseInfo("PAKEPasscodeVerifier", "byte[]"); - responseValues.put(PAKEPasscodeVerifierResponseValue, PAKEPasscodeVerifier); - CommandResponseInfo discriminatorResponseValue = new CommandResponseInfo("discriminator", "Integer"); - responseValues.put(discriminatorResponseValue, discriminator); - CommandResponseInfo iterationsResponseValue = new CommandResponseInfo("iterations", "Long"); - responseValues.put(iterationsResponseValue, iterations); - CommandResponseInfo saltResponseValue = new CommandResponseInfo("salt", "byte[]"); - responseValues.put(saltResponseValue, salt); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedCommissionerControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.CommissionerControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedCameraAvStreamManagementClusterCurrentSnapshotConfigAttributeCallback implements ChipClusters.CameraAvStreamManagementCluster.CurrentSnapshotConfigAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20422,10 +20281,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(ChipStructs.CameraAvStreamManagementClusterSnapshotParamsStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.CameraAvStreamManagementClusterSnapshotParamsStruct"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -20435,7 +20294,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCommissionerControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.CommissionerControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCameraAvStreamManagementClusterFabricsUsingCameraAttributeCallback implements ChipClusters.CameraAvStreamManagementCluster.FabricsUsingCameraAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20443,9 +20302,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -20456,7 +20315,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCommissionerControlClusterEventListAttributeCallback implements ChipClusters.CommissionerControlCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCameraAvStreamManagementClusterAllocatedVideoStreamsAttributeCallback implements ChipClusters.CameraAvStreamManagementCluster.AllocatedVideoStreamsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20464,9 +20323,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -20477,7 +20336,7 @@ public void onError(Exception ex) { } } - public static class DelegatedCommissionerControlClusterAttributeListAttributeCallback implements ChipClusters.CommissionerControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCameraAvStreamManagementClusterAllocatedAudioStreamsAttributeCallback implements ChipClusters.CameraAvStreamManagementCluster.AllocatedAudioStreamsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20485,9 +20344,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -20498,8 +20357,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedUnitTestingClusterTestSpecificResponseCallback implements ChipClusters.UnitTestingCluster.TestSpecificResponseCallback, DelegatedClusterCallback { + public static class DelegatedCameraAvStreamManagementClusterAllocatedSnapshotStreamsAttributeCallback implements ChipClusters.CameraAvStreamManagementCluster.AllocatedSnapshotStreamsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20507,21 +20365,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer returnValue) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo returnValueResponseValue = new CommandResponseInfo("returnValue", "Integer"); - responseValues.put(returnValueResponseValue, returnValue); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedUnitTestingClusterTestAddArgumentsResponseCallback implements ChipClusters.UnitTestingCluster.TestAddArgumentsResponseCallback, DelegatedClusterCallback { + public static class DelegatedCameraAvStreamManagementClusterRankedVideoStreamPrioritiesListAttributeCallback implements ChipClusters.CameraAvStreamManagementCluster.RankedVideoStreamPrioritiesListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20529,21 +20386,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer returnValue) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo returnValueResponseValue = new CommandResponseInfo("returnValue", "Integer"); - responseValues.put(returnValueResponseValue, returnValue); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedUnitTestingClusterTestSimpleArgumentResponseCallback implements ChipClusters.UnitTestingCluster.TestSimpleArgumentResponseCallback, DelegatedClusterCallback { + public static class DelegatedCameraAvStreamManagementClusterViewportAttributeCallback implements ChipClusters.CameraAvStreamManagementCluster.ViewportAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20551,21 +20407,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Boolean returnValue) { + public void onSuccess(ChipStructs.CameraAvStreamManagementClusterViewportStruct value) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo returnValueResponseValue = new CommandResponseInfo("returnValue", "Boolean"); - responseValues.put(returnValueResponseValue, returnValue); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.CameraAvStreamManagementClusterViewportStruct"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedUnitTestingClusterTestStructArrayArgumentResponseCallback implements ChipClusters.UnitTestingCluster.TestStructArrayArgumentResponseCallback, DelegatedClusterCallback { + public static class DelegatedCameraAvStreamManagementClusterGeneratedCommandListAttributeCallback implements ChipClusters.CameraAvStreamManagementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20573,35 +20428,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ArrayList arg1, ArrayList arg2, ArrayList arg3, ArrayList arg4, Integer arg5, Boolean arg6) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - // arg1: NestedStructList - // Conversion from this type to Java is not properly implemented yet - - // arg2: SimpleStruct - // Conversion from this type to Java is not properly implemented yet - - // arg3: SimpleEnum - // Conversion from this type to Java is not properly implemented yet - - // arg4: boolean - // Conversion from this type to Java is not properly implemented yet - - CommandResponseInfo arg5ResponseValue = new CommandResponseInfo("arg5", "Integer"); - responseValues.put(arg5ResponseValue, arg5); - CommandResponseInfo arg6ResponseValue = new CommandResponseInfo("arg6", "Boolean"); - responseValues.put(arg6ResponseValue, arg6); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedUnitTestingClusterBooleanResponseCallback implements ChipClusters.UnitTestingCluster.BooleanResponseCallback, DelegatedClusterCallback { + public static class DelegatedCameraAvStreamManagementClusterAcceptedCommandListAttributeCallback implements ChipClusters.CameraAvStreamManagementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20609,21 +20449,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Boolean value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo valueResponseValue = new CommandResponseInfo("value", "Boolean"); - responseValues.put(valueResponseValue, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedUnitTestingClusterTestListInt8UReverseResponseCallback implements ChipClusters.UnitTestingCluster.TestListInt8UReverseResponseCallback, DelegatedClusterCallback { + public static class DelegatedCameraAvStreamManagementClusterEventListAttributeCallback implements ChipClusters.CameraAvStreamManagementCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20631,22 +20470,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ArrayList arg1) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - // arg1: int8u - // Conversion from this type to Java is not properly implemented yet - + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedUnitTestingClusterTestEnumsResponseCallback implements ChipClusters.UnitTestingCluster.TestEnumsResponseCallback, DelegatedClusterCallback { + public static class DelegatedCameraAvStreamManagementClusterAttributeListAttributeCallback implements ChipClusters.CameraAvStreamManagementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20654,23 +20491,21 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer arg1, Integer arg2) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo arg1ResponseValue = new CommandResponseInfo("arg1", "Integer"); - responseValues.put(arg1ResponseValue, arg1); - CommandResponseInfo arg2ResponseValue = new CommandResponseInfo("arg2", "Integer"); - responseValues.put(arg2ResponseValue, arg2); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedUnitTestingClusterTestNullableOptionalResponseCallback implements ChipClusters.UnitTestingCluster.TestNullableOptionalResponseCallback, DelegatedClusterCallback { + + public static class DelegatedWebRTCTransportProviderClusterSolicitOfferResponseCallback implements ChipClusters.WebRTCTransportProviderCluster.SolicitOfferResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20678,17 +20513,17 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Boolean wasPresent, Optional wasNull, Optional value, @Nullable Optional originalValue) { + public void onSuccess(Integer webRTCSessionID, Boolean deferredOffer, @Nullable Optional videoStreamID, @Nullable Optional audioStreamID) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo wasPresentResponseValue = new CommandResponseInfo("wasPresent", "Boolean"); - responseValues.put(wasPresentResponseValue, wasPresent); - CommandResponseInfo wasNullResponseValue = new CommandResponseInfo("wasNull", "Optional"); - responseValues.put(wasNullResponseValue, wasNull); - CommandResponseInfo valueResponseValue = new CommandResponseInfo("value", "Optional"); - responseValues.put(valueResponseValue, value); - CommandResponseInfo originalValueResponseValue = new CommandResponseInfo("originalValue", "Optional"); - responseValues.put(originalValueResponseValue, originalValue); + CommandResponseInfo webRTCSessionIDResponseValue = new CommandResponseInfo("webRTCSessionID", "Integer"); + responseValues.put(webRTCSessionIDResponseValue, webRTCSessionID); + CommandResponseInfo deferredOfferResponseValue = new CommandResponseInfo("deferredOffer", "Boolean"); + responseValues.put(deferredOfferResponseValue, deferredOffer); + CommandResponseInfo videoStreamIDResponseValue = new CommandResponseInfo("videoStreamID", "Optional"); + responseValues.put(videoStreamIDResponseValue, videoStreamID); + CommandResponseInfo audioStreamIDResponseValue = new CommandResponseInfo("audioStreamID", "Optional"); + responseValues.put(audioStreamIDResponseValue, audioStreamID); callback.onSuccess(responseValues); } @@ -20698,7 +20533,7 @@ public void onError(Exception error) { } } - public static class DelegatedUnitTestingClusterTestComplexNullableOptionalResponseCallback implements ChipClusters.UnitTestingCluster.TestComplexNullableOptionalResponseCallback, DelegatedClusterCallback { + public static class DelegatedWebRTCTransportProviderClusterProvideOfferResponseCallback implements ChipClusters.WebRTCTransportProviderCluster.ProvideOfferResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20706,68 +20541,15 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Boolean nullableIntWasNull, Optional nullableIntValue, Boolean optionalIntWasPresent, Optional optionalIntValue, Boolean nullableOptionalIntWasPresent, Optional nullableOptionalIntWasNull, Optional nullableOptionalIntValue, Boolean nullableStringWasNull, Optional nullableStringValue, Boolean optionalStringWasPresent, Optional optionalStringValue, Boolean nullableOptionalStringWasPresent, Optional nullableOptionalStringWasNull, Optional nullableOptionalStringValue, Boolean nullableStructWasNull, Optional nullableStructValue, Boolean optionalStructWasPresent, Optional optionalStructValue, Boolean nullableOptionalStructWasPresent, Optional nullableOptionalStructWasNull, Optional nullableOptionalStructValue, Boolean nullableListWasNull, Optional> nullableListValue, Boolean optionalListWasPresent, Optional> optionalListValue, Boolean nullableOptionalListWasPresent, Optional nullableOptionalListWasNull, Optional> nullableOptionalListValue) { + public void onSuccess(Integer webRTCSessionID, Integer videoStreamID, Integer audioStreamID) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo nullableIntWasNullResponseValue = new CommandResponseInfo("nullableIntWasNull", "Boolean"); - responseValues.put(nullableIntWasNullResponseValue, nullableIntWasNull); - CommandResponseInfo nullableIntValueResponseValue = new CommandResponseInfo("nullableIntValue", "Optional"); - responseValues.put(nullableIntValueResponseValue, nullableIntValue); - CommandResponseInfo optionalIntWasPresentResponseValue = new CommandResponseInfo("optionalIntWasPresent", "Boolean"); - responseValues.put(optionalIntWasPresentResponseValue, optionalIntWasPresent); - CommandResponseInfo optionalIntValueResponseValue = new CommandResponseInfo("optionalIntValue", "Optional"); - responseValues.put(optionalIntValueResponseValue, optionalIntValue); - CommandResponseInfo nullableOptionalIntWasPresentResponseValue = new CommandResponseInfo("nullableOptionalIntWasPresent", "Boolean"); - responseValues.put(nullableOptionalIntWasPresentResponseValue, nullableOptionalIntWasPresent); - CommandResponseInfo nullableOptionalIntWasNullResponseValue = new CommandResponseInfo("nullableOptionalIntWasNull", "Optional"); - responseValues.put(nullableOptionalIntWasNullResponseValue, nullableOptionalIntWasNull); - CommandResponseInfo nullableOptionalIntValueResponseValue = new CommandResponseInfo("nullableOptionalIntValue", "Optional"); - responseValues.put(nullableOptionalIntValueResponseValue, nullableOptionalIntValue); - CommandResponseInfo nullableStringWasNullResponseValue = new CommandResponseInfo("nullableStringWasNull", "Boolean"); - responseValues.put(nullableStringWasNullResponseValue, nullableStringWasNull); - CommandResponseInfo nullableStringValueResponseValue = new CommandResponseInfo("nullableStringValue", "Optional"); - responseValues.put(nullableStringValueResponseValue, nullableStringValue); - CommandResponseInfo optionalStringWasPresentResponseValue = new CommandResponseInfo("optionalStringWasPresent", "Boolean"); - responseValues.put(optionalStringWasPresentResponseValue, optionalStringWasPresent); - CommandResponseInfo optionalStringValueResponseValue = new CommandResponseInfo("optionalStringValue", "Optional"); - responseValues.put(optionalStringValueResponseValue, optionalStringValue); - CommandResponseInfo nullableOptionalStringWasPresentResponseValue = new CommandResponseInfo("nullableOptionalStringWasPresent", "Boolean"); - responseValues.put(nullableOptionalStringWasPresentResponseValue, nullableOptionalStringWasPresent); - CommandResponseInfo nullableOptionalStringWasNullResponseValue = new CommandResponseInfo("nullableOptionalStringWasNull", "Optional"); - responseValues.put(nullableOptionalStringWasNullResponseValue, nullableOptionalStringWasNull); - CommandResponseInfo nullableOptionalStringValueResponseValue = new CommandResponseInfo("nullableOptionalStringValue", "Optional"); - responseValues.put(nullableOptionalStringValueResponseValue, nullableOptionalStringValue); - CommandResponseInfo nullableStructWasNullResponseValue = new CommandResponseInfo("nullableStructWasNull", "Boolean"); - responseValues.put(nullableStructWasNullResponseValue, nullableStructWasNull); - // nullableStructValue: Struct SimpleStruct - // Conversion from this type to Java is not properly implemented yet - CommandResponseInfo optionalStructWasPresentResponseValue = new CommandResponseInfo("optionalStructWasPresent", "Boolean"); - responseValues.put(optionalStructWasPresentResponseValue, optionalStructWasPresent); - // optionalStructValue: Struct SimpleStruct - // Conversion from this type to Java is not properly implemented yet - CommandResponseInfo nullableOptionalStructWasPresentResponseValue = new CommandResponseInfo("nullableOptionalStructWasPresent", "Boolean"); - responseValues.put(nullableOptionalStructWasPresentResponseValue, nullableOptionalStructWasPresent); - CommandResponseInfo nullableOptionalStructWasNullResponseValue = new CommandResponseInfo("nullableOptionalStructWasNull", "Optional"); - responseValues.put(nullableOptionalStructWasNullResponseValue, nullableOptionalStructWasNull); - // nullableOptionalStructValue: Struct SimpleStruct - // Conversion from this type to Java is not properly implemented yet - CommandResponseInfo nullableListWasNullResponseValue = new CommandResponseInfo("nullableListWasNull", "Boolean"); - responseValues.put(nullableListWasNullResponseValue, nullableListWasNull); - // nullableListValue: SimpleEnum - // Conversion from this type to Java is not properly implemented yet - - CommandResponseInfo optionalListWasPresentResponseValue = new CommandResponseInfo("optionalListWasPresent", "Boolean"); - responseValues.put(optionalListWasPresentResponseValue, optionalListWasPresent); - // optionalListValue: SimpleEnum - // Conversion from this type to Java is not properly implemented yet - - CommandResponseInfo nullableOptionalListWasPresentResponseValue = new CommandResponseInfo("nullableOptionalListWasPresent", "Boolean"); - responseValues.put(nullableOptionalListWasPresentResponseValue, nullableOptionalListWasPresent); - CommandResponseInfo nullableOptionalListWasNullResponseValue = new CommandResponseInfo("nullableOptionalListWasNull", "Optional"); - responseValues.put(nullableOptionalListWasNullResponseValue, nullableOptionalListWasNull); - // nullableOptionalListValue: SimpleEnum - // Conversion from this type to Java is not properly implemented yet - + CommandResponseInfo webRTCSessionIDResponseValue = new CommandResponseInfo("webRTCSessionID", "Integer"); + responseValues.put(webRTCSessionIDResponseValue, webRTCSessionID); + CommandResponseInfo videoStreamIDResponseValue = new CommandResponseInfo("videoStreamID", "Integer"); + responseValues.put(videoStreamIDResponseValue, videoStreamID); + CommandResponseInfo audioStreamIDResponseValue = new CommandResponseInfo("audioStreamID", "Integer"); + responseValues.put(audioStreamIDResponseValue, audioStreamID); callback.onSuccess(responseValues); } @@ -20776,8 +20558,7 @@ public void onError(Exception error) { callback.onFailure(error); } } - - public static class DelegatedUnitTestingClusterSimpleStructResponseCallback implements ChipClusters.UnitTestingCluster.SimpleStructResponseCallback, DelegatedClusterCallback { + public static class DelegatedWebRTCTransportProviderClusterCurrentSessionsAttributeCallback implements ChipClusters.WebRTCTransportProviderCluster.CurrentSessionsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20785,21 +20566,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.UnitTestingClusterSimpleStruct arg1) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - // arg1: Struct SimpleStruct - // Conversion from this type to Java is not properly implemented yet + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedUnitTestingClusterTestEmitTestEventResponseCallback implements ChipClusters.UnitTestingCluster.TestEmitTestEventResponseCallback, DelegatedClusterCallback { + public static class DelegatedWebRTCTransportProviderClusterGeneratedCommandListAttributeCallback implements ChipClusters.WebRTCTransportProviderCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20807,21 +20587,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo valueResponseValue = new CommandResponseInfo("value", "Long"); - responseValues.put(valueResponseValue, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback implements ChipClusters.UnitTestingCluster.TestEmitTestFabricScopedEventResponseCallback, DelegatedClusterCallback { + public static class DelegatedWebRTCTransportProviderClusterAcceptedCommandListAttributeCallback implements ChipClusters.WebRTCTransportProviderCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20829,21 +20608,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo valueResponseValue = new CommandResponseInfo("value", "Long"); - responseValues.put(valueResponseValue, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedUnitTestingClusterTestBatchHelperResponseCallback implements ChipClusters.UnitTestingCluster.TestBatchHelperResponseCallback, DelegatedClusterCallback { + public static class DelegatedWebRTCTransportProviderClusterEventListAttributeCallback implements ChipClusters.WebRTCTransportProviderCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20851,21 +20629,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(byte[] buffer) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo bufferResponseValue = new CommandResponseInfo("buffer", "byte[]"); - responseValues.put(bufferResponseValue, buffer); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedUnitTestingClusterStringEchoResponseCallback implements ChipClusters.UnitTestingCluster.StringEchoResponseCallback, DelegatedClusterCallback { + public static class DelegatedWebRTCTransportProviderClusterAttributeListAttributeCallback implements ChipClusters.WebRTCTransportProviderCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20873,21 +20650,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(byte[] payload) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo payloadResponseValue = new CommandResponseInfo("payload", "byte[]"); - responseValues.put(payloadResponseValue, payload); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedUnitTestingClusterGlobalEchoResponseCallback implements ChipClusters.UnitTestingCluster.GlobalEchoResponseCallback, DelegatedClusterCallback { + public static class DelegatedWebRTCTransportRequestorClusterCurrentSessionsAttributeCallback implements ChipClusters.WebRTCTransportRequestorCluster.CurrentSessionsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20895,23 +20671,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.UnitTestingClusterTestGlobalStruct field1, Integer field2) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - // field1: Struct TestGlobalStruct - // Conversion from this type to Java is not properly implemented yet - CommandResponseInfo field2ResponseValue = new CommandResponseInfo("field2", "Integer"); - responseValues.put(field2ResponseValue, field2); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedUnitTestingClusterTestDifferentVendorMeiResponseCallback implements ChipClusters.UnitTestingCluster.TestDifferentVendorMeiResponseCallback, DelegatedClusterCallback { + public static class DelegatedWebRTCTransportRequestorClusterGeneratedCommandListAttributeCallback implements ChipClusters.WebRTCTransportRequestorCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20919,22 +20692,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer arg1, Long eventNumber) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo arg1ResponseValue = new CommandResponseInfo("arg1", "Integer"); - responseValues.put(arg1ResponseValue, arg1); - CommandResponseInfo eventNumberResponseValue = new CommandResponseInfo("eventNumber", "Long"); - responseValues.put(eventNumberResponseValue, eventNumber); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedUnitTestingClusterListInt8uAttributeCallback implements ChipClusters.UnitTestingCluster.ListInt8uAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedWebRTCTransportRequestorClusterAcceptedCommandListAttributeCallback implements ChipClusters.WebRTCTransportRequestorCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20942,9 +20713,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -20955,7 +20726,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterListOctetStringAttributeCallback implements ChipClusters.UnitTestingCluster.ListOctetStringAttributeCallback, DelegatedClusterCallback { + public static class DelegatedWebRTCTransportRequestorClusterEventListAttributeCallback implements ChipClusters.WebRTCTransportRequestorCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20963,9 +20734,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -20976,7 +20747,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterListStructOctetStringAttributeCallback implements ChipClusters.UnitTestingCluster.ListStructOctetStringAttributeCallback, DelegatedClusterCallback { + public static class DelegatedWebRTCTransportRequestorClusterAttributeListAttributeCallback implements ChipClusters.WebRTCTransportRequestorCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -20984,9 +20755,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -20997,7 +20768,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterListNullablesAndOptionalsStructAttributeCallback implements ChipClusters.UnitTestingCluster.ListNullablesAndOptionalsStructAttributeCallback, DelegatedClusterCallback { + public static class DelegatedChimeClusterInstalledChimeSoundsAttributeCallback implements ChipClusters.ChimeCluster.InstalledChimeSoundsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21005,9 +20776,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21018,7 +20789,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterStructAttrAttributeCallback implements ChipClusters.UnitTestingCluster.StructAttrAttributeCallback, DelegatedClusterCallback { + public static class DelegatedChimeClusterGeneratedCommandListAttributeCallback implements ChipClusters.ChimeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21026,10 +20797,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.UnitTestingClusterSimpleStruct value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.UnitTestingClusterSimpleStruct"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21039,7 +20810,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterListLongOctetStringAttributeCallback implements ChipClusters.UnitTestingCluster.ListLongOctetStringAttributeCallback, DelegatedClusterCallback { + public static class DelegatedChimeClusterAcceptedCommandListAttributeCallback implements ChipClusters.ChimeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21047,9 +20818,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21060,7 +20831,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterListFabricScopedAttributeCallback implements ChipClusters.UnitTestingCluster.ListFabricScopedAttributeCallback, DelegatedClusterCallback { + public static class DelegatedChimeClusterEventListAttributeCallback implements ChipClusters.ChimeCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21068,9 +20839,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21081,7 +20852,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterGlobalStructAttributeCallback implements ChipClusters.UnitTestingCluster.GlobalStructAttributeCallback, DelegatedClusterCallback { + public static class DelegatedChimeClusterAttributeListAttributeCallback implements ChipClusters.ChimeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21089,10 +20860,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.UnitTestingClusterTestGlobalStruct value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.UnitTestingClusterTestGlobalStruct"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21102,7 +20873,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterNullableBooleanAttributeCallback implements ChipClusters.UnitTestingCluster.NullableBooleanAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEcosystemInformationClusterDeviceDirectoryAttributeCallback implements ChipClusters.EcosystemInformationCluster.DeviceDirectoryAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21110,10 +20881,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Boolean value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Boolean"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21123,7 +20894,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterNullableBitmap8AttributeCallback implements ChipClusters.UnitTestingCluster.NullableBitmap8AttributeCallback, DelegatedClusterCallback { + public static class DelegatedEcosystemInformationClusterLocationDirectoryAttributeCallback implements ChipClusters.EcosystemInformationCluster.LocationDirectoryAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21131,10 +20902,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21144,7 +20915,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterNullableBitmap16AttributeCallback implements ChipClusters.UnitTestingCluster.NullableBitmap16AttributeCallback, DelegatedClusterCallback { + public static class DelegatedEcosystemInformationClusterGeneratedCommandListAttributeCallback implements ChipClusters.EcosystemInformationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21152,10 +20923,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21165,7 +20936,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterNullableBitmap32AttributeCallback implements ChipClusters.UnitTestingCluster.NullableBitmap32AttributeCallback, DelegatedClusterCallback { + public static class DelegatedEcosystemInformationClusterAcceptedCommandListAttributeCallback implements ChipClusters.EcosystemInformationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21173,10 +20944,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21186,7 +20957,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterNullableBitmap64AttributeCallback implements ChipClusters.UnitTestingCluster.NullableBitmap64AttributeCallback, DelegatedClusterCallback { + public static class DelegatedEcosystemInformationClusterEventListAttributeCallback implements ChipClusters.EcosystemInformationCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21194,10 +20965,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21207,7 +20978,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterNullableInt8uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt8uAttributeCallback, DelegatedClusterCallback { + public static class DelegatedEcosystemInformationClusterAttributeListAttributeCallback implements ChipClusters.EcosystemInformationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21215,10 +20986,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21228,7 +20999,8 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterNullableInt16uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt16uAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedCommissionerControlClusterReverseOpenCommissioningWindowCallback implements ChipClusters.CommissionerControlCluster.ReverseOpenCommissioningWindowCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21236,20 +21008,28 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(Integer commissioningTimeout, byte[] PAKEPasscodeVerifier, Integer discriminator, Long iterations, byte[] salt) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo commissioningTimeoutResponseValue = new CommandResponseInfo("commissioningTimeout", "Integer"); + responseValues.put(commissioningTimeoutResponseValue, commissioningTimeout); + CommandResponseInfo PAKEPasscodeVerifierResponseValue = new CommandResponseInfo("PAKEPasscodeVerifier", "byte[]"); + responseValues.put(PAKEPasscodeVerifierResponseValue, PAKEPasscodeVerifier); + CommandResponseInfo discriminatorResponseValue = new CommandResponseInfo("discriminator", "Integer"); + responseValues.put(discriminatorResponseValue, discriminator); + CommandResponseInfo iterationsResponseValue = new CommandResponseInfo("iterations", "Long"); + responseValues.put(iterationsResponseValue, iterations); + CommandResponseInfo saltResponseValue = new CommandResponseInfo("salt", "byte[]"); + responseValues.put(saltResponseValue, salt); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedUnitTestingClusterNullableInt24uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt24uAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCommissionerControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.CommissionerControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21257,10 +21037,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21270,7 +21050,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterNullableInt32uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt32uAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCommissionerControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.CommissionerControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21278,10 +21058,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21291,7 +21071,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterNullableInt40uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt40uAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCommissionerControlClusterEventListAttributeCallback implements ChipClusters.CommissionerControlCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21299,10 +21079,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21312,7 +21092,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterNullableInt48uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt48uAttributeCallback, DelegatedClusterCallback { + public static class DelegatedCommissionerControlClusterAttributeListAttributeCallback implements ChipClusters.CommissionerControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21320,10 +21100,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21333,7 +21113,8 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterNullableInt56uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt56uAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedUnitTestingClusterTestSpecificResponseCallback implements ChipClusters.UnitTestingCluster.TestSpecificResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21341,20 +21122,21 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(Integer returnValue) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo returnValueResponseValue = new CommandResponseInfo("returnValue", "Integer"); + responseValues.put(returnValueResponseValue, returnValue); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedUnitTestingClusterNullableInt64uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt64uAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterTestAddArgumentsResponseCallback implements ChipClusters.UnitTestingCluster.TestAddArgumentsResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21362,20 +21144,21 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(Integer returnValue) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo returnValueResponseValue = new CommandResponseInfo("returnValue", "Integer"); + responseValues.put(returnValueResponseValue, returnValue); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedUnitTestingClusterNullableInt8sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt8sAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterTestSimpleArgumentResponseCallback implements ChipClusters.UnitTestingCluster.TestSimpleArgumentResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21383,20 +21166,21 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(Boolean returnValue) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo returnValueResponseValue = new CommandResponseInfo("returnValue", "Boolean"); + responseValues.put(returnValueResponseValue, returnValue); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedUnitTestingClusterNullableInt16sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt16sAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterTestStructArrayArgumentResponseCallback implements ChipClusters.UnitTestingCluster.TestStructArrayArgumentResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21404,20 +21188,35 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(ArrayList arg1, ArrayList arg2, ArrayList arg3, ArrayList arg4, Integer arg5, Boolean arg6) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + + // arg1: NestedStructList + // Conversion from this type to Java is not properly implemented yet + + // arg2: SimpleStruct + // Conversion from this type to Java is not properly implemented yet + + // arg3: SimpleEnum + // Conversion from this type to Java is not properly implemented yet + + // arg4: boolean + // Conversion from this type to Java is not properly implemented yet + + CommandResponseInfo arg5ResponseValue = new CommandResponseInfo("arg5", "Integer"); + responseValues.put(arg5ResponseValue, arg5); + CommandResponseInfo arg6ResponseValue = new CommandResponseInfo("arg6", "Boolean"); + responseValues.put(arg6ResponseValue, arg6); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedUnitTestingClusterNullableInt24sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt24sAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterBooleanResponseCallback implements ChipClusters.UnitTestingCluster.BooleanResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21425,20 +21224,21 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(Boolean value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo valueResponseValue = new CommandResponseInfo("value", "Boolean"); + responseValues.put(valueResponseValue, value); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } + public void onError(Exception error) { + callback.onFailure(error); + } } - public static class DelegatedUnitTestingClusterNullableInt32sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt32sAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterTestListInt8UReverseResponseCallback implements ChipClusters.UnitTestingCluster.TestListInt8UReverseResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21446,20 +21246,22 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(ArrayList arg1) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + + // arg1: int8u + // Conversion from this type to Java is not properly implemented yet + callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedUnitTestingClusterNullableInt40sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt40sAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterTestEnumsResponseCallback implements ChipClusters.UnitTestingCluster.TestEnumsResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21467,20 +21269,23 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(Integer arg1, Integer arg2) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo arg1ResponseValue = new CommandResponseInfo("arg1", "Integer"); + responseValues.put(arg1ResponseValue, arg1); + CommandResponseInfo arg2ResponseValue = new CommandResponseInfo("arg2", "Integer"); + responseValues.put(arg2ResponseValue, arg2); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedUnitTestingClusterNullableInt48sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt48sAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterTestNullableOptionalResponseCallback implements ChipClusters.UnitTestingCluster.TestNullableOptionalResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21488,20 +21293,27 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(Boolean wasPresent, Optional wasNull, Optional value, @Nullable Optional originalValue) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo wasPresentResponseValue = new CommandResponseInfo("wasPresent", "Boolean"); + responseValues.put(wasPresentResponseValue, wasPresent); + CommandResponseInfo wasNullResponseValue = new CommandResponseInfo("wasNull", "Optional"); + responseValues.put(wasNullResponseValue, wasNull); + CommandResponseInfo valueResponseValue = new CommandResponseInfo("value", "Optional"); + responseValues.put(valueResponseValue, value); + CommandResponseInfo originalValueResponseValue = new CommandResponseInfo("originalValue", "Optional"); + responseValues.put(originalValueResponseValue, originalValue); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedUnitTestingClusterNullableInt56sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt56sAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterTestComplexNullableOptionalResponseCallback implements ChipClusters.UnitTestingCluster.TestComplexNullableOptionalResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21509,20 +21321,78 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(Boolean nullableIntWasNull, Optional nullableIntValue, Boolean optionalIntWasPresent, Optional optionalIntValue, Boolean nullableOptionalIntWasPresent, Optional nullableOptionalIntWasNull, Optional nullableOptionalIntValue, Boolean nullableStringWasNull, Optional nullableStringValue, Boolean optionalStringWasPresent, Optional optionalStringValue, Boolean nullableOptionalStringWasPresent, Optional nullableOptionalStringWasNull, Optional nullableOptionalStringValue, Boolean nullableStructWasNull, Optional nullableStructValue, Boolean optionalStructWasPresent, Optional optionalStructValue, Boolean nullableOptionalStructWasPresent, Optional nullableOptionalStructWasNull, Optional nullableOptionalStructValue, Boolean nullableListWasNull, Optional> nullableListValue, Boolean optionalListWasPresent, Optional> optionalListValue, Boolean nullableOptionalListWasPresent, Optional nullableOptionalListWasNull, Optional> nullableOptionalListValue) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo nullableIntWasNullResponseValue = new CommandResponseInfo("nullableIntWasNull", "Boolean"); + responseValues.put(nullableIntWasNullResponseValue, nullableIntWasNull); + CommandResponseInfo nullableIntValueResponseValue = new CommandResponseInfo("nullableIntValue", "Optional"); + responseValues.put(nullableIntValueResponseValue, nullableIntValue); + CommandResponseInfo optionalIntWasPresentResponseValue = new CommandResponseInfo("optionalIntWasPresent", "Boolean"); + responseValues.put(optionalIntWasPresentResponseValue, optionalIntWasPresent); + CommandResponseInfo optionalIntValueResponseValue = new CommandResponseInfo("optionalIntValue", "Optional"); + responseValues.put(optionalIntValueResponseValue, optionalIntValue); + CommandResponseInfo nullableOptionalIntWasPresentResponseValue = new CommandResponseInfo("nullableOptionalIntWasPresent", "Boolean"); + responseValues.put(nullableOptionalIntWasPresentResponseValue, nullableOptionalIntWasPresent); + CommandResponseInfo nullableOptionalIntWasNullResponseValue = new CommandResponseInfo("nullableOptionalIntWasNull", "Optional"); + responseValues.put(nullableOptionalIntWasNullResponseValue, nullableOptionalIntWasNull); + CommandResponseInfo nullableOptionalIntValueResponseValue = new CommandResponseInfo("nullableOptionalIntValue", "Optional"); + responseValues.put(nullableOptionalIntValueResponseValue, nullableOptionalIntValue); + CommandResponseInfo nullableStringWasNullResponseValue = new CommandResponseInfo("nullableStringWasNull", "Boolean"); + responseValues.put(nullableStringWasNullResponseValue, nullableStringWasNull); + CommandResponseInfo nullableStringValueResponseValue = new CommandResponseInfo("nullableStringValue", "Optional"); + responseValues.put(nullableStringValueResponseValue, nullableStringValue); + CommandResponseInfo optionalStringWasPresentResponseValue = new CommandResponseInfo("optionalStringWasPresent", "Boolean"); + responseValues.put(optionalStringWasPresentResponseValue, optionalStringWasPresent); + CommandResponseInfo optionalStringValueResponseValue = new CommandResponseInfo("optionalStringValue", "Optional"); + responseValues.put(optionalStringValueResponseValue, optionalStringValue); + CommandResponseInfo nullableOptionalStringWasPresentResponseValue = new CommandResponseInfo("nullableOptionalStringWasPresent", "Boolean"); + responseValues.put(nullableOptionalStringWasPresentResponseValue, nullableOptionalStringWasPresent); + CommandResponseInfo nullableOptionalStringWasNullResponseValue = new CommandResponseInfo("nullableOptionalStringWasNull", "Optional"); + responseValues.put(nullableOptionalStringWasNullResponseValue, nullableOptionalStringWasNull); + CommandResponseInfo nullableOptionalStringValueResponseValue = new CommandResponseInfo("nullableOptionalStringValue", "Optional"); + responseValues.put(nullableOptionalStringValueResponseValue, nullableOptionalStringValue); + CommandResponseInfo nullableStructWasNullResponseValue = new CommandResponseInfo("nullableStructWasNull", "Boolean"); + responseValues.put(nullableStructWasNullResponseValue, nullableStructWasNull); + // nullableStructValue: Struct SimpleStruct + // Conversion from this type to Java is not properly implemented yet + CommandResponseInfo optionalStructWasPresentResponseValue = new CommandResponseInfo("optionalStructWasPresent", "Boolean"); + responseValues.put(optionalStructWasPresentResponseValue, optionalStructWasPresent); + // optionalStructValue: Struct SimpleStruct + // Conversion from this type to Java is not properly implemented yet + CommandResponseInfo nullableOptionalStructWasPresentResponseValue = new CommandResponseInfo("nullableOptionalStructWasPresent", "Boolean"); + responseValues.put(nullableOptionalStructWasPresentResponseValue, nullableOptionalStructWasPresent); + CommandResponseInfo nullableOptionalStructWasNullResponseValue = new CommandResponseInfo("nullableOptionalStructWasNull", "Optional"); + responseValues.put(nullableOptionalStructWasNullResponseValue, nullableOptionalStructWasNull); + // nullableOptionalStructValue: Struct SimpleStruct + // Conversion from this type to Java is not properly implemented yet + CommandResponseInfo nullableListWasNullResponseValue = new CommandResponseInfo("nullableListWasNull", "Boolean"); + responseValues.put(nullableListWasNullResponseValue, nullableListWasNull); + // nullableListValue: SimpleEnum + // Conversion from this type to Java is not properly implemented yet + + CommandResponseInfo optionalListWasPresentResponseValue = new CommandResponseInfo("optionalListWasPresent", "Boolean"); + responseValues.put(optionalListWasPresentResponseValue, optionalListWasPresent); + // optionalListValue: SimpleEnum + // Conversion from this type to Java is not properly implemented yet + + CommandResponseInfo nullableOptionalListWasPresentResponseValue = new CommandResponseInfo("nullableOptionalListWasPresent", "Boolean"); + responseValues.put(nullableOptionalListWasPresentResponseValue, nullableOptionalListWasPresent); + CommandResponseInfo nullableOptionalListWasNullResponseValue = new CommandResponseInfo("nullableOptionalListWasNull", "Optional"); + responseValues.put(nullableOptionalListWasNullResponseValue, nullableOptionalListWasNull); + // nullableOptionalListValue: SimpleEnum + // Conversion from this type to Java is not properly implemented yet + callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedUnitTestingClusterNullableInt64sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt64sAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterSimpleStructResponseCallback implements ChipClusters.UnitTestingCluster.SimpleStructResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21530,20 +21400,21 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(ChipStructs.UnitTestingClusterSimpleStruct arg1) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + + // arg1: Struct SimpleStruct + // Conversion from this type to Java is not properly implemented yet callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedUnitTestingClusterNullableEnum8AttributeCallback implements ChipClusters.UnitTestingCluster.NullableEnum8AttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterTestEmitTestEventResponseCallback implements ChipClusters.UnitTestingCluster.TestEmitTestEventResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21551,20 +21422,21 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo valueResponseValue = new CommandResponseInfo("value", "Long"); + responseValues.put(valueResponseValue, value); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedUnitTestingClusterNullableEnum16AttributeCallback implements ChipClusters.UnitTestingCluster.NullableEnum16AttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterTestEmitTestFabricScopedEventResponseCallback implements ChipClusters.UnitTestingCluster.TestEmitTestFabricScopedEventResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21572,20 +21444,21 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo valueResponseValue = new CommandResponseInfo("value", "Long"); + responseValues.put(valueResponseValue, value); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedUnitTestingClusterNullableFloatSingleAttributeCallback implements ChipClusters.UnitTestingCluster.NullableFloatSingleAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterTestBatchHelperResponseCallback implements ChipClusters.UnitTestingCluster.TestBatchHelperResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21593,20 +21466,21 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Float value) { + public void onSuccess(byte[] buffer) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo bufferResponseValue = new CommandResponseInfo("buffer", "byte[]"); + responseValues.put(bufferResponseValue, buffer); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedUnitTestingClusterNullableFloatDoubleAttributeCallback implements ChipClusters.UnitTestingCluster.NullableFloatDoubleAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterStringEchoResponseCallback implements ChipClusters.UnitTestingCluster.StringEchoResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21614,20 +21488,21 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Double value) { + public void onSuccess(byte[] payload) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Double"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo payloadResponseValue = new CommandResponseInfo("payload", "byte[]"); + responseValues.put(payloadResponseValue, payload); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedUnitTestingClusterNullableOctetStringAttributeCallback implements ChipClusters.UnitTestingCluster.NullableOctetStringAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterGlobalEchoResponseCallback implements ChipClusters.UnitTestingCluster.GlobalEchoResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21635,20 +21510,23 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable byte[] value) { + public void onSuccess(ChipStructs.UnitTestingClusterTestGlobalStruct field1, Integer field2) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "byte[]"); - responseValues.put(commandResponseInfo, value); + + // field1: Struct TestGlobalStruct + // Conversion from this type to Java is not properly implemented yet + CommandResponseInfo field2ResponseValue = new CommandResponseInfo("field2", "Integer"); + responseValues.put(field2ResponseValue, field2); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - public static class DelegatedUnitTestingClusterNullableCharStringAttributeCallback implements ChipClusters.UnitTestingCluster.NullableCharStringAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterTestDifferentVendorMeiResponseCallback implements ChipClusters.UnitTestingCluster.TestDifferentVendorMeiResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21656,20 +21534,22 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable String value) { + public void onSuccess(Integer arg1, Long eventNumber) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "String"); - responseValues.put(commandResponseInfo, value); + + CommandResponseInfo arg1ResponseValue = new CommandResponseInfo("arg1", "Integer"); + responseValues.put(arg1ResponseValue, arg1); + CommandResponseInfo eventNumberResponseValue = new CommandResponseInfo("eventNumber", "Long"); + responseValues.put(eventNumberResponseValue, eventNumber); callback.onSuccess(responseValues); } @Override - public void onError(Exception ex) { - callback.onFailure(ex); + public void onError(Exception error) { + callback.onFailure(error); } } - - public static class DelegatedUnitTestingClusterNullableEnumAttrAttributeCallback implements ChipClusters.UnitTestingCluster.NullableEnumAttrAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterListInt8uAttributeCallback implements ChipClusters.UnitTestingCluster.ListInt8uAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21677,10 +21557,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21690,7 +21570,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterNullableStructAttributeCallback implements ChipClusters.UnitTestingCluster.NullableStructAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterListOctetStringAttributeCallback implements ChipClusters.UnitTestingCluster.ListOctetStringAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21698,10 +21578,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable ChipStructs.UnitTestingClusterSimpleStruct value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.UnitTestingClusterSimpleStruct"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21711,7 +21591,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterNullableRangeRestrictedInt8uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableRangeRestrictedInt8uAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterListStructOctetStringAttributeCallback implements ChipClusters.UnitTestingCluster.ListStructOctetStringAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21719,10 +21599,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21732,7 +21612,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterNullableRangeRestrictedInt8sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableRangeRestrictedInt8sAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterListNullablesAndOptionalsStructAttributeCallback implements ChipClusters.UnitTestingCluster.ListNullablesAndOptionalsStructAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21740,10 +21620,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21753,7 +21633,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterNullableRangeRestrictedInt16uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableRangeRestrictedInt16uAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterStructAttrAttributeCallback implements ChipClusters.UnitTestingCluster.StructAttrAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21761,9 +21641,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(ChipStructs.UnitTestingClusterSimpleStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.UnitTestingClusterSimpleStruct"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -21774,7 +21654,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterNullableRangeRestrictedInt16sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableRangeRestrictedInt16sAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterListLongOctetStringAttributeCallback implements ChipClusters.UnitTestingCluster.ListLongOctetStringAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21782,10 +21662,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21795,7 +21675,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterNullableGlobalEnumAttributeCallback implements ChipClusters.UnitTestingCluster.NullableGlobalEnumAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterListFabricScopedAttributeCallback implements ChipClusters.UnitTestingCluster.ListFabricScopedAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21803,10 +21683,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -21816,7 +21696,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterNullableGlobalStructAttributeCallback implements ChipClusters.UnitTestingCluster.NullableGlobalStructAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterGlobalStructAttributeCallback implements ChipClusters.UnitTestingCluster.GlobalStructAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21824,7 +21704,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable ChipStructs.UnitTestingClusterTestGlobalStruct value) { + public void onSuccess(ChipStructs.UnitTestingClusterTestGlobalStruct value) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.UnitTestingClusterTestGlobalStruct"); responseValues.put(commandResponseInfo, value); @@ -21837,7 +21717,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterGeneratedCommandListAttributeCallback implements ChipClusters.UnitTestingCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterNullableBooleanAttributeCallback implements ChipClusters.UnitTestingCluster.NullableBooleanAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21845,10 +21725,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Boolean value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Boolean"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -21858,7 +21738,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterAcceptedCommandListAttributeCallback implements ChipClusters.UnitTestingCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterNullableBitmap8AttributeCallback implements ChipClusters.UnitTestingCluster.NullableBitmap8AttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21866,10 +21746,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -21879,7 +21759,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterEventListAttributeCallback implements ChipClusters.UnitTestingCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterNullableBitmap16AttributeCallback implements ChipClusters.UnitTestingCluster.NullableBitmap16AttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21887,10 +21767,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -21900,7 +21780,7 @@ public void onError(Exception ex) { } } - public static class DelegatedUnitTestingClusterAttributeListAttributeCallback implements ChipClusters.UnitTestingCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterNullableBitmap32AttributeCallback implements ChipClusters.UnitTestingCluster.NullableBitmap32AttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21908,10 +21788,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -21921,7 +21801,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFaultInjectionClusterGeneratedCommandListAttributeCallback implements ChipClusters.FaultInjectionCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterNullableBitmap64AttributeCallback implements ChipClusters.UnitTestingCluster.NullableBitmap64AttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21929,10 +21809,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -21942,7 +21822,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFaultInjectionClusterAcceptedCommandListAttributeCallback implements ChipClusters.FaultInjectionCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterNullableInt8uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt8uAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21950,10 +21830,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -21963,7 +21843,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFaultInjectionClusterEventListAttributeCallback implements ChipClusters.FaultInjectionCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterNullableInt16uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt16uAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21971,10 +21851,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -21984,7 +21864,7 @@ public void onError(Exception ex) { } } - public static class DelegatedFaultInjectionClusterAttributeListAttributeCallback implements ChipClusters.FaultInjectionCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterNullableInt24uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt24uAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21992,10 +21872,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -22005,8 +21885,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedSampleMeiClusterAddArgumentsResponseCallback implements ChipClusters.SampleMeiCluster.AddArgumentsResponseCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterNullableInt32uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt32uAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -22014,20 +21893,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer returnValue) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo returnValueResponseValue = new CommandResponseInfo("returnValue", "Integer"); - responseValues.put(returnValueResponseValue, returnValue); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedSampleMeiClusterGeneratedCommandListAttributeCallback implements ChipClusters.SampleMeiCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedUnitTestingClusterNullableInt40uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt40uAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -22035,10 +21914,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -22048,7 +21927,7 @@ public void onError(Exception ex) { } } - public static class DelegatedSampleMeiClusterAcceptedCommandListAttributeCallback implements ChipClusters.SampleMeiCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterNullableInt48uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt48uAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -22056,10 +21935,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -22069,7 +21948,7 @@ public void onError(Exception ex) { } } - public static class DelegatedSampleMeiClusterEventListAttributeCallback implements ChipClusters.SampleMeiCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterNullableInt56uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt56uAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -22077,10 +21956,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -22090,7 +21969,7 @@ public void onError(Exception ex) { } } - public static class DelegatedSampleMeiClusterAttributeListAttributeCallback implements ChipClusters.SampleMeiCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedUnitTestingClusterNullableInt64uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt64uAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -22098,10 +21977,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -22111,67 +21990,803 @@ public void onError(Exception ex) { } } + public static class DelegatedUnitTestingClusterNullableInt8sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt8sAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } - public Map getClusterMap() { - Map clusterMap = initializeClusterMap(); - Map> commandMap = getCommandMap(); - combineCommand(clusterMap, commandMap); - Map> readAttributeMap = new ClusterReadMapping().getReadAttributeMap(); - combineCommand(clusterMap, readAttributeMap); - Map> writeAttributeMap = new ClusterWriteMapping().getWriteAttributeMap(); - combineCommand(clusterMap, writeAttributeMap); - return clusterMap; - } - - public Map initializeClusterMap() { - Map clusterMap = new HashMap<>(); + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } - ClusterInfo identifyClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.IdentifyCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("identify", identifyClusterInfo); + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } - ClusterInfo groupsClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.GroupsCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("groups", groupsClusterInfo); + public static class DelegatedUnitTestingClusterNullableInt16sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt16sAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } - ClusterInfo onOffClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.OnOffCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("onOff", onOffClusterInfo); + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } - ClusterInfo levelControlClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.LevelControlCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("levelControl", levelControlClusterInfo); + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } - ClusterInfo pulseWidthModulationClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.PulseWidthModulationCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("pulseWidthModulation", pulseWidthModulationClusterInfo); + public static class DelegatedUnitTestingClusterNullableInt24sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt24sAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } - ClusterInfo descriptorClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.DescriptorCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("descriptor", descriptorClusterInfo); + @Override + public void onSuccess(@Nullable Long value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } - ClusterInfo bindingClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.BindingCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("binding", bindingClusterInfo); + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } - ClusterInfo accessControlClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.AccessControlCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("accessControl", accessControlClusterInfo); + public static class DelegatedUnitTestingClusterNullableInt32sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt32sAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } - ClusterInfo actionsClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.ActionsCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("actions", actionsClusterInfo); + @Override + public void onSuccess(@Nullable Long value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } - ClusterInfo basicInformationClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.BasicInformationCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("basicInformation", basicInformationClusterInfo); + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } - ClusterInfo otaSoftwareUpdateProviderClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.OtaSoftwareUpdateProviderCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("otaSoftwareUpdateProvider", otaSoftwareUpdateProviderClusterInfo); + public static class DelegatedUnitTestingClusterNullableInt40sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt40sAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } - ClusterInfo otaSoftwareUpdateRequestorClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.OtaSoftwareUpdateRequestorCluster(ptr, endpointId), new HashMap<>()); + @Override + public void onSuccess(@Nullable Long value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterNullableInt48sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt48sAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Long value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterNullableInt56sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt56sAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Long value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterNullableInt64sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableInt64sAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Long value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterNullableEnum8AttributeCallback implements ChipClusters.UnitTestingCluster.NullableEnum8AttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterNullableEnum16AttributeCallback implements ChipClusters.UnitTestingCluster.NullableEnum16AttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterNullableFloatSingleAttributeCallback implements ChipClusters.UnitTestingCluster.NullableFloatSingleAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Float value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Float"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterNullableFloatDoubleAttributeCallback implements ChipClusters.UnitTestingCluster.NullableFloatDoubleAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Double value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Double"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterNullableOctetStringAttributeCallback implements ChipClusters.UnitTestingCluster.NullableOctetStringAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable byte[] value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "byte[]"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterNullableCharStringAttributeCallback implements ChipClusters.UnitTestingCluster.NullableCharStringAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable String value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "String"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterNullableEnumAttrAttributeCallback implements ChipClusters.UnitTestingCluster.NullableEnumAttrAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterNullableStructAttributeCallback implements ChipClusters.UnitTestingCluster.NullableStructAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable ChipStructs.UnitTestingClusterSimpleStruct value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.UnitTestingClusterSimpleStruct"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterNullableRangeRestrictedInt8uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableRangeRestrictedInt8uAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterNullableRangeRestrictedInt8sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableRangeRestrictedInt8sAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterNullableRangeRestrictedInt16uAttributeCallback implements ChipClusters.UnitTestingCluster.NullableRangeRestrictedInt16uAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterNullableRangeRestrictedInt16sAttributeCallback implements ChipClusters.UnitTestingCluster.NullableRangeRestrictedInt16sAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterNullableGlobalEnumAttributeCallback implements ChipClusters.UnitTestingCluster.NullableGlobalEnumAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterNullableGlobalStructAttributeCallback implements ChipClusters.UnitTestingCluster.NullableGlobalStructAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable ChipStructs.UnitTestingClusterTestGlobalStruct value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.UnitTestingClusterTestGlobalStruct"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterGeneratedCommandListAttributeCallback implements ChipClusters.UnitTestingCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterAcceptedCommandListAttributeCallback implements ChipClusters.UnitTestingCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterEventListAttributeCallback implements ChipClusters.UnitTestingCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedUnitTestingClusterAttributeListAttributeCallback implements ChipClusters.UnitTestingCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedFaultInjectionClusterGeneratedCommandListAttributeCallback implements ChipClusters.FaultInjectionCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedFaultInjectionClusterAcceptedCommandListAttributeCallback implements ChipClusters.FaultInjectionCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedFaultInjectionClusterEventListAttributeCallback implements ChipClusters.FaultInjectionCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedFaultInjectionClusterAttributeListAttributeCallback implements ChipClusters.FaultInjectionCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + + public static class DelegatedSampleMeiClusterAddArgumentsResponseCallback implements ChipClusters.SampleMeiCluster.AddArgumentsResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer returnValue) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo returnValueResponseValue = new CommandResponseInfo("returnValue", "Integer"); + responseValues.put(returnValueResponseValue, returnValue); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedSampleMeiClusterGeneratedCommandListAttributeCallback implements ChipClusters.SampleMeiCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedSampleMeiClusterAcceptedCommandListAttributeCallback implements ChipClusters.SampleMeiCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedSampleMeiClusterEventListAttributeCallback implements ChipClusters.SampleMeiCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedSampleMeiClusterAttributeListAttributeCallback implements ChipClusters.SampleMeiCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + + public Map getClusterMap() { + Map clusterMap = initializeClusterMap(); + Map> commandMap = getCommandMap(); + combineCommand(clusterMap, commandMap); + Map> readAttributeMap = new ClusterReadMapping().getReadAttributeMap(); + combineCommand(clusterMap, readAttributeMap); + Map> writeAttributeMap = new ClusterWriteMapping().getWriteAttributeMap(); + combineCommand(clusterMap, writeAttributeMap); + return clusterMap; + } + + public Map initializeClusterMap() { + Map clusterMap = new HashMap<>(); + + ClusterInfo identifyClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.IdentifyCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("identify", identifyClusterInfo); + + ClusterInfo groupsClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.GroupsCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("groups", groupsClusterInfo); + + ClusterInfo onOffClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.OnOffCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("onOff", onOffClusterInfo); + + ClusterInfo levelControlClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.LevelControlCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("levelControl", levelControlClusterInfo); + + ClusterInfo pulseWidthModulationClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.PulseWidthModulationCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("pulseWidthModulation", pulseWidthModulationClusterInfo); + + ClusterInfo descriptorClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.DescriptorCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("descriptor", descriptorClusterInfo); + + ClusterInfo bindingClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.BindingCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("binding", bindingClusterInfo); + + ClusterInfo accessControlClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.AccessControlCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("accessControl", accessControlClusterInfo); + + ClusterInfo actionsClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.ActionsCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("actions", actionsClusterInfo); + + ClusterInfo basicInformationClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.BasicInformationCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("basicInformation", basicInformationClusterInfo); + + ClusterInfo otaSoftwareUpdateProviderClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.OtaSoftwareUpdateProviderCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("otaSoftwareUpdateProvider", otaSoftwareUpdateProviderClusterInfo); + + ClusterInfo otaSoftwareUpdateRequestorClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.OtaSoftwareUpdateRequestorCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("otaSoftwareUpdateRequestor", otaSoftwareUpdateRequestorClusterInfo); ClusterInfo localizationConfigurationClusterInfo = new ClusterInfo( @@ -22594,10 +23209,22 @@ public Map initializeClusterMap() { (ptr, endpointId) -> new ChipClusters.ContentAppObserverCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("contentAppObserver", contentAppObserverClusterInfo); + ClusterInfo zoneManagementClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.ZoneManagementCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("zoneManagement", zoneManagementClusterInfo); + + ClusterInfo cameraAvStreamManagementClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.CameraAvStreamManagementCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("cameraAvStreamManagement", cameraAvStreamManagementClusterInfo); + ClusterInfo webRTCTransportProviderClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.WebRTCTransportProviderCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("webRTCTransportProvider", webRTCTransportProviderClusterInfo); + ClusterInfo webRTCTransportRequestorClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.WebRTCTransportRequestorCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("webRTCTransportRequestor", webRTCTransportRequestorClusterInfo); + ClusterInfo chimeClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.ChimeCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("chime", chimeClusterInfo); @@ -22743,7 +23370,10 @@ public void combineCommand(Map destination, Map> getCommandMap() { ); }, () -> new DelegatedDefaultClusterCallback(), - colorControlmoveToColorTemperatureCommandParams + colorControlmoveToColorTemperatureCommandParams + ); + colorControlClusterInteractionInfoMap.put("moveToColorTemperature", colorControlmoveToColorTemperatureInteractionInfo); + + Map colorControlenhancedMoveToHueCommandParams = new LinkedHashMap(); + + CommandParameterInfo colorControlenhancedMoveToHueenhancedHueCommandParameterInfo = new CommandParameterInfo("enhancedHue", Integer.class, Integer.class); + colorControlenhancedMoveToHueCommandParams.put("enhancedHue",colorControlenhancedMoveToHueenhancedHueCommandParameterInfo); + + CommandParameterInfo colorControlenhancedMoveToHuedirectionCommandParameterInfo = new CommandParameterInfo("direction", Integer.class, Integer.class); + colorControlenhancedMoveToHueCommandParams.put("direction",colorControlenhancedMoveToHuedirectionCommandParameterInfo); + + CommandParameterInfo colorControlenhancedMoveToHuetransitionTimeCommandParameterInfo = new CommandParameterInfo("transitionTime", Integer.class, Integer.class); + colorControlenhancedMoveToHueCommandParams.put("transitionTime",colorControlenhancedMoveToHuetransitionTimeCommandParameterInfo); + + CommandParameterInfo colorControlenhancedMoveToHueoptionsMaskCommandParameterInfo = new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + colorControlenhancedMoveToHueCommandParams.put("optionsMask",colorControlenhancedMoveToHueoptionsMaskCommandParameterInfo); + + CommandParameterInfo colorControlenhancedMoveToHueoptionsOverrideCommandParameterInfo = new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); + colorControlenhancedMoveToHueCommandParams.put("optionsOverride",colorControlenhancedMoveToHueoptionsOverrideCommandParameterInfo); + InteractionInfo colorControlenhancedMoveToHueInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ColorControlCluster) cluster) + .enhancedMoveToHue((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("enhancedHue") + , (Integer) + commandArguments.get("direction") + , (Integer) + commandArguments.get("transitionTime") + , (Integer) + commandArguments.get("optionsMask") + , (Integer) + commandArguments.get("optionsOverride") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + colorControlenhancedMoveToHueCommandParams + ); + colorControlClusterInteractionInfoMap.put("enhancedMoveToHue", colorControlenhancedMoveToHueInteractionInfo); + + Map colorControlenhancedMoveHueCommandParams = new LinkedHashMap(); + + CommandParameterInfo colorControlenhancedMoveHuemoveModeCommandParameterInfo = new CommandParameterInfo("moveMode", Integer.class, Integer.class); + colorControlenhancedMoveHueCommandParams.put("moveMode",colorControlenhancedMoveHuemoveModeCommandParameterInfo); + + CommandParameterInfo colorControlenhancedMoveHuerateCommandParameterInfo = new CommandParameterInfo("rate", Integer.class, Integer.class); + colorControlenhancedMoveHueCommandParams.put("rate",colorControlenhancedMoveHuerateCommandParameterInfo); + + CommandParameterInfo colorControlenhancedMoveHueoptionsMaskCommandParameterInfo = new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + colorControlenhancedMoveHueCommandParams.put("optionsMask",colorControlenhancedMoveHueoptionsMaskCommandParameterInfo); + + CommandParameterInfo colorControlenhancedMoveHueoptionsOverrideCommandParameterInfo = new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); + colorControlenhancedMoveHueCommandParams.put("optionsOverride",colorControlenhancedMoveHueoptionsOverrideCommandParameterInfo); + InteractionInfo colorControlenhancedMoveHueInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ColorControlCluster) cluster) + .enhancedMoveHue((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("moveMode") + , (Integer) + commandArguments.get("rate") + , (Integer) + commandArguments.get("optionsMask") + , (Integer) + commandArguments.get("optionsOverride") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + colorControlenhancedMoveHueCommandParams + ); + colorControlClusterInteractionInfoMap.put("enhancedMoveHue", colorControlenhancedMoveHueInteractionInfo); + + Map colorControlenhancedStepHueCommandParams = new LinkedHashMap(); + + CommandParameterInfo colorControlenhancedStepHuestepModeCommandParameterInfo = new CommandParameterInfo("stepMode", Integer.class, Integer.class); + colorControlenhancedStepHueCommandParams.put("stepMode",colorControlenhancedStepHuestepModeCommandParameterInfo); + + CommandParameterInfo colorControlenhancedStepHuestepSizeCommandParameterInfo = new CommandParameterInfo("stepSize", Integer.class, Integer.class); + colorControlenhancedStepHueCommandParams.put("stepSize",colorControlenhancedStepHuestepSizeCommandParameterInfo); + + CommandParameterInfo colorControlenhancedStepHuetransitionTimeCommandParameterInfo = new CommandParameterInfo("transitionTime", Integer.class, Integer.class); + colorControlenhancedStepHueCommandParams.put("transitionTime",colorControlenhancedStepHuetransitionTimeCommandParameterInfo); + + CommandParameterInfo colorControlenhancedStepHueoptionsMaskCommandParameterInfo = new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + colorControlenhancedStepHueCommandParams.put("optionsMask",colorControlenhancedStepHueoptionsMaskCommandParameterInfo); + + CommandParameterInfo colorControlenhancedStepHueoptionsOverrideCommandParameterInfo = new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); + colorControlenhancedStepHueCommandParams.put("optionsOverride",colorControlenhancedStepHueoptionsOverrideCommandParameterInfo); + InteractionInfo colorControlenhancedStepHueInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ColorControlCluster) cluster) + .enhancedStepHue((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("stepMode") + , (Integer) + commandArguments.get("stepSize") + , (Integer) + commandArguments.get("transitionTime") + , (Integer) + commandArguments.get("optionsMask") + , (Integer) + commandArguments.get("optionsOverride") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + colorControlenhancedStepHueCommandParams + ); + colorControlClusterInteractionInfoMap.put("enhancedStepHue", colorControlenhancedStepHueInteractionInfo); + + Map colorControlenhancedMoveToHueAndSaturationCommandParams = new LinkedHashMap(); + + CommandParameterInfo colorControlenhancedMoveToHueAndSaturationenhancedHueCommandParameterInfo = new CommandParameterInfo("enhancedHue", Integer.class, Integer.class); + colorControlenhancedMoveToHueAndSaturationCommandParams.put("enhancedHue",colorControlenhancedMoveToHueAndSaturationenhancedHueCommandParameterInfo); + + CommandParameterInfo colorControlenhancedMoveToHueAndSaturationsaturationCommandParameterInfo = new CommandParameterInfo("saturation", Integer.class, Integer.class); + colorControlenhancedMoveToHueAndSaturationCommandParams.put("saturation",colorControlenhancedMoveToHueAndSaturationsaturationCommandParameterInfo); + + CommandParameterInfo colorControlenhancedMoveToHueAndSaturationtransitionTimeCommandParameterInfo = new CommandParameterInfo("transitionTime", Integer.class, Integer.class); + colorControlenhancedMoveToHueAndSaturationCommandParams.put("transitionTime",colorControlenhancedMoveToHueAndSaturationtransitionTimeCommandParameterInfo); + + CommandParameterInfo colorControlenhancedMoveToHueAndSaturationoptionsMaskCommandParameterInfo = new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + colorControlenhancedMoveToHueAndSaturationCommandParams.put("optionsMask",colorControlenhancedMoveToHueAndSaturationoptionsMaskCommandParameterInfo); + + CommandParameterInfo colorControlenhancedMoveToHueAndSaturationoptionsOverrideCommandParameterInfo = new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); + colorControlenhancedMoveToHueAndSaturationCommandParams.put("optionsOverride",colorControlenhancedMoveToHueAndSaturationoptionsOverrideCommandParameterInfo); + InteractionInfo colorControlenhancedMoveToHueAndSaturationInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ColorControlCluster) cluster) + .enhancedMoveToHueAndSaturation((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("enhancedHue") + , (Integer) + commandArguments.get("saturation") + , (Integer) + commandArguments.get("transitionTime") + , (Integer) + commandArguments.get("optionsMask") + , (Integer) + commandArguments.get("optionsOverride") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + colorControlenhancedMoveToHueAndSaturationCommandParams + ); + colorControlClusterInteractionInfoMap.put("enhancedMoveToHueAndSaturation", colorControlenhancedMoveToHueAndSaturationInteractionInfo); + + Map colorControlcolorLoopSetCommandParams = new LinkedHashMap(); + + CommandParameterInfo colorControlcolorLoopSetupdateFlagsCommandParameterInfo = new CommandParameterInfo("updateFlags", Integer.class, Integer.class); + colorControlcolorLoopSetCommandParams.put("updateFlags",colorControlcolorLoopSetupdateFlagsCommandParameterInfo); + + CommandParameterInfo colorControlcolorLoopSetactionCommandParameterInfo = new CommandParameterInfo("action", Integer.class, Integer.class); + colorControlcolorLoopSetCommandParams.put("action",colorControlcolorLoopSetactionCommandParameterInfo); + + CommandParameterInfo colorControlcolorLoopSetdirectionCommandParameterInfo = new CommandParameterInfo("direction", Integer.class, Integer.class); + colorControlcolorLoopSetCommandParams.put("direction",colorControlcolorLoopSetdirectionCommandParameterInfo); + + CommandParameterInfo colorControlcolorLoopSettimeCommandParameterInfo = new CommandParameterInfo("time", Integer.class, Integer.class); + colorControlcolorLoopSetCommandParams.put("time",colorControlcolorLoopSettimeCommandParameterInfo); + + CommandParameterInfo colorControlcolorLoopSetstartHueCommandParameterInfo = new CommandParameterInfo("startHue", Integer.class, Integer.class); + colorControlcolorLoopSetCommandParams.put("startHue",colorControlcolorLoopSetstartHueCommandParameterInfo); + + CommandParameterInfo colorControlcolorLoopSetoptionsMaskCommandParameterInfo = new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + colorControlcolorLoopSetCommandParams.put("optionsMask",colorControlcolorLoopSetoptionsMaskCommandParameterInfo); + + CommandParameterInfo colorControlcolorLoopSetoptionsOverrideCommandParameterInfo = new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); + colorControlcolorLoopSetCommandParams.put("optionsOverride",colorControlcolorLoopSetoptionsOverrideCommandParameterInfo); + InteractionInfo colorControlcolorLoopSetInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ColorControlCluster) cluster) + .colorLoopSet((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("updateFlags") + , (Integer) + commandArguments.get("action") + , (Integer) + commandArguments.get("direction") + , (Integer) + commandArguments.get("time") + , (Integer) + commandArguments.get("startHue") + , (Integer) + commandArguments.get("optionsMask") + , (Integer) + commandArguments.get("optionsOverride") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + colorControlcolorLoopSetCommandParams + ); + colorControlClusterInteractionInfoMap.put("colorLoopSet", colorControlcolorLoopSetInteractionInfo); + + Map colorControlstopMoveStepCommandParams = new LinkedHashMap(); + + CommandParameterInfo colorControlstopMoveStepoptionsMaskCommandParameterInfo = new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + colorControlstopMoveStepCommandParams.put("optionsMask",colorControlstopMoveStepoptionsMaskCommandParameterInfo); + + CommandParameterInfo colorControlstopMoveStepoptionsOverrideCommandParameterInfo = new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); + colorControlstopMoveStepCommandParams.put("optionsOverride",colorControlstopMoveStepoptionsOverrideCommandParameterInfo); + InteractionInfo colorControlstopMoveStepInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ColorControlCluster) cluster) + .stopMoveStep((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("optionsMask") + , (Integer) + commandArguments.get("optionsOverride") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + colorControlstopMoveStepCommandParams ); - colorControlClusterInteractionInfoMap.put("moveToColorTemperature", colorControlmoveToColorTemperatureInteractionInfo); + colorControlClusterInteractionInfoMap.put("stopMoveStep", colorControlstopMoveStepInteractionInfo); - Map colorControlenhancedMoveToHueCommandParams = new LinkedHashMap(); + Map colorControlmoveColorTemperatureCommandParams = new LinkedHashMap(); - CommandParameterInfo colorControlenhancedMoveToHueenhancedHueCommandParameterInfo = new CommandParameterInfo("enhancedHue", Integer.class, Integer.class); - colorControlenhancedMoveToHueCommandParams.put("enhancedHue",colorControlenhancedMoveToHueenhancedHueCommandParameterInfo); + CommandParameterInfo colorControlmoveColorTemperaturemoveModeCommandParameterInfo = new CommandParameterInfo("moveMode", Integer.class, Integer.class); + colorControlmoveColorTemperatureCommandParams.put("moveMode",colorControlmoveColorTemperaturemoveModeCommandParameterInfo); - CommandParameterInfo colorControlenhancedMoveToHuedirectionCommandParameterInfo = new CommandParameterInfo("direction", Integer.class, Integer.class); - colorControlenhancedMoveToHueCommandParams.put("direction",colorControlenhancedMoveToHuedirectionCommandParameterInfo); + CommandParameterInfo colorControlmoveColorTemperaturerateCommandParameterInfo = new CommandParameterInfo("rate", Integer.class, Integer.class); + colorControlmoveColorTemperatureCommandParams.put("rate",colorControlmoveColorTemperaturerateCommandParameterInfo); - CommandParameterInfo colorControlenhancedMoveToHuetransitionTimeCommandParameterInfo = new CommandParameterInfo("transitionTime", Integer.class, Integer.class); - colorControlenhancedMoveToHueCommandParams.put("transitionTime",colorControlenhancedMoveToHuetransitionTimeCommandParameterInfo); + CommandParameterInfo colorControlmoveColorTemperaturecolorTemperatureMinimumMiredsCommandParameterInfo = new CommandParameterInfo("colorTemperatureMinimumMireds", Integer.class, Integer.class); + colorControlmoveColorTemperatureCommandParams.put("colorTemperatureMinimumMireds",colorControlmoveColorTemperaturecolorTemperatureMinimumMiredsCommandParameterInfo); - CommandParameterInfo colorControlenhancedMoveToHueoptionsMaskCommandParameterInfo = new CommandParameterInfo("optionsMask", Integer.class, Integer.class); - colorControlenhancedMoveToHueCommandParams.put("optionsMask",colorControlenhancedMoveToHueoptionsMaskCommandParameterInfo); + CommandParameterInfo colorControlmoveColorTemperaturecolorTemperatureMaximumMiredsCommandParameterInfo = new CommandParameterInfo("colorTemperatureMaximumMireds", Integer.class, Integer.class); + colorControlmoveColorTemperatureCommandParams.put("colorTemperatureMaximumMireds",colorControlmoveColorTemperaturecolorTemperatureMaximumMiredsCommandParameterInfo); - CommandParameterInfo colorControlenhancedMoveToHueoptionsOverrideCommandParameterInfo = new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); - colorControlenhancedMoveToHueCommandParams.put("optionsOverride",colorControlenhancedMoveToHueoptionsOverrideCommandParameterInfo); - InteractionInfo colorControlenhancedMoveToHueInteractionInfo = new InteractionInfo( + CommandParameterInfo colorControlmoveColorTemperatureoptionsMaskCommandParameterInfo = new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + colorControlmoveColorTemperatureCommandParams.put("optionsMask",colorControlmoveColorTemperatureoptionsMaskCommandParameterInfo); + + CommandParameterInfo colorControlmoveColorTemperatureoptionsOverrideCommandParameterInfo = new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); + colorControlmoveColorTemperatureCommandParams.put("optionsOverride",colorControlmoveColorTemperatureoptionsOverrideCommandParameterInfo); + InteractionInfo colorControlmoveColorTemperatureInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.ColorControlCluster) cluster) - .enhancedMoveToHue((DefaultClusterCallback) callback + .moveColorTemperature((DefaultClusterCallback) callback , (Integer) - commandArguments.get("enhancedHue") + commandArguments.get("moveMode") , (Integer) - commandArguments.get("direction") + commandArguments.get("rate") , (Integer) - commandArguments.get("transitionTime") + commandArguments.get("colorTemperatureMinimumMireds") + , (Integer) + commandArguments.get("colorTemperatureMaximumMireds") , (Integer) commandArguments.get("optionsMask") , (Integer) @@ -27475,31 +28322,46 @@ public Map> getCommandMap() { ); }, () -> new DelegatedDefaultClusterCallback(), - colorControlenhancedMoveToHueCommandParams + colorControlmoveColorTemperatureCommandParams ); - colorControlClusterInteractionInfoMap.put("enhancedMoveToHue", colorControlenhancedMoveToHueInteractionInfo); + colorControlClusterInteractionInfoMap.put("moveColorTemperature", colorControlmoveColorTemperatureInteractionInfo); - Map colorControlenhancedMoveHueCommandParams = new LinkedHashMap(); + Map colorControlstepColorTemperatureCommandParams = new LinkedHashMap(); - CommandParameterInfo colorControlenhancedMoveHuemoveModeCommandParameterInfo = new CommandParameterInfo("moveMode", Integer.class, Integer.class); - colorControlenhancedMoveHueCommandParams.put("moveMode",colorControlenhancedMoveHuemoveModeCommandParameterInfo); + CommandParameterInfo colorControlstepColorTemperaturestepModeCommandParameterInfo = new CommandParameterInfo("stepMode", Integer.class, Integer.class); + colorControlstepColorTemperatureCommandParams.put("stepMode",colorControlstepColorTemperaturestepModeCommandParameterInfo); - CommandParameterInfo colorControlenhancedMoveHuerateCommandParameterInfo = new CommandParameterInfo("rate", Integer.class, Integer.class); - colorControlenhancedMoveHueCommandParams.put("rate",colorControlenhancedMoveHuerateCommandParameterInfo); + CommandParameterInfo colorControlstepColorTemperaturestepSizeCommandParameterInfo = new CommandParameterInfo("stepSize", Integer.class, Integer.class); + colorControlstepColorTemperatureCommandParams.put("stepSize",colorControlstepColorTemperaturestepSizeCommandParameterInfo); - CommandParameterInfo colorControlenhancedMoveHueoptionsMaskCommandParameterInfo = new CommandParameterInfo("optionsMask", Integer.class, Integer.class); - colorControlenhancedMoveHueCommandParams.put("optionsMask",colorControlenhancedMoveHueoptionsMaskCommandParameterInfo); + CommandParameterInfo colorControlstepColorTemperaturetransitionTimeCommandParameterInfo = new CommandParameterInfo("transitionTime", Integer.class, Integer.class); + colorControlstepColorTemperatureCommandParams.put("transitionTime",colorControlstepColorTemperaturetransitionTimeCommandParameterInfo); - CommandParameterInfo colorControlenhancedMoveHueoptionsOverrideCommandParameterInfo = new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); - colorControlenhancedMoveHueCommandParams.put("optionsOverride",colorControlenhancedMoveHueoptionsOverrideCommandParameterInfo); - InteractionInfo colorControlenhancedMoveHueInteractionInfo = new InteractionInfo( + CommandParameterInfo colorControlstepColorTemperaturecolorTemperatureMinimumMiredsCommandParameterInfo = new CommandParameterInfo("colorTemperatureMinimumMireds", Integer.class, Integer.class); + colorControlstepColorTemperatureCommandParams.put("colorTemperatureMinimumMireds",colorControlstepColorTemperaturecolorTemperatureMinimumMiredsCommandParameterInfo); + + CommandParameterInfo colorControlstepColorTemperaturecolorTemperatureMaximumMiredsCommandParameterInfo = new CommandParameterInfo("colorTemperatureMaximumMireds", Integer.class, Integer.class); + colorControlstepColorTemperatureCommandParams.put("colorTemperatureMaximumMireds",colorControlstepColorTemperaturecolorTemperatureMaximumMiredsCommandParameterInfo); + + CommandParameterInfo colorControlstepColorTemperatureoptionsMaskCommandParameterInfo = new CommandParameterInfo("optionsMask", Integer.class, Integer.class); + colorControlstepColorTemperatureCommandParams.put("optionsMask",colorControlstepColorTemperatureoptionsMaskCommandParameterInfo); + + CommandParameterInfo colorControlstepColorTemperatureoptionsOverrideCommandParameterInfo = new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); + colorControlstepColorTemperatureCommandParams.put("optionsOverride",colorControlstepColorTemperatureoptionsOverrideCommandParameterInfo); + InteractionInfo colorControlstepColorTemperatureInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.ColorControlCluster) cluster) - .enhancedMoveHue((DefaultClusterCallback) callback + .stepColorTemperature((DefaultClusterCallback) callback , (Integer) - commandArguments.get("moveMode") + commandArguments.get("stepMode") , (Integer) - commandArguments.get("rate") + commandArguments.get("stepSize") + , (Integer) + commandArguments.get("transitionTime") + , (Integer) + commandArguments.get("colorTemperatureMinimumMireds") + , (Integer) + commandArguments.get("colorTemperatureMaximumMireds") , (Integer) commandArguments.get("optionsMask") , (Integer) @@ -27507,1401 +28369,1604 @@ public Map> getCommandMap() { ); }, () -> new DelegatedDefaultClusterCallback(), - colorControlenhancedMoveHueCommandParams + colorControlstepColorTemperatureCommandParams ); - colorControlClusterInteractionInfoMap.put("enhancedMoveHue", colorControlenhancedMoveHueInteractionInfo); + colorControlClusterInteractionInfoMap.put("stepColorTemperature", colorControlstepColorTemperatureInteractionInfo); - Map colorControlenhancedStepHueCommandParams = new LinkedHashMap(); + commandMap.put("colorControl", colorControlClusterInteractionInfoMap); - CommandParameterInfo colorControlenhancedStepHuestepModeCommandParameterInfo = new CommandParameterInfo("stepMode", Integer.class, Integer.class); - colorControlenhancedStepHueCommandParams.put("stepMode",colorControlenhancedStepHuestepModeCommandParameterInfo); + Map ballastConfigurationClusterInteractionInfoMap = new LinkedHashMap<>(); - CommandParameterInfo colorControlenhancedStepHuestepSizeCommandParameterInfo = new CommandParameterInfo("stepSize", Integer.class, Integer.class); - colorControlenhancedStepHueCommandParams.put("stepSize",colorControlenhancedStepHuestepSizeCommandParameterInfo); + commandMap.put("ballastConfiguration", ballastConfigurationClusterInteractionInfoMap); - CommandParameterInfo colorControlenhancedStepHuetransitionTimeCommandParameterInfo = new CommandParameterInfo("transitionTime", Integer.class, Integer.class); - colorControlenhancedStepHueCommandParams.put("transitionTime",colorControlenhancedStepHuetransitionTimeCommandParameterInfo); + Map illuminanceMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); - CommandParameterInfo colorControlenhancedStepHueoptionsMaskCommandParameterInfo = new CommandParameterInfo("optionsMask", Integer.class, Integer.class); - colorControlenhancedStepHueCommandParams.put("optionsMask",colorControlenhancedStepHueoptionsMaskCommandParameterInfo); + commandMap.put("illuminanceMeasurement", illuminanceMeasurementClusterInteractionInfoMap); - CommandParameterInfo colorControlenhancedStepHueoptionsOverrideCommandParameterInfo = new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); - colorControlenhancedStepHueCommandParams.put("optionsOverride",colorControlenhancedStepHueoptionsOverrideCommandParameterInfo); - InteractionInfo colorControlenhancedStepHueInteractionInfo = new InteractionInfo( + Map temperatureMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + + commandMap.put("temperatureMeasurement", temperatureMeasurementClusterInteractionInfoMap); + + Map pressureMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + + commandMap.put("pressureMeasurement", pressureMeasurementClusterInteractionInfoMap); + + Map flowMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + + commandMap.put("flowMeasurement", flowMeasurementClusterInteractionInfoMap); + + Map relativeHumidityMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + + commandMap.put("relativeHumidityMeasurement", relativeHumidityMeasurementClusterInteractionInfoMap); + + Map occupancySensingClusterInteractionInfoMap = new LinkedHashMap<>(); + + commandMap.put("occupancySensing", occupancySensingClusterInteractionInfoMap); + + Map carbonMonoxideConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + + commandMap.put("carbonMonoxideConcentrationMeasurement", carbonMonoxideConcentrationMeasurementClusterInteractionInfoMap); + + Map carbonDioxideConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + + commandMap.put("carbonDioxideConcentrationMeasurement", carbonDioxideConcentrationMeasurementClusterInteractionInfoMap); + + Map nitrogenDioxideConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + + commandMap.put("nitrogenDioxideConcentrationMeasurement", nitrogenDioxideConcentrationMeasurementClusterInteractionInfoMap); + + Map ozoneConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + + commandMap.put("ozoneConcentrationMeasurement", ozoneConcentrationMeasurementClusterInteractionInfoMap); + + Map pm25ConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + + commandMap.put("pm25ConcentrationMeasurement", pm25ConcentrationMeasurementClusterInteractionInfoMap); + + Map formaldehydeConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + + commandMap.put("formaldehydeConcentrationMeasurement", formaldehydeConcentrationMeasurementClusterInteractionInfoMap); + + Map pm1ConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + + commandMap.put("pm1ConcentrationMeasurement", pm1ConcentrationMeasurementClusterInteractionInfoMap); + + Map pm10ConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + + commandMap.put("pm10ConcentrationMeasurement", pm10ConcentrationMeasurementClusterInteractionInfoMap); + + Map totalVolatileOrganicCompoundsConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + + commandMap.put("totalVolatileOrganicCompoundsConcentrationMeasurement", totalVolatileOrganicCompoundsConcentrationMeasurementClusterInteractionInfoMap); + + Map radonConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + + commandMap.put("radonConcentrationMeasurement", radonConcentrationMeasurementClusterInteractionInfoMap); + + Map wiFiNetworkManagementClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map wiFiNetworkManagementnetworkPassphraseRequestCommandParams = new LinkedHashMap(); + InteractionInfo wiFiNetworkManagementnetworkPassphraseRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ColorControlCluster) cluster) - .enhancedStepHue((DefaultClusterCallback) callback - , (Integer) - commandArguments.get("stepMode") - , (Integer) - commandArguments.get("stepSize") - , (Integer) - commandArguments.get("transitionTime") - , (Integer) - commandArguments.get("optionsMask") - , (Integer) - commandArguments.get("optionsOverride") + ((ChipClusters.WiFiNetworkManagementCluster) cluster) + .networkPassphraseRequest((ChipClusters.WiFiNetworkManagementCluster.NetworkPassphraseResponseCallback) callback + ); + }, + () -> new DelegatedWiFiNetworkManagementClusterNetworkPassphraseResponseCallback(), + wiFiNetworkManagementnetworkPassphraseRequestCommandParams + ); + wiFiNetworkManagementClusterInteractionInfoMap.put("networkPassphraseRequest", wiFiNetworkManagementnetworkPassphraseRequestInteractionInfo); + + commandMap.put("wiFiNetworkManagement", wiFiNetworkManagementClusterInteractionInfoMap); + + Map threadBorderRouterManagementClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map threadBorderRouterManagementgetActiveDatasetRequestCommandParams = new LinkedHashMap(); + InteractionInfo threadBorderRouterManagementgetActiveDatasetRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThreadBorderRouterManagementCluster) cluster) + .getActiveDatasetRequest((ChipClusters.ThreadBorderRouterManagementCluster.DatasetResponseCallback) callback + ); + }, + () -> new DelegatedThreadBorderRouterManagementClusterDatasetResponseCallback(), + threadBorderRouterManagementgetActiveDatasetRequestCommandParams + ); + threadBorderRouterManagementClusterInteractionInfoMap.put("getActiveDatasetRequest", threadBorderRouterManagementgetActiveDatasetRequestInteractionInfo); + + Map threadBorderRouterManagementgetPendingDatasetRequestCommandParams = new LinkedHashMap(); + InteractionInfo threadBorderRouterManagementgetPendingDatasetRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThreadBorderRouterManagementCluster) cluster) + .getPendingDatasetRequest((ChipClusters.ThreadBorderRouterManagementCluster.DatasetResponseCallback) callback + ); + }, + () -> new DelegatedThreadBorderRouterManagementClusterDatasetResponseCallback(), + threadBorderRouterManagementgetPendingDatasetRequestCommandParams + ); + threadBorderRouterManagementClusterInteractionInfoMap.put("getPendingDatasetRequest", threadBorderRouterManagementgetPendingDatasetRequestInteractionInfo); + + Map threadBorderRouterManagementsetActiveDatasetRequestCommandParams = new LinkedHashMap(); + + CommandParameterInfo threadBorderRouterManagementsetActiveDatasetRequestactiveDatasetCommandParameterInfo = new CommandParameterInfo("activeDataset", byte[].class, byte[].class); + threadBorderRouterManagementsetActiveDatasetRequestCommandParams.put("activeDataset",threadBorderRouterManagementsetActiveDatasetRequestactiveDatasetCommandParameterInfo); + + CommandParameterInfo threadBorderRouterManagementsetActiveDatasetRequestbreadcrumbCommandParameterInfo = new CommandParameterInfo("breadcrumb", Optional.class, Long.class); + threadBorderRouterManagementsetActiveDatasetRequestCommandParams.put("breadcrumb",threadBorderRouterManagementsetActiveDatasetRequestbreadcrumbCommandParameterInfo); + InteractionInfo threadBorderRouterManagementsetActiveDatasetRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThreadBorderRouterManagementCluster) cluster) + .setActiveDatasetRequest((DefaultClusterCallback) callback + , (byte[]) + commandArguments.get("activeDataset") + , (Optional) + commandArguments.get("breadcrumb") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + threadBorderRouterManagementsetActiveDatasetRequestCommandParams + ); + threadBorderRouterManagementClusterInteractionInfoMap.put("setActiveDatasetRequest", threadBorderRouterManagementsetActiveDatasetRequestInteractionInfo); + + Map threadBorderRouterManagementsetPendingDatasetRequestCommandParams = new LinkedHashMap(); + + CommandParameterInfo threadBorderRouterManagementsetPendingDatasetRequestpendingDatasetCommandParameterInfo = new CommandParameterInfo("pendingDataset", byte[].class, byte[].class); + threadBorderRouterManagementsetPendingDatasetRequestCommandParams.put("pendingDataset",threadBorderRouterManagementsetPendingDatasetRequestpendingDatasetCommandParameterInfo); + InteractionInfo threadBorderRouterManagementsetPendingDatasetRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThreadBorderRouterManagementCluster) cluster) + .setPendingDatasetRequest((DefaultClusterCallback) callback + , (byte[]) + commandArguments.get("pendingDataset") ); }, () -> new DelegatedDefaultClusterCallback(), - colorControlenhancedStepHueCommandParams + threadBorderRouterManagementsetPendingDatasetRequestCommandParams ); - colorControlClusterInteractionInfoMap.put("enhancedStepHue", colorControlenhancedStepHueInteractionInfo); + threadBorderRouterManagementClusterInteractionInfoMap.put("setPendingDatasetRequest", threadBorderRouterManagementsetPendingDatasetRequestInteractionInfo); - Map colorControlenhancedMoveToHueAndSaturationCommandParams = new LinkedHashMap(); + commandMap.put("threadBorderRouterManagement", threadBorderRouterManagementClusterInteractionInfoMap); - CommandParameterInfo colorControlenhancedMoveToHueAndSaturationenhancedHueCommandParameterInfo = new CommandParameterInfo("enhancedHue", Integer.class, Integer.class); - colorControlenhancedMoveToHueAndSaturationCommandParams.put("enhancedHue",colorControlenhancedMoveToHueAndSaturationenhancedHueCommandParameterInfo); + Map threadNetworkDirectoryClusterInteractionInfoMap = new LinkedHashMap<>(); - CommandParameterInfo colorControlenhancedMoveToHueAndSaturationsaturationCommandParameterInfo = new CommandParameterInfo("saturation", Integer.class, Integer.class); - colorControlenhancedMoveToHueAndSaturationCommandParams.put("saturation",colorControlenhancedMoveToHueAndSaturationsaturationCommandParameterInfo); + Map threadNetworkDirectoryaddNetworkCommandParams = new LinkedHashMap(); - CommandParameterInfo colorControlenhancedMoveToHueAndSaturationtransitionTimeCommandParameterInfo = new CommandParameterInfo("transitionTime", Integer.class, Integer.class); - colorControlenhancedMoveToHueAndSaturationCommandParams.put("transitionTime",colorControlenhancedMoveToHueAndSaturationtransitionTimeCommandParameterInfo); + CommandParameterInfo threadNetworkDirectoryaddNetworkoperationalDatasetCommandParameterInfo = new CommandParameterInfo("operationalDataset", byte[].class, byte[].class); + threadNetworkDirectoryaddNetworkCommandParams.put("operationalDataset",threadNetworkDirectoryaddNetworkoperationalDatasetCommandParameterInfo); + InteractionInfo threadNetworkDirectoryaddNetworkInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThreadNetworkDirectoryCluster) cluster) + .addNetwork((DefaultClusterCallback) callback + , (byte[]) + commandArguments.get("operationalDataset"), 10000 + ); + }, + () -> new DelegatedDefaultClusterCallback(), + threadNetworkDirectoryaddNetworkCommandParams + ); + threadNetworkDirectoryClusterInteractionInfoMap.put("addNetwork", threadNetworkDirectoryaddNetworkInteractionInfo); - CommandParameterInfo colorControlenhancedMoveToHueAndSaturationoptionsMaskCommandParameterInfo = new CommandParameterInfo("optionsMask", Integer.class, Integer.class); - colorControlenhancedMoveToHueAndSaturationCommandParams.put("optionsMask",colorControlenhancedMoveToHueAndSaturationoptionsMaskCommandParameterInfo); + Map threadNetworkDirectoryremoveNetworkCommandParams = new LinkedHashMap(); - CommandParameterInfo colorControlenhancedMoveToHueAndSaturationoptionsOverrideCommandParameterInfo = new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); - colorControlenhancedMoveToHueAndSaturationCommandParams.put("optionsOverride",colorControlenhancedMoveToHueAndSaturationoptionsOverrideCommandParameterInfo); - InteractionInfo colorControlenhancedMoveToHueAndSaturationInteractionInfo = new InteractionInfo( + CommandParameterInfo threadNetworkDirectoryremoveNetworkextendedPanIDCommandParameterInfo = new CommandParameterInfo("extendedPanID", byte[].class, byte[].class); + threadNetworkDirectoryremoveNetworkCommandParams.put("extendedPanID",threadNetworkDirectoryremoveNetworkextendedPanIDCommandParameterInfo); + InteractionInfo threadNetworkDirectoryremoveNetworkInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ColorControlCluster) cluster) - .enhancedMoveToHueAndSaturation((DefaultClusterCallback) callback - , (Integer) - commandArguments.get("enhancedHue") - , (Integer) - commandArguments.get("saturation") - , (Integer) - commandArguments.get("transitionTime") - , (Integer) - commandArguments.get("optionsMask") - , (Integer) - commandArguments.get("optionsOverride") + ((ChipClusters.ThreadNetworkDirectoryCluster) cluster) + .removeNetwork((DefaultClusterCallback) callback + , (byte[]) + commandArguments.get("extendedPanID"), 10000 ); }, () -> new DelegatedDefaultClusterCallback(), - colorControlenhancedMoveToHueAndSaturationCommandParams + threadNetworkDirectoryremoveNetworkCommandParams ); - colorControlClusterInteractionInfoMap.put("enhancedMoveToHueAndSaturation", colorControlenhancedMoveToHueAndSaturationInteractionInfo); + threadNetworkDirectoryClusterInteractionInfoMap.put("removeNetwork", threadNetworkDirectoryremoveNetworkInteractionInfo); - Map colorControlcolorLoopSetCommandParams = new LinkedHashMap(); + Map threadNetworkDirectorygetOperationalDatasetCommandParams = new LinkedHashMap(); - CommandParameterInfo colorControlcolorLoopSetupdateFlagsCommandParameterInfo = new CommandParameterInfo("updateFlags", Integer.class, Integer.class); - colorControlcolorLoopSetCommandParams.put("updateFlags",colorControlcolorLoopSetupdateFlagsCommandParameterInfo); + CommandParameterInfo threadNetworkDirectorygetOperationalDatasetextendedPanIDCommandParameterInfo = new CommandParameterInfo("extendedPanID", byte[].class, byte[].class); + threadNetworkDirectorygetOperationalDatasetCommandParams.put("extendedPanID",threadNetworkDirectorygetOperationalDatasetextendedPanIDCommandParameterInfo); + InteractionInfo threadNetworkDirectorygetOperationalDatasetInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThreadNetworkDirectoryCluster) cluster) + .getOperationalDataset((ChipClusters.ThreadNetworkDirectoryCluster.OperationalDatasetResponseCallback) callback + , (byte[]) + commandArguments.get("extendedPanID") - CommandParameterInfo colorControlcolorLoopSetactionCommandParameterInfo = new CommandParameterInfo("action", Integer.class, Integer.class); - colorControlcolorLoopSetCommandParams.put("action",colorControlcolorLoopSetactionCommandParameterInfo); + ); + }, + () -> new DelegatedThreadNetworkDirectoryClusterOperationalDatasetResponseCallback(), + threadNetworkDirectorygetOperationalDatasetCommandParams + ); + threadNetworkDirectoryClusterInteractionInfoMap.put("getOperationalDataset", threadNetworkDirectorygetOperationalDatasetInteractionInfo); - CommandParameterInfo colorControlcolorLoopSetdirectionCommandParameterInfo = new CommandParameterInfo("direction", Integer.class, Integer.class); - colorControlcolorLoopSetCommandParams.put("direction",colorControlcolorLoopSetdirectionCommandParameterInfo); + commandMap.put("threadNetworkDirectory", threadNetworkDirectoryClusterInteractionInfoMap); - CommandParameterInfo colorControlcolorLoopSettimeCommandParameterInfo = new CommandParameterInfo("time", Integer.class, Integer.class); - colorControlcolorLoopSetCommandParams.put("time",colorControlcolorLoopSettimeCommandParameterInfo); + Map wakeOnLanClusterInteractionInfoMap = new LinkedHashMap<>(); - CommandParameterInfo colorControlcolorLoopSetstartHueCommandParameterInfo = new CommandParameterInfo("startHue", Integer.class, Integer.class); - colorControlcolorLoopSetCommandParams.put("startHue",colorControlcolorLoopSetstartHueCommandParameterInfo); + commandMap.put("wakeOnLan", wakeOnLanClusterInteractionInfoMap); - CommandParameterInfo colorControlcolorLoopSetoptionsMaskCommandParameterInfo = new CommandParameterInfo("optionsMask", Integer.class, Integer.class); - colorControlcolorLoopSetCommandParams.put("optionsMask",colorControlcolorLoopSetoptionsMaskCommandParameterInfo); + Map channelClusterInteractionInfoMap = new LinkedHashMap<>(); - CommandParameterInfo colorControlcolorLoopSetoptionsOverrideCommandParameterInfo = new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); - colorControlcolorLoopSetCommandParams.put("optionsOverride",colorControlcolorLoopSetoptionsOverrideCommandParameterInfo); - InteractionInfo colorControlcolorLoopSetInteractionInfo = new InteractionInfo( + Map channelchangeChannelCommandParams = new LinkedHashMap(); + + CommandParameterInfo channelchangeChannelmatchCommandParameterInfo = new CommandParameterInfo("match", String.class, String.class); + channelchangeChannelCommandParams.put("match",channelchangeChannelmatchCommandParameterInfo); + InteractionInfo channelchangeChannelInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ColorControlCluster) cluster) - .colorLoopSet((DefaultClusterCallback) callback - , (Integer) - commandArguments.get("updateFlags") - , (Integer) - commandArguments.get("action") - , (Integer) - commandArguments.get("direction") - , (Integer) - commandArguments.get("time") - , (Integer) - commandArguments.get("startHue") - , (Integer) - commandArguments.get("optionsMask") - , (Integer) - commandArguments.get("optionsOverride") - ); - }, - () -> new DelegatedDefaultClusterCallback(), - colorControlcolorLoopSetCommandParams - ); - colorControlClusterInteractionInfoMap.put("colorLoopSet", colorControlcolorLoopSetInteractionInfo); + ((ChipClusters.ChannelCluster) cluster) + .changeChannel((ChipClusters.ChannelCluster.ChangeChannelResponseCallback) callback + , (String) + commandArguments.get("match") - Map colorControlstopMoveStepCommandParams = new LinkedHashMap(); + ); + }, + () -> new DelegatedChannelClusterChangeChannelResponseCallback(), + channelchangeChannelCommandParams + ); + channelClusterInteractionInfoMap.put("changeChannel", channelchangeChannelInteractionInfo); - CommandParameterInfo colorControlstopMoveStepoptionsMaskCommandParameterInfo = new CommandParameterInfo("optionsMask", Integer.class, Integer.class); - colorControlstopMoveStepCommandParams.put("optionsMask",colorControlstopMoveStepoptionsMaskCommandParameterInfo); + Map channelchangeChannelByNumberCommandParams = new LinkedHashMap(); - CommandParameterInfo colorControlstopMoveStepoptionsOverrideCommandParameterInfo = new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); - colorControlstopMoveStepCommandParams.put("optionsOverride",colorControlstopMoveStepoptionsOverrideCommandParameterInfo); - InteractionInfo colorControlstopMoveStepInteractionInfo = new InteractionInfo( + CommandParameterInfo channelchangeChannelByNumbermajorNumberCommandParameterInfo = new CommandParameterInfo("majorNumber", Integer.class, Integer.class); + channelchangeChannelByNumberCommandParams.put("majorNumber",channelchangeChannelByNumbermajorNumberCommandParameterInfo); + + CommandParameterInfo channelchangeChannelByNumberminorNumberCommandParameterInfo = new CommandParameterInfo("minorNumber", Integer.class, Integer.class); + channelchangeChannelByNumberCommandParams.put("minorNumber",channelchangeChannelByNumberminorNumberCommandParameterInfo); + InteractionInfo channelchangeChannelByNumberInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ColorControlCluster) cluster) - .stopMoveStep((DefaultClusterCallback) callback + ((ChipClusters.ChannelCluster) cluster) + .changeChannelByNumber((DefaultClusterCallback) callback , (Integer) - commandArguments.get("optionsMask") + commandArguments.get("majorNumber") , (Integer) - commandArguments.get("optionsOverride") + commandArguments.get("minorNumber") ); }, () -> new DelegatedDefaultClusterCallback(), - colorControlstopMoveStepCommandParams + channelchangeChannelByNumberCommandParams ); - colorControlClusterInteractionInfoMap.put("stopMoveStep", colorControlstopMoveStepInteractionInfo); - - Map colorControlmoveColorTemperatureCommandParams = new LinkedHashMap(); - - CommandParameterInfo colorControlmoveColorTemperaturemoveModeCommandParameterInfo = new CommandParameterInfo("moveMode", Integer.class, Integer.class); - colorControlmoveColorTemperatureCommandParams.put("moveMode",colorControlmoveColorTemperaturemoveModeCommandParameterInfo); - - CommandParameterInfo colorControlmoveColorTemperaturerateCommandParameterInfo = new CommandParameterInfo("rate", Integer.class, Integer.class); - colorControlmoveColorTemperatureCommandParams.put("rate",colorControlmoveColorTemperaturerateCommandParameterInfo); - - CommandParameterInfo colorControlmoveColorTemperaturecolorTemperatureMinimumMiredsCommandParameterInfo = new CommandParameterInfo("colorTemperatureMinimumMireds", Integer.class, Integer.class); - colorControlmoveColorTemperatureCommandParams.put("colorTemperatureMinimumMireds",colorControlmoveColorTemperaturecolorTemperatureMinimumMiredsCommandParameterInfo); - - CommandParameterInfo colorControlmoveColorTemperaturecolorTemperatureMaximumMiredsCommandParameterInfo = new CommandParameterInfo("colorTemperatureMaximumMireds", Integer.class, Integer.class); - colorControlmoveColorTemperatureCommandParams.put("colorTemperatureMaximumMireds",colorControlmoveColorTemperaturecolorTemperatureMaximumMiredsCommandParameterInfo); + channelClusterInteractionInfoMap.put("changeChannelByNumber", channelchangeChannelByNumberInteractionInfo); - CommandParameterInfo colorControlmoveColorTemperatureoptionsMaskCommandParameterInfo = new CommandParameterInfo("optionsMask", Integer.class, Integer.class); - colorControlmoveColorTemperatureCommandParams.put("optionsMask",colorControlmoveColorTemperatureoptionsMaskCommandParameterInfo); + Map channelskipChannelCommandParams = new LinkedHashMap(); - CommandParameterInfo colorControlmoveColorTemperatureoptionsOverrideCommandParameterInfo = new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); - colorControlmoveColorTemperatureCommandParams.put("optionsOverride",colorControlmoveColorTemperatureoptionsOverrideCommandParameterInfo); - InteractionInfo colorControlmoveColorTemperatureInteractionInfo = new InteractionInfo( + CommandParameterInfo channelskipChannelcountCommandParameterInfo = new CommandParameterInfo("count", Integer.class, Integer.class); + channelskipChannelCommandParams.put("count",channelskipChannelcountCommandParameterInfo); + InteractionInfo channelskipChannelInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ColorControlCluster) cluster) - .moveColorTemperature((DefaultClusterCallback) callback - , (Integer) - commandArguments.get("moveMode") - , (Integer) - commandArguments.get("rate") - , (Integer) - commandArguments.get("colorTemperatureMinimumMireds") - , (Integer) - commandArguments.get("colorTemperatureMaximumMireds") - , (Integer) - commandArguments.get("optionsMask") + ((ChipClusters.ChannelCluster) cluster) + .skipChannel((DefaultClusterCallback) callback , (Integer) - commandArguments.get("optionsOverride") + commandArguments.get("count") ); }, () -> new DelegatedDefaultClusterCallback(), - colorControlmoveColorTemperatureCommandParams + channelskipChannelCommandParams ); - colorControlClusterInteractionInfoMap.put("moveColorTemperature", colorControlmoveColorTemperatureInteractionInfo); + channelClusterInteractionInfoMap.put("skipChannel", channelskipChannelInteractionInfo); - Map colorControlstepColorTemperatureCommandParams = new LinkedHashMap(); + Map channelgetProgramGuideCommandParams = new LinkedHashMap(); - CommandParameterInfo colorControlstepColorTemperaturestepModeCommandParameterInfo = new CommandParameterInfo("stepMode", Integer.class, Integer.class); - colorControlstepColorTemperatureCommandParams.put("stepMode",colorControlstepColorTemperaturestepModeCommandParameterInfo); + CommandParameterInfo channelgetProgramGuidestartTimeCommandParameterInfo = new CommandParameterInfo("startTime", Optional.class, Long.class); + channelgetProgramGuideCommandParams.put("startTime",channelgetProgramGuidestartTimeCommandParameterInfo); - CommandParameterInfo colorControlstepColorTemperaturestepSizeCommandParameterInfo = new CommandParameterInfo("stepSize", Integer.class, Integer.class); - colorControlstepColorTemperatureCommandParams.put("stepSize",colorControlstepColorTemperaturestepSizeCommandParameterInfo); + CommandParameterInfo channelgetProgramGuideendTimeCommandParameterInfo = new CommandParameterInfo("endTime", Optional.class, Long.class); + channelgetProgramGuideCommandParams.put("endTime",channelgetProgramGuideendTimeCommandParameterInfo); - CommandParameterInfo colorControlstepColorTemperaturetransitionTimeCommandParameterInfo = new CommandParameterInfo("transitionTime", Integer.class, Integer.class); - colorControlstepColorTemperatureCommandParams.put("transitionTime",colorControlstepColorTemperaturetransitionTimeCommandParameterInfo); - CommandParameterInfo colorControlstepColorTemperaturecolorTemperatureMinimumMiredsCommandParameterInfo = new CommandParameterInfo("colorTemperatureMinimumMireds", Integer.class, Integer.class); - colorControlstepColorTemperatureCommandParams.put("colorTemperatureMinimumMireds",colorControlstepColorTemperaturecolorTemperatureMinimumMiredsCommandParameterInfo); - CommandParameterInfo colorControlstepColorTemperaturecolorTemperatureMaximumMiredsCommandParameterInfo = new CommandParameterInfo("colorTemperatureMaximumMireds", Integer.class, Integer.class); - colorControlstepColorTemperatureCommandParams.put("colorTemperatureMaximumMireds",colorControlstepColorTemperaturecolorTemperatureMaximumMiredsCommandParameterInfo); + CommandParameterInfo channelgetProgramGuiderecordingFlagCommandParameterInfo = new CommandParameterInfo("recordingFlag", Optional.class, Long.class); + channelgetProgramGuideCommandParams.put("recordingFlag",channelgetProgramGuiderecordingFlagCommandParameterInfo); - CommandParameterInfo colorControlstepColorTemperatureoptionsMaskCommandParameterInfo = new CommandParameterInfo("optionsMask", Integer.class, Integer.class); - colorControlstepColorTemperatureCommandParams.put("optionsMask",colorControlstepColorTemperatureoptionsMaskCommandParameterInfo); - CommandParameterInfo colorControlstepColorTemperatureoptionsOverrideCommandParameterInfo = new CommandParameterInfo("optionsOverride", Integer.class, Integer.class); - colorControlstepColorTemperatureCommandParams.put("optionsOverride",colorControlstepColorTemperatureoptionsOverrideCommandParameterInfo); - InteractionInfo colorControlstepColorTemperatureInteractionInfo = new InteractionInfo( + CommandParameterInfo channelgetProgramGuidedataCommandParameterInfo = new CommandParameterInfo("data", Optional.class, byte[].class); + channelgetProgramGuideCommandParams.put("data",channelgetProgramGuidedataCommandParameterInfo); + InteractionInfo channelgetProgramGuideInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ColorControlCluster) cluster) - .stepColorTemperature((DefaultClusterCallback) callback - , (Integer) - commandArguments.get("stepMode") - , (Integer) - commandArguments.get("stepSize") - , (Integer) - commandArguments.get("transitionTime") - , (Integer) - commandArguments.get("colorTemperatureMinimumMireds") - , (Integer) - commandArguments.get("colorTemperatureMaximumMireds") - , (Integer) - commandArguments.get("optionsMask") - , (Integer) - commandArguments.get("optionsOverride") - ); - }, - () -> new DelegatedDefaultClusterCallback(), - colorControlstepColorTemperatureCommandParams - ); - colorControlClusterInteractionInfoMap.put("stepColorTemperature", colorControlstepColorTemperatureInteractionInfo); + ((ChipClusters.ChannelCluster) cluster) + .getProgramGuide((ChipClusters.ChannelCluster.ProgramGuideResponseCallback) callback + , (Optional) + commandArguments.get("startTime") + + , (Optional) + commandArguments.get("endTime") + + , (Optional>) + commandArguments.get("channelList") + + , (Optional) + commandArguments.get("pageToken") - commandMap.put("colorControl", colorControlClusterInteractionInfoMap); + , (Optional) + commandArguments.get("recordingFlag") - Map ballastConfigurationClusterInteractionInfoMap = new LinkedHashMap<>(); + , (Optional>) + commandArguments.get("externalIDList") - commandMap.put("ballastConfiguration", ballastConfigurationClusterInteractionInfoMap); + , (Optional) + commandArguments.get("data") - Map illuminanceMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + ); + }, + () -> new DelegatedChannelClusterProgramGuideResponseCallback(), + channelgetProgramGuideCommandParams + ); + channelClusterInteractionInfoMap.put("getProgramGuide", channelgetProgramGuideInteractionInfo); - commandMap.put("illuminanceMeasurement", illuminanceMeasurementClusterInteractionInfoMap); + Map channelrecordProgramCommandParams = new LinkedHashMap(); - Map temperatureMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + CommandParameterInfo channelrecordProgramprogramIdentifierCommandParameterInfo = new CommandParameterInfo("programIdentifier", String.class, String.class); + channelrecordProgramCommandParams.put("programIdentifier",channelrecordProgramprogramIdentifierCommandParameterInfo); - commandMap.put("temperatureMeasurement", temperatureMeasurementClusterInteractionInfoMap); + CommandParameterInfo channelrecordProgramshouldRecordSeriesCommandParameterInfo = new CommandParameterInfo("shouldRecordSeries", Boolean.class, Boolean.class); + channelrecordProgramCommandParams.put("shouldRecordSeries",channelrecordProgramshouldRecordSeriesCommandParameterInfo); - Map pressureMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); - commandMap.put("pressureMeasurement", pressureMeasurementClusterInteractionInfoMap); + CommandParameterInfo channelrecordProgramdataCommandParameterInfo = new CommandParameterInfo("data", byte[].class, byte[].class); + channelrecordProgramCommandParams.put("data",channelrecordProgramdataCommandParameterInfo); + InteractionInfo channelrecordProgramInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ChannelCluster) cluster) + .recordProgram((DefaultClusterCallback) callback + , (String) + commandArguments.get("programIdentifier") + , (Boolean) + commandArguments.get("shouldRecordSeries") + , (ArrayList) + commandArguments.get("externalIDList") + , (byte[]) + commandArguments.get("data") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + channelrecordProgramCommandParams + ); + channelClusterInteractionInfoMap.put("recordProgram", channelrecordProgramInteractionInfo); - Map flowMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + Map channelcancelRecordProgramCommandParams = new LinkedHashMap(); - commandMap.put("flowMeasurement", flowMeasurementClusterInteractionInfoMap); + CommandParameterInfo channelcancelRecordProgramprogramIdentifierCommandParameterInfo = new CommandParameterInfo("programIdentifier", String.class, String.class); + channelcancelRecordProgramCommandParams.put("programIdentifier",channelcancelRecordProgramprogramIdentifierCommandParameterInfo); - Map relativeHumidityMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + CommandParameterInfo channelcancelRecordProgramshouldRecordSeriesCommandParameterInfo = new CommandParameterInfo("shouldRecordSeries", Boolean.class, Boolean.class); + channelcancelRecordProgramCommandParams.put("shouldRecordSeries",channelcancelRecordProgramshouldRecordSeriesCommandParameterInfo); - commandMap.put("relativeHumidityMeasurement", relativeHumidityMeasurementClusterInteractionInfoMap); - Map occupancySensingClusterInteractionInfoMap = new LinkedHashMap<>(); + CommandParameterInfo channelcancelRecordProgramdataCommandParameterInfo = new CommandParameterInfo("data", byte[].class, byte[].class); + channelcancelRecordProgramCommandParams.put("data",channelcancelRecordProgramdataCommandParameterInfo); + InteractionInfo channelcancelRecordProgramInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ChannelCluster) cluster) + .cancelRecordProgram((DefaultClusterCallback) callback + , (String) + commandArguments.get("programIdentifier") + , (Boolean) + commandArguments.get("shouldRecordSeries") + , (ArrayList) + commandArguments.get("externalIDList") + , (byte[]) + commandArguments.get("data") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + channelcancelRecordProgramCommandParams + ); + channelClusterInteractionInfoMap.put("cancelRecordProgram", channelcancelRecordProgramInteractionInfo); - commandMap.put("occupancySensing", occupancySensingClusterInteractionInfoMap); + commandMap.put("channel", channelClusterInteractionInfoMap); - Map carbonMonoxideConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + Map targetNavigatorClusterInteractionInfoMap = new LinkedHashMap<>(); - commandMap.put("carbonMonoxideConcentrationMeasurement", carbonMonoxideConcentrationMeasurementClusterInteractionInfoMap); + Map targetNavigatornavigateTargetCommandParams = new LinkedHashMap(); - Map carbonDioxideConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + CommandParameterInfo targetNavigatornavigateTargettargetCommandParameterInfo = new CommandParameterInfo("target", Integer.class, Integer.class); + targetNavigatornavigateTargetCommandParams.put("target",targetNavigatornavigateTargettargetCommandParameterInfo); - commandMap.put("carbonDioxideConcentrationMeasurement", carbonDioxideConcentrationMeasurementClusterInteractionInfoMap); + CommandParameterInfo targetNavigatornavigateTargetdataCommandParameterInfo = new CommandParameterInfo("data", Optional.class, String.class); + targetNavigatornavigateTargetCommandParams.put("data",targetNavigatornavigateTargetdataCommandParameterInfo); + InteractionInfo targetNavigatornavigateTargetInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TargetNavigatorCluster) cluster) + .navigateTarget((ChipClusters.TargetNavigatorCluster.NavigateTargetResponseCallback) callback + , (Integer) + commandArguments.get("target") - Map nitrogenDioxideConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + , (Optional) + commandArguments.get("data") - commandMap.put("nitrogenDioxideConcentrationMeasurement", nitrogenDioxideConcentrationMeasurementClusterInteractionInfoMap); + ); + }, + () -> new DelegatedTargetNavigatorClusterNavigateTargetResponseCallback(), + targetNavigatornavigateTargetCommandParams + ); + targetNavigatorClusterInteractionInfoMap.put("navigateTarget", targetNavigatornavigateTargetInteractionInfo); - Map ozoneConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + commandMap.put("targetNavigator", targetNavigatorClusterInteractionInfoMap); - commandMap.put("ozoneConcentrationMeasurement", ozoneConcentrationMeasurementClusterInteractionInfoMap); + Map mediaPlaybackClusterInteractionInfoMap = new LinkedHashMap<>(); - Map pm25ConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + Map mediaPlaybackplayCommandParams = new LinkedHashMap(); + InteractionInfo mediaPlaybackplayInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.MediaPlaybackCluster) cluster) + .play((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback + ); + }, + () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), + mediaPlaybackplayCommandParams + ); + mediaPlaybackClusterInteractionInfoMap.put("play", mediaPlaybackplayInteractionInfo); - commandMap.put("pm25ConcentrationMeasurement", pm25ConcentrationMeasurementClusterInteractionInfoMap); + Map mediaPlaybackpauseCommandParams = new LinkedHashMap(); + InteractionInfo mediaPlaybackpauseInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.MediaPlaybackCluster) cluster) + .pause((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback + ); + }, + () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), + mediaPlaybackpauseCommandParams + ); + mediaPlaybackClusterInteractionInfoMap.put("pause", mediaPlaybackpauseInteractionInfo); - Map formaldehydeConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + Map mediaPlaybackstopCommandParams = new LinkedHashMap(); + InteractionInfo mediaPlaybackstopInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.MediaPlaybackCluster) cluster) + .stop((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback + ); + }, + () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), + mediaPlaybackstopCommandParams + ); + mediaPlaybackClusterInteractionInfoMap.put("stop", mediaPlaybackstopInteractionInfo); - commandMap.put("formaldehydeConcentrationMeasurement", formaldehydeConcentrationMeasurementClusterInteractionInfoMap); + Map mediaPlaybackstartOverCommandParams = new LinkedHashMap(); + InteractionInfo mediaPlaybackstartOverInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.MediaPlaybackCluster) cluster) + .startOver((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback + ); + }, + () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), + mediaPlaybackstartOverCommandParams + ); + mediaPlaybackClusterInteractionInfoMap.put("startOver", mediaPlaybackstartOverInteractionInfo); - Map pm1ConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + Map mediaPlaybackpreviousCommandParams = new LinkedHashMap(); + InteractionInfo mediaPlaybackpreviousInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.MediaPlaybackCluster) cluster) + .previous((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback + ); + }, + () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), + mediaPlaybackpreviousCommandParams + ); + mediaPlaybackClusterInteractionInfoMap.put("previous", mediaPlaybackpreviousInteractionInfo); - commandMap.put("pm1ConcentrationMeasurement", pm1ConcentrationMeasurementClusterInteractionInfoMap); + Map mediaPlaybacknextCommandParams = new LinkedHashMap(); + InteractionInfo mediaPlaybacknextInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.MediaPlaybackCluster) cluster) + .next((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback + ); + }, + () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), + mediaPlaybacknextCommandParams + ); + mediaPlaybackClusterInteractionInfoMap.put("next", mediaPlaybacknextInteractionInfo); - Map pm10ConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + Map mediaPlaybackrewindCommandParams = new LinkedHashMap(); - commandMap.put("pm10ConcentrationMeasurement", pm10ConcentrationMeasurementClusterInteractionInfoMap); + CommandParameterInfo mediaPlaybackrewindaudioAdvanceUnmutedCommandParameterInfo = new CommandParameterInfo("audioAdvanceUnmuted", Optional.class, Boolean.class); + mediaPlaybackrewindCommandParams.put("audioAdvanceUnmuted",mediaPlaybackrewindaudioAdvanceUnmutedCommandParameterInfo); + InteractionInfo mediaPlaybackrewindInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.MediaPlaybackCluster) cluster) + .rewind((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback + , (Optional) + commandArguments.get("audioAdvanceUnmuted") - Map totalVolatileOrganicCompoundsConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + ); + }, + () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), + mediaPlaybackrewindCommandParams + ); + mediaPlaybackClusterInteractionInfoMap.put("rewind", mediaPlaybackrewindInteractionInfo); - commandMap.put("totalVolatileOrganicCompoundsConcentrationMeasurement", totalVolatileOrganicCompoundsConcentrationMeasurementClusterInteractionInfoMap); + Map mediaPlaybackfastForwardCommandParams = new LinkedHashMap(); - Map radonConcentrationMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); + CommandParameterInfo mediaPlaybackfastForwardaudioAdvanceUnmutedCommandParameterInfo = new CommandParameterInfo("audioAdvanceUnmuted", Optional.class, Boolean.class); + mediaPlaybackfastForwardCommandParams.put("audioAdvanceUnmuted",mediaPlaybackfastForwardaudioAdvanceUnmutedCommandParameterInfo); + InteractionInfo mediaPlaybackfastForwardInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.MediaPlaybackCluster) cluster) + .fastForward((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback + , (Optional) + commandArguments.get("audioAdvanceUnmuted") - commandMap.put("radonConcentrationMeasurement", radonConcentrationMeasurementClusterInteractionInfoMap); + ); + }, + () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), + mediaPlaybackfastForwardCommandParams + ); + mediaPlaybackClusterInteractionInfoMap.put("fastForward", mediaPlaybackfastForwardInteractionInfo); - Map wiFiNetworkManagementClusterInteractionInfoMap = new LinkedHashMap<>(); + Map mediaPlaybackskipForwardCommandParams = new LinkedHashMap(); - Map wiFiNetworkManagementnetworkPassphraseRequestCommandParams = new LinkedHashMap(); - InteractionInfo wiFiNetworkManagementnetworkPassphraseRequestInteractionInfo = new InteractionInfo( + CommandParameterInfo mediaPlaybackskipForwarddeltaPositionMillisecondsCommandParameterInfo = new CommandParameterInfo("deltaPositionMilliseconds", Long.class, Long.class); + mediaPlaybackskipForwardCommandParams.put("deltaPositionMilliseconds",mediaPlaybackskipForwarddeltaPositionMillisecondsCommandParameterInfo); + InteractionInfo mediaPlaybackskipForwardInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WiFiNetworkManagementCluster) cluster) - .networkPassphraseRequest((ChipClusters.WiFiNetworkManagementCluster.NetworkPassphraseResponseCallback) callback + ((ChipClusters.MediaPlaybackCluster) cluster) + .skipForward((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback + , (Long) + commandArguments.get("deltaPositionMilliseconds") + ); }, - () -> new DelegatedWiFiNetworkManagementClusterNetworkPassphraseResponseCallback(), - wiFiNetworkManagementnetworkPassphraseRequestCommandParams + () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), + mediaPlaybackskipForwardCommandParams ); - wiFiNetworkManagementClusterInteractionInfoMap.put("networkPassphraseRequest", wiFiNetworkManagementnetworkPassphraseRequestInteractionInfo); - - commandMap.put("wiFiNetworkManagement", wiFiNetworkManagementClusterInteractionInfoMap); + mediaPlaybackClusterInteractionInfoMap.put("skipForward", mediaPlaybackskipForwardInteractionInfo); - Map threadBorderRouterManagementClusterInteractionInfoMap = new LinkedHashMap<>(); + Map mediaPlaybackskipBackwardCommandParams = new LinkedHashMap(); - Map threadBorderRouterManagementgetActiveDatasetRequestCommandParams = new LinkedHashMap(); - InteractionInfo threadBorderRouterManagementgetActiveDatasetRequestInteractionInfo = new InteractionInfo( + CommandParameterInfo mediaPlaybackskipBackwarddeltaPositionMillisecondsCommandParameterInfo = new CommandParameterInfo("deltaPositionMilliseconds", Long.class, Long.class); + mediaPlaybackskipBackwardCommandParams.put("deltaPositionMilliseconds",mediaPlaybackskipBackwarddeltaPositionMillisecondsCommandParameterInfo); + InteractionInfo mediaPlaybackskipBackwardInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ThreadBorderRouterManagementCluster) cluster) - .getActiveDatasetRequest((ChipClusters.ThreadBorderRouterManagementCluster.DatasetResponseCallback) callback + ((ChipClusters.MediaPlaybackCluster) cluster) + .skipBackward((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback + , (Long) + commandArguments.get("deltaPositionMilliseconds") + ); }, - () -> new DelegatedThreadBorderRouterManagementClusterDatasetResponseCallback(), - threadBorderRouterManagementgetActiveDatasetRequestCommandParams + () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), + mediaPlaybackskipBackwardCommandParams ); - threadBorderRouterManagementClusterInteractionInfoMap.put("getActiveDatasetRequest", threadBorderRouterManagementgetActiveDatasetRequestInteractionInfo); + mediaPlaybackClusterInteractionInfoMap.put("skipBackward", mediaPlaybackskipBackwardInteractionInfo); - Map threadBorderRouterManagementgetPendingDatasetRequestCommandParams = new LinkedHashMap(); - InteractionInfo threadBorderRouterManagementgetPendingDatasetRequestInteractionInfo = new InteractionInfo( + Map mediaPlaybackseekCommandParams = new LinkedHashMap(); + + CommandParameterInfo mediaPlaybackseekpositionCommandParameterInfo = new CommandParameterInfo("position", Long.class, Long.class); + mediaPlaybackseekCommandParams.put("position",mediaPlaybackseekpositionCommandParameterInfo); + InteractionInfo mediaPlaybackseekInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ThreadBorderRouterManagementCluster) cluster) - .getPendingDatasetRequest((ChipClusters.ThreadBorderRouterManagementCluster.DatasetResponseCallback) callback + ((ChipClusters.MediaPlaybackCluster) cluster) + .seek((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback + , (Long) + commandArguments.get("position") + ); }, - () -> new DelegatedThreadBorderRouterManagementClusterDatasetResponseCallback(), - threadBorderRouterManagementgetPendingDatasetRequestCommandParams + () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), + mediaPlaybackseekCommandParams ); - threadBorderRouterManagementClusterInteractionInfoMap.put("getPendingDatasetRequest", threadBorderRouterManagementgetPendingDatasetRequestInteractionInfo); + mediaPlaybackClusterInteractionInfoMap.put("seek", mediaPlaybackseekInteractionInfo); - Map threadBorderRouterManagementsetActiveDatasetRequestCommandParams = new LinkedHashMap(); + Map mediaPlaybackactivateAudioTrackCommandParams = new LinkedHashMap(); - CommandParameterInfo threadBorderRouterManagementsetActiveDatasetRequestactiveDatasetCommandParameterInfo = new CommandParameterInfo("activeDataset", byte[].class, byte[].class); - threadBorderRouterManagementsetActiveDatasetRequestCommandParams.put("activeDataset",threadBorderRouterManagementsetActiveDatasetRequestactiveDatasetCommandParameterInfo); + CommandParameterInfo mediaPlaybackactivateAudioTracktrackIDCommandParameterInfo = new CommandParameterInfo("trackID", String.class, String.class); + mediaPlaybackactivateAudioTrackCommandParams.put("trackID",mediaPlaybackactivateAudioTracktrackIDCommandParameterInfo); - CommandParameterInfo threadBorderRouterManagementsetActiveDatasetRequestbreadcrumbCommandParameterInfo = new CommandParameterInfo("breadcrumb", Optional.class, Long.class); - threadBorderRouterManagementsetActiveDatasetRequestCommandParams.put("breadcrumb",threadBorderRouterManagementsetActiveDatasetRequestbreadcrumbCommandParameterInfo); - InteractionInfo threadBorderRouterManagementsetActiveDatasetRequestInteractionInfo = new InteractionInfo( + CommandParameterInfo mediaPlaybackactivateAudioTrackaudioOutputIndexCommandParameterInfo = new CommandParameterInfo("audioOutputIndex", Integer.class, Integer.class); + mediaPlaybackactivateAudioTrackCommandParams.put("audioOutputIndex",mediaPlaybackactivateAudioTrackaudioOutputIndexCommandParameterInfo); + InteractionInfo mediaPlaybackactivateAudioTrackInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ThreadBorderRouterManagementCluster) cluster) - .setActiveDatasetRequest((DefaultClusterCallback) callback - , (byte[]) - commandArguments.get("activeDataset") - , (Optional) - commandArguments.get("breadcrumb") + ((ChipClusters.MediaPlaybackCluster) cluster) + .activateAudioTrack((DefaultClusterCallback) callback + , (String) + commandArguments.get("trackID") + , (Integer) + commandArguments.get("audioOutputIndex") ); }, () -> new DelegatedDefaultClusterCallback(), - threadBorderRouterManagementsetActiveDatasetRequestCommandParams + mediaPlaybackactivateAudioTrackCommandParams ); - threadBorderRouterManagementClusterInteractionInfoMap.put("setActiveDatasetRequest", threadBorderRouterManagementsetActiveDatasetRequestInteractionInfo); + mediaPlaybackClusterInteractionInfoMap.put("activateAudioTrack", mediaPlaybackactivateAudioTrackInteractionInfo); - Map threadBorderRouterManagementsetPendingDatasetRequestCommandParams = new LinkedHashMap(); + Map mediaPlaybackactivateTextTrackCommandParams = new LinkedHashMap(); - CommandParameterInfo threadBorderRouterManagementsetPendingDatasetRequestpendingDatasetCommandParameterInfo = new CommandParameterInfo("pendingDataset", byte[].class, byte[].class); - threadBorderRouterManagementsetPendingDatasetRequestCommandParams.put("pendingDataset",threadBorderRouterManagementsetPendingDatasetRequestpendingDatasetCommandParameterInfo); - InteractionInfo threadBorderRouterManagementsetPendingDatasetRequestInteractionInfo = new InteractionInfo( + CommandParameterInfo mediaPlaybackactivateTextTracktrackIDCommandParameterInfo = new CommandParameterInfo("trackID", String.class, String.class); + mediaPlaybackactivateTextTrackCommandParams.put("trackID",mediaPlaybackactivateTextTracktrackIDCommandParameterInfo); + InteractionInfo mediaPlaybackactivateTextTrackInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ThreadBorderRouterManagementCluster) cluster) - .setPendingDatasetRequest((DefaultClusterCallback) callback - , (byte[]) - commandArguments.get("pendingDataset") + ((ChipClusters.MediaPlaybackCluster) cluster) + .activateTextTrack((DefaultClusterCallback) callback + , (String) + commandArguments.get("trackID") ); }, () -> new DelegatedDefaultClusterCallback(), - threadBorderRouterManagementsetPendingDatasetRequestCommandParams + mediaPlaybackactivateTextTrackCommandParams ); - threadBorderRouterManagementClusterInteractionInfoMap.put("setPendingDatasetRequest", threadBorderRouterManagementsetPendingDatasetRequestInteractionInfo); - - commandMap.put("threadBorderRouterManagement", threadBorderRouterManagementClusterInteractionInfoMap); - - Map threadNetworkDirectoryClusterInteractionInfoMap = new LinkedHashMap<>(); - - Map threadNetworkDirectoryaddNetworkCommandParams = new LinkedHashMap(); + mediaPlaybackClusterInteractionInfoMap.put("activateTextTrack", mediaPlaybackactivateTextTrackInteractionInfo); - CommandParameterInfo threadNetworkDirectoryaddNetworkoperationalDatasetCommandParameterInfo = new CommandParameterInfo("operationalDataset", byte[].class, byte[].class); - threadNetworkDirectoryaddNetworkCommandParams.put("operationalDataset",threadNetworkDirectoryaddNetworkoperationalDatasetCommandParameterInfo); - InteractionInfo threadNetworkDirectoryaddNetworkInteractionInfo = new InteractionInfo( + Map mediaPlaybackdeactivateTextTrackCommandParams = new LinkedHashMap(); + InteractionInfo mediaPlaybackdeactivateTextTrackInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ThreadNetworkDirectoryCluster) cluster) - .addNetwork((DefaultClusterCallback) callback - , (byte[]) - commandArguments.get("operationalDataset"), 10000 + ((ChipClusters.MediaPlaybackCluster) cluster) + .deactivateTextTrack((DefaultClusterCallback) callback ); }, () -> new DelegatedDefaultClusterCallback(), - threadNetworkDirectoryaddNetworkCommandParams + mediaPlaybackdeactivateTextTrackCommandParams ); - threadNetworkDirectoryClusterInteractionInfoMap.put("addNetwork", threadNetworkDirectoryaddNetworkInteractionInfo); + mediaPlaybackClusterInteractionInfoMap.put("deactivateTextTrack", mediaPlaybackdeactivateTextTrackInteractionInfo); - Map threadNetworkDirectoryremoveNetworkCommandParams = new LinkedHashMap(); + commandMap.put("mediaPlayback", mediaPlaybackClusterInteractionInfoMap); - CommandParameterInfo threadNetworkDirectoryremoveNetworkextendedPanIDCommandParameterInfo = new CommandParameterInfo("extendedPanID", byte[].class, byte[].class); - threadNetworkDirectoryremoveNetworkCommandParams.put("extendedPanID",threadNetworkDirectoryremoveNetworkextendedPanIDCommandParameterInfo); - InteractionInfo threadNetworkDirectoryremoveNetworkInteractionInfo = new InteractionInfo( + Map mediaInputClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map mediaInputselectInputCommandParams = new LinkedHashMap(); + + CommandParameterInfo mediaInputselectInputindexCommandParameterInfo = new CommandParameterInfo("index", Integer.class, Integer.class); + mediaInputselectInputCommandParams.put("index",mediaInputselectInputindexCommandParameterInfo); + InteractionInfo mediaInputselectInputInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ThreadNetworkDirectoryCluster) cluster) - .removeNetwork((DefaultClusterCallback) callback - , (byte[]) - commandArguments.get("extendedPanID"), 10000 + ((ChipClusters.MediaInputCluster) cluster) + .selectInput((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("index") ); }, () -> new DelegatedDefaultClusterCallback(), - threadNetworkDirectoryremoveNetworkCommandParams + mediaInputselectInputCommandParams ); - threadNetworkDirectoryClusterInteractionInfoMap.put("removeNetwork", threadNetworkDirectoryremoveNetworkInteractionInfo); - - Map threadNetworkDirectorygetOperationalDatasetCommandParams = new LinkedHashMap(); - - CommandParameterInfo threadNetworkDirectorygetOperationalDatasetextendedPanIDCommandParameterInfo = new CommandParameterInfo("extendedPanID", byte[].class, byte[].class); - threadNetworkDirectorygetOperationalDatasetCommandParams.put("extendedPanID",threadNetworkDirectorygetOperationalDatasetextendedPanIDCommandParameterInfo); - InteractionInfo threadNetworkDirectorygetOperationalDatasetInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ThreadNetworkDirectoryCluster) cluster) - .getOperationalDataset((ChipClusters.ThreadNetworkDirectoryCluster.OperationalDatasetResponseCallback) callback - , (byte[]) - commandArguments.get("extendedPanID") - - ); - }, - () -> new DelegatedThreadNetworkDirectoryClusterOperationalDatasetResponseCallback(), - threadNetworkDirectorygetOperationalDatasetCommandParams - ); - threadNetworkDirectoryClusterInteractionInfoMap.put("getOperationalDataset", threadNetworkDirectorygetOperationalDatasetInteractionInfo); - - commandMap.put("threadNetworkDirectory", threadNetworkDirectoryClusterInteractionInfoMap); - - Map wakeOnLanClusterInteractionInfoMap = new LinkedHashMap<>(); - - commandMap.put("wakeOnLan", wakeOnLanClusterInteractionInfoMap); - - Map channelClusterInteractionInfoMap = new LinkedHashMap<>(); - - Map channelchangeChannelCommandParams = new LinkedHashMap(); - - CommandParameterInfo channelchangeChannelmatchCommandParameterInfo = new CommandParameterInfo("match", String.class, String.class); - channelchangeChannelCommandParams.put("match",channelchangeChannelmatchCommandParameterInfo); - InteractionInfo channelchangeChannelInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ChannelCluster) cluster) - .changeChannel((ChipClusters.ChannelCluster.ChangeChannelResponseCallback) callback - , (String) - commandArguments.get("match") - - ); - }, - () -> new DelegatedChannelClusterChangeChannelResponseCallback(), - channelchangeChannelCommandParams - ); - channelClusterInteractionInfoMap.put("changeChannel", channelchangeChannelInteractionInfo); - - Map channelchangeChannelByNumberCommandParams = new LinkedHashMap(); - - CommandParameterInfo channelchangeChannelByNumbermajorNumberCommandParameterInfo = new CommandParameterInfo("majorNumber", Integer.class, Integer.class); - channelchangeChannelByNumberCommandParams.put("majorNumber",channelchangeChannelByNumbermajorNumberCommandParameterInfo); + mediaInputClusterInteractionInfoMap.put("selectInput", mediaInputselectInputInteractionInfo); - CommandParameterInfo channelchangeChannelByNumberminorNumberCommandParameterInfo = new CommandParameterInfo("minorNumber", Integer.class, Integer.class); - channelchangeChannelByNumberCommandParams.put("minorNumber",channelchangeChannelByNumberminorNumberCommandParameterInfo); - InteractionInfo channelchangeChannelByNumberInteractionInfo = new InteractionInfo( + Map mediaInputshowInputStatusCommandParams = new LinkedHashMap(); + InteractionInfo mediaInputshowInputStatusInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ChannelCluster) cluster) - .changeChannelByNumber((DefaultClusterCallback) callback - , (Integer) - commandArguments.get("majorNumber") - , (Integer) - commandArguments.get("minorNumber") + ((ChipClusters.MediaInputCluster) cluster) + .showInputStatus((DefaultClusterCallback) callback ); }, () -> new DelegatedDefaultClusterCallback(), - channelchangeChannelByNumberCommandParams + mediaInputshowInputStatusCommandParams ); - channelClusterInteractionInfoMap.put("changeChannelByNumber", channelchangeChannelByNumberInteractionInfo); - - Map channelskipChannelCommandParams = new LinkedHashMap(); + mediaInputClusterInteractionInfoMap.put("showInputStatus", mediaInputshowInputStatusInteractionInfo); - CommandParameterInfo channelskipChannelcountCommandParameterInfo = new CommandParameterInfo("count", Integer.class, Integer.class); - channelskipChannelCommandParams.put("count",channelskipChannelcountCommandParameterInfo); - InteractionInfo channelskipChannelInteractionInfo = new InteractionInfo( + Map mediaInputhideInputStatusCommandParams = new LinkedHashMap(); + InteractionInfo mediaInputhideInputStatusInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ChannelCluster) cluster) - .skipChannel((DefaultClusterCallback) callback - , (Integer) - commandArguments.get("count") + ((ChipClusters.MediaInputCluster) cluster) + .hideInputStatus((DefaultClusterCallback) callback ); }, () -> new DelegatedDefaultClusterCallback(), - channelskipChannelCommandParams + mediaInputhideInputStatusCommandParams ); - channelClusterInteractionInfoMap.put("skipChannel", channelskipChannelInteractionInfo); - - Map channelgetProgramGuideCommandParams = new LinkedHashMap(); - - CommandParameterInfo channelgetProgramGuidestartTimeCommandParameterInfo = new CommandParameterInfo("startTime", Optional.class, Long.class); - channelgetProgramGuideCommandParams.put("startTime",channelgetProgramGuidestartTimeCommandParameterInfo); - - CommandParameterInfo channelgetProgramGuideendTimeCommandParameterInfo = new CommandParameterInfo("endTime", Optional.class, Long.class); - channelgetProgramGuideCommandParams.put("endTime",channelgetProgramGuideendTimeCommandParameterInfo); - - - - CommandParameterInfo channelgetProgramGuiderecordingFlagCommandParameterInfo = new CommandParameterInfo("recordingFlag", Optional.class, Long.class); - channelgetProgramGuideCommandParams.put("recordingFlag",channelgetProgramGuiderecordingFlagCommandParameterInfo); - - - CommandParameterInfo channelgetProgramGuidedataCommandParameterInfo = new CommandParameterInfo("data", Optional.class, byte[].class); - channelgetProgramGuideCommandParams.put("data",channelgetProgramGuidedataCommandParameterInfo); - InteractionInfo channelgetProgramGuideInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ChannelCluster) cluster) - .getProgramGuide((ChipClusters.ChannelCluster.ProgramGuideResponseCallback) callback - , (Optional) - commandArguments.get("startTime") - - , (Optional) - commandArguments.get("endTime") - - , (Optional>) - commandArguments.get("channelList") - - , (Optional) - commandArguments.get("pageToken") - - , (Optional) - commandArguments.get("recordingFlag") - - , (Optional>) - commandArguments.get("externalIDList") - - , (Optional) - commandArguments.get("data") - - ); - }, - () -> new DelegatedChannelClusterProgramGuideResponseCallback(), - channelgetProgramGuideCommandParams - ); - channelClusterInteractionInfoMap.put("getProgramGuide", channelgetProgramGuideInteractionInfo); - - Map channelrecordProgramCommandParams = new LinkedHashMap(); - - CommandParameterInfo channelrecordProgramprogramIdentifierCommandParameterInfo = new CommandParameterInfo("programIdentifier", String.class, String.class); - channelrecordProgramCommandParams.put("programIdentifier",channelrecordProgramprogramIdentifierCommandParameterInfo); + mediaInputClusterInteractionInfoMap.put("hideInputStatus", mediaInputhideInputStatusInteractionInfo); - CommandParameterInfo channelrecordProgramshouldRecordSeriesCommandParameterInfo = new CommandParameterInfo("shouldRecordSeries", Boolean.class, Boolean.class); - channelrecordProgramCommandParams.put("shouldRecordSeries",channelrecordProgramshouldRecordSeriesCommandParameterInfo); + Map mediaInputrenameInputCommandParams = new LinkedHashMap(); + CommandParameterInfo mediaInputrenameInputindexCommandParameterInfo = new CommandParameterInfo("index", Integer.class, Integer.class); + mediaInputrenameInputCommandParams.put("index",mediaInputrenameInputindexCommandParameterInfo); - CommandParameterInfo channelrecordProgramdataCommandParameterInfo = new CommandParameterInfo("data", byte[].class, byte[].class); - channelrecordProgramCommandParams.put("data",channelrecordProgramdataCommandParameterInfo); - InteractionInfo channelrecordProgramInteractionInfo = new InteractionInfo( + CommandParameterInfo mediaInputrenameInputnameCommandParameterInfo = new CommandParameterInfo("name", String.class, String.class); + mediaInputrenameInputCommandParams.put("name",mediaInputrenameInputnameCommandParameterInfo); + InteractionInfo mediaInputrenameInputInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ChannelCluster) cluster) - .recordProgram((DefaultClusterCallback) callback + ((ChipClusters.MediaInputCluster) cluster) + .renameInput((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("index") , (String) - commandArguments.get("programIdentifier") - , (Boolean) - commandArguments.get("shouldRecordSeries") - , (ArrayList) - commandArguments.get("externalIDList") - , (byte[]) - commandArguments.get("data") + commandArguments.get("name") ); }, () -> new DelegatedDefaultClusterCallback(), - channelrecordProgramCommandParams + mediaInputrenameInputCommandParams ); - channelClusterInteractionInfoMap.put("recordProgram", channelrecordProgramInteractionInfo); - - Map channelcancelRecordProgramCommandParams = new LinkedHashMap(); - - CommandParameterInfo channelcancelRecordProgramprogramIdentifierCommandParameterInfo = new CommandParameterInfo("programIdentifier", String.class, String.class); - channelcancelRecordProgramCommandParams.put("programIdentifier",channelcancelRecordProgramprogramIdentifierCommandParameterInfo); + mediaInputClusterInteractionInfoMap.put("renameInput", mediaInputrenameInputInteractionInfo); - CommandParameterInfo channelcancelRecordProgramshouldRecordSeriesCommandParameterInfo = new CommandParameterInfo("shouldRecordSeries", Boolean.class, Boolean.class); - channelcancelRecordProgramCommandParams.put("shouldRecordSeries",channelcancelRecordProgramshouldRecordSeriesCommandParameterInfo); + commandMap.put("mediaInput", mediaInputClusterInteractionInfoMap); + Map lowPowerClusterInteractionInfoMap = new LinkedHashMap<>(); - CommandParameterInfo channelcancelRecordProgramdataCommandParameterInfo = new CommandParameterInfo("data", byte[].class, byte[].class); - channelcancelRecordProgramCommandParams.put("data",channelcancelRecordProgramdataCommandParameterInfo); - InteractionInfo channelcancelRecordProgramInteractionInfo = new InteractionInfo( + Map lowPowersleepCommandParams = new LinkedHashMap(); + InteractionInfo lowPowersleepInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ChannelCluster) cluster) - .cancelRecordProgram((DefaultClusterCallback) callback - , (String) - commandArguments.get("programIdentifier") - , (Boolean) - commandArguments.get("shouldRecordSeries") - , (ArrayList) - commandArguments.get("externalIDList") - , (byte[]) - commandArguments.get("data") + ((ChipClusters.LowPowerCluster) cluster) + .sleep((DefaultClusterCallback) callback ); }, () -> new DelegatedDefaultClusterCallback(), - channelcancelRecordProgramCommandParams + lowPowersleepCommandParams ); - channelClusterInteractionInfoMap.put("cancelRecordProgram", channelcancelRecordProgramInteractionInfo); - - commandMap.put("channel", channelClusterInteractionInfoMap); + lowPowerClusterInteractionInfoMap.put("sleep", lowPowersleepInteractionInfo); - Map targetNavigatorClusterInteractionInfoMap = new LinkedHashMap<>(); + commandMap.put("lowPower", lowPowerClusterInteractionInfoMap); - Map targetNavigatornavigateTargetCommandParams = new LinkedHashMap(); + Map keypadInputClusterInteractionInfoMap = new LinkedHashMap<>(); - CommandParameterInfo targetNavigatornavigateTargettargetCommandParameterInfo = new CommandParameterInfo("target", Integer.class, Integer.class); - targetNavigatornavigateTargetCommandParams.put("target",targetNavigatornavigateTargettargetCommandParameterInfo); + Map keypadInputsendKeyCommandParams = new LinkedHashMap(); - CommandParameterInfo targetNavigatornavigateTargetdataCommandParameterInfo = new CommandParameterInfo("data", Optional.class, String.class); - targetNavigatornavigateTargetCommandParams.put("data",targetNavigatornavigateTargetdataCommandParameterInfo); - InteractionInfo targetNavigatornavigateTargetInteractionInfo = new InteractionInfo( + CommandParameterInfo keypadInputsendKeykeyCodeCommandParameterInfo = new CommandParameterInfo("keyCode", Integer.class, Integer.class); + keypadInputsendKeyCommandParams.put("keyCode",keypadInputsendKeykeyCodeCommandParameterInfo); + InteractionInfo keypadInputsendKeyInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.TargetNavigatorCluster) cluster) - .navigateTarget((ChipClusters.TargetNavigatorCluster.NavigateTargetResponseCallback) callback + ((ChipClusters.KeypadInputCluster) cluster) + .sendKey((ChipClusters.KeypadInputCluster.SendKeyResponseCallback) callback , (Integer) - commandArguments.get("target") - - , (Optional) - commandArguments.get("data") + commandArguments.get("keyCode") ); }, - () -> new DelegatedTargetNavigatorClusterNavigateTargetResponseCallback(), - targetNavigatornavigateTargetCommandParams + () -> new DelegatedKeypadInputClusterSendKeyResponseCallback(), + keypadInputsendKeyCommandParams ); - targetNavigatorClusterInteractionInfoMap.put("navigateTarget", targetNavigatornavigateTargetInteractionInfo); + keypadInputClusterInteractionInfoMap.put("sendKey", keypadInputsendKeyInteractionInfo); - commandMap.put("targetNavigator", targetNavigatorClusterInteractionInfoMap); + commandMap.put("keypadInput", keypadInputClusterInteractionInfoMap); - Map mediaPlaybackClusterInteractionInfoMap = new LinkedHashMap<>(); + Map contentLauncherClusterInteractionInfoMap = new LinkedHashMap<>(); - Map mediaPlaybackplayCommandParams = new LinkedHashMap(); - InteractionInfo mediaPlaybackplayInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaPlaybackCluster) cluster) - .play((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback - ); - }, - () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), - mediaPlaybackplayCommandParams - ); - mediaPlaybackClusterInteractionInfoMap.put("play", mediaPlaybackplayInteractionInfo); + Map contentLauncherlaunchContentCommandParams = new LinkedHashMap(); - Map mediaPlaybackpauseCommandParams = new LinkedHashMap(); - InteractionInfo mediaPlaybackpauseInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaPlaybackCluster) cluster) - .pause((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback - ); - }, - () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), - mediaPlaybackpauseCommandParams - ); - mediaPlaybackClusterInteractionInfoMap.put("pause", mediaPlaybackpauseInteractionInfo); - Map mediaPlaybackstopCommandParams = new LinkedHashMap(); - InteractionInfo mediaPlaybackstopInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaPlaybackCluster) cluster) - .stop((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback - ); - }, - () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), - mediaPlaybackstopCommandParams - ); - mediaPlaybackClusterInteractionInfoMap.put("stop", mediaPlaybackstopInteractionInfo); + CommandParameterInfo contentLauncherlaunchContentautoPlayCommandParameterInfo = new CommandParameterInfo("autoPlay", Boolean.class, Boolean.class); + contentLauncherlaunchContentCommandParams.put("autoPlay",contentLauncherlaunchContentautoPlayCommandParameterInfo); - Map mediaPlaybackstartOverCommandParams = new LinkedHashMap(); - InteractionInfo mediaPlaybackstartOverInteractionInfo = new InteractionInfo( + CommandParameterInfo contentLauncherlaunchContentdataCommandParameterInfo = new CommandParameterInfo("data", Optional.class, String.class); + contentLauncherlaunchContentCommandParams.put("data",contentLauncherlaunchContentdataCommandParameterInfo); + + + CommandParameterInfo contentLauncherlaunchContentuseCurrentContextCommandParameterInfo = new CommandParameterInfo("useCurrentContext", Optional.class, Boolean.class); + contentLauncherlaunchContentCommandParams.put("useCurrentContext",contentLauncherlaunchContentuseCurrentContextCommandParameterInfo); + InteractionInfo contentLauncherlaunchContentInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaPlaybackCluster) cluster) - .startOver((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback + ((ChipClusters.ContentLauncherCluster) cluster) + .launchContent((ChipClusters.ContentLauncherCluster.LauncherResponseCallback) callback + , (ChipStructs.ContentLauncherClusterContentSearchStruct) + commandArguments.get("search") + + , (Boolean) + commandArguments.get("autoPlay") + + , (Optional) + commandArguments.get("data") + + , (Optional) + commandArguments.get("playbackPreferences") + + , (Optional) + commandArguments.get("useCurrentContext") + ); }, - () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), - mediaPlaybackstartOverCommandParams + () -> new DelegatedContentLauncherClusterLauncherResponseCallback(), + contentLauncherlaunchContentCommandParams ); - mediaPlaybackClusterInteractionInfoMap.put("startOver", mediaPlaybackstartOverInteractionInfo); + contentLauncherClusterInteractionInfoMap.put("launchContent", contentLauncherlaunchContentInteractionInfo); - Map mediaPlaybackpreviousCommandParams = new LinkedHashMap(); - InteractionInfo mediaPlaybackpreviousInteractionInfo = new InteractionInfo( + Map contentLauncherlaunchURLCommandParams = new LinkedHashMap(); + + CommandParameterInfo contentLauncherlaunchURLcontentURLCommandParameterInfo = new CommandParameterInfo("contentURL", String.class, String.class); + contentLauncherlaunchURLCommandParams.put("contentURL",contentLauncherlaunchURLcontentURLCommandParameterInfo); + + CommandParameterInfo contentLauncherlaunchURLdisplayStringCommandParameterInfo = new CommandParameterInfo("displayString", Optional.class, String.class); + contentLauncherlaunchURLCommandParams.put("displayString",contentLauncherlaunchURLdisplayStringCommandParameterInfo); + + InteractionInfo contentLauncherlaunchURLInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaPlaybackCluster) cluster) - .previous((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback + ((ChipClusters.ContentLauncherCluster) cluster) + .launchURL((ChipClusters.ContentLauncherCluster.LauncherResponseCallback) callback + , (String) + commandArguments.get("contentURL") + + , (Optional) + commandArguments.get("displayString") + + , (Optional) + commandArguments.get("brandingInformation") + ); }, - () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), - mediaPlaybackpreviousCommandParams + () -> new DelegatedContentLauncherClusterLauncherResponseCallback(), + contentLauncherlaunchURLCommandParams ); - mediaPlaybackClusterInteractionInfoMap.put("previous", mediaPlaybackpreviousInteractionInfo); + contentLauncherClusterInteractionInfoMap.put("launchURL", contentLauncherlaunchURLInteractionInfo); - Map mediaPlaybacknextCommandParams = new LinkedHashMap(); - InteractionInfo mediaPlaybacknextInteractionInfo = new InteractionInfo( + commandMap.put("contentLauncher", contentLauncherClusterInteractionInfoMap); + + Map audioOutputClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map audioOutputselectOutputCommandParams = new LinkedHashMap(); + + CommandParameterInfo audioOutputselectOutputindexCommandParameterInfo = new CommandParameterInfo("index", Integer.class, Integer.class); + audioOutputselectOutputCommandParams.put("index",audioOutputselectOutputindexCommandParameterInfo); + InteractionInfo audioOutputselectOutputInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaPlaybackCluster) cluster) - .next((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback - ); - }, - () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), - mediaPlaybacknextCommandParams - ); - mediaPlaybackClusterInteractionInfoMap.put("next", mediaPlaybacknextInteractionInfo); + ((ChipClusters.AudioOutputCluster) cluster) + .selectOutput((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("index") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + audioOutputselectOutputCommandParams + ); + audioOutputClusterInteractionInfoMap.put("selectOutput", audioOutputselectOutputInteractionInfo); - Map mediaPlaybackrewindCommandParams = new LinkedHashMap(); + Map audioOutputrenameOutputCommandParams = new LinkedHashMap(); - CommandParameterInfo mediaPlaybackrewindaudioAdvanceUnmutedCommandParameterInfo = new CommandParameterInfo("audioAdvanceUnmuted", Optional.class, Boolean.class); - mediaPlaybackrewindCommandParams.put("audioAdvanceUnmuted",mediaPlaybackrewindaudioAdvanceUnmutedCommandParameterInfo); - InteractionInfo mediaPlaybackrewindInteractionInfo = new InteractionInfo( + CommandParameterInfo audioOutputrenameOutputindexCommandParameterInfo = new CommandParameterInfo("index", Integer.class, Integer.class); + audioOutputrenameOutputCommandParams.put("index",audioOutputrenameOutputindexCommandParameterInfo); + + CommandParameterInfo audioOutputrenameOutputnameCommandParameterInfo = new CommandParameterInfo("name", String.class, String.class); + audioOutputrenameOutputCommandParams.put("name",audioOutputrenameOutputnameCommandParameterInfo); + InteractionInfo audioOutputrenameOutputInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaPlaybackCluster) cluster) - .rewind((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback - , (Optional) - commandArguments.get("audioAdvanceUnmuted") + ((ChipClusters.AudioOutputCluster) cluster) + .renameOutput((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("index") + , (String) + commandArguments.get("name") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + audioOutputrenameOutputCommandParams + ); + audioOutputClusterInteractionInfoMap.put("renameOutput", audioOutputrenameOutputInteractionInfo); - ); - }, - () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), - mediaPlaybackrewindCommandParams - ); - mediaPlaybackClusterInteractionInfoMap.put("rewind", mediaPlaybackrewindInteractionInfo); + commandMap.put("audioOutput", audioOutputClusterInteractionInfoMap); + + Map applicationLauncherClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map applicationLauncherlaunchAppCommandParams = new LinkedHashMap(); - Map mediaPlaybackfastForwardCommandParams = new LinkedHashMap(); - CommandParameterInfo mediaPlaybackfastForwardaudioAdvanceUnmutedCommandParameterInfo = new CommandParameterInfo("audioAdvanceUnmuted", Optional.class, Boolean.class); - mediaPlaybackfastForwardCommandParams.put("audioAdvanceUnmuted",mediaPlaybackfastForwardaudioAdvanceUnmutedCommandParameterInfo); - InteractionInfo mediaPlaybackfastForwardInteractionInfo = new InteractionInfo( + CommandParameterInfo applicationLauncherlaunchAppdataCommandParameterInfo = new CommandParameterInfo("data", Optional.class, byte[].class); + applicationLauncherlaunchAppCommandParams.put("data",applicationLauncherlaunchAppdataCommandParameterInfo); + InteractionInfo applicationLauncherlaunchAppInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaPlaybackCluster) cluster) - .fastForward((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback - , (Optional) - commandArguments.get("audioAdvanceUnmuted") + ((ChipClusters.ApplicationLauncherCluster) cluster) + .launchApp((ChipClusters.ApplicationLauncherCluster.LauncherResponseCallback) callback + , (Optional) + commandArguments.get("application") + + , (Optional) + commandArguments.get("data") ); }, - () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), - mediaPlaybackfastForwardCommandParams + () -> new DelegatedApplicationLauncherClusterLauncherResponseCallback(), + applicationLauncherlaunchAppCommandParams ); - mediaPlaybackClusterInteractionInfoMap.put("fastForward", mediaPlaybackfastForwardInteractionInfo); + applicationLauncherClusterInteractionInfoMap.put("launchApp", applicationLauncherlaunchAppInteractionInfo); - Map mediaPlaybackskipForwardCommandParams = new LinkedHashMap(); + Map applicationLauncherstopAppCommandParams = new LinkedHashMap(); - CommandParameterInfo mediaPlaybackskipForwarddeltaPositionMillisecondsCommandParameterInfo = new CommandParameterInfo("deltaPositionMilliseconds", Long.class, Long.class); - mediaPlaybackskipForwardCommandParams.put("deltaPositionMilliseconds",mediaPlaybackskipForwarddeltaPositionMillisecondsCommandParameterInfo); - InteractionInfo mediaPlaybackskipForwardInteractionInfo = new InteractionInfo( + InteractionInfo applicationLauncherstopAppInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaPlaybackCluster) cluster) - .skipForward((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback - , (Long) - commandArguments.get("deltaPositionMilliseconds") + ((ChipClusters.ApplicationLauncherCluster) cluster) + .stopApp((ChipClusters.ApplicationLauncherCluster.LauncherResponseCallback) callback + , (Optional) + commandArguments.get("application") ); }, - () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), - mediaPlaybackskipForwardCommandParams + () -> new DelegatedApplicationLauncherClusterLauncherResponseCallback(), + applicationLauncherstopAppCommandParams ); - mediaPlaybackClusterInteractionInfoMap.put("skipForward", mediaPlaybackskipForwardInteractionInfo); + applicationLauncherClusterInteractionInfoMap.put("stopApp", applicationLauncherstopAppInteractionInfo); - Map mediaPlaybackskipBackwardCommandParams = new LinkedHashMap(); + Map applicationLauncherhideAppCommandParams = new LinkedHashMap(); - CommandParameterInfo mediaPlaybackskipBackwarddeltaPositionMillisecondsCommandParameterInfo = new CommandParameterInfo("deltaPositionMilliseconds", Long.class, Long.class); - mediaPlaybackskipBackwardCommandParams.put("deltaPositionMilliseconds",mediaPlaybackskipBackwarddeltaPositionMillisecondsCommandParameterInfo); - InteractionInfo mediaPlaybackskipBackwardInteractionInfo = new InteractionInfo( + InteractionInfo applicationLauncherhideAppInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaPlaybackCluster) cluster) - .skipBackward((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback - , (Long) - commandArguments.get("deltaPositionMilliseconds") + ((ChipClusters.ApplicationLauncherCluster) cluster) + .hideApp((ChipClusters.ApplicationLauncherCluster.LauncherResponseCallback) callback + , (Optional) + commandArguments.get("application") ); }, - () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), - mediaPlaybackskipBackwardCommandParams + () -> new DelegatedApplicationLauncherClusterLauncherResponseCallback(), + applicationLauncherhideAppCommandParams ); - mediaPlaybackClusterInteractionInfoMap.put("skipBackward", mediaPlaybackskipBackwardInteractionInfo); + applicationLauncherClusterInteractionInfoMap.put("hideApp", applicationLauncherhideAppInteractionInfo); - Map mediaPlaybackseekCommandParams = new LinkedHashMap(); + commandMap.put("applicationLauncher", applicationLauncherClusterInteractionInfoMap); - CommandParameterInfo mediaPlaybackseekpositionCommandParameterInfo = new CommandParameterInfo("position", Long.class, Long.class); - mediaPlaybackseekCommandParams.put("position",mediaPlaybackseekpositionCommandParameterInfo); - InteractionInfo mediaPlaybackseekInteractionInfo = new InteractionInfo( + Map applicationBasicClusterInteractionInfoMap = new LinkedHashMap<>(); + + commandMap.put("applicationBasic", applicationBasicClusterInteractionInfoMap); + + Map accountLoginClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map accountLogingetSetupPINCommandParams = new LinkedHashMap(); + + CommandParameterInfo accountLogingetSetupPINtempAccountIdentifierCommandParameterInfo = new CommandParameterInfo("tempAccountIdentifier", String.class, String.class); + accountLogingetSetupPINCommandParams.put("tempAccountIdentifier",accountLogingetSetupPINtempAccountIdentifierCommandParameterInfo); + InteractionInfo accountLogingetSetupPINInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaPlaybackCluster) cluster) - .seek((ChipClusters.MediaPlaybackCluster.PlaybackResponseCallback) callback - , (Long) - commandArguments.get("position") + ((ChipClusters.AccountLoginCluster) cluster) + .getSetupPIN((ChipClusters.AccountLoginCluster.GetSetupPINResponseCallback) callback + , (String) + commandArguments.get("tempAccountIdentifier") - ); + , 10000); }, - () -> new DelegatedMediaPlaybackClusterPlaybackResponseCallback(), - mediaPlaybackseekCommandParams + () -> new DelegatedAccountLoginClusterGetSetupPINResponseCallback(), + accountLogingetSetupPINCommandParams ); - mediaPlaybackClusterInteractionInfoMap.put("seek", mediaPlaybackseekInteractionInfo); + accountLoginClusterInteractionInfoMap.put("getSetupPIN", accountLogingetSetupPINInteractionInfo); - Map mediaPlaybackactivateAudioTrackCommandParams = new LinkedHashMap(); + Map accountLoginloginCommandParams = new LinkedHashMap(); - CommandParameterInfo mediaPlaybackactivateAudioTracktrackIDCommandParameterInfo = new CommandParameterInfo("trackID", String.class, String.class); - mediaPlaybackactivateAudioTrackCommandParams.put("trackID",mediaPlaybackactivateAudioTracktrackIDCommandParameterInfo); + CommandParameterInfo accountLoginlogintempAccountIdentifierCommandParameterInfo = new CommandParameterInfo("tempAccountIdentifier", String.class, String.class); + accountLoginloginCommandParams.put("tempAccountIdentifier",accountLoginlogintempAccountIdentifierCommandParameterInfo); - CommandParameterInfo mediaPlaybackactivateAudioTrackaudioOutputIndexCommandParameterInfo = new CommandParameterInfo("audioOutputIndex", Integer.class, Integer.class); - mediaPlaybackactivateAudioTrackCommandParams.put("audioOutputIndex",mediaPlaybackactivateAudioTrackaudioOutputIndexCommandParameterInfo); - InteractionInfo mediaPlaybackactivateAudioTrackInteractionInfo = new InteractionInfo( + CommandParameterInfo accountLoginloginsetupPINCommandParameterInfo = new CommandParameterInfo("setupPIN", String.class, String.class); + accountLoginloginCommandParams.put("setupPIN",accountLoginloginsetupPINCommandParameterInfo); + + CommandParameterInfo accountLoginloginnodeCommandParameterInfo = new CommandParameterInfo("node", Optional.class, Long.class); + accountLoginloginCommandParams.put("node",accountLoginloginnodeCommandParameterInfo); + InteractionInfo accountLoginloginInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaPlaybackCluster) cluster) - .activateAudioTrack((DefaultClusterCallback) callback + ((ChipClusters.AccountLoginCluster) cluster) + .login((DefaultClusterCallback) callback , (String) - commandArguments.get("trackID") - , (Integer) - commandArguments.get("audioOutputIndex") + commandArguments.get("tempAccountIdentifier") + , (String) + commandArguments.get("setupPIN") + , (Optional) + commandArguments.get("node"), 10000 ); }, () -> new DelegatedDefaultClusterCallback(), - mediaPlaybackactivateAudioTrackCommandParams + accountLoginloginCommandParams ); - mediaPlaybackClusterInteractionInfoMap.put("activateAudioTrack", mediaPlaybackactivateAudioTrackInteractionInfo); + accountLoginClusterInteractionInfoMap.put("login", accountLoginloginInteractionInfo); - Map mediaPlaybackactivateTextTrackCommandParams = new LinkedHashMap(); + Map accountLoginlogoutCommandParams = new LinkedHashMap(); - CommandParameterInfo mediaPlaybackactivateTextTracktrackIDCommandParameterInfo = new CommandParameterInfo("trackID", String.class, String.class); - mediaPlaybackactivateTextTrackCommandParams.put("trackID",mediaPlaybackactivateTextTracktrackIDCommandParameterInfo); - InteractionInfo mediaPlaybackactivateTextTrackInteractionInfo = new InteractionInfo( + CommandParameterInfo accountLoginlogoutnodeCommandParameterInfo = new CommandParameterInfo("node", Optional.class, Long.class); + accountLoginlogoutCommandParams.put("node",accountLoginlogoutnodeCommandParameterInfo); + InteractionInfo accountLoginlogoutInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaPlaybackCluster) cluster) - .activateTextTrack((DefaultClusterCallback) callback + ((ChipClusters.AccountLoginCluster) cluster) + .logout((DefaultClusterCallback) callback + , (Optional) + commandArguments.get("node"), 10000 + ); + }, + () -> new DelegatedDefaultClusterCallback(), + accountLoginlogoutCommandParams + ); + accountLoginClusterInteractionInfoMap.put("logout", accountLoginlogoutInteractionInfo); + + commandMap.put("accountLogin", accountLoginClusterInteractionInfoMap); + + Map contentControlClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map contentControlupdatePINCommandParams = new LinkedHashMap(); + + CommandParameterInfo contentControlupdatePINoldPINCommandParameterInfo = new CommandParameterInfo("oldPIN", Optional.class, String.class); + contentControlupdatePINCommandParams.put("oldPIN",contentControlupdatePINoldPINCommandParameterInfo); + + CommandParameterInfo contentControlupdatePINnewPINCommandParameterInfo = new CommandParameterInfo("newPIN", String.class, String.class); + contentControlupdatePINCommandParams.put("newPIN",contentControlupdatePINnewPINCommandParameterInfo); + InteractionInfo contentControlupdatePINInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .updatePIN((DefaultClusterCallback) callback + , (Optional) + commandArguments.get("oldPIN") , (String) - commandArguments.get("trackID") + commandArguments.get("newPIN") ); }, () -> new DelegatedDefaultClusterCallback(), - mediaPlaybackactivateTextTrackCommandParams + contentControlupdatePINCommandParams ); - mediaPlaybackClusterInteractionInfoMap.put("activateTextTrack", mediaPlaybackactivateTextTrackInteractionInfo); + contentControlClusterInteractionInfoMap.put("updatePIN", contentControlupdatePINInteractionInfo); - Map mediaPlaybackdeactivateTextTrackCommandParams = new LinkedHashMap(); - InteractionInfo mediaPlaybackdeactivateTextTrackInteractionInfo = new InteractionInfo( + Map contentControlresetPINCommandParams = new LinkedHashMap(); + InteractionInfo contentControlresetPINInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaPlaybackCluster) cluster) - .deactivateTextTrack((DefaultClusterCallback) callback + ((ChipClusters.ContentControlCluster) cluster) + .resetPIN((ChipClusters.ContentControlCluster.ResetPINResponseCallback) callback + ); + }, + () -> new DelegatedContentControlClusterResetPINResponseCallback(), + contentControlresetPINCommandParams + ); + contentControlClusterInteractionInfoMap.put("resetPIN", contentControlresetPINInteractionInfo); + + Map contentControlenableCommandParams = new LinkedHashMap(); + InteractionInfo contentControlenableInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .enable((DefaultClusterCallback) callback ); }, () -> new DelegatedDefaultClusterCallback(), - mediaPlaybackdeactivateTextTrackCommandParams + contentControlenableCommandParams ); - mediaPlaybackClusterInteractionInfoMap.put("deactivateTextTrack", mediaPlaybackdeactivateTextTrackInteractionInfo); + contentControlClusterInteractionInfoMap.put("enable", contentControlenableInteractionInfo); - commandMap.put("mediaPlayback", mediaPlaybackClusterInteractionInfoMap); + Map contentControldisableCommandParams = new LinkedHashMap(); + InteractionInfo contentControldisableInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .disable((DefaultClusterCallback) callback + ); + }, + () -> new DelegatedDefaultClusterCallback(), + contentControldisableCommandParams + ); + contentControlClusterInteractionInfoMap.put("disable", contentControldisableInteractionInfo); - Map mediaInputClusterInteractionInfoMap = new LinkedHashMap<>(); + Map contentControladdBonusTimeCommandParams = new LinkedHashMap(); - Map mediaInputselectInputCommandParams = new LinkedHashMap(); + CommandParameterInfo contentControladdBonusTimePINCodeCommandParameterInfo = new CommandParameterInfo("PINCode", Optional.class, String.class); + contentControladdBonusTimeCommandParams.put("PINCode",contentControladdBonusTimePINCodeCommandParameterInfo); - CommandParameterInfo mediaInputselectInputindexCommandParameterInfo = new CommandParameterInfo("index", Integer.class, Integer.class); - mediaInputselectInputCommandParams.put("index",mediaInputselectInputindexCommandParameterInfo); - InteractionInfo mediaInputselectInputInteractionInfo = new InteractionInfo( + CommandParameterInfo contentControladdBonusTimebonusTimeCommandParameterInfo = new CommandParameterInfo("bonusTime", Optional.class, Long.class); + contentControladdBonusTimeCommandParams.put("bonusTime",contentControladdBonusTimebonusTimeCommandParameterInfo); + InteractionInfo contentControladdBonusTimeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaInputCluster) cluster) - .selectInput((DefaultClusterCallback) callback - , (Integer) - commandArguments.get("index") + ((ChipClusters.ContentControlCluster) cluster) + .addBonusTime((DefaultClusterCallback) callback + , (Optional) + commandArguments.get("PINCode") + , (Optional) + commandArguments.get("bonusTime") ); }, () -> new DelegatedDefaultClusterCallback(), - mediaInputselectInputCommandParams + contentControladdBonusTimeCommandParams ); - mediaInputClusterInteractionInfoMap.put("selectInput", mediaInputselectInputInteractionInfo); + contentControlClusterInteractionInfoMap.put("addBonusTime", contentControladdBonusTimeInteractionInfo); - Map mediaInputshowInputStatusCommandParams = new LinkedHashMap(); - InteractionInfo mediaInputshowInputStatusInteractionInfo = new InteractionInfo( + Map contentControlsetScreenDailyTimeCommandParams = new LinkedHashMap(); + + CommandParameterInfo contentControlsetScreenDailyTimescreenTimeCommandParameterInfo = new CommandParameterInfo("screenTime", Long.class, Long.class); + contentControlsetScreenDailyTimeCommandParams.put("screenTime",contentControlsetScreenDailyTimescreenTimeCommandParameterInfo); + InteractionInfo contentControlsetScreenDailyTimeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaInputCluster) cluster) - .showInputStatus((DefaultClusterCallback) callback + ((ChipClusters.ContentControlCluster) cluster) + .setScreenDailyTime((DefaultClusterCallback) callback + , (Long) + commandArguments.get("screenTime") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + contentControlsetScreenDailyTimeCommandParams + ); + contentControlClusterInteractionInfoMap.put("setScreenDailyTime", contentControlsetScreenDailyTimeInteractionInfo); + + Map contentControlblockUnratedContentCommandParams = new LinkedHashMap(); + InteractionInfo contentControlblockUnratedContentInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ContentControlCluster) cluster) + .blockUnratedContent((DefaultClusterCallback) callback ); }, () -> new DelegatedDefaultClusterCallback(), - mediaInputshowInputStatusCommandParams + contentControlblockUnratedContentCommandParams ); - mediaInputClusterInteractionInfoMap.put("showInputStatus", mediaInputshowInputStatusInteractionInfo); + contentControlClusterInteractionInfoMap.put("blockUnratedContent", contentControlblockUnratedContentInteractionInfo); - Map mediaInputhideInputStatusCommandParams = new LinkedHashMap(); - InteractionInfo mediaInputhideInputStatusInteractionInfo = new InteractionInfo( + Map contentControlunblockUnratedContentCommandParams = new LinkedHashMap(); + InteractionInfo contentControlunblockUnratedContentInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaInputCluster) cluster) - .hideInputStatus((DefaultClusterCallback) callback + ((ChipClusters.ContentControlCluster) cluster) + .unblockUnratedContent((DefaultClusterCallback) callback ); }, () -> new DelegatedDefaultClusterCallback(), - mediaInputhideInputStatusCommandParams + contentControlunblockUnratedContentCommandParams ); - mediaInputClusterInteractionInfoMap.put("hideInputStatus", mediaInputhideInputStatusInteractionInfo); - - Map mediaInputrenameInputCommandParams = new LinkedHashMap(); + contentControlClusterInteractionInfoMap.put("unblockUnratedContent", contentControlunblockUnratedContentInteractionInfo); - CommandParameterInfo mediaInputrenameInputindexCommandParameterInfo = new CommandParameterInfo("index", Integer.class, Integer.class); - mediaInputrenameInputCommandParams.put("index",mediaInputrenameInputindexCommandParameterInfo); + Map contentControlsetOnDemandRatingThresholdCommandParams = new LinkedHashMap(); - CommandParameterInfo mediaInputrenameInputnameCommandParameterInfo = new CommandParameterInfo("name", String.class, String.class); - mediaInputrenameInputCommandParams.put("name",mediaInputrenameInputnameCommandParameterInfo); - InteractionInfo mediaInputrenameInputInteractionInfo = new InteractionInfo( + CommandParameterInfo contentControlsetOnDemandRatingThresholdratingCommandParameterInfo = new CommandParameterInfo("rating", String.class, String.class); + contentControlsetOnDemandRatingThresholdCommandParams.put("rating",contentControlsetOnDemandRatingThresholdratingCommandParameterInfo); + InteractionInfo contentControlsetOnDemandRatingThresholdInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.MediaInputCluster) cluster) - .renameInput((DefaultClusterCallback) callback - , (Integer) - commandArguments.get("index") + ((ChipClusters.ContentControlCluster) cluster) + .setOnDemandRatingThreshold((DefaultClusterCallback) callback , (String) - commandArguments.get("name") + commandArguments.get("rating") ); }, () -> new DelegatedDefaultClusterCallback(), - mediaInputrenameInputCommandParams + contentControlsetOnDemandRatingThresholdCommandParams ); - mediaInputClusterInteractionInfoMap.put("renameInput", mediaInputrenameInputInteractionInfo); - - commandMap.put("mediaInput", mediaInputClusterInteractionInfoMap); + contentControlClusterInteractionInfoMap.put("setOnDemandRatingThreshold", contentControlsetOnDemandRatingThresholdInteractionInfo); - Map lowPowerClusterInteractionInfoMap = new LinkedHashMap<>(); + Map contentControlsetScheduledContentRatingThresholdCommandParams = new LinkedHashMap(); - Map lowPowersleepCommandParams = new LinkedHashMap(); - InteractionInfo lowPowersleepInteractionInfo = new InteractionInfo( + CommandParameterInfo contentControlsetScheduledContentRatingThresholdratingCommandParameterInfo = new CommandParameterInfo("rating", String.class, String.class); + contentControlsetScheduledContentRatingThresholdCommandParams.put("rating",contentControlsetScheduledContentRatingThresholdratingCommandParameterInfo); + InteractionInfo contentControlsetScheduledContentRatingThresholdInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.LowPowerCluster) cluster) - .sleep((DefaultClusterCallback) callback + ((ChipClusters.ContentControlCluster) cluster) + .setScheduledContentRatingThreshold((DefaultClusterCallback) callback + , (String) + commandArguments.get("rating") ); }, () -> new DelegatedDefaultClusterCallback(), - lowPowersleepCommandParams + contentControlsetScheduledContentRatingThresholdCommandParams ); - lowPowerClusterInteractionInfoMap.put("sleep", lowPowersleepInteractionInfo); + contentControlClusterInteractionInfoMap.put("setScheduledContentRatingThreshold", contentControlsetScheduledContentRatingThresholdInteractionInfo); - commandMap.put("lowPower", lowPowerClusterInteractionInfoMap); + commandMap.put("contentControl", contentControlClusterInteractionInfoMap); - Map keypadInputClusterInteractionInfoMap = new LinkedHashMap<>(); + Map contentAppObserverClusterInteractionInfoMap = new LinkedHashMap<>(); - Map keypadInputsendKeyCommandParams = new LinkedHashMap(); + Map contentAppObservercontentAppMessageCommandParams = new LinkedHashMap(); - CommandParameterInfo keypadInputsendKeykeyCodeCommandParameterInfo = new CommandParameterInfo("keyCode", Integer.class, Integer.class); - keypadInputsendKeyCommandParams.put("keyCode",keypadInputsendKeykeyCodeCommandParameterInfo); - InteractionInfo keypadInputsendKeyInteractionInfo = new InteractionInfo( + CommandParameterInfo contentAppObservercontentAppMessagedataCommandParameterInfo = new CommandParameterInfo("data", Optional.class, String.class); + contentAppObservercontentAppMessageCommandParams.put("data",contentAppObservercontentAppMessagedataCommandParameterInfo); + + CommandParameterInfo contentAppObservercontentAppMessageencodingHintCommandParameterInfo = new CommandParameterInfo("encodingHint", String.class, String.class); + contentAppObservercontentAppMessageCommandParams.put("encodingHint",contentAppObservercontentAppMessageencodingHintCommandParameterInfo); + InteractionInfo contentAppObservercontentAppMessageInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.KeypadInputCluster) cluster) - .sendKey((ChipClusters.KeypadInputCluster.SendKeyResponseCallback) callback - , (Integer) - commandArguments.get("keyCode") + ((ChipClusters.ContentAppObserverCluster) cluster) + .contentAppMessage((ChipClusters.ContentAppObserverCluster.ContentAppMessageResponseCallback) callback + , (Optional) + commandArguments.get("data") + + , (String) + commandArguments.get("encodingHint") ); }, - () -> new DelegatedKeypadInputClusterSendKeyResponseCallback(), - keypadInputsendKeyCommandParams + () -> new DelegatedContentAppObserverClusterContentAppMessageResponseCallback(), + contentAppObservercontentAppMessageCommandParams ); - keypadInputClusterInteractionInfoMap.put("sendKey", keypadInputsendKeyInteractionInfo); + contentAppObserverClusterInteractionInfoMap.put("contentAppMessage", contentAppObservercontentAppMessageInteractionInfo); - commandMap.put("keypadInput", keypadInputClusterInteractionInfoMap); + commandMap.put("contentAppObserver", contentAppObserverClusterInteractionInfoMap); - Map contentLauncherClusterInteractionInfoMap = new LinkedHashMap<>(); + Map zoneManagementClusterInteractionInfoMap = new LinkedHashMap<>(); - Map contentLauncherlaunchContentCommandParams = new LinkedHashMap(); + Map zoneManagementcreateTwoDCartesianZoneCommandParams = new LinkedHashMap(); + InteractionInfo zoneManagementcreateTwoDCartesianZoneInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ZoneManagementCluster) cluster) + .createTwoDCartesianZone((ChipClusters.ZoneManagementCluster.CreateTwoDCartesianZoneResponseCallback) callback + , (ChipStructs.ZoneManagementClusterTwoDCartesianZoneStruct) + commandArguments.get("zone") - CommandParameterInfo contentLauncherlaunchContentautoPlayCommandParameterInfo = new CommandParameterInfo("autoPlay", Boolean.class, Boolean.class); - contentLauncherlaunchContentCommandParams.put("autoPlay",contentLauncherlaunchContentautoPlayCommandParameterInfo); + ); + }, + () -> new DelegatedZoneManagementClusterCreateTwoDCartesianZoneResponseCallback(), + zoneManagementcreateTwoDCartesianZoneCommandParams + ); + zoneManagementClusterInteractionInfoMap.put("createTwoDCartesianZone", zoneManagementcreateTwoDCartesianZoneInteractionInfo); - CommandParameterInfo contentLauncherlaunchContentdataCommandParameterInfo = new CommandParameterInfo("data", Optional.class, String.class); - contentLauncherlaunchContentCommandParams.put("data",contentLauncherlaunchContentdataCommandParameterInfo); + Map zoneManagementupdateTwoDCartesianZoneCommandParams = new LinkedHashMap(); + CommandParameterInfo zoneManagementupdateTwoDCartesianZonezoneIDCommandParameterInfo = new CommandParameterInfo("zoneID", Integer.class, Integer.class); + zoneManagementupdateTwoDCartesianZoneCommandParams.put("zoneID",zoneManagementupdateTwoDCartesianZonezoneIDCommandParameterInfo); - CommandParameterInfo contentLauncherlaunchContentuseCurrentContextCommandParameterInfo = new CommandParameterInfo("useCurrentContext", Optional.class, Boolean.class); - contentLauncherlaunchContentCommandParams.put("useCurrentContext",contentLauncherlaunchContentuseCurrentContextCommandParameterInfo); - InteractionInfo contentLauncherlaunchContentInteractionInfo = new InteractionInfo( + InteractionInfo zoneManagementupdateTwoDCartesianZoneInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ContentLauncherCluster) cluster) - .launchContent((ChipClusters.ContentLauncherCluster.LauncherResponseCallback) callback - , (ChipStructs.ContentLauncherClusterContentSearchStruct) - commandArguments.get("search") - - , (Boolean) - commandArguments.get("autoPlay") - - , (Optional) - commandArguments.get("data") + ((ChipClusters.ZoneManagementCluster) cluster) + .updateTwoDCartesianZone((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("zoneID") + , (ChipStructs.ZoneManagementClusterTwoDCartesianZoneStruct) + commandArguments.get("zone") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + zoneManagementupdateTwoDCartesianZoneCommandParams + ); + zoneManagementClusterInteractionInfoMap.put("updateTwoDCartesianZone", zoneManagementupdateTwoDCartesianZoneInteractionInfo); - , (Optional) - commandArguments.get("playbackPreferences") + Map zoneManagementgetTwoDCartesianZoneCommandParams = new LinkedHashMap(); - , (Optional) - commandArguments.get("useCurrentContext") + CommandParameterInfo zoneManagementgetTwoDCartesianZonezoneIDCommandParameterInfo = new CommandParameterInfo("zoneID", Optional.class, Integer.class); + zoneManagementgetTwoDCartesianZoneCommandParams.put("zoneID",zoneManagementgetTwoDCartesianZonezoneIDCommandParameterInfo); + InteractionInfo zoneManagementgetTwoDCartesianZoneInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ZoneManagementCluster) cluster) + .getTwoDCartesianZone((ChipClusters.ZoneManagementCluster.GetTwoDCartesianZoneResponseCallback) callback + , (Optional) + commandArguments.get("zoneID") ); }, - () -> new DelegatedContentLauncherClusterLauncherResponseCallback(), - contentLauncherlaunchContentCommandParams + () -> new DelegatedZoneManagementClusterGetTwoDCartesianZoneResponseCallback(), + zoneManagementgetTwoDCartesianZoneCommandParams ); - contentLauncherClusterInteractionInfoMap.put("launchContent", contentLauncherlaunchContentInteractionInfo); + zoneManagementClusterInteractionInfoMap.put("getTwoDCartesianZone", zoneManagementgetTwoDCartesianZoneInteractionInfo); - Map contentLauncherlaunchURLCommandParams = new LinkedHashMap(); + Map zoneManagementremoveZoneCommandParams = new LinkedHashMap(); - CommandParameterInfo contentLauncherlaunchURLcontentURLCommandParameterInfo = new CommandParameterInfo("contentURL", String.class, String.class); - contentLauncherlaunchURLCommandParams.put("contentURL",contentLauncherlaunchURLcontentURLCommandParameterInfo); + CommandParameterInfo zoneManagementremoveZonezoneIDCommandParameterInfo = new CommandParameterInfo("zoneID", Integer.class, Integer.class); + zoneManagementremoveZoneCommandParams.put("zoneID",zoneManagementremoveZonezoneIDCommandParameterInfo); + InteractionInfo zoneManagementremoveZoneInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ZoneManagementCluster) cluster) + .removeZone((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("zoneID") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + zoneManagementremoveZoneCommandParams + ); + zoneManagementClusterInteractionInfoMap.put("removeZone", zoneManagementremoveZoneInteractionInfo); - CommandParameterInfo contentLauncherlaunchURLdisplayStringCommandParameterInfo = new CommandParameterInfo("displayString", Optional.class, String.class); - contentLauncherlaunchURLCommandParams.put("displayString",contentLauncherlaunchURLdisplayStringCommandParameterInfo); + commandMap.put("zoneManagement", zoneManagementClusterInteractionInfoMap); - InteractionInfo contentLauncherlaunchURLInteractionInfo = new InteractionInfo( + Map cameraAvStreamManagementClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map cameraAvStreamManagementaudioStreamAllocateCommandParams = new LinkedHashMap(); + + CommandParameterInfo cameraAvStreamManagementaudioStreamAllocatestreamTypeCommandParameterInfo = new CommandParameterInfo("streamType", Integer.class, Integer.class); + cameraAvStreamManagementaudioStreamAllocateCommandParams.put("streamType",cameraAvStreamManagementaudioStreamAllocatestreamTypeCommandParameterInfo); + + CommandParameterInfo cameraAvStreamManagementaudioStreamAllocateaudioCodecCommandParameterInfo = new CommandParameterInfo("audioCodec", Integer.class, Integer.class); + cameraAvStreamManagementaudioStreamAllocateCommandParams.put("audioCodec",cameraAvStreamManagementaudioStreamAllocateaudioCodecCommandParameterInfo); + + CommandParameterInfo cameraAvStreamManagementaudioStreamAllocatechannelCountCommandParameterInfo = new CommandParameterInfo("channelCount", Integer.class, Integer.class); + cameraAvStreamManagementaudioStreamAllocateCommandParams.put("channelCount",cameraAvStreamManagementaudioStreamAllocatechannelCountCommandParameterInfo); + + CommandParameterInfo cameraAvStreamManagementaudioStreamAllocatesampleRateCommandParameterInfo = new CommandParameterInfo("sampleRate", Long.class, Long.class); + cameraAvStreamManagementaudioStreamAllocateCommandParams.put("sampleRate",cameraAvStreamManagementaudioStreamAllocatesampleRateCommandParameterInfo); + + CommandParameterInfo cameraAvStreamManagementaudioStreamAllocatebitRateCommandParameterInfo = new CommandParameterInfo("bitRate", Long.class, Long.class); + cameraAvStreamManagementaudioStreamAllocateCommandParams.put("bitRate",cameraAvStreamManagementaudioStreamAllocatebitRateCommandParameterInfo); + + CommandParameterInfo cameraAvStreamManagementaudioStreamAllocatebitDepthCommandParameterInfo = new CommandParameterInfo("bitDepth", Integer.class, Integer.class); + cameraAvStreamManagementaudioStreamAllocateCommandParams.put("bitDepth",cameraAvStreamManagementaudioStreamAllocatebitDepthCommandParameterInfo); + InteractionInfo cameraAvStreamManagementaudioStreamAllocateInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ContentLauncherCluster) cluster) - .launchURL((ChipClusters.ContentLauncherCluster.LauncherResponseCallback) callback - , (String) - commandArguments.get("contentURL") + ((ChipClusters.CameraAvStreamManagementCluster) cluster) + .audioStreamAllocate((ChipClusters.CameraAvStreamManagementCluster.AudioStreamAllocateResponseCallback) callback + , (Integer) + commandArguments.get("streamType") - , (Optional) - commandArguments.get("displayString") + , (Integer) + commandArguments.get("audioCodec") - , (Optional) - commandArguments.get("brandingInformation") + , (Integer) + commandArguments.get("channelCount") + + , (Long) + commandArguments.get("sampleRate") + + , (Long) + commandArguments.get("bitRate") + + , (Integer) + commandArguments.get("bitDepth") ); }, - () -> new DelegatedContentLauncherClusterLauncherResponseCallback(), - contentLauncherlaunchURLCommandParams + () -> new DelegatedCameraAvStreamManagementClusterAudioStreamAllocateResponseCallback(), + cameraAvStreamManagementaudioStreamAllocateCommandParams ); - contentLauncherClusterInteractionInfoMap.put("launchURL", contentLauncherlaunchURLInteractionInfo); - - commandMap.put("contentLauncher", contentLauncherClusterInteractionInfoMap); - - Map audioOutputClusterInteractionInfoMap = new LinkedHashMap<>(); + cameraAvStreamManagementClusterInteractionInfoMap.put("audioStreamAllocate", cameraAvStreamManagementaudioStreamAllocateInteractionInfo); - Map audioOutputselectOutputCommandParams = new LinkedHashMap(); + Map cameraAvStreamManagementaudioStreamDeallocateCommandParams = new LinkedHashMap(); - CommandParameterInfo audioOutputselectOutputindexCommandParameterInfo = new CommandParameterInfo("index", Integer.class, Integer.class); - audioOutputselectOutputCommandParams.put("index",audioOutputselectOutputindexCommandParameterInfo); - InteractionInfo audioOutputselectOutputInteractionInfo = new InteractionInfo( + CommandParameterInfo cameraAvStreamManagementaudioStreamDeallocateaudioStreamIDCommandParameterInfo = new CommandParameterInfo("audioStreamID", Integer.class, Integer.class); + cameraAvStreamManagementaudioStreamDeallocateCommandParams.put("audioStreamID",cameraAvStreamManagementaudioStreamDeallocateaudioStreamIDCommandParameterInfo); + InteractionInfo cameraAvStreamManagementaudioStreamDeallocateInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.AudioOutputCluster) cluster) - .selectOutput((DefaultClusterCallback) callback + ((ChipClusters.CameraAvStreamManagementCluster) cluster) + .audioStreamDeallocate((DefaultClusterCallback) callback , (Integer) - commandArguments.get("index") + commandArguments.get("audioStreamID") ); }, () -> new DelegatedDefaultClusterCallback(), - audioOutputselectOutputCommandParams + cameraAvStreamManagementaudioStreamDeallocateCommandParams ); - audioOutputClusterInteractionInfoMap.put("selectOutput", audioOutputselectOutputInteractionInfo); + cameraAvStreamManagementClusterInteractionInfoMap.put("audioStreamDeallocate", cameraAvStreamManagementaudioStreamDeallocateInteractionInfo); - Map audioOutputrenameOutputCommandParams = new LinkedHashMap(); + Map cameraAvStreamManagementvideoStreamAllocateCommandParams = new LinkedHashMap(); - CommandParameterInfo audioOutputrenameOutputindexCommandParameterInfo = new CommandParameterInfo("index", Integer.class, Integer.class); - audioOutputrenameOutputCommandParams.put("index",audioOutputrenameOutputindexCommandParameterInfo); + CommandParameterInfo cameraAvStreamManagementvideoStreamAllocatestreamTypeCommandParameterInfo = new CommandParameterInfo("streamType", Integer.class, Integer.class); + cameraAvStreamManagementvideoStreamAllocateCommandParams.put("streamType",cameraAvStreamManagementvideoStreamAllocatestreamTypeCommandParameterInfo); - CommandParameterInfo audioOutputrenameOutputnameCommandParameterInfo = new CommandParameterInfo("name", String.class, String.class); - audioOutputrenameOutputCommandParams.put("name",audioOutputrenameOutputnameCommandParameterInfo); - InteractionInfo audioOutputrenameOutputInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.AudioOutputCluster) cluster) - .renameOutput((DefaultClusterCallback) callback - , (Integer) - commandArguments.get("index") - , (String) - commandArguments.get("name") - ); - }, - () -> new DelegatedDefaultClusterCallback(), - audioOutputrenameOutputCommandParams - ); - audioOutputClusterInteractionInfoMap.put("renameOutput", audioOutputrenameOutputInteractionInfo); + CommandParameterInfo cameraAvStreamManagementvideoStreamAllocatevideoCodecCommandParameterInfo = new CommandParameterInfo("videoCodec", Integer.class, Integer.class); + cameraAvStreamManagementvideoStreamAllocateCommandParams.put("videoCodec",cameraAvStreamManagementvideoStreamAllocatevideoCodecCommandParameterInfo); - commandMap.put("audioOutput", audioOutputClusterInteractionInfoMap); + CommandParameterInfo cameraAvStreamManagementvideoStreamAllocateminFrameRateCommandParameterInfo = new CommandParameterInfo("minFrameRate", Integer.class, Integer.class); + cameraAvStreamManagementvideoStreamAllocateCommandParams.put("minFrameRate",cameraAvStreamManagementvideoStreamAllocateminFrameRateCommandParameterInfo); - Map applicationLauncherClusterInteractionInfoMap = new LinkedHashMap<>(); + CommandParameterInfo cameraAvStreamManagementvideoStreamAllocatemaxFrameRateCommandParameterInfo = new CommandParameterInfo("maxFrameRate", Integer.class, Integer.class); + cameraAvStreamManagementvideoStreamAllocateCommandParams.put("maxFrameRate",cameraAvStreamManagementvideoStreamAllocatemaxFrameRateCommandParameterInfo); - Map applicationLauncherlaunchAppCommandParams = new LinkedHashMap(); - CommandParameterInfo applicationLauncherlaunchAppdataCommandParameterInfo = new CommandParameterInfo("data", Optional.class, byte[].class); - applicationLauncherlaunchAppCommandParams.put("data",applicationLauncherlaunchAppdataCommandParameterInfo); - InteractionInfo applicationLauncherlaunchAppInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ApplicationLauncherCluster) cluster) - .launchApp((ChipClusters.ApplicationLauncherCluster.LauncherResponseCallback) callback - , (Optional) - commandArguments.get("application") + CommandParameterInfo cameraAvStreamManagementvideoStreamAllocateminBitRateCommandParameterInfo = new CommandParameterInfo("minBitRate", Long.class, Long.class); + cameraAvStreamManagementvideoStreamAllocateCommandParams.put("minBitRate",cameraAvStreamManagementvideoStreamAllocateminBitRateCommandParameterInfo); - , (Optional) - commandArguments.get("data") + CommandParameterInfo cameraAvStreamManagementvideoStreamAllocatemaxBitRateCommandParameterInfo = new CommandParameterInfo("maxBitRate", Long.class, Long.class); + cameraAvStreamManagementvideoStreamAllocateCommandParams.put("maxBitRate",cameraAvStreamManagementvideoStreamAllocatemaxBitRateCommandParameterInfo); - ); - }, - () -> new DelegatedApplicationLauncherClusterLauncherResponseCallback(), - applicationLauncherlaunchAppCommandParams - ); - applicationLauncherClusterInteractionInfoMap.put("launchApp", applicationLauncherlaunchAppInteractionInfo); + CommandParameterInfo cameraAvStreamManagementvideoStreamAllocateminFragmentLenCommandParameterInfo = new CommandParameterInfo("minFragmentLen", Integer.class, Integer.class); + cameraAvStreamManagementvideoStreamAllocateCommandParams.put("minFragmentLen",cameraAvStreamManagementvideoStreamAllocateminFragmentLenCommandParameterInfo); - Map applicationLauncherstopAppCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementvideoStreamAllocatemaxFragmentLenCommandParameterInfo = new CommandParameterInfo("maxFragmentLen", Integer.class, Integer.class); + cameraAvStreamManagementvideoStreamAllocateCommandParams.put("maxFragmentLen",cameraAvStreamManagementvideoStreamAllocatemaxFragmentLenCommandParameterInfo); - InteractionInfo applicationLauncherstopAppInteractionInfo = new InteractionInfo( + CommandParameterInfo cameraAvStreamManagementvideoStreamAllocatewatermarkEnabledCommandParameterInfo = new CommandParameterInfo("watermarkEnabled", Optional.class, Boolean.class); + cameraAvStreamManagementvideoStreamAllocateCommandParams.put("watermarkEnabled",cameraAvStreamManagementvideoStreamAllocatewatermarkEnabledCommandParameterInfo); + + CommandParameterInfo cameraAvStreamManagementvideoStreamAllocateOSDEnabledCommandParameterInfo = new CommandParameterInfo("OSDEnabled", Optional.class, Boolean.class); + cameraAvStreamManagementvideoStreamAllocateCommandParams.put("OSDEnabled",cameraAvStreamManagementvideoStreamAllocateOSDEnabledCommandParameterInfo); + InteractionInfo cameraAvStreamManagementvideoStreamAllocateInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ApplicationLauncherCluster) cluster) - .stopApp((ChipClusters.ApplicationLauncherCluster.LauncherResponseCallback) callback - , (Optional) - commandArguments.get("application") + ((ChipClusters.CameraAvStreamManagementCluster) cluster) + .videoStreamAllocate((ChipClusters.CameraAvStreamManagementCluster.VideoStreamAllocateResponseCallback) callback + , (Integer) + commandArguments.get("streamType") - ); - }, - () -> new DelegatedApplicationLauncherClusterLauncherResponseCallback(), - applicationLauncherstopAppCommandParams - ); - applicationLauncherClusterInteractionInfoMap.put("stopApp", applicationLauncherstopAppInteractionInfo); + , (Integer) + commandArguments.get("videoCodec") - Map applicationLauncherhideAppCommandParams = new LinkedHashMap(); + , (Integer) + commandArguments.get("minFrameRate") - InteractionInfo applicationLauncherhideAppInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ApplicationLauncherCluster) cluster) - .hideApp((ChipClusters.ApplicationLauncherCluster.LauncherResponseCallback) callback - , (Optional) - commandArguments.get("application") + , (Integer) + commandArguments.get("maxFrameRate") - ); - }, - () -> new DelegatedApplicationLauncherClusterLauncherResponseCallback(), - applicationLauncherhideAppCommandParams - ); - applicationLauncherClusterInteractionInfoMap.put("hideApp", applicationLauncherhideAppInteractionInfo); + , (ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct) + commandArguments.get("minResolution") - commandMap.put("applicationLauncher", applicationLauncherClusterInteractionInfoMap); + , (ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct) + commandArguments.get("maxResolution") + + , (Long) + commandArguments.get("minBitRate") - Map applicationBasicClusterInteractionInfoMap = new LinkedHashMap<>(); + , (Long) + commandArguments.get("maxBitRate") - commandMap.put("applicationBasic", applicationBasicClusterInteractionInfoMap); + , (Integer) + commandArguments.get("minFragmentLen") - Map accountLoginClusterInteractionInfoMap = new LinkedHashMap<>(); + , (Integer) + commandArguments.get("maxFragmentLen") - Map accountLogingetSetupPINCommandParams = new LinkedHashMap(); + , (Optional) + commandArguments.get("watermarkEnabled") - CommandParameterInfo accountLogingetSetupPINtempAccountIdentifierCommandParameterInfo = new CommandParameterInfo("tempAccountIdentifier", String.class, String.class); - accountLogingetSetupPINCommandParams.put("tempAccountIdentifier",accountLogingetSetupPINtempAccountIdentifierCommandParameterInfo); - InteractionInfo accountLogingetSetupPINInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.AccountLoginCluster) cluster) - .getSetupPIN((ChipClusters.AccountLoginCluster.GetSetupPINResponseCallback) callback - , (String) - commandArguments.get("tempAccountIdentifier") + , (Optional) + commandArguments.get("OSDEnabled") - , 10000); + ); }, - () -> new DelegatedAccountLoginClusterGetSetupPINResponseCallback(), - accountLogingetSetupPINCommandParams + () -> new DelegatedCameraAvStreamManagementClusterVideoStreamAllocateResponseCallback(), + cameraAvStreamManagementvideoStreamAllocateCommandParams ); - accountLoginClusterInteractionInfoMap.put("getSetupPIN", accountLogingetSetupPINInteractionInfo); + cameraAvStreamManagementClusterInteractionInfoMap.put("videoStreamAllocate", cameraAvStreamManagementvideoStreamAllocateInteractionInfo); - Map accountLoginloginCommandParams = new LinkedHashMap(); + Map cameraAvStreamManagementvideoStreamModifyCommandParams = new LinkedHashMap(); - CommandParameterInfo accountLoginlogintempAccountIdentifierCommandParameterInfo = new CommandParameterInfo("tempAccountIdentifier", String.class, String.class); - accountLoginloginCommandParams.put("tempAccountIdentifier",accountLoginlogintempAccountIdentifierCommandParameterInfo); + CommandParameterInfo cameraAvStreamManagementvideoStreamModifyvideoStreamIDCommandParameterInfo = new CommandParameterInfo("videoStreamID", Integer.class, Integer.class); + cameraAvStreamManagementvideoStreamModifyCommandParams.put("videoStreamID",cameraAvStreamManagementvideoStreamModifyvideoStreamIDCommandParameterInfo); - CommandParameterInfo accountLoginloginsetupPINCommandParameterInfo = new CommandParameterInfo("setupPIN", String.class, String.class); - accountLoginloginCommandParams.put("setupPIN",accountLoginloginsetupPINCommandParameterInfo); - CommandParameterInfo accountLoginloginnodeCommandParameterInfo = new CommandParameterInfo("node", Optional.class, Long.class); - accountLoginloginCommandParams.put("node",accountLoginloginnodeCommandParameterInfo); - InteractionInfo accountLoginloginInteractionInfo = new InteractionInfo( + CommandParameterInfo cameraAvStreamManagementvideoStreamModifywatermarkEnabledCommandParameterInfo = new CommandParameterInfo("watermarkEnabled", Optional.class, Boolean.class); + cameraAvStreamManagementvideoStreamModifyCommandParams.put("watermarkEnabled",cameraAvStreamManagementvideoStreamModifywatermarkEnabledCommandParameterInfo); + + CommandParameterInfo cameraAvStreamManagementvideoStreamModifyOSDEnabledCommandParameterInfo = new CommandParameterInfo("OSDEnabled", Optional.class, Boolean.class); + cameraAvStreamManagementvideoStreamModifyCommandParams.put("OSDEnabled",cameraAvStreamManagementvideoStreamModifyOSDEnabledCommandParameterInfo); + InteractionInfo cameraAvStreamManagementvideoStreamModifyInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.AccountLoginCluster) cluster) - .login((DefaultClusterCallback) callback - , (String) - commandArguments.get("tempAccountIdentifier") - , (String) - commandArguments.get("setupPIN") - , (Optional) - commandArguments.get("node"), 10000 + ((ChipClusters.CameraAvStreamManagementCluster) cluster) + .videoStreamModify((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("videoStreamID") + , (Optional) + commandArguments.get("resolution") + , (Optional) + commandArguments.get("watermarkEnabled") + , (Optional) + commandArguments.get("OSDEnabled") ); }, () -> new DelegatedDefaultClusterCallback(), - accountLoginloginCommandParams + cameraAvStreamManagementvideoStreamModifyCommandParams ); - accountLoginClusterInteractionInfoMap.put("login", accountLoginloginInteractionInfo); + cameraAvStreamManagementClusterInteractionInfoMap.put("videoStreamModify", cameraAvStreamManagementvideoStreamModifyInteractionInfo); - Map accountLoginlogoutCommandParams = new LinkedHashMap(); + Map cameraAvStreamManagementvideoStreamDeallocateCommandParams = new LinkedHashMap(); - CommandParameterInfo accountLoginlogoutnodeCommandParameterInfo = new CommandParameterInfo("node", Optional.class, Long.class); - accountLoginlogoutCommandParams.put("node",accountLoginlogoutnodeCommandParameterInfo); - InteractionInfo accountLoginlogoutInteractionInfo = new InteractionInfo( + CommandParameterInfo cameraAvStreamManagementvideoStreamDeallocatevideoStreamIDCommandParameterInfo = new CommandParameterInfo("videoStreamID", Integer.class, Integer.class); + cameraAvStreamManagementvideoStreamDeallocateCommandParams.put("videoStreamID",cameraAvStreamManagementvideoStreamDeallocatevideoStreamIDCommandParameterInfo); + InteractionInfo cameraAvStreamManagementvideoStreamDeallocateInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.AccountLoginCluster) cluster) - .logout((DefaultClusterCallback) callback - , (Optional) - commandArguments.get("node"), 10000 + ((ChipClusters.CameraAvStreamManagementCluster) cluster) + .videoStreamDeallocate((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("videoStreamID") ); }, () -> new DelegatedDefaultClusterCallback(), - accountLoginlogoutCommandParams + cameraAvStreamManagementvideoStreamDeallocateCommandParams ); - accountLoginClusterInteractionInfoMap.put("logout", accountLoginlogoutInteractionInfo); + cameraAvStreamManagementClusterInteractionInfoMap.put("videoStreamDeallocate", cameraAvStreamManagementvideoStreamDeallocateInteractionInfo); - commandMap.put("accountLogin", accountLoginClusterInteractionInfoMap); + Map cameraAvStreamManagementsnapshotStreamAllocateCommandParams = new LinkedHashMap(); - Map contentControlClusterInteractionInfoMap = new LinkedHashMap<>(); + CommandParameterInfo cameraAvStreamManagementsnapshotStreamAllocateimageCodecCommandParameterInfo = new CommandParameterInfo("imageCodec", Integer.class, Integer.class); + cameraAvStreamManagementsnapshotStreamAllocateCommandParams.put("imageCodec",cameraAvStreamManagementsnapshotStreamAllocateimageCodecCommandParameterInfo); - Map contentControlupdatePINCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementsnapshotStreamAllocateframeRateCommandParameterInfo = new CommandParameterInfo("frameRate", Integer.class, Integer.class); + cameraAvStreamManagementsnapshotStreamAllocateCommandParams.put("frameRate",cameraAvStreamManagementsnapshotStreamAllocateframeRateCommandParameterInfo); - CommandParameterInfo contentControlupdatePINoldPINCommandParameterInfo = new CommandParameterInfo("oldPIN", Optional.class, String.class); - contentControlupdatePINCommandParams.put("oldPIN",contentControlupdatePINoldPINCommandParameterInfo); + CommandParameterInfo cameraAvStreamManagementsnapshotStreamAllocatebitRateCommandParameterInfo = new CommandParameterInfo("bitRate", Long.class, Long.class); + cameraAvStreamManagementsnapshotStreamAllocateCommandParams.put("bitRate",cameraAvStreamManagementsnapshotStreamAllocatebitRateCommandParameterInfo); - CommandParameterInfo contentControlupdatePINnewPINCommandParameterInfo = new CommandParameterInfo("newPIN", String.class, String.class); - contentControlupdatePINCommandParams.put("newPIN",contentControlupdatePINnewPINCommandParameterInfo); - InteractionInfo contentControlupdatePINInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ContentControlCluster) cluster) - .updatePIN((DefaultClusterCallback) callback - , (Optional) - commandArguments.get("oldPIN") - , (String) - commandArguments.get("newPIN") - ); - }, - () -> new DelegatedDefaultClusterCallback(), - contentControlupdatePINCommandParams - ); - contentControlClusterInteractionInfoMap.put("updatePIN", contentControlupdatePINInteractionInfo); - Map contentControlresetPINCommandParams = new LinkedHashMap(); - InteractionInfo contentControlresetPINInteractionInfo = new InteractionInfo( + + CommandParameterInfo cameraAvStreamManagementsnapshotStreamAllocatequalityCommandParameterInfo = new CommandParameterInfo("quality", Integer.class, Integer.class); + cameraAvStreamManagementsnapshotStreamAllocateCommandParams.put("quality",cameraAvStreamManagementsnapshotStreamAllocatequalityCommandParameterInfo); + InteractionInfo cameraAvStreamManagementsnapshotStreamAllocateInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ContentControlCluster) cluster) - .resetPIN((ChipClusters.ContentControlCluster.ResetPINResponseCallback) callback + ((ChipClusters.CameraAvStreamManagementCluster) cluster) + .snapshotStreamAllocate((ChipClusters.CameraAvStreamManagementCluster.SnapshotStreamAllocateResponseCallback) callback + , (Integer) + commandArguments.get("imageCodec") + + , (Integer) + commandArguments.get("frameRate") + + , (Long) + commandArguments.get("bitRate") + + , (ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct) + commandArguments.get("minResolution") + + , (ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct) + commandArguments.get("maxResolution") + + , (Integer) + commandArguments.get("quality") + ); }, - () -> new DelegatedContentControlClusterResetPINResponseCallback(), - contentControlresetPINCommandParams + () -> new DelegatedCameraAvStreamManagementClusterSnapshotStreamAllocateResponseCallback(), + cameraAvStreamManagementsnapshotStreamAllocateCommandParams ); - contentControlClusterInteractionInfoMap.put("resetPIN", contentControlresetPINInteractionInfo); + cameraAvStreamManagementClusterInteractionInfoMap.put("snapshotStreamAllocate", cameraAvStreamManagementsnapshotStreamAllocateInteractionInfo); - Map contentControlenableCommandParams = new LinkedHashMap(); - InteractionInfo contentControlenableInteractionInfo = new InteractionInfo( + Map cameraAvStreamManagementsnapshotStreamDeallocateCommandParams = new LinkedHashMap(); + + CommandParameterInfo cameraAvStreamManagementsnapshotStreamDeallocatesnapshotStreamIDCommandParameterInfo = new CommandParameterInfo("snapshotStreamID", Integer.class, Integer.class); + cameraAvStreamManagementsnapshotStreamDeallocateCommandParams.put("snapshotStreamID",cameraAvStreamManagementsnapshotStreamDeallocatesnapshotStreamIDCommandParameterInfo); + InteractionInfo cameraAvStreamManagementsnapshotStreamDeallocateInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ContentControlCluster) cluster) - .enable((DefaultClusterCallback) callback + ((ChipClusters.CameraAvStreamManagementCluster) cluster) + .snapshotStreamDeallocate((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("snapshotStreamID") ); }, () -> new DelegatedDefaultClusterCallback(), - contentControlenableCommandParams + cameraAvStreamManagementsnapshotStreamDeallocateCommandParams ); - contentControlClusterInteractionInfoMap.put("enable", contentControlenableInteractionInfo); + cameraAvStreamManagementClusterInteractionInfoMap.put("snapshotStreamDeallocate", cameraAvStreamManagementsnapshotStreamDeallocateInteractionInfo); - Map contentControldisableCommandParams = new LinkedHashMap(); - InteractionInfo contentControldisableInteractionInfo = new InteractionInfo( + Map cameraAvStreamManagementsetStreamPrioritiesCommandParams = new LinkedHashMap(); + + CommandParameterInfo cameraAvStreamManagementsetStreamPrioritiesstreamPrioritiesCommandParameterInfo = new CommandParameterInfo("streamPriorities", ArrayList.class, ArrayList.class); + cameraAvStreamManagementsetStreamPrioritiesCommandParams.put("streamPriorities",cameraAvStreamManagementsetStreamPrioritiesstreamPrioritiesCommandParameterInfo); + InteractionInfo cameraAvStreamManagementsetStreamPrioritiesInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ContentControlCluster) cluster) - .disable((DefaultClusterCallback) callback + ((ChipClusters.CameraAvStreamManagementCluster) cluster) + .setStreamPriorities((DefaultClusterCallback) callback + , (ArrayList) + commandArguments.get("streamPriorities") ); }, () -> new DelegatedDefaultClusterCallback(), - contentControldisableCommandParams + cameraAvStreamManagementsetStreamPrioritiesCommandParams ); - contentControlClusterInteractionInfoMap.put("disable", contentControldisableInteractionInfo); + cameraAvStreamManagementClusterInteractionInfoMap.put("setStreamPriorities", cameraAvStreamManagementsetStreamPrioritiesInteractionInfo); - Map contentControladdBonusTimeCommandParams = new LinkedHashMap(); + Map cameraAvStreamManagementcaptureSnapshotCommandParams = new LinkedHashMap(); - CommandParameterInfo contentControladdBonusTimePINCodeCommandParameterInfo = new CommandParameterInfo("PINCode", Optional.class, String.class); - contentControladdBonusTimeCommandParams.put("PINCode",contentControladdBonusTimePINCodeCommandParameterInfo); + CommandParameterInfo cameraAvStreamManagementcaptureSnapshotsnapshotStreamIDCommandParameterInfo = new CommandParameterInfo("snapshotStreamID", Integer.class, Integer.class); + cameraAvStreamManagementcaptureSnapshotCommandParams.put("snapshotStreamID",cameraAvStreamManagementcaptureSnapshotsnapshotStreamIDCommandParameterInfo); - CommandParameterInfo contentControladdBonusTimebonusTimeCommandParameterInfo = new CommandParameterInfo("bonusTime", Optional.class, Long.class); - contentControladdBonusTimeCommandParams.put("bonusTime",contentControladdBonusTimebonusTimeCommandParameterInfo); - InteractionInfo contentControladdBonusTimeInteractionInfo = new InteractionInfo( + InteractionInfo cameraAvStreamManagementcaptureSnapshotInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ContentControlCluster) cluster) - .addBonusTime((DefaultClusterCallback) callback - , (Optional) - commandArguments.get("PINCode") - , (Optional) - commandArguments.get("bonusTime") + ((ChipClusters.CameraAvStreamManagementCluster) cluster) + .captureSnapshot((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("snapshotStreamID") + , (ChipStructs.CameraAvStreamManagementClusterVideoResolutionStruct) + commandArguments.get("requestedResolution") ); }, () -> new DelegatedDefaultClusterCallback(), - contentControladdBonusTimeCommandParams + cameraAvStreamManagementcaptureSnapshotCommandParams ); - contentControlClusterInteractionInfoMap.put("addBonusTime", contentControladdBonusTimeInteractionInfo); + cameraAvStreamManagementClusterInteractionInfoMap.put("captureSnapshot", cameraAvStreamManagementcaptureSnapshotInteractionInfo); - Map contentControlsetScreenDailyTimeCommandParams = new LinkedHashMap(); + Map cameraAvStreamManagementsetViewportCommandParams = new LinkedHashMap(); - CommandParameterInfo contentControlsetScreenDailyTimescreenTimeCommandParameterInfo = new CommandParameterInfo("screenTime", Long.class, Long.class); - contentControlsetScreenDailyTimeCommandParams.put("screenTime",contentControlsetScreenDailyTimescreenTimeCommandParameterInfo); - InteractionInfo contentControlsetScreenDailyTimeInteractionInfo = new InteractionInfo( + InteractionInfo cameraAvStreamManagementsetViewportInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ContentControlCluster) cluster) - .setScreenDailyTime((DefaultClusterCallback) callback - , (Long) - commandArguments.get("screenTime") + ((ChipClusters.CameraAvStreamManagementCluster) cluster) + .setViewport((DefaultClusterCallback) callback + , (ChipStructs.CameraAvStreamManagementClusterViewportStruct) + commandArguments.get("viewport") ); }, () -> new DelegatedDefaultClusterCallback(), - contentControlsetScreenDailyTimeCommandParams + cameraAvStreamManagementsetViewportCommandParams ); - contentControlClusterInteractionInfoMap.put("setScreenDailyTime", contentControlsetScreenDailyTimeInteractionInfo); + cameraAvStreamManagementClusterInteractionInfoMap.put("setViewport", cameraAvStreamManagementsetViewportInteractionInfo); - Map contentControlblockUnratedContentCommandParams = new LinkedHashMap(); - InteractionInfo contentControlblockUnratedContentInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ContentControlCluster) cluster) - .blockUnratedContent((DefaultClusterCallback) callback - ); - }, - () -> new DelegatedDefaultClusterCallback(), - contentControlblockUnratedContentCommandParams - ); - contentControlClusterInteractionInfoMap.put("blockUnratedContent", contentControlblockUnratedContentInteractionInfo); + Map cameraAvStreamManagementsetImageRotationCommandParams = new LinkedHashMap(); - Map contentControlunblockUnratedContentCommandParams = new LinkedHashMap(); - InteractionInfo contentControlunblockUnratedContentInteractionInfo = new InteractionInfo( + CommandParameterInfo cameraAvStreamManagementsetImageRotationangleCommandParameterInfo = new CommandParameterInfo("angle", Integer.class, Integer.class); + cameraAvStreamManagementsetImageRotationCommandParams.put("angle",cameraAvStreamManagementsetImageRotationangleCommandParameterInfo); + InteractionInfo cameraAvStreamManagementsetImageRotationInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ContentControlCluster) cluster) - .unblockUnratedContent((DefaultClusterCallback) callback + ((ChipClusters.CameraAvStreamManagementCluster) cluster) + .setImageRotation((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("angle") ); }, () -> new DelegatedDefaultClusterCallback(), - contentControlunblockUnratedContentCommandParams + cameraAvStreamManagementsetImageRotationCommandParams ); - contentControlClusterInteractionInfoMap.put("unblockUnratedContent", contentControlunblockUnratedContentInteractionInfo); + cameraAvStreamManagementClusterInteractionInfoMap.put("setImageRotation", cameraAvStreamManagementsetImageRotationInteractionInfo); - Map contentControlsetOnDemandRatingThresholdCommandParams = new LinkedHashMap(); + Map cameraAvStreamManagementsetImageFlipHorizontalCommandParams = new LinkedHashMap(); - CommandParameterInfo contentControlsetOnDemandRatingThresholdratingCommandParameterInfo = new CommandParameterInfo("rating", String.class, String.class); - contentControlsetOnDemandRatingThresholdCommandParams.put("rating",contentControlsetOnDemandRatingThresholdratingCommandParameterInfo); - InteractionInfo contentControlsetOnDemandRatingThresholdInteractionInfo = new InteractionInfo( + CommandParameterInfo cameraAvStreamManagementsetImageFlipHorizontalenabledCommandParameterInfo = new CommandParameterInfo("enabled", Boolean.class, Boolean.class); + cameraAvStreamManagementsetImageFlipHorizontalCommandParams.put("enabled",cameraAvStreamManagementsetImageFlipHorizontalenabledCommandParameterInfo); + InteractionInfo cameraAvStreamManagementsetImageFlipHorizontalInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ContentControlCluster) cluster) - .setOnDemandRatingThreshold((DefaultClusterCallback) callback - , (String) - commandArguments.get("rating") + ((ChipClusters.CameraAvStreamManagementCluster) cluster) + .setImageFlipHorizontal((DefaultClusterCallback) callback + , (Boolean) + commandArguments.get("enabled") ); }, () -> new DelegatedDefaultClusterCallback(), - contentControlsetOnDemandRatingThresholdCommandParams + cameraAvStreamManagementsetImageFlipHorizontalCommandParams ); - contentControlClusterInteractionInfoMap.put("setOnDemandRatingThreshold", contentControlsetOnDemandRatingThresholdInteractionInfo); + cameraAvStreamManagementClusterInteractionInfoMap.put("setImageFlipHorizontal", cameraAvStreamManagementsetImageFlipHorizontalInteractionInfo); - Map contentControlsetScheduledContentRatingThresholdCommandParams = new LinkedHashMap(); + Map cameraAvStreamManagementsetImageFlipVerticalCommandParams = new LinkedHashMap(); - CommandParameterInfo contentControlsetScheduledContentRatingThresholdratingCommandParameterInfo = new CommandParameterInfo("rating", String.class, String.class); - contentControlsetScheduledContentRatingThresholdCommandParams.put("rating",contentControlsetScheduledContentRatingThresholdratingCommandParameterInfo); - InteractionInfo contentControlsetScheduledContentRatingThresholdInteractionInfo = new InteractionInfo( + CommandParameterInfo cameraAvStreamManagementsetImageFlipVerticalenabledCommandParameterInfo = new CommandParameterInfo("enabled", Boolean.class, Boolean.class); + cameraAvStreamManagementsetImageFlipVerticalCommandParams.put("enabled",cameraAvStreamManagementsetImageFlipVerticalenabledCommandParameterInfo); + InteractionInfo cameraAvStreamManagementsetImageFlipVerticalInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ContentControlCluster) cluster) - .setScheduledContentRatingThreshold((DefaultClusterCallback) callback - , (String) - commandArguments.get("rating") + ((ChipClusters.CameraAvStreamManagementCluster) cluster) + .setImageFlipVertical((DefaultClusterCallback) callback + , (Boolean) + commandArguments.get("enabled") ); }, () -> new DelegatedDefaultClusterCallback(), - contentControlsetScheduledContentRatingThresholdCommandParams + cameraAvStreamManagementsetImageFlipVerticalCommandParams ); - contentControlClusterInteractionInfoMap.put("setScheduledContentRatingThreshold", contentControlsetScheduledContentRatingThresholdInteractionInfo); - - commandMap.put("contentControl", contentControlClusterInteractionInfoMap); - - Map contentAppObserverClusterInteractionInfoMap = new LinkedHashMap<>(); - - Map contentAppObservercontentAppMessageCommandParams = new LinkedHashMap(); - - CommandParameterInfo contentAppObservercontentAppMessagedataCommandParameterInfo = new CommandParameterInfo("data", Optional.class, String.class); - contentAppObservercontentAppMessageCommandParams.put("data",contentAppObservercontentAppMessagedataCommandParameterInfo); - - CommandParameterInfo contentAppObservercontentAppMessageencodingHintCommandParameterInfo = new CommandParameterInfo("encodingHint", String.class, String.class); - contentAppObservercontentAppMessageCommandParams.put("encodingHint",contentAppObservercontentAppMessageencodingHintCommandParameterInfo); - InteractionInfo contentAppObservercontentAppMessageInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ContentAppObserverCluster) cluster) - .contentAppMessage((ChipClusters.ContentAppObserverCluster.ContentAppMessageResponseCallback) callback - , (Optional) - commandArguments.get("data") + cameraAvStreamManagementClusterInteractionInfoMap.put("setImageFlipVertical", cameraAvStreamManagementsetImageFlipVerticalInteractionInfo); - , (String) - commandArguments.get("encodingHint") - - ); - }, - () -> new DelegatedContentAppObserverClusterContentAppMessageResponseCallback(), - contentAppObservercontentAppMessageCommandParams - ); - contentAppObserverClusterInteractionInfoMap.put("contentAppMessage", contentAppObservercontentAppMessageInteractionInfo); - - commandMap.put("contentAppObserver", contentAppObserverClusterInteractionInfoMap); + commandMap.put("cameraAvStreamManagement", cameraAvStreamManagementClusterInteractionInfoMap); Map webRTCTransportProviderClusterInteractionInfoMap = new LinkedHashMap<>(); @@ -29077,6 +30142,106 @@ public Map> getCommandMap() { commandMap.put("webRTCTransportProvider", webRTCTransportProviderClusterInteractionInfoMap); + Map webRTCTransportRequestorClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map webRTCTransportRequestorofferCommandParams = new LinkedHashMap(); + + CommandParameterInfo webRTCTransportRequestorofferwebRTCSessionIDCommandParameterInfo = new CommandParameterInfo("webRTCSessionID", Integer.class, Integer.class); + webRTCTransportRequestorofferCommandParams.put("webRTCSessionID",webRTCTransportRequestorofferwebRTCSessionIDCommandParameterInfo); + + CommandParameterInfo webRTCTransportRequestoroffersdpCommandParameterInfo = new CommandParameterInfo("sdp", String.class, String.class); + webRTCTransportRequestorofferCommandParams.put("sdp",webRTCTransportRequestoroffersdpCommandParameterInfo); + + + CommandParameterInfo webRTCTransportRequestorofferICETransportPolicyCommandParameterInfo = new CommandParameterInfo("ICETransportPolicy", Optional.class, String.class); + webRTCTransportRequestorofferCommandParams.put("ICETransportPolicy",webRTCTransportRequestorofferICETransportPolicyCommandParameterInfo); + InteractionInfo webRTCTransportRequestorofferInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WebRTCTransportRequestorCluster) cluster) + .offer((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("webRTCSessionID") + , (String) + commandArguments.get("sdp") + , (Optional>) + commandArguments.get("ICEServers") + , (Optional) + commandArguments.get("ICETransportPolicy") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + webRTCTransportRequestorofferCommandParams + ); + webRTCTransportRequestorClusterInteractionInfoMap.put("offer", webRTCTransportRequestorofferInteractionInfo); + + Map webRTCTransportRequestoranswerCommandParams = new LinkedHashMap(); + + CommandParameterInfo webRTCTransportRequestoranswerwebRTCSessionIDCommandParameterInfo = new CommandParameterInfo("webRTCSessionID", Integer.class, Integer.class); + webRTCTransportRequestoranswerCommandParams.put("webRTCSessionID",webRTCTransportRequestoranswerwebRTCSessionIDCommandParameterInfo); + + CommandParameterInfo webRTCTransportRequestoranswersdpCommandParameterInfo = new CommandParameterInfo("sdp", String.class, String.class); + webRTCTransportRequestoranswerCommandParams.put("sdp",webRTCTransportRequestoranswersdpCommandParameterInfo); + InteractionInfo webRTCTransportRequestoranswerInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WebRTCTransportRequestorCluster) cluster) + .answer((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("webRTCSessionID") + , (String) + commandArguments.get("sdp") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + webRTCTransportRequestoranswerCommandParams + ); + webRTCTransportRequestorClusterInteractionInfoMap.put("answer", webRTCTransportRequestoranswerInteractionInfo); + + Map webRTCTransportRequestorICECandidateCommandParams = new LinkedHashMap(); + + CommandParameterInfo webRTCTransportRequestorICECandidatewebRTCSessionIDCommandParameterInfo = new CommandParameterInfo("webRTCSessionID", Integer.class, Integer.class); + webRTCTransportRequestorICECandidateCommandParams.put("webRTCSessionID",webRTCTransportRequestorICECandidatewebRTCSessionIDCommandParameterInfo); + + CommandParameterInfo webRTCTransportRequestorICECandidateICECandidateCommandParameterInfo = new CommandParameterInfo("ICECandidate", String.class, String.class); + webRTCTransportRequestorICECandidateCommandParams.put("ICECandidate",webRTCTransportRequestorICECandidateICECandidateCommandParameterInfo); + InteractionInfo webRTCTransportRequestorICECandidateInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WebRTCTransportRequestorCluster) cluster) + .ICECandidate((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("webRTCSessionID") + , (String) + commandArguments.get("ICECandidate") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + webRTCTransportRequestorICECandidateCommandParams + ); + webRTCTransportRequestorClusterInteractionInfoMap.put("ICECandidate", webRTCTransportRequestorICECandidateInteractionInfo); + + Map webRTCTransportRequestorendCommandParams = new LinkedHashMap(); + + CommandParameterInfo webRTCTransportRequestorendwebRTCSessionIDCommandParameterInfo = new CommandParameterInfo("webRTCSessionID", Integer.class, Integer.class); + webRTCTransportRequestorendCommandParams.put("webRTCSessionID",webRTCTransportRequestorendwebRTCSessionIDCommandParameterInfo); + + CommandParameterInfo webRTCTransportRequestorendreasonCommandParameterInfo = new CommandParameterInfo("reason", Integer.class, Integer.class); + webRTCTransportRequestorendCommandParams.put("reason",webRTCTransportRequestorendreasonCommandParameterInfo); + InteractionInfo webRTCTransportRequestorendInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WebRTCTransportRequestorCluster) cluster) + .end((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("webRTCSessionID") + , (Integer) + commandArguments.get("reason") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + webRTCTransportRequestorendCommandParams + ); + webRTCTransportRequestorClusterInteractionInfoMap.put("end", webRTCTransportRequestorendInteractionInfo); + + commandMap.put("webRTCTransportRequestor", webRTCTransportRequestorClusterInteractionInfoMap); + Map chimeClusterInteractionInfoMap = new LinkedHashMap<>(); Map chimeplayChimeSoundCommandParams = new LinkedHashMap(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 05036e0391..843114b437 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -2426,6 +2426,17 @@ private static Map readGeneralCommissioningInteractionI readGeneralCommissioningTCAcknowledgementsRequiredCommandParams ); result.put("readTCAcknowledgementsRequiredAttribute", readGeneralCommissioningTCAcknowledgementsRequiredAttributeInteractionInfo); + Map readGeneralCommissioningTCUpdateDeadlineCommandParams = new LinkedHashMap(); + InteractionInfo readGeneralCommissioningTCUpdateDeadlineAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.GeneralCommissioningCluster) cluster).readTCUpdateDeadlineAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readGeneralCommissioningTCUpdateDeadlineCommandParams + ); + result.put("readTCUpdateDeadlineAttribute", readGeneralCommissioningTCUpdateDeadlineAttributeInteractionInfo); Map readGeneralCommissioningGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readGeneralCommissioningGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -10225,28 +10236,6 @@ private static Map readEnergyEvseModeInteractionInfo() readEnergyEvseModeCurrentModeCommandParams ); result.put("readCurrentModeAttribute", readEnergyEvseModeCurrentModeAttributeInteractionInfo); - Map readEnergyEvseModeStartUpModeCommandParams = new LinkedHashMap(); - InteractionInfo readEnergyEvseModeStartUpModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.EnergyEvseModeCluster) cluster).readStartUpModeAttribute( - (ChipClusters.EnergyEvseModeCluster.StartUpModeAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedEnergyEvseModeClusterStartUpModeAttributeCallback(), - readEnergyEvseModeStartUpModeCommandParams - ); - result.put("readStartUpModeAttribute", readEnergyEvseModeStartUpModeAttributeInteractionInfo); - Map readEnergyEvseModeOnModeCommandParams = new LinkedHashMap(); - InteractionInfo readEnergyEvseModeOnModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.EnergyEvseModeCluster) cluster).readOnModeAttribute( - (ChipClusters.EnergyEvseModeCluster.OnModeAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedEnergyEvseModeClusterOnModeAttributeCallback(), - readEnergyEvseModeOnModeCommandParams - ); - result.put("readOnModeAttribute", readEnergyEvseModeOnModeAttributeInteractionInfo); Map readEnergyEvseModeGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readEnergyEvseModeGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -10339,28 +10328,6 @@ private static Map readWaterHeaterModeInteractionInfo() readWaterHeaterModeCurrentModeCommandParams ); result.put("readCurrentModeAttribute", readWaterHeaterModeCurrentModeAttributeInteractionInfo); - Map readWaterHeaterModeStartUpModeCommandParams = new LinkedHashMap(); - InteractionInfo readWaterHeaterModeStartUpModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.WaterHeaterModeCluster) cluster).readStartUpModeAttribute( - (ChipClusters.WaterHeaterModeCluster.StartUpModeAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedWaterHeaterModeClusterStartUpModeAttributeCallback(), - readWaterHeaterModeStartUpModeCommandParams - ); - result.put("readStartUpModeAttribute", readWaterHeaterModeStartUpModeAttributeInteractionInfo); - Map readWaterHeaterModeOnModeCommandParams = new LinkedHashMap(); - InteractionInfo readWaterHeaterModeOnModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.WaterHeaterModeCluster) cluster).readOnModeAttribute( - (ChipClusters.WaterHeaterModeCluster.OnModeAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedWaterHeaterModeClusterOnModeAttributeCallback(), - readWaterHeaterModeOnModeCommandParams - ); - result.put("readOnModeAttribute", readWaterHeaterModeOnModeAttributeInteractionInfo); Map readWaterHeaterModeGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readWaterHeaterModeGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -10453,28 +10420,6 @@ private static Map readDeviceEnergyManagementModeIntera readDeviceEnergyManagementModeCurrentModeCommandParams ); result.put("readCurrentModeAttribute", readDeviceEnergyManagementModeCurrentModeAttributeInteractionInfo); - Map readDeviceEnergyManagementModeStartUpModeCommandParams = new LinkedHashMap(); - InteractionInfo readDeviceEnergyManagementModeStartUpModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.DeviceEnergyManagementModeCluster) cluster).readStartUpModeAttribute( - (ChipClusters.DeviceEnergyManagementModeCluster.StartUpModeAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedDeviceEnergyManagementModeClusterStartUpModeAttributeCallback(), - readDeviceEnergyManagementModeStartUpModeCommandParams - ); - result.put("readStartUpModeAttribute", readDeviceEnergyManagementModeStartUpModeAttributeInteractionInfo); - Map readDeviceEnergyManagementModeOnModeCommandParams = new LinkedHashMap(); - InteractionInfo readDeviceEnergyManagementModeOnModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.DeviceEnergyManagementModeCluster) cluster).readOnModeAttribute( - (ChipClusters.DeviceEnergyManagementModeCluster.OnModeAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedDeviceEnergyManagementModeClusterOnModeAttributeCallback(), - readDeviceEnergyManagementModeOnModeCommandParams - ); - result.put("readOnModeAttribute", readDeviceEnergyManagementModeOnModeAttributeInteractionInfo); Map readDeviceEnergyManagementModeGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readDeviceEnergyManagementModeGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -18236,6 +18181,641 @@ private static Map readContentAppObserverInteractionInf return result; } + private static Map readZoneManagementInteractionInfo() { + Map result = new LinkedHashMap<>();Map readZoneManagementSupportedZoneSourcesCommandParams = new LinkedHashMap(); + InteractionInfo readZoneManagementSupportedZoneSourcesAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ZoneManagementCluster) cluster).readSupportedZoneSourcesAttribute( + (ChipClusters.ZoneManagementCluster.SupportedZoneSourcesAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedZoneManagementClusterSupportedZoneSourcesAttributeCallback(), + readZoneManagementSupportedZoneSourcesCommandParams + ); + result.put("readSupportedZoneSourcesAttribute", readZoneManagementSupportedZoneSourcesAttributeInteractionInfo); + Map readZoneManagementZonesCommandParams = new LinkedHashMap(); + InteractionInfo readZoneManagementZonesAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ZoneManagementCluster) cluster).readZonesAttribute( + (ChipClusters.ZoneManagementCluster.ZonesAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedZoneManagementClusterZonesAttributeCallback(), + readZoneManagementZonesCommandParams + ); + result.put("readZonesAttribute", readZoneManagementZonesAttributeInteractionInfo); + Map readZoneManagementTimeControlCommandParams = new LinkedHashMap(); + InteractionInfo readZoneManagementTimeControlAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ZoneManagementCluster) cluster).readTimeControlAttribute( + (ChipClusters.ZoneManagementCluster.TimeControlAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedZoneManagementClusterTimeControlAttributeCallback(), + readZoneManagementTimeControlCommandParams + ); + result.put("readTimeControlAttribute", readZoneManagementTimeControlAttributeInteractionInfo); + Map readZoneManagementSensitivityCommandParams = new LinkedHashMap(); + InteractionInfo readZoneManagementSensitivityAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ZoneManagementCluster) cluster).readSensitivityAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readZoneManagementSensitivityCommandParams + ); + result.put("readSensitivityAttribute", readZoneManagementSensitivityAttributeInteractionInfo); + Map readZoneManagementGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readZoneManagementGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ZoneManagementCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.ZoneManagementCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedZoneManagementClusterGeneratedCommandListAttributeCallback(), + readZoneManagementGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readZoneManagementGeneratedCommandListAttributeInteractionInfo); + Map readZoneManagementAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readZoneManagementAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ZoneManagementCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.ZoneManagementCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedZoneManagementClusterAcceptedCommandListAttributeCallback(), + readZoneManagementAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readZoneManagementAcceptedCommandListAttributeInteractionInfo); + Map readZoneManagementEventListCommandParams = new LinkedHashMap(); + InteractionInfo readZoneManagementEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ZoneManagementCluster) cluster).readEventListAttribute( + (ChipClusters.ZoneManagementCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedZoneManagementClusterEventListAttributeCallback(), + readZoneManagementEventListCommandParams + ); + result.put("readEventListAttribute", readZoneManagementEventListAttributeInteractionInfo); + Map readZoneManagementAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readZoneManagementAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ZoneManagementCluster) cluster).readAttributeListAttribute( + (ChipClusters.ZoneManagementCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedZoneManagementClusterAttributeListAttributeCallback(), + readZoneManagementAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readZoneManagementAttributeListAttributeInteractionInfo); + Map readZoneManagementFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readZoneManagementFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ZoneManagementCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readZoneManagementFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readZoneManagementFeatureMapAttributeInteractionInfo); + Map readZoneManagementClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readZoneManagementClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ZoneManagementCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readZoneManagementClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readZoneManagementClusterRevisionAttributeInteractionInfo); + + return result; + } + private static Map readCameraAvStreamManagementInteractionInfo() { + Map result = new LinkedHashMap<>();Map readCameraAvStreamManagementMaxConcurrentVideoEncodersCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementMaxConcurrentVideoEncodersAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readMaxConcurrentVideoEncodersAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readCameraAvStreamManagementMaxConcurrentVideoEncodersCommandParams + ); + result.put("readMaxConcurrentVideoEncodersAttribute", readCameraAvStreamManagementMaxConcurrentVideoEncodersAttributeInteractionInfo); + Map readCameraAvStreamManagementMaxEncodedPixelRateCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementMaxEncodedPixelRateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readMaxEncodedPixelRateAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readCameraAvStreamManagementMaxEncodedPixelRateCommandParams + ); + result.put("readMaxEncodedPixelRateAttribute", readCameraAvStreamManagementMaxEncodedPixelRateAttributeInteractionInfo); + Map readCameraAvStreamManagementNightVisionCapableCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementNightVisionCapableAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readNightVisionCapableAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readCameraAvStreamManagementNightVisionCapableCommandParams + ); + result.put("readNightVisionCapableAttribute", readCameraAvStreamManagementNightVisionCapableAttributeInteractionInfo); + Map readCameraAvStreamManagementRateDistortionTradeOffPointsCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementRateDistortionTradeOffPointsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readRateDistortionTradeOffPointsAttribute( + (ChipClusters.CameraAvStreamManagementCluster.RateDistortionTradeOffPointsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCameraAvStreamManagementClusterRateDistortionTradeOffPointsAttributeCallback(), + readCameraAvStreamManagementRateDistortionTradeOffPointsCommandParams + ); + result.put("readRateDistortionTradeOffPointsAttribute", readCameraAvStreamManagementRateDistortionTradeOffPointsAttributeInteractionInfo); + Map readCameraAvStreamManagementMaxContentBufferSizeCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementMaxContentBufferSizeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readMaxContentBufferSizeAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readCameraAvStreamManagementMaxContentBufferSizeCommandParams + ); + result.put("readMaxContentBufferSizeAttribute", readCameraAvStreamManagementMaxContentBufferSizeAttributeInteractionInfo); + Map readCameraAvStreamManagementTwoWayTalkSupportCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementTwoWayTalkSupportAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readTwoWayTalkSupportAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readCameraAvStreamManagementTwoWayTalkSupportCommandParams + ); + result.put("readTwoWayTalkSupportAttribute", readCameraAvStreamManagementTwoWayTalkSupportAttributeInteractionInfo); + Map readCameraAvStreamManagementSupportedSnapshotParamsCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementSupportedSnapshotParamsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readSupportedSnapshotParamsAttribute( + (ChipClusters.CameraAvStreamManagementCluster.SupportedSnapshotParamsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCameraAvStreamManagementClusterSupportedSnapshotParamsAttributeCallback(), + readCameraAvStreamManagementSupportedSnapshotParamsCommandParams + ); + result.put("readSupportedSnapshotParamsAttribute", readCameraAvStreamManagementSupportedSnapshotParamsAttributeInteractionInfo); + Map readCameraAvStreamManagementMaxNetworkBandwidthCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementMaxNetworkBandwidthAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readMaxNetworkBandwidthAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readCameraAvStreamManagementMaxNetworkBandwidthCommandParams + ); + result.put("readMaxNetworkBandwidthAttribute", readCameraAvStreamManagementMaxNetworkBandwidthAttributeInteractionInfo); + Map readCameraAvStreamManagementCurrentFrameRateCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementCurrentFrameRateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readCurrentFrameRateAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readCameraAvStreamManagementCurrentFrameRateCommandParams + ); + result.put("readCurrentFrameRateAttribute", readCameraAvStreamManagementCurrentFrameRateAttributeInteractionInfo); + Map readCameraAvStreamManagementHDRModeEnabledCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementHDRModeEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readHDRModeEnabledAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readCameraAvStreamManagementHDRModeEnabledCommandParams + ); + result.put("readHDRModeEnabledAttribute", readCameraAvStreamManagementHDRModeEnabledAttributeInteractionInfo); + Map readCameraAvStreamManagementCurrentVideoCodecsCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementCurrentVideoCodecsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readCurrentVideoCodecsAttribute( + (ChipClusters.CameraAvStreamManagementCluster.CurrentVideoCodecsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCameraAvStreamManagementClusterCurrentVideoCodecsAttributeCallback(), + readCameraAvStreamManagementCurrentVideoCodecsCommandParams + ); + result.put("readCurrentVideoCodecsAttribute", readCameraAvStreamManagementCurrentVideoCodecsAttributeInteractionInfo); + Map readCameraAvStreamManagementFabricsUsingCameraCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementFabricsUsingCameraAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readFabricsUsingCameraAttribute( + (ChipClusters.CameraAvStreamManagementCluster.FabricsUsingCameraAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCameraAvStreamManagementClusterFabricsUsingCameraAttributeCallback(), + readCameraAvStreamManagementFabricsUsingCameraCommandParams + ); + result.put("readFabricsUsingCameraAttribute", readCameraAvStreamManagementFabricsUsingCameraAttributeInteractionInfo); + Map readCameraAvStreamManagementAllocatedVideoStreamsCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementAllocatedVideoStreamsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readAllocatedVideoStreamsAttribute( + (ChipClusters.CameraAvStreamManagementCluster.AllocatedVideoStreamsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCameraAvStreamManagementClusterAllocatedVideoStreamsAttributeCallback(), + readCameraAvStreamManagementAllocatedVideoStreamsCommandParams + ); + result.put("readAllocatedVideoStreamsAttribute", readCameraAvStreamManagementAllocatedVideoStreamsAttributeInteractionInfo); + Map readCameraAvStreamManagementAllocatedAudioStreamsCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementAllocatedAudioStreamsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readAllocatedAudioStreamsAttribute( + (ChipClusters.CameraAvStreamManagementCluster.AllocatedAudioStreamsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCameraAvStreamManagementClusterAllocatedAudioStreamsAttributeCallback(), + readCameraAvStreamManagementAllocatedAudioStreamsCommandParams + ); + result.put("readAllocatedAudioStreamsAttribute", readCameraAvStreamManagementAllocatedAudioStreamsAttributeInteractionInfo); + Map readCameraAvStreamManagementAllocatedSnapshotStreamsCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementAllocatedSnapshotStreamsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readAllocatedSnapshotStreamsAttribute( + (ChipClusters.CameraAvStreamManagementCluster.AllocatedSnapshotStreamsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCameraAvStreamManagementClusterAllocatedSnapshotStreamsAttributeCallback(), + readCameraAvStreamManagementAllocatedSnapshotStreamsCommandParams + ); + result.put("readAllocatedSnapshotStreamsAttribute", readCameraAvStreamManagementAllocatedSnapshotStreamsAttributeInteractionInfo); + Map readCameraAvStreamManagementRankedVideoStreamPrioritiesListCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementRankedVideoStreamPrioritiesListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readRankedVideoStreamPrioritiesListAttribute( + (ChipClusters.CameraAvStreamManagementCluster.RankedVideoStreamPrioritiesListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCameraAvStreamManagementClusterRankedVideoStreamPrioritiesListAttributeCallback(), + readCameraAvStreamManagementRankedVideoStreamPrioritiesListCommandParams + ); + result.put("readRankedVideoStreamPrioritiesListAttribute", readCameraAvStreamManagementRankedVideoStreamPrioritiesListAttributeInteractionInfo); + Map readCameraAvStreamManagementSoftRecordingPrivacyModeEnabledCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementSoftRecordingPrivacyModeEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readSoftRecordingPrivacyModeEnabledAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readCameraAvStreamManagementSoftRecordingPrivacyModeEnabledCommandParams + ); + result.put("readSoftRecordingPrivacyModeEnabledAttribute", readCameraAvStreamManagementSoftRecordingPrivacyModeEnabledAttributeInteractionInfo); + Map readCameraAvStreamManagementSoftLivestreamPrivacyModeEnabledCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementSoftLivestreamPrivacyModeEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readSoftLivestreamPrivacyModeEnabledAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readCameraAvStreamManagementSoftLivestreamPrivacyModeEnabledCommandParams + ); + result.put("readSoftLivestreamPrivacyModeEnabledAttribute", readCameraAvStreamManagementSoftLivestreamPrivacyModeEnabledAttributeInteractionInfo); + Map readCameraAvStreamManagementHardPrivacyModeOnCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementHardPrivacyModeOnAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readHardPrivacyModeOnAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readCameraAvStreamManagementHardPrivacyModeOnCommandParams + ); + result.put("readHardPrivacyModeOnAttribute", readCameraAvStreamManagementHardPrivacyModeOnAttributeInteractionInfo); + Map readCameraAvStreamManagementNightVisionCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementNightVisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readNightVisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readCameraAvStreamManagementNightVisionCommandParams + ); + result.put("readNightVisionAttribute", readCameraAvStreamManagementNightVisionAttributeInteractionInfo); + Map readCameraAvStreamManagementNightVisionIllumCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementNightVisionIllumAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readNightVisionIllumAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readCameraAvStreamManagementNightVisionIllumCommandParams + ); + result.put("readNightVisionIllumAttribute", readCameraAvStreamManagementNightVisionIllumAttributeInteractionInfo); + Map readCameraAvStreamManagementAWBEnabledCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementAWBEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readAWBEnabledAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readCameraAvStreamManagementAWBEnabledCommandParams + ); + result.put("readAWBEnabledAttribute", readCameraAvStreamManagementAWBEnabledAttributeInteractionInfo); + Map readCameraAvStreamManagementAutoShutterSpeedEnabledCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementAutoShutterSpeedEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readAutoShutterSpeedEnabledAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readCameraAvStreamManagementAutoShutterSpeedEnabledCommandParams + ); + result.put("readAutoShutterSpeedEnabledAttribute", readCameraAvStreamManagementAutoShutterSpeedEnabledAttributeInteractionInfo); + Map readCameraAvStreamManagementAutoISOEnabledCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementAutoISOEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readAutoISOEnabledAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readCameraAvStreamManagementAutoISOEnabledCommandParams + ); + result.put("readAutoISOEnabledAttribute", readCameraAvStreamManagementAutoISOEnabledAttributeInteractionInfo); + Map readCameraAvStreamManagementSpeakerMutedCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementSpeakerMutedAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readSpeakerMutedAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readCameraAvStreamManagementSpeakerMutedCommandParams + ); + result.put("readSpeakerMutedAttribute", readCameraAvStreamManagementSpeakerMutedAttributeInteractionInfo); + Map readCameraAvStreamManagementSpeakerVolumeLevelCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementSpeakerVolumeLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readSpeakerVolumeLevelAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readCameraAvStreamManagementSpeakerVolumeLevelCommandParams + ); + result.put("readSpeakerVolumeLevelAttribute", readCameraAvStreamManagementSpeakerVolumeLevelAttributeInteractionInfo); + Map readCameraAvStreamManagementSpeakerMaxLevelCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementSpeakerMaxLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readSpeakerMaxLevelAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readCameraAvStreamManagementSpeakerMaxLevelCommandParams + ); + result.put("readSpeakerMaxLevelAttribute", readCameraAvStreamManagementSpeakerMaxLevelAttributeInteractionInfo); + Map readCameraAvStreamManagementSpeakerMinLevelCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementSpeakerMinLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readSpeakerMinLevelAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readCameraAvStreamManagementSpeakerMinLevelCommandParams + ); + result.put("readSpeakerMinLevelAttribute", readCameraAvStreamManagementSpeakerMinLevelAttributeInteractionInfo); + Map readCameraAvStreamManagementMicrophoneMutedCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementMicrophoneMutedAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readMicrophoneMutedAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readCameraAvStreamManagementMicrophoneMutedCommandParams + ); + result.put("readMicrophoneMutedAttribute", readCameraAvStreamManagementMicrophoneMutedAttributeInteractionInfo); + Map readCameraAvStreamManagementMicrophoneVolumeLevelCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementMicrophoneVolumeLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readMicrophoneVolumeLevelAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readCameraAvStreamManagementMicrophoneVolumeLevelCommandParams + ); + result.put("readMicrophoneVolumeLevelAttribute", readCameraAvStreamManagementMicrophoneVolumeLevelAttributeInteractionInfo); + Map readCameraAvStreamManagementMicrophoneMaxLevelCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementMicrophoneMaxLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readMicrophoneMaxLevelAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readCameraAvStreamManagementMicrophoneMaxLevelCommandParams + ); + result.put("readMicrophoneMaxLevelAttribute", readCameraAvStreamManagementMicrophoneMaxLevelAttributeInteractionInfo); + Map readCameraAvStreamManagementMicrophoneMinLevelCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementMicrophoneMinLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readMicrophoneMinLevelAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readCameraAvStreamManagementMicrophoneMinLevelCommandParams + ); + result.put("readMicrophoneMinLevelAttribute", readCameraAvStreamManagementMicrophoneMinLevelAttributeInteractionInfo); + Map readCameraAvStreamManagementMicrophoneAGCEnabledCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementMicrophoneAGCEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readMicrophoneAGCEnabledAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readCameraAvStreamManagementMicrophoneAGCEnabledCommandParams + ); + result.put("readMicrophoneAGCEnabledAttribute", readCameraAvStreamManagementMicrophoneAGCEnabledAttributeInteractionInfo); + Map readCameraAvStreamManagementImageRotationCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementImageRotationAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readImageRotationAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readCameraAvStreamManagementImageRotationCommandParams + ); + result.put("readImageRotationAttribute", readCameraAvStreamManagementImageRotationAttributeInteractionInfo); + Map readCameraAvStreamManagementImageFlipHorizontalCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementImageFlipHorizontalAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readImageFlipHorizontalAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readCameraAvStreamManagementImageFlipHorizontalCommandParams + ); + result.put("readImageFlipHorizontalAttribute", readCameraAvStreamManagementImageFlipHorizontalAttributeInteractionInfo); + Map readCameraAvStreamManagementImageFlipVerticalCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementImageFlipVerticalAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readImageFlipVerticalAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readCameraAvStreamManagementImageFlipVerticalCommandParams + ); + result.put("readImageFlipVerticalAttribute", readCameraAvStreamManagementImageFlipVerticalAttributeInteractionInfo); + Map readCameraAvStreamManagementLocalVideoRecordingEnabledCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementLocalVideoRecordingEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readLocalVideoRecordingEnabledAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readCameraAvStreamManagementLocalVideoRecordingEnabledCommandParams + ); + result.put("readLocalVideoRecordingEnabledAttribute", readCameraAvStreamManagementLocalVideoRecordingEnabledAttributeInteractionInfo); + Map readCameraAvStreamManagementLocalSnapshotRecordingEnabledCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementLocalSnapshotRecordingEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readLocalSnapshotRecordingEnabledAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readCameraAvStreamManagementLocalSnapshotRecordingEnabledCommandParams + ); + result.put("readLocalSnapshotRecordingEnabledAttribute", readCameraAvStreamManagementLocalSnapshotRecordingEnabledAttributeInteractionInfo); + Map readCameraAvStreamManagementStatusLightEnabledCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementStatusLightEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readStatusLightEnabledAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readCameraAvStreamManagementStatusLightEnabledCommandParams + ); + result.put("readStatusLightEnabledAttribute", readCameraAvStreamManagementStatusLightEnabledAttributeInteractionInfo); + Map readCameraAvStreamManagementStatusLightBrightnessCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementStatusLightBrightnessAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readStatusLightBrightnessAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readCameraAvStreamManagementStatusLightBrightnessCommandParams + ); + result.put("readStatusLightBrightnessAttribute", readCameraAvStreamManagementStatusLightBrightnessAttributeInteractionInfo); + Map readCameraAvStreamManagementDepthSensorStatusCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementDepthSensorStatusAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readDepthSensorStatusAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readCameraAvStreamManagementDepthSensorStatusCommandParams + ); + result.put("readDepthSensorStatusAttribute", readCameraAvStreamManagementDepthSensorStatusAttributeInteractionInfo); + Map readCameraAvStreamManagementGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.CameraAvStreamManagementCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCameraAvStreamManagementClusterGeneratedCommandListAttributeCallback(), + readCameraAvStreamManagementGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readCameraAvStreamManagementGeneratedCommandListAttributeInteractionInfo); + Map readCameraAvStreamManagementAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.CameraAvStreamManagementCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCameraAvStreamManagementClusterAcceptedCommandListAttributeCallback(), + readCameraAvStreamManagementAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readCameraAvStreamManagementAcceptedCommandListAttributeInteractionInfo); + Map readCameraAvStreamManagementEventListCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readEventListAttribute( + (ChipClusters.CameraAvStreamManagementCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCameraAvStreamManagementClusterEventListAttributeCallback(), + readCameraAvStreamManagementEventListCommandParams + ); + result.put("readEventListAttribute", readCameraAvStreamManagementEventListAttributeInteractionInfo); + Map readCameraAvStreamManagementAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readAttributeListAttribute( + (ChipClusters.CameraAvStreamManagementCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedCameraAvStreamManagementClusterAttributeListAttributeCallback(), + readCameraAvStreamManagementAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readCameraAvStreamManagementAttributeListAttributeInteractionInfo); + Map readCameraAvStreamManagementFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readCameraAvStreamManagementFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readCameraAvStreamManagementFeatureMapAttributeInteractionInfo); + Map readCameraAvStreamManagementClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readCameraAvStreamManagementClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readCameraAvStreamManagementClusterRevisionAttributeInteractionInfo); + + return result; + } private static Map readWebRTCTransportProviderInteractionInfo() { Map result = new LinkedHashMap<>();Map readWebRTCTransportProviderCurrentSessionsCommandParams = new LinkedHashMap(); InteractionInfo readWebRTCTransportProviderCurrentSessionsAttributeInteractionInfo = new InteractionInfo( @@ -18317,6 +18897,87 @@ private static Map readWebRTCTransportProviderInteracti return result; } + private static Map readWebRTCTransportRequestorInteractionInfo() { + Map result = new LinkedHashMap<>();Map readWebRTCTransportRequestorCurrentSessionsCommandParams = new LinkedHashMap(); + InteractionInfo readWebRTCTransportRequestorCurrentSessionsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WebRTCTransportRequestorCluster) cluster).readCurrentSessionsAttribute( + (ChipClusters.WebRTCTransportRequestorCluster.CurrentSessionsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedWebRTCTransportRequestorClusterCurrentSessionsAttributeCallback(), + readWebRTCTransportRequestorCurrentSessionsCommandParams + ); + result.put("readCurrentSessionsAttribute", readWebRTCTransportRequestorCurrentSessionsAttributeInteractionInfo); + Map readWebRTCTransportRequestorGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readWebRTCTransportRequestorGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WebRTCTransportRequestorCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.WebRTCTransportRequestorCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedWebRTCTransportRequestorClusterGeneratedCommandListAttributeCallback(), + readWebRTCTransportRequestorGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readWebRTCTransportRequestorGeneratedCommandListAttributeInteractionInfo); + Map readWebRTCTransportRequestorAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readWebRTCTransportRequestorAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WebRTCTransportRequestorCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.WebRTCTransportRequestorCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedWebRTCTransportRequestorClusterAcceptedCommandListAttributeCallback(), + readWebRTCTransportRequestorAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readWebRTCTransportRequestorAcceptedCommandListAttributeInteractionInfo); + Map readWebRTCTransportRequestorEventListCommandParams = new LinkedHashMap(); + InteractionInfo readWebRTCTransportRequestorEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WebRTCTransportRequestorCluster) cluster).readEventListAttribute( + (ChipClusters.WebRTCTransportRequestorCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedWebRTCTransportRequestorClusterEventListAttributeCallback(), + readWebRTCTransportRequestorEventListCommandParams + ); + result.put("readEventListAttribute", readWebRTCTransportRequestorEventListAttributeInteractionInfo); + Map readWebRTCTransportRequestorAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readWebRTCTransportRequestorAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WebRTCTransportRequestorCluster) cluster).readAttributeListAttribute( + (ChipClusters.WebRTCTransportRequestorCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedWebRTCTransportRequestorClusterAttributeListAttributeCallback(), + readWebRTCTransportRequestorAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readWebRTCTransportRequestorAttributeListAttributeInteractionInfo); + Map readWebRTCTransportRequestorFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readWebRTCTransportRequestorFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WebRTCTransportRequestorCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readWebRTCTransportRequestorFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readWebRTCTransportRequestorFeatureMapAttributeInteractionInfo); + Map readWebRTCTransportRequestorClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readWebRTCTransportRequestorClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.WebRTCTransportRequestorCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readWebRTCTransportRequestorClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readWebRTCTransportRequestorClusterRevisionAttributeInteractionInfo); + + return result; + } private static Map readChimeInteractionInfo() { Map result = new LinkedHashMap<>();Map readChimeInstalledChimeSoundsCommandParams = new LinkedHashMap(); InteractionInfo readChimeInstalledChimeSoundsAttributeInteractionInfo = new InteractionInfo( @@ -19870,7 +20531,10 @@ public Map> getReadAttributeMap() { put("accountLogin", readAccountLoginInteractionInfo()); put("contentControl", readContentControlInteractionInfo()); put("contentAppObserver", readContentAppObserverInteractionInfo()); + put("zoneManagement", readZoneManagementInteractionInfo()); + put("cameraAvStreamManagement", readCameraAvStreamManagementInteractionInfo()); put("webRTCTransportProvider", readWebRTCTransportProviderInteractionInfo()); + put("webRTCTransportRequestor", readWebRTCTransportRequestorInteractionInfo()); put("chime", readChimeInteractionInfo()); put("ecosystemInformation", readEcosystemInformationInteractionInfo()); put("commissionerControl", readCommissionerControlInteractionInfo()); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java index 0d561c36e7..725fd0baec 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -1205,142 +1205,10 @@ public Map> getWriteAttributeMap() { Map writePowerTopologyInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("powerTopology", writePowerTopologyInteractionInfo); Map writeEnergyEvseModeInteractionInfo = new LinkedHashMap<>(); - Map writeEnergyEvseModeStartUpModeCommandParams = new LinkedHashMap(); - CommandParameterInfo energyEvseModestartUpModeCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeEnergyEvseModeStartUpModeCommandParams.put( - "value", - energyEvseModestartUpModeCommandParameterInfo - ); - InteractionInfo writeEnergyEvseModeStartUpModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.EnergyEvseModeCluster) cluster).writeStartUpModeAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeEnergyEvseModeStartUpModeCommandParams - ); - writeEnergyEvseModeInteractionInfo.put("writeStartUpModeAttribute", writeEnergyEvseModeStartUpModeAttributeInteractionInfo); - Map writeEnergyEvseModeOnModeCommandParams = new LinkedHashMap(); - CommandParameterInfo energyEvseModeonModeCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeEnergyEvseModeOnModeCommandParams.put( - "value", - energyEvseModeonModeCommandParameterInfo - ); - InteractionInfo writeEnergyEvseModeOnModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.EnergyEvseModeCluster) cluster).writeOnModeAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeEnergyEvseModeOnModeCommandParams - ); - writeEnergyEvseModeInteractionInfo.put("writeOnModeAttribute", writeEnergyEvseModeOnModeAttributeInteractionInfo); writeAttributeMap.put("energyEvseMode", writeEnergyEvseModeInteractionInfo); Map writeWaterHeaterModeInteractionInfo = new LinkedHashMap<>(); - Map writeWaterHeaterModeStartUpModeCommandParams = new LinkedHashMap(); - CommandParameterInfo waterHeaterModestartUpModeCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeWaterHeaterModeStartUpModeCommandParams.put( - "value", - waterHeaterModestartUpModeCommandParameterInfo - ); - InteractionInfo writeWaterHeaterModeStartUpModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.WaterHeaterModeCluster) cluster).writeStartUpModeAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeWaterHeaterModeStartUpModeCommandParams - ); - writeWaterHeaterModeInteractionInfo.put("writeStartUpModeAttribute", writeWaterHeaterModeStartUpModeAttributeInteractionInfo); - Map writeWaterHeaterModeOnModeCommandParams = new LinkedHashMap(); - CommandParameterInfo waterHeaterModeonModeCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeWaterHeaterModeOnModeCommandParams.put( - "value", - waterHeaterModeonModeCommandParameterInfo - ); - InteractionInfo writeWaterHeaterModeOnModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.WaterHeaterModeCluster) cluster).writeOnModeAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeWaterHeaterModeOnModeCommandParams - ); - writeWaterHeaterModeInteractionInfo.put("writeOnModeAttribute", writeWaterHeaterModeOnModeAttributeInteractionInfo); writeAttributeMap.put("waterHeaterMode", writeWaterHeaterModeInteractionInfo); Map writeDeviceEnergyManagementModeInteractionInfo = new LinkedHashMap<>(); - Map writeDeviceEnergyManagementModeStartUpModeCommandParams = new LinkedHashMap(); - CommandParameterInfo deviceEnergyManagementModestartUpModeCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeDeviceEnergyManagementModeStartUpModeCommandParams.put( - "value", - deviceEnergyManagementModestartUpModeCommandParameterInfo - ); - InteractionInfo writeDeviceEnergyManagementModeStartUpModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.DeviceEnergyManagementModeCluster) cluster).writeStartUpModeAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeDeviceEnergyManagementModeStartUpModeCommandParams - ); - writeDeviceEnergyManagementModeInteractionInfo.put("writeStartUpModeAttribute", writeDeviceEnergyManagementModeStartUpModeAttributeInteractionInfo); - Map writeDeviceEnergyManagementModeOnModeCommandParams = new LinkedHashMap(); - CommandParameterInfo deviceEnergyManagementModeonModeCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeDeviceEnergyManagementModeOnModeCommandParams.put( - "value", - deviceEnergyManagementModeonModeCommandParameterInfo - ); - InteractionInfo writeDeviceEnergyManagementModeOnModeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.DeviceEnergyManagementModeCluster) cluster).writeOnModeAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeDeviceEnergyManagementModeOnModeCommandParams - ); - writeDeviceEnergyManagementModeInteractionInfo.put("writeOnModeAttribute", writeDeviceEnergyManagementModeOnModeAttributeInteractionInfo); writeAttributeMap.put("deviceEnergyManagementMode", writeDeviceEnergyManagementModeInteractionInfo); Map writeDoorLockInteractionInfo = new LinkedHashMap<>(); Map writeDoorLockDoorOpenEventsCommandParams = new LinkedHashMap(); @@ -3472,8 +3340,520 @@ public Map> getWriteAttributeMap() { writeAttributeMap.put("contentControl", writeContentControlInteractionInfo); Map writeContentAppObserverInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("contentAppObserver", writeContentAppObserverInteractionInfo); + Map writeZoneManagementInteractionInfo = new LinkedHashMap<>(); + Map writeZoneManagementSensitivityCommandParams = new LinkedHashMap(); + CommandParameterInfo zoneManagementsensitivityCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeZoneManagementSensitivityCommandParams.put( + "value", + zoneManagementsensitivityCommandParameterInfo + ); + InteractionInfo writeZoneManagementSensitivityAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ZoneManagementCluster) cluster).writeSensitivityAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeZoneManagementSensitivityCommandParams + ); + writeZoneManagementInteractionInfo.put("writeSensitivityAttribute", writeZoneManagementSensitivityAttributeInteractionInfo); + writeAttributeMap.put("zoneManagement", writeZoneManagementInteractionInfo); + Map writeCameraAvStreamManagementInteractionInfo = new LinkedHashMap<>(); + Map writeCameraAvStreamManagementHDRModeEnabledCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementHDRModeEnabledCommandParameterInfo = + new CommandParameterInfo( + "value", + Boolean.class, + Boolean.class + ); + writeCameraAvStreamManagementHDRModeEnabledCommandParams.put( + "value", + cameraAvStreamManagementHDRModeEnabledCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementHDRModeEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeHDRModeEnabledAttribute( + (DefaultClusterCallback) callback, + (Boolean) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementHDRModeEnabledCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeHDRModeEnabledAttribute", writeCameraAvStreamManagementHDRModeEnabledAttributeInteractionInfo); + Map writeCameraAvStreamManagementSoftRecordingPrivacyModeEnabledCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementsoftRecordingPrivacyModeEnabledCommandParameterInfo = + new CommandParameterInfo( + "value", + Boolean.class, + Boolean.class + ); + writeCameraAvStreamManagementSoftRecordingPrivacyModeEnabledCommandParams.put( + "value", + cameraAvStreamManagementsoftRecordingPrivacyModeEnabledCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementSoftRecordingPrivacyModeEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeSoftRecordingPrivacyModeEnabledAttribute( + (DefaultClusterCallback) callback, + (Boolean) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementSoftRecordingPrivacyModeEnabledCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeSoftRecordingPrivacyModeEnabledAttribute", writeCameraAvStreamManagementSoftRecordingPrivacyModeEnabledAttributeInteractionInfo); + Map writeCameraAvStreamManagementSoftLivestreamPrivacyModeEnabledCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementsoftLivestreamPrivacyModeEnabledCommandParameterInfo = + new CommandParameterInfo( + "value", + Boolean.class, + Boolean.class + ); + writeCameraAvStreamManagementSoftLivestreamPrivacyModeEnabledCommandParams.put( + "value", + cameraAvStreamManagementsoftLivestreamPrivacyModeEnabledCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementSoftLivestreamPrivacyModeEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeSoftLivestreamPrivacyModeEnabledAttribute( + (DefaultClusterCallback) callback, + (Boolean) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementSoftLivestreamPrivacyModeEnabledCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeSoftLivestreamPrivacyModeEnabledAttribute", writeCameraAvStreamManagementSoftLivestreamPrivacyModeEnabledAttributeInteractionInfo); + Map writeCameraAvStreamManagementNightVisionCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementnightVisionCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeCameraAvStreamManagementNightVisionCommandParams.put( + "value", + cameraAvStreamManagementnightVisionCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementNightVisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeNightVisionAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementNightVisionCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeNightVisionAttribute", writeCameraAvStreamManagementNightVisionAttributeInteractionInfo); + Map writeCameraAvStreamManagementNightVisionIllumCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementnightVisionIllumCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeCameraAvStreamManagementNightVisionIllumCommandParams.put( + "value", + cameraAvStreamManagementnightVisionIllumCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementNightVisionIllumAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeNightVisionIllumAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementNightVisionIllumCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeNightVisionIllumAttribute", writeCameraAvStreamManagementNightVisionIllumAttributeInteractionInfo); + Map writeCameraAvStreamManagementAWBEnabledCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementAWBEnabledCommandParameterInfo = + new CommandParameterInfo( + "value", + Boolean.class, + Boolean.class + ); + writeCameraAvStreamManagementAWBEnabledCommandParams.put( + "value", + cameraAvStreamManagementAWBEnabledCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementAWBEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeAWBEnabledAttribute( + (DefaultClusterCallback) callback, + (Boolean) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementAWBEnabledCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeAWBEnabledAttribute", writeCameraAvStreamManagementAWBEnabledAttributeInteractionInfo); + Map writeCameraAvStreamManagementAutoShutterSpeedEnabledCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementautoShutterSpeedEnabledCommandParameterInfo = + new CommandParameterInfo( + "value", + Boolean.class, + Boolean.class + ); + writeCameraAvStreamManagementAutoShutterSpeedEnabledCommandParams.put( + "value", + cameraAvStreamManagementautoShutterSpeedEnabledCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementAutoShutterSpeedEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeAutoShutterSpeedEnabledAttribute( + (DefaultClusterCallback) callback, + (Boolean) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementAutoShutterSpeedEnabledCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeAutoShutterSpeedEnabledAttribute", writeCameraAvStreamManagementAutoShutterSpeedEnabledAttributeInteractionInfo); + Map writeCameraAvStreamManagementAutoISOEnabledCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementautoISOEnabledCommandParameterInfo = + new CommandParameterInfo( + "value", + Boolean.class, + Boolean.class + ); + writeCameraAvStreamManagementAutoISOEnabledCommandParams.put( + "value", + cameraAvStreamManagementautoISOEnabledCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementAutoISOEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeAutoISOEnabledAttribute( + (DefaultClusterCallback) callback, + (Boolean) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementAutoISOEnabledCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeAutoISOEnabledAttribute", writeCameraAvStreamManagementAutoISOEnabledAttributeInteractionInfo); + Map writeCameraAvStreamManagementSpeakerMutedCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementspeakerMutedCommandParameterInfo = + new CommandParameterInfo( + "value", + Boolean.class, + Boolean.class + ); + writeCameraAvStreamManagementSpeakerMutedCommandParams.put( + "value", + cameraAvStreamManagementspeakerMutedCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementSpeakerMutedAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeSpeakerMutedAttribute( + (DefaultClusterCallback) callback, + (Boolean) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementSpeakerMutedCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeSpeakerMutedAttribute", writeCameraAvStreamManagementSpeakerMutedAttributeInteractionInfo); + Map writeCameraAvStreamManagementSpeakerVolumeLevelCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementspeakerVolumeLevelCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeCameraAvStreamManagementSpeakerVolumeLevelCommandParams.put( + "value", + cameraAvStreamManagementspeakerVolumeLevelCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementSpeakerVolumeLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeSpeakerVolumeLevelAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementSpeakerVolumeLevelCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeSpeakerVolumeLevelAttribute", writeCameraAvStreamManagementSpeakerVolumeLevelAttributeInteractionInfo); + Map writeCameraAvStreamManagementSpeakerMaxLevelCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementspeakerMaxLevelCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeCameraAvStreamManagementSpeakerMaxLevelCommandParams.put( + "value", + cameraAvStreamManagementspeakerMaxLevelCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementSpeakerMaxLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeSpeakerMaxLevelAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementSpeakerMaxLevelCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeSpeakerMaxLevelAttribute", writeCameraAvStreamManagementSpeakerMaxLevelAttributeInteractionInfo); + Map writeCameraAvStreamManagementSpeakerMinLevelCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementspeakerMinLevelCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeCameraAvStreamManagementSpeakerMinLevelCommandParams.put( + "value", + cameraAvStreamManagementspeakerMinLevelCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementSpeakerMinLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeSpeakerMinLevelAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementSpeakerMinLevelCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeSpeakerMinLevelAttribute", writeCameraAvStreamManagementSpeakerMinLevelAttributeInteractionInfo); + Map writeCameraAvStreamManagementMicrophoneMutedCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementmicrophoneMutedCommandParameterInfo = + new CommandParameterInfo( + "value", + Boolean.class, + Boolean.class + ); + writeCameraAvStreamManagementMicrophoneMutedCommandParams.put( + "value", + cameraAvStreamManagementmicrophoneMutedCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementMicrophoneMutedAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeMicrophoneMutedAttribute( + (DefaultClusterCallback) callback, + (Boolean) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementMicrophoneMutedCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeMicrophoneMutedAttribute", writeCameraAvStreamManagementMicrophoneMutedAttributeInteractionInfo); + Map writeCameraAvStreamManagementMicrophoneVolumeLevelCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementmicrophoneVolumeLevelCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeCameraAvStreamManagementMicrophoneVolumeLevelCommandParams.put( + "value", + cameraAvStreamManagementmicrophoneVolumeLevelCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementMicrophoneVolumeLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeMicrophoneVolumeLevelAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementMicrophoneVolumeLevelCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeMicrophoneVolumeLevelAttribute", writeCameraAvStreamManagementMicrophoneVolumeLevelAttributeInteractionInfo); + Map writeCameraAvStreamManagementMicrophoneMaxLevelCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementmicrophoneMaxLevelCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeCameraAvStreamManagementMicrophoneMaxLevelCommandParams.put( + "value", + cameraAvStreamManagementmicrophoneMaxLevelCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementMicrophoneMaxLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeMicrophoneMaxLevelAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementMicrophoneMaxLevelCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeMicrophoneMaxLevelAttribute", writeCameraAvStreamManagementMicrophoneMaxLevelAttributeInteractionInfo); + Map writeCameraAvStreamManagementMicrophoneMinLevelCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementmicrophoneMinLevelCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeCameraAvStreamManagementMicrophoneMinLevelCommandParams.put( + "value", + cameraAvStreamManagementmicrophoneMinLevelCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementMicrophoneMinLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeMicrophoneMinLevelAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementMicrophoneMinLevelCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeMicrophoneMinLevelAttribute", writeCameraAvStreamManagementMicrophoneMinLevelAttributeInteractionInfo); + Map writeCameraAvStreamManagementMicrophoneAGCEnabledCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementmicrophoneAGCEnabledCommandParameterInfo = + new CommandParameterInfo( + "value", + Boolean.class, + Boolean.class + ); + writeCameraAvStreamManagementMicrophoneAGCEnabledCommandParams.put( + "value", + cameraAvStreamManagementmicrophoneAGCEnabledCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementMicrophoneAGCEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeMicrophoneAGCEnabledAttribute( + (DefaultClusterCallback) callback, + (Boolean) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementMicrophoneAGCEnabledCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeMicrophoneAGCEnabledAttribute", writeCameraAvStreamManagementMicrophoneAGCEnabledAttributeInteractionInfo); + Map writeCameraAvStreamManagementLocalVideoRecordingEnabledCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementlocalVideoRecordingEnabledCommandParameterInfo = + new CommandParameterInfo( + "value", + Boolean.class, + Boolean.class + ); + writeCameraAvStreamManagementLocalVideoRecordingEnabledCommandParams.put( + "value", + cameraAvStreamManagementlocalVideoRecordingEnabledCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementLocalVideoRecordingEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeLocalVideoRecordingEnabledAttribute( + (DefaultClusterCallback) callback, + (Boolean) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementLocalVideoRecordingEnabledCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeLocalVideoRecordingEnabledAttribute", writeCameraAvStreamManagementLocalVideoRecordingEnabledAttributeInteractionInfo); + Map writeCameraAvStreamManagementLocalSnapshotRecordingEnabledCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementlocalSnapshotRecordingEnabledCommandParameterInfo = + new CommandParameterInfo( + "value", + Boolean.class, + Boolean.class + ); + writeCameraAvStreamManagementLocalSnapshotRecordingEnabledCommandParams.put( + "value", + cameraAvStreamManagementlocalSnapshotRecordingEnabledCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementLocalSnapshotRecordingEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeLocalSnapshotRecordingEnabledAttribute( + (DefaultClusterCallback) callback, + (Boolean) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementLocalSnapshotRecordingEnabledCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeLocalSnapshotRecordingEnabledAttribute", writeCameraAvStreamManagementLocalSnapshotRecordingEnabledAttributeInteractionInfo); + Map writeCameraAvStreamManagementStatusLightEnabledCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementstatusLightEnabledCommandParameterInfo = + new CommandParameterInfo( + "value", + Boolean.class, + Boolean.class + ); + writeCameraAvStreamManagementStatusLightEnabledCommandParams.put( + "value", + cameraAvStreamManagementstatusLightEnabledCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementStatusLightEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeStatusLightEnabledAttribute( + (DefaultClusterCallback) callback, + (Boolean) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementStatusLightEnabledCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeStatusLightEnabledAttribute", writeCameraAvStreamManagementStatusLightEnabledAttributeInteractionInfo); + Map writeCameraAvStreamManagementStatusLightBrightnessCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementstatusLightBrightnessCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeCameraAvStreamManagementStatusLightBrightnessCommandParams.put( + "value", + cameraAvStreamManagementstatusLightBrightnessCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementStatusLightBrightnessAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeStatusLightBrightnessAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementStatusLightBrightnessCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeStatusLightBrightnessAttribute", writeCameraAvStreamManagementStatusLightBrightnessAttributeInteractionInfo); + Map writeCameraAvStreamManagementDepthSensorStatusCommandParams = new LinkedHashMap(); + CommandParameterInfo cameraAvStreamManagementdepthSensorStatusCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeCameraAvStreamManagementDepthSensorStatusCommandParams.put( + "value", + cameraAvStreamManagementdepthSensorStatusCommandParameterInfo + ); + InteractionInfo writeCameraAvStreamManagementDepthSensorStatusAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.CameraAvStreamManagementCluster) cluster).writeDepthSensorStatusAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeCameraAvStreamManagementDepthSensorStatusCommandParams + ); + writeCameraAvStreamManagementInteractionInfo.put("writeDepthSensorStatusAttribute", writeCameraAvStreamManagementDepthSensorStatusAttributeInteractionInfo); + writeAttributeMap.put("cameraAvStreamManagement", writeCameraAvStreamManagementInteractionInfo); Map writeWebRTCTransportProviderInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("webRTCTransportProvider", writeWebRTCTransportProviderInteractionInfo); + Map writeWebRTCTransportRequestorInteractionInfo = new LinkedHashMap<>(); + writeAttributeMap.put("webRTCTransportRequestor", writeWebRTCTransportRequestorInteractionInfo); Map writeChimeInteractionInfo = new LinkedHashMap<>(); Map writeChimeActiveChimeIDCommandParams = new LinkedHashMap(); CommandParameterInfo chimeactiveChimeIDCommandParameterInfo = diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterAudioStreamChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterAudioStreamChangedEvent.kt new file mode 100644 index 0000000000..912de29377 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterAudioStreamChangedEvent.kt @@ -0,0 +1,144 @@ +/* + * + * 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. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import java.util.Optional +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterAudioStreamChangedEvent( + val audioStreamID: UInt, + val streamType: Optional, + val audioCodec: Optional, + val channelCount: Optional, + val sampleRate: Optional, + val bitRate: Optional, + val bitDepth: Optional, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterAudioStreamChangedEvent {\n") + append("\taudioStreamID : $audioStreamID\n") + append("\tstreamType : $streamType\n") + append("\taudioCodec : $audioCodec\n") + append("\tchannelCount : $channelCount\n") + append("\tsampleRate : $sampleRate\n") + append("\tbitRate : $bitRate\n") + append("\tbitDepth : $bitDepth\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_AUDIO_STREAM_ID), audioStreamID) + if (streamType.isPresent) { + val optstreamType = streamType.get() + put(ContextSpecificTag(TAG_STREAM_TYPE), optstreamType) + } + if (audioCodec.isPresent) { + val optaudioCodec = audioCodec.get() + put(ContextSpecificTag(TAG_AUDIO_CODEC), optaudioCodec) + } + if (channelCount.isPresent) { + val optchannelCount = channelCount.get() + put(ContextSpecificTag(TAG_CHANNEL_COUNT), optchannelCount) + } + if (sampleRate.isPresent) { + val optsampleRate = sampleRate.get() + put(ContextSpecificTag(TAG_SAMPLE_RATE), optsampleRate) + } + if (bitRate.isPresent) { + val optbitRate = bitRate.get() + put(ContextSpecificTag(TAG_BIT_RATE), optbitRate) + } + if (bitDepth.isPresent) { + val optbitDepth = bitDepth.get() + put(ContextSpecificTag(TAG_BIT_DEPTH), optbitDepth) + } + endStructure() + } + } + + companion object { + private const val TAG_AUDIO_STREAM_ID = 0 + private const val TAG_STREAM_TYPE = 1 + private const val TAG_AUDIO_CODEC = 2 + private const val TAG_CHANNEL_COUNT = 3 + private const val TAG_SAMPLE_RATE = 4 + private const val TAG_BIT_RATE = 5 + private const val TAG_BIT_DEPTH = 6 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterAudioStreamChangedEvent { + tlvReader.enterStructure(tlvTag) + val audioStreamID = tlvReader.getUInt(ContextSpecificTag(TAG_AUDIO_STREAM_ID)) + val streamType = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STREAM_TYPE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_STREAM_TYPE))) + } else { + Optional.empty() + } + val audioCodec = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_AUDIO_CODEC))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_AUDIO_CODEC))) + } else { + Optional.empty() + } + val channelCount = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CHANNEL_COUNT))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_CHANNEL_COUNT))) + } else { + Optional.empty() + } + val sampleRate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SAMPLE_RATE))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_SAMPLE_RATE))) + } else { + Optional.empty() + } + val bitRate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_BIT_RATE))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_BIT_RATE))) + } else { + Optional.empty() + } + val bitDepth = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_BIT_DEPTH))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_BIT_DEPTH))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterAudioStreamChangedEvent( + audioStreamID, + streamType, + audioCodec, + channelCount, + sampleRate, + bitRate, + bitDepth, + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterSnapshotStreamChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterSnapshotStreamChangedEvent.kt new file mode 100644 index 0000000000..7863af3d86 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterSnapshotStreamChangedEvent.kt @@ -0,0 +1,158 @@ +/* + * + * 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. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import java.util.Optional +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterSnapshotStreamChangedEvent( + val snapshotStreamID: UInt, + val imageCodec: Optional, + val frameRate: Optional, + val bitRate: Optional, + val minResolution: + Optional< + chip.devicecontroller.cluster.structs.CameraAvStreamManagementClusterVideoResolutionStruct + >, + val maxResolution: + Optional< + chip.devicecontroller.cluster.structs.CameraAvStreamManagementClusterVideoResolutionStruct + >, + val quality: Optional, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterSnapshotStreamChangedEvent {\n") + append("\tsnapshotStreamID : $snapshotStreamID\n") + append("\timageCodec : $imageCodec\n") + append("\tframeRate : $frameRate\n") + append("\tbitRate : $bitRate\n") + append("\tminResolution : $minResolution\n") + append("\tmaxResolution : $maxResolution\n") + append("\tquality : $quality\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_SNAPSHOT_STREAM_ID), snapshotStreamID) + if (imageCodec.isPresent) { + val optimageCodec = imageCodec.get() + put(ContextSpecificTag(TAG_IMAGE_CODEC), optimageCodec) + } + if (frameRate.isPresent) { + val optframeRate = frameRate.get() + put(ContextSpecificTag(TAG_FRAME_RATE), optframeRate) + } + if (bitRate.isPresent) { + val optbitRate = bitRate.get() + put(ContextSpecificTag(TAG_BIT_RATE), optbitRate) + } + if (minResolution.isPresent) { + val optminResolution = minResolution.get() + optminResolution.toTlv(ContextSpecificTag(TAG_MIN_RESOLUTION), this) + } + if (maxResolution.isPresent) { + val optmaxResolution = maxResolution.get() + optmaxResolution.toTlv(ContextSpecificTag(TAG_MAX_RESOLUTION), this) + } + if (quality.isPresent) { + val optquality = quality.get() + put(ContextSpecificTag(TAG_QUALITY), optquality) + } + endStructure() + } + } + + companion object { + private const val TAG_SNAPSHOT_STREAM_ID = 0 + private const val TAG_IMAGE_CODEC = 1 + private const val TAG_FRAME_RATE = 2 + private const val TAG_BIT_RATE = 3 + private const val TAG_MIN_RESOLUTION = 4 + private const val TAG_MAX_RESOLUTION = 5 + private const val TAG_QUALITY = 6 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterSnapshotStreamChangedEvent { + tlvReader.enterStructure(tlvTag) + val snapshotStreamID = tlvReader.getUInt(ContextSpecificTag(TAG_SNAPSHOT_STREAM_ID)) + val imageCodec = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMAGE_CODEC))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_IMAGE_CODEC))) + } else { + Optional.empty() + } + val frameRate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_FRAME_RATE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_FRAME_RATE))) + } else { + Optional.empty() + } + val bitRate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_BIT_RATE))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_BIT_RATE))) + } else { + Optional.empty() + } + val minResolution = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_RESOLUTION))) { + Optional.of( + chip.devicecontroller.cluster.structs + .CameraAvStreamManagementClusterVideoResolutionStruct + .fromTlv(ContextSpecificTag(TAG_MIN_RESOLUTION), tlvReader) + ) + } else { + Optional.empty() + } + val maxResolution = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_RESOLUTION))) { + Optional.of( + chip.devicecontroller.cluster.structs + .CameraAvStreamManagementClusterVideoResolutionStruct + .fromTlv(ContextSpecificTag(TAG_MAX_RESOLUTION), tlvReader) + ) + } else { + Optional.empty() + } + val quality = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_QUALITY))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_QUALITY))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterSnapshotStreamChangedEvent( + snapshotStreamID, + imageCodec, + frameRate, + bitRate, + minResolution, + maxResolution, + quality, + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterVideoStreamChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterVideoStreamChangedEvent.kt new file mode 100644 index 0000000000..cbe9480493 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterVideoStreamChangedEvent.kt @@ -0,0 +1,214 @@ +/* + * + * 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. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import java.util.Optional +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterVideoStreamChangedEvent( + val videoStreamID: UInt, + val streamType: Optional, + val videoCodec: Optional, + val minFrameRate: Optional, + val maxFrameRate: Optional, + val minResolution: + Optional< + chip.devicecontroller.cluster.structs.CameraAvStreamManagementClusterVideoResolutionStruct + >, + val maxResolution: + Optional< + chip.devicecontroller.cluster.structs.CameraAvStreamManagementClusterVideoResolutionStruct + >, + val minBitRate: Optional, + val maxBitRate: Optional, + val minFragmentLen: Optional, + val maxFragmentLen: Optional, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterVideoStreamChangedEvent {\n") + append("\tvideoStreamID : $videoStreamID\n") + append("\tstreamType : $streamType\n") + append("\tvideoCodec : $videoCodec\n") + append("\tminFrameRate : $minFrameRate\n") + append("\tmaxFrameRate : $maxFrameRate\n") + append("\tminResolution : $minResolution\n") + append("\tmaxResolution : $maxResolution\n") + append("\tminBitRate : $minBitRate\n") + append("\tmaxBitRate : $maxBitRate\n") + append("\tminFragmentLen : $minFragmentLen\n") + append("\tmaxFragmentLen : $maxFragmentLen\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), videoStreamID) + if (streamType.isPresent) { + val optstreamType = streamType.get() + put(ContextSpecificTag(TAG_STREAM_TYPE), optstreamType) + } + if (videoCodec.isPresent) { + val optvideoCodec = videoCodec.get() + put(ContextSpecificTag(TAG_VIDEO_CODEC), optvideoCodec) + } + if (minFrameRate.isPresent) { + val optminFrameRate = minFrameRate.get() + put(ContextSpecificTag(TAG_MIN_FRAME_RATE), optminFrameRate) + } + if (maxFrameRate.isPresent) { + val optmaxFrameRate = maxFrameRate.get() + put(ContextSpecificTag(TAG_MAX_FRAME_RATE), optmaxFrameRate) + } + if (minResolution.isPresent) { + val optminResolution = minResolution.get() + optminResolution.toTlv(ContextSpecificTag(TAG_MIN_RESOLUTION), this) + } + if (maxResolution.isPresent) { + val optmaxResolution = maxResolution.get() + optmaxResolution.toTlv(ContextSpecificTag(TAG_MAX_RESOLUTION), this) + } + if (minBitRate.isPresent) { + val optminBitRate = minBitRate.get() + put(ContextSpecificTag(TAG_MIN_BIT_RATE), optminBitRate) + } + if (maxBitRate.isPresent) { + val optmaxBitRate = maxBitRate.get() + put(ContextSpecificTag(TAG_MAX_BIT_RATE), optmaxBitRate) + } + if (minFragmentLen.isPresent) { + val optminFragmentLen = minFragmentLen.get() + put(ContextSpecificTag(TAG_MIN_FRAGMENT_LEN), optminFragmentLen) + } + if (maxFragmentLen.isPresent) { + val optmaxFragmentLen = maxFragmentLen.get() + put(ContextSpecificTag(TAG_MAX_FRAGMENT_LEN), optmaxFragmentLen) + } + endStructure() + } + } + + companion object { + private const val TAG_VIDEO_STREAM_ID = 0 + private const val TAG_STREAM_TYPE = 1 + private const val TAG_VIDEO_CODEC = 2 + private const val TAG_MIN_FRAME_RATE = 3 + private const val TAG_MAX_FRAME_RATE = 4 + private const val TAG_MIN_RESOLUTION = 5 + private const val TAG_MAX_RESOLUTION = 6 + private const val TAG_MIN_BIT_RATE = 7 + private const val TAG_MAX_BIT_RATE = 8 + private const val TAG_MIN_FRAGMENT_LEN = 9 + private const val TAG_MAX_FRAGMENT_LEN = 10 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterVideoStreamChangedEvent { + tlvReader.enterStructure(tlvTag) + val videoStreamID = tlvReader.getUInt(ContextSpecificTag(TAG_VIDEO_STREAM_ID)) + val streamType = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STREAM_TYPE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_STREAM_TYPE))) + } else { + Optional.empty() + } + val videoCodec = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_VIDEO_CODEC))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_VIDEO_CODEC))) + } else { + Optional.empty() + } + val minFrameRate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_FRAME_RATE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MIN_FRAME_RATE))) + } else { + Optional.empty() + } + val maxFrameRate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_FRAME_RATE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MAX_FRAME_RATE))) + } else { + Optional.empty() + } + val minResolution = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_RESOLUTION))) { + Optional.of( + chip.devicecontroller.cluster.structs + .CameraAvStreamManagementClusterVideoResolutionStruct + .fromTlv(ContextSpecificTag(TAG_MIN_RESOLUTION), tlvReader) + ) + } else { + Optional.empty() + } + val maxResolution = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_RESOLUTION))) { + Optional.of( + chip.devicecontroller.cluster.structs + .CameraAvStreamManagementClusterVideoResolutionStruct + .fromTlv(ContextSpecificTag(TAG_MAX_RESOLUTION), tlvReader) + ) + } else { + Optional.empty() + } + val minBitRate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_BIT_RATE))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MIN_BIT_RATE))) + } else { + Optional.empty() + } + val maxBitRate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_BIT_RATE))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_MAX_BIT_RATE))) + } else { + Optional.empty() + } + val minFragmentLen = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_FRAGMENT_LEN))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MIN_FRAGMENT_LEN))) + } else { + Optional.empty() + } + val maxFragmentLen = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_FRAGMENT_LEN))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MAX_FRAGMENT_LEN))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterVideoStreamChangedEvent( + videoStreamID, + streamType, + videoCodec, + minFrameRate, + maxFrameRate, + minResolution, + maxResolution, + minBitRate, + maxBitRate, + minFragmentLen, + maxFragmentLen, + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ZoneManagementClusterZoneStoppedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ZoneManagementClusterZoneStoppedEvent.kt new file mode 100644 index 0000000000..ce1aba9101 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ZoneManagementClusterZoneStoppedEvent.kt @@ -0,0 +1,68 @@ +/* + * + * 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. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ZoneManagementClusterZoneStoppedEvent(val zones: List, val reason: UInt) { + override fun toString(): String = buildString { + append("ZoneManagementClusterZoneStoppedEvent {\n") + append("\tzones : $zones\n") + append("\treason : $reason\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_ZONES)) + for (item in zones.iterator()) { + put(AnonymousTag, item) + } + endArray() + put(ContextSpecificTag(TAG_REASON), reason) + endStructure() + } + } + + companion object { + private const val TAG_ZONES = 0 + private const val TAG_REASON = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ZoneManagementClusterZoneStoppedEvent { + tlvReader.enterStructure(tlvTag) + val zones = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ZONES)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val reason = tlvReader.getUInt(ContextSpecificTag(TAG_REASON)) + + tlvReader.exitContainer() + + return ZoneManagementClusterZoneStoppedEvent(zones, reason) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ZoneManagementClusterZoneTriggeredEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ZoneManagementClusterZoneTriggeredEvent.kt new file mode 100644 index 0000000000..610fee6521 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ZoneManagementClusterZoneTriggeredEvent.kt @@ -0,0 +1,68 @@ +/* + * + * 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. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ZoneManagementClusterZoneTriggeredEvent(val zones: List, val reason: UInt) { + override fun toString(): String = buildString { + append("ZoneManagementClusterZoneTriggeredEvent {\n") + append("\tzones : $zones\n") + append("\treason : $reason\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_ZONES)) + for (item in zones.iterator()) { + put(AnonymousTag, item) + } + endArray() + put(ContextSpecificTag(TAG_REASON), reason) + endStructure() + } + } + + companion object { + private const val TAG_ZONES = 0 + private const val TAG_REASON = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ZoneManagementClusterZoneTriggeredEvent { + tlvReader.enterStructure(tlvTag) + val zones = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ZONES)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val reason = tlvReader.getUInt(ContextSpecificTag(TAG_REASON)) + + tlvReader.exitContainer() + + return ZoneManagementClusterZoneTriggeredEvent(zones, reason) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni index 6187cfbe7c..2aed70a3dc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni @@ -19,6 +19,15 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterAudioCapabilitiesStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterAudioStreamStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterSnapshotParamsStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterSnapshotStreamStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterVideoResolutionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterVideoSensorParamsStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterVideoStreamStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterViewportStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterAdditionalInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelPagingStruct.kt", @@ -162,6 +171,12 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WaterHeaterModeClusterModeTagStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportProviderClusterICEServerStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportProviderClusterWebRTCSessionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportRequestorClusterICEServerStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportRequestorClusterWebRTCSessionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZoneManagementClusterTwoDCartesianVertexStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZoneManagementClusterTwoDCartesianZoneStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZoneManagementClusterZoneInformationStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZoneManagementClusterZoneTriggeringTimeControlStruct.kt", ] eventstructs_sources = [ @@ -180,6 +195,9 @@ eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterActiveChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterAudioStreamChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterSnapshotStreamChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CameraAvStreamManagementClusterVideoStreamChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CommissionerControlClusterCommissioningRequestResultEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DeviceEnergyManagementClusterPowerAdjustEndEvent.kt", @@ -249,4 +267,6 @@ eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ZoneManagementClusterZoneStoppedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ZoneManagementClusterZoneTriggeredEvent.kt", ] \ No newline at end of file diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterAudioCapabilitiesStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterAudioCapabilitiesStruct.kt new file mode 100644 index 0000000000..c1b428af89 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterAudioCapabilitiesStruct.kt @@ -0,0 +1,111 @@ +/* + * + * 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. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterAudioCapabilitiesStruct( + val maxNumberOfChannels: UInt, + val supportedCodecs: List, + val supportedSampleRates: List, + val supportedBitDepths: List, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterAudioCapabilitiesStruct {\n") + append("\tmaxNumberOfChannels : $maxNumberOfChannels\n") + append("\tsupportedCodecs : $supportedCodecs\n") + append("\tsupportedSampleRates : $supportedSampleRates\n") + append("\tsupportedBitDepths : $supportedBitDepths\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_MAX_NUMBER_OF_CHANNELS), maxNumberOfChannels) + startArray(ContextSpecificTag(TAG_SUPPORTED_CODECS)) + for (item in supportedCodecs.iterator()) { + put(AnonymousTag, item) + } + endArray() + startArray(ContextSpecificTag(TAG_SUPPORTED_SAMPLE_RATES)) + for (item in supportedSampleRates.iterator()) { + put(AnonymousTag, item) + } + endArray() + startArray(ContextSpecificTag(TAG_SUPPORTED_BIT_DEPTHS)) + for (item in supportedBitDepths.iterator()) { + put(AnonymousTag, item) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_MAX_NUMBER_OF_CHANNELS = 0 + private const val TAG_SUPPORTED_CODECS = 1 + private const val TAG_SUPPORTED_SAMPLE_RATES = 2 + private const val TAG_SUPPORTED_BIT_DEPTHS = 3 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterAudioCapabilitiesStruct { + tlvReader.enterStructure(tlvTag) + val maxNumberOfChannels = tlvReader.getUInt(ContextSpecificTag(TAG_MAX_NUMBER_OF_CHANNELS)) + val supportedCodecs = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_SUPPORTED_CODECS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val supportedSampleRates = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_SUPPORTED_SAMPLE_RATES)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getULong(AnonymousTag)) + } + tlvReader.exitContainer() + } + val supportedBitDepths = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_SUPPORTED_BIT_DEPTHS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterAudioCapabilitiesStruct( + maxNumberOfChannels, + supportedCodecs, + supportedSampleRates, + supportedBitDepths, + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterAudioStreamStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterAudioStreamStruct.kt new file mode 100644 index 0000000000..5acfc37aad --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterAudioStreamStruct.kt @@ -0,0 +1,101 @@ +/* + * + * 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. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterAudioStreamStruct( + val audioStreamID: UInt, + val streamType: UInt, + val audioCodec: UInt, + val channelCount: UInt, + val sampleRate: ULong, + val bitRate: ULong, + val bitDepth: UInt, + val referenceCount: UInt, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterAudioStreamStruct {\n") + append("\taudioStreamID : $audioStreamID\n") + append("\tstreamType : $streamType\n") + append("\taudioCodec : $audioCodec\n") + append("\tchannelCount : $channelCount\n") + append("\tsampleRate : $sampleRate\n") + append("\tbitRate : $bitRate\n") + append("\tbitDepth : $bitDepth\n") + append("\treferenceCount : $referenceCount\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_AUDIO_STREAM_ID), audioStreamID) + put(ContextSpecificTag(TAG_STREAM_TYPE), streamType) + put(ContextSpecificTag(TAG_AUDIO_CODEC), audioCodec) + put(ContextSpecificTag(TAG_CHANNEL_COUNT), channelCount) + put(ContextSpecificTag(TAG_SAMPLE_RATE), sampleRate) + put(ContextSpecificTag(TAG_BIT_RATE), bitRate) + put(ContextSpecificTag(TAG_BIT_DEPTH), bitDepth) + put(ContextSpecificTag(TAG_REFERENCE_COUNT), referenceCount) + endStructure() + } + } + + companion object { + private const val TAG_AUDIO_STREAM_ID = 0 + private const val TAG_STREAM_TYPE = 1 + private const val TAG_AUDIO_CODEC = 2 + private const val TAG_CHANNEL_COUNT = 3 + private const val TAG_SAMPLE_RATE = 4 + private const val TAG_BIT_RATE = 5 + private const val TAG_BIT_DEPTH = 6 + private const val TAG_REFERENCE_COUNT = 7 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterAudioStreamStruct { + tlvReader.enterStructure(tlvTag) + val audioStreamID = tlvReader.getUInt(ContextSpecificTag(TAG_AUDIO_STREAM_ID)) + val streamType = tlvReader.getUInt(ContextSpecificTag(TAG_STREAM_TYPE)) + val audioCodec = tlvReader.getUInt(ContextSpecificTag(TAG_AUDIO_CODEC)) + val channelCount = tlvReader.getUInt(ContextSpecificTag(TAG_CHANNEL_COUNT)) + val sampleRate = tlvReader.getULong(ContextSpecificTag(TAG_SAMPLE_RATE)) + val bitRate = tlvReader.getULong(ContextSpecificTag(TAG_BIT_RATE)) + val bitDepth = tlvReader.getUInt(ContextSpecificTag(TAG_BIT_DEPTH)) + val referenceCount = tlvReader.getUInt(ContextSpecificTag(TAG_REFERENCE_COUNT)) + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterAudioStreamStruct( + audioStreamID, + streamType, + audioCodec, + channelCount, + sampleRate, + bitRate, + bitDepth, + referenceCount, + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct.kt new file mode 100644 index 0000000000..4bdf703326 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct.kt @@ -0,0 +1,75 @@ +/* + * + * 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. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct( + val codec: UInt, + val resolution: CameraAvStreamManagementClusterVideoResolutionStruct, + val minBitRate: ULong, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct {\n") + append("\tcodec : $codec\n") + append("\tresolution : $resolution\n") + append("\tminBitRate : $minBitRate\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_CODEC), codec) + resolution.toTlv(ContextSpecificTag(TAG_RESOLUTION), this) + put(ContextSpecificTag(TAG_MIN_BIT_RATE), minBitRate) + endStructure() + } + } + + companion object { + private const val TAG_CODEC = 0 + private const val TAG_RESOLUTION = 1 + private const val TAG_MIN_BIT_RATE = 2 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct { + tlvReader.enterStructure(tlvTag) + val codec = tlvReader.getUInt(ContextSpecificTag(TAG_CODEC)) + val resolution = + CameraAvStreamManagementClusterVideoResolutionStruct.fromTlv( + ContextSpecificTag(TAG_RESOLUTION), + tlvReader, + ) + val minBitRate = tlvReader.getULong(ContextSpecificTag(TAG_MIN_BIT_RATE)) + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct( + codec, + resolution, + minBitRate, + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterSnapshotParamsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterSnapshotParamsStruct.kt new file mode 100644 index 0000000000..fa66c969ca --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterSnapshotParamsStruct.kt @@ -0,0 +1,75 @@ +/* + * + * 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. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterSnapshotParamsStruct( + val resolution: CameraAvStreamManagementClusterVideoResolutionStruct, + val maxFrameRate: UInt, + val imageCodec: UInt, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterSnapshotParamsStruct {\n") + append("\tresolution : $resolution\n") + append("\tmaxFrameRate : $maxFrameRate\n") + append("\timageCodec : $imageCodec\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + resolution.toTlv(ContextSpecificTag(TAG_RESOLUTION), this) + put(ContextSpecificTag(TAG_MAX_FRAME_RATE), maxFrameRate) + put(ContextSpecificTag(TAG_IMAGE_CODEC), imageCodec) + endStructure() + } + } + + companion object { + private const val TAG_RESOLUTION = 0 + private const val TAG_MAX_FRAME_RATE = 1 + private const val TAG_IMAGE_CODEC = 2 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterSnapshotParamsStruct { + tlvReader.enterStructure(tlvTag) + val resolution = + CameraAvStreamManagementClusterVideoResolutionStruct.fromTlv( + ContextSpecificTag(TAG_RESOLUTION), + tlvReader, + ) + val maxFrameRate = tlvReader.getUInt(ContextSpecificTag(TAG_MAX_FRAME_RATE)) + val imageCodec = tlvReader.getUInt(ContextSpecificTag(TAG_IMAGE_CODEC)) + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterSnapshotParamsStruct( + resolution, + maxFrameRate, + imageCodec, + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterSnapshotStreamStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterSnapshotStreamStruct.kt new file mode 100644 index 0000000000..8686343573 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterSnapshotStreamStruct.kt @@ -0,0 +1,109 @@ +/* + * + * 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. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterSnapshotStreamStruct( + val snapshotStreamID: UInt, + val imageCodec: UInt, + val frameRate: UInt, + val bitRate: ULong, + val minResolution: CameraAvStreamManagementClusterVideoResolutionStruct, + val maxResolution: CameraAvStreamManagementClusterVideoResolutionStruct, + val quality: UInt, + val referenceCount: UInt, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterSnapshotStreamStruct {\n") + append("\tsnapshotStreamID : $snapshotStreamID\n") + append("\timageCodec : $imageCodec\n") + append("\tframeRate : $frameRate\n") + append("\tbitRate : $bitRate\n") + append("\tminResolution : $minResolution\n") + append("\tmaxResolution : $maxResolution\n") + append("\tquality : $quality\n") + append("\treferenceCount : $referenceCount\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_SNAPSHOT_STREAM_ID), snapshotStreamID) + put(ContextSpecificTag(TAG_IMAGE_CODEC), imageCodec) + put(ContextSpecificTag(TAG_FRAME_RATE), frameRate) + put(ContextSpecificTag(TAG_BIT_RATE), bitRate) + minResolution.toTlv(ContextSpecificTag(TAG_MIN_RESOLUTION), this) + maxResolution.toTlv(ContextSpecificTag(TAG_MAX_RESOLUTION), this) + put(ContextSpecificTag(TAG_QUALITY), quality) + put(ContextSpecificTag(TAG_REFERENCE_COUNT), referenceCount) + endStructure() + } + } + + companion object { + private const val TAG_SNAPSHOT_STREAM_ID = 0 + private const val TAG_IMAGE_CODEC = 1 + private const val TAG_FRAME_RATE = 2 + private const val TAG_BIT_RATE = 3 + private const val TAG_MIN_RESOLUTION = 4 + private const val TAG_MAX_RESOLUTION = 5 + private const val TAG_QUALITY = 6 + private const val TAG_REFERENCE_COUNT = 7 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterSnapshotStreamStruct { + tlvReader.enterStructure(tlvTag) + val snapshotStreamID = tlvReader.getUInt(ContextSpecificTag(TAG_SNAPSHOT_STREAM_ID)) + val imageCodec = tlvReader.getUInt(ContextSpecificTag(TAG_IMAGE_CODEC)) + val frameRate = tlvReader.getUInt(ContextSpecificTag(TAG_FRAME_RATE)) + val bitRate = tlvReader.getULong(ContextSpecificTag(TAG_BIT_RATE)) + val minResolution = + CameraAvStreamManagementClusterVideoResolutionStruct.fromTlv( + ContextSpecificTag(TAG_MIN_RESOLUTION), + tlvReader, + ) + val maxResolution = + CameraAvStreamManagementClusterVideoResolutionStruct.fromTlv( + ContextSpecificTag(TAG_MAX_RESOLUTION), + tlvReader, + ) + val quality = tlvReader.getUInt(ContextSpecificTag(TAG_QUALITY)) + val referenceCount = tlvReader.getUInt(ContextSpecificTag(TAG_REFERENCE_COUNT)) + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterSnapshotStreamStruct( + snapshotStreamID, + imageCodec, + frameRate, + bitRate, + minResolution, + maxResolution, + quality, + referenceCount, + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterVideoResolutionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterVideoResolutionStruct.kt new file mode 100644 index 0000000000..f8fde5e2c8 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterVideoResolutionStruct.kt @@ -0,0 +1,59 @@ +/* + * + * 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. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterVideoResolutionStruct(val width: UInt, val height: UInt) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterVideoResolutionStruct {\n") + append("\twidth : $width\n") + append("\theight : $height\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_WIDTH), width) + put(ContextSpecificTag(TAG_HEIGHT), height) + endStructure() + } + } + + companion object { + private const val TAG_WIDTH = 0 + private const val TAG_HEIGHT = 1 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterVideoResolutionStruct { + tlvReader.enterStructure(tlvTag) + val width = tlvReader.getUInt(ContextSpecificTag(TAG_WIDTH)) + val height = tlvReader.getUInt(ContextSpecificTag(TAG_HEIGHT)) + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterVideoResolutionStruct(width, height) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterVideoSensorParamsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterVideoSensorParamsStruct.kt new file mode 100644 index 0000000000..ed6516bd11 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterVideoSensorParamsStruct.kt @@ -0,0 +1,83 @@ +/* + * + * 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. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterVideoSensorParamsStruct( + val sensorWidth: UInt, + val sensorHeight: UInt, + val HDRCapable: Boolean, + val maxFPS: UInt, + val maxHDRFPS: UInt, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterVideoSensorParamsStruct {\n") + append("\tsensorWidth : $sensorWidth\n") + append("\tsensorHeight : $sensorHeight\n") + append("\tHDRCapable : $HDRCapable\n") + append("\tmaxFPS : $maxFPS\n") + append("\tmaxHDRFPS : $maxHDRFPS\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_SENSOR_WIDTH), sensorWidth) + put(ContextSpecificTag(TAG_SENSOR_HEIGHT), sensorHeight) + put(ContextSpecificTag(TAG_HDR_CAPABLE), HDRCapable) + put(ContextSpecificTag(TAG_MAX_FPS), maxFPS) + put(ContextSpecificTag(TAG_MAX_HDRFPS), maxHDRFPS) + endStructure() + } + } + + companion object { + private const val TAG_SENSOR_WIDTH = 0 + private const val TAG_SENSOR_HEIGHT = 1 + private const val TAG_HDR_CAPABLE = 2 + private const val TAG_MAX_FPS = 3 + private const val TAG_MAX_HDRFPS = 4 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterVideoSensorParamsStruct { + tlvReader.enterStructure(tlvTag) + val sensorWidth = tlvReader.getUInt(ContextSpecificTag(TAG_SENSOR_WIDTH)) + val sensorHeight = tlvReader.getUInt(ContextSpecificTag(TAG_SENSOR_HEIGHT)) + val HDRCapable = tlvReader.getBoolean(ContextSpecificTag(TAG_HDR_CAPABLE)) + val maxFPS = tlvReader.getUInt(ContextSpecificTag(TAG_MAX_FPS)) + val maxHDRFPS = tlvReader.getUInt(ContextSpecificTag(TAG_MAX_HDRFPS)) + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterVideoSensorParamsStruct( + sensorWidth, + sensorHeight, + HDRCapable, + maxFPS, + maxHDRFPS, + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterVideoStreamStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterVideoStreamStruct.kt new file mode 100644 index 0000000000..048a8a928f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterVideoStreamStruct.kt @@ -0,0 +1,162 @@ +/* + * + * 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. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import java.util.Optional +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterVideoStreamStruct( + val videoStreamID: UInt, + val streamType: UInt, + val videoCodec: UInt, + val minFrameRate: UInt, + val maxFrameRate: UInt, + val minResolution: CameraAvStreamManagementClusterVideoResolutionStruct, + val maxResolution: CameraAvStreamManagementClusterVideoResolutionStruct, + val minBitRate: ULong, + val maxBitRate: ULong, + val minFragmentLen: UInt, + val maxFragmentLen: UInt, + val watermarkEnabled: Optional, + val OSDEnabled: Optional, + val referenceCount: UInt, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterVideoStreamStruct {\n") + append("\tvideoStreamID : $videoStreamID\n") + append("\tstreamType : $streamType\n") + append("\tvideoCodec : $videoCodec\n") + append("\tminFrameRate : $minFrameRate\n") + append("\tmaxFrameRate : $maxFrameRate\n") + append("\tminResolution : $minResolution\n") + append("\tmaxResolution : $maxResolution\n") + append("\tminBitRate : $minBitRate\n") + append("\tmaxBitRate : $maxBitRate\n") + append("\tminFragmentLen : $minFragmentLen\n") + append("\tmaxFragmentLen : $maxFragmentLen\n") + append("\twatermarkEnabled : $watermarkEnabled\n") + append("\tOSDEnabled : $OSDEnabled\n") + append("\treferenceCount : $referenceCount\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), videoStreamID) + put(ContextSpecificTag(TAG_STREAM_TYPE), streamType) + put(ContextSpecificTag(TAG_VIDEO_CODEC), videoCodec) + put(ContextSpecificTag(TAG_MIN_FRAME_RATE), minFrameRate) + put(ContextSpecificTag(TAG_MAX_FRAME_RATE), maxFrameRate) + minResolution.toTlv(ContextSpecificTag(TAG_MIN_RESOLUTION), this) + maxResolution.toTlv(ContextSpecificTag(TAG_MAX_RESOLUTION), this) + put(ContextSpecificTag(TAG_MIN_BIT_RATE), minBitRate) + put(ContextSpecificTag(TAG_MAX_BIT_RATE), maxBitRate) + put(ContextSpecificTag(TAG_MIN_FRAGMENT_LEN), minFragmentLen) + put(ContextSpecificTag(TAG_MAX_FRAGMENT_LEN), maxFragmentLen) + if (watermarkEnabled.isPresent) { + val optwatermarkEnabled = watermarkEnabled.get() + put(ContextSpecificTag(TAG_WATERMARK_ENABLED), optwatermarkEnabled) + } + if (OSDEnabled.isPresent) { + val optOSDEnabled = OSDEnabled.get() + put(ContextSpecificTag(TAG_OSD_ENABLED), optOSDEnabled) + } + put(ContextSpecificTag(TAG_REFERENCE_COUNT), referenceCount) + endStructure() + } + } + + companion object { + private const val TAG_VIDEO_STREAM_ID = 0 + private const val TAG_STREAM_TYPE = 1 + private const val TAG_VIDEO_CODEC = 2 + private const val TAG_MIN_FRAME_RATE = 3 + private const val TAG_MAX_FRAME_RATE = 4 + private const val TAG_MIN_RESOLUTION = 5 + private const val TAG_MAX_RESOLUTION = 6 + private const val TAG_MIN_BIT_RATE = 7 + private const val TAG_MAX_BIT_RATE = 8 + private const val TAG_MIN_FRAGMENT_LEN = 9 + private const val TAG_MAX_FRAGMENT_LEN = 10 + private const val TAG_WATERMARK_ENABLED = 11 + private const val TAG_OSD_ENABLED = 12 + private const val TAG_REFERENCE_COUNT = 13 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterVideoStreamStruct { + tlvReader.enterStructure(tlvTag) + val videoStreamID = tlvReader.getUInt(ContextSpecificTag(TAG_VIDEO_STREAM_ID)) + val streamType = tlvReader.getUInt(ContextSpecificTag(TAG_STREAM_TYPE)) + val videoCodec = tlvReader.getUInt(ContextSpecificTag(TAG_VIDEO_CODEC)) + val minFrameRate = tlvReader.getUInt(ContextSpecificTag(TAG_MIN_FRAME_RATE)) + val maxFrameRate = tlvReader.getUInt(ContextSpecificTag(TAG_MAX_FRAME_RATE)) + val minResolution = + CameraAvStreamManagementClusterVideoResolutionStruct.fromTlv( + ContextSpecificTag(TAG_MIN_RESOLUTION), + tlvReader, + ) + val maxResolution = + CameraAvStreamManagementClusterVideoResolutionStruct.fromTlv( + ContextSpecificTag(TAG_MAX_RESOLUTION), + tlvReader, + ) + val minBitRate = tlvReader.getULong(ContextSpecificTag(TAG_MIN_BIT_RATE)) + val maxBitRate = tlvReader.getULong(ContextSpecificTag(TAG_MAX_BIT_RATE)) + val minFragmentLen = tlvReader.getUInt(ContextSpecificTag(TAG_MIN_FRAGMENT_LEN)) + val maxFragmentLen = tlvReader.getUInt(ContextSpecificTag(TAG_MAX_FRAGMENT_LEN)) + val watermarkEnabled = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_WATERMARK_ENABLED))) { + Optional.of(tlvReader.getBoolean(ContextSpecificTag(TAG_WATERMARK_ENABLED))) + } else { + Optional.empty() + } + val OSDEnabled = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OSD_ENABLED))) { + Optional.of(tlvReader.getBoolean(ContextSpecificTag(TAG_OSD_ENABLED))) + } else { + Optional.empty() + } + val referenceCount = tlvReader.getUInt(ContextSpecificTag(TAG_REFERENCE_COUNT)) + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterVideoStreamStruct( + videoStreamID, + streamType, + videoCodec, + minFrameRate, + maxFrameRate, + minResolution, + maxResolution, + minBitRate, + maxBitRate, + minFragmentLen, + maxFragmentLen, + watermarkEnabled, + OSDEnabled, + referenceCount, + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterViewportStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterViewportStruct.kt new file mode 100644 index 0000000000..1e4804bc3a --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CameraAvStreamManagementClusterViewportStruct.kt @@ -0,0 +1,69 @@ +/* + * + * 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. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterViewportStruct( + val x1: UInt, + val y1: UInt, + val x2: UInt, + val y2: UInt, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterViewportStruct {\n") + append("\tx1 : $x1\n") + append("\ty1 : $y1\n") + append("\tx2 : $x2\n") + append("\ty2 : $y2\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_X1), x1) + put(ContextSpecificTag(TAG_Y1), y1) + put(ContextSpecificTag(TAG_X2), x2) + put(ContextSpecificTag(TAG_Y2), y2) + endStructure() + } + } + + companion object { + private const val TAG_X1 = 0 + private const val TAG_Y1 = 1 + private const val TAG_X2 = 2 + private const val TAG_Y2 = 3 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CameraAvStreamManagementClusterViewportStruct { + tlvReader.enterStructure(tlvTag) + val x1 = tlvReader.getUInt(ContextSpecificTag(TAG_X1)) + val y1 = tlvReader.getUInt(ContextSpecificTag(TAG_Y1)) + val x2 = tlvReader.getUInt(ContextSpecificTag(TAG_X2)) + val y2 = tlvReader.getUInt(ContextSpecificTag(TAG_Y2)) + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterViewportStruct(x1, y1, x2, y2) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportRequestorClusterICEServerStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportRequestorClusterICEServerStruct.kt new file mode 100644 index 0000000000..4c249b90b1 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportRequestorClusterICEServerStruct.kt @@ -0,0 +1,106 @@ +/* + * + * 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. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import java.util.Optional +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class WebRTCTransportRequestorClusterICEServerStruct( + val urls: List, + val username: Optional, + val credential: Optional, + val caid: Optional, +) { + override fun toString(): String = buildString { + append("WebRTCTransportRequestorClusterICEServerStruct {\n") + append("\turls : $urls\n") + append("\tusername : $username\n") + append("\tcredential : $credential\n") + append("\tcaid : $caid\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_URLS)) + for (item in urls.iterator()) { + put(AnonymousTag, item) + } + endArray() + if (username.isPresent) { + val optusername = username.get() + put(ContextSpecificTag(TAG_USERNAME), optusername) + } + if (credential.isPresent) { + val optcredential = credential.get() + put(ContextSpecificTag(TAG_CREDENTIAL), optcredential) + } + if (caid.isPresent) { + val optcaid = caid.get() + put(ContextSpecificTag(TAG_CAID), optcaid) + } + endStructure() + } + } + + companion object { + private const val TAG_URLS = 1 + private const val TAG_USERNAME = 2 + private const val TAG_CREDENTIAL = 3 + private const val TAG_CAID = 4 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): WebRTCTransportRequestorClusterICEServerStruct { + tlvReader.enterStructure(tlvTag) + val urls = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_URLS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getString(AnonymousTag)) + } + tlvReader.exitContainer() + } + val username = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_USERNAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_USERNAME))) + } else { + Optional.empty() + } + val credential = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIAL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_CREDENTIAL))) + } else { + Optional.empty() + } + val caid = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CAID))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_CAID))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return WebRTCTransportRequestorClusterICEServerStruct(urls, username, credential, caid) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportRequestorClusterWebRTCSessionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportRequestorClusterWebRTCSessionStruct.kt new file mode 100644 index 0000000000..40c666bbd6 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WebRTCTransportRequestorClusterWebRTCSessionStruct.kt @@ -0,0 +1,115 @@ +/* + * + * 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. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class WebRTCTransportRequestorClusterWebRTCSessionStruct( + val id: UInt, + val peerNodeID: ULong, + val peerFabricIndex: UInt, + val streamType: UInt, + val videoStreamID: UInt?, + val audioStreamID: UInt?, + val metadataOptions: UInt, +) { + override fun toString(): String = buildString { + append("WebRTCTransportRequestorClusterWebRTCSessionStruct {\n") + append("\tid : $id\n") + append("\tpeerNodeID : $peerNodeID\n") + append("\tpeerFabricIndex : $peerFabricIndex\n") + append("\tstreamType : $streamType\n") + append("\tvideoStreamID : $videoStreamID\n") + append("\taudioStreamID : $audioStreamID\n") + append("\tmetadataOptions : $metadataOptions\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ID), id) + put(ContextSpecificTag(TAG_PEER_NODE_ID), peerNodeID) + put(ContextSpecificTag(TAG_PEER_FABRIC_INDEX), peerFabricIndex) + put(ContextSpecificTag(TAG_STREAM_TYPE), streamType) + if (videoStreamID != null) { + put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), videoStreamID) + } else { + putNull(ContextSpecificTag(TAG_VIDEO_STREAM_ID)) + } + if (audioStreamID != null) { + put(ContextSpecificTag(TAG_AUDIO_STREAM_ID), audioStreamID) + } else { + putNull(ContextSpecificTag(TAG_AUDIO_STREAM_ID)) + } + put(ContextSpecificTag(TAG_METADATA_OPTIONS), metadataOptions) + endStructure() + } + } + + companion object { + private const val TAG_ID = 1 + private const val TAG_PEER_NODE_ID = 2 + private const val TAG_PEER_FABRIC_INDEX = 3 + private const val TAG_STREAM_TYPE = 4 + private const val TAG_VIDEO_STREAM_ID = 5 + private const val TAG_AUDIO_STREAM_ID = 6 + private const val TAG_METADATA_OPTIONS = 7 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): WebRTCTransportRequestorClusterWebRTCSessionStruct { + tlvReader.enterStructure(tlvTag) + val id = tlvReader.getUInt(ContextSpecificTag(TAG_ID)) + val peerNodeID = tlvReader.getULong(ContextSpecificTag(TAG_PEER_NODE_ID)) + val peerFabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_PEER_FABRIC_INDEX)) + val streamType = tlvReader.getUInt(ContextSpecificTag(TAG_STREAM_TYPE)) + val videoStreamID = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_VIDEO_STREAM_ID)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_VIDEO_STREAM_ID)) + null + } + val audioStreamID = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_AUDIO_STREAM_ID)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_AUDIO_STREAM_ID)) + null + } + val metadataOptions = tlvReader.getUInt(ContextSpecificTag(TAG_METADATA_OPTIONS)) + + tlvReader.exitContainer() + + return WebRTCTransportRequestorClusterWebRTCSessionStruct( + id, + peerNodeID, + peerFabricIndex, + streamType, + videoStreamID, + audioStreamID, + metadataOptions, + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZoneManagementClusterTwoDCartesianVertexStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZoneManagementClusterTwoDCartesianVertexStruct.kt new file mode 100644 index 0000000000..649b0338fd --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZoneManagementClusterTwoDCartesianVertexStruct.kt @@ -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. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ZoneManagementClusterTwoDCartesianVertexStruct(val x: UInt, val y: UInt) { + override fun toString(): String = buildString { + append("ZoneManagementClusterTwoDCartesianVertexStruct {\n") + append("\tx : $x\n") + append("\ty : $y\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_X), x) + put(ContextSpecificTag(TAG_Y), y) + endStructure() + } + } + + companion object { + private const val TAG_X = 0 + private const val TAG_Y = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ZoneManagementClusterTwoDCartesianVertexStruct { + tlvReader.enterStructure(tlvTag) + val x = tlvReader.getUInt(ContextSpecificTag(TAG_X)) + val y = tlvReader.getUInt(ContextSpecificTag(TAG_Y)) + + tlvReader.exitContainer() + + return ZoneManagementClusterTwoDCartesianVertexStruct(x, y) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZoneManagementClusterTwoDCartesianZoneStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZoneManagementClusterTwoDCartesianZoneStruct.kt new file mode 100644 index 0000000000..b42e6ebd80 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZoneManagementClusterTwoDCartesianZoneStruct.kt @@ -0,0 +1,90 @@ +/* + * + * 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. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import java.util.Optional +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ZoneManagementClusterTwoDCartesianZoneStruct( + val name: String, + val use: UInt, + val vertices: List, + val color: Optional, +) { + override fun toString(): String = buildString { + append("ZoneManagementClusterTwoDCartesianZoneStruct {\n") + append("\tname : $name\n") + append("\tuse : $use\n") + append("\tvertices : $vertices\n") + append("\tcolor : $color\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_NAME), name) + put(ContextSpecificTag(TAG_USE), use) + startArray(ContextSpecificTag(TAG_VERTICES)) + for (item in vertices.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + if (color.isPresent) { + val optcolor = color.get() + put(ContextSpecificTag(TAG_COLOR), optcolor) + } + endStructure() + } + } + + companion object { + private const val TAG_NAME = 0 + private const val TAG_USE = 1 + private const val TAG_VERTICES = 2 + private const val TAG_COLOR = 3 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ZoneManagementClusterTwoDCartesianZoneStruct { + tlvReader.enterStructure(tlvTag) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + val use = tlvReader.getUInt(ContextSpecificTag(TAG_USE)) + val vertices = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_VERTICES)) + while (!tlvReader.isEndOfContainer()) { + add(ZoneManagementClusterTwoDCartesianVertexStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + val color = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_COLOR))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_COLOR))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ZoneManagementClusterTwoDCartesianZoneStruct(name, use, vertices, color) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZoneManagementClusterZoneInformationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZoneManagementClusterZoneInformationStruct.kt new file mode 100644 index 0000000000..3073c80152 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZoneManagementClusterZoneInformationStruct.kt @@ -0,0 +1,64 @@ +/* + * + * 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. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ZoneManagementClusterZoneInformationStruct( + val zoneID: UInt, + val zoneType: UInt, + val zoneSource: UInt, +) { + override fun toString(): String = buildString { + append("ZoneManagementClusterZoneInformationStruct {\n") + append("\tzoneID : $zoneID\n") + append("\tzoneType : $zoneType\n") + append("\tzoneSource : $zoneSource\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ZONE_ID), zoneID) + put(ContextSpecificTag(TAG_ZONE_TYPE), zoneType) + put(ContextSpecificTag(TAG_ZONE_SOURCE), zoneSource) + endStructure() + } + } + + companion object { + private const val TAG_ZONE_ID = 0 + private const val TAG_ZONE_TYPE = 1 + private const val TAG_ZONE_SOURCE = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ZoneManagementClusterZoneInformationStruct { + tlvReader.enterStructure(tlvTag) + val zoneID = tlvReader.getUInt(ContextSpecificTag(TAG_ZONE_ID)) + val zoneType = tlvReader.getUInt(ContextSpecificTag(TAG_ZONE_TYPE)) + val zoneSource = tlvReader.getUInt(ContextSpecificTag(TAG_ZONE_SOURCE)) + + tlvReader.exitContainer() + + return ZoneManagementClusterZoneInformationStruct(zoneID, zoneType, zoneSource) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZoneManagementClusterZoneTriggeringTimeControlStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZoneManagementClusterZoneTriggeringTimeControlStruct.kt new file mode 100644 index 0000000000..3e55171ac8 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZoneManagementClusterZoneTriggeringTimeControlStruct.kt @@ -0,0 +1,77 @@ +/* + * + * 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. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ZoneManagementClusterZoneTriggeringTimeControlStruct( + val initialDuration: UInt, + val augmentationDuration: UInt, + val maxDuration: ULong, + val blindDuration: UInt, +) { + override fun toString(): String = buildString { + append("ZoneManagementClusterZoneTriggeringTimeControlStruct {\n") + append("\tinitialDuration : $initialDuration\n") + append("\taugmentationDuration : $augmentationDuration\n") + append("\tmaxDuration : $maxDuration\n") + append("\tblindDuration : $blindDuration\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_INITIAL_DURATION), initialDuration) + put(ContextSpecificTag(TAG_AUGMENTATION_DURATION), augmentationDuration) + put(ContextSpecificTag(TAG_MAX_DURATION), maxDuration) + put(ContextSpecificTag(TAG_BLIND_DURATION), blindDuration) + endStructure() + } + } + + companion object { + private const val TAG_INITIAL_DURATION = 0 + private const val TAG_AUGMENTATION_DURATION = 1 + private const val TAG_MAX_DURATION = 2 + private const val TAG_BLIND_DURATION = 3 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): ZoneManagementClusterZoneTriggeringTimeControlStruct { + tlvReader.enterStructure(tlvTag) + val initialDuration = tlvReader.getUInt(ContextSpecificTag(TAG_INITIAL_DURATION)) + val augmentationDuration = tlvReader.getUInt(ContextSpecificTag(TAG_AUGMENTATION_DURATION)) + val maxDuration = tlvReader.getULong(ContextSpecificTag(TAG_MAX_DURATION)) + val blindDuration = tlvReader.getUInt(ContextSpecificTag(TAG_BLIND_DURATION)) + + tlvReader.exitContainer() + + return ZoneManagementClusterZoneTriggeringTimeControlStruct( + initialDuration, + augmentationDuration, + maxDuration, + blindDuration, + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvStreamManagementCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvStreamManagementCluster.kt new file mode 100644 index 0000000000..c099340307 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvStreamManagementCluster.kt @@ -0,0 +1,6746 @@ +/* + * + * 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. + */ + +package matter.controller.cluster.clusters + +import java.time.Duration +import java.util.logging.Level +import java.util.logging.Logger +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.transform +import matter.controller.BooleanSubscriptionState +import matter.controller.InvokeRequest +import matter.controller.InvokeResponse +import matter.controller.MatterController +import matter.controller.ReadData +import matter.controller.ReadRequest +import matter.controller.SubscribeRequest +import matter.controller.SubscriptionState +import matter.controller.UByteSubscriptionState +import matter.controller.UIntSubscriptionState +import matter.controller.UShortSubscriptionState +import matter.controller.WriteRequest +import matter.controller.WriteRequests +import matter.controller.WriteResponse +import matter.controller.cluster.structs.* +import matter.controller.model.AttributePath +import matter.controller.model.CommandPath +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementCluster( + private val controller: MatterController, + private val endpointId: UShort, +) { + class AudioStreamAllocateResponse(val audioStreamID: UShort) + + class VideoStreamAllocateResponse(val videoStreamID: UShort) + + class SnapshotStreamAllocateResponse(val snapshotStreamID: UShort) + + class VideoSensorParamsAttribute( + val value: CameraAvStreamManagementClusterVideoSensorParamsStruct? + ) + + sealed class VideoSensorParamsAttributeSubscriptionState { + data class Success(val value: CameraAvStreamManagementClusterVideoSensorParamsStruct?) : + VideoSensorParamsAttributeSubscriptionState() + + data class Error(val exception: Exception) : VideoSensorParamsAttributeSubscriptionState() + + object SubscriptionEstablished : VideoSensorParamsAttributeSubscriptionState() + } + + class MinViewportAttribute(val value: CameraAvStreamManagementClusterVideoResolutionStruct?) + + sealed class MinViewportAttributeSubscriptionState { + data class Success(val value: CameraAvStreamManagementClusterVideoResolutionStruct?) : + MinViewportAttributeSubscriptionState() + + data class Error(val exception: Exception) : MinViewportAttributeSubscriptionState() + + object SubscriptionEstablished : MinViewportAttributeSubscriptionState() + } + + class RateDistortionTradeOffPointsAttribute( + val value: List? + ) + + sealed class RateDistortionTradeOffPointsAttributeSubscriptionState { + data class Success( + val value: List? + ) : RateDistortionTradeOffPointsAttributeSubscriptionState() + + data class Error(val exception: Exception) : + RateDistortionTradeOffPointsAttributeSubscriptionState() + + object SubscriptionEstablished : RateDistortionTradeOffPointsAttributeSubscriptionState() + } + + class MicrophoneCapabilitiesAttribute( + val value: CameraAvStreamManagementClusterAudioCapabilitiesStruct? + ) + + sealed class MicrophoneCapabilitiesAttributeSubscriptionState { + data class Success(val value: CameraAvStreamManagementClusterAudioCapabilitiesStruct?) : + MicrophoneCapabilitiesAttributeSubscriptionState() + + data class Error(val exception: Exception) : MicrophoneCapabilitiesAttributeSubscriptionState() + + object SubscriptionEstablished : MicrophoneCapabilitiesAttributeSubscriptionState() + } + + class SpeakerCapabilitiesAttribute( + val value: CameraAvStreamManagementClusterAudioCapabilitiesStruct? + ) + + sealed class SpeakerCapabilitiesAttributeSubscriptionState { + data class Success(val value: CameraAvStreamManagementClusterAudioCapabilitiesStruct?) : + SpeakerCapabilitiesAttributeSubscriptionState() + + data class Error(val exception: Exception) : SpeakerCapabilitiesAttributeSubscriptionState() + + object SubscriptionEstablished : SpeakerCapabilitiesAttributeSubscriptionState() + } + + class SupportedSnapshotParamsAttribute( + val value: List? + ) + + sealed class SupportedSnapshotParamsAttributeSubscriptionState { + data class Success(val value: List?) : + SupportedSnapshotParamsAttributeSubscriptionState() + + data class Error(val exception: Exception) : + SupportedSnapshotParamsAttributeSubscriptionState() + + object SubscriptionEstablished : SupportedSnapshotParamsAttributeSubscriptionState() + } + + class CurrentVideoCodecsAttribute(val value: List?) + + sealed class CurrentVideoCodecsAttributeSubscriptionState { + data class Success(val value: List?) : CurrentVideoCodecsAttributeSubscriptionState() + + data class Error(val exception: Exception) : CurrentVideoCodecsAttributeSubscriptionState() + + object SubscriptionEstablished : CurrentVideoCodecsAttributeSubscriptionState() + } + + class CurrentSnapshotConfigAttribute( + val value: CameraAvStreamManagementClusterSnapshotParamsStruct? + ) + + sealed class CurrentSnapshotConfigAttributeSubscriptionState { + data class Success(val value: CameraAvStreamManagementClusterSnapshotParamsStruct?) : + CurrentSnapshotConfigAttributeSubscriptionState() + + data class Error(val exception: Exception) : CurrentSnapshotConfigAttributeSubscriptionState() + + object SubscriptionEstablished : CurrentSnapshotConfigAttributeSubscriptionState() + } + + class FabricsUsingCameraAttribute(val value: List) + + sealed class FabricsUsingCameraAttributeSubscriptionState { + data class Success(val value: List) : FabricsUsingCameraAttributeSubscriptionState() + + data class Error(val exception: Exception) : FabricsUsingCameraAttributeSubscriptionState() + + object SubscriptionEstablished : FabricsUsingCameraAttributeSubscriptionState() + } + + class AllocatedVideoStreamsAttribute( + val value: List? + ) + + sealed class AllocatedVideoStreamsAttributeSubscriptionState { + data class Success(val value: List?) : + AllocatedVideoStreamsAttributeSubscriptionState() + + data class Error(val exception: Exception) : AllocatedVideoStreamsAttributeSubscriptionState() + + object SubscriptionEstablished : AllocatedVideoStreamsAttributeSubscriptionState() + } + + class AllocatedAudioStreamsAttribute( + val value: List? + ) + + sealed class AllocatedAudioStreamsAttributeSubscriptionState { + data class Success(val value: List?) : + AllocatedAudioStreamsAttributeSubscriptionState() + + data class Error(val exception: Exception) : AllocatedAudioStreamsAttributeSubscriptionState() + + object SubscriptionEstablished : AllocatedAudioStreamsAttributeSubscriptionState() + } + + class AllocatedSnapshotStreamsAttribute( + val value: List? + ) + + sealed class AllocatedSnapshotStreamsAttributeSubscriptionState { + data class Success(val value: List?) : + AllocatedSnapshotStreamsAttributeSubscriptionState() + + data class Error(val exception: Exception) : + AllocatedSnapshotStreamsAttributeSubscriptionState() + + object SubscriptionEstablished : AllocatedSnapshotStreamsAttributeSubscriptionState() + } + + class RankedVideoStreamPrioritiesListAttribute(val value: List?) + + sealed class RankedVideoStreamPrioritiesListAttributeSubscriptionState { + data class Success(val value: List?) : + RankedVideoStreamPrioritiesListAttributeSubscriptionState() + + data class Error(val exception: Exception) : + RankedVideoStreamPrioritiesListAttributeSubscriptionState() + + object SubscriptionEstablished : RankedVideoStreamPrioritiesListAttributeSubscriptionState() + } + + class ViewportAttribute(val value: CameraAvStreamManagementClusterViewportStruct?) + + sealed class ViewportAttributeSubscriptionState { + data class Success(val value: CameraAvStreamManagementClusterViewportStruct?) : + ViewportAttributeSubscriptionState() + + data class Error(val exception: Exception) : ViewportAttributeSubscriptionState() + + object SubscriptionEstablished : ViewportAttributeSubscriptionState() + } + + class GeneratedCommandListAttribute(val value: List) + + sealed class GeneratedCommandListAttributeSubscriptionState { + data class Success(val value: List) : GeneratedCommandListAttributeSubscriptionState() + + data class Error(val exception: Exception) : GeneratedCommandListAttributeSubscriptionState() + + object SubscriptionEstablished : GeneratedCommandListAttributeSubscriptionState() + } + + class AcceptedCommandListAttribute(val value: List) + + sealed class AcceptedCommandListAttributeSubscriptionState { + data class Success(val value: List) : AcceptedCommandListAttributeSubscriptionState() + + data class Error(val exception: Exception) : AcceptedCommandListAttributeSubscriptionState() + + object SubscriptionEstablished : AcceptedCommandListAttributeSubscriptionState() + } + + class EventListAttribute(val value: List) + + sealed class EventListAttributeSubscriptionState { + data class Success(val value: List) : EventListAttributeSubscriptionState() + + data class Error(val exception: Exception) : EventListAttributeSubscriptionState() + + object SubscriptionEstablished : EventListAttributeSubscriptionState() + } + + class AttributeListAttribute(val value: List) + + sealed class AttributeListAttributeSubscriptionState { + data class Success(val value: List) : AttributeListAttributeSubscriptionState() + + data class Error(val exception: Exception) : AttributeListAttributeSubscriptionState() + + object SubscriptionEstablished : AttributeListAttributeSubscriptionState() + } + + suspend fun audioStreamAllocate( + streamType: UByte, + audioCodec: UByte, + channelCount: UByte, + sampleRate: UInt, + bitRate: UInt, + bitDepth: UByte, + timedInvokeTimeout: Duration? = null, + ): AudioStreamAllocateResponse { + val commandId: UInt = 0u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_STREAM_TYPE_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_STREAM_TYPE_REQ), streamType) + + val TAG_AUDIO_CODEC_REQ: Int = 1 + tlvWriter.put(ContextSpecificTag(TAG_AUDIO_CODEC_REQ), audioCodec) + + val TAG_CHANNEL_COUNT_REQ: Int = 2 + tlvWriter.put(ContextSpecificTag(TAG_CHANNEL_COUNT_REQ), channelCount) + + val TAG_SAMPLE_RATE_REQ: Int = 3 + tlvWriter.put(ContextSpecificTag(TAG_SAMPLE_RATE_REQ), sampleRate) + + val TAG_BIT_RATE_REQ: Int = 4 + tlvWriter.put(ContextSpecificTag(TAG_BIT_RATE_REQ), bitRate) + + val TAG_BIT_DEPTH_REQ: Int = 5 + tlvWriter.put(ContextSpecificTag(TAG_BIT_DEPTH_REQ), bitDepth) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + + val tlvReader = TlvReader(response.payload) + tlvReader.enterStructure(AnonymousTag) + val TAG_AUDIO_STREAM_ID: Int = 0 + var audioStreamID_decoded: UShort? = null + + while (!tlvReader.isEndOfContainer()) { + val tag = tlvReader.peekElement().tag + + if (tag == ContextSpecificTag(TAG_AUDIO_STREAM_ID)) { + audioStreamID_decoded = tlvReader.getUShort(tag) + } else { + tlvReader.skipElement() + } + } + + if (audioStreamID_decoded == null) { + throw IllegalStateException("audioStreamID not found in TLV") + } + + tlvReader.exitContainer() + + return AudioStreamAllocateResponse(audioStreamID_decoded) + } + + suspend fun audioStreamDeallocate(audioStreamID: UShort, timedInvokeTimeout: Duration? = null) { + val commandId: UInt = 2u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_AUDIO_STREAM_ID_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_AUDIO_STREAM_ID_REQ), audioStreamID) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun videoStreamAllocate( + streamType: UByte, + videoCodec: UByte, + minFrameRate: UShort, + maxFrameRate: UShort, + minResolution: CameraAvStreamManagementClusterVideoResolutionStruct, + maxResolution: CameraAvStreamManagementClusterVideoResolutionStruct, + minBitRate: UInt, + maxBitRate: UInt, + minFragmentLen: UShort, + maxFragmentLen: UShort, + watermarkEnabled: Boolean?, + OSDEnabled: Boolean?, + timedInvokeTimeout: Duration? = null, + ): VideoStreamAllocateResponse { + val commandId: UInt = 3u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_STREAM_TYPE_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_STREAM_TYPE_REQ), streamType) + + val TAG_VIDEO_CODEC_REQ: Int = 1 + tlvWriter.put(ContextSpecificTag(TAG_VIDEO_CODEC_REQ), videoCodec) + + val TAG_MIN_FRAME_RATE_REQ: Int = 2 + tlvWriter.put(ContextSpecificTag(TAG_MIN_FRAME_RATE_REQ), minFrameRate) + + val TAG_MAX_FRAME_RATE_REQ: Int = 3 + tlvWriter.put(ContextSpecificTag(TAG_MAX_FRAME_RATE_REQ), maxFrameRate) + + val TAG_MIN_RESOLUTION_REQ: Int = 4 + minResolution.toTlv(ContextSpecificTag(TAG_MIN_RESOLUTION_REQ), tlvWriter) + + val TAG_MAX_RESOLUTION_REQ: Int = 5 + maxResolution.toTlv(ContextSpecificTag(TAG_MAX_RESOLUTION_REQ), tlvWriter) + + val TAG_MIN_BIT_RATE_REQ: Int = 6 + tlvWriter.put(ContextSpecificTag(TAG_MIN_BIT_RATE_REQ), minBitRate) + + val TAG_MAX_BIT_RATE_REQ: Int = 7 + tlvWriter.put(ContextSpecificTag(TAG_MAX_BIT_RATE_REQ), maxBitRate) + + val TAG_MIN_FRAGMENT_LEN_REQ: Int = 8 + tlvWriter.put(ContextSpecificTag(TAG_MIN_FRAGMENT_LEN_REQ), minFragmentLen) + + val TAG_MAX_FRAGMENT_LEN_REQ: Int = 9 + tlvWriter.put(ContextSpecificTag(TAG_MAX_FRAGMENT_LEN_REQ), maxFragmentLen) + + val TAG_WATERMARK_ENABLED_REQ: Int = 10 + watermarkEnabled?.let { + tlvWriter.put(ContextSpecificTag(TAG_WATERMARK_ENABLED_REQ), watermarkEnabled) + } + + val TAG_OSD_ENABLED_REQ: Int = 11 + OSDEnabled?.let { tlvWriter.put(ContextSpecificTag(TAG_OSD_ENABLED_REQ), OSDEnabled) } + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + + val tlvReader = TlvReader(response.payload) + tlvReader.enterStructure(AnonymousTag) + val TAG_VIDEO_STREAM_ID: Int = 0 + var videoStreamID_decoded: UShort? = null + + while (!tlvReader.isEndOfContainer()) { + val tag = tlvReader.peekElement().tag + + if (tag == ContextSpecificTag(TAG_VIDEO_STREAM_ID)) { + videoStreamID_decoded = tlvReader.getUShort(tag) + } else { + tlvReader.skipElement() + } + } + + if (videoStreamID_decoded == null) { + throw IllegalStateException("videoStreamID not found in TLV") + } + + tlvReader.exitContainer() + + return VideoStreamAllocateResponse(videoStreamID_decoded) + } + + suspend fun videoStreamModify( + videoStreamID: UShort, + resolution: CameraAvStreamManagementClusterVideoResolutionStruct?, + watermarkEnabled: Boolean?, + OSDEnabled: Boolean?, + timedInvokeTimeout: Duration? = null, + ) { + val commandId: UInt = 5u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_VIDEO_STREAM_ID_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_VIDEO_STREAM_ID_REQ), videoStreamID) + + val TAG_RESOLUTION_REQ: Int = 1 + resolution?.let { resolution.toTlv(ContextSpecificTag(TAG_RESOLUTION_REQ), tlvWriter) } + + val TAG_WATERMARK_ENABLED_REQ: Int = 2 + watermarkEnabled?.let { + tlvWriter.put(ContextSpecificTag(TAG_WATERMARK_ENABLED_REQ), watermarkEnabled) + } + + val TAG_OSD_ENABLED_REQ: Int = 3 + OSDEnabled?.let { tlvWriter.put(ContextSpecificTag(TAG_OSD_ENABLED_REQ), OSDEnabled) } + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun videoStreamDeallocate(videoStreamID: UShort, timedInvokeTimeout: Duration? = null) { + val commandId: UInt = 6u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_VIDEO_STREAM_ID_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_VIDEO_STREAM_ID_REQ), videoStreamID) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun snapshotStreamAllocate( + imageCodec: UByte, + frameRate: UShort, + bitRate: UInt, + minResolution: CameraAvStreamManagementClusterVideoResolutionStruct, + maxResolution: CameraAvStreamManagementClusterVideoResolutionStruct, + quality: UByte, + timedInvokeTimeout: Duration? = null, + ): SnapshotStreamAllocateResponse { + val commandId: UInt = 7u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_IMAGE_CODEC_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_IMAGE_CODEC_REQ), imageCodec) + + val TAG_FRAME_RATE_REQ: Int = 1 + tlvWriter.put(ContextSpecificTag(TAG_FRAME_RATE_REQ), frameRate) + + val TAG_BIT_RATE_REQ: Int = 2 + tlvWriter.put(ContextSpecificTag(TAG_BIT_RATE_REQ), bitRate) + + val TAG_MIN_RESOLUTION_REQ: Int = 3 + minResolution.toTlv(ContextSpecificTag(TAG_MIN_RESOLUTION_REQ), tlvWriter) + + val TAG_MAX_RESOLUTION_REQ: Int = 4 + maxResolution.toTlv(ContextSpecificTag(TAG_MAX_RESOLUTION_REQ), tlvWriter) + + val TAG_QUALITY_REQ: Int = 5 + tlvWriter.put(ContextSpecificTag(TAG_QUALITY_REQ), quality) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + + val tlvReader = TlvReader(response.payload) + tlvReader.enterStructure(AnonymousTag) + val TAG_SNAPSHOT_STREAM_ID: Int = 0 + var snapshotStreamID_decoded: UShort? = null + + while (!tlvReader.isEndOfContainer()) { + val tag = tlvReader.peekElement().tag + + if (tag == ContextSpecificTag(TAG_SNAPSHOT_STREAM_ID)) { + snapshotStreamID_decoded = tlvReader.getUShort(tag) + } else { + tlvReader.skipElement() + } + } + + if (snapshotStreamID_decoded == null) { + throw IllegalStateException("snapshotStreamID not found in TLV") + } + + tlvReader.exitContainer() + + return SnapshotStreamAllocateResponse(snapshotStreamID_decoded) + } + + suspend fun snapshotStreamDeallocate( + snapshotStreamID: UShort, + timedInvokeTimeout: Duration? = null, + ) { + val commandId: UInt = 9u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_SNAPSHOT_STREAM_ID_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_SNAPSHOT_STREAM_ID_REQ), snapshotStreamID) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun setStreamPriorities( + streamPriorities: List, + timedInvokeTimeout: Duration? = null, + ) { + val commandId: UInt = 10u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_STREAM_PRIORITIES_REQ: Int = 0 + tlvWriter.startArray(ContextSpecificTag(TAG_STREAM_PRIORITIES_REQ)) + for (item in streamPriorities.iterator()) { + tlvWriter.put(AnonymousTag, item) + } + tlvWriter.endArray() + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun captureSnapshot( + snapshotStreamID: UShort, + requestedResolution: CameraAvStreamManagementClusterVideoResolutionStruct, + timedInvokeTimeout: Duration? = null, + ) { + val commandId: UInt = 11u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_SNAPSHOT_STREAM_ID_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_SNAPSHOT_STREAM_ID_REQ), snapshotStreamID) + + val TAG_REQUESTED_RESOLUTION_REQ: Int = 1 + requestedResolution.toTlv(ContextSpecificTag(TAG_REQUESTED_RESOLUTION_REQ), tlvWriter) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun setViewport( + viewport: CameraAvStreamManagementClusterViewportStruct, + timedInvokeTimeout: Duration? = null, + ) { + val commandId: UInt = 13u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_VIEWPORT_REQ: Int = 0 + viewport.toTlv(ContextSpecificTag(TAG_VIEWPORT_REQ), tlvWriter) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun setImageRotation(angle: UShort, timedInvokeTimeout: Duration? = null) { + val commandId: UInt = 14u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_ANGLE_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_ANGLE_REQ), angle) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun setImageFlipHorizontal(enabled: Boolean, timedInvokeTimeout: Duration? = null) { + val commandId: UInt = 15u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_ENABLED_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_ENABLED_REQ), enabled) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun setImageFlipVertical(enabled: Boolean, timedInvokeTimeout: Duration? = null) { + val commandId: UInt = 16u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_ENABLED_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_ENABLED_REQ), enabled) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun readMaxConcurrentVideoEncodersAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 0u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Maxconcurrentvideoencoders attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeMaxConcurrentVideoEncodersAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 0u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Maxconcurrentvideoencoders attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readMaxEncodedPixelRateAttribute(): UInt? { + val ATTRIBUTE_ID: UInt = 1u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Maxencodedpixelrate attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUInt(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeMaxEncodedPixelRateAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 1u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UIntSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Maxencodedpixelrate attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUInt(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UIntSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UIntSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readVideoSensorParamsAttribute(): VideoSensorParamsAttribute { + val ATTRIBUTE_ID: UInt = 2u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Videosensorparams attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: CameraAvStreamManagementClusterVideoSensorParamsStruct? = + if (tlvReader.isNextTag(AnonymousTag)) { + CameraAvStreamManagementClusterVideoSensorParamsStruct.fromTlv(AnonymousTag, tlvReader) + } else { + null + } + + return VideoSensorParamsAttribute(decodedValue) + } + + suspend fun subscribeVideoSensorParamsAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 2u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + VideoSensorParamsAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Videosensorparams attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: CameraAvStreamManagementClusterVideoSensorParamsStruct? = + if (tlvReader.isNextTag(AnonymousTag)) { + CameraAvStreamManagementClusterVideoSensorParamsStruct.fromTlv( + AnonymousTag, + tlvReader, + ) + } else { + null + } + + decodedValue?.let { emit(VideoSensorParamsAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(VideoSensorParamsAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readNightVisionCapableAttribute(): Boolean? { + val ATTRIBUTE_ID: UInt = 3u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Nightvisioncapable attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeNightVisionCapableAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 3u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BooleanSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Nightvisioncapable attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(BooleanSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BooleanSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readMinViewportAttribute(): MinViewportAttribute { + val ATTRIBUTE_ID: UInt = 4u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Minviewport attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: CameraAvStreamManagementClusterVideoResolutionStruct? = + if (tlvReader.isNextTag(AnonymousTag)) { + CameraAvStreamManagementClusterVideoResolutionStruct.fromTlv(AnonymousTag, tlvReader) + } else { + null + } + + return MinViewportAttribute(decodedValue) + } + + suspend fun subscribeMinViewportAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 4u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + MinViewportAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Minviewport attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: CameraAvStreamManagementClusterVideoResolutionStruct? = + if (tlvReader.isNextTag(AnonymousTag)) { + CameraAvStreamManagementClusterVideoResolutionStruct.fromTlv(AnonymousTag, tlvReader) + } else { + null + } + + decodedValue?.let { emit(MinViewportAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(MinViewportAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readRateDistortionTradeOffPointsAttribute(): RateDistortionTradeOffPointsAttribute { + val ATTRIBUTE_ID: UInt = 5u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Ratedistortiontradeoffpoints attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add( + CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct.fromTlv( + AnonymousTag, + tlvReader, + ) + ) + } + tlvReader.exitContainer() + } + } else { + null + } + + return RateDistortionTradeOffPointsAttribute(decodedValue) + } + + suspend fun subscribeRateDistortionTradeOffPointsAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 5u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + RateDistortionTradeOffPointsAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Ratedistortiontradeoffpoints attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: + List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add( + CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct.fromTlv( + AnonymousTag, + tlvReader, + ) + ) + } + tlvReader.exitContainer() + } + } else { + null + } + + decodedValue?.let { + emit(RateDistortionTradeOffPointsAttributeSubscriptionState.Success(it)) + } + } + SubscriptionState.SubscriptionEstablished -> { + emit(RateDistortionTradeOffPointsAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readMaxContentBufferSizeAttribute(): UInt? { + val ATTRIBUTE_ID: UInt = 6u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Maxcontentbuffersize attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUInt(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeMaxContentBufferSizeAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 6u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UIntSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Maxcontentbuffersize attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUInt(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UIntSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UIntSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readMicrophoneCapabilitiesAttribute(): MicrophoneCapabilitiesAttribute { + val ATTRIBUTE_ID: UInt = 7u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Microphonecapabilities attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: CameraAvStreamManagementClusterAudioCapabilitiesStruct? = + if (tlvReader.isNextTag(AnonymousTag)) { + CameraAvStreamManagementClusterAudioCapabilitiesStruct.fromTlv(AnonymousTag, tlvReader) + } else { + null + } + + return MicrophoneCapabilitiesAttribute(decodedValue) + } + + suspend fun subscribeMicrophoneCapabilitiesAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 7u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + MicrophoneCapabilitiesAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Microphonecapabilities attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: CameraAvStreamManagementClusterAudioCapabilitiesStruct? = + if (tlvReader.isNextTag(AnonymousTag)) { + CameraAvStreamManagementClusterAudioCapabilitiesStruct.fromTlv( + AnonymousTag, + tlvReader, + ) + } else { + null + } + + decodedValue?.let { emit(MicrophoneCapabilitiesAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(MicrophoneCapabilitiesAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readSpeakerCapabilitiesAttribute(): SpeakerCapabilitiesAttribute { + val ATTRIBUTE_ID: UInt = 8u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Speakercapabilities attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: CameraAvStreamManagementClusterAudioCapabilitiesStruct? = + if (tlvReader.isNextTag(AnonymousTag)) { + CameraAvStreamManagementClusterAudioCapabilitiesStruct.fromTlv(AnonymousTag, tlvReader) + } else { + null + } + + return SpeakerCapabilitiesAttribute(decodedValue) + } + + suspend fun subscribeSpeakerCapabilitiesAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 8u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + SpeakerCapabilitiesAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Speakercapabilities attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: CameraAvStreamManagementClusterAudioCapabilitiesStruct? = + if (tlvReader.isNextTag(AnonymousTag)) { + CameraAvStreamManagementClusterAudioCapabilitiesStruct.fromTlv( + AnonymousTag, + tlvReader, + ) + } else { + null + } + + decodedValue?.let { emit(SpeakerCapabilitiesAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(SpeakerCapabilitiesAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readTwoWayTalkSupportAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 9u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Twowaytalksupport attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeTwoWayTalkSupportAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 9u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Twowaytalksupport attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readSupportedSnapshotParamsAttribute(): SupportedSnapshotParamsAttribute { + val ATTRIBUTE_ID: UInt = 10u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Supportedsnapshotparams attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add( + CameraAvStreamManagementClusterSnapshotParamsStruct.fromTlv(AnonymousTag, tlvReader) + ) + } + tlvReader.exitContainer() + } + } else { + null + } + + return SupportedSnapshotParamsAttribute(decodedValue) + } + + suspend fun subscribeSupportedSnapshotParamsAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 10u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + SupportedSnapshotParamsAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Supportedsnapshotparams attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add( + CameraAvStreamManagementClusterSnapshotParamsStruct.fromTlv( + AnonymousTag, + tlvReader, + ) + ) + } + tlvReader.exitContainer() + } + } else { + null + } + + decodedValue?.let { emit(SupportedSnapshotParamsAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(SupportedSnapshotParamsAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readMaxNetworkBandwidthAttribute(): UInt { + val ATTRIBUTE_ID: UInt = 11u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Maxnetworkbandwidth attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt = tlvReader.getUInt(AnonymousTag) + + return decodedValue + } + + suspend fun subscribeMaxNetworkBandwidthAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 11u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UIntSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Maxnetworkbandwidth attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt = tlvReader.getUInt(AnonymousTag) + + emit(UIntSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(UIntSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readCurrentFrameRateAttribute(): UShort? { + val ATTRIBUTE_ID: UInt = 12u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Currentframerate attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UShort? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUShort(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeCurrentFrameRateAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 12u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UShortSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Currentframerate attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UShort? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUShort(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UShortSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readHDRModeEnabledAttribute(): Boolean? { + val ATTRIBUTE_ID: UInt = 13u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Hdrmodeenabled attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeHDRModeEnabledAttribute(value: Boolean, timedWriteTimeout: Duration? = null) { + val ATTRIBUTE_ID: UInt = 13u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeHDRModeEnabledAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 13u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BooleanSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Hdrmodeenabled attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(BooleanSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BooleanSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readCurrentVideoCodecsAttribute(): CurrentVideoCodecsAttribute { + val ATTRIBUTE_ID: UInt = 14u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Currentvideocodecs attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUByte(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + null + } + + return CurrentVideoCodecsAttribute(decodedValue) + } + + suspend fun subscribeCurrentVideoCodecsAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 14u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + CurrentVideoCodecsAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Currentvideocodecs attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUByte(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + null + } + + decodedValue?.let { emit(CurrentVideoCodecsAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(CurrentVideoCodecsAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readCurrentSnapshotConfigAttribute(): CurrentSnapshotConfigAttribute { + val ATTRIBUTE_ID: UInt = 15u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Currentsnapshotconfig attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: CameraAvStreamManagementClusterSnapshotParamsStruct? = + if (tlvReader.isNextTag(AnonymousTag)) { + CameraAvStreamManagementClusterSnapshotParamsStruct.fromTlv(AnonymousTag, tlvReader) + } else { + null + } + + return CurrentSnapshotConfigAttribute(decodedValue) + } + + suspend fun subscribeCurrentSnapshotConfigAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 15u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + CurrentSnapshotConfigAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Currentsnapshotconfig attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: CameraAvStreamManagementClusterSnapshotParamsStruct? = + if (tlvReader.isNextTag(AnonymousTag)) { + CameraAvStreamManagementClusterSnapshotParamsStruct.fromTlv(AnonymousTag, tlvReader) + } else { + null + } + + decodedValue?.let { emit(CurrentSnapshotConfigAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(CurrentSnapshotConfigAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readFabricsUsingCameraAttribute(): FabricsUsingCameraAttribute { + val ATTRIBUTE_ID: UInt = 16u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Fabricsusingcamera attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUByte(AnonymousTag)) + } + tlvReader.exitContainer() + } + + return FabricsUsingCameraAttribute(decodedValue) + } + + suspend fun subscribeFabricsUsingCameraAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 16u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + FabricsUsingCameraAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Fabricsusingcamera attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUByte(AnonymousTag)) + } + tlvReader.exitContainer() + } + + emit(FabricsUsingCameraAttributeSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(FabricsUsingCameraAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readAllocatedVideoStreamsAttribute(): AllocatedVideoStreamsAttribute { + val ATTRIBUTE_ID: UInt = 17u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Allocatedvideostreams attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(CameraAvStreamManagementClusterVideoStreamStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + null + } + + return AllocatedVideoStreamsAttribute(decodedValue) + } + + suspend fun subscribeAllocatedVideoStreamsAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 17u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + AllocatedVideoStreamsAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Allocatedvideostreams attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add( + CameraAvStreamManagementClusterVideoStreamStruct.fromTlv( + AnonymousTag, + tlvReader, + ) + ) + } + tlvReader.exitContainer() + } + } else { + null + } + + decodedValue?.let { emit(AllocatedVideoStreamsAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(AllocatedVideoStreamsAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readAllocatedAudioStreamsAttribute(): AllocatedAudioStreamsAttribute { + val ATTRIBUTE_ID: UInt = 18u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Allocatedaudiostreams attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(CameraAvStreamManagementClusterAudioStreamStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + null + } + + return AllocatedAudioStreamsAttribute(decodedValue) + } + + suspend fun subscribeAllocatedAudioStreamsAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 18u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + AllocatedAudioStreamsAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Allocatedaudiostreams attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add( + CameraAvStreamManagementClusterAudioStreamStruct.fromTlv( + AnonymousTag, + tlvReader, + ) + ) + } + tlvReader.exitContainer() + } + } else { + null + } + + decodedValue?.let { emit(AllocatedAudioStreamsAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(AllocatedAudioStreamsAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readAllocatedSnapshotStreamsAttribute(): AllocatedSnapshotStreamsAttribute { + val ATTRIBUTE_ID: UInt = 19u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Allocatedsnapshotstreams attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add( + CameraAvStreamManagementClusterSnapshotStreamStruct.fromTlv(AnonymousTag, tlvReader) + ) + } + tlvReader.exitContainer() + } + } else { + null + } + + return AllocatedSnapshotStreamsAttribute(decodedValue) + } + + suspend fun subscribeAllocatedSnapshotStreamsAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 19u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + AllocatedSnapshotStreamsAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Allocatedsnapshotstreams attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add( + CameraAvStreamManagementClusterSnapshotStreamStruct.fromTlv( + AnonymousTag, + tlvReader, + ) + ) + } + tlvReader.exitContainer() + } + } else { + null + } + + decodedValue?.let { emit(AllocatedSnapshotStreamsAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(AllocatedSnapshotStreamsAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readRankedVideoStreamPrioritiesListAttribute(): + RankedVideoStreamPrioritiesListAttribute { + val ATTRIBUTE_ID: UInt = 20u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { + "Rankedvideostreamprioritieslist attribute not found in response" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUByte(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + null + } + + return RankedVideoStreamPrioritiesListAttribute(decodedValue) + } + + suspend fun writeRankedVideoStreamPrioritiesListAttribute( + value: List, + timedWriteTimeout: Duration? = null, + ) { + val ATTRIBUTE_ID: UInt = 20u + + val tlvWriter = TlvWriter() + tlvWriter.startArray(AnonymousTag) + for (item in value.iterator()) { + tlvWriter.put(AnonymousTag, item) + } + tlvWriter.endArray() + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeRankedVideoStreamPrioritiesListAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 20u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + RankedVideoStreamPrioritiesListAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Rankedvideostreamprioritieslist attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUByte(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + null + } + + decodedValue?.let { + emit(RankedVideoStreamPrioritiesListAttributeSubscriptionState.Success(it)) + } + } + SubscriptionState.SubscriptionEstablished -> { + emit(RankedVideoStreamPrioritiesListAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readSoftRecordingPrivacyModeEnabledAttribute(): Boolean? { + val ATTRIBUTE_ID: UInt = 21u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { + "Softrecordingprivacymodeenabled attribute not found in response" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeSoftRecordingPrivacyModeEnabledAttribute( + value: Boolean, + timedWriteTimeout: Duration? = null, + ) { + val ATTRIBUTE_ID: UInt = 21u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeSoftRecordingPrivacyModeEnabledAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 21u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BooleanSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Softrecordingprivacymodeenabled attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(BooleanSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BooleanSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readSoftLivestreamPrivacyModeEnabledAttribute(): Boolean? { + val ATTRIBUTE_ID: UInt = 22u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { + "Softlivestreamprivacymodeenabled attribute not found in response" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeSoftLivestreamPrivacyModeEnabledAttribute( + value: Boolean, + timedWriteTimeout: Duration? = null, + ) { + val ATTRIBUTE_ID: UInt = 22u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeSoftLivestreamPrivacyModeEnabledAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 22u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BooleanSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Softlivestreamprivacymodeenabled attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(BooleanSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BooleanSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readHardPrivacyModeOnAttribute(): Boolean? { + val ATTRIBUTE_ID: UInt = 23u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Hardprivacymodeon attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeHardPrivacyModeOnAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 23u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BooleanSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Hardprivacymodeon attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(BooleanSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BooleanSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readNightVisionAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 24u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Nightvision attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeNightVisionAttribute(value: UByte, timedWriteTimeout: Duration? = null) { + val ATTRIBUTE_ID: UInt = 24u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeNightVisionAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 24u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Nightvision attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readNightVisionIllumAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 25u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Nightvisionillum attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeNightVisionIllumAttribute(value: UByte, timedWriteTimeout: Duration? = null) { + val ATTRIBUTE_ID: UInt = 25u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeNightVisionIllumAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 25u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Nightvisionillum attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readAWBEnabledAttribute(): Boolean? { + val ATTRIBUTE_ID: UInt = 26u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Awbenabled attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeAWBEnabledAttribute(value: Boolean, timedWriteTimeout: Duration? = null) { + val ATTRIBUTE_ID: UInt = 26u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeAWBEnabledAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 26u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BooleanSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Awbenabled attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(BooleanSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BooleanSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readAutoShutterSpeedEnabledAttribute(): Boolean? { + val ATTRIBUTE_ID: UInt = 27u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Autoshutterspeedenabled attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeAutoShutterSpeedEnabledAttribute( + value: Boolean, + timedWriteTimeout: Duration? = null, + ) { + val ATTRIBUTE_ID: UInt = 27u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeAutoShutterSpeedEnabledAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 27u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BooleanSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Autoshutterspeedenabled attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(BooleanSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BooleanSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readAutoISOEnabledAttribute(): Boolean? { + val ATTRIBUTE_ID: UInt = 28u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Autoisoenabled attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeAutoISOEnabledAttribute(value: Boolean, timedWriteTimeout: Duration? = null) { + val ATTRIBUTE_ID: UInt = 28u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeAutoISOEnabledAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 28u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BooleanSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Autoisoenabled attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(BooleanSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BooleanSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readViewportAttribute(): ViewportAttribute { + val ATTRIBUTE_ID: UInt = 29u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Viewport attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: CameraAvStreamManagementClusterViewportStruct? = + if (tlvReader.isNextTag(AnonymousTag)) { + CameraAvStreamManagementClusterViewportStruct.fromTlv(AnonymousTag, tlvReader) + } else { + null + } + + return ViewportAttribute(decodedValue) + } + + suspend fun subscribeViewportAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 29u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + ViewportAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Viewport attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: CameraAvStreamManagementClusterViewportStruct? = + if (tlvReader.isNextTag(AnonymousTag)) { + CameraAvStreamManagementClusterViewportStruct.fromTlv(AnonymousTag, tlvReader) + } else { + null + } + + decodedValue?.let { emit(ViewportAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(ViewportAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readSpeakerMutedAttribute(): Boolean? { + val ATTRIBUTE_ID: UInt = 30u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Speakermuted attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeSpeakerMutedAttribute(value: Boolean, timedWriteTimeout: Duration? = null) { + val ATTRIBUTE_ID: UInt = 30u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeSpeakerMutedAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 30u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BooleanSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Speakermuted attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(BooleanSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BooleanSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readSpeakerVolumeLevelAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 31u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Speakervolumelevel attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeSpeakerVolumeLevelAttribute(value: UByte, timedWriteTimeout: Duration? = null) { + val ATTRIBUTE_ID: UInt = 31u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeSpeakerVolumeLevelAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 31u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Speakervolumelevel attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readSpeakerMaxLevelAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 32u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Speakermaxlevel attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeSpeakerMaxLevelAttribute(value: UByte, timedWriteTimeout: Duration? = null) { + val ATTRIBUTE_ID: UInt = 32u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeSpeakerMaxLevelAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 32u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Speakermaxlevel attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readSpeakerMinLevelAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 33u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Speakerminlevel attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeSpeakerMinLevelAttribute(value: UByte, timedWriteTimeout: Duration? = null) { + val ATTRIBUTE_ID: UInt = 33u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeSpeakerMinLevelAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 33u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Speakerminlevel attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readMicrophoneMutedAttribute(): Boolean? { + val ATTRIBUTE_ID: UInt = 34u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Microphonemuted attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeMicrophoneMutedAttribute(value: Boolean, timedWriteTimeout: Duration? = null) { + val ATTRIBUTE_ID: UInt = 34u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeMicrophoneMutedAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 34u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BooleanSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Microphonemuted attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(BooleanSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BooleanSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readMicrophoneVolumeLevelAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 35u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Microphonevolumelevel attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeMicrophoneVolumeLevelAttribute( + value: UByte, + timedWriteTimeout: Duration? = null, + ) { + val ATTRIBUTE_ID: UInt = 35u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeMicrophoneVolumeLevelAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 35u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Microphonevolumelevel attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readMicrophoneMaxLevelAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 36u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Microphonemaxlevel attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeMicrophoneMaxLevelAttribute(value: UByte, timedWriteTimeout: Duration? = null) { + val ATTRIBUTE_ID: UInt = 36u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeMicrophoneMaxLevelAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 36u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Microphonemaxlevel attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readMicrophoneMinLevelAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 37u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Microphoneminlevel attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeMicrophoneMinLevelAttribute(value: UByte, timedWriteTimeout: Duration? = null) { + val ATTRIBUTE_ID: UInt = 37u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeMicrophoneMinLevelAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 37u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Microphoneminlevel attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readMicrophoneAGCEnabledAttribute(): Boolean? { + val ATTRIBUTE_ID: UInt = 38u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Microphoneagcenabled attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeMicrophoneAGCEnabledAttribute( + value: Boolean, + timedWriteTimeout: Duration? = null, + ) { + val ATTRIBUTE_ID: UInt = 38u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeMicrophoneAGCEnabledAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 38u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BooleanSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Microphoneagcenabled attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(BooleanSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BooleanSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readImageRotationAttribute(): UShort? { + val ATTRIBUTE_ID: UInt = 39u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Imagerotation attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UShort? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUShort(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeImageRotationAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 39u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UShortSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Imagerotation attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UShort? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUShort(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UShortSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readImageFlipHorizontalAttribute(): Boolean? { + val ATTRIBUTE_ID: UInt = 40u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Imagefliphorizontal attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeImageFlipHorizontalAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 40u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BooleanSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Imagefliphorizontal attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(BooleanSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BooleanSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readImageFlipVerticalAttribute(): Boolean? { + val ATTRIBUTE_ID: UInt = 41u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Imageflipvertical attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeImageFlipVerticalAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 41u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BooleanSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Imageflipvertical attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(BooleanSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BooleanSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readLocalVideoRecordingEnabledAttribute(): Boolean? { + val ATTRIBUTE_ID: UInt = 42u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Localvideorecordingenabled attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeLocalVideoRecordingEnabledAttribute( + value: Boolean, + timedWriteTimeout: Duration? = null, + ) { + val ATTRIBUTE_ID: UInt = 42u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeLocalVideoRecordingEnabledAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 42u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BooleanSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Localvideorecordingenabled attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(BooleanSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BooleanSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readLocalSnapshotRecordingEnabledAttribute(): Boolean? { + val ATTRIBUTE_ID: UInt = 43u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { + "Localsnapshotrecordingenabled attribute not found in response" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeLocalSnapshotRecordingEnabledAttribute( + value: Boolean, + timedWriteTimeout: Duration? = null, + ) { + val ATTRIBUTE_ID: UInt = 43u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeLocalSnapshotRecordingEnabledAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 43u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BooleanSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Localsnapshotrecordingenabled attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(BooleanSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BooleanSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readStatusLightEnabledAttribute(): Boolean? { + val ATTRIBUTE_ID: UInt = 44u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Statuslightenabled attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeStatusLightEnabledAttribute( + value: Boolean, + timedWriteTimeout: Duration? = null, + ) { + val ATTRIBUTE_ID: UInt = 44u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeStatusLightEnabledAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 44u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BooleanSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Statuslightenabled attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(BooleanSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BooleanSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readStatusLightBrightnessAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 45u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Statuslightbrightness attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeStatusLightBrightnessAttribute( + value: UByte, + timedWriteTimeout: Duration? = null, + ) { + val ATTRIBUTE_ID: UInt = 45u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeStatusLightBrightnessAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 45u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Statuslightbrightness attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readDepthSensorStatusAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 46u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Depthsensorstatus attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeDepthSensorStatusAttribute(value: UByte, timedWriteTimeout: Duration? = null) { + val ATTRIBUTE_ID: UInt = 46u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeDepthSensorStatusAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 46u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Depthsensorstatus attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { + val ATTRIBUTE_ID: UInt = 65528u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Generatedcommandlist attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + return GeneratedCommandListAttribute(decodedValue) + } + + suspend fun subscribeGeneratedCommandListAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 65528u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + GeneratedCommandListAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Generatedcommandlist attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + emit(GeneratedCommandListAttributeSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(GeneratedCommandListAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readAcceptedCommandListAttribute(): AcceptedCommandListAttribute { + val ATTRIBUTE_ID: UInt = 65529u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Acceptedcommandlist attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + return AcceptedCommandListAttribute(decodedValue) + } + + suspend fun subscribeAcceptedCommandListAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 65529u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + AcceptedCommandListAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Acceptedcommandlist attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + emit(AcceptedCommandListAttributeSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(AcceptedCommandListAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readEventListAttribute(): EventListAttribute { + val ATTRIBUTE_ID: UInt = 65530u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Eventlist attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + return EventListAttribute(decodedValue) + } + + suspend fun subscribeEventListAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 65530u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + EventListAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Eventlist attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + emit(EventListAttributeSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(EventListAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readAttributeListAttribute(): AttributeListAttribute { + val ATTRIBUTE_ID: UInt = 65531u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Attributelist attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + return AttributeListAttribute(decodedValue) + } + + suspend fun subscribeAttributeListAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 65531u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + AttributeListAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Attributelist attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + emit(AttributeListAttributeSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(AttributeListAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readFeatureMapAttribute(): UInt { + val ATTRIBUTE_ID: UInt = 65532u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Featuremap attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt = tlvReader.getUInt(AnonymousTag) + + return decodedValue + } + + suspend fun subscribeFeatureMapAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 65532u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UIntSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Featuremap attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt = tlvReader.getUInt(AnonymousTag) + + emit(UIntSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(UIntSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readClusterRevisionAttribute(): UShort { + val ATTRIBUTE_ID: UInt = 65533u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Clusterrevision attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UShort = tlvReader.getUShort(AnonymousTag) + + return decodedValue + } + + suspend fun subscribeClusterRevisionAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 65533u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UShortSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Clusterrevision attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UShort = tlvReader.getUShort(AnonymousTag) + + emit(UShortSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(UShortSubscriptionState.SubscriptionEstablished) + } + } + } + } + + companion object { + private val logger = Logger.getLogger(CameraAvStreamManagementCluster::class.java.name) + const val CLUSTER_ID: UInt = 1361u + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/DeviceEnergyManagementModeCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/DeviceEnergyManagementModeCluster.kt index 657941cb3f..95ccc5a672 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/DeviceEnergyManagementModeCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/DeviceEnergyManagementModeCluster.kt @@ -32,9 +32,6 @@ import matter.controller.SubscriptionState import matter.controller.UByteSubscriptionState import matter.controller.UIntSubscriptionState import matter.controller.UShortSubscriptionState -import matter.controller.WriteRequest -import matter.controller.WriteRequests -import matter.controller.WriteResponse import matter.controller.cluster.structs.* import matter.controller.model.AttributePath import matter.controller.model.CommandPath @@ -60,26 +57,6 @@ class DeviceEnergyManagementModeCluster( object SubscriptionEstablished : SupportedModesAttributeSubscriptionState() } - class StartUpModeAttribute(val value: UByte?) - - sealed class StartUpModeAttributeSubscriptionState { - data class Success(val value: UByte?) : StartUpModeAttributeSubscriptionState() - - data class Error(val exception: Exception) : StartUpModeAttributeSubscriptionState() - - object SubscriptionEstablished : StartUpModeAttributeSubscriptionState() - } - - class OnModeAttribute(val value: UByte?) - - sealed class OnModeAttributeSubscriptionState { - data class Success(val value: UByte?) : OnModeAttributeSubscriptionState() - - data class Error(val exception: Exception) : OnModeAttributeSubscriptionState() - - object SubscriptionEstablished : OnModeAttributeSubscriptionState() - } - class GeneratedCommandListAttribute(val value: List) sealed class GeneratedCommandListAttributeSubscriptionState { @@ -364,288 +341,6 @@ class DeviceEnergyManagementModeCluster( } } - suspend fun readStartUpModeAttribute(): StartUpModeAttribute { - val ATTRIBUTE_ID: UInt = 2u - - val attributePath = - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - - val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) - - val response = controller.read(readRequest) - - if (response.successes.isEmpty()) { - logger.log(Level.WARNING, "Read command failed") - throw IllegalStateException("Read command failed with failures: ${response.failures}") - } - - logger.log(Level.FINE, "Read command succeeded") - - val attributeData = - response.successes.filterIsInstance().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Startupmode attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - return StartUpModeAttribute(decodedValue) - } - - suspend fun writeStartUpModeAttribute(value: UByte, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 2u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeStartUpModeAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2u - val attributePaths = - listOf( - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - ) - - val subscribeRequest: SubscribeRequest = - SubscribeRequest( - eventPaths = emptyList(), - attributePaths = attributePaths, - minInterval = Duration.ofSeconds(minInterval.toLong()), - maxInterval = Duration.ofSeconds(maxInterval.toLong()), - ) - - return controller.subscribe(subscribeRequest).transform { subscriptionState -> - when (subscriptionState) { - is SubscriptionState.SubscriptionErrorNotification -> { - emit( - StartUpModeAttributeSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Startupmode attribute not found in Node State update" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - decodedValue?.let { emit(StartUpModeAttributeSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(StartUpModeAttributeSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readOnModeAttribute(): OnModeAttribute { - val ATTRIBUTE_ID: UInt = 3u - - val attributePath = - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - - val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) - - val response = controller.read(readRequest) - - if (response.successes.isEmpty()) { - logger.log(Level.WARNING, "Read command failed") - throw IllegalStateException("Read command failed with failures: ${response.failures}") - } - - logger.log(Level.FINE, "Read command succeeded") - - val attributeData = - response.successes.filterIsInstance().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Onmode attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - return OnModeAttribute(decodedValue) - } - - suspend fun writeOnModeAttribute(value: UByte, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 3u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeOnModeAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 3u - val attributePaths = - listOf( - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - ) - - val subscribeRequest: SubscribeRequest = - SubscribeRequest( - eventPaths = emptyList(), - attributePaths = attributePaths, - minInterval = Duration.ofSeconds(minInterval.toLong()), - maxInterval = Duration.ofSeconds(maxInterval.toLong()), - ) - - return controller.subscribe(subscribeRequest).transform { subscriptionState -> - when (subscriptionState) { - is SubscriptionState.SubscriptionErrorNotification -> { - emit( - OnModeAttributeSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Onmode attribute not found in Node State update" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - decodedValue?.let { emit(OnModeAttributeSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(OnModeAttributeSubscriptionState.SubscriptionEstablished) - } - } - } - } - suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { val ATTRIBUTE_ID: UInt = 65528u diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/EnergyEvseModeCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/EnergyEvseModeCluster.kt index a854ec8d1f..00baf3ce4a 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/EnergyEvseModeCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/EnergyEvseModeCluster.kt @@ -32,9 +32,6 @@ import matter.controller.SubscriptionState import matter.controller.UByteSubscriptionState import matter.controller.UIntSubscriptionState import matter.controller.UShortSubscriptionState -import matter.controller.WriteRequest -import matter.controller.WriteRequests -import matter.controller.WriteResponse import matter.controller.cluster.structs.* import matter.controller.model.AttributePath import matter.controller.model.CommandPath @@ -60,26 +57,6 @@ class EnergyEvseModeCluster( object SubscriptionEstablished : SupportedModesAttributeSubscriptionState() } - class StartUpModeAttribute(val value: UByte?) - - sealed class StartUpModeAttributeSubscriptionState { - data class Success(val value: UByte?) : StartUpModeAttributeSubscriptionState() - - data class Error(val exception: Exception) : StartUpModeAttributeSubscriptionState() - - object SubscriptionEstablished : StartUpModeAttributeSubscriptionState() - } - - class OnModeAttribute(val value: UByte?) - - sealed class OnModeAttributeSubscriptionState { - data class Success(val value: UByte?) : OnModeAttributeSubscriptionState() - - data class Error(val exception: Exception) : OnModeAttributeSubscriptionState() - - object SubscriptionEstablished : OnModeAttributeSubscriptionState() - } - class GeneratedCommandListAttribute(val value: List) sealed class GeneratedCommandListAttributeSubscriptionState { @@ -362,288 +339,6 @@ class EnergyEvseModeCluster( } } - suspend fun readStartUpModeAttribute(): StartUpModeAttribute { - val ATTRIBUTE_ID: UInt = 2u - - val attributePath = - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - - val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) - - val response = controller.read(readRequest) - - if (response.successes.isEmpty()) { - logger.log(Level.WARNING, "Read command failed") - throw IllegalStateException("Read command failed with failures: ${response.failures}") - } - - logger.log(Level.FINE, "Read command succeeded") - - val attributeData = - response.successes.filterIsInstance().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Startupmode attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - return StartUpModeAttribute(decodedValue) - } - - suspend fun writeStartUpModeAttribute(value: UByte, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 2u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeStartUpModeAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2u - val attributePaths = - listOf( - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - ) - - val subscribeRequest: SubscribeRequest = - SubscribeRequest( - eventPaths = emptyList(), - attributePaths = attributePaths, - minInterval = Duration.ofSeconds(minInterval.toLong()), - maxInterval = Duration.ofSeconds(maxInterval.toLong()), - ) - - return controller.subscribe(subscribeRequest).transform { subscriptionState -> - when (subscriptionState) { - is SubscriptionState.SubscriptionErrorNotification -> { - emit( - StartUpModeAttributeSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Startupmode attribute not found in Node State update" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - decodedValue?.let { emit(StartUpModeAttributeSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(StartUpModeAttributeSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readOnModeAttribute(): OnModeAttribute { - val ATTRIBUTE_ID: UInt = 3u - - val attributePath = - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - - val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) - - val response = controller.read(readRequest) - - if (response.successes.isEmpty()) { - logger.log(Level.WARNING, "Read command failed") - throw IllegalStateException("Read command failed with failures: ${response.failures}") - } - - logger.log(Level.FINE, "Read command succeeded") - - val attributeData = - response.successes.filterIsInstance().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Onmode attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - return OnModeAttribute(decodedValue) - } - - suspend fun writeOnModeAttribute(value: UByte, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 3u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeOnModeAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 3u - val attributePaths = - listOf( - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - ) - - val subscribeRequest: SubscribeRequest = - SubscribeRequest( - eventPaths = emptyList(), - attributePaths = attributePaths, - minInterval = Duration.ofSeconds(minInterval.toLong()), - maxInterval = Duration.ofSeconds(maxInterval.toLong()), - ) - - return controller.subscribe(subscribeRequest).transform { subscriptionState -> - when (subscriptionState) { - is SubscriptionState.SubscriptionErrorNotification -> { - emit( - OnModeAttributeSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Onmode attribute not found in Node State update" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - decodedValue?.let { emit(OnModeAttributeSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(OnModeAttributeSubscriptionState.SubscriptionEstablished) - } - } - } - } - suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { val ATTRIBUTE_ID: UInt = 65528u diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/GeneralCommissioningCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/GeneralCommissioningCluster.kt index 92e76e250f..93fafc69f4 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/GeneralCommissioningCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/GeneralCommissioningCluster.kt @@ -1170,6 +1170,99 @@ class GeneralCommissioningCluster( } } + suspend fun readTCUpdateDeadlineAttribute(): UInt? { + val ATTRIBUTE_ID: UInt = 9u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Tcupdatedeadline attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUInt(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeTCUpdateDeadlineAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 9u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UIntSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Tcupdatedeadline attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUInt(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UIntSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UIntSubscriptionState.SubscriptionEstablished) + } + } + } + } + suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { val ATTRIBUTE_ID: UInt = 65528u diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/WaterHeaterModeCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/WaterHeaterModeCluster.kt index 2735264493..d2bc5094fe 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/WaterHeaterModeCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/WaterHeaterModeCluster.kt @@ -32,9 +32,6 @@ import matter.controller.SubscriptionState import matter.controller.UByteSubscriptionState import matter.controller.UIntSubscriptionState import matter.controller.UShortSubscriptionState -import matter.controller.WriteRequest -import matter.controller.WriteRequests -import matter.controller.WriteResponse import matter.controller.cluster.structs.* import matter.controller.model.AttributePath import matter.controller.model.CommandPath @@ -60,26 +57,6 @@ class WaterHeaterModeCluster( object SubscriptionEstablished : SupportedModesAttributeSubscriptionState() } - class StartUpModeAttribute(val value: UByte?) - - sealed class StartUpModeAttributeSubscriptionState { - data class Success(val value: UByte?) : StartUpModeAttributeSubscriptionState() - - data class Error(val exception: Exception) : StartUpModeAttributeSubscriptionState() - - object SubscriptionEstablished : StartUpModeAttributeSubscriptionState() - } - - class OnModeAttribute(val value: UByte?) - - sealed class OnModeAttributeSubscriptionState { - data class Success(val value: UByte?) : OnModeAttributeSubscriptionState() - - data class Error(val exception: Exception) : OnModeAttributeSubscriptionState() - - object SubscriptionEstablished : OnModeAttributeSubscriptionState() - } - class GeneratedCommandListAttribute(val value: List) sealed class GeneratedCommandListAttributeSubscriptionState { @@ -362,288 +339,6 @@ class WaterHeaterModeCluster( } } - suspend fun readStartUpModeAttribute(): StartUpModeAttribute { - val ATTRIBUTE_ID: UInt = 2u - - val attributePath = - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - - val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) - - val response = controller.read(readRequest) - - if (response.successes.isEmpty()) { - logger.log(Level.WARNING, "Read command failed") - throw IllegalStateException("Read command failed with failures: ${response.failures}") - } - - logger.log(Level.FINE, "Read command succeeded") - - val attributeData = - response.successes.filterIsInstance().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Startupmode attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - return StartUpModeAttribute(decodedValue) - } - - suspend fun writeStartUpModeAttribute(value: UByte, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 2u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeStartUpModeAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2u - val attributePaths = - listOf( - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - ) - - val subscribeRequest: SubscribeRequest = - SubscribeRequest( - eventPaths = emptyList(), - attributePaths = attributePaths, - minInterval = Duration.ofSeconds(minInterval.toLong()), - maxInterval = Duration.ofSeconds(maxInterval.toLong()), - ) - - return controller.subscribe(subscribeRequest).transform { subscriptionState -> - when (subscriptionState) { - is SubscriptionState.SubscriptionErrorNotification -> { - emit( - StartUpModeAttributeSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Startupmode attribute not found in Node State update" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - decodedValue?.let { emit(StartUpModeAttributeSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(StartUpModeAttributeSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readOnModeAttribute(): OnModeAttribute { - val ATTRIBUTE_ID: UInt = 3u - - val attributePath = - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - - val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) - - val response = controller.read(readRequest) - - if (response.successes.isEmpty()) { - logger.log(Level.WARNING, "Read command failed") - throw IllegalStateException("Read command failed with failures: ${response.failures}") - } - - logger.log(Level.FINE, "Read command succeeded") - - val attributeData = - response.successes.filterIsInstance().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Onmode attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - return OnModeAttribute(decodedValue) - } - - suspend fun writeOnModeAttribute(value: UByte, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 3u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeOnModeAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 3u - val attributePaths = - listOf( - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - ) - - val subscribeRequest: SubscribeRequest = - SubscribeRequest( - eventPaths = emptyList(), - attributePaths = attributePaths, - minInterval = Duration.ofSeconds(minInterval.toLong()), - maxInterval = Duration.ofSeconds(maxInterval.toLong()), - ) - - return controller.subscribe(subscribeRequest).transform { subscriptionState -> - when (subscriptionState) { - is SubscriptionState.SubscriptionErrorNotification -> { - emit( - OnModeAttributeSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Onmode attribute not found in Node State update" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - decodedValue?.let { emit(OnModeAttributeSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(OnModeAttributeSubscriptionState.SubscriptionEstablished) - } - } - } - } - suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { val ATTRIBUTE_ID: UInt = 65528u diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/WebRTCTransportRequestorCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/WebRTCTransportRequestorCluster.kt new file mode 100644 index 0000000000..2d5f7d8ed5 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/WebRTCTransportRequestorCluster.kt @@ -0,0 +1,873 @@ +/* + * + * 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. + */ + +package matter.controller.cluster.clusters + +import java.time.Duration +import java.util.logging.Level +import java.util.logging.Logger +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.transform +import matter.controller.InvokeRequest +import matter.controller.InvokeResponse +import matter.controller.MatterController +import matter.controller.ReadData +import matter.controller.ReadRequest +import matter.controller.SubscribeRequest +import matter.controller.SubscriptionState +import matter.controller.UIntSubscriptionState +import matter.controller.UShortSubscriptionState +import matter.controller.cluster.structs.* +import matter.controller.model.AttributePath +import matter.controller.model.CommandPath +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class WebRTCTransportRequestorCluster( + private val controller: MatterController, + private val endpointId: UShort, +) { + class CurrentSessionsAttribute( + val value: List + ) + + sealed class CurrentSessionsAttributeSubscriptionState { + data class Success(val value: List) : + CurrentSessionsAttributeSubscriptionState() + + data class Error(val exception: Exception) : CurrentSessionsAttributeSubscriptionState() + + object SubscriptionEstablished : CurrentSessionsAttributeSubscriptionState() + } + + class GeneratedCommandListAttribute(val value: List) + + sealed class GeneratedCommandListAttributeSubscriptionState { + data class Success(val value: List) : GeneratedCommandListAttributeSubscriptionState() + + data class Error(val exception: Exception) : GeneratedCommandListAttributeSubscriptionState() + + object SubscriptionEstablished : GeneratedCommandListAttributeSubscriptionState() + } + + class AcceptedCommandListAttribute(val value: List) + + sealed class AcceptedCommandListAttributeSubscriptionState { + data class Success(val value: List) : AcceptedCommandListAttributeSubscriptionState() + + data class Error(val exception: Exception) : AcceptedCommandListAttributeSubscriptionState() + + object SubscriptionEstablished : AcceptedCommandListAttributeSubscriptionState() + } + + class EventListAttribute(val value: List) + + sealed class EventListAttributeSubscriptionState { + data class Success(val value: List) : EventListAttributeSubscriptionState() + + data class Error(val exception: Exception) : EventListAttributeSubscriptionState() + + object SubscriptionEstablished : EventListAttributeSubscriptionState() + } + + class AttributeListAttribute(val value: List) + + sealed class AttributeListAttributeSubscriptionState { + data class Success(val value: List) : AttributeListAttributeSubscriptionState() + + data class Error(val exception: Exception) : AttributeListAttributeSubscriptionState() + + object SubscriptionEstablished : AttributeListAttributeSubscriptionState() + } + + suspend fun offer( + webRTCSessionID: UShort, + sdp: String, + ICEServers: List?, + ICETransportPolicy: String?, + timedInvokeTimeout: Duration? = null, + ) { + val commandId: UInt = 1u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_WEB_RTC_SESSION_ID_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_WEB_RTC_SESSION_ID_REQ), webRTCSessionID) + + val TAG_SDP_REQ: Int = 1 + tlvWriter.put(ContextSpecificTag(TAG_SDP_REQ), sdp) + + val TAG_ICE_SERVERS_REQ: Int = 2 + ICEServers?.let { + tlvWriter.startArray(ContextSpecificTag(TAG_ICE_SERVERS_REQ)) + for (item in ICEServers.iterator()) { + item.toTlv(AnonymousTag, tlvWriter) + } + tlvWriter.endArray() + } + + val TAG_ICE_TRANSPORT_POLICY_REQ: Int = 3 + ICETransportPolicy?.let { + tlvWriter.put(ContextSpecificTag(TAG_ICE_TRANSPORT_POLICY_REQ), ICETransportPolicy) + } + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun answer(webRTCSessionID: UShort, sdp: String, timedInvokeTimeout: Duration? = null) { + val commandId: UInt = 2u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_WEB_RTC_SESSION_ID_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_WEB_RTC_SESSION_ID_REQ), webRTCSessionID) + + val TAG_SDP_REQ: Int = 1 + tlvWriter.put(ContextSpecificTag(TAG_SDP_REQ), sdp) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun ICECandidate( + webRTCSessionID: UShort, + ICECandidate: String, + timedInvokeTimeout: Duration? = null, + ) { + val commandId: UInt = 3u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_WEB_RTC_SESSION_ID_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_WEB_RTC_SESSION_ID_REQ), webRTCSessionID) + + val TAG_ICE_CANDIDATE_REQ: Int = 1 + tlvWriter.put(ContextSpecificTag(TAG_ICE_CANDIDATE_REQ), ICECandidate) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun end(webRTCSessionID: UShort, reason: UByte, timedInvokeTimeout: Duration? = null) { + val commandId: UInt = 4u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_WEB_RTC_SESSION_ID_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_WEB_RTC_SESSION_ID_REQ), webRTCSessionID) + + val TAG_REASON_REQ: Int = 1 + tlvWriter.put(ContextSpecificTag(TAG_REASON_REQ), reason) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun readCurrentSessionsAttribute(): CurrentSessionsAttribute { + val ATTRIBUTE_ID: UInt = 0u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Currentsessions attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(WebRTCTransportRequestorClusterWebRTCSessionStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + return CurrentSessionsAttribute(decodedValue) + } + + suspend fun subscribeCurrentSessionsAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 0u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + CurrentSessionsAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Currentsessions attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add( + WebRTCTransportRequestorClusterWebRTCSessionStruct.fromTlv( + AnonymousTag, + tlvReader, + ) + ) + } + tlvReader.exitContainer() + } + + emit(CurrentSessionsAttributeSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(CurrentSessionsAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { + val ATTRIBUTE_ID: UInt = 65528u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Generatedcommandlist attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + return GeneratedCommandListAttribute(decodedValue) + } + + suspend fun subscribeGeneratedCommandListAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 65528u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + GeneratedCommandListAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Generatedcommandlist attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + emit(GeneratedCommandListAttributeSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(GeneratedCommandListAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readAcceptedCommandListAttribute(): AcceptedCommandListAttribute { + val ATTRIBUTE_ID: UInt = 65529u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Acceptedcommandlist attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + return AcceptedCommandListAttribute(decodedValue) + } + + suspend fun subscribeAcceptedCommandListAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 65529u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + AcceptedCommandListAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Acceptedcommandlist attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + emit(AcceptedCommandListAttributeSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(AcceptedCommandListAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readEventListAttribute(): EventListAttribute { + val ATTRIBUTE_ID: UInt = 65530u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Eventlist attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + return EventListAttribute(decodedValue) + } + + suspend fun subscribeEventListAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 65530u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + EventListAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Eventlist attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + emit(EventListAttributeSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(EventListAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readAttributeListAttribute(): AttributeListAttribute { + val ATTRIBUTE_ID: UInt = 65531u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Attributelist attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + return AttributeListAttribute(decodedValue) + } + + suspend fun subscribeAttributeListAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 65531u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + AttributeListAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Attributelist attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + emit(AttributeListAttributeSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(AttributeListAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readFeatureMapAttribute(): UInt { + val ATTRIBUTE_ID: UInt = 65532u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Featuremap attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt = tlvReader.getUInt(AnonymousTag) + + return decodedValue + } + + suspend fun subscribeFeatureMapAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 65532u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UIntSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Featuremap attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt = tlvReader.getUInt(AnonymousTag) + + emit(UIntSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(UIntSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readClusterRevisionAttribute(): UShort { + val ATTRIBUTE_ID: UInt = 65533u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Clusterrevision attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UShort = tlvReader.getUShort(AnonymousTag) + + return decodedValue + } + + suspend fun subscribeClusterRevisionAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 65533u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UShortSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Clusterrevision attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UShort = tlvReader.getUShort(AnonymousTag) + + emit(UShortSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(UShortSubscriptionState.SubscriptionEstablished) + } + } + } + } + + companion object { + private val logger = Logger.getLogger(WebRTCTransportRequestorCluster::class.java.name) + const val CLUSTER_ID: UInt = 1364u + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/ZoneManagementCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/ZoneManagementCluster.kt new file mode 100644 index 0000000000..c51fe6eaf0 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/ZoneManagementCluster.kt @@ -0,0 +1,1296 @@ +/* + * + * 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. + */ + +package matter.controller.cluster.clusters + +import java.time.Duration +import java.util.logging.Level +import java.util.logging.Logger +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.transform +import matter.controller.InvokeRequest +import matter.controller.InvokeResponse +import matter.controller.MatterController +import matter.controller.ReadData +import matter.controller.ReadRequest +import matter.controller.SubscribeRequest +import matter.controller.SubscriptionState +import matter.controller.UByteSubscriptionState +import matter.controller.UIntSubscriptionState +import matter.controller.UShortSubscriptionState +import matter.controller.WriteRequest +import matter.controller.WriteRequests +import matter.controller.WriteResponse +import matter.controller.cluster.structs.* +import matter.controller.model.AttributePath +import matter.controller.model.CommandPath +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ZoneManagementCluster( + private val controller: MatterController, + private val endpointId: UShort, +) { + class CreateTwoDCartesianZoneResponse(val zoneID: UShort) + + class GetTwoDCartesianZoneResponse(val zones: List) + + class SupportedZoneSourcesAttribute(val value: List) + + sealed class SupportedZoneSourcesAttributeSubscriptionState { + data class Success(val value: List) : SupportedZoneSourcesAttributeSubscriptionState() + + data class Error(val exception: Exception) : SupportedZoneSourcesAttributeSubscriptionState() + + object SubscriptionEstablished : SupportedZoneSourcesAttributeSubscriptionState() + } + + class ZonesAttribute(val value: List?) + + sealed class ZonesAttributeSubscriptionState { + data class Success(val value: List?) : + ZonesAttributeSubscriptionState() + + data class Error(val exception: Exception) : ZonesAttributeSubscriptionState() + + object SubscriptionEstablished : ZonesAttributeSubscriptionState() + } + + class TimeControlAttribute(val value: List) + + sealed class TimeControlAttributeSubscriptionState { + data class Success(val value: List) : + TimeControlAttributeSubscriptionState() + + data class Error(val exception: Exception) : TimeControlAttributeSubscriptionState() + + object SubscriptionEstablished : TimeControlAttributeSubscriptionState() + } + + class GeneratedCommandListAttribute(val value: List) + + sealed class GeneratedCommandListAttributeSubscriptionState { + data class Success(val value: List) : GeneratedCommandListAttributeSubscriptionState() + + data class Error(val exception: Exception) : GeneratedCommandListAttributeSubscriptionState() + + object SubscriptionEstablished : GeneratedCommandListAttributeSubscriptionState() + } + + class AcceptedCommandListAttribute(val value: List) + + sealed class AcceptedCommandListAttributeSubscriptionState { + data class Success(val value: List) : AcceptedCommandListAttributeSubscriptionState() + + data class Error(val exception: Exception) : AcceptedCommandListAttributeSubscriptionState() + + object SubscriptionEstablished : AcceptedCommandListAttributeSubscriptionState() + } + + class EventListAttribute(val value: List) + + sealed class EventListAttributeSubscriptionState { + data class Success(val value: List) : EventListAttributeSubscriptionState() + + data class Error(val exception: Exception) : EventListAttributeSubscriptionState() + + object SubscriptionEstablished : EventListAttributeSubscriptionState() + } + + class AttributeListAttribute(val value: List) + + sealed class AttributeListAttributeSubscriptionState { + data class Success(val value: List) : AttributeListAttributeSubscriptionState() + + data class Error(val exception: Exception) : AttributeListAttributeSubscriptionState() + + object SubscriptionEstablished : AttributeListAttributeSubscriptionState() + } + + suspend fun createTwoDCartesianZone( + zone: ZoneManagementClusterTwoDCartesianZoneStruct, + timedInvokeTimeout: Duration? = null, + ): CreateTwoDCartesianZoneResponse { + val commandId: UInt = 0u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_ZONE_REQ: Int = 0 + zone.toTlv(ContextSpecificTag(TAG_ZONE_REQ), tlvWriter) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + + val tlvReader = TlvReader(response.payload) + tlvReader.enterStructure(AnonymousTag) + val TAG_ZONE_ID: Int = 0 + var zoneID_decoded: UShort? = null + + while (!tlvReader.isEndOfContainer()) { + val tag = tlvReader.peekElement().tag + + if (tag == ContextSpecificTag(TAG_ZONE_ID)) { + zoneID_decoded = tlvReader.getUShort(tag) + } else { + tlvReader.skipElement() + } + } + + if (zoneID_decoded == null) { + throw IllegalStateException("zoneID not found in TLV") + } + + tlvReader.exitContainer() + + return CreateTwoDCartesianZoneResponse(zoneID_decoded) + } + + suspend fun updateTwoDCartesianZone( + zoneID: UShort, + zone: ZoneManagementClusterTwoDCartesianZoneStruct, + timedInvokeTimeout: Duration? = null, + ) { + val commandId: UInt = 2u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_ZONE_ID_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_ZONE_ID_REQ), zoneID) + + val TAG_ZONE_REQ: Int = 1 + zone.toTlv(ContextSpecificTag(TAG_ZONE_REQ), tlvWriter) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun getTwoDCartesianZone( + zoneID: UShort?, + timedInvokeTimeout: Duration? = null, + ): GetTwoDCartesianZoneResponse { + val commandId: UInt = 3u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_ZONE_ID_REQ: Int = 0 + zoneID?.let { tlvWriter.put(ContextSpecificTag(TAG_ZONE_ID_REQ), zoneID) } + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + + val tlvReader = TlvReader(response.payload) + tlvReader.enterStructure(AnonymousTag) + val TAG_ZONES: Int = 0 + var zones_decoded: List? = null + + while (!tlvReader.isEndOfContainer()) { + val tag = tlvReader.peekElement().tag + + if (tag == ContextSpecificTag(TAG_ZONES)) { + zones_decoded = + buildList { + tlvReader.enterArray(tag) + while (!tlvReader.isEndOfContainer()) { + add(ZoneManagementClusterTwoDCartesianZoneStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.skipElement() + } + } + + if (zones_decoded == null) { + throw IllegalStateException("zones not found in TLV") + } + + tlvReader.exitContainer() + + return GetTwoDCartesianZoneResponse(zones_decoded) + } + + suspend fun removeZone(zoneID: UShort, timedInvokeTimeout: Duration? = null) { + val commandId: UInt = 5u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_ZONE_ID_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_ZONE_ID_REQ), zoneID) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout, + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun readSupportedZoneSourcesAttribute(): SupportedZoneSourcesAttribute { + val ATTRIBUTE_ID: UInt = 0u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Supportedzonesources attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUByte(AnonymousTag)) + } + tlvReader.exitContainer() + } + + return SupportedZoneSourcesAttribute(decodedValue) + } + + suspend fun subscribeSupportedZoneSourcesAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 0u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + SupportedZoneSourcesAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Supportedzonesources attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUByte(AnonymousTag)) + } + tlvReader.exitContainer() + } + + emit(SupportedZoneSourcesAttributeSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(SupportedZoneSourcesAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readZonesAttribute(): ZonesAttribute { + val ATTRIBUTE_ID: UInt = 1u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Zones attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(ZoneManagementClusterZoneInformationStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + null + } + + return ZonesAttribute(decodedValue) + } + + suspend fun subscribeZonesAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 1u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + ZonesAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Zones attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(ZoneManagementClusterZoneInformationStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + null + } + + decodedValue?.let { emit(ZonesAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(ZonesAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readTimeControlAttribute(): TimeControlAttribute { + val ATTRIBUTE_ID: UInt = 2u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Timecontrol attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(ZoneManagementClusterZoneTriggeringTimeControlStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + return TimeControlAttribute(decodedValue) + } + + suspend fun writeTimeControlAttribute( + value: List, + timedWriteTimeout: Duration? = null, + ) { + val ATTRIBUTE_ID: UInt = 2u + + val tlvWriter = TlvWriter() + tlvWriter.startArray(AnonymousTag) + for (item in value.iterator()) { + item.toTlv(AnonymousTag, tlvWriter) + } + tlvWriter.endArray() + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeTimeControlAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 2u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + TimeControlAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Timecontrol attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add( + ZoneManagementClusterZoneTriggeringTimeControlStruct.fromTlv( + AnonymousTag, + tlvReader, + ) + ) + } + tlvReader.exitContainer() + } + + emit(TimeControlAttributeSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(TimeControlAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readSensitivityAttribute(): UByte { + val ATTRIBUTE_ID: UInt = 3u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Sensitivity attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte = tlvReader.getUByte(AnonymousTag) + + return decodedValue + } + + suspend fun writeSensitivityAttribute(value: UByte, timedWriteTimeout: Duration? = null) { + val ATTRIBUTE_ID: UInt = 3u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeSensitivityAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 3u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Sensitivity attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte = tlvReader.getUByte(AnonymousTag) + + emit(UByteSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { + val ATTRIBUTE_ID: UInt = 65528u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Generatedcommandlist attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + return GeneratedCommandListAttribute(decodedValue) + } + + suspend fun subscribeGeneratedCommandListAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 65528u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + GeneratedCommandListAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Generatedcommandlist attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + emit(GeneratedCommandListAttributeSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(GeneratedCommandListAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readAcceptedCommandListAttribute(): AcceptedCommandListAttribute { + val ATTRIBUTE_ID: UInt = 65529u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Acceptedcommandlist attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + return AcceptedCommandListAttribute(decodedValue) + } + + suspend fun subscribeAcceptedCommandListAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 65529u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + AcceptedCommandListAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Acceptedcommandlist attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + emit(AcceptedCommandListAttributeSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(AcceptedCommandListAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readEventListAttribute(): EventListAttribute { + val ATTRIBUTE_ID: UInt = 65530u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Eventlist attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + return EventListAttribute(decodedValue) + } + + suspend fun subscribeEventListAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 65530u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + EventListAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Eventlist attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + emit(EventListAttributeSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(EventListAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readAttributeListAttribute(): AttributeListAttribute { + val ATTRIBUTE_ID: UInt = 65531u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Attributelist attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + return AttributeListAttribute(decodedValue) + } + + suspend fun subscribeAttributeListAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 65531u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + AttributeListAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Attributelist attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + emit(AttributeListAttributeSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(AttributeListAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readFeatureMapAttribute(): UInt { + val ATTRIBUTE_ID: UInt = 65532u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Featuremap attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt = tlvReader.getUInt(AnonymousTag) + + return decodedValue + } + + suspend fun subscribeFeatureMapAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 65532u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UIntSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Featuremap attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt = tlvReader.getUInt(AnonymousTag) + + emit(UIntSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(UIntSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readClusterRevisionAttribute(): UShort { + val ATTRIBUTE_ID: UInt = 65533u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Clusterrevision attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UShort = tlvReader.getUShort(AnonymousTag) + + return decodedValue + } + + suspend fun subscribeClusterRevisionAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 65533u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UShortSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Clusterrevision attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UShort = tlvReader.getUShort(AnonymousTag) + + emit(UShortSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(UShortSubscriptionState.SubscriptionEstablished) + } + } + } + } + + companion object { + private val logger = Logger.getLogger(ZoneManagementCluster::class.java.name) + const val CLUSTER_ID: UInt = 1360u + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterAudioStreamChangedEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterAudioStreamChangedEvent.kt new file mode 100644 index 0000000000..c398f49796 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterAudioStreamChangedEvent.kt @@ -0,0 +1,144 @@ +/* + * + * 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. + */ +package matter.controller.cluster.eventstructs + +import java.util.Optional +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterAudioStreamChangedEvent( + val audioStreamID: UShort, + val streamType: Optional, + val audioCodec: Optional, + val channelCount: Optional, + val sampleRate: Optional, + val bitRate: Optional, + val bitDepth: Optional, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterAudioStreamChangedEvent {\n") + append("\taudioStreamID : $audioStreamID\n") + append("\tstreamType : $streamType\n") + append("\taudioCodec : $audioCodec\n") + append("\tchannelCount : $channelCount\n") + append("\tsampleRate : $sampleRate\n") + append("\tbitRate : $bitRate\n") + append("\tbitDepth : $bitDepth\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_AUDIO_STREAM_ID), audioStreamID) + if (streamType.isPresent) { + val optstreamType = streamType.get() + put(ContextSpecificTag(TAG_STREAM_TYPE), optstreamType) + } + if (audioCodec.isPresent) { + val optaudioCodec = audioCodec.get() + put(ContextSpecificTag(TAG_AUDIO_CODEC), optaudioCodec) + } + if (channelCount.isPresent) { + val optchannelCount = channelCount.get() + put(ContextSpecificTag(TAG_CHANNEL_COUNT), optchannelCount) + } + if (sampleRate.isPresent) { + val optsampleRate = sampleRate.get() + put(ContextSpecificTag(TAG_SAMPLE_RATE), optsampleRate) + } + if (bitRate.isPresent) { + val optbitRate = bitRate.get() + put(ContextSpecificTag(TAG_BIT_RATE), optbitRate) + } + if (bitDepth.isPresent) { + val optbitDepth = bitDepth.get() + put(ContextSpecificTag(TAG_BIT_DEPTH), optbitDepth) + } + endStructure() + } + } + + companion object { + private const val TAG_AUDIO_STREAM_ID = 0 + private const val TAG_STREAM_TYPE = 1 + private const val TAG_AUDIO_CODEC = 2 + private const val TAG_CHANNEL_COUNT = 3 + private const val TAG_SAMPLE_RATE = 4 + private const val TAG_BIT_RATE = 5 + private const val TAG_BIT_DEPTH = 6 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterAudioStreamChangedEvent { + tlvReader.enterStructure(tlvTag) + val audioStreamID = tlvReader.getUShort(ContextSpecificTag(TAG_AUDIO_STREAM_ID)) + val streamType = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STREAM_TYPE))) { + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_STREAM_TYPE))) + } else { + Optional.empty() + } + val audioCodec = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_AUDIO_CODEC))) { + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_AUDIO_CODEC))) + } else { + Optional.empty() + } + val channelCount = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CHANNEL_COUNT))) { + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_CHANNEL_COUNT))) + } else { + Optional.empty() + } + val sampleRate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SAMPLE_RATE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_SAMPLE_RATE))) + } else { + Optional.empty() + } + val bitRate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_BIT_RATE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_BIT_RATE))) + } else { + Optional.empty() + } + val bitDepth = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_BIT_DEPTH))) { + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_BIT_DEPTH))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterAudioStreamChangedEvent( + audioStreamID, + streamType, + audioCodec, + channelCount, + sampleRate, + bitRate, + bitDepth, + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterSnapshotStreamChangedEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterSnapshotStreamChangedEvent.kt new file mode 100644 index 0000000000..074df191c9 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterSnapshotStreamChangedEvent.kt @@ -0,0 +1,156 @@ +/* + * + * 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. + */ +package matter.controller.cluster.eventstructs + +import java.util.Optional +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterSnapshotStreamChangedEvent( + val snapshotStreamID: UShort, + val imageCodec: Optional, + val frameRate: Optional, + val bitRate: Optional, + val minResolution: + Optional< + matter.controller.cluster.structs.CameraAvStreamManagementClusterVideoResolutionStruct + >, + val maxResolution: + Optional< + matter.controller.cluster.structs.CameraAvStreamManagementClusterVideoResolutionStruct + >, + val quality: Optional, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterSnapshotStreamChangedEvent {\n") + append("\tsnapshotStreamID : $snapshotStreamID\n") + append("\timageCodec : $imageCodec\n") + append("\tframeRate : $frameRate\n") + append("\tbitRate : $bitRate\n") + append("\tminResolution : $minResolution\n") + append("\tmaxResolution : $maxResolution\n") + append("\tquality : $quality\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_SNAPSHOT_STREAM_ID), snapshotStreamID) + if (imageCodec.isPresent) { + val optimageCodec = imageCodec.get() + put(ContextSpecificTag(TAG_IMAGE_CODEC), optimageCodec) + } + if (frameRate.isPresent) { + val optframeRate = frameRate.get() + put(ContextSpecificTag(TAG_FRAME_RATE), optframeRate) + } + if (bitRate.isPresent) { + val optbitRate = bitRate.get() + put(ContextSpecificTag(TAG_BIT_RATE), optbitRate) + } + if (minResolution.isPresent) { + val optminResolution = minResolution.get() + optminResolution.toTlv(ContextSpecificTag(TAG_MIN_RESOLUTION), this) + } + if (maxResolution.isPresent) { + val optmaxResolution = maxResolution.get() + optmaxResolution.toTlv(ContextSpecificTag(TAG_MAX_RESOLUTION), this) + } + if (quality.isPresent) { + val optquality = quality.get() + put(ContextSpecificTag(TAG_QUALITY), optquality) + } + endStructure() + } + } + + companion object { + private const val TAG_SNAPSHOT_STREAM_ID = 0 + private const val TAG_IMAGE_CODEC = 1 + private const val TAG_FRAME_RATE = 2 + private const val TAG_BIT_RATE = 3 + private const val TAG_MIN_RESOLUTION = 4 + private const val TAG_MAX_RESOLUTION = 5 + private const val TAG_QUALITY = 6 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterSnapshotStreamChangedEvent { + tlvReader.enterStructure(tlvTag) + val snapshotStreamID = tlvReader.getUShort(ContextSpecificTag(TAG_SNAPSHOT_STREAM_ID)) + val imageCodec = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMAGE_CODEC))) { + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_IMAGE_CODEC))) + } else { + Optional.empty() + } + val frameRate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_FRAME_RATE))) { + Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_FRAME_RATE))) + } else { + Optional.empty() + } + val bitRate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_BIT_RATE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_BIT_RATE))) + } else { + Optional.empty() + } + val minResolution = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_RESOLUTION))) { + Optional.of( + matter.controller.cluster.structs.CameraAvStreamManagementClusterVideoResolutionStruct + .fromTlv(ContextSpecificTag(TAG_MIN_RESOLUTION), tlvReader) + ) + } else { + Optional.empty() + } + val maxResolution = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_RESOLUTION))) { + Optional.of( + matter.controller.cluster.structs.CameraAvStreamManagementClusterVideoResolutionStruct + .fromTlv(ContextSpecificTag(TAG_MAX_RESOLUTION), tlvReader) + ) + } else { + Optional.empty() + } + val quality = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_QUALITY))) { + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_QUALITY))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterSnapshotStreamChangedEvent( + snapshotStreamID, + imageCodec, + frameRate, + bitRate, + minResolution, + maxResolution, + quality, + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterVideoStreamChangedEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterVideoStreamChangedEvent.kt new file mode 100644 index 0000000000..c618556cd5 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterVideoStreamChangedEvent.kt @@ -0,0 +1,212 @@ +/* + * + * 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. + */ +package matter.controller.cluster.eventstructs + +import java.util.Optional +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterVideoStreamChangedEvent( + val videoStreamID: UShort, + val streamType: Optional, + val videoCodec: Optional, + val minFrameRate: Optional, + val maxFrameRate: Optional, + val minResolution: + Optional< + matter.controller.cluster.structs.CameraAvStreamManagementClusterVideoResolutionStruct + >, + val maxResolution: + Optional< + matter.controller.cluster.structs.CameraAvStreamManagementClusterVideoResolutionStruct + >, + val minBitRate: Optional, + val maxBitRate: Optional, + val minFragmentLen: Optional, + val maxFragmentLen: Optional, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterVideoStreamChangedEvent {\n") + append("\tvideoStreamID : $videoStreamID\n") + append("\tstreamType : $streamType\n") + append("\tvideoCodec : $videoCodec\n") + append("\tminFrameRate : $minFrameRate\n") + append("\tmaxFrameRate : $maxFrameRate\n") + append("\tminResolution : $minResolution\n") + append("\tmaxResolution : $maxResolution\n") + append("\tminBitRate : $minBitRate\n") + append("\tmaxBitRate : $maxBitRate\n") + append("\tminFragmentLen : $minFragmentLen\n") + append("\tmaxFragmentLen : $maxFragmentLen\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), videoStreamID) + if (streamType.isPresent) { + val optstreamType = streamType.get() + put(ContextSpecificTag(TAG_STREAM_TYPE), optstreamType) + } + if (videoCodec.isPresent) { + val optvideoCodec = videoCodec.get() + put(ContextSpecificTag(TAG_VIDEO_CODEC), optvideoCodec) + } + if (minFrameRate.isPresent) { + val optminFrameRate = minFrameRate.get() + put(ContextSpecificTag(TAG_MIN_FRAME_RATE), optminFrameRate) + } + if (maxFrameRate.isPresent) { + val optmaxFrameRate = maxFrameRate.get() + put(ContextSpecificTag(TAG_MAX_FRAME_RATE), optmaxFrameRate) + } + if (minResolution.isPresent) { + val optminResolution = minResolution.get() + optminResolution.toTlv(ContextSpecificTag(TAG_MIN_RESOLUTION), this) + } + if (maxResolution.isPresent) { + val optmaxResolution = maxResolution.get() + optmaxResolution.toTlv(ContextSpecificTag(TAG_MAX_RESOLUTION), this) + } + if (minBitRate.isPresent) { + val optminBitRate = minBitRate.get() + put(ContextSpecificTag(TAG_MIN_BIT_RATE), optminBitRate) + } + if (maxBitRate.isPresent) { + val optmaxBitRate = maxBitRate.get() + put(ContextSpecificTag(TAG_MAX_BIT_RATE), optmaxBitRate) + } + if (minFragmentLen.isPresent) { + val optminFragmentLen = minFragmentLen.get() + put(ContextSpecificTag(TAG_MIN_FRAGMENT_LEN), optminFragmentLen) + } + if (maxFragmentLen.isPresent) { + val optmaxFragmentLen = maxFragmentLen.get() + put(ContextSpecificTag(TAG_MAX_FRAGMENT_LEN), optmaxFragmentLen) + } + endStructure() + } + } + + companion object { + private const val TAG_VIDEO_STREAM_ID = 0 + private const val TAG_STREAM_TYPE = 1 + private const val TAG_VIDEO_CODEC = 2 + private const val TAG_MIN_FRAME_RATE = 3 + private const val TAG_MAX_FRAME_RATE = 4 + private const val TAG_MIN_RESOLUTION = 5 + private const val TAG_MAX_RESOLUTION = 6 + private const val TAG_MIN_BIT_RATE = 7 + private const val TAG_MAX_BIT_RATE = 8 + private const val TAG_MIN_FRAGMENT_LEN = 9 + private const val TAG_MAX_FRAGMENT_LEN = 10 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterVideoStreamChangedEvent { + tlvReader.enterStructure(tlvTag) + val videoStreamID = tlvReader.getUShort(ContextSpecificTag(TAG_VIDEO_STREAM_ID)) + val streamType = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STREAM_TYPE))) { + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_STREAM_TYPE))) + } else { + Optional.empty() + } + val videoCodec = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_VIDEO_CODEC))) { + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_VIDEO_CODEC))) + } else { + Optional.empty() + } + val minFrameRate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_FRAME_RATE))) { + Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_MIN_FRAME_RATE))) + } else { + Optional.empty() + } + val maxFrameRate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_FRAME_RATE))) { + Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_MAX_FRAME_RATE))) + } else { + Optional.empty() + } + val minResolution = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_RESOLUTION))) { + Optional.of( + matter.controller.cluster.structs.CameraAvStreamManagementClusterVideoResolutionStruct + .fromTlv(ContextSpecificTag(TAG_MIN_RESOLUTION), tlvReader) + ) + } else { + Optional.empty() + } + val maxResolution = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_RESOLUTION))) { + Optional.of( + matter.controller.cluster.structs.CameraAvStreamManagementClusterVideoResolutionStruct + .fromTlv(ContextSpecificTag(TAG_MAX_RESOLUTION), tlvReader) + ) + } else { + Optional.empty() + } + val minBitRate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_BIT_RATE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MIN_BIT_RATE))) + } else { + Optional.empty() + } + val maxBitRate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_BIT_RATE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MAX_BIT_RATE))) + } else { + Optional.empty() + } + val minFragmentLen = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MIN_FRAGMENT_LEN))) { + Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_MIN_FRAGMENT_LEN))) + } else { + Optional.empty() + } + val maxFragmentLen = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MAX_FRAGMENT_LEN))) { + Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_MAX_FRAGMENT_LEN))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterVideoStreamChangedEvent( + videoStreamID, + streamType, + videoCodec, + minFrameRate, + maxFrameRate, + minResolution, + maxResolution, + minBitRate, + maxBitRate, + minFragmentLen, + maxFragmentLen, + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/ZoneManagementClusterZoneStoppedEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/ZoneManagementClusterZoneStoppedEvent.kt new file mode 100644 index 0000000000..424437cf89 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/ZoneManagementClusterZoneStoppedEvent.kt @@ -0,0 +1,68 @@ +/* + * + * 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. + */ +package matter.controller.cluster.eventstructs + +import matter.controller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ZoneManagementClusterZoneStoppedEvent(val zones: List, val reason: UByte) { + override fun toString(): String = buildString { + append("ZoneManagementClusterZoneStoppedEvent {\n") + append("\tzones : $zones\n") + append("\treason : $reason\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_ZONES)) + for (item in zones.iterator()) { + put(AnonymousTag, item) + } + endArray() + put(ContextSpecificTag(TAG_REASON), reason) + endStructure() + } + } + + companion object { + private const val TAG_ZONES = 0 + private const val TAG_REASON = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ZoneManagementClusterZoneStoppedEvent { + tlvReader.enterStructure(tlvTag) + val zones = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ZONES)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUShort(AnonymousTag)) + } + tlvReader.exitContainer() + } + val reason = tlvReader.getUByte(ContextSpecificTag(TAG_REASON)) + + tlvReader.exitContainer() + + return ZoneManagementClusterZoneStoppedEvent(zones, reason) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/ZoneManagementClusterZoneTriggeredEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/ZoneManagementClusterZoneTriggeredEvent.kt new file mode 100644 index 0000000000..42300fd350 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/ZoneManagementClusterZoneTriggeredEvent.kt @@ -0,0 +1,68 @@ +/* + * + * 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. + */ +package matter.controller.cluster.eventstructs + +import matter.controller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ZoneManagementClusterZoneTriggeredEvent(val zones: List, val reason: UByte) { + override fun toString(): String = buildString { + append("ZoneManagementClusterZoneTriggeredEvent {\n") + append("\tzones : $zones\n") + append("\treason : $reason\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_ZONES)) + for (item in zones.iterator()) { + put(AnonymousTag, item) + } + endArray() + put(ContextSpecificTag(TAG_REASON), reason) + endStructure() + } + } + + companion object { + private const val TAG_ZONES = 0 + private const val TAG_REASON = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ZoneManagementClusterZoneTriggeredEvent { + tlvReader.enterStructure(tlvTag) + val zones = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ZONES)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUShort(AnonymousTag)) + } + tlvReader.exitContainer() + } + val reason = tlvReader.getUByte(ContextSpecificTag(TAG_REASON)) + + tlvReader.exitContainer() + + return ZoneManagementClusterZoneTriggeredEvent(zones, reason) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/files.gni b/src/controller/java/generated/java/matter/controller/cluster/files.gni index 6a7e5b317e..15406011f7 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/files.gni +++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni @@ -19,6 +19,15 @@ matter_structs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/BindingClusterTargetStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterAudioCapabilitiesStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterAudioStreamStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterSnapshotParamsStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterSnapshotStreamStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterVideoResolutionStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterVideoSensorParamsStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterVideoStreamStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterViewportStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ChannelClusterAdditionalInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ChannelClusterChannelInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ChannelClusterChannelPagingStruct.kt", @@ -162,6 +171,12 @@ matter_structs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/WaterHeaterModeClusterModeTagStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportProviderClusterICEServerStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportProviderClusterWebRTCSessionStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportRequestorClusterICEServerStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportRequestorClusterWebRTCSessionStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ZoneManagementClusterTwoDCartesianVertexStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ZoneManagementClusterTwoDCartesianZoneStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ZoneManagementClusterZoneInformationStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ZoneManagementClusterZoneTriggeringTimeControlStruct.kt", ] matter_eventstructs_sources = [ @@ -180,6 +195,9 @@ matter_eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/BridgedDeviceBasicInformationClusterActiveChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterAudioStreamChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterSnapshotStreamChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CameraAvStreamManagementClusterVideoStreamChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CommissionerControlClusterCommissioningRequestResultEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/DeviceEnergyManagementClusterPowerAdjustEndEvent.kt", @@ -249,6 +267,8 @@ matter_eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/ZoneManagementClusterZoneStoppedEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/ZoneManagementClusterZoneTriggeredEvent.kt", ] matter_clusters_sources = [ @@ -267,6 +287,7 @@ matter_clusters_sources = [ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/BooleanStateCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/BooleanStateConfigurationCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvStreamManagementCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/CarbonDioxideConcentrationMeasurementCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/CarbonMonoxideConcentrationMeasurementCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ChannelCluster.kt", @@ -373,7 +394,9 @@ matter_clusters_sources = [ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/WaterHeaterManagementCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/WaterHeaterModeCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/WebRTCTransportProviderCluster.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/WebRTCTransportRequestorCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/WiFiNetworkDiagnosticsCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/WiFiNetworkManagementCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/WindowCoveringCluster.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ZoneManagementCluster.kt", ] \ No newline at end of file diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterAudioCapabilitiesStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterAudioCapabilitiesStruct.kt new file mode 100644 index 0000000000..89db650126 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterAudioCapabilitiesStruct.kt @@ -0,0 +1,111 @@ +/* + * + * 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. + */ +package matter.controller.cluster.structs + +import matter.controller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterAudioCapabilitiesStruct( + val maxNumberOfChannels: UByte, + val supportedCodecs: List, + val supportedSampleRates: List, + val supportedBitDepths: List, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterAudioCapabilitiesStruct {\n") + append("\tmaxNumberOfChannels : $maxNumberOfChannels\n") + append("\tsupportedCodecs : $supportedCodecs\n") + append("\tsupportedSampleRates : $supportedSampleRates\n") + append("\tsupportedBitDepths : $supportedBitDepths\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_MAX_NUMBER_OF_CHANNELS), maxNumberOfChannels) + startArray(ContextSpecificTag(TAG_SUPPORTED_CODECS)) + for (item in supportedCodecs.iterator()) { + put(AnonymousTag, item) + } + endArray() + startArray(ContextSpecificTag(TAG_SUPPORTED_SAMPLE_RATES)) + for (item in supportedSampleRates.iterator()) { + put(AnonymousTag, item) + } + endArray() + startArray(ContextSpecificTag(TAG_SUPPORTED_BIT_DEPTHS)) + for (item in supportedBitDepths.iterator()) { + put(AnonymousTag, item) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_MAX_NUMBER_OF_CHANNELS = 0 + private const val TAG_SUPPORTED_CODECS = 1 + private const val TAG_SUPPORTED_SAMPLE_RATES = 2 + private const val TAG_SUPPORTED_BIT_DEPTHS = 3 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterAudioCapabilitiesStruct { + tlvReader.enterStructure(tlvTag) + val maxNumberOfChannels = tlvReader.getUByte(ContextSpecificTag(TAG_MAX_NUMBER_OF_CHANNELS)) + val supportedCodecs = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_SUPPORTED_CODECS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUByte(AnonymousTag)) + } + tlvReader.exitContainer() + } + val supportedSampleRates = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_SUPPORTED_SAMPLE_RATES)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val supportedBitDepths = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_SUPPORTED_BIT_DEPTHS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUByte(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterAudioCapabilitiesStruct( + maxNumberOfChannels, + supportedCodecs, + supportedSampleRates, + supportedBitDepths, + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterAudioStreamStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterAudioStreamStruct.kt new file mode 100644 index 0000000000..0ede21e0d3 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterAudioStreamStruct.kt @@ -0,0 +1,101 @@ +/* + * + * 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. + */ +package matter.controller.cluster.structs + +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterAudioStreamStruct( + val audioStreamID: UShort, + val streamType: UByte, + val audioCodec: UByte, + val channelCount: UByte, + val sampleRate: UInt, + val bitRate: UInt, + val bitDepth: UByte, + val referenceCount: UByte, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterAudioStreamStruct {\n") + append("\taudioStreamID : $audioStreamID\n") + append("\tstreamType : $streamType\n") + append("\taudioCodec : $audioCodec\n") + append("\tchannelCount : $channelCount\n") + append("\tsampleRate : $sampleRate\n") + append("\tbitRate : $bitRate\n") + append("\tbitDepth : $bitDepth\n") + append("\treferenceCount : $referenceCount\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_AUDIO_STREAM_ID), audioStreamID) + put(ContextSpecificTag(TAG_STREAM_TYPE), streamType) + put(ContextSpecificTag(TAG_AUDIO_CODEC), audioCodec) + put(ContextSpecificTag(TAG_CHANNEL_COUNT), channelCount) + put(ContextSpecificTag(TAG_SAMPLE_RATE), sampleRate) + put(ContextSpecificTag(TAG_BIT_RATE), bitRate) + put(ContextSpecificTag(TAG_BIT_DEPTH), bitDepth) + put(ContextSpecificTag(TAG_REFERENCE_COUNT), referenceCount) + endStructure() + } + } + + companion object { + private const val TAG_AUDIO_STREAM_ID = 0 + private const val TAG_STREAM_TYPE = 1 + private const val TAG_AUDIO_CODEC = 2 + private const val TAG_CHANNEL_COUNT = 3 + private const val TAG_SAMPLE_RATE = 4 + private const val TAG_BIT_RATE = 5 + private const val TAG_BIT_DEPTH = 6 + private const val TAG_REFERENCE_COUNT = 7 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterAudioStreamStruct { + tlvReader.enterStructure(tlvTag) + val audioStreamID = tlvReader.getUShort(ContextSpecificTag(TAG_AUDIO_STREAM_ID)) + val streamType = tlvReader.getUByte(ContextSpecificTag(TAG_STREAM_TYPE)) + val audioCodec = tlvReader.getUByte(ContextSpecificTag(TAG_AUDIO_CODEC)) + val channelCount = tlvReader.getUByte(ContextSpecificTag(TAG_CHANNEL_COUNT)) + val sampleRate = tlvReader.getUInt(ContextSpecificTag(TAG_SAMPLE_RATE)) + val bitRate = tlvReader.getUInt(ContextSpecificTag(TAG_BIT_RATE)) + val bitDepth = tlvReader.getUByte(ContextSpecificTag(TAG_BIT_DEPTH)) + val referenceCount = tlvReader.getUByte(ContextSpecificTag(TAG_REFERENCE_COUNT)) + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterAudioStreamStruct( + audioStreamID, + streamType, + audioCodec, + channelCount, + sampleRate, + bitRate, + bitDepth, + referenceCount, + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct.kt new file mode 100644 index 0000000000..b6d493446b --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct.kt @@ -0,0 +1,75 @@ +/* + * + * 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. + */ +package matter.controller.cluster.structs + +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct( + val codec: UByte, + val resolution: CameraAvStreamManagementClusterVideoResolutionStruct, + val minBitRate: UInt, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct {\n") + append("\tcodec : $codec\n") + append("\tresolution : $resolution\n") + append("\tminBitRate : $minBitRate\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_CODEC), codec) + resolution.toTlv(ContextSpecificTag(TAG_RESOLUTION), this) + put(ContextSpecificTag(TAG_MIN_BIT_RATE), minBitRate) + endStructure() + } + } + + companion object { + private const val TAG_CODEC = 0 + private const val TAG_RESOLUTION = 1 + private const val TAG_MIN_BIT_RATE = 2 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct { + tlvReader.enterStructure(tlvTag) + val codec = tlvReader.getUByte(ContextSpecificTag(TAG_CODEC)) + val resolution = + CameraAvStreamManagementClusterVideoResolutionStruct.fromTlv( + ContextSpecificTag(TAG_RESOLUTION), + tlvReader, + ) + val minBitRate = tlvReader.getUInt(ContextSpecificTag(TAG_MIN_BIT_RATE)) + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct( + codec, + resolution, + minBitRate, + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterSnapshotParamsStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterSnapshotParamsStruct.kt new file mode 100644 index 0000000000..5f639597bc --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterSnapshotParamsStruct.kt @@ -0,0 +1,75 @@ +/* + * + * 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. + */ +package matter.controller.cluster.structs + +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterSnapshotParamsStruct( + val resolution: CameraAvStreamManagementClusterVideoResolutionStruct, + val maxFrameRate: UShort, + val imageCodec: UByte, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterSnapshotParamsStruct {\n") + append("\tresolution : $resolution\n") + append("\tmaxFrameRate : $maxFrameRate\n") + append("\timageCodec : $imageCodec\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + resolution.toTlv(ContextSpecificTag(TAG_RESOLUTION), this) + put(ContextSpecificTag(TAG_MAX_FRAME_RATE), maxFrameRate) + put(ContextSpecificTag(TAG_IMAGE_CODEC), imageCodec) + endStructure() + } + } + + companion object { + private const val TAG_RESOLUTION = 0 + private const val TAG_MAX_FRAME_RATE = 1 + private const val TAG_IMAGE_CODEC = 2 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterSnapshotParamsStruct { + tlvReader.enterStructure(tlvTag) + val resolution = + CameraAvStreamManagementClusterVideoResolutionStruct.fromTlv( + ContextSpecificTag(TAG_RESOLUTION), + tlvReader, + ) + val maxFrameRate = tlvReader.getUShort(ContextSpecificTag(TAG_MAX_FRAME_RATE)) + val imageCodec = tlvReader.getUByte(ContextSpecificTag(TAG_IMAGE_CODEC)) + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterSnapshotParamsStruct( + resolution, + maxFrameRate, + imageCodec, + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterSnapshotStreamStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterSnapshotStreamStruct.kt new file mode 100644 index 0000000000..8e98459d04 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterSnapshotStreamStruct.kt @@ -0,0 +1,109 @@ +/* + * + * 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. + */ +package matter.controller.cluster.structs + +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterSnapshotStreamStruct( + val snapshotStreamID: UShort, + val imageCodec: UByte, + val frameRate: UShort, + val bitRate: UInt, + val minResolution: CameraAvStreamManagementClusterVideoResolutionStruct, + val maxResolution: CameraAvStreamManagementClusterVideoResolutionStruct, + val quality: UByte, + val referenceCount: UByte, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterSnapshotStreamStruct {\n") + append("\tsnapshotStreamID : $snapshotStreamID\n") + append("\timageCodec : $imageCodec\n") + append("\tframeRate : $frameRate\n") + append("\tbitRate : $bitRate\n") + append("\tminResolution : $minResolution\n") + append("\tmaxResolution : $maxResolution\n") + append("\tquality : $quality\n") + append("\treferenceCount : $referenceCount\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_SNAPSHOT_STREAM_ID), snapshotStreamID) + put(ContextSpecificTag(TAG_IMAGE_CODEC), imageCodec) + put(ContextSpecificTag(TAG_FRAME_RATE), frameRate) + put(ContextSpecificTag(TAG_BIT_RATE), bitRate) + minResolution.toTlv(ContextSpecificTag(TAG_MIN_RESOLUTION), this) + maxResolution.toTlv(ContextSpecificTag(TAG_MAX_RESOLUTION), this) + put(ContextSpecificTag(TAG_QUALITY), quality) + put(ContextSpecificTag(TAG_REFERENCE_COUNT), referenceCount) + endStructure() + } + } + + companion object { + private const val TAG_SNAPSHOT_STREAM_ID = 0 + private const val TAG_IMAGE_CODEC = 1 + private const val TAG_FRAME_RATE = 2 + private const val TAG_BIT_RATE = 3 + private const val TAG_MIN_RESOLUTION = 4 + private const val TAG_MAX_RESOLUTION = 5 + private const val TAG_QUALITY = 6 + private const val TAG_REFERENCE_COUNT = 7 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterSnapshotStreamStruct { + tlvReader.enterStructure(tlvTag) + val snapshotStreamID = tlvReader.getUShort(ContextSpecificTag(TAG_SNAPSHOT_STREAM_ID)) + val imageCodec = tlvReader.getUByte(ContextSpecificTag(TAG_IMAGE_CODEC)) + val frameRate = tlvReader.getUShort(ContextSpecificTag(TAG_FRAME_RATE)) + val bitRate = tlvReader.getUInt(ContextSpecificTag(TAG_BIT_RATE)) + val minResolution = + CameraAvStreamManagementClusterVideoResolutionStruct.fromTlv( + ContextSpecificTag(TAG_MIN_RESOLUTION), + tlvReader, + ) + val maxResolution = + CameraAvStreamManagementClusterVideoResolutionStruct.fromTlv( + ContextSpecificTag(TAG_MAX_RESOLUTION), + tlvReader, + ) + val quality = tlvReader.getUByte(ContextSpecificTag(TAG_QUALITY)) + val referenceCount = tlvReader.getUByte(ContextSpecificTag(TAG_REFERENCE_COUNT)) + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterSnapshotStreamStruct( + snapshotStreamID, + imageCodec, + frameRate, + bitRate, + minResolution, + maxResolution, + quality, + referenceCount, + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterVideoResolutionStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterVideoResolutionStruct.kt new file mode 100644 index 0000000000..4e15313837 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterVideoResolutionStruct.kt @@ -0,0 +1,59 @@ +/* + * + * 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. + */ +package matter.controller.cluster.structs + +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterVideoResolutionStruct(val width: UShort, val height: UShort) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterVideoResolutionStruct {\n") + append("\twidth : $width\n") + append("\theight : $height\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_WIDTH), width) + put(ContextSpecificTag(TAG_HEIGHT), height) + endStructure() + } + } + + companion object { + private const val TAG_WIDTH = 0 + private const val TAG_HEIGHT = 1 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterVideoResolutionStruct { + tlvReader.enterStructure(tlvTag) + val width = tlvReader.getUShort(ContextSpecificTag(TAG_WIDTH)) + val height = tlvReader.getUShort(ContextSpecificTag(TAG_HEIGHT)) + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterVideoResolutionStruct(width, height) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterVideoSensorParamsStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterVideoSensorParamsStruct.kt new file mode 100644 index 0000000000..5cf6052a75 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterVideoSensorParamsStruct.kt @@ -0,0 +1,83 @@ +/* + * + * 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. + */ +package matter.controller.cluster.structs + +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterVideoSensorParamsStruct( + val sensorWidth: UShort, + val sensorHeight: UShort, + val HDRCapable: Boolean, + val maxFPS: UShort, + val maxHDRFPS: UShort, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterVideoSensorParamsStruct {\n") + append("\tsensorWidth : $sensorWidth\n") + append("\tsensorHeight : $sensorHeight\n") + append("\tHDRCapable : $HDRCapable\n") + append("\tmaxFPS : $maxFPS\n") + append("\tmaxHDRFPS : $maxHDRFPS\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_SENSOR_WIDTH), sensorWidth) + put(ContextSpecificTag(TAG_SENSOR_HEIGHT), sensorHeight) + put(ContextSpecificTag(TAG_HDR_CAPABLE), HDRCapable) + put(ContextSpecificTag(TAG_MAX_FPS), maxFPS) + put(ContextSpecificTag(TAG_MAX_HDRFPS), maxHDRFPS) + endStructure() + } + } + + companion object { + private const val TAG_SENSOR_WIDTH = 0 + private const val TAG_SENSOR_HEIGHT = 1 + private const val TAG_HDR_CAPABLE = 2 + private const val TAG_MAX_FPS = 3 + private const val TAG_MAX_HDRFPS = 4 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterVideoSensorParamsStruct { + tlvReader.enterStructure(tlvTag) + val sensorWidth = tlvReader.getUShort(ContextSpecificTag(TAG_SENSOR_WIDTH)) + val sensorHeight = tlvReader.getUShort(ContextSpecificTag(TAG_SENSOR_HEIGHT)) + val HDRCapable = tlvReader.getBoolean(ContextSpecificTag(TAG_HDR_CAPABLE)) + val maxFPS = tlvReader.getUShort(ContextSpecificTag(TAG_MAX_FPS)) + val maxHDRFPS = tlvReader.getUShort(ContextSpecificTag(TAG_MAX_HDRFPS)) + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterVideoSensorParamsStruct( + sensorWidth, + sensorHeight, + HDRCapable, + maxFPS, + maxHDRFPS, + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterVideoStreamStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterVideoStreamStruct.kt new file mode 100644 index 0000000000..65941f8ba5 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterVideoStreamStruct.kt @@ -0,0 +1,162 @@ +/* + * + * 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. + */ +package matter.controller.cluster.structs + +import java.util.Optional +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterVideoStreamStruct( + val videoStreamID: UShort, + val streamType: UByte, + val videoCodec: UByte, + val minFrameRate: UShort, + val maxFrameRate: UShort, + val minResolution: CameraAvStreamManagementClusterVideoResolutionStruct, + val maxResolution: CameraAvStreamManagementClusterVideoResolutionStruct, + val minBitRate: UInt, + val maxBitRate: UInt, + val minFragmentLen: UShort, + val maxFragmentLen: UShort, + val watermarkEnabled: Optional, + val OSDEnabled: Optional, + val referenceCount: UByte, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterVideoStreamStruct {\n") + append("\tvideoStreamID : $videoStreamID\n") + append("\tstreamType : $streamType\n") + append("\tvideoCodec : $videoCodec\n") + append("\tminFrameRate : $minFrameRate\n") + append("\tmaxFrameRate : $maxFrameRate\n") + append("\tminResolution : $minResolution\n") + append("\tmaxResolution : $maxResolution\n") + append("\tminBitRate : $minBitRate\n") + append("\tmaxBitRate : $maxBitRate\n") + append("\tminFragmentLen : $minFragmentLen\n") + append("\tmaxFragmentLen : $maxFragmentLen\n") + append("\twatermarkEnabled : $watermarkEnabled\n") + append("\tOSDEnabled : $OSDEnabled\n") + append("\treferenceCount : $referenceCount\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), videoStreamID) + put(ContextSpecificTag(TAG_STREAM_TYPE), streamType) + put(ContextSpecificTag(TAG_VIDEO_CODEC), videoCodec) + put(ContextSpecificTag(TAG_MIN_FRAME_RATE), minFrameRate) + put(ContextSpecificTag(TAG_MAX_FRAME_RATE), maxFrameRate) + minResolution.toTlv(ContextSpecificTag(TAG_MIN_RESOLUTION), this) + maxResolution.toTlv(ContextSpecificTag(TAG_MAX_RESOLUTION), this) + put(ContextSpecificTag(TAG_MIN_BIT_RATE), minBitRate) + put(ContextSpecificTag(TAG_MAX_BIT_RATE), maxBitRate) + put(ContextSpecificTag(TAG_MIN_FRAGMENT_LEN), minFragmentLen) + put(ContextSpecificTag(TAG_MAX_FRAGMENT_LEN), maxFragmentLen) + if (watermarkEnabled.isPresent) { + val optwatermarkEnabled = watermarkEnabled.get() + put(ContextSpecificTag(TAG_WATERMARK_ENABLED), optwatermarkEnabled) + } + if (OSDEnabled.isPresent) { + val optOSDEnabled = OSDEnabled.get() + put(ContextSpecificTag(TAG_OSD_ENABLED), optOSDEnabled) + } + put(ContextSpecificTag(TAG_REFERENCE_COUNT), referenceCount) + endStructure() + } + } + + companion object { + private const val TAG_VIDEO_STREAM_ID = 0 + private const val TAG_STREAM_TYPE = 1 + private const val TAG_VIDEO_CODEC = 2 + private const val TAG_MIN_FRAME_RATE = 3 + private const val TAG_MAX_FRAME_RATE = 4 + private const val TAG_MIN_RESOLUTION = 5 + private const val TAG_MAX_RESOLUTION = 6 + private const val TAG_MIN_BIT_RATE = 7 + private const val TAG_MAX_BIT_RATE = 8 + private const val TAG_MIN_FRAGMENT_LEN = 9 + private const val TAG_MAX_FRAGMENT_LEN = 10 + private const val TAG_WATERMARK_ENABLED = 11 + private const val TAG_OSD_ENABLED = 12 + private const val TAG_REFERENCE_COUNT = 13 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): CameraAvStreamManagementClusterVideoStreamStruct { + tlvReader.enterStructure(tlvTag) + val videoStreamID = tlvReader.getUShort(ContextSpecificTag(TAG_VIDEO_STREAM_ID)) + val streamType = tlvReader.getUByte(ContextSpecificTag(TAG_STREAM_TYPE)) + val videoCodec = tlvReader.getUByte(ContextSpecificTag(TAG_VIDEO_CODEC)) + val minFrameRate = tlvReader.getUShort(ContextSpecificTag(TAG_MIN_FRAME_RATE)) + val maxFrameRate = tlvReader.getUShort(ContextSpecificTag(TAG_MAX_FRAME_RATE)) + val minResolution = + CameraAvStreamManagementClusterVideoResolutionStruct.fromTlv( + ContextSpecificTag(TAG_MIN_RESOLUTION), + tlvReader, + ) + val maxResolution = + CameraAvStreamManagementClusterVideoResolutionStruct.fromTlv( + ContextSpecificTag(TAG_MAX_RESOLUTION), + tlvReader, + ) + val minBitRate = tlvReader.getUInt(ContextSpecificTag(TAG_MIN_BIT_RATE)) + val maxBitRate = tlvReader.getUInt(ContextSpecificTag(TAG_MAX_BIT_RATE)) + val minFragmentLen = tlvReader.getUShort(ContextSpecificTag(TAG_MIN_FRAGMENT_LEN)) + val maxFragmentLen = tlvReader.getUShort(ContextSpecificTag(TAG_MAX_FRAGMENT_LEN)) + val watermarkEnabled = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_WATERMARK_ENABLED))) { + Optional.of(tlvReader.getBoolean(ContextSpecificTag(TAG_WATERMARK_ENABLED))) + } else { + Optional.empty() + } + val OSDEnabled = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OSD_ENABLED))) { + Optional.of(tlvReader.getBoolean(ContextSpecificTag(TAG_OSD_ENABLED))) + } else { + Optional.empty() + } + val referenceCount = tlvReader.getUByte(ContextSpecificTag(TAG_REFERENCE_COUNT)) + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterVideoStreamStruct( + videoStreamID, + streamType, + videoCodec, + minFrameRate, + maxFrameRate, + minResolution, + maxResolution, + minBitRate, + maxBitRate, + minFragmentLen, + maxFragmentLen, + watermarkEnabled, + OSDEnabled, + referenceCount, + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterViewportStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterViewportStruct.kt new file mode 100644 index 0000000000..f89dac2b39 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CameraAvStreamManagementClusterViewportStruct.kt @@ -0,0 +1,69 @@ +/* + * + * 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. + */ +package matter.controller.cluster.structs + +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class CameraAvStreamManagementClusterViewportStruct( + val x1: UShort, + val y1: UShort, + val x2: UShort, + val y2: UShort, +) { + override fun toString(): String = buildString { + append("CameraAvStreamManagementClusterViewportStruct {\n") + append("\tx1 : $x1\n") + append("\ty1 : $y1\n") + append("\tx2 : $x2\n") + append("\ty2 : $y2\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_X1), x1) + put(ContextSpecificTag(TAG_Y1), y1) + put(ContextSpecificTag(TAG_X2), x2) + put(ContextSpecificTag(TAG_Y2), y2) + endStructure() + } + } + + companion object { + private const val TAG_X1 = 0 + private const val TAG_Y1 = 1 + private const val TAG_X2 = 2 + private const val TAG_Y2 = 3 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CameraAvStreamManagementClusterViewportStruct { + tlvReader.enterStructure(tlvTag) + val x1 = tlvReader.getUShort(ContextSpecificTag(TAG_X1)) + val y1 = tlvReader.getUShort(ContextSpecificTag(TAG_Y1)) + val x2 = tlvReader.getUShort(ContextSpecificTag(TAG_X2)) + val y2 = tlvReader.getUShort(ContextSpecificTag(TAG_Y2)) + + tlvReader.exitContainer() + + return CameraAvStreamManagementClusterViewportStruct(x1, y1, x2, y2) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportRequestorClusterICEServerStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportRequestorClusterICEServerStruct.kt new file mode 100644 index 0000000000..c7b5e5ef27 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportRequestorClusterICEServerStruct.kt @@ -0,0 +1,106 @@ +/* + * + * 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. + */ +package matter.controller.cluster.structs + +import java.util.Optional +import matter.controller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class WebRTCTransportRequestorClusterICEServerStruct( + val urls: List, + val username: Optional, + val credential: Optional, + val caid: Optional, +) { + override fun toString(): String = buildString { + append("WebRTCTransportRequestorClusterICEServerStruct {\n") + append("\turls : $urls\n") + append("\tusername : $username\n") + append("\tcredential : $credential\n") + append("\tcaid : $caid\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_URLS)) + for (item in urls.iterator()) { + put(AnonymousTag, item) + } + endArray() + if (username.isPresent) { + val optusername = username.get() + put(ContextSpecificTag(TAG_USERNAME), optusername) + } + if (credential.isPresent) { + val optcredential = credential.get() + put(ContextSpecificTag(TAG_CREDENTIAL), optcredential) + } + if (caid.isPresent) { + val optcaid = caid.get() + put(ContextSpecificTag(TAG_CAID), optcaid) + } + endStructure() + } + } + + companion object { + private const val TAG_URLS = 1 + private const val TAG_USERNAME = 2 + private const val TAG_CREDENTIAL = 3 + private const val TAG_CAID = 4 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): WebRTCTransportRequestorClusterICEServerStruct { + tlvReader.enterStructure(tlvTag) + val urls = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_URLS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getString(AnonymousTag)) + } + tlvReader.exitContainer() + } + val username = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_USERNAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_USERNAME))) + } else { + Optional.empty() + } + val credential = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIAL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_CREDENTIAL))) + } else { + Optional.empty() + } + val caid = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CAID))) { + Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_CAID))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return WebRTCTransportRequestorClusterICEServerStruct(urls, username, credential, caid) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportRequestorClusterWebRTCSessionStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportRequestorClusterWebRTCSessionStruct.kt new file mode 100644 index 0000000000..9c572a4097 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/WebRTCTransportRequestorClusterWebRTCSessionStruct.kt @@ -0,0 +1,115 @@ +/* + * + * 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. + */ +package matter.controller.cluster.structs + +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class WebRTCTransportRequestorClusterWebRTCSessionStruct( + val id: UShort, + val peerNodeID: ULong, + val peerFabricIndex: UByte, + val streamType: UByte, + val videoStreamID: UShort?, + val audioStreamID: UShort?, + val metadataOptions: UByte, +) { + override fun toString(): String = buildString { + append("WebRTCTransportRequestorClusterWebRTCSessionStruct {\n") + append("\tid : $id\n") + append("\tpeerNodeID : $peerNodeID\n") + append("\tpeerFabricIndex : $peerFabricIndex\n") + append("\tstreamType : $streamType\n") + append("\tvideoStreamID : $videoStreamID\n") + append("\taudioStreamID : $audioStreamID\n") + append("\tmetadataOptions : $metadataOptions\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ID), id) + put(ContextSpecificTag(TAG_PEER_NODE_ID), peerNodeID) + put(ContextSpecificTag(TAG_PEER_FABRIC_INDEX), peerFabricIndex) + put(ContextSpecificTag(TAG_STREAM_TYPE), streamType) + if (videoStreamID != null) { + put(ContextSpecificTag(TAG_VIDEO_STREAM_ID), videoStreamID) + } else { + putNull(ContextSpecificTag(TAG_VIDEO_STREAM_ID)) + } + if (audioStreamID != null) { + put(ContextSpecificTag(TAG_AUDIO_STREAM_ID), audioStreamID) + } else { + putNull(ContextSpecificTag(TAG_AUDIO_STREAM_ID)) + } + put(ContextSpecificTag(TAG_METADATA_OPTIONS), metadataOptions) + endStructure() + } + } + + companion object { + private const val TAG_ID = 1 + private const val TAG_PEER_NODE_ID = 2 + private const val TAG_PEER_FABRIC_INDEX = 3 + private const val TAG_STREAM_TYPE = 4 + private const val TAG_VIDEO_STREAM_ID = 5 + private const val TAG_AUDIO_STREAM_ID = 6 + private const val TAG_METADATA_OPTIONS = 7 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): WebRTCTransportRequestorClusterWebRTCSessionStruct { + tlvReader.enterStructure(tlvTag) + val id = tlvReader.getUShort(ContextSpecificTag(TAG_ID)) + val peerNodeID = tlvReader.getULong(ContextSpecificTag(TAG_PEER_NODE_ID)) + val peerFabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_PEER_FABRIC_INDEX)) + val streamType = tlvReader.getUByte(ContextSpecificTag(TAG_STREAM_TYPE)) + val videoStreamID = + if (!tlvReader.isNull()) { + tlvReader.getUShort(ContextSpecificTag(TAG_VIDEO_STREAM_ID)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_VIDEO_STREAM_ID)) + null + } + val audioStreamID = + if (!tlvReader.isNull()) { + tlvReader.getUShort(ContextSpecificTag(TAG_AUDIO_STREAM_ID)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_AUDIO_STREAM_ID)) + null + } + val metadataOptions = tlvReader.getUByte(ContextSpecificTag(TAG_METADATA_OPTIONS)) + + tlvReader.exitContainer() + + return WebRTCTransportRequestorClusterWebRTCSessionStruct( + id, + peerNodeID, + peerFabricIndex, + streamType, + videoStreamID, + audioStreamID, + metadataOptions, + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ZoneManagementClusterTwoDCartesianVertexStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ZoneManagementClusterTwoDCartesianVertexStruct.kt new file mode 100644 index 0000000000..3ff890b7ec --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ZoneManagementClusterTwoDCartesianVertexStruct.kt @@ -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. + */ +package matter.controller.cluster.structs + +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ZoneManagementClusterTwoDCartesianVertexStruct(val x: UShort, val y: UShort) { + override fun toString(): String = buildString { + append("ZoneManagementClusterTwoDCartesianVertexStruct {\n") + append("\tx : $x\n") + append("\ty : $y\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_X), x) + put(ContextSpecificTag(TAG_Y), y) + endStructure() + } + } + + companion object { + private const val TAG_X = 0 + private const val TAG_Y = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ZoneManagementClusterTwoDCartesianVertexStruct { + tlvReader.enterStructure(tlvTag) + val x = tlvReader.getUShort(ContextSpecificTag(TAG_X)) + val y = tlvReader.getUShort(ContextSpecificTag(TAG_Y)) + + tlvReader.exitContainer() + + return ZoneManagementClusterTwoDCartesianVertexStruct(x, y) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ZoneManagementClusterTwoDCartesianZoneStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ZoneManagementClusterTwoDCartesianZoneStruct.kt new file mode 100644 index 0000000000..117fabb709 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ZoneManagementClusterTwoDCartesianZoneStruct.kt @@ -0,0 +1,90 @@ +/* + * + * 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. + */ +package matter.controller.cluster.structs + +import java.util.Optional +import matter.controller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ZoneManagementClusterTwoDCartesianZoneStruct( + val name: String, + val use: UByte, + val vertices: List, + val color: Optional, +) { + override fun toString(): String = buildString { + append("ZoneManagementClusterTwoDCartesianZoneStruct {\n") + append("\tname : $name\n") + append("\tuse : $use\n") + append("\tvertices : $vertices\n") + append("\tcolor : $color\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_NAME), name) + put(ContextSpecificTag(TAG_USE), use) + startArray(ContextSpecificTag(TAG_VERTICES)) + for (item in vertices.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + if (color.isPresent) { + val optcolor = color.get() + put(ContextSpecificTag(TAG_COLOR), optcolor) + } + endStructure() + } + } + + companion object { + private const val TAG_NAME = 0 + private const val TAG_USE = 1 + private const val TAG_VERTICES = 2 + private const val TAG_COLOR = 3 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ZoneManagementClusterTwoDCartesianZoneStruct { + tlvReader.enterStructure(tlvTag) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + val use = tlvReader.getUByte(ContextSpecificTag(TAG_USE)) + val vertices = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_VERTICES)) + while (!tlvReader.isEndOfContainer()) { + add(ZoneManagementClusterTwoDCartesianVertexStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + val color = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_COLOR))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_COLOR))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ZoneManagementClusterTwoDCartesianZoneStruct(name, use, vertices, color) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ZoneManagementClusterZoneInformationStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ZoneManagementClusterZoneInformationStruct.kt new file mode 100644 index 0000000000..8de10c83a4 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ZoneManagementClusterZoneInformationStruct.kt @@ -0,0 +1,64 @@ +/* + * + * 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. + */ +package matter.controller.cluster.structs + +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ZoneManagementClusterZoneInformationStruct( + val zoneID: UShort, + val zoneType: UByte, + val zoneSource: UByte, +) { + override fun toString(): String = buildString { + append("ZoneManagementClusterZoneInformationStruct {\n") + append("\tzoneID : $zoneID\n") + append("\tzoneType : $zoneType\n") + append("\tzoneSource : $zoneSource\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ZONE_ID), zoneID) + put(ContextSpecificTag(TAG_ZONE_TYPE), zoneType) + put(ContextSpecificTag(TAG_ZONE_SOURCE), zoneSource) + endStructure() + } + } + + companion object { + private const val TAG_ZONE_ID = 0 + private const val TAG_ZONE_TYPE = 1 + private const val TAG_ZONE_SOURCE = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ZoneManagementClusterZoneInformationStruct { + tlvReader.enterStructure(tlvTag) + val zoneID = tlvReader.getUShort(ContextSpecificTag(TAG_ZONE_ID)) + val zoneType = tlvReader.getUByte(ContextSpecificTag(TAG_ZONE_TYPE)) + val zoneSource = tlvReader.getUByte(ContextSpecificTag(TAG_ZONE_SOURCE)) + + tlvReader.exitContainer() + + return ZoneManagementClusterZoneInformationStruct(zoneID, zoneType, zoneSource) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ZoneManagementClusterZoneTriggeringTimeControlStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ZoneManagementClusterZoneTriggeringTimeControlStruct.kt new file mode 100644 index 0000000000..8978d74256 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ZoneManagementClusterZoneTriggeringTimeControlStruct.kt @@ -0,0 +1,77 @@ +/* + * + * 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. + */ +package matter.controller.cluster.structs + +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ZoneManagementClusterZoneTriggeringTimeControlStruct( + val initialDuration: UShort, + val augmentationDuration: UShort, + val maxDuration: UInt, + val blindDuration: UShort, +) { + override fun toString(): String = buildString { + append("ZoneManagementClusterZoneTriggeringTimeControlStruct {\n") + append("\tinitialDuration : $initialDuration\n") + append("\taugmentationDuration : $augmentationDuration\n") + append("\tmaxDuration : $maxDuration\n") + append("\tblindDuration : $blindDuration\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_INITIAL_DURATION), initialDuration) + put(ContextSpecificTag(TAG_AUGMENTATION_DURATION), augmentationDuration) + put(ContextSpecificTag(TAG_MAX_DURATION), maxDuration) + put(ContextSpecificTag(TAG_BLIND_DURATION), blindDuration) + endStructure() + } + } + + companion object { + private const val TAG_INITIAL_DURATION = 0 + private const val TAG_AUGMENTATION_DURATION = 1 + private const val TAG_MAX_DURATION = 2 + private const val TAG_BLIND_DURATION = 3 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader, + ): ZoneManagementClusterZoneTriggeringTimeControlStruct { + tlvReader.enterStructure(tlvTag) + val initialDuration = tlvReader.getUShort(ContextSpecificTag(TAG_INITIAL_DURATION)) + val augmentationDuration = tlvReader.getUShort(ContextSpecificTag(TAG_AUGMENTATION_DURATION)) + val maxDuration = tlvReader.getUInt(ContextSpecificTag(TAG_MAX_DURATION)) + val blindDuration = tlvReader.getUShort(ContextSpecificTag(TAG_BLIND_DURATION)) + + tlvReader.exitContainer() + + return ZoneManagementClusterZoneTriggeringTimeControlStruct( + initialDuration, + augmentationDuration, + maxDuration, + blindDuration, + ) + } + } +} diff --git a/src/controller/java/src/chip/devicecontroller/GetConnectedDeviceCallbackForTestJni.java b/src/controller/java/src/chip/devicecontroller/GetConnectedDeviceCallbackForTestJni.java index a3321af6d3..bd1343387a 100644 --- a/src/controller/java/src/chip/devicecontroller/GetConnectedDeviceCallbackForTestJni.java +++ b/src/controller/java/src/chip/devicecontroller/GetConnectedDeviceCallbackForTestJni.java @@ -37,9 +37,9 @@ public void onDeviceConnected(GetConnectedDeviceCallbackJni callback) { private native void onDeviceConnected(long callbackHandle, long messagingContextHandle); - public void onDeviceConnectionFailure(GetConnectedDeviceCallbackJni callback, int errorCode) { + public void onDeviceConnectionFailure(GetConnectedDeviceCallbackJni callback, long errorCode) { onDeviceConnectionFailure(callback.getCallbackHandle(), errorCode); } - private native void onDeviceConnectionFailure(long callbackHandle, int errorCode); + private native void onDeviceConnectionFailure(long callbackHandle, long errorCode); } diff --git a/src/controller/java/src/chip/devicecontroller/ICDRegistrationInfo.java b/src/controller/java/src/chip/devicecontroller/ICDRegistrationInfo.java index 417d147238..b8fcde3a36 100644 --- a/src/controller/java/src/chip/devicecontroller/ICDRegistrationInfo.java +++ b/src/controller/java/src/chip/devicecontroller/ICDRegistrationInfo.java @@ -25,12 +25,19 @@ public class ICDRegistrationInfo { @Nullable private final Long monitoredSubject; @Nullable private final byte[] symmetricKey; @Nullable private final Integer clientType; + @Nullable private final Long stayActiveDurationMsec; private ICDRegistrationInfo(Builder builder) { this.checkInNodeId = builder.checkInNodeId; this.monitoredSubject = builder.monitoredSubject; this.symmetricKey = builder.symmetricKey; this.clientType = builder.clientType; + this.stayActiveDurationMsec = builder.stayActiveDurationMsec; + } + + /** Returns the duration period to stay active. */ + public Long getICDStayActiveDurationMsec() { + return stayActiveDurationMsec; } /** Returns the check in node ID. */ @@ -62,6 +69,7 @@ public static class Builder { @Nullable private Long monitoredSubject = null; @Nullable private byte[] symmetricKey = null; @Nullable private Integer clientType = null; + @Nullable private Long stayActiveDurationMsec = null; private Builder() {} @@ -93,6 +101,15 @@ public Builder setClientType(Integer clientType) { return this; } + /** + * Request LIT device to stay active for specific duration after commission completes, the upper + * bound is 30 seconds. + */ + public Builder setICDStayActiveDurationMsec(Long stayActiveDurationMsec) { + this.stayActiveDurationMsec = stayActiveDurationMsec; + return this; + } + public ICDRegistrationInfo build() { return new ICDRegistrationInfo(this); } diff --git a/src/controller/java/templates/partials/decode_value.zapt b/src/controller/java/templates/partials/decode_value.zapt index 1562309b13..6401ef1c8b 100644 --- a/src/controller/java/templates/partials/decode_value.zapt +++ b/src/controller/java/templates/partials/decode_value.zapt @@ -31,28 +31,30 @@ if ({{source}}.IsNull()) { {{>decode_value target=(concat ../target "_" (asLowerCamelCase label)) source=(concat ../source "." (asLowerCamelCase label)) cluster=../cluster depth=(incrementDepth ../depth) omitDeclaration=false earlyReturn=../earlyReturn}} {{/zcl_struct_items_by_struct_and_cluster_name}} - jclass {{asLowerCamelCase type}}StructClass_{{depth}}; - err = chip::JniReferences::GetInstance().GetLocalClassRef(env, "chip/devicecontroller/ChipStructs${{asUpperCamelCase cluster}}Cluster{{asUpperCamelCase type}}", {{asLowerCamelCase type}}StructClass_{{depth}}); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs${{asUpperCamelCase cluster}}Cluster{{asUpperCamelCase type}}"); - return {{earlyReturn}}; - } + { + jclass {{asLowerCamelCase type}}StructClass_{{depth}}; + err = chip::JniReferences::GetInstance().GetLocalClassRef(env, "chip/devicecontroller/ChipStructs${{asUpperCamelCase cluster}}Cluster{{asUpperCamelCase type}}", {{asLowerCamelCase type}}StructClass_{{depth}}); + if (err != CHIP_NO_ERROR) { + ChipLogError(Zcl, "Could not find class ChipStructs${{asUpperCamelCase cluster}}Cluster{{asUpperCamelCase type}}"); + return {{earlyReturn}}; + } - jmethodID {{asLowerCamelCase type}}StructCtor_{{depth}}; - err = chip::JniReferences::GetInstance().FindMethod( - env, {{asLowerCamelCase type}}StructClass_{{depth}}, "", - "({{#zcl_struct_items_by_struct_and_cluster_name type cluster}}{{asJniSignature type null (asUpperCamelCase ../cluster) true}}{{/zcl_struct_items_by_struct_and_cluster_name}})V", - &{{asLowerCamelCase type}}StructCtor_{{depth}}); - if (err != CHIP_NO_ERROR || {{asLowerCamelCase type}}StructCtor_{{depth}} == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs${{asUpperCamelCase cluster}}Cluster{{asUpperCamelCase type}} constructor"); - return {{earlyReturn}}; - } + jmethodID {{asLowerCamelCase type}}StructCtor_{{depth}}; + err = chip::JniReferences::GetInstance().FindMethod( + env, {{asLowerCamelCase type}}StructClass_{{depth}}, "", + "({{#zcl_struct_items_by_struct_and_cluster_name type cluster}}{{asJniSignature type null (asUpperCamelCase ../cluster) true}}{{/zcl_struct_items_by_struct_and_cluster_name}})V", + &{{asLowerCamelCase type}}StructCtor_{{depth}}); + if (err != CHIP_NO_ERROR || {{asLowerCamelCase type}}StructCtor_{{depth}} == nullptr) { + ChipLogError(Zcl, "Could not find ChipStructs${{asUpperCamelCase cluster}}Cluster{{asUpperCamelCase type}} constructor"); + return {{earlyReturn}}; + } - {{target}} = env->NewObject({{asLowerCamelCase type}}StructClass_{{depth}}, {{asLowerCamelCase type}}StructCtor_{{depth}} - {{#zcl_struct_items_by_struct_and_cluster_name type cluster}} - , {{../target}}_{{asLowerCamelCase label}} - {{/zcl_struct_items_by_struct_and_cluster_name}} - ); + {{target}} = env->NewObject({{asLowerCamelCase type}}StructClass_{{depth}}, {{asLowerCamelCase type}}StructCtor_{{depth}} + {{#zcl_struct_items_by_struct_and_cluster_name type cluster}} + , {{../target}}_{{asLowerCamelCase label}} + {{/zcl_struct_items_by_struct_and_cluster_name}} + ); + } {{else}} {{#if_is_strongly_typed_chip_enum type}} std::string {{target}}ClassName = "{{asJniClassName type null (asUpperCamelCase cluster)}}"; diff --git a/src/controller/java/tests/README.md b/src/controller/java/tests/README.md index 14aedc4b60..a389cfde6e 100644 --- a/src/controller/java/tests/README.md +++ b/src/controller/java/tests/README.md @@ -4,5 +4,6 @@ ## Building & setting up emulator -Please refer to [Building Android](../../../../docs/guides/android_building.md) -guide to learn how to setup & run these tests in an android emulator. +Please refer to +[Building Android](../../../../docs/platforms/android/android_building.md) guide +to learn how to setup & run these tests in an android emulator. diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 741e40567f..c8247c5d4d 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -123,31 +123,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -281,31 +256,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -510,31 +460,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -918,31 +843,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -1060,31 +960,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -1183,27 +1058,29 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_revisionCtorSignature.c_str(), jninewElement_0_revision, newElement_0_revision); - jclass deviceTypeStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DescriptorClusterDeviceTypeStruct", deviceTypeStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$DescriptorClusterDeviceTypeStruct"); - return nullptr; - } + jclass deviceTypeStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DescriptorClusterDeviceTypeStruct", deviceTypeStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DescriptorClusterDeviceTypeStruct"); + return nullptr; + } - jmethodID deviceTypeStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, deviceTypeStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Integer;)V", - &deviceTypeStructStructCtor_1); - if (err != CHIP_NO_ERROR || deviceTypeStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DescriptorClusterDeviceTypeStruct constructor"); - return nullptr; - } + jmethodID deviceTypeStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, deviceTypeStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Integer;)V", + &deviceTypeStructStructCtor_1); + if (err != CHIP_NO_ERROR || deviceTypeStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DescriptorClusterDeviceTypeStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(deviceTypeStructStructClass_1, deviceTypeStructStructCtor_1, newElement_0_deviceType, - newElement_0_revision); + newElement_0 = env->NewObject(deviceTypeStructStructClass_1, deviceTypeStructStructCtor_1, + newElement_0_deviceType, newElement_0_revision); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1347,28 +1224,32 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(newElement_0_labelInsideOptional, newElement_0_label); } - jclass semanticTagStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DescriptorClusterSemanticTagStruct", semanticTagStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$DescriptorClusterSemanticTagStruct"); - return nullptr; - } + jclass semanticTagStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DescriptorClusterSemanticTagStruct", + semanticTagStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DescriptorClusterSemanticTagStruct"); + return nullptr; + } - jmethodID semanticTagStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, semanticTagStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;)V", - &semanticTagStructStructCtor_1); - if (err != CHIP_NO_ERROR || semanticTagStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DescriptorClusterSemanticTagStruct constructor"); - return nullptr; - } + jmethodID semanticTagStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, semanticTagStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;)V", + &semanticTagStructStructCtor_1); + if (err != CHIP_NO_ERROR || semanticTagStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DescriptorClusterSemanticTagStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(semanticTagStructStructClass_1, semanticTagStructStructCtor_1, newElement_0_mfgCode, - newElement_0_namespaceID, newElement_0_tag, newElement_0_label); + newElement_0 = + env->NewObject(semanticTagStructStructClass_1, semanticTagStructStructCtor_1, newElement_0_mfgCode, + newElement_0_namespaceID, newElement_0_tag, newElement_0_label); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1423,31 +1304,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -1605,29 +1461,31 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); - jclass targetStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$BindingClusterTargetStruct", targetStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$BindingClusterTargetStruct"); - return nullptr; - } + jclass targetStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$BindingClusterTargetStruct", targetStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$BindingClusterTargetStruct"); + return nullptr; + } - jmethodID targetStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, targetStructStructClass_1, "", - "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;)V", - &targetStructStructCtor_1); - if (err != CHIP_NO_ERROR || targetStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$BindingClusterTargetStruct constructor"); - return nullptr; - } + jmethodID targetStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, targetStructStructClass_1, "", + "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;)V", + &targetStructStructCtor_1); + if (err != CHIP_NO_ERROR || targetStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$BindingClusterTargetStruct constructor"); + return nullptr; + } - newElement_0 = - env->NewObject(targetStructStructClass_1, targetStructStructCtor_1, newElement_0_node, newElement_0_group, - newElement_0_endpoint, newElement_0_cluster, newElement_0_fabricIndex); + newElement_0 = + env->NewObject(targetStructStructClass_1, targetStructStructCtor_1, newElement_0_node, newElement_0_group, + newElement_0_endpoint, newElement_0_cluster, newElement_0_fabricIndex); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1682,31 +1540,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -1883,29 +1716,32 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jninewElement_3_deviceType, newElement_3_deviceType); } - jclass accessControlTargetStructStructClass_4; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlTargetStruct", - accessControlTargetStructStructClass_4); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlTargetStruct"); - return nullptr; - } + jclass accessControlTargetStructStructClass_4; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlTargetStruct", + accessControlTargetStructStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlTargetStruct"); + return nullptr; + } - jmethodID accessControlTargetStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod( - env, accessControlTargetStructStructClass_4, "", - "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;)V", &accessControlTargetStructStructCtor_4); - if (err != CHIP_NO_ERROR || accessControlTargetStructStructCtor_4 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$AccessControlClusterAccessControlTargetStruct constructor"); - return nullptr; - } + jmethodID accessControlTargetStructStructCtor_4; + err = chip::JniReferences::GetInstance().FindMethod( + env, accessControlTargetStructStructClass_4, "", + "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;)V", &accessControlTargetStructStructCtor_4); + if (err != CHIP_NO_ERROR || accessControlTargetStructStructCtor_4 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlTargetStruct constructor"); + return nullptr; + } - newElement_3 = env->NewObject(accessControlTargetStructStructClass_4, accessControlTargetStructStructCtor_4, - newElement_3_cluster, newElement_3_endpoint, newElement_3_deviceType); + newElement_3 = + env->NewObject(accessControlTargetStructStructClass_4, accessControlTargetStructStructCtor_4, + newElement_3_cluster, newElement_3_endpoint, newElement_3_deviceType); + } chip::JniReferences::GetInstance().AddToList(newElement_0_targets, newElement_3); } } @@ -1917,30 +1753,32 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); - jclass accessControlEntryStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlEntryStruct", - accessControlEntryStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlEntryStruct"); - return nullptr; - } + jclass accessControlEntryStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlEntryStruct", + accessControlEntryStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlEntryStruct"); + return nullptr; + } - jmethodID accessControlEntryStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, accessControlEntryStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/lang/Integer;)V", - &accessControlEntryStructStructCtor_1); - if (err != CHIP_NO_ERROR || accessControlEntryStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlEntryStruct constructor"); - return nullptr; - } + jmethodID accessControlEntryStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, accessControlEntryStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/lang/Integer;)V", + &accessControlEntryStructStructCtor_1); + if (err != CHIP_NO_ERROR || accessControlEntryStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlEntryStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(accessControlEntryStructStructClass_1, accessControlEntryStructStructCtor_1, - newElement_0_privilege, newElement_0_authMode, newElement_0_subjects, - newElement_0_targets, newElement_0_fabricIndex); + newElement_0 = env->NewObject(accessControlEntryStructStructClass_1, accessControlEntryStructStructCtor_1, + newElement_0_privilege, newElement_0_authMode, newElement_0_subjects, + newElement_0_targets, newElement_0_fabricIndex); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -1974,28 +1812,32 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); - jclass accessControlExtensionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlExtensionStruct", - accessControlExtensionStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlExtensionStruct"); - return nullptr; - } + jclass accessControlExtensionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlExtensionStruct", + accessControlExtensionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlExtensionStruct"); + return nullptr; + } - jmethodID accessControlExtensionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, accessControlExtensionStructStructClass_1, "", - "([BLjava/lang/Integer;)V", - &accessControlExtensionStructStructCtor_1); - if (err != CHIP_NO_ERROR || accessControlExtensionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlExtensionStruct constructor"); - return nullptr; - } + jmethodID accessControlExtensionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, accessControlExtensionStructStructClass_1, "", + "([BLjava/lang/Integer;)V", + &accessControlExtensionStructStructCtor_1); + if (err != CHIP_NO_ERROR || accessControlExtensionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$AccessControlClusterAccessControlExtensionStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(accessControlExtensionStructStructClass_1, accessControlExtensionStructStructCtor_1, - newElement_0_data, newElement_0_fabricIndex); + newElement_0 = + env->NewObject(accessControlExtensionStructStructClass_1, accessControlExtensionStructStructCtor_1, + newElement_0_data, newElement_0_fabricIndex); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2108,58 +1950,62 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jninewElement_2_id, newElement_2_id); } - jclass accessRestrictionStructStructClass_3; + { + jclass accessRestrictionStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessRestrictionStruct", + accessRestrictionStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessRestrictionStruct"); + return nullptr; + } + + jmethodID accessRestrictionStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, accessRestrictionStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/lang/Long;)V", + &accessRestrictionStructStructCtor_3); + if (err != CHIP_NO_ERROR || accessRestrictionStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessRestrictionStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(accessRestrictionStructStructClass_3, accessRestrictionStructStructCtor_3, + newElement_2_type, newElement_2_id); + } + chip::JniReferences::GetInstance().AddToList(newElement_0_restrictions, newElement_2); + } + + { + jclass commissioningAccessRestrictionEntryStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessRestrictionStruct", - accessRestrictionStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$AccessControlClusterCommissioningAccessRestrictionEntryStruct", + commissioningAccessRestrictionEntryStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessRestrictionStruct"); + ChipLogError( + Zcl, "Could not find class ChipStructs$AccessControlClusterCommissioningAccessRestrictionEntryStruct"); return nullptr; } - jmethodID accessRestrictionStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, accessRestrictionStructStructClass_3, "", - "(Ljava/lang/Integer;Ljava/lang/Long;)V", - &accessRestrictionStructStructCtor_3); - if (err != CHIP_NO_ERROR || accessRestrictionStructStructCtor_3 == nullptr) + jmethodID commissioningAccessRestrictionEntryStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, commissioningAccessRestrictionEntryStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/util/ArrayList;)V", + &commissioningAccessRestrictionEntryStructStructCtor_1); + if (err != CHIP_NO_ERROR || commissioningAccessRestrictionEntryStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessRestrictionStruct constructor"); + ChipLogError( + Zcl, + "Could not find ChipStructs$AccessControlClusterCommissioningAccessRestrictionEntryStruct constructor"); return nullptr; } - newElement_2 = env->NewObject(accessRestrictionStructStructClass_3, accessRestrictionStructStructCtor_3, - newElement_2_type, newElement_2_id); - chip::JniReferences::GetInstance().AddToList(newElement_0_restrictions, newElement_2); + newElement_0 = env->NewObject(commissioningAccessRestrictionEntryStructStructClass_1, + commissioningAccessRestrictionEntryStructStructCtor_1, newElement_0_endpoint, + newElement_0_cluster, newElement_0_restrictions); } - - jclass commissioningAccessRestrictionEntryStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterCommissioningAccessRestrictionEntryStruct", - commissioningAccessRestrictionEntryStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, - "Could not find class ChipStructs$AccessControlClusterCommissioningAccessRestrictionEntryStruct"); - return nullptr; - } - - jmethodID commissioningAccessRestrictionEntryStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, commissioningAccessRestrictionEntryStructStructClass_1, - "", - "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/util/ArrayList;)V", - &commissioningAccessRestrictionEntryStructStructCtor_1); - if (err != CHIP_NO_ERROR || commissioningAccessRestrictionEntryStructStructCtor_1 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$AccessControlClusterCommissioningAccessRestrictionEntryStruct constructor"); - return nullptr; - } - - newElement_0 = env->NewObject(commissioningAccessRestrictionEntryStructStructClass_1, - commissioningAccessRestrictionEntryStructStructCtor_1, newElement_0_endpoint, - newElement_0_cluster, newElement_0_restrictions); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2224,28 +2070,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jninewElement_2_id, newElement_2_id); } - jclass accessRestrictionStructStructClass_3; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessRestrictionStruct", - accessRestrictionStructStructClass_3); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessRestrictionStruct"); - return nullptr; - } + jclass accessRestrictionStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessRestrictionStruct", + accessRestrictionStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessRestrictionStruct"); + return nullptr; + } - jmethodID accessRestrictionStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, accessRestrictionStructStructClass_3, "", - "(Ljava/lang/Integer;Ljava/lang/Long;)V", - &accessRestrictionStructStructCtor_3); - if (err != CHIP_NO_ERROR || accessRestrictionStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessRestrictionStruct constructor"); - return nullptr; - } + jmethodID accessRestrictionStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, accessRestrictionStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/lang/Long;)V", + &accessRestrictionStructStructCtor_3); + if (err != CHIP_NO_ERROR || accessRestrictionStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessRestrictionStruct constructor"); + return nullptr; + } - newElement_2 = env->NewObject(accessRestrictionStructStructClass_3, accessRestrictionStructStructCtor_3, - newElement_2_type, newElement_2_id); + newElement_2 = env->NewObject(accessRestrictionStructStructClass_3, accessRestrictionStructStructCtor_3, + newElement_2_type, newElement_2_id); + } chip::JniReferences::GetInstance().AddToList(newElement_0_restrictions, newElement_2); } jobject newElement_0_fabricIndex; @@ -2256,30 +2104,33 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); - jclass accessRestrictionEntryStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessRestrictionEntryStruct", - accessRestrictionEntryStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessRestrictionEntryStruct"); - return nullptr; - } + jclass accessRestrictionEntryStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessRestrictionEntryStruct", + accessRestrictionEntryStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessRestrictionEntryStruct"); + return nullptr; + } - jmethodID accessRestrictionEntryStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, accessRestrictionEntryStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/util/ArrayList;Ljava/lang/Integer;)V", - &accessRestrictionEntryStructStructCtor_1); - if (err != CHIP_NO_ERROR || accessRestrictionEntryStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessRestrictionEntryStruct constructor"); - return nullptr; - } + jmethodID accessRestrictionEntryStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, accessRestrictionEntryStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/util/ArrayList;Ljava/lang/Integer;)V", + &accessRestrictionEntryStructStructCtor_1); + if (err != CHIP_NO_ERROR || accessRestrictionEntryStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$AccessControlClusterAccessRestrictionEntryStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(accessRestrictionEntryStructStructClass_1, accessRestrictionEntryStructStructCtor_1, - newElement_0_endpoint, newElement_0_cluster, newElement_0_restrictions, - newElement_0_fabricIndex); + newElement_0 = env->NewObject(accessRestrictionEntryStructStructClass_1, + accessRestrictionEntryStructStructCtor_1, newElement_0_endpoint, + newElement_0_cluster, newElement_0_restrictions, newElement_0_fabricIndex); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2334,31 +2185,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -2480,30 +2306,32 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_stateCtorSignature.c_str(), jninewElement_0_state, newElement_0_state); - jclass actionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ActionsClusterActionStruct", actionStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ActionsClusterActionStruct"); - return nullptr; - } + jclass actionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ActionsClusterActionStruct", actionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ActionsClusterActionStruct"); + return nullptr; + } - jmethodID actionStructStructCtor_1; - err = - chip::JniReferences::GetInstance().FindMethod(env, actionStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/" - "lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &actionStructStructCtor_1); - if (err != CHIP_NO_ERROR || actionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ActionsClusterActionStruct constructor"); - return nullptr; - } + jmethodID actionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, actionStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" + "Integer;)V", + &actionStructStructCtor_1); + if (err != CHIP_NO_ERROR || actionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ActionsClusterActionStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(actionStructStructClass_1, actionStructStructCtor_1, newElement_0_actionID, - newElement_0_name, newElement_0_type, newElement_0_endpointListID, - newElement_0_supportedCommands, newElement_0_state); + newElement_0 = env->NewObject(actionStructStructClass_1, actionStructStructCtor_1, newElement_0_actionID, + newElement_0_name, newElement_0_type, newElement_0_endpointListID, + newElement_0_supportedCommands, newElement_0_state); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2556,29 +2384,31 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().AddToList(newElement_0_endpoints, newElement_2); } - jclass endpointListStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ActionsClusterEndpointListStruct", endpointListStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ActionsClusterEndpointListStruct"); - return nullptr; - } + jclass endpointListStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ActionsClusterEndpointListStruct", endpointListStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ActionsClusterEndpointListStruct"); + return nullptr; + } - jmethodID endpointListStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, endpointListStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &endpointListStructStructCtor_1); - if (err != CHIP_NO_ERROR || endpointListStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ActionsClusterEndpointListStruct constructor"); - return nullptr; - } + jmethodID endpointListStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, endpointListStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", + &endpointListStructStructCtor_1); + if (err != CHIP_NO_ERROR || endpointListStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ActionsClusterEndpointListStruct constructor"); + return nullptr; + } - newElement_0 = - env->NewObject(endpointListStructStructClass_1, endpointListStructStructCtor_1, newElement_0_endpointListID, - newElement_0_name, newElement_0_type, newElement_0_endpoints); + newElement_0 = + env->NewObject(endpointListStructStructClass_1, endpointListStructStructCtor_1, newElement_0_endpointListID, + newElement_0_name, newElement_0_type, newElement_0_endpoints); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -2645,31 +2475,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -3017,28 +2822,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value_subscriptionsPerFabricClassName.c_str(), value_subscriptionsPerFabricCtorSignature.c_str(), jnivalue_subscriptionsPerFabric, value_subscriptionsPerFabric); - jclass capabilityMinimaStructStructClass_0; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$BasicInformationClusterCapabilityMinimaStruct", - capabilityMinimaStructStructClass_0); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$BasicInformationClusterCapabilityMinimaStruct"); - return nullptr; - } + jclass capabilityMinimaStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$BasicInformationClusterCapabilityMinimaStruct", + capabilityMinimaStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$BasicInformationClusterCapabilityMinimaStruct"); + return nullptr; + } - jmethodID capabilityMinimaStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, capabilityMinimaStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;)V", - &capabilityMinimaStructStructCtor_0); - if (err != CHIP_NO_ERROR || capabilityMinimaStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$BasicInformationClusterCapabilityMinimaStruct constructor"); - return nullptr; - } + jmethodID capabilityMinimaStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod(env, capabilityMinimaStructStructClass_0, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &capabilityMinimaStructStructCtor_0); + if (err != CHIP_NO_ERROR || capabilityMinimaStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$BasicInformationClusterCapabilityMinimaStruct constructor"); + return nullptr; + } - value = env->NewObject(capabilityMinimaStructStructClass_0, capabilityMinimaStructStructCtor_0, - value_caseSessionsPerFabric, value_subscriptionsPerFabric); + value = env->NewObject(capabilityMinimaStructStructClass_0, capabilityMinimaStructStructCtor_0, + value_caseSessionsPerFabric, value_subscriptionsPerFabric); + } return value; } case Attributes::ProductAppearance::Id: { @@ -3071,28 +2878,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jnivalue_primaryColor, value_primaryColor); } - jclass productAppearanceStructStructClass_0; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$BasicInformationClusterProductAppearanceStruct", - productAppearanceStructStructClass_0); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$BasicInformationClusterProductAppearanceStruct"); - return nullptr; - } + jclass productAppearanceStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$BasicInformationClusterProductAppearanceStruct", + productAppearanceStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$BasicInformationClusterProductAppearanceStruct"); + return nullptr; + } - jmethodID productAppearanceStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, productAppearanceStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;)V", - &productAppearanceStructStructCtor_0); - if (err != CHIP_NO_ERROR || productAppearanceStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$BasicInformationClusterProductAppearanceStruct constructor"); - return nullptr; - } + jmethodID productAppearanceStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod(env, productAppearanceStructStructClass_0, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &productAppearanceStructStructCtor_0); + if (err != CHIP_NO_ERROR || productAppearanceStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$BasicInformationClusterProductAppearanceStruct constructor"); + return nullptr; + } - value = env->NewObject(productAppearanceStructStructClass_0, productAppearanceStructStructCtor_0, value_finish, - value_primaryColor); + value = env->NewObject(productAppearanceStructStructClass_0, productAppearanceStructStructCtor_0, value_finish, + value_primaryColor); + } return value; } case Attributes::SpecificationVersion::Id: { @@ -3177,31 +2986,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -3319,31 +3103,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -3449,28 +3208,31 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); - jclass providerLocationStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation", - providerLocationStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation"); - return nullptr; - } + jclass providerLocationStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation", + providerLocationStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation"); + return nullptr; + } - jmethodID providerLocationStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, providerLocationStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &providerLocationStructCtor_1); - if (err != CHIP_NO_ERROR || providerLocationStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation constructor"); - return nullptr; - } + jmethodID providerLocationStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, providerLocationStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;)V", + &providerLocationStructCtor_1); + if (err != CHIP_NO_ERROR || providerLocationStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$OtaSoftwareUpdateRequestorClusterProviderLocation constructor"); + return nullptr; + } - newElement_0 = env->NewObject(providerLocationStructClass_1, providerLocationStructCtor_1, - newElement_0_providerNodeID, newElement_0_endpoint, newElement_0_fabricIndex); + newElement_0 = env->NewObject(providerLocationStructClass_1, providerLocationStructCtor_1, + newElement_0_providerNodeID, newElement_0_endpoint, newElement_0_fabricIndex); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -3580,31 +3342,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -3755,31 +3492,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -3954,31 +3666,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -4112,31 +3799,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -4279,31 +3941,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -5009,31 +4646,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -5141,28 +4753,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value_maxCumulativeFailsafeSecondsClassName.c_str(), value_maxCumulativeFailsafeSecondsCtorSignature.c_str(), jnivalue_maxCumulativeFailsafeSeconds, value_maxCumulativeFailsafeSeconds); - jclass basicCommissioningInfoStructClass_0; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$GeneralCommissioningClusterBasicCommissioningInfo", - basicCommissioningInfoStructClass_0); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$GeneralCommissioningClusterBasicCommissioningInfo"); - return nullptr; - } + jclass basicCommissioningInfoStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$GeneralCommissioningClusterBasicCommissioningInfo", + basicCommissioningInfoStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$GeneralCommissioningClusterBasicCommissioningInfo"); + return nullptr; + } - jmethodID basicCommissioningInfoStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, basicCommissioningInfoStructClass_0, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;)V", - &basicCommissioningInfoStructCtor_0); - if (err != CHIP_NO_ERROR || basicCommissioningInfoStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$GeneralCommissioningClusterBasicCommissioningInfo constructor"); - return nullptr; - } + jmethodID basicCommissioningInfoStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod(env, basicCommissioningInfoStructClass_0, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &basicCommissioningInfoStructCtor_0); + if (err != CHIP_NO_ERROR || basicCommissioningInfoStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$GeneralCommissioningClusterBasicCommissioningInfo constructor"); + return nullptr; + } - value = env->NewObject(basicCommissioningInfoStructClass_0, basicCommissioningInfoStructCtor_0, - value_failSafeExpiryLengthSeconds, value_maxCumulativeFailsafeSeconds); + value = env->NewObject(basicCommissioningInfoStructClass_0, basicCommissioningInfoStructCtor_0, + value_failSafeExpiryLengthSeconds, value_maxCumulativeFailsafeSeconds); + } return value; } case Attributes::RegulatoryConfig::Id: { @@ -5277,8 +4891,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jnivalue, value); return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::TCUpdateDeadline::Id: { + using TypeInfo = Attributes::TCUpdateDeadline::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -5286,24 +4900,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -5327,8 +4932,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -5512,29 +5117,31 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_clientIdentifier); } - jclass networkInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterNetworkInfoStruct", - networkInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterNetworkInfoStruct"); - return nullptr; - } + jclass networkInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterNetworkInfoStruct", + networkInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterNetworkInfoStruct"); + return nullptr; + } - jmethodID networkInfoStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, networkInfoStructStructClass_1, "", - "([BLjava/lang/Boolean;Ljava/util/Optional;Ljava/util/Optional;)V", &networkInfoStructStructCtor_1); - if (err != CHIP_NO_ERROR || networkInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$NetworkCommissioningClusterNetworkInfoStruct constructor"); - return nullptr; - } + jmethodID networkInfoStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, networkInfoStructStructClass_1, "", + "([BLjava/lang/Boolean;Ljava/util/Optional;Ljava/util/Optional;)V", &networkInfoStructStructCtor_1); + if (err != CHIP_NO_ERROR || networkInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$NetworkCommissioningClusterNetworkInfoStruct constructor"); + return nullptr; + } - newElement_0 = - env->NewObject(networkInfoStructStructClass_1, networkInfoStructStructCtor_1, newElement_0_networkID, - newElement_0_connected, newElement_0_networkIdentifier, newElement_0_clientIdentifier); + newElement_0 = + env->NewObject(networkInfoStructStructClass_1, networkInfoStructStructCtor_1, newElement_0_networkID, + newElement_0_connected, newElement_0_networkIdentifier, newElement_0_clientIdentifier); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -5762,31 +5369,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -5904,31 +5486,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -6096,32 +5653,34 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_typeCtorSignature.c_str(), jninewElement_0_type, newElement_0_type); - jclass networkInterfaceStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$GeneralDiagnosticsClusterNetworkInterface", - networkInterfaceStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$GeneralDiagnosticsClusterNetworkInterface"); - return nullptr; - } + jclass networkInterfaceStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$GeneralDiagnosticsClusterNetworkInterface", + networkInterfaceStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$GeneralDiagnosticsClusterNetworkInterface"); + return nullptr; + } - jmethodID networkInterfaceStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, networkInterfaceStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;[BLjava/util/ArrayList;Ljava/util/" - "ArrayList;Ljava/lang/Integer;)V", - &networkInterfaceStructCtor_1); - if (err != CHIP_NO_ERROR || networkInterfaceStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$GeneralDiagnosticsClusterNetworkInterface constructor"); - return nullptr; - } + jmethodID networkInterfaceStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, networkInterfaceStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;[BLjava/util/ArrayList;Ljava/" + "util/ArrayList;Ljava/lang/Integer;)V", + &networkInterfaceStructCtor_1); + if (err != CHIP_NO_ERROR || networkInterfaceStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$GeneralDiagnosticsClusterNetworkInterface constructor"); + return nullptr; + } - newElement_0 = env->NewObject(networkInterfaceStructClass_1, networkInterfaceStructCtor_1, newElement_0_name, - newElement_0_isOperational, newElement_0_offPremiseServicesReachableIPv4, - newElement_0_offPremiseServicesReachableIPv6, newElement_0_hardwareAddress, - newElement_0_IPv4Addresses, newElement_0_IPv6Addresses, newElement_0_type); + newElement_0 = env->NewObject(networkInterfaceStructClass_1, networkInterfaceStructCtor_1, newElement_0_name, + newElement_0_isOperational, newElement_0_offPremiseServicesReachableIPv4, + newElement_0_offPremiseServicesReachableIPv6, newElement_0_hardwareAddress, + newElement_0_IPv4Addresses, newElement_0_IPv6Addresses, newElement_0_type); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -6331,31 +5890,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -6511,30 +6045,32 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(newElement_0_stackSizeInsideOptional, newElement_0_stackSize); } - jclass threadMetricsStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct", - threadMetricsStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct"); - return nullptr; - } + jclass threadMetricsStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct", + threadMetricsStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct"); + return nullptr; + } - jmethodID threadMetricsStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, threadMetricsStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &threadMetricsStructStructCtor_1); - if (err != CHIP_NO_ERROR || threadMetricsStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct constructor"); - return nullptr; - } + jmethodID threadMetricsStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, threadMetricsStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &threadMetricsStructStructCtor_1); + if (err != CHIP_NO_ERROR || threadMetricsStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$SoftwareDiagnosticsClusterThreadMetricsStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(threadMetricsStructStructClass_1, threadMetricsStructStructCtor_1, newElement_0_id, - newElement_0_name, newElement_0_stackFreeCurrent, newElement_0_stackFreeMinimum, - newElement_0_stackSize); + newElement_0 = env->NewObject(threadMetricsStructStructClass_1, threadMetricsStructStructCtor_1, + newElement_0_id, newElement_0_name, newElement_0_stackFreeCurrent, + newElement_0_stackFreeMinimum, newElement_0_stackSize); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -6637,31 +6173,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -7007,34 +6518,38 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_isChildCtorSignature.c_str(), jninewElement_0_isChild, newElement_0_isChild); - jclass neighborTableStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct", - neighborTableStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct"); - return nullptr; - } + jclass neighborTableStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct", + neighborTableStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct"); + return nullptr; + } - jmethodID neighborTableStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, neighborTableStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;Ljava/" - "lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/" - "Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)V", - &neighborTableStructStructCtor_1); - if (err != CHIP_NO_ERROR || neighborTableStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct constructor"); - return nullptr; - } + jmethodID neighborTableStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, neighborTableStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/" + "Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" + "Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)V", + &neighborTableStructStructCtor_1); + if (err != CHIP_NO_ERROR || neighborTableStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterNeighborTableStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject( - neighborTableStructStructClass_1, neighborTableStructStructCtor_1, newElement_0_extAddress, newElement_0_age, - newElement_0_rloc16, newElement_0_linkFrameCounter, newElement_0_mleFrameCounter, newElement_0_lqi, - newElement_0_averageRssi, newElement_0_lastRssi, newElement_0_frameErrorRate, newElement_0_messageErrorRate, - newElement_0_rxOnWhenIdle, newElement_0_fullThreadDevice, newElement_0_fullNetworkData, newElement_0_isChild); + newElement_0 = env->NewObject( + neighborTableStructStructClass_1, neighborTableStructStructCtor_1, newElement_0_extAddress, + newElement_0_age, newElement_0_rloc16, newElement_0_linkFrameCounter, newElement_0_mleFrameCounter, + newElement_0_lqi, newElement_0_averageRssi, newElement_0_lastRssi, newElement_0_frameErrorRate, + newElement_0_messageErrorRate, newElement_0_rxOnWhenIdle, newElement_0_fullThreadDevice, + newElement_0_fullNetworkData, newElement_0_isChild); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -7126,32 +6641,34 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_linkEstablishedClassName.c_str(), newElement_0_linkEstablishedCtorSignature.c_str(), jninewElement_0_linkEstablished, newElement_0_linkEstablished); - jclass routeTableStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct", - routeTableStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct"); - return nullptr; - } + jclass routeTableStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct", + routeTableStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct"); + return nullptr; + } - jmethodID routeTableStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, routeTableStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" - "Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;)V", - &routeTableStructStructCtor_1); - if (err != CHIP_NO_ERROR || routeTableStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct constructor"); - return nullptr; - } + jmethodID routeTableStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, routeTableStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" + "Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;)V", + &routeTableStructStructCtor_1); + if (err != CHIP_NO_ERROR || routeTableStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterRouteTableStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(routeTableStructStructClass_1, routeTableStructStructCtor_1, newElement_0_extAddress, - newElement_0_rloc16, newElement_0_routerId, newElement_0_nextHop, - newElement_0_pathCost, newElement_0_LQIIn, newElement_0_LQIOut, newElement_0_age, - newElement_0_allocated, newElement_0_linkEstablished); + newElement_0 = env->NewObject( + routeTableStructStructClass_1, routeTableStructStructCtor_1, newElement_0_extAddress, newElement_0_rloc16, + newElement_0_routerId, newElement_0_nextHop, newElement_0_pathCost, newElement_0_LQIIn, newElement_0_LQIOut, + newElement_0_age, newElement_0_allocated, newElement_0_linkEstablished); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -8041,27 +7558,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateBoxedObject( value_flagsClassName.c_str(), value_flagsCtorSignature.c_str(), jnivalue_flags, value_flags); - jclass securityPolicyStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterSecurityPolicy", - securityPolicyStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterSecurityPolicy"); - return nullptr; - } + jclass securityPolicyStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterSecurityPolicy", + securityPolicyStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterSecurityPolicy"); + return nullptr; + } - jmethodID securityPolicyStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, securityPolicyStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;)V", - &securityPolicyStructCtor_1); - if (err != CHIP_NO_ERROR || securityPolicyStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterSecurityPolicy constructor"); - return nullptr; - } + jmethodID securityPolicyStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, securityPolicyStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &securityPolicyStructCtor_1); + if (err != CHIP_NO_ERROR || securityPolicyStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterSecurityPolicy constructor"); + return nullptr; + } - value = env->NewObject(securityPolicyStructClass_1, securityPolicyStructCtor_1, value_rotationTime, value_flags); + value = + env->NewObject(securityPolicyStructClass_1, securityPolicyStructCtor_1, value_rotationTime, value_flags); + } } return value; } @@ -8187,36 +7707,39 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value_channelMaskPresentClassName.c_str(), value_channelMaskPresentCtorSignature.c_str(), jnivalue_channelMaskPresent, value_channelMaskPresent); - jclass operationalDatasetComponentsStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterOperationalDatasetComponents", - operationalDatasetComponentsStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, - "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterOperationalDatasetComponents"); - return nullptr; - } + jclass operationalDatasetComponentsStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ThreadNetworkDiagnosticsClusterOperationalDatasetComponents", + operationalDatasetComponentsStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$ThreadNetworkDiagnosticsClusterOperationalDatasetComponents"); + return nullptr; + } - jmethodID operationalDatasetComponentsStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, operationalDatasetComponentsStructClass_1, "", - "(Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/" - "Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/" - "lang/Boolean;)V", - &operationalDatasetComponentsStructCtor_1); - if (err != CHIP_NO_ERROR || operationalDatasetComponentsStructCtor_1 == nullptr) - { - ChipLogError( - Zcl, "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterOperationalDatasetComponents constructor"); - return nullptr; - } + jmethodID operationalDatasetComponentsStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, operationalDatasetComponentsStructClass_1, "", + "(Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/" + "lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/" + "Boolean;Ljava/lang/Boolean;)V", + &operationalDatasetComponentsStructCtor_1); + if (err != CHIP_NO_ERROR || operationalDatasetComponentsStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$ThreadNetworkDiagnosticsClusterOperationalDatasetComponents constructor"); + return nullptr; + } - value = env->NewObject(operationalDatasetComponentsStructClass_1, operationalDatasetComponentsStructCtor_1, - value_activeTimestampPresent, value_pendingTimestampPresent, value_masterKeyPresent, - value_networkNamePresent, value_extendedPanIdPresent, value_meshLocalPrefixPresent, - value_delayPresent, value_panIdPresent, value_channelPresent, value_pskcPresent, - value_securityPolicyPresent, value_channelMaskPresent); + value = env->NewObject(operationalDatasetComponentsStructClass_1, operationalDatasetComponentsStructCtor_1, + value_activeTimestampPresent, value_pendingTimestampPresent, value_masterKeyPresent, + value_networkNamePresent, value_extendedPanIdPresent, value_meshLocalPrefixPresent, + value_delayPresent, value_panIdPresent, value_channelPresent, value_pskcPresent, + value_securityPolicyPresent, value_channelMaskPresent); + } } return value; } @@ -8295,31 +7818,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -8735,31 +8233,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -9042,31 +8515,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -9224,28 +8672,31 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateBoxedObject( value_endpointClassName.c_str(), value_endpointCtorSignature.c_str(), jnivalue_endpoint, value_endpoint); - jclass trustedTimeSourceStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterTrustedTimeSourceStruct", - trustedTimeSourceStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterTrustedTimeSourceStruct"); - return nullptr; - } + jclass trustedTimeSourceStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterTrustedTimeSourceStruct", + trustedTimeSourceStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterTrustedTimeSourceStruct"); + return nullptr; + } - jmethodID trustedTimeSourceStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, trustedTimeSourceStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;)V", - &trustedTimeSourceStructStructCtor_1); - if (err != CHIP_NO_ERROR || trustedTimeSourceStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterTrustedTimeSourceStruct constructor"); - return nullptr; - } + jmethodID trustedTimeSourceStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, trustedTimeSourceStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;)V", + &trustedTimeSourceStructStructCtor_1); + if (err != CHIP_NO_ERROR || trustedTimeSourceStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$TimeSynchronizationClusterTrustedTimeSourceStruct constructor"); + return nullptr; + } - value = env->NewObject(trustedTimeSourceStructStructClass_1, trustedTimeSourceStructStructCtor_1, value_fabricIndex, - value_nodeID, value_endpoint); + value = env->NewObject(trustedTimeSourceStructStructClass_1, trustedTimeSourceStructStructCtor_1, + value_fabricIndex, value_nodeID, value_endpoint); + } } return value; } @@ -9311,27 +8762,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); } - jclass timeZoneStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterTimeZoneStruct", timeZoneStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterTimeZoneStruct"); - return nullptr; - } + jclass timeZoneStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterTimeZoneStruct", + timeZoneStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterTimeZoneStruct"); + return nullptr; + } - jmethodID timeZoneStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, timeZoneStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;)V", - &timeZoneStructStructCtor_1); - if (err != CHIP_NO_ERROR || timeZoneStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterTimeZoneStruct constructor"); - return nullptr; - } + jmethodID timeZoneStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, timeZoneStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;)V", + &timeZoneStructStructCtor_1); + if (err != CHIP_NO_ERROR || timeZoneStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterTimeZoneStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(timeZoneStructStructClass_1, timeZoneStructStructCtor_1, newElement_0_offset, - newElement_0_validAt, newElement_0_name); + newElement_0 = env->NewObject(timeZoneStructStructClass_1, timeZoneStructStructCtor_1, newElement_0_offset, + newElement_0_validAt, newElement_0_name); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -9381,28 +8835,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jninewElement_0_validUntil, newElement_0_validUntil); } - jclass DSTOffsetStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterDSTOffsetStruct", - DSTOffsetStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterDSTOffsetStruct"); - return nullptr; - } + jclass DSTOffsetStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$TimeSynchronizationClusterDSTOffsetStruct", + DSTOffsetStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$TimeSynchronizationClusterDSTOffsetStruct"); + return nullptr; + } - jmethodID DSTOffsetStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, DSTOffsetStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V", - &DSTOffsetStructStructCtor_1); - if (err != CHIP_NO_ERROR || DSTOffsetStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterDSTOffsetStruct constructor"); - return nullptr; - } + jmethodID DSTOffsetStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, DSTOffsetStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V", + &DSTOffsetStructStructCtor_1); + if (err != CHIP_NO_ERROR || DSTOffsetStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$TimeSynchronizationClusterDSTOffsetStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(DSTOffsetStructStructClass_1, DSTOffsetStructStructCtor_1, newElement_0_offset, - newElement_0_validStarting, newElement_0_validUntil); + newElement_0 = env->NewObject(DSTOffsetStructStructClass_1, DSTOffsetStructStructCtor_1, newElement_0_offset, + newElement_0_validStarting, newElement_0_validUntil); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -9560,31 +9016,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -9894,29 +9325,32 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jnivalue_primaryColor, value_primaryColor); } - jclass productAppearanceStructStructClass_0; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$BridgedDeviceBasicInformationClusterProductAppearanceStruct", - productAppearanceStructStructClass_0); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$BridgedDeviceBasicInformationClusterProductAppearanceStruct"); - return nullptr; - } + jclass productAppearanceStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$BridgedDeviceBasicInformationClusterProductAppearanceStruct", + productAppearanceStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$BridgedDeviceBasicInformationClusterProductAppearanceStruct"); + return nullptr; + } - jmethodID productAppearanceStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, productAppearanceStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;)V", - &productAppearanceStructStructCtor_0); - if (err != CHIP_NO_ERROR || productAppearanceStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$BridgedDeviceBasicInformationClusterProductAppearanceStruct constructor"); - return nullptr; - } + jmethodID productAppearanceStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod(env, productAppearanceStructStructClass_0, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &productAppearanceStructStructCtor_0); + if (err != CHIP_NO_ERROR || productAppearanceStructStructCtor_0 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$BridgedDeviceBasicInformationClusterProductAppearanceStruct constructor"); + return nullptr; + } - value = env->NewObject(productAppearanceStructStructClass_0, productAppearanceStructStructCtor_0, value_finish, - value_primaryColor); + value = env->NewObject(productAppearanceStructStructClass_0, productAppearanceStructStructCtor_0, value_finish, + value_primaryColor); + } return value; } case Attributes::GeneratedCommandList::Id: { @@ -9969,31 +9403,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -10159,31 +9568,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -10363,31 +9747,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -10496,26 +9855,28 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); - jclass NOCStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterNOCStruct", NOCStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterNOCStruct"); - return nullptr; - } + jclass NOCStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterNOCStruct", NOCStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterNOCStruct"); + return nullptr; + } - jmethodID NOCStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, NOCStructStructClass_1, "", - "([B[BLjava/lang/Integer;)V", &NOCStructStructCtor_1); - if (err != CHIP_NO_ERROR || NOCStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterNOCStruct constructor"); - return nullptr; - } + jmethodID NOCStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, NOCStructStructClass_1, "", + "([B[BLjava/lang/Integer;)V", &NOCStructStructCtor_1); + if (err != CHIP_NO_ERROR || NOCStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterNOCStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(NOCStructStructClass_1, NOCStructStructCtor_1, newElement_0_noc, newElement_0_icac, - newElement_0_fabricIndex); + newElement_0 = env->NewObject(NOCStructStructClass_1, NOCStructStructCtor_1, newElement_0_noc, + newElement_0_icac, newElement_0_fabricIndex); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -10573,30 +9934,33 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); - jclass fabricDescriptorStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct", - fabricDescriptorStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct"); - return nullptr; - } + jclass fabricDescriptorStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct", + fabricDescriptorStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct"); + return nullptr; + } - jmethodID fabricDescriptorStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, fabricDescriptorStructStructClass_1, "", - "([BLjava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;)V", - &fabricDescriptorStructStructCtor_1); - if (err != CHIP_NO_ERROR || fabricDescriptorStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct constructor"); - return nullptr; - } + jmethodID fabricDescriptorStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, fabricDescriptorStructStructClass_1, "", + "([BLjava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;)V", + &fabricDescriptorStructStructCtor_1); + if (err != CHIP_NO_ERROR || fabricDescriptorStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(fabricDescriptorStructStructClass_1, fabricDescriptorStructStructCtor_1, - newElement_0_rootPublicKey, newElement_0_vendorID, newElement_0_fabricID, - newElement_0_nodeID, newElement_0_label, newElement_0_fabricIndex); + newElement_0 = env->NewObject(fabricDescriptorStructStructClass_1, fabricDescriptorStructStructCtor_1, + newElement_0_rootPublicKey, newElement_0_vendorID, newElement_0_fabricID, + newElement_0_nodeID, newElement_0_label, newElement_0_fabricIndex); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -10723,31 +10087,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -10853,28 +10192,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); - jclass groupKeyMapStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct", - groupKeyMapStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct"); - return nullptr; - } + jclass groupKeyMapStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct", + groupKeyMapStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct"); + return nullptr; + } - jmethodID groupKeyMapStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, groupKeyMapStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &groupKeyMapStructStructCtor_1); - if (err != CHIP_NO_ERROR || groupKeyMapStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct constructor"); - return nullptr; - } + jmethodID groupKeyMapStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, groupKeyMapStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &groupKeyMapStructStructCtor_1); + if (err != CHIP_NO_ERROR || groupKeyMapStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupKeyMapStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(groupKeyMapStructStructClass_1, groupKeyMapStructStructCtor_1, newElement_0_groupId, - newElement_0_groupKeySetID, newElement_0_fabricIndex); + newElement_0 = env->NewObject(groupKeyMapStructStructClass_1, groupKeyMapStructStructCtor_1, + newElement_0_groupId, newElement_0_groupKeySetID, newElement_0_fabricIndex); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -10937,29 +10278,32 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); - jclass groupInfoMapStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct", - groupInfoMapStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct"); - return nullptr; - } + jclass groupInfoMapStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct", + groupInfoMapStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct"); + return nullptr; + } - jmethodID groupInfoMapStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, groupInfoMapStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/Optional;Ljava/lang/Integer;)V", - &groupInfoMapStructStructCtor_1); - if (err != CHIP_NO_ERROR || groupInfoMapStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct constructor"); - return nullptr; - } + jmethodID groupInfoMapStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, groupInfoMapStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/Optional;Ljava/lang/Integer;)V", + &groupInfoMapStructStructCtor_1); + if (err != CHIP_NO_ERROR || groupInfoMapStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$GroupKeyManagementClusterGroupInfoMapStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(groupInfoMapStructStructClass_1, groupInfoMapStructStructCtor_1, newElement_0_groupId, - newElement_0_endpoints, newElement_0_groupName, newElement_0_fabricIndex); + newElement_0 = + env->NewObject(groupInfoMapStructStructClass_1, groupInfoMapStructStructCtor_1, newElement_0_groupId, + newElement_0_endpoints, newElement_0_groupName, newElement_0_fabricIndex); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11046,31 +10390,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -11159,26 +10478,29 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.value, newElement_0_value)); - jclass labelStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$FixedLabelClusterLabelStruct", labelStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$FixedLabelClusterLabelStruct"); - return nullptr; - } + jclass labelStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$FixedLabelClusterLabelStruct", labelStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$FixedLabelClusterLabelStruct"); + return nullptr; + } - jmethodID labelStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, labelStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/String;)V", &labelStructStructCtor_1); - if (err != CHIP_NO_ERROR || labelStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$FixedLabelClusterLabelStruct constructor"); - return nullptr; - } + jmethodID labelStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, labelStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/String;)V", + &labelStructStructCtor_1); + if (err != CHIP_NO_ERROR || labelStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$FixedLabelClusterLabelStruct constructor"); + return nullptr; + } - newElement_0 = - env->NewObject(labelStructStructClass_1, labelStructStructCtor_1, newElement_0_label, newElement_0_value); + newElement_0 = + env->NewObject(labelStructStructClass_1, labelStructStructCtor_1, newElement_0_label, newElement_0_value); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11233,31 +10555,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -11346,26 +10643,29 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_value; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.value, newElement_0_value)); - jclass labelStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$UserLabelClusterLabelStruct", labelStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$UserLabelClusterLabelStruct"); - return nullptr; - } + jclass labelStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$UserLabelClusterLabelStruct", labelStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UserLabelClusterLabelStruct"); + return nullptr; + } - jmethodID labelStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, labelStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/String;)V", &labelStructStructCtor_1); - if (err != CHIP_NO_ERROR || labelStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UserLabelClusterLabelStruct constructor"); - return nullptr; - } + jmethodID labelStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, labelStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/String;)V", + &labelStructStructCtor_1); + if (err != CHIP_NO_ERROR || labelStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UserLabelClusterLabelStruct constructor"); + return nullptr; + } - newElement_0 = - env->NewObject(labelStructStructClass_1, labelStructStructCtor_1, newElement_0_label, newElement_0_value); + newElement_0 = + env->NewObject(labelStructStructClass_1, labelStructStructCtor_1, newElement_0_label, newElement_0_value); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -11420,31 +10720,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -11562,31 +10837,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -11704,31 +10954,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -11846,31 +11071,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -12004,31 +11204,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -12189,30 +11364,33 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); - jclass monitoringRegistrationStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$IcdManagementClusterMonitoringRegistrationStruct", - monitoringRegistrationStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$IcdManagementClusterMonitoringRegistrationStruct"); - return nullptr; - } + jclass monitoringRegistrationStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$IcdManagementClusterMonitoringRegistrationStruct", + monitoringRegistrationStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$IcdManagementClusterMonitoringRegistrationStruct"); + return nullptr; + } - jmethodID monitoringRegistrationStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, monitoringRegistrationStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &monitoringRegistrationStructStructCtor_1); - if (err != CHIP_NO_ERROR || monitoringRegistrationStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$IcdManagementClusterMonitoringRegistrationStruct constructor"); - return nullptr; - } + jmethodID monitoringRegistrationStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, monitoringRegistrationStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;)V", + &monitoringRegistrationStructStructCtor_1); + if (err != CHIP_NO_ERROR || monitoringRegistrationStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$IcdManagementClusterMonitoringRegistrationStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(monitoringRegistrationStructStructClass_1, monitoringRegistrationStructStructCtor_1, - newElement_0_checkInNodeID, newElement_0_monitoredSubject, newElement_0_clientType, - newElement_0_fabricIndex); + newElement_0 = env->NewObject(monitoringRegistrationStructStructClass_1, + monitoringRegistrationStructStructCtor_1, newElement_0_checkInNodeID, + newElement_0_monitoredSubject, newElement_0_clientType, newElement_0_fabricIndex); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -12359,31 +11537,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -12549,31 +11702,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -12752,29 +11880,32 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_operationalStateLabel); } - jclass operationalStateStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct", - operationalStateStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct"); - return nullptr; - } + jclass operationalStateStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct", + operationalStateStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct"); + return nullptr; + } - jmethodID operationalStateStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, operationalStateStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &operationalStateStructStructCtor_1); - if (err != CHIP_NO_ERROR || operationalStateStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct constructor"); - return nullptr; - } + jmethodID operationalStateStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, operationalStateStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &operationalStateStructStructCtor_1); + if (err != CHIP_NO_ERROR || operationalStateStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$OvenCavityOperationalStateClusterOperationalStateStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, - newElement_0_operationalStateID, newElement_0_operationalStateLabel); + newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, + newElement_0_operationalStateID, newElement_0_operationalStateLabel); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -12836,107 +11967,84 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(value_errorStateDetailsInsideOptional, value_errorStateDetails); } - jclass errorStateStructStructClass_0; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct", - errorStateStructStructClass_0); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct"); + jclass errorStateStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct", + errorStateStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct"); + return nullptr; + } + + jmethodID errorStateStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod( + env, errorStateStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", + &errorStateStructStructCtor_0); + if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct constructor"); + return nullptr; + } + + value = env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorStateID, + value_errorStateLabel, value_errorStateDetails); + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { return nullptr; } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); - jmethodID errorStateStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, errorStateStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", - &errorStateStructStructCtor_0); - if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct constructor"); return nullptr; } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); - value = env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorStateID, - value_errorStateLabel, value_errorStateDetails); + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -13060,51 +12168,55 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass modeTagStructStructClass_3; + { + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeTagStruct"); + return nullptr; + } + + jmethodID modeTagStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", + "(Ljava/util/Optional;Ljava/lang/Integer;)V", + &modeTagStructStructCtor_3); + if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeTagStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + } + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + { + jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeTagStruct", modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeOptionStruct"); return nullptr; } - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + jmethodID modeOptionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); + if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeOptionStruct constructor"); return nullptr; } - newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeOptionStruct"); - return nullptr; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeOptionStruct constructor"); - return nullptr; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13221,31 +12333,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13411,31 +12498,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13586,52 +12648,56 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass semanticTagStructStructClass_3; + { + jclass semanticTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ModeSelectClusterSemanticTagStruct", + semanticTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterSemanticTagStruct"); + return nullptr; + } + + jmethodID semanticTagStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, semanticTagStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &semanticTagStructStructCtor_3); + if (err != CHIP_NO_ERROR || semanticTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterSemanticTagStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(semanticTagStructStructClass_3, semanticTagStructStructCtor_3, + newElement_2_mfgCode, newElement_2_value); + } + chip::JniReferences::GetInstance().AddToList(newElement_0_semanticTags, newElement_2); + } + + { + jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ModeSelectClusterSemanticTagStruct", - semanticTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterSemanticTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeOptionStruct"); return nullptr; } - jmethodID semanticTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, semanticTagStructStructClass_3, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;)V", - &semanticTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || semanticTagStructStructCtor_3 == nullptr) + jmethodID modeOptionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); + if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterSemanticTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeOptionStruct constructor"); return nullptr; } - newElement_2 = env->NewObject(semanticTagStructStructClass_3, semanticTagStructStructCtor_3, - newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_semanticTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeOptionStruct"); - return nullptr; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeOptionStruct constructor"); - return nullptr; + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_semanticTags); } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_semanticTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13748,31 +12814,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13898,52 +12939,57 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass modeTagStructStructClass_3; + { + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeTagStruct", + modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeTagStruct"); + return nullptr; + } + + jmethodID modeTagStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", + "(Ljava/util/Optional;Ljava/lang/Integer;)V", + &modeTagStructStructCtor_3); + if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeTagStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + } + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + { + jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeTagStruct", modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeOptionStruct", + modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeOptionStruct"); return nullptr; } - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + jmethodID modeOptionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); + if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeOptionStruct constructor"); return nullptr; } - newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeOptionStruct", - modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeOptionStruct"); - return nullptr; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeOptionStruct constructor"); - return nullptr; + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14060,31 +13106,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -14210,62 +13231,69 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass modeTagStructStructClass_3; + { + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, + "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct", + modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class " + "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct"); + return nullptr; + } + + jmethodID modeTagStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", + "(Ljava/util/Optional;Ljava/lang/Integer;)V", + &modeTagStructStructCtor_3); + if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct " + "constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + } + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + { + jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( env, - "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct", - modeTagStructStructClass_3); + "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct", + modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError( - Zcl, - "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct"); + ChipLogError(Zcl, + "Could not find class " + "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct"); return nullptr; } - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + jmethodID modeOptionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); + if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, - "Could not find " - "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct constructor"); + ChipLogError( + Zcl, + "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct " + "constructor"); return nullptr; } - newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct", - modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError( - Zcl, - "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct"); - return nullptr; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, - "Could not find " - "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct constructor"); - return nullptr; + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14382,31 +13410,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -14609,31 +13612,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -14759,51 +13737,55 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass modeTagStructStructClass_3; + { + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeTagStruct"); + return nullptr; + } + + jmethodID modeTagStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", + "(Ljava/util/Optional;Ljava/lang/Integer;)V", + &modeTagStructStructCtor_3); + if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeTagStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + } + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + { + jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeTagStruct", modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeOptionStruct"); return nullptr; } - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + jmethodID modeOptionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); + if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeOptionStruct constructor"); return nullptr; } - newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeOptionStruct"); - return nullptr; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeOptionStruct constructor"); - return nullptr; + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -14874,31 +13856,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -15024,51 +13981,56 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass modeTagStructStructClass_3; + { + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeTagStruct"); + return nullptr; + } + + jmethodID modeTagStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", + "(Ljava/util/Optional;Ljava/lang/Integer;)V", + &modeTagStructStructCtor_3); + if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeTagStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + } + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + { + jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeTagStruct", modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeOptionStruct", + modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeOptionStruct"); return nullptr; } - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + jmethodID modeOptionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); + if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeOptionStruct constructor"); return nullptr; } - newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeOptionStruct"); - return nullptr; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeOptionStruct constructor"); - return nullptr; + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -15139,31 +14101,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -15382,31 +14319,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -15572,31 +14484,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -15722,51 +14609,57 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass modeTagStructStructClass_3; + { + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeTagStruct", + modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeTagStruct"); + return nullptr; + } + + jmethodID modeTagStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", + "(Ljava/util/Optional;Ljava/lang/Integer;)V", + &modeTagStructStructCtor_3); + if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeTagStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + } + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + { + jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeTagStruct", modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeOptionStruct", + modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeOptionStruct"); return nullptr; } - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + jmethodID modeOptionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); + if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeOptionStruct constructor"); return nullptr; } - newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeOptionStruct"); - return nullptr; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeOptionStruct constructor"); - return nullptr; + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -15883,31 +14776,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -16041,31 +14909,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -16391,31 +15234,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -16597,31 +15415,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -16747,52 +15540,57 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass modeTagStructStructClass_3; + { + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeTagStruct", + modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeTagStruct"); + return nullptr; + } + + jmethodID modeTagStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", + "(Ljava/util/Optional;Ljava/lang/Integer;)V", + &modeTagStructStructCtor_3); + if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeTagStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + } + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + { + jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeTagStruct", modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeOptionStruct", + modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeOptionStruct"); return nullptr; } - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + jmethodID modeOptionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); + if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeOptionStruct constructor"); return nullptr; } - newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeOptionStruct", - modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeOptionStruct"); - return nullptr; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeOptionStruct constructor"); - return nullptr; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -16863,31 +15661,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -17158,31 +15931,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -17361,28 +16109,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_operationalStateLabel); } - jclass operationalStateStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalStateClusterOperationalStateStruct", - operationalStateStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterOperationalStateStruct"); - return nullptr; - } + jclass operationalStateStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$OperationalStateClusterOperationalStateStruct", + operationalStateStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterOperationalStateStruct"); + return nullptr; + } - jmethodID operationalStateStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, operationalStateStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &operationalStateStructStructCtor_1); - if (err != CHIP_NO_ERROR || operationalStateStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterOperationalStateStruct constructor"); - return nullptr; - } + jmethodID operationalStateStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, operationalStateStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &operationalStateStructStructCtor_1); + if (err != CHIP_NO_ERROR || operationalStateStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterOperationalStateStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, - newElement_0_operationalStateID, newElement_0_operationalStateLabel); + newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, + newElement_0_operationalStateID, newElement_0_operationalStateLabel); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -17444,27 +16194,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(value_errorStateDetailsInsideOptional, value_errorStateDetails); } - jclass errorStateStructStructClass_0; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterErrorStateStruct"); - return nullptr; - } + jclass errorStateStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$OperationalStateClusterErrorStateStruct", + errorStateStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterErrorStateStruct"); + return nullptr; + } - jmethodID errorStateStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, errorStateStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", - &errorStateStructStructCtor_0); - if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterErrorStateStruct constructor"); - return nullptr; - } + jmethodID errorStateStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod( + env, errorStateStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", + &errorStateStructStructCtor_0); + if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterErrorStateStruct constructor"); + return nullptr; + } - value = env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorStateID, - value_errorStateLabel, value_errorStateDetails); + value = env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorStateID, + value_errorStateLabel, value_errorStateDetails); + } return value; } case Attributes::GeneratedCommandList::Id: { @@ -17517,31 +16270,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -17720,28 +16448,31 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_operationalStateLabel); } - jclass operationalStateStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterOperationalStateStruct", - operationalStateStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterOperationalStateStruct"); - return nullptr; - } + jclass operationalStateStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterOperationalStateStruct", + operationalStateStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterOperationalStateStruct"); + return nullptr; + } - jmethodID operationalStateStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, operationalStateStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &operationalStateStructStructCtor_1); - if (err != CHIP_NO_ERROR || operationalStateStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterOperationalStateStruct constructor"); - return nullptr; - } + jmethodID operationalStateStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, operationalStateStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &operationalStateStructStructCtor_1); + if (err != CHIP_NO_ERROR || operationalStateStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$RvcOperationalStateClusterOperationalStateStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, - newElement_0_operationalStateID, newElement_0_operationalStateLabel); + newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, + newElement_0_operationalStateID, newElement_0_operationalStateLabel); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -17803,27 +16534,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(value_errorStateDetailsInsideOptional, value_errorStateDetails); } - jclass errorStateStructStructClass_0; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterErrorStateStruct"); - return nullptr; - } + jclass errorStateStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterErrorStateStruct", + errorStateStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterErrorStateStruct"); + return nullptr; + } - jmethodID errorStateStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, errorStateStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", - &errorStateStructStructCtor_0); - if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterErrorStateStruct constructor"); - return nullptr; - } + jmethodID errorStateStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod( + env, errorStateStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", + &errorStateStructStructCtor_0); + if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterErrorStateStruct constructor"); + return nullptr; + } - value = env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorStateID, - value_errorStateLabel, value_errorStateDetails); + value = env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorStateID, + value_errorStateLabel, value_errorStateDetails); + } return value; } case Attributes::GeneratedCommandList::Id: { @@ -17876,31 +16610,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -18066,30 +16775,34 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); - jclass sceneInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ScenesManagementClusterSceneInfoStruct", sceneInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ScenesManagementClusterSceneInfoStruct"); - return nullptr; - } + jclass sceneInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ScenesManagementClusterSceneInfoStruct", + sceneInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ScenesManagementClusterSceneInfoStruct"); + return nullptr; + } - jmethodID sceneInfoStructStructCtor_1; - err = - chip::JniReferences::GetInstance().FindMethod(env, sceneInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/" - "lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &sceneInfoStructStructCtor_1); - if (err != CHIP_NO_ERROR || sceneInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ScenesManagementClusterSceneInfoStruct constructor"); - return nullptr; - } + jmethodID sceneInfoStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, sceneInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/" + "lang/Integer;)V", + &sceneInfoStructStructCtor_1); + if (err != CHIP_NO_ERROR || sceneInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ScenesManagementClusterSceneInfoStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(sceneInfoStructStructClass_1, sceneInfoStructStructCtor_1, newElement_0_sceneCount, - newElement_0_currentScene, newElement_0_currentGroup, newElement_0_sceneValid, - newElement_0_remainingCapacity, newElement_0_fabricIndex); + newElement_0 = + env->NewObject(sceneInfoStructStructClass_1, sceneInfoStructStructCtor_1, newElement_0_sceneCount, + newElement_0_currentScene, newElement_0_currentGroup, newElement_0_sceneValid, + newElement_0_remainingCapacity, newElement_0_fabricIndex); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -18144,31 +16857,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -18350,28 +17038,31 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, newElement_0_productIdentifierValue)); - jclass replacementProductStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct", - replacementProductStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct"); - return nullptr; - } + jclass replacementProductStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct", + replacementProductStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct"); + return nullptr; + } - jmethodID replacementProductStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, replacementProductStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/String;)V", - &replacementProductStructStructCtor_1); - if (err != CHIP_NO_ERROR || replacementProductStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct constructor"); - return nullptr; - } + jmethodID replacementProductStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, replacementProductStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/String;)V", + &replacementProductStructStructCtor_1); + if (err != CHIP_NO_ERROR || replacementProductStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, - newElement_0_productIdentifierType, newElement_0_productIdentifierValue); + newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, + newElement_0_productIdentifierType, newElement_0_productIdentifierValue); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -18426,31 +17117,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -18632,31 +17298,33 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, newElement_0_productIdentifierValue)); - jclass replacementProductStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct", - replacementProductStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, - "Could not find class ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct"); - return nullptr; - } + jclass replacementProductStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct", + replacementProductStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct"); + return nullptr; + } - jmethodID replacementProductStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, replacementProductStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/String;)V", - &replacementProductStructStructCtor_1); - if (err != CHIP_NO_ERROR || replacementProductStructStructCtor_1 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct constructor"); - return nullptr; - } + jmethodID replacementProductStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, replacementProductStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/String;)V", + &replacementProductStructStructCtor_1); + if (err != CHIP_NO_ERROR || replacementProductStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct " + "constructor"); + return nullptr; + } - newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, - newElement_0_productIdentifierType, newElement_0_productIdentifierValue); + newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, + newElement_0_productIdentifierType, newElement_0_productIdentifierValue); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -18711,31 +17379,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -18981,31 +17624,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -19355,31 +17973,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -19654,65 +18247,72 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_fixedTypical); } - jclass measurementAccuracyRangeStructStructClass_3; + { + jclass measurementAccuracyRangeStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, + "chip/devicecontroller/ChipStructs$ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct", + measurementAccuracyRangeStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, + "Could not find class ChipStructs$ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct"); + return nullptr; + } + + jmethodID measurementAccuracyRangeStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod( + env, measurementAccuracyRangeStructStructClass_3, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/" + "util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &measurementAccuracyRangeStructStructCtor_3); + if (err != CHIP_NO_ERROR || measurementAccuracyRangeStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, + "Could not find " + "ChipStructs$ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject( + measurementAccuracyRangeStructStructClass_3, measurementAccuracyRangeStructStructCtor_3, + newElement_2_rangeMin, newElement_2_rangeMax, newElement_2_percentMax, newElement_2_percentMin, + newElement_2_percentTypical, newElement_2_fixedMax, newElement_2_fixedMin, newElement_2_fixedTypical); + } + chip::JniReferences::GetInstance().AddToList(newElement_0_accuracyRanges, newElement_2); + } + + { + jclass measurementAccuracyStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct", - measurementAccuracyRangeStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$ElectricalPowerMeasurementClusterMeasurementAccuracyStruct", + measurementAccuracyStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError( - Zcl, - "Could not find class ChipStructs$ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct"); + ChipLogError(Zcl, + "Could not find class ChipStructs$ElectricalPowerMeasurementClusterMeasurementAccuracyStruct"); return nullptr; } - jmethodID measurementAccuracyRangeStructStructCtor_3; + jmethodID measurementAccuracyStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( - env, measurementAccuracyRangeStructStructClass_3, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &measurementAccuracyRangeStructStructCtor_3); - if (err != CHIP_NO_ERROR || measurementAccuracyRangeStructStructCtor_3 == nullptr) + env, measurementAccuracyStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/ArrayList;)V", + &measurementAccuracyStructStructCtor_1); + if (err != CHIP_NO_ERROR || measurementAccuracyStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, - "Could not find ChipStructs$ElectricalPowerMeasurementClusterMeasurementAccuracyRangeStruct " - "constructor"); + ChipLogError( + Zcl, + "Could not find ChipStructs$ElectricalPowerMeasurementClusterMeasurementAccuracyStruct constructor"); return nullptr; } - newElement_2 = env->NewObject( - measurementAccuracyRangeStructStructClass_3, measurementAccuracyRangeStructStructCtor_3, - newElement_2_rangeMin, newElement_2_rangeMax, newElement_2_percentMax, newElement_2_percentMin, - newElement_2_percentTypical, newElement_2_fixedMax, newElement_2_fixedMin, newElement_2_fixedTypical); - chip::JniReferences::GetInstance().AddToList(newElement_0_accuracyRanges, newElement_2); + newElement_0 = + env->NewObject(measurementAccuracyStructStructClass_1, measurementAccuracyStructStructCtor_1, + newElement_0_measurementType, newElement_0_measured, newElement_0_minMeasuredValue, + newElement_0_maxMeasuredValue, newElement_0_accuracyRanges); } - - jclass measurementAccuracyStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ElectricalPowerMeasurementClusterMeasurementAccuracyStruct", - measurementAccuracyStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, - "Could not find class ChipStructs$ElectricalPowerMeasurementClusterMeasurementAccuracyStruct"); - return nullptr; - } - - jmethodID measurementAccuracyStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, measurementAccuracyStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/ArrayList;)V", - &measurementAccuracyStructStructCtor_1); - if (err != CHIP_NO_ERROR || measurementAccuracyStructStructCtor_1 == nullptr) - { - ChipLogError( - Zcl, "Could not find ChipStructs$ElectricalPowerMeasurementClusterMeasurementAccuracyStruct constructor"); - return nullptr; - } - - newElement_0 = env->NewObject(measurementAccuracyStructStructClass_1, measurementAccuracyStructStructCtor_1, - newElement_0_measurementType, newElement_0_measured, newElement_0_minMeasuredValue, - newElement_0_maxMeasuredValue, newElement_0_accuracyRanges); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -19899,35 +18499,38 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_maxSystime); } - jclass measurementRangeStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ElectricalPowerMeasurementClusterMeasurementRangeStruct", - measurementRangeStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalPowerMeasurementClusterMeasurementRangeStruct"); - return nullptr; - } + jclass measurementRangeStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalPowerMeasurementClusterMeasurementRangeStruct", + measurementRangeStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$ElectricalPowerMeasurementClusterMeasurementRangeStruct"); + return nullptr; + } - jmethodID measurementRangeStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, measurementRangeStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" - "Optional;)V", - &measurementRangeStructStructCtor_1); - if (err != CHIP_NO_ERROR || measurementRangeStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$ElectricalPowerMeasurementClusterMeasurementRangeStruct constructor"); - return nullptr; - } + jmethodID measurementRangeStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, measurementRangeStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;)V", + &measurementRangeStructStructCtor_1); + if (err != CHIP_NO_ERROR || measurementRangeStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$ElectricalPowerMeasurementClusterMeasurementRangeStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(measurementRangeStructStructClass_1, measurementRangeStructStructCtor_1, - newElement_0_measurementType, newElement_0_min, newElement_0_max, - newElement_0_startTimestamp, newElement_0_endTimestamp, newElement_0_minTimestamp, - newElement_0_maxTimestamp, newElement_0_startSystime, newElement_0_endSystime, - newElement_0_minSystime, newElement_0_maxSystime); + newElement_0 = env->NewObject(measurementRangeStructStructClass_1, measurementRangeStructStructCtor_1, + newElement_0_measurementType, newElement_0_min, newElement_0_max, + newElement_0_startTimestamp, newElement_0_endTimestamp, newElement_0_minTimestamp, + newElement_0_maxTimestamp, newElement_0_startSystime, newElement_0_endSystime, + newElement_0_minSystime, newElement_0_maxSystime); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -20229,31 +18832,33 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jninewElement_1_measurement, newElement_1_measurement); } - jclass harmonicMeasurementStructStructClass_2; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ElectricalPowerMeasurementClusterHarmonicMeasurementStruct", - harmonicMeasurementStructStructClass_2); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, - "Could not find class ChipStructs$ElectricalPowerMeasurementClusterHarmonicMeasurementStruct"); - return nullptr; - } + jclass harmonicMeasurementStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalPowerMeasurementClusterHarmonicMeasurementStruct", + harmonicMeasurementStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$ElectricalPowerMeasurementClusterHarmonicMeasurementStruct"); + return nullptr; + } - jmethodID harmonicMeasurementStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod(env, harmonicMeasurementStructStructClass_2, "", - "(Ljava/lang/Integer;Ljava/lang/Long;)V", - &harmonicMeasurementStructStructCtor_2); - if (err != CHIP_NO_ERROR || harmonicMeasurementStructStructCtor_2 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$ElectricalPowerMeasurementClusterHarmonicMeasurementStruct constructor"); - return nullptr; - } + jmethodID harmonicMeasurementStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod(env, harmonicMeasurementStructStructClass_2, "", + "(Ljava/lang/Integer;Ljava/lang/Long;)V", + &harmonicMeasurementStructStructCtor_2); + if (err != CHIP_NO_ERROR || harmonicMeasurementStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$ElectricalPowerMeasurementClusterHarmonicMeasurementStruct " + "constructor"); + return nullptr; + } - newElement_1 = env->NewObject(harmonicMeasurementStructStructClass_2, harmonicMeasurementStructStructCtor_2, - newElement_1_order, newElement_1_measurement); + newElement_1 = env->NewObject(harmonicMeasurementStructStructClass_2, harmonicMeasurementStructStructCtor_2, + newElement_1_order, newElement_1_measurement); + } chip::JniReferences::GetInstance().AddToList(value, newElement_1); } } @@ -20303,31 +18908,33 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jninewElement_1_measurement, newElement_1_measurement); } - jclass harmonicMeasurementStructStructClass_2; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ElectricalPowerMeasurementClusterHarmonicMeasurementStruct", - harmonicMeasurementStructStructClass_2); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, - "Could not find class ChipStructs$ElectricalPowerMeasurementClusterHarmonicMeasurementStruct"); - return nullptr; - } + jclass harmonicMeasurementStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalPowerMeasurementClusterHarmonicMeasurementStruct", + harmonicMeasurementStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$ElectricalPowerMeasurementClusterHarmonicMeasurementStruct"); + return nullptr; + } - jmethodID harmonicMeasurementStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod(env, harmonicMeasurementStructStructClass_2, "", - "(Ljava/lang/Integer;Ljava/lang/Long;)V", - &harmonicMeasurementStructStructCtor_2); - if (err != CHIP_NO_ERROR || harmonicMeasurementStructStructCtor_2 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$ElectricalPowerMeasurementClusterHarmonicMeasurementStruct constructor"); - return nullptr; - } + jmethodID harmonicMeasurementStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod(env, harmonicMeasurementStructStructClass_2, "", + "(Ljava/lang/Integer;Ljava/lang/Long;)V", + &harmonicMeasurementStructStructCtor_2); + if (err != CHIP_NO_ERROR || harmonicMeasurementStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$ElectricalPowerMeasurementClusterHarmonicMeasurementStruct " + "constructor"); + return nullptr; + } - newElement_1 = env->NewObject(harmonicMeasurementStructStructClass_2, harmonicMeasurementStructStructCtor_2, - newElement_1_order, newElement_1_measurement); + newElement_1 = env->NewObject(harmonicMeasurementStructStructClass_2, harmonicMeasurementStructStructCtor_2, + newElement_1_order, newElement_1_measurement); + } chip::JniReferences::GetInstance().AddToList(value, newElement_1); } } @@ -20429,31 +19036,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -20686,63 +19268,69 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_1_fixedTypical); } - jclass measurementAccuracyRangeStructStructClass_2; + { + jclass measurementAccuracyRangeStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct", + measurementAccuracyRangeStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, + "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct"); + return nullptr; + } + + jmethodID measurementAccuracyRangeStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod( + env, measurementAccuracyRangeStructStructClass_2, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &measurementAccuracyRangeStructStructCtor_2); + if (err != CHIP_NO_ERROR || measurementAccuracyRangeStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct " + "constructor"); + return nullptr; + } + + newElement_1 = env->NewObject( + measurementAccuracyRangeStructStructClass_2, measurementAccuracyRangeStructStructCtor_2, + newElement_1_rangeMin, newElement_1_rangeMax, newElement_1_percentMax, newElement_1_percentMin, + newElement_1_percentTypical, newElement_1_fixedMax, newElement_1_fixedMin, newElement_1_fixedTypical); + } + chip::JniReferences::GetInstance().AddToList(value_accuracyRanges, newElement_1); + } + + { + jclass measurementAccuracyStructStructClass_0; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct", - measurementAccuracyRangeStructStructClass_2); + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct", + measurementAccuracyStructStructClass_0); if (err != CHIP_NO_ERROR) { - ChipLogError( - Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct"); + ChipLogError(Zcl, + "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct"); return nullptr; } - jmethodID measurementAccuracyRangeStructStructCtor_2; + jmethodID measurementAccuracyStructStructCtor_0; err = chip::JniReferences::GetInstance().FindMethod( - env, measurementAccuracyRangeStructStructClass_2, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &measurementAccuracyRangeStructStructCtor_2); - if (err != CHIP_NO_ERROR || measurementAccuracyRangeStructStructCtor_2 == nullptr) + env, measurementAccuracyStructStructClass_0, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/ArrayList;)V", + &measurementAccuracyStructStructCtor_0); + if (err != CHIP_NO_ERROR || measurementAccuracyStructStructCtor_0 == nullptr) { ChipLogError( - Zcl, - "Could not find ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct constructor"); + Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct constructor"); return nullptr; } - newElement_1 = env->NewObject( - measurementAccuracyRangeStructStructClass_2, measurementAccuracyRangeStructStructCtor_2, newElement_1_rangeMin, - newElement_1_rangeMax, newElement_1_percentMax, newElement_1_percentMin, newElement_1_percentTypical, - newElement_1_fixedMax, newElement_1_fixedMin, newElement_1_fixedTypical); - chip::JniReferences::GetInstance().AddToList(value_accuracyRanges, newElement_1); - } - - jclass measurementAccuracyStructStructClass_0; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct", - measurementAccuracyStructStructClass_0); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct"); - return nullptr; - } - - jmethodID measurementAccuracyStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod( - env, measurementAccuracyStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/ArrayList;)V", - &measurementAccuracyStructStructCtor_0); - if (err != CHIP_NO_ERROR || measurementAccuracyStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct constructor"); - return nullptr; + value = env->NewObject(measurementAccuracyStructStructClass_0, measurementAccuracyStructStructCtor_0, + value_measurementType, value_measured, value_minMeasuredValue, value_maxMeasuredValue, + value_accuracyRanges); } - - value = - env->NewObject(measurementAccuracyStructStructClass_0, measurementAccuracyStructStructCtor_0, value_measurementType, - value_measured, value_minMeasuredValue, value_maxMeasuredValue, value_accuracyRanges); return value; } case Attributes::CumulativeEnergyImported::Id: { @@ -20832,30 +19420,34 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(value_endSystimeInsideOptional, value_endSystime); } - jclass energyMeasurementStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", - energyMeasurementStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); - return nullptr; - } + jclass energyMeasurementStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", + energyMeasurementStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); + return nullptr; + } - jmethodID energyMeasurementStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, energyMeasurementStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &energyMeasurementStructStructCtor_1); - if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) - { - ChipLogError( - Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); - return nullptr; - } + jmethodID energyMeasurementStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, energyMeasurementStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &energyMeasurementStructStructCtor_1); + if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); + return nullptr; + } - value = env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, value_energy, - value_startTimestamp, value_endTimestamp, value_startSystime, value_endSystime); + value = env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, value_energy, + value_startTimestamp, value_endTimestamp, value_startSystime, value_endSystime); + } } return value; } @@ -20946,30 +19538,34 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(value_endSystimeInsideOptional, value_endSystime); } - jclass energyMeasurementStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", - energyMeasurementStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); - return nullptr; - } + jclass energyMeasurementStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", + energyMeasurementStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); + return nullptr; + } - jmethodID energyMeasurementStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, energyMeasurementStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &energyMeasurementStructStructCtor_1); - if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) - { - ChipLogError( - Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); - return nullptr; - } + jmethodID energyMeasurementStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, energyMeasurementStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &energyMeasurementStructStructCtor_1); + if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); + return nullptr; + } - value = env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, value_energy, - value_startTimestamp, value_endTimestamp, value_startSystime, value_endSystime); + value = env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, value_energy, + value_startTimestamp, value_endTimestamp, value_startSystime, value_endSystime); + } } return value; } @@ -21060,30 +19656,34 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(value_endSystimeInsideOptional, value_endSystime); } - jclass energyMeasurementStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", - energyMeasurementStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); - return nullptr; - } + jclass energyMeasurementStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", + energyMeasurementStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); + return nullptr; + } - jmethodID energyMeasurementStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, energyMeasurementStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &energyMeasurementStructStructCtor_1); - if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) - { - ChipLogError( - Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); - return nullptr; - } + jmethodID energyMeasurementStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, energyMeasurementStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &energyMeasurementStructStructCtor_1); + if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); + return nullptr; + } - value = env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, value_energy, - value_startTimestamp, value_endTimestamp, value_startSystime, value_endSystime); + value = env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, value_energy, + value_startTimestamp, value_endTimestamp, value_startSystime, value_endSystime); + } } return value; } @@ -21174,30 +19774,34 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(value_endSystimeInsideOptional, value_endSystime); } - jclass energyMeasurementStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", - energyMeasurementStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); - return nullptr; - } + jclass energyMeasurementStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", + energyMeasurementStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); + return nullptr; + } - jmethodID energyMeasurementStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, energyMeasurementStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &energyMeasurementStructStructCtor_1); - if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) - { - ChipLogError( - Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); - return nullptr; - } + jmethodID energyMeasurementStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, energyMeasurementStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &energyMeasurementStructStructCtor_1); + if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); + return nullptr; + } - value = env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, value_energy, - value_startTimestamp, value_endTimestamp, value_startSystime, value_endSystime); + value = env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, value_energy, + value_startTimestamp, value_endTimestamp, value_startSystime, value_endSystime); + } } return value; } @@ -21321,33 +19925,35 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value_exportedResetSystime); } - jclass cumulativeEnergyResetStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct", - cumulativeEnergyResetStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, - "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct"); - return nullptr; - } + jclass cumulativeEnergyResetStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct", + cumulativeEnergyResetStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct"); + return nullptr; + } - jmethodID cumulativeEnergyResetStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, cumulativeEnergyResetStructStructClass_1, "", - "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &cumulativeEnergyResetStructStructCtor_1); - if (err != CHIP_NO_ERROR || cumulativeEnergyResetStructStructCtor_1 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct constructor"); - return nullptr; - } + jmethodID cumulativeEnergyResetStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, cumulativeEnergyResetStructStructClass_1, "", + "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &cumulativeEnergyResetStructStructCtor_1); + if (err != CHIP_NO_ERROR || cumulativeEnergyResetStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$ElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct constructor"); + return nullptr; + } - value = env->NewObject(cumulativeEnergyResetStructStructClass_1, cumulativeEnergyResetStructStructCtor_1, - value_importedResetTimestamp, value_exportedResetTimestamp, value_importedResetSystime, - value_exportedResetSystime); + value = env->NewObject(cumulativeEnergyResetStructStructClass_1, cumulativeEnergyResetStructStructCtor_1, + value_importedResetTimestamp, value_exportedResetTimestamp, value_importedResetSystime, + value_exportedResetSystime); + } } return value; } @@ -21401,31 +20007,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -21639,31 +20220,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -21798,31 +20354,34 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_randomDurationMinutes); } - jclass loadControlProgramStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct", - loadControlProgramStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct"); - return nullptr; - } + jclass loadControlProgramStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct", + loadControlProgramStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct"); + return nullptr; + } - jmethodID loadControlProgramStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, loadControlProgramStructStructClass_1, "", - "([BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &loadControlProgramStructStructCtor_1); - if (err != CHIP_NO_ERROR || loadControlProgramStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct constructor"); - return nullptr; - } + jmethodID loadControlProgramStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, loadControlProgramStructStructClass_1, "", + "([BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", + &loadControlProgramStructStructCtor_1); + if (err != CHIP_NO_ERROR || loadControlProgramStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlProgramStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(loadControlProgramStructStructClass_1, loadControlProgramStructStructCtor_1, - newElement_0_programID, newElement_0_name, newElement_0_enrollmentGroup, - newElement_0_randomStartMinutes, newElement_0_randomDurationMinutes); + newElement_0 = env->NewObject(loadControlProgramStructStructClass_1, loadControlProgramStructStructCtor_1, + newElement_0_programID, newElement_0_name, newElement_0_enrollmentGroup, + newElement_0_randomStartMinutes, newElement_0_randomDurationMinutes); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -22099,36 +20658,39 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); } - jclass temperatureControlStructStructClass_5; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct", - temperatureControlStructStructClass_5); - if (err != CHIP_NO_ERROR) { - ChipLogError( - Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct"); - return nullptr; - } + jclass temperatureControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct", + temperatureControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct"); + return nullptr; + } - jmethodID temperatureControlStructStructCtor_5; - err = chip::JniReferences::GetInstance().FindMethod( - env, temperatureControlStructStructClass_5, "", - "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &temperatureControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || temperatureControlStructStructCtor_5 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct constructor"); - return nullptr; - } + jmethodID temperatureControlStructStructCtor_5; + err = chip::JniReferences::GetInstance().FindMethod( + env, temperatureControlStructStructClass_5, "", + "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &temperatureControlStructStructCtor_5); + if (err != CHIP_NO_ERROR || temperatureControlStructStructCtor_5 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct " + "constructor"); + return nullptr; + } - newElement_2_temperatureControlInsideOptional = - env->NewObject(temperatureControlStructStructClass_5, temperatureControlStructStructCtor_5, - newElement_2_temperatureControlInsideOptional_coolingTempOffset, - newElement_2_temperatureControlInsideOptional_heatingtTempOffset, - newElement_2_temperatureControlInsideOptional_coolingTempSetpoint, - newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); + newElement_2_temperatureControlInsideOptional = + env->NewObject(temperatureControlStructStructClass_5, temperatureControlStructStructCtor_5, + newElement_2_temperatureControlInsideOptional_coolingTempOffset, + newElement_2_temperatureControlInsideOptional_heatingtTempOffset, + newElement_2_temperatureControlInsideOptional_coolingTempSetpoint, + newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); + } chip::JniReferences::GetInstance().CreateOptional(newElement_2_temperatureControlInsideOptional, newElement_2_temperatureControl); } @@ -22151,32 +20713,35 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jninewElement_2_averageLoadControlInsideOptional_loadAdjustment, newElement_2_averageLoadControlInsideOptional_loadAdjustment); - jclass averageLoadControlStructStructClass_5; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct", - averageLoadControlStructStructClass_5); - if (err != CHIP_NO_ERROR) { - ChipLogError( - Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct"); - return nullptr; - } + jclass averageLoadControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct", + averageLoadControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct"); + return nullptr; + } - jmethodID averageLoadControlStructStructCtor_5; - err = chip::JniReferences::GetInstance().FindMethod(env, averageLoadControlStructStructClass_5, "", - "(Ljava/lang/Integer;)V", - &averageLoadControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || averageLoadControlStructStructCtor_5 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct constructor"); - return nullptr; - } + jmethodID averageLoadControlStructStructCtor_5; + err = chip::JniReferences::GetInstance().FindMethod(env, averageLoadControlStructStructClass_5, + "", "(Ljava/lang/Integer;)V", + &averageLoadControlStructStructCtor_5); + if (err != CHIP_NO_ERROR || averageLoadControlStructStructCtor_5 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct " + "constructor"); + return nullptr; + } - newElement_2_averageLoadControlInsideOptional = - env->NewObject(averageLoadControlStructStructClass_5, averageLoadControlStructStructCtor_5, - newElement_2_averageLoadControlInsideOptional_loadAdjustment); + newElement_2_averageLoadControlInsideOptional = + env->NewObject(averageLoadControlStructStructClass_5, averageLoadControlStructStructCtor_5, + newElement_2_averageLoadControlInsideOptional_loadAdjustment); + } chip::JniReferences::GetInstance().CreateOptional(newElement_2_averageLoadControlInsideOptional, newElement_2_averageLoadControl); } @@ -22199,32 +20764,34 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jninewElement_2_dutyCycleControlInsideOptional_dutyCycle, newElement_2_dutyCycleControlInsideOptional_dutyCycle); - jclass dutyCycleControlStructStructClass_5; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct", - dutyCycleControlStructStructClass_5); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, - "Could not find class ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct"); - return nullptr; - } + jclass dutyCycleControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct", + dutyCycleControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct"); + return nullptr; + } - jmethodID dutyCycleControlStructStructCtor_5; - err = chip::JniReferences::GetInstance().FindMethod(env, dutyCycleControlStructStructClass_5, "", - "(Ljava/lang/Integer;)V", - &dutyCycleControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || dutyCycleControlStructStructCtor_5 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct constructor"); - return nullptr; - } + jmethodID dutyCycleControlStructStructCtor_5; + err = chip::JniReferences::GetInstance().FindMethod(env, dutyCycleControlStructStructClass_5, "", + "(Ljava/lang/Integer;)V", + &dutyCycleControlStructStructCtor_5); + if (err != CHIP_NO_ERROR || dutyCycleControlStructStructCtor_5 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct " + "constructor"); + return nullptr; + } - newElement_2_dutyCycleControlInsideOptional = - env->NewObject(dutyCycleControlStructStructClass_5, dutyCycleControlStructStructCtor_5, - newElement_2_dutyCycleControlInsideOptional_dutyCycle); + newElement_2_dutyCycleControlInsideOptional = + env->NewObject(dutyCycleControlStructStructClass_5, dutyCycleControlStructStructCtor_5, + newElement_2_dutyCycleControlInsideOptional_dutyCycle); + } chip::JniReferences::GetInstance().CreateOptional(newElement_2_dutyCycleControlInsideOptional, newElement_2_dutyCycleControl); } @@ -22247,32 +20814,35 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jninewElement_2_powerSavingsControlInsideOptional_powerSavings, newElement_2_powerSavingsControlInsideOptional_powerSavings); - jclass powerSavingsControlStructStructClass_5; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct", - powerSavingsControlStructStructClass_5); - if (err != CHIP_NO_ERROR) { - ChipLogError( - Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct"); - return nullptr; - } + jclass powerSavingsControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct", + powerSavingsControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct"); + return nullptr; + } - jmethodID powerSavingsControlStructStructCtor_5; - err = chip::JniReferences::GetInstance().FindMethod(env, powerSavingsControlStructStructClass_5, "", - "(Ljava/lang/Integer;)V", - &powerSavingsControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || powerSavingsControlStructStructCtor_5 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct constructor"); - return nullptr; - } + jmethodID powerSavingsControlStructStructCtor_5; + err = chip::JniReferences::GetInstance().FindMethod(env, powerSavingsControlStructStructClass_5, + "", "(Ljava/lang/Integer;)V", + &powerSavingsControlStructStructCtor_5); + if (err != CHIP_NO_ERROR || powerSavingsControlStructStructCtor_5 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct " + "constructor"); + return nullptr; + } - newElement_2_powerSavingsControlInsideOptional = - env->NewObject(powerSavingsControlStructStructClass_5, powerSavingsControlStructStructCtor_5, - newElement_2_powerSavingsControlInsideOptional_powerSavings); + newElement_2_powerSavingsControlInsideOptional = + env->NewObject(powerSavingsControlStructStructClass_5, powerSavingsControlStructStructCtor_5, + newElement_2_powerSavingsControlInsideOptional_powerSavings); + } chip::JniReferences::GetInstance().CreateOptional(newElement_2_powerSavingsControlInsideOptional, newElement_2_powerSavingsControl); } @@ -22295,97 +20865,107 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jninewElement_2_heatingSourceControlInsideOptional_heatingSource, newElement_2_heatingSourceControlInsideOptional_heatingSource); - jclass heatingSourceControlStructStructClass_5; + { + jclass heatingSourceControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct", + heatingSourceControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct"); + return nullptr; + } + + jmethodID heatingSourceControlStructStructCtor_5; + err = chip::JniReferences::GetInstance().FindMethod(env, heatingSourceControlStructStructClass_5, + "", "(Ljava/lang/Integer;)V", + &heatingSourceControlStructStructCtor_5); + if (err != CHIP_NO_ERROR || heatingSourceControlStructStructCtor_5 == nullptr) + { + ChipLogError(Zcl, + "Could not find " + "ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct constructor"); + return nullptr; + } + + newElement_2_heatingSourceControlInsideOptional = + env->NewObject(heatingSourceControlStructStructClass_5, heatingSourceControlStructStructCtor_5, + newElement_2_heatingSourceControlInsideOptional_heatingSource); + } + chip::JniReferences::GetInstance().CreateOptional(newElement_2_heatingSourceControlInsideOptional, + newElement_2_heatingSourceControl); + } + + { + jclass loadControlEventTransitionStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct", - heatingSourceControlStructStructClass_5); + env, + "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct", + loadControlEventTransitionStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError( - Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct"); + ChipLogError(Zcl, + "Could not find class " + "ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct"); return nullptr; } - jmethodID heatingSourceControlStructStructCtor_5; - err = chip::JniReferences::GetInstance().FindMethod(env, heatingSourceControlStructStructClass_5, "", - "(Ljava/lang/Integer;)V", - &heatingSourceControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || heatingSourceControlStructStructCtor_5 == nullptr) + jmethodID loadControlEventTransitionStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod( + env, loadControlEventTransitionStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &loadControlEventTransitionStructStructCtor_3); + if (err != CHIP_NO_ERROR || loadControlEventTransitionStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct " - "constructor"); + ChipLogError( + Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct " + "constructor"); return nullptr; } - newElement_2_heatingSourceControlInsideOptional = - env->NewObject(heatingSourceControlStructStructClass_5, heatingSourceControlStructStructCtor_5, - newElement_2_heatingSourceControlInsideOptional_heatingSource); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_heatingSourceControlInsideOptional, - newElement_2_heatingSourceControl); + newElement_2 = env->NewObject(loadControlEventTransitionStructStructClass_3, + loadControlEventTransitionStructStructCtor_3, newElement_2_duration, + newElement_2_control, newElement_2_temperatureControl, + newElement_2_averageLoadControl, newElement_2_dutyCycleControl, + newElement_2_powerSavingsControl, newElement_2_heatingSourceControl); } + chip::JniReferences::GetInstance().AddToList(newElement_0_transitions, newElement_2); + } - jclass loadControlEventTransitionStructStructClass_3; + { + jclass loadControlEventStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct", - loadControlEventTransitionStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct", + loadControlEventStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError( - Zcl, - "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct"); + ChipLogError(Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct"); return nullptr; } - jmethodID loadControlEventTransitionStructStructCtor_3; + jmethodID loadControlEventStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( - env, loadControlEventTransitionStructStructClass_3, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/" - "util/Optional;Ljava/util/Optional;)V", - &loadControlEventTransitionStructStructCtor_3); - if (err != CHIP_NO_ERROR || loadControlEventTransitionStructStructCtor_3 == nullptr) + env, loadControlEventStructStructClass_1, "", + "([B[BLjava/lang/Integer;Ljava/lang/Long;Ljava/util/Optional;Ljava/lang/Integer;Ljava/lang/Long;Ljava/util/" + "ArrayList;)V", + &loadControlEventStructStructCtor_1); + if (err != CHIP_NO_ERROR || loadControlEventStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct " - "constructor"); + ChipLogError( + Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct constructor"); return nullptr; } - newElement_2 = - env->NewObject(loadControlEventTransitionStructStructClass_3, loadControlEventTransitionStructStructCtor_3, - newElement_2_duration, newElement_2_control, newElement_2_temperatureControl, - newElement_2_averageLoadControl, newElement_2_dutyCycleControl, - newElement_2_powerSavingsControl, newElement_2_heatingSourceControl); - chip::JniReferences::GetInstance().AddToList(newElement_0_transitions, newElement_2); - } - - jclass loadControlEventStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct", - loadControlEventStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct"); - return nullptr; + newElement_0 = env->NewObject(loadControlEventStructStructClass_1, loadControlEventStructStructCtor_1, + newElement_0_eventID, newElement_0_programID, newElement_0_control, + newElement_0_deviceClass, newElement_0_enrollmentGroup, newElement_0_criticality, + newElement_0_startTime, newElement_0_transitions); } - - jmethodID loadControlEventStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, loadControlEventStructStructClass_1, "", - "([B[BLjava/lang/Integer;Ljava/lang/Long;Ljava/util/Optional;Ljava/lang/Integer;Ljava/lang/Long;Ljava/util/" - "ArrayList;)V", - &loadControlEventStructStructCtor_1); - if (err != CHIP_NO_ERROR || loadControlEventStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct constructor"); - return nullptr; - } - - newElement_0 = env->NewObject(loadControlEventStructStructClass_1, loadControlEventStructStructCtor_1, - newElement_0_eventID, newElement_0_programID, newElement_0_control, - newElement_0_deviceClass, newElement_0_enrollmentGroup, newElement_0_criticality, - newElement_0_startTime, newElement_0_transitions); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -22646,36 +21226,39 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); } - jclass temperatureControlStructStructClass_5; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct", - temperatureControlStructStructClass_5); - if (err != CHIP_NO_ERROR) { - ChipLogError( - Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct"); - return nullptr; - } + jclass temperatureControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct", + temperatureControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct"); + return nullptr; + } - jmethodID temperatureControlStructStructCtor_5; - err = chip::JniReferences::GetInstance().FindMethod( - env, temperatureControlStructStructClass_5, "", - "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &temperatureControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || temperatureControlStructStructCtor_5 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct constructor"); - return nullptr; - } + jmethodID temperatureControlStructStructCtor_5; + err = chip::JniReferences::GetInstance().FindMethod( + env, temperatureControlStructStructClass_5, "", + "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &temperatureControlStructStructCtor_5); + if (err != CHIP_NO_ERROR || temperatureControlStructStructCtor_5 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct " + "constructor"); + return nullptr; + } - newElement_2_temperatureControlInsideOptional = - env->NewObject(temperatureControlStructStructClass_5, temperatureControlStructStructCtor_5, - newElement_2_temperatureControlInsideOptional_coolingTempOffset, - newElement_2_temperatureControlInsideOptional_heatingtTempOffset, - newElement_2_temperatureControlInsideOptional_coolingTempSetpoint, - newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); + newElement_2_temperatureControlInsideOptional = + env->NewObject(temperatureControlStructStructClass_5, temperatureControlStructStructCtor_5, + newElement_2_temperatureControlInsideOptional_coolingTempOffset, + newElement_2_temperatureControlInsideOptional_heatingtTempOffset, + newElement_2_temperatureControlInsideOptional_coolingTempSetpoint, + newElement_2_temperatureControlInsideOptional_heatingTempSetpoint); + } chip::JniReferences::GetInstance().CreateOptional(newElement_2_temperatureControlInsideOptional, newElement_2_temperatureControl); } @@ -22698,32 +21281,35 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jninewElement_2_averageLoadControlInsideOptional_loadAdjustment, newElement_2_averageLoadControlInsideOptional_loadAdjustment); - jclass averageLoadControlStructStructClass_5; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct", - averageLoadControlStructStructClass_5); - if (err != CHIP_NO_ERROR) { - ChipLogError( - Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct"); - return nullptr; - } + jclass averageLoadControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct", + averageLoadControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct"); + return nullptr; + } - jmethodID averageLoadControlStructStructCtor_5; - err = chip::JniReferences::GetInstance().FindMethod(env, averageLoadControlStructStructClass_5, "", - "(Ljava/lang/Integer;)V", - &averageLoadControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || averageLoadControlStructStructCtor_5 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct constructor"); - return nullptr; - } + jmethodID averageLoadControlStructStructCtor_5; + err = chip::JniReferences::GetInstance().FindMethod(env, averageLoadControlStructStructClass_5, + "", "(Ljava/lang/Integer;)V", + &averageLoadControlStructStructCtor_5); + if (err != CHIP_NO_ERROR || averageLoadControlStructStructCtor_5 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct " + "constructor"); + return nullptr; + } - newElement_2_averageLoadControlInsideOptional = - env->NewObject(averageLoadControlStructStructClass_5, averageLoadControlStructStructCtor_5, - newElement_2_averageLoadControlInsideOptional_loadAdjustment); + newElement_2_averageLoadControlInsideOptional = + env->NewObject(averageLoadControlStructStructClass_5, averageLoadControlStructStructCtor_5, + newElement_2_averageLoadControlInsideOptional_loadAdjustment); + } chip::JniReferences::GetInstance().CreateOptional(newElement_2_averageLoadControlInsideOptional, newElement_2_averageLoadControl); } @@ -22746,32 +21332,34 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jninewElement_2_dutyCycleControlInsideOptional_dutyCycle, newElement_2_dutyCycleControlInsideOptional_dutyCycle); - jclass dutyCycleControlStructStructClass_5; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct", - dutyCycleControlStructStructClass_5); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, - "Could not find class ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct"); - return nullptr; - } + jclass dutyCycleControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct", + dutyCycleControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct"); + return nullptr; + } - jmethodID dutyCycleControlStructStructCtor_5; - err = chip::JniReferences::GetInstance().FindMethod(env, dutyCycleControlStructStructClass_5, "", - "(Ljava/lang/Integer;)V", - &dutyCycleControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || dutyCycleControlStructStructCtor_5 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct constructor"); - return nullptr; - } + jmethodID dutyCycleControlStructStructCtor_5; + err = chip::JniReferences::GetInstance().FindMethod(env, dutyCycleControlStructStructClass_5, "", + "(Ljava/lang/Integer;)V", + &dutyCycleControlStructStructCtor_5); + if (err != CHIP_NO_ERROR || dutyCycleControlStructStructCtor_5 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct " + "constructor"); + return nullptr; + } - newElement_2_dutyCycleControlInsideOptional = - env->NewObject(dutyCycleControlStructStructClass_5, dutyCycleControlStructStructCtor_5, - newElement_2_dutyCycleControlInsideOptional_dutyCycle); + newElement_2_dutyCycleControlInsideOptional = + env->NewObject(dutyCycleControlStructStructClass_5, dutyCycleControlStructStructCtor_5, + newElement_2_dutyCycleControlInsideOptional_dutyCycle); + } chip::JniReferences::GetInstance().CreateOptional(newElement_2_dutyCycleControlInsideOptional, newElement_2_dutyCycleControl); } @@ -22794,32 +21382,35 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jninewElement_2_powerSavingsControlInsideOptional_powerSavings, newElement_2_powerSavingsControlInsideOptional_powerSavings); - jclass powerSavingsControlStructStructClass_5; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct", - powerSavingsControlStructStructClass_5); - if (err != CHIP_NO_ERROR) { - ChipLogError( - Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct"); - return nullptr; - } + jclass powerSavingsControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct", + powerSavingsControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct"); + return nullptr; + } - jmethodID powerSavingsControlStructStructCtor_5; - err = chip::JniReferences::GetInstance().FindMethod(env, powerSavingsControlStructStructClass_5, "", - "(Ljava/lang/Integer;)V", - &powerSavingsControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || powerSavingsControlStructStructCtor_5 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct constructor"); - return nullptr; - } + jmethodID powerSavingsControlStructStructCtor_5; + err = chip::JniReferences::GetInstance().FindMethod(env, powerSavingsControlStructStructClass_5, + "", "(Ljava/lang/Integer;)V", + &powerSavingsControlStructStructCtor_5); + if (err != CHIP_NO_ERROR || powerSavingsControlStructStructCtor_5 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct " + "constructor"); + return nullptr; + } - newElement_2_powerSavingsControlInsideOptional = - env->NewObject(powerSavingsControlStructStructClass_5, powerSavingsControlStructStructCtor_5, - newElement_2_powerSavingsControlInsideOptional_powerSavings); + newElement_2_powerSavingsControlInsideOptional = + env->NewObject(powerSavingsControlStructStructClass_5, powerSavingsControlStructStructCtor_5, + newElement_2_powerSavingsControlInsideOptional_powerSavings); + } chip::JniReferences::GetInstance().CreateOptional(newElement_2_powerSavingsControlInsideOptional, newElement_2_powerSavingsControl); } @@ -22842,97 +21433,107 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jninewElement_2_heatingSourceControlInsideOptional_heatingSource, newElement_2_heatingSourceControlInsideOptional_heatingSource); - jclass heatingSourceControlStructStructClass_5; + { + jclass heatingSourceControlStructStructClass_5; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct", + heatingSourceControlStructStructClass_5); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct"); + return nullptr; + } + + jmethodID heatingSourceControlStructStructCtor_5; + err = chip::JniReferences::GetInstance().FindMethod(env, heatingSourceControlStructStructClass_5, + "", "(Ljava/lang/Integer;)V", + &heatingSourceControlStructStructCtor_5); + if (err != CHIP_NO_ERROR || heatingSourceControlStructStructCtor_5 == nullptr) + { + ChipLogError(Zcl, + "Could not find " + "ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct constructor"); + return nullptr; + } + + newElement_2_heatingSourceControlInsideOptional = + env->NewObject(heatingSourceControlStructStructClass_5, heatingSourceControlStructStructCtor_5, + newElement_2_heatingSourceControlInsideOptional_heatingSource); + } + chip::JniReferences::GetInstance().CreateOptional(newElement_2_heatingSourceControlInsideOptional, + newElement_2_heatingSourceControl); + } + + { + jclass loadControlEventTransitionStructStructClass_3; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct", - heatingSourceControlStructStructClass_5); + env, + "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct", + loadControlEventTransitionStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError( - Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct"); + ChipLogError(Zcl, + "Could not find class " + "ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct"); return nullptr; } - jmethodID heatingSourceControlStructStructCtor_5; - err = chip::JniReferences::GetInstance().FindMethod(env, heatingSourceControlStructStructClass_5, "", - "(Ljava/lang/Integer;)V", - &heatingSourceControlStructStructCtor_5); - if (err != CHIP_NO_ERROR || heatingSourceControlStructStructCtor_5 == nullptr) + jmethodID loadControlEventTransitionStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod( + env, loadControlEventTransitionStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &loadControlEventTransitionStructStructCtor_3); + if (err != CHIP_NO_ERROR || loadControlEventTransitionStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct " - "constructor"); + ChipLogError( + Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct " + "constructor"); return nullptr; } - newElement_2_heatingSourceControlInsideOptional = - env->NewObject(heatingSourceControlStructStructClass_5, heatingSourceControlStructStructCtor_5, - newElement_2_heatingSourceControlInsideOptional_heatingSource); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_heatingSourceControlInsideOptional, - newElement_2_heatingSourceControl); + newElement_2 = env->NewObject(loadControlEventTransitionStructStructClass_3, + loadControlEventTransitionStructStructCtor_3, newElement_2_duration, + newElement_2_control, newElement_2_temperatureControl, + newElement_2_averageLoadControl, newElement_2_dutyCycleControl, + newElement_2_powerSavingsControl, newElement_2_heatingSourceControl); } + chip::JniReferences::GetInstance().AddToList(newElement_0_transitions, newElement_2); + } - jclass loadControlEventTransitionStructStructClass_3; + { + jclass loadControlEventStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct", - loadControlEventTransitionStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct", + loadControlEventStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError( - Zcl, - "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct"); + ChipLogError(Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct"); return nullptr; } - jmethodID loadControlEventTransitionStructStructCtor_3; + jmethodID loadControlEventStructStructCtor_1; err = chip::JniReferences::GetInstance().FindMethod( - env, loadControlEventTransitionStructStructClass_3, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/" - "util/Optional;Ljava/util/Optional;)V", - &loadControlEventTransitionStructStructCtor_3); - if (err != CHIP_NO_ERROR || loadControlEventTransitionStructStructCtor_3 == nullptr) + env, loadControlEventStructStructClass_1, "", + "([B[BLjava/lang/Integer;Ljava/lang/Long;Ljava/util/Optional;Ljava/lang/Integer;Ljava/lang/Long;Ljava/util/" + "ArrayList;)V", + &loadControlEventStructStructCtor_1); + if (err != CHIP_NO_ERROR || loadControlEventStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventTransitionStruct " - "constructor"); + ChipLogError( + Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct constructor"); return nullptr; } - newElement_2 = - env->NewObject(loadControlEventTransitionStructStructClass_3, loadControlEventTransitionStructStructCtor_3, - newElement_2_duration, newElement_2_control, newElement_2_temperatureControl, - newElement_2_averageLoadControl, newElement_2_dutyCycleControl, - newElement_2_powerSavingsControl, newElement_2_heatingSourceControl); - chip::JniReferences::GetInstance().AddToList(newElement_0_transitions, newElement_2); - } - - jclass loadControlEventStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct", - loadControlEventStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct"); - return nullptr; + newElement_0 = env->NewObject(loadControlEventStructStructClass_1, loadControlEventStructStructCtor_1, + newElement_0_eventID, newElement_0_programID, newElement_0_control, + newElement_0_deviceClass, newElement_0_enrollmentGroup, newElement_0_criticality, + newElement_0_startTime, newElement_0_transitions); } - - jmethodID loadControlEventStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, loadControlEventStructStructClass_1, "", - "([B[BLjava/lang/Integer;Ljava/lang/Long;Ljava/util/Optional;Ljava/lang/Integer;Ljava/lang/Long;Ljava/util/" - "ArrayList;)V", - &loadControlEventStructStructCtor_1); - if (err != CHIP_NO_ERROR || loadControlEventStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterLoadControlEventStruct constructor"); - return nullptr; - } - - newElement_0 = env->NewObject(loadControlEventStructStructClass_1, loadControlEventStructStructCtor_1, - newElement_0_eventID, newElement_0_programID, newElement_0_control, - newElement_0_deviceClass, newElement_0_enrollmentGroup, newElement_0_criticality, - newElement_0_startTime, newElement_0_transitions); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -23051,31 +21652,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -23256,57 +21832,63 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(newElement_3_labelInsideOptional, newElement_3_label); } - jclass messageResponseOptionStructStructClass_4; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MessagesClusterMessageResponseOptionStruct", - messageResponseOptionStructStructClass_4); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$MessagesClusterMessageResponseOptionStruct"); - return nullptr; - } + jclass messageResponseOptionStructStructClass_4; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$MessagesClusterMessageResponseOptionStruct", + messageResponseOptionStructStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MessagesClusterMessageResponseOptionStruct"); + return nullptr; + } - jmethodID messageResponseOptionStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod(env, messageResponseOptionStructStructClass_4, "", - "(Ljava/util/Optional;Ljava/util/Optional;)V", - &messageResponseOptionStructStructCtor_4); - if (err != CHIP_NO_ERROR || messageResponseOptionStructStructCtor_4 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MessagesClusterMessageResponseOptionStruct constructor"); - return nullptr; - } + jmethodID messageResponseOptionStructStructCtor_4; + err = chip::JniReferences::GetInstance().FindMethod( + env, messageResponseOptionStructStructClass_4, "", + "(Ljava/util/Optional;Ljava/util/Optional;)V", &messageResponseOptionStructStructCtor_4); + if (err != CHIP_NO_ERROR || messageResponseOptionStructStructCtor_4 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$MessagesClusterMessageResponseOptionStruct constructor"); + return nullptr; + } - newElement_3 = - env->NewObject(messageResponseOptionStructStructClass_4, messageResponseOptionStructStructCtor_4, - newElement_3_messageResponseID, newElement_3_label); + newElement_3 = + env->NewObject(messageResponseOptionStructStructClass_4, messageResponseOptionStructStructCtor_4, + newElement_3_messageResponseID, newElement_3_label); + } chip::JniReferences::GetInstance().AddToList(newElement_0_responsesInsideOptional, newElement_3); } chip::JniReferences::GetInstance().CreateOptional(newElement_0_responsesInsideOptional, newElement_0_responses); } - jclass messageStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MessagesClusterMessageStruct", messageStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$MessagesClusterMessageStruct"); - return nullptr; - } + jclass messageStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$MessagesClusterMessageStruct", messageStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MessagesClusterMessageStruct"); + return nullptr; + } - jmethodID messageStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, messageStructStructClass_1, "", - "([BLjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" - "Long;Ljava/lang/Long;Ljava/lang/String;Ljava/util/Optional;)V", - &messageStructStructCtor_1); - if (err != CHIP_NO_ERROR || messageStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MessagesClusterMessageStruct constructor"); - return nullptr; - } + jmethodID messageStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, messageStructStructClass_1, "", + "([BLjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/util/" + "Optional;)V", + &messageStructStructCtor_1); + if (err != CHIP_NO_ERROR || messageStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MessagesClusterMessageStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(messageStructStructClass_1, messageStructStructCtor_1, newElement_0_messageID, - newElement_0_priority, newElement_0_messageControl, newElement_0_startTime, - newElement_0_duration, newElement_0_messageText, newElement_0_responses); + newElement_0 = env->NewObject(messageStructStructClass_1, messageStructStructCtor_1, newElement_0_messageID, + newElement_0_priority, newElement_0_messageControl, newElement_0_startTime, + newElement_0_duration, newElement_0_messageText, newElement_0_responses); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -23385,33 +21967,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -23615,30 +22172,34 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_3_maxDurationClassName.c_str(), newElement_3_maxDurationCtorSignature.c_str(), jninewElement_3_maxDuration, newElement_3_maxDuration); - jclass powerAdjustStructStructClass_4; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterPowerAdjustStruct", - powerAdjustStructStructClass_4); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementClusterPowerAdjustStruct"); - return nullptr; - } + jclass powerAdjustStructStructClass_4; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterPowerAdjustStruct", + powerAdjustStructStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$DeviceEnergyManagementClusterPowerAdjustStruct"); + return nullptr; + } - jmethodID powerAdjustStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod( - env, powerAdjustStructStructClass_4, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V", &powerAdjustStructStructCtor_4); - if (err != CHIP_NO_ERROR || powerAdjustStructStructCtor_4 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$DeviceEnergyManagementClusterPowerAdjustStruct constructor"); - return nullptr; - } + jmethodID powerAdjustStructStructCtor_4; + err = chip::JniReferences::GetInstance().FindMethod( + env, powerAdjustStructStructClass_4, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V", + &powerAdjustStructStructCtor_4); + if (err != CHIP_NO_ERROR || powerAdjustStructStructCtor_4 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$DeviceEnergyManagementClusterPowerAdjustStruct constructor"); + return nullptr; + } - newElement_3 = - env->NewObject(powerAdjustStructStructClass_4, powerAdjustStructStructCtor_4, newElement_3_minPower, - newElement_3_maxPower, newElement_3_minDuration, newElement_3_maxDuration); + newElement_3 = + env->NewObject(powerAdjustStructStructClass_4, powerAdjustStructStructCtor_4, newElement_3_minPower, + newElement_3_maxPower, newElement_3_minDuration, newElement_3_maxDuration); + } chip::JniReferences::GetInstance().AddToList(value_powerAdjustCapability, newElement_3); } } @@ -23649,29 +22210,32 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateBoxedObject( value_causeClassName.c_str(), value_causeCtorSignature.c_str(), jnivalue_cause, value_cause); - jclass powerAdjustCapabilityStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterPowerAdjustCapabilityStruct", - powerAdjustCapabilityStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementClusterPowerAdjustCapabilityStruct"); - return nullptr; - } + jclass powerAdjustCapabilityStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterPowerAdjustCapabilityStruct", + powerAdjustCapabilityStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$DeviceEnergyManagementClusterPowerAdjustCapabilityStruct"); + return nullptr; + } - jmethodID powerAdjustCapabilityStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, powerAdjustCapabilityStructStructClass_1, "", - "(Ljava/util/ArrayList;Ljava/lang/Integer;)V", - &powerAdjustCapabilityStructStructCtor_1); - if (err != CHIP_NO_ERROR || powerAdjustCapabilityStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$DeviceEnergyManagementClusterPowerAdjustCapabilityStruct constructor"); - return nullptr; - } + jmethodID powerAdjustCapabilityStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, powerAdjustCapabilityStructStructClass_1, "", + "(Ljava/util/ArrayList;Ljava/lang/Integer;)V", + &powerAdjustCapabilityStructStructCtor_1); + if (err != CHIP_NO_ERROR || powerAdjustCapabilityStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$DeviceEnergyManagementClusterPowerAdjustCapabilityStruct constructor"); + return nullptr; + } - value = env->NewObject(powerAdjustCapabilityStructStructClass_1, powerAdjustCapabilityStructStructCtor_1, - value_powerAdjustCapability, value_cause); + value = env->NewObject(powerAdjustCapabilityStructStructClass_1, powerAdjustCapabilityStructStructCtor_1, + value_powerAdjustCapability, value_cause); + } } return value; } @@ -24016,29 +22580,33 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_5_currency); } - jclass costStructStructClass_6; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterCostStruct", - costStructStructClass_6); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementClusterCostStruct"); - return nullptr; + jclass costStructStructClass_6; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterCostStruct", + costStructStructClass_6); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementClusterCostStruct"); + return nullptr; + } + + jmethodID costStructStructCtor_6; + err = chip::JniReferences::GetInstance().FindMethod( + env, costStructStructClass_6, "", + "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/util/Optional;)V", + &costStructStructCtor_6); + if (err != CHIP_NO_ERROR || costStructStructCtor_6 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DeviceEnergyManagementClusterCostStruct constructor"); + return nullptr; + } + + newElement_5 = + env->NewObject(costStructStructClass_6, costStructStructCtor_6, newElement_5_costType, + newElement_5_value, newElement_5_decimalPoints, newElement_5_currency); } - - jmethodID costStructStructCtor_6; - err = chip::JniReferences::GetInstance().FindMethod( - env, costStructStructClass_6, "", - "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/util/Optional;)V", - &costStructStructCtor_6); - if (err != CHIP_NO_ERROR || costStructStructCtor_6 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementClusterCostStruct constructor"); - return nullptr; - } - - newElement_5 = env->NewObject(costStructStructClass_6, costStructStructCtor_6, newElement_5_costType, - newElement_5_value, newElement_5_decimalPoints, newElement_5_currency); chip::JniReferences::GetInstance().AddToList(newElement_2_costsInsideOptional, newElement_5); } chip::JniReferences::GetInstance().CreateOptional(newElement_2_costsInsideOptional, newElement_2_costs); @@ -24120,36 +22688,40 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_maxDurationAdjustment); } - jclass slotStructStructClass_3; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterSlotStruct", slotStructStructClass_3); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementClusterSlotStruct"); - return nullptr; - } + jclass slotStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterSlotStruct", + slotStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementClusterSlotStruct"); + return nullptr; + } - jmethodID slotStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod( - env, slotStructStructClass_3, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/" - "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &slotStructStructCtor_3); - if (err != CHIP_NO_ERROR || slotStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementClusterSlotStruct constructor"); - return nullptr; - } + jmethodID slotStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod( + env, slotStructStructClass_3, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &slotStructStructCtor_3); + if (err != CHIP_NO_ERROR || slotStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementClusterSlotStruct constructor"); + return nullptr; + } - newElement_2 = env->NewObject( - slotStructStructClass_3, slotStructStructCtor_3, newElement_2_minDuration, newElement_2_maxDuration, - newElement_2_defaultDuration, newElement_2_elapsedSlotTime, newElement_2_remainingSlotTime, - newElement_2_slotIsPausable, newElement_2_minPauseDuration, newElement_2_maxPauseDuration, - newElement_2_manufacturerESAState, newElement_2_nominalPower, newElement_2_minPower, newElement_2_maxPower, - newElement_2_nominalEnergy, newElement_2_costs, newElement_2_minPowerAdjustment, - newElement_2_maxPowerAdjustment, newElement_2_minDurationAdjustment, newElement_2_maxDurationAdjustment); + newElement_2 = env->NewObject( + slotStructStructClass_3, slotStructStructCtor_3, newElement_2_minDuration, newElement_2_maxDuration, + newElement_2_defaultDuration, newElement_2_elapsedSlotTime, newElement_2_remainingSlotTime, + newElement_2_slotIsPausable, newElement_2_minPauseDuration, newElement_2_maxPauseDuration, + newElement_2_manufacturerESAState, newElement_2_nominalPower, newElement_2_minPower, + newElement_2_maxPower, newElement_2_nominalEnergy, newElement_2_costs, newElement_2_minPowerAdjustment, + newElement_2_maxPowerAdjustment, newElement_2_minDurationAdjustment, + newElement_2_maxDurationAdjustment); + } chip::JniReferences::GetInstance().AddToList(value_slots, newElement_2); } jobject value_forecastUpdateReason; @@ -24160,31 +22732,33 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value_forecastUpdateReasonClassName.c_str(), value_forecastUpdateReasonCtorSignature.c_str(), jnivalue_forecastUpdateReason, value_forecastUpdateReason); - jclass forecastStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterForecastStruct", - forecastStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementClusterForecastStruct"); - return nullptr; - } + jclass forecastStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementClusterForecastStruct", + forecastStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementClusterForecastStruct"); + return nullptr; + } - jmethodID forecastStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, forecastStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/lang/Boolean;Ljava/util/ArrayList;Ljava/lang/Integer;)V", - &forecastStructStructCtor_1); - if (err != CHIP_NO_ERROR || forecastStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementClusterForecastStruct constructor"); - return nullptr; - } + jmethodID forecastStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, forecastStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/lang/Boolean;Ljava/util/ArrayList;Ljava/lang/Integer;)V", + &forecastStructStructCtor_1); + if (err != CHIP_NO_ERROR || forecastStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementClusterForecastStruct constructor"); + return nullptr; + } - value = env->NewObject(forecastStructStructClass_1, forecastStructStructCtor_1, value_forecastID, - value_activeSlotNumber, value_startTime, value_endTime, value_earliestStartTime, - value_latestEndTime, value_isPausable, value_slots, value_forecastUpdateReason); + value = env->NewObject(forecastStructStructClass_1, forecastStructStructCtor_1, value_forecastID, + value_activeSlotNumber, value_startTime, value_endTime, value_earliestStartTime, + value_latestEndTime, value_isPausable, value_slots, value_forecastUpdateReason); + } } return value; } @@ -24254,31 +22828,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -24865,31 +23414,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -24993,27 +23517,29 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(newElement_0_labelInsideOptional, newElement_0_label); } - jclass balanceStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$EnergyPreferenceClusterBalanceStruct", balanceStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$EnergyPreferenceClusterBalanceStruct"); - return nullptr; - } + jclass balanceStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$EnergyPreferenceClusterBalanceStruct", balanceStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$EnergyPreferenceClusterBalanceStruct"); + return nullptr; + } - jmethodID balanceStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, balanceStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &balanceStructStructCtor_1); - if (err != CHIP_NO_ERROR || balanceStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$EnergyPreferenceClusterBalanceStruct constructor"); - return nullptr; - } + jmethodID balanceStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, balanceStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &balanceStructStructCtor_1); + if (err != CHIP_NO_ERROR || balanceStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$EnergyPreferenceClusterBalanceStruct constructor"); + return nullptr; + } - newElement_0 = - env->NewObject(balanceStructStructClass_1, balanceStructStructCtor_1, newElement_0_step, newElement_0_label); + newElement_0 = env->NewObject(balanceStructStructClass_1, balanceStructStructCtor_1, newElement_0_step, + newElement_0_label); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -25095,27 +23621,29 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(newElement_0_labelInsideOptional, newElement_0_label); } - jclass balanceStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$EnergyPreferenceClusterBalanceStruct", balanceStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$EnergyPreferenceClusterBalanceStruct"); - return nullptr; - } + jclass balanceStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$EnergyPreferenceClusterBalanceStruct", balanceStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$EnergyPreferenceClusterBalanceStruct"); + return nullptr; + } - jmethodID balanceStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, balanceStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/Optional;)V", - &balanceStructStructCtor_1); - if (err != CHIP_NO_ERROR || balanceStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$EnergyPreferenceClusterBalanceStruct constructor"); - return nullptr; - } + jmethodID balanceStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, balanceStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &balanceStructStructCtor_1); + if (err != CHIP_NO_ERROR || balanceStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$EnergyPreferenceClusterBalanceStruct constructor"); + return nullptr; + } - newElement_0 = - env->NewObject(balanceStructStructClass_1, balanceStructStructCtor_1, newElement_0_step, newElement_0_label); + newElement_0 = env->NewObject(balanceStructStructClass_1, balanceStructStructCtor_1, newElement_0_step, + newElement_0_label); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -25186,31 +23714,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -25378,31 +23881,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -25528,51 +24006,57 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass modeTagStructStructClass_3; + { + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$EnergyEvseModeClusterModeTagStruct", + modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$EnergyEvseModeClusterModeTagStruct"); + return nullptr; + } + + jmethodID modeTagStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", + "(Ljava/util/Optional;Ljava/lang/Integer;)V", + &modeTagStructStructCtor_3); + if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$EnergyEvseModeClusterModeTagStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + } + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + { + jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$EnergyEvseModeClusterModeTagStruct", modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$EnergyEvseModeClusterModeOptionStruct", + modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$EnergyEvseModeClusterModeTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$EnergyEvseModeClusterModeOptionStruct"); return nullptr; } - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + jmethodID modeOptionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); + if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$EnergyEvseModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$EnergyEvseModeClusterModeOptionStruct constructor"); return nullptr; } - newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$EnergyEvseModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$EnergyEvseModeClusterModeOptionStruct"); - return nullptr; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$EnergyEvseModeClusterModeOptionStruct constructor"); - return nullptr; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -25593,52 +24077,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -25689,31 +24127,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -25839,51 +24252,57 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass modeTagStructStructClass_3; + { + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$WaterHeaterModeClusterModeTagStruct", + modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$WaterHeaterModeClusterModeTagStruct"); + return nullptr; + } + + jmethodID modeTagStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", + "(Ljava/util/Optional;Ljava/lang/Integer;)V", + &modeTagStructStructCtor_3); + if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$WaterHeaterModeClusterModeTagStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + } + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + { + jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$WaterHeaterModeClusterModeTagStruct", modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$WaterHeaterModeClusterModeOptionStruct", + modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$WaterHeaterModeClusterModeTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$WaterHeaterModeClusterModeOptionStruct"); return nullptr; } - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + jmethodID modeOptionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); + if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$WaterHeaterModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$WaterHeaterModeClusterModeOptionStruct constructor"); return nullptr; } - newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$WaterHeaterModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$WaterHeaterModeClusterModeOptionStruct"); - return nullptr; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$WaterHeaterModeClusterModeOptionStruct constructor"); - return nullptr; + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -25904,52 +24323,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -26000,31 +24373,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -26150,53 +24498,59 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass modeTagStructStructClass_3; + { + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementModeClusterModeTagStruct", + modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementModeClusterModeTagStruct"); + return nullptr; + } + + jmethodID modeTagStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", + "(Ljava/util/Optional;Ljava/lang/Integer;)V", + &modeTagStructStructCtor_3); + if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DeviceEnergyManagementModeClusterModeTagStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + } + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + { + jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementModeClusterModeTagStruct", - modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementModeClusterModeOptionStruct", + modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementModeClusterModeTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementModeClusterModeOptionStruct"); return nullptr; } - jmethodID modeTagStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, modeTagStructStructClass_3, "", - "(Ljava/util/Optional;Ljava/lang/Integer;)V", - &modeTagStructStructCtor_3); - if (err != CHIP_NO_ERROR || modeTagStructStructCtor_3 == nullptr) + jmethodID modeOptionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &modeOptionStructStructCtor_1); + if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, + "Could not find ChipStructs$DeviceEnergyManagementModeClusterModeOptionStruct constructor"); return nullptr; } - newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DeviceEnergyManagementModeClusterModeOptionStruct", - modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DeviceEnergyManagementModeClusterModeOptionStruct"); - return nullptr; - } - - jmethodID modeOptionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V", - &modeOptionStructStructCtor_1); - if (err != CHIP_NO_ERROR || modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DeviceEnergyManagementModeClusterModeOptionStruct constructor"); - return nullptr; + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -26217,52 +24571,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -26313,31 +24621,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -27218,31 +25501,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -27768,31 +26026,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -27941,30 +26174,32 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jninewElement_0_areaInfo_locationInfo_areaType, newElement_0_areaInfo_locationInfo_areaType); } - jclass locationDescriptorStructStructClass_4; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterLocationDescriptorStruct", - locationDescriptorStructStructClass_4); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterLocationDescriptorStruct"); - return nullptr; - } + jclass locationDescriptorStructStructClass_4; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterLocationDescriptorStruct", + locationDescriptorStructStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterLocationDescriptorStruct"); + return nullptr; + } - jmethodID locationDescriptorStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod( - env, locationDescriptorStructStructClass_4, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;)V", &locationDescriptorStructStructCtor_4); - if (err != CHIP_NO_ERROR || locationDescriptorStructStructCtor_4 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterLocationDescriptorStruct constructor"); - return nullptr; - } + jmethodID locationDescriptorStructStructCtor_4; + err = chip::JniReferences::GetInstance().FindMethod( + env, locationDescriptorStructStructClass_4, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;)V", &locationDescriptorStructStructCtor_4); + if (err != CHIP_NO_ERROR || locationDescriptorStructStructCtor_4 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterLocationDescriptorStruct constructor"); + return nullptr; + } - newElement_0_areaInfo_locationInfo = - env->NewObject(locationDescriptorStructStructClass_4, locationDescriptorStructStructCtor_4, - newElement_0_areaInfo_locationInfo_locationName, - newElement_0_areaInfo_locationInfo_floorNumber, newElement_0_areaInfo_locationInfo_areaType); + newElement_0_areaInfo_locationInfo = env->NewObject( + locationDescriptorStructStructClass_4, locationDescriptorStructStructCtor_4, + newElement_0_areaInfo_locationInfo_locationName, newElement_0_areaInfo_locationInfo_floorNumber, + newElement_0_areaInfo_locationInfo_areaType); + } } jobject newElement_0_areaInfo_landmarkInfo; if (entry_0.areaInfo.landmarkInfo.IsNull()) @@ -28000,77 +26235,83 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_areaInfo_landmarkInfo_relativePositionTag); } - jclass landmarkInfoStructStructClass_4; + { + jclass landmarkInfoStructStructClass_4; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterLandmarkInfoStruct", + landmarkInfoStructStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterLandmarkInfoStruct"); + return nullptr; + } + + jmethodID landmarkInfoStructStructCtor_4; + err = chip::JniReferences::GetInstance().FindMethod(env, landmarkInfoStructStructClass_4, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &landmarkInfoStructStructCtor_4); + if (err != CHIP_NO_ERROR || landmarkInfoStructStructCtor_4 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterLandmarkInfoStruct constructor"); + return nullptr; + } + + newElement_0_areaInfo_landmarkInfo = env->NewObject( + landmarkInfoStructStructClass_4, landmarkInfoStructStructCtor_4, + newElement_0_areaInfo_landmarkInfo_landmarkTag, newElement_0_areaInfo_landmarkInfo_relativePositionTag); + } + } + + { + jclass areaInfoStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterLandmarkInfoStruct", - landmarkInfoStructStructClass_4); + env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterAreaInfoStruct", areaInfoStructStructClass_2); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterLandmarkInfoStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterAreaInfoStruct"); return nullptr; } - jmethodID landmarkInfoStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod(env, landmarkInfoStructStructClass_4, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;)V", - &landmarkInfoStructStructCtor_4); - if (err != CHIP_NO_ERROR || landmarkInfoStructStructCtor_4 == nullptr) + jmethodID areaInfoStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod( + env, areaInfoStructStructClass_2, "", + "(Lchip/devicecontroller/ChipStructs$ServiceAreaClusterLocationDescriptorStruct;Lchip/devicecontroller/" + "ChipStructs$ServiceAreaClusterLandmarkInfoStruct;)V", + &areaInfoStructStructCtor_2); + if (err != CHIP_NO_ERROR || areaInfoStructStructCtor_2 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterLandmarkInfoStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterAreaInfoStruct constructor"); return nullptr; } - newElement_0_areaInfo_landmarkInfo = env->NewObject( - landmarkInfoStructStructClass_4, landmarkInfoStructStructCtor_4, - newElement_0_areaInfo_landmarkInfo_landmarkTag, newElement_0_areaInfo_landmarkInfo_relativePositionTag); - } - - jclass areaInfoStructStructClass_2; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterAreaInfoStruct", areaInfoStructStructClass_2); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterAreaInfoStruct"); - return nullptr; + newElement_0_areaInfo = env->NewObject(areaInfoStructStructClass_2, areaInfoStructStructCtor_2, + newElement_0_areaInfo_locationInfo, newElement_0_areaInfo_landmarkInfo); } - jmethodID areaInfoStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod( - env, areaInfoStructStructClass_2, "", - "(Lchip/devicecontroller/ChipStructs$ServiceAreaClusterLocationDescriptorStruct;Lchip/devicecontroller/" - "ChipStructs$ServiceAreaClusterLandmarkInfoStruct;)V", - &areaInfoStructStructCtor_2); - if (err != CHIP_NO_ERROR || areaInfoStructStructCtor_2 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterAreaInfoStruct constructor"); - return nullptr; - } - - newElement_0_areaInfo = env->NewObject(areaInfoStructStructClass_2, areaInfoStructStructCtor_2, - newElement_0_areaInfo_locationInfo, newElement_0_areaInfo_landmarkInfo); + jclass areaStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterAreaStruct", areaStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterAreaStruct"); + return nullptr; + } - jclass areaStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterAreaStruct", areaStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterAreaStruct"); - return nullptr; - } + jmethodID areaStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, areaStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Long;Lchip/devicecontroller/ChipStructs$ServiceAreaClusterAreaInfoStruct;)V", + &areaStructStructCtor_1); + if (err != CHIP_NO_ERROR || areaStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterAreaStruct constructor"); + return nullptr; + } - jmethodID areaStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, areaStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Long;Lchip/devicecontroller/ChipStructs$ServiceAreaClusterAreaInfoStruct;)V", - &areaStructStructCtor_1); - if (err != CHIP_NO_ERROR || areaStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterAreaStruct constructor"); - return nullptr; + newElement_0 = env->NewObject(areaStructStructClass_1, areaStructStructCtor_1, newElement_0_areaID, + newElement_0_mapID, newElement_0_areaInfo); } - - newElement_0 = env->NewObject(areaStructStructClass_1, areaStructStructCtor_1, newElement_0_areaID, - newElement_0_mapID, newElement_0_areaInfo); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -28101,25 +26342,28 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - jclass mapStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterMapStruct", mapStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterMapStruct"); - return nullptr; - } + jclass mapStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterMapStruct", mapStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterMapStruct"); + return nullptr; + } - jmethodID mapStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, mapStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/String;)V", &mapStructStructCtor_1); - if (err != CHIP_NO_ERROR || mapStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterMapStruct constructor"); - return nullptr; - } + jmethodID mapStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, mapStructStructClass_1, "", "(Ljava/lang/Long;Ljava/lang/String;)V", &mapStructStructCtor_1); + if (err != CHIP_NO_ERROR || mapStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterMapStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(mapStructStructClass_1, mapStructStructCtor_1, newElement_0_mapID, newElement_0_name); + newElement_0 = + env->NewObject(mapStructStructClass_1, mapStructStructCtor_1, newElement_0_mapID, newElement_0_name); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -28278,27 +26522,31 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_estimatedTime); } - jclass progressStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterProgressStruct", progressStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterProgressStruct"); - return nullptr; - } + jclass progressStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterProgressStruct", progressStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterProgressStruct"); + return nullptr; + } - jmethodID progressStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, progressStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", &progressStructStructCtor_1); - if (err != CHIP_NO_ERROR || progressStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterProgressStruct constructor"); - return nullptr; - } + jmethodID progressStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, progressStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", + &progressStructStructCtor_1); + if (err != CHIP_NO_ERROR || progressStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterProgressStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(progressStructStructClass_1, progressStructStructCtor_1, newElement_0_areaID, - newElement_0_status, newElement_0_totalOperationalTime, newElement_0_estimatedTime); + newElement_0 = + env->NewObject(progressStructStructClass_1, progressStructStructCtor_1, newElement_0_areaID, + newElement_0_status, newElement_0_totalOperationalTime, newElement_0_estimatedTime); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -28353,31 +26601,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -28989,31 +27212,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -29980,28 +28178,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_presetTypeFeaturesClassName.c_str(), newElement_0_presetTypeFeaturesCtorSignature.c_str(), jninewElement_0_presetTypeFeatures, newElement_0_presetTypeFeatures); - jclass presetTypeStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ThermostatClusterPresetTypeStruct", presetTypeStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterPresetTypeStruct"); - return nullptr; - } + jclass presetTypeStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ThermostatClusterPresetTypeStruct", presetTypeStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterPresetTypeStruct"); + return nullptr; + } - jmethodID presetTypeStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, presetTypeStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &presetTypeStructStructCtor_1); - if (err != CHIP_NO_ERROR || presetTypeStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterPresetTypeStruct constructor"); - return nullptr; - } + jmethodID presetTypeStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, presetTypeStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &presetTypeStructStructCtor_1); + if (err != CHIP_NO_ERROR || presetTypeStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterPresetTypeStruct constructor"); + return nullptr; + } - newElement_0 = - env->NewObject(presetTypeStructStructClass_1, presetTypeStructStructCtor_1, newElement_0_presetScenario, - newElement_0_numberOfPresets, newElement_0_presetTypeFeatures); + newElement_0 = + env->NewObject(presetTypeStructStructClass_1, presetTypeStructStructCtor_1, newElement_0_presetScenario, + newElement_0_numberOfPresets, newElement_0_presetTypeFeatures); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -30044,28 +28244,31 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_scheduleTypeFeaturesClassName.c_str(), newElement_0_scheduleTypeFeaturesCtorSignature.c_str(), jninewElement_0_scheduleTypeFeatures, newElement_0_scheduleTypeFeatures); - jclass scheduleTypeStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ThermostatClusterScheduleTypeStruct", scheduleTypeStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterScheduleTypeStruct"); - return nullptr; - } + jclass scheduleTypeStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ThermostatClusterScheduleTypeStruct", + scheduleTypeStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterScheduleTypeStruct"); + return nullptr; + } - jmethodID scheduleTypeStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, scheduleTypeStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &scheduleTypeStructStructCtor_1); - if (err != CHIP_NO_ERROR || scheduleTypeStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterScheduleTypeStruct constructor"); - return nullptr; - } + jmethodID scheduleTypeStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, scheduleTypeStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &scheduleTypeStructStructCtor_1); + if (err != CHIP_NO_ERROR || scheduleTypeStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterScheduleTypeStruct constructor"); + return nullptr; + } - newElement_0 = - env->NewObject(scheduleTypeStructStructClass_1, scheduleTypeStructStructCtor_1, newElement_0_systemMode, - newElement_0_numberOfSchedules, newElement_0_scheduleTypeFeatures); + newElement_0 = + env->NewObject(scheduleTypeStructStructClass_1, scheduleTypeStructStructCtor_1, newElement_0_systemMode, + newElement_0_numberOfSchedules, newElement_0_scheduleTypeFeatures); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -30292,29 +28495,31 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jninewElement_0_builtIn, newElement_0_builtIn); } - jclass presetStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ThermostatClusterPresetStruct", presetStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterPresetStruct"); - return nullptr; - } + jclass presetStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ThermostatClusterPresetStruct", presetStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterPresetStruct"); + return nullptr; + } - jmethodID presetStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, presetStructStructClass_1, "", - "([BLjava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Boolean;)V", - &presetStructStructCtor_1); - if (err != CHIP_NO_ERROR || presetStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterPresetStruct constructor"); - return nullptr; - } + jmethodID presetStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, presetStructStructClass_1, "", + "([BLjava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Boolean;)V", + &presetStructStructCtor_1); + if (err != CHIP_NO_ERROR || presetStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterPresetStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(presetStructStructClass_1, presetStructStructCtor_1, newElement_0_presetHandle, - newElement_0_presetScenario, newElement_0_name, newElement_0_coolingSetpoint, - newElement_0_heatingSetpoint, newElement_0_builtIn); + newElement_0 = env->NewObject(presetStructStructClass_1, presetStructStructCtor_1, newElement_0_presetHandle, + newElement_0_presetScenario, newElement_0_name, newElement_0_coolingSetpoint, + newElement_0_heatingSetpoint, newElement_0_builtIn); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -30479,32 +28684,34 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_heatingSetpoint); } - jclass scheduleTransitionStructStructClass_3; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ThermostatClusterScheduleTransitionStruct", - scheduleTransitionStructStructClass_3); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterScheduleTransitionStruct"); - return nullptr; - } + jclass scheduleTransitionStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ThermostatClusterScheduleTransitionStruct", + scheduleTransitionStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterScheduleTransitionStruct"); + return nullptr; + } - jmethodID scheduleTransitionStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod( - env, scheduleTransitionStructStructClass_3, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/" - "util/Optional;)V", - &scheduleTransitionStructStructCtor_3); - if (err != CHIP_NO_ERROR || scheduleTransitionStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterScheduleTransitionStruct constructor"); - return nullptr; - } + jmethodID scheduleTransitionStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod( + env, scheduleTransitionStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;)V", + &scheduleTransitionStructStructCtor_3); + if (err != CHIP_NO_ERROR || scheduleTransitionStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterScheduleTransitionStruct constructor"); + return nullptr; + } - newElement_2 = - env->NewObject(scheduleTransitionStructStructClass_3, scheduleTransitionStructStructCtor_3, - newElement_2_dayOfWeek, newElement_2_transitionTime, newElement_2_presetHandle, - newElement_2_systemMode, newElement_2_coolingSetpoint, newElement_2_heatingSetpoint); + newElement_2 = + env->NewObject(scheduleTransitionStructStructClass_3, scheduleTransitionStructStructCtor_3, + newElement_2_dayOfWeek, newElement_2_transitionTime, newElement_2_presetHandle, + newElement_2_systemMode, newElement_2_coolingSetpoint, newElement_2_heatingSetpoint); + } chip::JniReferences::GetInstance().AddToList(newElement_0_transitions, newElement_2); } jobject newElement_0_builtIn; @@ -30522,29 +28729,31 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jninewElement_0_builtIn, newElement_0_builtIn); } - jclass scheduleStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ThermostatClusterScheduleStruct", scheduleStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterScheduleStruct"); - return nullptr; - } + jclass scheduleStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ThermostatClusterScheduleStruct", scheduleStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterScheduleStruct"); + return nullptr; + } - jmethodID scheduleStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, scheduleStructStructClass_1, "", - "([BLjava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/ArrayList;Ljava/lang/Boolean;)V", - &scheduleStructStructCtor_1); - if (err != CHIP_NO_ERROR || scheduleStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterScheduleStruct constructor"); - return nullptr; - } + jmethodID scheduleStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, scheduleStructStructClass_1, "", + "([BLjava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/ArrayList;Ljava/lang/Boolean;)V", + &scheduleStructStructCtor_1); + if (err != CHIP_NO_ERROR || scheduleStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterScheduleStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(scheduleStructStructClass_1, scheduleStructStructCtor_1, newElement_0_scheduleHandle, - newElement_0_systemMode, newElement_0_name, newElement_0_presetHandle, - newElement_0_transitions, newElement_0_builtIn); + newElement_0 = env->NewObject(scheduleStructStructClass_1, scheduleStructStructCtor_1, + newElement_0_scheduleHandle, newElement_0_systemMode, newElement_0_name, + newElement_0_presetHandle, newElement_0_transitions, newElement_0_builtIn); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -30622,31 +28831,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -30970,31 +29154,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -31160,31 +29319,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -32207,31 +30341,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -32600,31 +30709,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -32850,31 +30934,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -33077,31 +31136,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -33405,31 +31439,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -33632,31 +31641,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -33859,31 +31843,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -34046,28 +32005,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value_holdTimeDefaultCtorSignature.c_str(), jnivalue_holdTimeDefault, value_holdTimeDefault); - jclass holdTimeLimitsStructStructClass_0; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$OccupancySensingClusterHoldTimeLimitsStruct", - holdTimeLimitsStructStructClass_0); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OccupancySensingClusterHoldTimeLimitsStruct"); - return nullptr; - } + jclass holdTimeLimitsStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$OccupancySensingClusterHoldTimeLimitsStruct", + holdTimeLimitsStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OccupancySensingClusterHoldTimeLimitsStruct"); + return nullptr; + } - jmethodID holdTimeLimitsStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, holdTimeLimitsStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &holdTimeLimitsStructStructCtor_0); - if (err != CHIP_NO_ERROR || holdTimeLimitsStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OccupancySensingClusterHoldTimeLimitsStruct constructor"); - return nullptr; - } + jmethodID holdTimeLimitsStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod(env, holdTimeLimitsStructStructClass_0, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", + &holdTimeLimitsStructStructCtor_0); + if (err != CHIP_NO_ERROR || holdTimeLimitsStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OccupancySensingClusterHoldTimeLimitsStruct constructor"); + return nullptr; + } - value = env->NewObject(holdTimeLimitsStructStructClass_0, holdTimeLimitsStructStructCtor_0, value_holdTimeMin, - value_holdTimeMax, value_holdTimeDefault); + value = env->NewObject(holdTimeLimitsStructStructClass_0, holdTimeLimitsStructStructCtor_0, value_holdTimeMin, + value_holdTimeMax, value_holdTimeDefault); + } return value; } case Attributes::PIROccupiedToUnoccupiedDelay::Id: { @@ -34264,31 +32225,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -34617,31 +32553,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -34970,31 +32881,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -35323,31 +33209,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -35676,31 +33537,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -36029,31 +33865,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -36382,31 +34193,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -36735,31 +34521,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -37088,31 +34849,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -37441,31 +35177,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -37794,31 +35505,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -37981,31 +35667,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -38228,31 +35889,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -38382,29 +36018,32 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_activeTimestampClassName.c_str(), newElement_0_activeTimestampCtorSignature.c_str(), jninewElement_0_activeTimestamp, newElement_0_activeTimestamp); - jclass threadNetworkStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ThreadNetworkDirectoryClusterThreadNetworkStruct", - threadNetworkStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDirectoryClusterThreadNetworkStruct"); - return nullptr; - } + jclass threadNetworkStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ThreadNetworkDirectoryClusterThreadNetworkStruct", + threadNetworkStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThreadNetworkDirectoryClusterThreadNetworkStruct"); + return nullptr; + } - jmethodID threadNetworkStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, threadNetworkStructStructClass_1, "", - "([BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/Long;)V", - &threadNetworkStructStructCtor_1); - if (err != CHIP_NO_ERROR || threadNetworkStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ThreadNetworkDirectoryClusterThreadNetworkStruct constructor"); - return nullptr; - } + jmethodID threadNetworkStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, threadNetworkStructStructClass_1, "", + "([BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/Long;)V", &threadNetworkStructStructCtor_1); + if (err != CHIP_NO_ERROR || threadNetworkStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$ThreadNetworkDirectoryClusterThreadNetworkStruct constructor"); + return nullptr; + } - newElement_0 = - env->NewObject(threadNetworkStructStructClass_1, threadNetworkStructStructCtor_1, newElement_0_extendedPanID, - newElement_0_networkName, newElement_0_channel, newElement_0_activeTimestamp); + newElement_0 = env->NewObject(threadNetworkStructStructClass_1, threadNetworkStructStructCtor_1, + newElement_0_extendedPanID, newElement_0_networkName, newElement_0_channel, + newElement_0_activeTimestamp); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -38475,31 +36114,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -38644,31 +36258,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -38833,31 +36422,33 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(newElement_0_typeInsideOptional, newElement_0_type); } - jclass channelInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfoStruct", channelInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfoStruct"); - return nullptr; - } + jclass channelInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfoStruct", channelInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfoStruct"); + return nullptr; + } - jmethodID channelInfoStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, channelInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/Optional;)V", - &channelInfoStructStructCtor_1); - if (err != CHIP_NO_ERROR || channelInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfoStruct constructor"); - return nullptr; - } + jmethodID channelInfoStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, channelInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/" + "util/Optional;Ljava/util/Optional;)V", + &channelInfoStructStructCtor_1); + if (err != CHIP_NO_ERROR || channelInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfoStruct constructor"); + return nullptr; + } - newElement_0 = - env->NewObject(channelInfoStructStructClass_1, channelInfoStructStructCtor_1, newElement_0_majorNumber, - newElement_0_minorNumber, newElement_0_name, newElement_0_callSign, - newElement_0_affiliateCallSign, newElement_0_identifier, newElement_0_type); + newElement_0 = + env->NewObject(channelInfoStructStructClass_1, channelInfoStructStructCtor_1, newElement_0_majorNumber, + newElement_0_minorNumber, newElement_0_name, newElement_0_callSign, + newElement_0_affiliateCallSign, newElement_0_identifier, newElement_0_type); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -38912,28 +36503,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value_lineupInfoTypeCtorSignature.c_str(), jnivalue_lineupInfoType, value_lineupInfoType); - jclass lineupInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ChannelClusterLineupInfoStruct", lineupInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterLineupInfoStruct"); - return nullptr; - } + jclass lineupInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ChannelClusterLineupInfoStruct", lineupInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterLineupInfoStruct"); + return nullptr; + } - jmethodID lineupInfoStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, lineupInfoStructStructClass_1, "", - "(Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;)V", - &lineupInfoStructStructCtor_1); - if (err != CHIP_NO_ERROR || lineupInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterLineupInfoStruct constructor"); - return nullptr; - } + jmethodID lineupInfoStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, lineupInfoStructStructClass_1, "", + "(Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;)V", + &lineupInfoStructStructCtor_1); + if (err != CHIP_NO_ERROR || lineupInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterLineupInfoStruct constructor"); + return nullptr; + } - value = env->NewObject(lineupInfoStructStructClass_1, lineupInfoStructStructCtor_1, value_operatorName, - value_lineupName, value_postalCode, value_lineupInfoType); + value = env->NewObject(lineupInfoStructStructClass_1, lineupInfoStructStructCtor_1, value_operatorName, + value_lineupName, value_postalCode, value_lineupInfoType); + } } return value; } @@ -39032,33 +36625,222 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(value_typeInsideOptional, value_type); } - jclass channelInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfoStruct", channelInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfoStruct"); - return nullptr; + jclass channelInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ChannelClusterChannelInfoStruct", channelInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ChannelClusterChannelInfoStruct"); + return nullptr; + } + + jmethodID channelInfoStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, channelInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/" + "util/Optional;Ljava/util/Optional;)V", + &channelInfoStructStructCtor_1); + if (err != CHIP_NO_ERROR || channelInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfoStruct constructor"); + return nullptr; + } + + value = env->NewObject(channelInfoStructStructClass_1, channelInfoStructStructCtor_1, value_majorNumber, + value_minorNumber, value_name, value_callSign, value_affiliateCallSign, value_identifier, + value_type); } + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::TargetNavigator::Id: { + using namespace app::Clusters::TargetNavigator; + switch (aPath.mAttributeId) + { + case Attributes::TargetList::Id: { + using TypeInfo = Attributes::TargetList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_identifier; + std::string newElement_0_identifierClassName = "java/lang/Integer"; + std::string newElement_0_identifierCtorSignature = "(I)V"; + jint jninewElement_0_identifier = static_cast(entry_0.identifier); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_identifierClassName.c_str(), + newElement_0_identifierCtorSignature.c_str(), + jninewElement_0_identifier, newElement_0_identifier); + jobject newElement_0_name; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - jmethodID channelInfoStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, channelInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/Optional;)V", - &channelInfoStructStructCtor_1); - if (err != CHIP_NO_ERROR || channelInfoStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ChannelClusterChannelInfoStruct constructor"); - return nullptr; - } + jclass targetInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$TargetNavigatorClusterTargetInfoStruct", + targetInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$TargetNavigatorClusterTargetInfoStruct"); + return nullptr; + } + + jmethodID targetInfoStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, targetInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/String;)V", + &targetInfoStructStructCtor_1); + if (err != CHIP_NO_ERROR || targetInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$TargetNavigatorClusterTargetInfoStruct constructor"); + return nullptr; + } - value = env->NewObject(channelInfoStructStructClass_1, channelInfoStructStructCtor_1, value_majorNumber, - value_minorNumber, value_name, value_callSign, value_affiliateCallSign, value_identifier, - value_type); + newElement_0 = env->NewObject(targetInfoStructStructClass_1, targetInfoStructStructCtor_1, + newElement_0_identifier, newElement_0_name); + } + chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } + case Attributes::CurrentTarget::Id: { + using TypeInfo = Attributes::CurrentTarget::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -39109,240 +36891,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - break; - } - break; - } - case app::Clusters::TargetNavigator::Id: { - using namespace app::Clusters::TargetNavigator; - switch (aPath.mAttributeId) - { - case Attributes::TargetList::Id: { - using TypeInfo = Attributes::TargetList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - jobject newElement_0_identifier; - std::string newElement_0_identifierClassName = "java/lang/Integer"; - std::string newElement_0_identifierCtorSignature = "(I)V"; - jint jninewElement_0_identifier = static_cast(entry_0.identifier); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_identifierClassName.c_str(), - newElement_0_identifierCtorSignature.c_str(), - jninewElement_0_identifier, newElement_0_identifier); - jobject newElement_0_name; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - - jclass targetInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$TargetNavigatorClusterTargetInfoStruct", targetInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$TargetNavigatorClusterTargetInfoStruct"); - return nullptr; - } - - jmethodID targetInfoStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, targetInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/String;)V", - &targetInfoStructStructCtor_1); - if (err != CHIP_NO_ERROR || targetInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$TargetNavigatorClusterTargetInfoStruct constructor"); - return nullptr; - } - - newElement_0 = env->NewObject(targetInfoStructStructClass_1, targetInfoStructStructCtor_1, newElement_0_identifier, - newElement_0_name); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::CurrentTarget::Id: { - using TypeInfo = Attributes::CurrentTarget::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -39507,28 +37055,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value_positionClassName.c_str(), value_positionCtorSignature.c_str(), jnivalue_position, value_position); } - jclass playbackPositionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterPlaybackPositionStruct", - playbackPositionStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterPlaybackPositionStruct"); - return nullptr; - } + jclass playbackPositionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterPlaybackPositionStruct", + playbackPositionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterPlaybackPositionStruct"); + return nullptr; + } - jmethodID playbackPositionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, playbackPositionStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Long;)V", - &playbackPositionStructStructCtor_1); - if (err != CHIP_NO_ERROR || playbackPositionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterPlaybackPositionStruct constructor"); - return nullptr; - } + jmethodID playbackPositionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, playbackPositionStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Long;)V", + &playbackPositionStructStructCtor_1); + if (err != CHIP_NO_ERROR || playbackPositionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterPlaybackPositionStruct constructor"); + return nullptr; + } - value = env->NewObject(playbackPositionStructStructClass_1, playbackPositionStructStructCtor_1, value_updatedAt, - value_position); + value = env->NewObject(playbackPositionStructStructClass_1, playbackPositionStructStructCtor_1, value_updatedAt, + value_position); + } } return value; } @@ -39643,51 +37193,56 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value_trackAttributes_displayName); } - jclass trackAttributesStructStructClass_3; + { + jclass trackAttributesStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", + trackAttributesStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); + return nullptr; + } + + jmethodID trackAttributesStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_3, "", + "(Ljava/lang/String;Ljava/util/Optional;)V", + &trackAttributesStructStructCtor_3); + if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); + return nullptr; + } + + value_trackAttributes = + env->NewObject(trackAttributesStructStructClass_3, trackAttributesStructStructCtor_3, + value_trackAttributes_languageCode, value_trackAttributes_displayName); + } + } + + { + jclass trackStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", - trackAttributesStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); return nullptr; } - jmethodID trackAttributesStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_3, "", - "(Ljava/lang/String;Ljava/util/Optional;)V", - &trackAttributesStructStructCtor_3); - if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_3 == nullptr) + jmethodID trackStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, trackStructStructClass_1, "", + "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V", + &trackStructStructCtor_1); + if (err != CHIP_NO_ERROR || trackStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); return nullptr; } - value_trackAttributes = env->NewObject(trackAttributesStructStructClass_3, trackAttributesStructStructCtor_3, - value_trackAttributes_languageCode, value_trackAttributes_displayName); + value = env->NewObject(trackStructStructClass_1, trackStructStructCtor_1, value_id, value_trackAttributes); } - - jclass trackStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); - return nullptr; - } - - jmethodID trackStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, trackStructStructClass_1, "", - "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V", - &trackStructStructCtor_1); - if (err != CHIP_NO_ERROR || trackStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); - return nullptr; - } - - value = env->NewObject(trackStructStructClass_1, trackStructStructCtor_1, value_id, value_trackAttributes); } return value; } @@ -39747,53 +37302,58 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_1_trackAttributes_displayNameInsideOptional, newElement_1_trackAttributes_displayName); } - jclass trackAttributesStructStructClass_4; + { + jclass trackAttributesStructStructClass_4; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", + trackAttributesStructStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); + return nullptr; + } + + jmethodID trackAttributesStructStructCtor_4; + err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_4, "", + "(Ljava/lang/String;Ljava/util/Optional;)V", + &trackAttributesStructStructCtor_4); + if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_4 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); + return nullptr; + } + + newElement_1_trackAttributes = + env->NewObject(trackAttributesStructStructClass_4, trackAttributesStructStructCtor_4, + newElement_1_trackAttributes_languageCode, newElement_1_trackAttributes_displayName); + } + } + + { + jclass trackStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", - trackAttributesStructStructClass_4); + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_2); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); return nullptr; } - jmethodID trackAttributesStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_4, "", - "(Ljava/lang/String;Ljava/util/Optional;)V", - &trackAttributesStructStructCtor_4); - if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_4 == nullptr) + jmethodID trackStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod( + env, trackStructStructClass_2, "", + "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V", + &trackStructStructCtor_2); + if (err != CHIP_NO_ERROR || trackStructStructCtor_2 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); return nullptr; } - newElement_1_trackAttributes = - env->NewObject(trackAttributesStructStructClass_4, trackAttributesStructStructCtor_4, - newElement_1_trackAttributes_languageCode, newElement_1_trackAttributes_displayName); - } - - jclass trackStructStructClass_2; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_2); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); - return nullptr; - } - - jmethodID trackStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod( - env, trackStructStructClass_2, "", - "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V", - &trackStructStructCtor_2); - if (err != CHIP_NO_ERROR || trackStructStructCtor_2 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); - return nullptr; + newElement_1 = env->NewObject(trackStructStructClass_2, trackStructStructCtor_2, newElement_1_id, + newElement_1_trackAttributes); } - - newElement_1 = env->NewObject(trackStructStructClass_2, trackStructStructCtor_2, newElement_1_id, - newElement_1_trackAttributes); chip::JniReferences::GetInstance().AddToList(value, newElement_1); } } @@ -39848,51 +37408,56 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value_trackAttributes_displayName); } - jclass trackAttributesStructStructClass_3; + { + jclass trackAttributesStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", + trackAttributesStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); + return nullptr; + } + + jmethodID trackAttributesStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_3, "", + "(Ljava/lang/String;Ljava/util/Optional;)V", + &trackAttributesStructStructCtor_3); + if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); + return nullptr; + } + + value_trackAttributes = + env->NewObject(trackAttributesStructStructClass_3, trackAttributesStructStructCtor_3, + value_trackAttributes_languageCode, value_trackAttributes_displayName); + } + } + + { + jclass trackStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", - trackAttributesStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); return nullptr; } - jmethodID trackAttributesStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_3, "", - "(Ljava/lang/String;Ljava/util/Optional;)V", - &trackAttributesStructStructCtor_3); - if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_3 == nullptr) + jmethodID trackStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, trackStructStructClass_1, "", + "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V", + &trackStructStructCtor_1); + if (err != CHIP_NO_ERROR || trackStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); return nullptr; } - value_trackAttributes = env->NewObject(trackAttributesStructStructClass_3, trackAttributesStructStructCtor_3, - value_trackAttributes_languageCode, value_trackAttributes_displayName); - } - - jclass trackStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); - return nullptr; + value = env->NewObject(trackStructStructClass_1, trackStructStructCtor_1, value_id, value_trackAttributes); } - - jmethodID trackStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, trackStructStructClass_1, "", - "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V", - &trackStructStructCtor_1); - if (err != CHIP_NO_ERROR || trackStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); - return nullptr; - } - - value = env->NewObject(trackStructStructClass_1, trackStructStructCtor_1, value_id, value_trackAttributes); } return value; } @@ -39952,53 +37517,58 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_1_trackAttributes_displayNameInsideOptional, newElement_1_trackAttributes_displayName); } - jclass trackAttributesStructStructClass_4; + { + jclass trackAttributesStructStructClass_4; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", + trackAttributesStructStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); + return nullptr; + } + + jmethodID trackAttributesStructStructCtor_4; + err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_4, "", + "(Ljava/lang/String;Ljava/util/Optional;)V", + &trackAttributesStructStructCtor_4); + if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_4 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); + return nullptr; + } + + newElement_1_trackAttributes = + env->NewObject(trackAttributesStructStructClass_4, trackAttributesStructStructCtor_4, + newElement_1_trackAttributes_languageCode, newElement_1_trackAttributes_displayName); + } + } + + { + jclass trackStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct", - trackAttributesStructStructClass_4); + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_2); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackAttributesStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); return nullptr; } - jmethodID trackAttributesStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod(env, trackAttributesStructStructClass_4, "", - "(Ljava/lang/String;Ljava/util/Optional;)V", - &trackAttributesStructStructCtor_4); - if (err != CHIP_NO_ERROR || trackAttributesStructStructCtor_4 == nullptr) + jmethodID trackStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod( + env, trackStructStructClass_2, "", + "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V", + &trackStructStructCtor_2); + if (err != CHIP_NO_ERROR || trackStructStructCtor_2 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackAttributesStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); return nullptr; } - newElement_1_trackAttributes = - env->NewObject(trackAttributesStructStructClass_4, trackAttributesStructStructCtor_4, - newElement_1_trackAttributes_languageCode, newElement_1_trackAttributes_displayName); + newElement_1 = env->NewObject(trackStructStructClass_2, trackStructStructCtor_2, newElement_1_id, + newElement_1_trackAttributes); } - - jclass trackStructStructClass_2; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackStruct", trackStructStructClass_2); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterTrackStruct"); - return nullptr; - } - - jmethodID trackStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod( - env, trackStructStructClass_2, "", - "(Ljava/lang/String;Lchip/devicecontroller/ChipStructs$MediaPlaybackClusterTrackAttributesStruct;)V", - &trackStructStructCtor_2); - if (err != CHIP_NO_ERROR || trackStructStructCtor_2 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterTrackStruct constructor"); - return nullptr; - } - - newElement_1 = env->NewObject(trackStructStructClass_2, trackStructStructCtor_2, newElement_1_id, - newElement_1_trackAttributes); chip::JniReferences::GetInstance().AddToList(value, newElement_1); } } @@ -40054,31 +37624,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -40182,27 +37727,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR LogErrorOnFailure( chip::JniReferences::GetInstance().CharToStringUTF(entry_0.description, newElement_0_description)); - jclass inputInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MediaInputClusterInputInfoStruct", inputInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaInputClusterInputInfoStruct"); - return nullptr; - } + jclass inputInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$MediaInputClusterInputInfoStruct", inputInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaInputClusterInputInfoStruct"); + return nullptr; + } - jmethodID inputInfoStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, inputInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;)V", &inputInfoStructStructCtor_1); - if (err != CHIP_NO_ERROR || inputInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MediaInputClusterInputInfoStruct constructor"); - return nullptr; - } + jmethodID inputInfoStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, inputInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;)V", + &inputInfoStructStructCtor_1); + if (err != CHIP_NO_ERROR || inputInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaInputClusterInputInfoStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(inputInfoStructStructClass_1, inputInfoStructStructCtor_1, newElement_0_index, - newElement_0_inputType, newElement_0_name, newElement_0_description); + newElement_0 = env->NewObject(inputInfoStructStructClass_1, inputInfoStructStructCtor_1, newElement_0_index, + newElement_0_inputType, newElement_0_name, newElement_0_description); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -40273,33 +37821,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -40415,31 +37938,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -40557,31 +38055,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -40736,31 +38209,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -40861,27 +38309,29 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - jclass outputInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$AudioOutputClusterOutputInfoStruct", outputInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$AudioOutputClusterOutputInfoStruct"); - return nullptr; - } + jclass outputInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$AudioOutputClusterOutputInfoStruct", outputInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$AudioOutputClusterOutputInfoStruct"); + return nullptr; + } - jmethodID outputInfoStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, outputInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;)V", - &outputInfoStructStructCtor_1); - if (err != CHIP_NO_ERROR || outputInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$AudioOutputClusterOutputInfoStruct constructor"); - return nullptr; - } + jmethodID outputInfoStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, outputInfoStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;)V", + &outputInfoStructStructCtor_1); + if (err != CHIP_NO_ERROR || outputInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$AudioOutputClusterOutputInfoStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(outputInfoStructStructClass_1, outputInfoStructStructCtor_1, newElement_0_index, - newElement_0_outputType, newElement_0_name); + newElement_0 = env->NewObject(outputInfoStructStructClass_1, outputInfoStructStructCtor_1, newElement_0_index, + newElement_0_outputType, newElement_0_name); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -40952,31 +38402,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -41096,28 +38521,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().application.applicationID, value_application_applicationID)); - jclass applicationStructStructClass_2; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationStruct", - applicationStructStructClass_2); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationLauncherClusterApplicationStruct"); - return nullptr; - } + jclass applicationStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationStruct", + applicationStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationLauncherClusterApplicationStruct"); + return nullptr; + } - jmethodID applicationStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod(env, applicationStructStructClass_2, "", - "(Ljava/lang/Integer;Ljava/lang/String;)V", - &applicationStructStructCtor_2); - if (err != CHIP_NO_ERROR || applicationStructStructCtor_2 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ApplicationLauncherClusterApplicationStruct constructor"); - return nullptr; - } + jmethodID applicationStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod(env, applicationStructStructClass_2, "", + "(Ljava/lang/Integer;Ljava/lang/String;)V", + &applicationStructStructCtor_2); + if (err != CHIP_NO_ERROR || applicationStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ApplicationLauncherClusterApplicationStruct constructor"); + return nullptr; + } - value_application = env->NewObject(applicationStructStructClass_2, applicationStructStructCtor_2, - value_application_catalogVendorID, value_application_applicationID); + value_application = env->NewObject(applicationStructStructClass_2, applicationStructStructCtor_2, + value_application_catalogVendorID, value_application_applicationID); + } jobject value_endpoint; if (!cppValue.Value().endpoint.HasValue()) { @@ -41135,29 +38562,31 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(value_endpointInsideOptional, value_endpoint); } - jclass applicationEPStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationEPStruct", - applicationEPStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationLauncherClusterApplicationEPStruct"); - return nullptr; - } + jclass applicationEPStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationEPStruct", + applicationEPStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationLauncherClusterApplicationEPStruct"); + return nullptr; + } - jmethodID applicationEPStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, applicationEPStructStructClass_1, "", - "(Lchip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationStruct;Ljava/util/Optional;)V", - &applicationEPStructStructCtor_1); - if (err != CHIP_NO_ERROR || applicationEPStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ApplicationLauncherClusterApplicationEPStruct constructor"); - return nullptr; - } + jmethodID applicationEPStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, applicationEPStructStructClass_1, "", + "(Lchip/devicecontroller/ChipStructs$ApplicationLauncherClusterApplicationStruct;Ljava/util/Optional;)V", + &applicationEPStructStructCtor_1); + if (err != CHIP_NO_ERROR || applicationEPStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ApplicationLauncherClusterApplicationEPStruct constructor"); + return nullptr; + } - value = env->NewObject(applicationEPStructStructClass_1, applicationEPStructStructCtor_1, value_application, - value_endpoint); + value = env->NewObject(applicationEPStructStructClass_1, applicationEPStructStructCtor_1, value_application, + value_endpoint); + } } return value; } @@ -41211,31 +38640,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -41378,27 +38782,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value_applicationID; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.applicationID, value_applicationID)); - jclass applicationStructStructClass_0; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ApplicationBasicClusterApplicationStruct", applicationStructStructClass_0); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationBasicClusterApplicationStruct"); - return nullptr; - } + jclass applicationStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ApplicationBasicClusterApplicationStruct", + applicationStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ApplicationBasicClusterApplicationStruct"); + return nullptr; + } - jmethodID applicationStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, applicationStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/lang/String;)V", - &applicationStructStructCtor_0); - if (err != CHIP_NO_ERROR || applicationStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ApplicationBasicClusterApplicationStruct constructor"); - return nullptr; - } + jmethodID applicationStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod(env, applicationStructStructClass_0, "", + "(Ljava/lang/Integer;Ljava/lang/String;)V", + &applicationStructStructCtor_0); + if (err != CHIP_NO_ERROR || applicationStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ApplicationBasicClusterApplicationStruct constructor"); + return nullptr; + } - value = env->NewObject(applicationStructStructClass_0, applicationStructStructCtor_0, value_catalogVendorID, - value_applicationID); + value = env->NewObject(applicationStructStructClass_0, applicationStructStructCtor_0, value_catalogVendorID, + value_applicationID); + } return value; } case Attributes::Status::Id: { @@ -41504,31 +38911,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -41646,31 +39028,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -41786,27 +39143,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_ratingNameDesc); } - jclass ratingNameStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ContentControlClusterRatingNameStruct", ratingNameStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ContentControlClusterRatingNameStruct"); - return nullptr; - } + jclass ratingNameStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ContentControlClusterRatingNameStruct", + ratingNameStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ContentControlClusterRatingNameStruct"); + return nullptr; + } - jmethodID ratingNameStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, ratingNameStructStructClass_1, "", - "(Ljava/lang/String;Ljava/util/Optional;)V", - &ratingNameStructStructCtor_1); - if (err != CHIP_NO_ERROR || ratingNameStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ContentControlClusterRatingNameStruct constructor"); - return nullptr; - } + jmethodID ratingNameStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, ratingNameStructStructClass_1, "", + "(Ljava/lang/String;Ljava/util/Optional;)V", + &ratingNameStructStructCtor_1); + if (err != CHIP_NO_ERROR || ratingNameStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ContentControlClusterRatingNameStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(ratingNameStructStructClass_1, ratingNameStructStructCtor_1, newElement_0_ratingName, - newElement_0_ratingNameDesc); + newElement_0 = env->NewObject(ratingNameStructStructClass_1, ratingNameStructStructCtor_1, + newElement_0_ratingName, newElement_0_ratingNameDesc); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -41855,27 +39215,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_ratingNameDesc); } - jclass ratingNameStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ContentControlClusterRatingNameStruct", ratingNameStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ContentControlClusterRatingNameStruct"); - return nullptr; - } + jclass ratingNameStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ContentControlClusterRatingNameStruct", + ratingNameStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ContentControlClusterRatingNameStruct"); + return nullptr; + } - jmethodID ratingNameStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, ratingNameStructStructClass_1, "", - "(Ljava/lang/String;Ljava/util/Optional;)V", - &ratingNameStructStructCtor_1); - if (err != CHIP_NO_ERROR || ratingNameStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ContentControlClusterRatingNameStruct constructor"); - return nullptr; - } + jmethodID ratingNameStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, ratingNameStructStructClass_1, "", + "(Ljava/lang/String;Ljava/util/Optional;)V", + &ratingNameStructStructCtor_1); + if (err != CHIP_NO_ERROR || ratingNameStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ContentControlClusterRatingNameStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(ratingNameStructStructClass_1, ratingNameStructStructCtor_1, newElement_0_ratingName, - newElement_0_ratingNameDesc); + newElement_0 = env->NewObject(ratingNameStructStructClass_1, ratingNameStructStructCtor_1, + newElement_0_ratingName, newElement_0_ratingNameDesc); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -41990,8 +39353,100 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::ContentAppObserver::Id: { + using namespace app::Clusters::ContentAppObserver; + switch (aPath.mAttributeId) + { + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -42078,10 +39533,2334 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::ContentAppObserver::Id: { - using namespace app::Clusters::ContentAppObserver; + case app::Clusters::ZoneManagement::Id: { + using namespace app::Clusters::ZoneManagement; + switch (aPath.mAttributeId) + { + case Attributes::SupportedZoneSources::Id: { + using TypeInfo = Attributes::SupportedZoneSources::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::Zones::Id: { + using TypeInfo = Attributes::Zones::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_zoneID; + std::string newElement_0_zoneIDClassName = "java/lang/Integer"; + std::string newElement_0_zoneIDCtorSignature = "(I)V"; + jint jninewElement_0_zoneID = static_cast(entry_0.zoneID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_zoneIDClassName.c_str(), + newElement_0_zoneIDCtorSignature.c_str(), + jninewElement_0_zoneID, newElement_0_zoneID); + jobject newElement_0_zoneType; + std::string newElement_0_zoneTypeClassName = "java/lang/Integer"; + std::string newElement_0_zoneTypeCtorSignature = "(I)V"; + jint jninewElement_0_zoneType = static_cast(entry_0.zoneType); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_zoneTypeClassName.c_str(), + newElement_0_zoneTypeCtorSignature.c_str(), + jninewElement_0_zoneType, newElement_0_zoneType); + jobject newElement_0_zoneSource; + std::string newElement_0_zoneSourceClassName = "java/lang/Integer"; + std::string newElement_0_zoneSourceCtorSignature = "(I)V"; + jint jninewElement_0_zoneSource = static_cast(entry_0.zoneSource); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_zoneSourceClassName.c_str(), + newElement_0_zoneSourceCtorSignature.c_str(), + jninewElement_0_zoneSource, newElement_0_zoneSource); + + { + jclass zoneInformationStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ZoneManagementClusterZoneInformationStruct", + zoneInformationStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ZoneManagementClusterZoneInformationStruct"); + return nullptr; + } + + jmethodID zoneInformationStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, zoneInformationStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &zoneInformationStructStructCtor_1); + if (err != CHIP_NO_ERROR || zoneInformationStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ZoneManagementClusterZoneInformationStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(zoneInformationStructStructClass_1, zoneInformationStructStructCtor_1, + newElement_0_zoneID, newElement_0_zoneType, newElement_0_zoneSource); + } + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::TimeControl::Id: { + using TypeInfo = Attributes::TimeControl::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_initialDuration; + std::string newElement_0_initialDurationClassName = "java/lang/Integer"; + std::string newElement_0_initialDurationCtorSignature = "(I)V"; + jint jninewElement_0_initialDuration = static_cast(entry_0.initialDuration); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_initialDurationClassName.c_str(), newElement_0_initialDurationCtorSignature.c_str(), + jninewElement_0_initialDuration, newElement_0_initialDuration); + jobject newElement_0_augmentationDuration; + std::string newElement_0_augmentationDurationClassName = "java/lang/Integer"; + std::string newElement_0_augmentationDurationCtorSignature = "(I)V"; + jint jninewElement_0_augmentationDuration = static_cast(entry_0.augmentationDuration); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_augmentationDurationClassName.c_str(), newElement_0_augmentationDurationCtorSignature.c_str(), + jninewElement_0_augmentationDuration, newElement_0_augmentationDuration); + jobject newElement_0_maxDuration; + std::string newElement_0_maxDurationClassName = "java/lang/Long"; + std::string newElement_0_maxDurationCtorSignature = "(J)V"; + jlong jninewElement_0_maxDuration = static_cast(entry_0.maxDuration); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_maxDurationClassName.c_str(), + newElement_0_maxDurationCtorSignature.c_str(), + jninewElement_0_maxDuration, newElement_0_maxDuration); + jobject newElement_0_blindDuration; + std::string newElement_0_blindDurationClassName = "java/lang/Integer"; + std::string newElement_0_blindDurationCtorSignature = "(I)V"; + jint jninewElement_0_blindDuration = static_cast(entry_0.blindDuration); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_blindDurationClassName.c_str(), newElement_0_blindDurationCtorSignature.c_str(), + jninewElement_0_blindDuration, newElement_0_blindDuration); + + { + jclass zoneTriggeringTimeControlStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ZoneManagementClusterZoneTriggeringTimeControlStruct", + zoneTriggeringTimeControlStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ZoneManagementClusterZoneTriggeringTimeControlStruct"); + return nullptr; + } + + jmethodID zoneTriggeringTimeControlStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, zoneTriggeringTimeControlStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;)V", + &zoneTriggeringTimeControlStructStructCtor_1); + if (err != CHIP_NO_ERROR || zoneTriggeringTimeControlStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$ZoneManagementClusterZoneTriggeringTimeControlStruct constructor"); + return nullptr; + } + + newElement_0 = + env->NewObject(zoneTriggeringTimeControlStructStructClass_1, zoneTriggeringTimeControlStructStructCtor_1, + newElement_0_initialDuration, newElement_0_augmentationDuration, newElement_0_maxDuration, + newElement_0_blindDuration); + } + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::Sensitivity::Id: { + using TypeInfo = Attributes::Sensitivity::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::CameraAvStreamManagement::Id: { + using namespace app::Clusters::CameraAvStreamManagement; switch (aPath.mAttributeId) { + case Attributes::MaxConcurrentVideoEncoders::Id: { + using TypeInfo = Attributes::MaxConcurrentVideoEncoders::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::MaxEncodedPixelRate::Id: { + using TypeInfo = Attributes::MaxEncodedPixelRate::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::VideoSensorParams::Id: { + using TypeInfo = Attributes::VideoSensorParams::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + jobject value_sensorWidth; + std::string value_sensorWidthClassName = "java/lang/Integer"; + std::string value_sensorWidthCtorSignature = "(I)V"; + jint jnivalue_sensorWidth = static_cast(cppValue.sensorWidth); + chip::JniReferences::GetInstance().CreateBoxedObject(value_sensorWidthClassName.c_str(), + value_sensorWidthCtorSignature.c_str(), jnivalue_sensorWidth, + value_sensorWidth); + jobject value_sensorHeight; + std::string value_sensorHeightClassName = "java/lang/Integer"; + std::string value_sensorHeightCtorSignature = "(I)V"; + jint jnivalue_sensorHeight = static_cast(cppValue.sensorHeight); + chip::JniReferences::GetInstance().CreateBoxedObject(value_sensorHeightClassName.c_str(), + value_sensorHeightCtorSignature.c_str(), + jnivalue_sensorHeight, value_sensorHeight); + jobject value_HDRCapable; + std::string value_HDRCapableClassName = "java/lang/Boolean"; + std::string value_HDRCapableCtorSignature = "(Z)V"; + jboolean jnivalue_HDRCapable = static_cast(cppValue.HDRCapable); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_HDRCapableClassName.c_str(), value_HDRCapableCtorSignature.c_str(), jnivalue_HDRCapable, value_HDRCapable); + jobject value_maxFPS; + std::string value_maxFPSClassName = "java/lang/Integer"; + std::string value_maxFPSCtorSignature = "(I)V"; + jint jnivalue_maxFPS = static_cast(cppValue.maxFPS); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_maxFPSClassName.c_str(), value_maxFPSCtorSignature.c_str(), jnivalue_maxFPS, value_maxFPS); + jobject value_maxHDRFPS; + std::string value_maxHDRFPSClassName = "java/lang/Integer"; + std::string value_maxHDRFPSCtorSignature = "(I)V"; + jint jnivalue_maxHDRFPS = static_cast(cppValue.maxHDRFPS); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_maxHDRFPSClassName.c_str(), value_maxHDRFPSCtorSignature.c_str(), jnivalue_maxHDRFPS, value_maxHDRFPS); + + { + jclass videoSensorParamsStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoSensorParamsStruct", + videoSensorParamsStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoSensorParamsStruct"); + return nullptr; + } + + jmethodID videoSensorParamsStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod( + env, videoSensorParamsStructStructClass_0, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;)V", + &videoSensorParamsStructStructCtor_0); + if (err != CHIP_NO_ERROR || videoSensorParamsStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterVideoSensorParamsStruct constructor"); + return nullptr; + } + + value = env->NewObject(videoSensorParamsStructStructClass_0, videoSensorParamsStructStructCtor_0, value_sensorWidth, + value_sensorHeight, value_HDRCapable, value_maxFPS, value_maxHDRFPS); + } + return value; + } + case Attributes::NightVisionCapable::Id: { + using TypeInfo = Attributes::NightVisionCapable::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::MinViewport::Id: { + using TypeInfo = Attributes::MinViewport::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + jobject value_width; + std::string value_widthClassName = "java/lang/Integer"; + std::string value_widthCtorSignature = "(I)V"; + jint jnivalue_width = static_cast(cppValue.width); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_widthClassName.c_str(), value_widthCtorSignature.c_str(), jnivalue_width, value_width); + jobject value_height; + std::string value_heightClassName = "java/lang/Integer"; + std::string value_heightCtorSignature = "(I)V"; + jint jnivalue_height = static_cast(cppValue.height); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_heightClassName.c_str(), value_heightCtorSignature.c_str(), jnivalue_height, value_height); + + { + jclass videoResolutionStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", + videoResolutionStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); + return nullptr; + } + + jmethodID videoResolutionStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_0, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &videoResolutionStructStructCtor_0); + if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); + return nullptr; + } + + value = env->NewObject(videoResolutionStructStructClass_0, videoResolutionStructStructCtor_0, value_width, + value_height); + } + return value; + } + case Attributes::RateDistortionTradeOffPoints::Id: { + using TypeInfo = Attributes::RateDistortionTradeOffPoints::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_codec; + std::string newElement_0_codecClassName = "java/lang/Integer"; + std::string newElement_0_codecCtorSignature = "(I)V"; + jint jninewElement_0_codec = static_cast(entry_0.codec); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_codecClassName.c_str(), + newElement_0_codecCtorSignature.c_str(), + jninewElement_0_codec, newElement_0_codec); + jobject newElement_0_resolution; + jobject newElement_0_resolution_width; + std::string newElement_0_resolution_widthClassName = "java/lang/Integer"; + std::string newElement_0_resolution_widthCtorSignature = "(I)V"; + jint jninewElement_0_resolution_width = static_cast(entry_0.resolution.width); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_resolution_widthClassName.c_str(), newElement_0_resolution_widthCtorSignature.c_str(), + jninewElement_0_resolution_width, newElement_0_resolution_width); + jobject newElement_0_resolution_height; + std::string newElement_0_resolution_heightClassName = "java/lang/Integer"; + std::string newElement_0_resolution_heightCtorSignature = "(I)V"; + jint jninewElement_0_resolution_height = static_cast(entry_0.resolution.height); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_resolution_heightClassName.c_str(), newElement_0_resolution_heightCtorSignature.c_str(), + jninewElement_0_resolution_height, newElement_0_resolution_height); + + { + jclass videoResolutionStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", + videoResolutionStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); + return nullptr; + } + + jmethodID videoResolutionStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_2, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &videoResolutionStructStructCtor_2); + if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); + return nullptr; + } + + newElement_0_resolution = env->NewObject(videoResolutionStructStructClass_2, videoResolutionStructStructCtor_2, + newElement_0_resolution_width, newElement_0_resolution_height); + } + jobject newElement_0_minBitRate; + std::string newElement_0_minBitRateClassName = "java/lang/Long"; + std::string newElement_0_minBitRateCtorSignature = "(J)V"; + jlong jninewElement_0_minBitRate = static_cast(entry_0.minBitRate); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_minBitRateClassName.c_str(), + newElement_0_minBitRateCtorSignature.c_str(), + jninewElement_0_minBitRate, newElement_0_minBitRate); + + { + jclass rateDistortionTradeOffPointsStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct", + rateDistortionTradeOffPointsStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, + "Could not find class ChipStructs$CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct"); + return nullptr; + } + + jmethodID rateDistortionTradeOffPointsStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, rateDistortionTradeOffPointsStructStructClass_1, "", + "(Ljava/lang/Integer;Lchip/devicecontroller/" + "ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct;Ljava/lang/Long;)V", + &rateDistortionTradeOffPointsStructStructCtor_1); + if (err != CHIP_NO_ERROR || rateDistortionTradeOffPointsStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterRateDistortionTradeOffPointsStruct " + "constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(rateDistortionTradeOffPointsStructStructClass_1, + rateDistortionTradeOffPointsStructStructCtor_1, newElement_0_codec, + newElement_0_resolution, newElement_0_minBitRate); + } + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::MaxContentBufferSize::Id: { + using TypeInfo = Attributes::MaxContentBufferSize::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::MicrophoneCapabilities::Id: { + using TypeInfo = Attributes::MicrophoneCapabilities::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + jobject value_maxNumberOfChannels; + std::string value_maxNumberOfChannelsClassName = "java/lang/Integer"; + std::string value_maxNumberOfChannelsCtorSignature = "(I)V"; + jint jnivalue_maxNumberOfChannels = static_cast(cppValue.maxNumberOfChannels); + chip::JniReferences::GetInstance().CreateBoxedObject(value_maxNumberOfChannelsClassName.c_str(), + value_maxNumberOfChannelsCtorSignature.c_str(), + jnivalue_maxNumberOfChannels, value_maxNumberOfChannels); + jobject value_supportedCodecs; + chip::JniReferences::GetInstance().CreateArrayList(value_supportedCodecs); + + auto iter_value_supportedCodecs_1 = cppValue.supportedCodecs.begin(); + while (iter_value_supportedCodecs_1.Next()) + { + auto & entry_1 = iter_value_supportedCodecs_1.GetValue(); + jobject newElement_1; + std::string newElement_1ClassName = "java/lang/Integer"; + std::string newElement_1CtorSignature = "(I)V"; + jint jninewElement_1 = static_cast(entry_1); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); + chip::JniReferences::GetInstance().AddToList(value_supportedCodecs, newElement_1); + } + jobject value_supportedSampleRates; + chip::JniReferences::GetInstance().CreateArrayList(value_supportedSampleRates); + + auto iter_value_supportedSampleRates_1 = cppValue.supportedSampleRates.begin(); + while (iter_value_supportedSampleRates_1.Next()) + { + auto & entry_1 = iter_value_supportedSampleRates_1.GetValue(); + jobject newElement_1; + std::string newElement_1ClassName = "java/lang/Long"; + std::string newElement_1CtorSignature = "(J)V"; + jlong jninewElement_1 = static_cast(entry_1); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); + chip::JniReferences::GetInstance().AddToList(value_supportedSampleRates, newElement_1); + } + jobject value_supportedBitDepths; + chip::JniReferences::GetInstance().CreateArrayList(value_supportedBitDepths); + + auto iter_value_supportedBitDepths_1 = cppValue.supportedBitDepths.begin(); + while (iter_value_supportedBitDepths_1.Next()) + { + auto & entry_1 = iter_value_supportedBitDepths_1.GetValue(); + jobject newElement_1; + std::string newElement_1ClassName = "java/lang/Integer"; + std::string newElement_1CtorSignature = "(I)V"; + jint jninewElement_1 = static_cast(entry_1); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); + chip::JniReferences::GetInstance().AddToList(value_supportedBitDepths, newElement_1); + } + + { + jclass audioCapabilitiesStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterAudioCapabilitiesStruct", + audioCapabilitiesStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterAudioCapabilitiesStruct"); + return nullptr; + } + + jmethodID audioCapabilitiesStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod( + env, audioCapabilitiesStructStructClass_0, "", + "(Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/util/ArrayList;)V", + &audioCapabilitiesStructStructCtor_0); + if (err != CHIP_NO_ERROR || audioCapabilitiesStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterAudioCapabilitiesStruct constructor"); + return nullptr; + } + + value = env->NewObject(audioCapabilitiesStructStructClass_0, audioCapabilitiesStructStructCtor_0, + value_maxNumberOfChannels, value_supportedCodecs, value_supportedSampleRates, + value_supportedBitDepths); + } + return value; + } + case Attributes::SpeakerCapabilities::Id: { + using TypeInfo = Attributes::SpeakerCapabilities::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + jobject value_maxNumberOfChannels; + std::string value_maxNumberOfChannelsClassName = "java/lang/Integer"; + std::string value_maxNumberOfChannelsCtorSignature = "(I)V"; + jint jnivalue_maxNumberOfChannels = static_cast(cppValue.maxNumberOfChannels); + chip::JniReferences::GetInstance().CreateBoxedObject(value_maxNumberOfChannelsClassName.c_str(), + value_maxNumberOfChannelsCtorSignature.c_str(), + jnivalue_maxNumberOfChannels, value_maxNumberOfChannels); + jobject value_supportedCodecs; + chip::JniReferences::GetInstance().CreateArrayList(value_supportedCodecs); + + auto iter_value_supportedCodecs_1 = cppValue.supportedCodecs.begin(); + while (iter_value_supportedCodecs_1.Next()) + { + auto & entry_1 = iter_value_supportedCodecs_1.GetValue(); + jobject newElement_1; + std::string newElement_1ClassName = "java/lang/Integer"; + std::string newElement_1CtorSignature = "(I)V"; + jint jninewElement_1 = static_cast(entry_1); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); + chip::JniReferences::GetInstance().AddToList(value_supportedCodecs, newElement_1); + } + jobject value_supportedSampleRates; + chip::JniReferences::GetInstance().CreateArrayList(value_supportedSampleRates); + + auto iter_value_supportedSampleRates_1 = cppValue.supportedSampleRates.begin(); + while (iter_value_supportedSampleRates_1.Next()) + { + auto & entry_1 = iter_value_supportedSampleRates_1.GetValue(); + jobject newElement_1; + std::string newElement_1ClassName = "java/lang/Long"; + std::string newElement_1CtorSignature = "(J)V"; + jlong jninewElement_1 = static_cast(entry_1); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); + chip::JniReferences::GetInstance().AddToList(value_supportedSampleRates, newElement_1); + } + jobject value_supportedBitDepths; + chip::JniReferences::GetInstance().CreateArrayList(value_supportedBitDepths); + + auto iter_value_supportedBitDepths_1 = cppValue.supportedBitDepths.begin(); + while (iter_value_supportedBitDepths_1.Next()) + { + auto & entry_1 = iter_value_supportedBitDepths_1.GetValue(); + jobject newElement_1; + std::string newElement_1ClassName = "java/lang/Integer"; + std::string newElement_1CtorSignature = "(I)V"; + jint jninewElement_1 = static_cast(entry_1); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1ClassName.c_str(), newElement_1CtorSignature.c_str(), jninewElement_1, newElement_1); + chip::JniReferences::GetInstance().AddToList(value_supportedBitDepths, newElement_1); + } + + { + jclass audioCapabilitiesStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterAudioCapabilitiesStruct", + audioCapabilitiesStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterAudioCapabilitiesStruct"); + return nullptr; + } + + jmethodID audioCapabilitiesStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod( + env, audioCapabilitiesStructStructClass_0, "", + "(Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/util/ArrayList;)V", + &audioCapabilitiesStructStructCtor_0); + if (err != CHIP_NO_ERROR || audioCapabilitiesStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterAudioCapabilitiesStruct constructor"); + return nullptr; + } + + value = env->NewObject(audioCapabilitiesStructStructClass_0, audioCapabilitiesStructStructCtor_0, + value_maxNumberOfChannels, value_supportedCodecs, value_supportedSampleRates, + value_supportedBitDepths); + } + return value; + } + case Attributes::TwoWayTalkSupport::Id: { + using TypeInfo = Attributes::TwoWayTalkSupport::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::SupportedSnapshotParams::Id: { + using TypeInfo = Attributes::SupportedSnapshotParams::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_resolution; + jobject newElement_0_resolution_width; + std::string newElement_0_resolution_widthClassName = "java/lang/Integer"; + std::string newElement_0_resolution_widthCtorSignature = "(I)V"; + jint jninewElement_0_resolution_width = static_cast(entry_0.resolution.width); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_resolution_widthClassName.c_str(), newElement_0_resolution_widthCtorSignature.c_str(), + jninewElement_0_resolution_width, newElement_0_resolution_width); + jobject newElement_0_resolution_height; + std::string newElement_0_resolution_heightClassName = "java/lang/Integer"; + std::string newElement_0_resolution_heightCtorSignature = "(I)V"; + jint jninewElement_0_resolution_height = static_cast(entry_0.resolution.height); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_resolution_heightClassName.c_str(), newElement_0_resolution_heightCtorSignature.c_str(), + jninewElement_0_resolution_height, newElement_0_resolution_height); + + { + jclass videoResolutionStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", + videoResolutionStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); + return nullptr; + } + + jmethodID videoResolutionStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_2, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &videoResolutionStructStructCtor_2); + if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); + return nullptr; + } + + newElement_0_resolution = env->NewObject(videoResolutionStructStructClass_2, videoResolutionStructStructCtor_2, + newElement_0_resolution_width, newElement_0_resolution_height); + } + jobject newElement_0_maxFrameRate; + std::string newElement_0_maxFrameRateClassName = "java/lang/Integer"; + std::string newElement_0_maxFrameRateCtorSignature = "(I)V"; + jint jninewElement_0_maxFrameRate = static_cast(entry_0.maxFrameRate); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_maxFrameRateClassName.c_str(), + newElement_0_maxFrameRateCtorSignature.c_str(), + jninewElement_0_maxFrameRate, newElement_0_maxFrameRate); + jobject newElement_0_imageCodec; + std::string newElement_0_imageCodecClassName = "java/lang/Integer"; + std::string newElement_0_imageCodecCtorSignature = "(I)V"; + jint jninewElement_0_imageCodec = static_cast(entry_0.imageCodec); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_imageCodecClassName.c_str(), + newElement_0_imageCodecCtorSignature.c_str(), + jninewElement_0_imageCodec, newElement_0_imageCodec); + + { + jclass snapshotParamsStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterSnapshotParamsStruct", + snapshotParamsStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterSnapshotParamsStruct"); + return nullptr; + } + + jmethodID snapshotParamsStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, snapshotParamsStructStructClass_1, "", + "(Lchip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct;Ljava/lang/" + "Integer;Ljava/lang/Integer;)V", + &snapshotParamsStructStructCtor_1); + if (err != CHIP_NO_ERROR || snapshotParamsStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterSnapshotParamsStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(snapshotParamsStructStructClass_1, snapshotParamsStructStructCtor_1, + newElement_0_resolution, newElement_0_maxFrameRate, newElement_0_imageCodec); + } + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::MaxNetworkBandwidth::Id: { + using TypeInfo = Attributes::MaxNetworkBandwidth::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::CurrentFrameRate::Id: { + using TypeInfo = Attributes::CurrentFrameRate::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::HDRModeEnabled::Id: { + using TypeInfo = Attributes::HDRModeEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::CurrentVideoCodecs::Id: { + using TypeInfo = Attributes::CurrentVideoCodecs::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::CurrentSnapshotConfig::Id: { + using TypeInfo = Attributes::CurrentSnapshotConfig::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + jobject value_resolution; + jobject value_resolution_width; + std::string value_resolution_widthClassName = "java/lang/Integer"; + std::string value_resolution_widthCtorSignature = "(I)V"; + jint jnivalue_resolution_width = static_cast(cppValue.resolution.width); + chip::JniReferences::GetInstance().CreateBoxedObject(value_resolution_widthClassName.c_str(), + value_resolution_widthCtorSignature.c_str(), + jnivalue_resolution_width, value_resolution_width); + jobject value_resolution_height; + std::string value_resolution_heightClassName = "java/lang/Integer"; + std::string value_resolution_heightCtorSignature = "(I)V"; + jint jnivalue_resolution_height = static_cast(cppValue.resolution.height); + chip::JniReferences::GetInstance().CreateBoxedObject(value_resolution_heightClassName.c_str(), + value_resolution_heightCtorSignature.c_str(), + jnivalue_resolution_height, value_resolution_height); + + { + jclass videoResolutionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", + videoResolutionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); + return nullptr; + } + + jmethodID videoResolutionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &videoResolutionStructStructCtor_1); + if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); + return nullptr; + } + + value_resolution = env->NewObject(videoResolutionStructStructClass_1, videoResolutionStructStructCtor_1, + value_resolution_width, value_resolution_height); + } + jobject value_maxFrameRate; + std::string value_maxFrameRateClassName = "java/lang/Integer"; + std::string value_maxFrameRateCtorSignature = "(I)V"; + jint jnivalue_maxFrameRate = static_cast(cppValue.maxFrameRate); + chip::JniReferences::GetInstance().CreateBoxedObject(value_maxFrameRateClassName.c_str(), + value_maxFrameRateCtorSignature.c_str(), + jnivalue_maxFrameRate, value_maxFrameRate); + jobject value_imageCodec; + std::string value_imageCodecClassName = "java/lang/Integer"; + std::string value_imageCodecCtorSignature = "(I)V"; + jint jnivalue_imageCodec = static_cast(cppValue.imageCodec); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_imageCodecClassName.c_str(), value_imageCodecCtorSignature.c_str(), jnivalue_imageCodec, value_imageCodec); + + { + jclass snapshotParamsStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterSnapshotParamsStruct", + snapshotParamsStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterSnapshotParamsStruct"); + return nullptr; + } + + jmethodID snapshotParamsStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod( + env, snapshotParamsStructStructClass_0, "", + "(Lchip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct;Ljava/lang/" + "Integer;Ljava/lang/Integer;)V", + &snapshotParamsStructStructCtor_0); + if (err != CHIP_NO_ERROR || snapshotParamsStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterSnapshotParamsStruct constructor"); + return nullptr; + } + + value = env->NewObject(snapshotParamsStructStructClass_0, snapshotParamsStructStructCtor_0, value_resolution, + value_maxFrameRate, value_imageCodec); + } + return value; + } + case Attributes::FabricsUsingCamera::Id: { + using TypeInfo = Attributes::FabricsUsingCamera::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AllocatedVideoStreams::Id: { + using TypeInfo = Attributes::AllocatedVideoStreams::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_videoStreamID; + std::string newElement_0_videoStreamIDClassName = "java/lang/Integer"; + std::string newElement_0_videoStreamIDCtorSignature = "(I)V"; + jint jninewElement_0_videoStreamID = static_cast(entry_0.videoStreamID); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_videoStreamIDClassName.c_str(), newElement_0_videoStreamIDCtorSignature.c_str(), + jninewElement_0_videoStreamID, newElement_0_videoStreamID); + jobject newElement_0_streamType; + std::string newElement_0_streamTypeClassName = "java/lang/Integer"; + std::string newElement_0_streamTypeCtorSignature = "(I)V"; + jint jninewElement_0_streamType = static_cast(entry_0.streamType); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_streamTypeClassName.c_str(), + newElement_0_streamTypeCtorSignature.c_str(), + jninewElement_0_streamType, newElement_0_streamType); + jobject newElement_0_videoCodec; + std::string newElement_0_videoCodecClassName = "java/lang/Integer"; + std::string newElement_0_videoCodecCtorSignature = "(I)V"; + jint jninewElement_0_videoCodec = static_cast(entry_0.videoCodec); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_videoCodecClassName.c_str(), + newElement_0_videoCodecCtorSignature.c_str(), + jninewElement_0_videoCodec, newElement_0_videoCodec); + jobject newElement_0_minFrameRate; + std::string newElement_0_minFrameRateClassName = "java/lang/Integer"; + std::string newElement_0_minFrameRateCtorSignature = "(I)V"; + jint jninewElement_0_minFrameRate = static_cast(entry_0.minFrameRate); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_minFrameRateClassName.c_str(), + newElement_0_minFrameRateCtorSignature.c_str(), + jninewElement_0_minFrameRate, newElement_0_minFrameRate); + jobject newElement_0_maxFrameRate; + std::string newElement_0_maxFrameRateClassName = "java/lang/Integer"; + std::string newElement_0_maxFrameRateCtorSignature = "(I)V"; + jint jninewElement_0_maxFrameRate = static_cast(entry_0.maxFrameRate); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_maxFrameRateClassName.c_str(), + newElement_0_maxFrameRateCtorSignature.c_str(), + jninewElement_0_maxFrameRate, newElement_0_maxFrameRate); + jobject newElement_0_minResolution; + jobject newElement_0_minResolution_width; + std::string newElement_0_minResolution_widthClassName = "java/lang/Integer"; + std::string newElement_0_minResolution_widthCtorSignature = "(I)V"; + jint jninewElement_0_minResolution_width = static_cast(entry_0.minResolution.width); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_minResolution_widthClassName.c_str(), newElement_0_minResolution_widthCtorSignature.c_str(), + jninewElement_0_minResolution_width, newElement_0_minResolution_width); + jobject newElement_0_minResolution_height; + std::string newElement_0_minResolution_heightClassName = "java/lang/Integer"; + std::string newElement_0_minResolution_heightCtorSignature = "(I)V"; + jint jninewElement_0_minResolution_height = static_cast(entry_0.minResolution.height); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_minResolution_heightClassName.c_str(), newElement_0_minResolution_heightCtorSignature.c_str(), + jninewElement_0_minResolution_height, newElement_0_minResolution_height); + + { + jclass videoResolutionStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", + videoResolutionStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); + return nullptr; + } + + jmethodID videoResolutionStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_2, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &videoResolutionStructStructCtor_2); + if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); + return nullptr; + } + + newElement_0_minResolution = + env->NewObject(videoResolutionStructStructClass_2, videoResolutionStructStructCtor_2, + newElement_0_minResolution_width, newElement_0_minResolution_height); + } + jobject newElement_0_maxResolution; + jobject newElement_0_maxResolution_width; + std::string newElement_0_maxResolution_widthClassName = "java/lang/Integer"; + std::string newElement_0_maxResolution_widthCtorSignature = "(I)V"; + jint jninewElement_0_maxResolution_width = static_cast(entry_0.maxResolution.width); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_maxResolution_widthClassName.c_str(), newElement_0_maxResolution_widthCtorSignature.c_str(), + jninewElement_0_maxResolution_width, newElement_0_maxResolution_width); + jobject newElement_0_maxResolution_height; + std::string newElement_0_maxResolution_heightClassName = "java/lang/Integer"; + std::string newElement_0_maxResolution_heightCtorSignature = "(I)V"; + jint jninewElement_0_maxResolution_height = static_cast(entry_0.maxResolution.height); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_maxResolution_heightClassName.c_str(), newElement_0_maxResolution_heightCtorSignature.c_str(), + jninewElement_0_maxResolution_height, newElement_0_maxResolution_height); + + { + jclass videoResolutionStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", + videoResolutionStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); + return nullptr; + } + + jmethodID videoResolutionStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_2, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &videoResolutionStructStructCtor_2); + if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); + return nullptr; + } + + newElement_0_maxResolution = + env->NewObject(videoResolutionStructStructClass_2, videoResolutionStructStructCtor_2, + newElement_0_maxResolution_width, newElement_0_maxResolution_height); + } + jobject newElement_0_minBitRate; + std::string newElement_0_minBitRateClassName = "java/lang/Long"; + std::string newElement_0_minBitRateCtorSignature = "(J)V"; + jlong jninewElement_0_minBitRate = static_cast(entry_0.minBitRate); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_minBitRateClassName.c_str(), + newElement_0_minBitRateCtorSignature.c_str(), + jninewElement_0_minBitRate, newElement_0_minBitRate); + jobject newElement_0_maxBitRate; + std::string newElement_0_maxBitRateClassName = "java/lang/Long"; + std::string newElement_0_maxBitRateCtorSignature = "(J)V"; + jlong jninewElement_0_maxBitRate = static_cast(entry_0.maxBitRate); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_maxBitRateClassName.c_str(), + newElement_0_maxBitRateCtorSignature.c_str(), + jninewElement_0_maxBitRate, newElement_0_maxBitRate); + jobject newElement_0_minFragmentLen; + std::string newElement_0_minFragmentLenClassName = "java/lang/Integer"; + std::string newElement_0_minFragmentLenCtorSignature = "(I)V"; + jint jninewElement_0_minFragmentLen = static_cast(entry_0.minFragmentLen); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_minFragmentLenClassName.c_str(), newElement_0_minFragmentLenCtorSignature.c_str(), + jninewElement_0_minFragmentLen, newElement_0_minFragmentLen); + jobject newElement_0_maxFragmentLen; + std::string newElement_0_maxFragmentLenClassName = "java/lang/Integer"; + std::string newElement_0_maxFragmentLenCtorSignature = "(I)V"; + jint jninewElement_0_maxFragmentLen = static_cast(entry_0.maxFragmentLen); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_maxFragmentLenClassName.c_str(), newElement_0_maxFragmentLenCtorSignature.c_str(), + jninewElement_0_maxFragmentLen, newElement_0_maxFragmentLen); + jobject newElement_0_watermarkEnabled; + if (!entry_0.watermarkEnabled.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_watermarkEnabled); + } + else + { + jobject newElement_0_watermarkEnabledInsideOptional; + std::string newElement_0_watermarkEnabledInsideOptionalClassName = "java/lang/Boolean"; + std::string newElement_0_watermarkEnabledInsideOptionalCtorSignature = "(Z)V"; + jboolean jninewElement_0_watermarkEnabledInsideOptional = + static_cast(entry_0.watermarkEnabled.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_watermarkEnabledInsideOptionalClassName.c_str(), + newElement_0_watermarkEnabledInsideOptionalCtorSignature.c_str(), + jninewElement_0_watermarkEnabledInsideOptional, newElement_0_watermarkEnabledInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_watermarkEnabledInsideOptional, + newElement_0_watermarkEnabled); + } + jobject newElement_0_OSDEnabled; + if (!entry_0.OSDEnabled.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_OSDEnabled); + } + else + { + jobject newElement_0_OSDEnabledInsideOptional; + std::string newElement_0_OSDEnabledInsideOptionalClassName = "java/lang/Boolean"; + std::string newElement_0_OSDEnabledInsideOptionalCtorSignature = "(Z)V"; + jboolean jninewElement_0_OSDEnabledInsideOptional = static_cast(entry_0.OSDEnabled.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_OSDEnabledInsideOptionalClassName.c_str(), + newElement_0_OSDEnabledInsideOptionalCtorSignature.c_str(), jninewElement_0_OSDEnabledInsideOptional, + newElement_0_OSDEnabledInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_OSDEnabledInsideOptional, + newElement_0_OSDEnabled); + } + jobject newElement_0_referenceCount; + std::string newElement_0_referenceCountClassName = "java/lang/Integer"; + std::string newElement_0_referenceCountCtorSignature = "(I)V"; + jint jninewElement_0_referenceCount = static_cast(entry_0.referenceCount); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_referenceCountClassName.c_str(), newElement_0_referenceCountCtorSignature.c_str(), + jninewElement_0_referenceCount, newElement_0_referenceCount); + + { + jclass videoStreamStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoStreamStruct", + videoStreamStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoStreamStruct"); + return nullptr; + } + + jmethodID videoStreamStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, videoStreamStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Lchip/" + "devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct;Lchip/devicecontroller/" + "ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct;Ljava/lang/Long;Ljava/lang/Long;Ljava/" + "lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;)V", + &videoStreamStructStructCtor_1); + if (err != CHIP_NO_ERROR || videoStreamStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterVideoStreamStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject( + videoStreamStructStructClass_1, videoStreamStructStructCtor_1, newElement_0_videoStreamID, + newElement_0_streamType, newElement_0_videoCodec, newElement_0_minFrameRate, newElement_0_maxFrameRate, + newElement_0_minResolution, newElement_0_maxResolution, newElement_0_minBitRate, newElement_0_maxBitRate, + newElement_0_minFragmentLen, newElement_0_maxFragmentLen, newElement_0_watermarkEnabled, + newElement_0_OSDEnabled, newElement_0_referenceCount); + } + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AllocatedAudioStreams::Id: { + using TypeInfo = Attributes::AllocatedAudioStreams::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_audioStreamID; + std::string newElement_0_audioStreamIDClassName = "java/lang/Integer"; + std::string newElement_0_audioStreamIDCtorSignature = "(I)V"; + jint jninewElement_0_audioStreamID = static_cast(entry_0.audioStreamID); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_audioStreamIDClassName.c_str(), newElement_0_audioStreamIDCtorSignature.c_str(), + jninewElement_0_audioStreamID, newElement_0_audioStreamID); + jobject newElement_0_streamType; + std::string newElement_0_streamTypeClassName = "java/lang/Integer"; + std::string newElement_0_streamTypeCtorSignature = "(I)V"; + jint jninewElement_0_streamType = static_cast(entry_0.streamType); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_streamTypeClassName.c_str(), + newElement_0_streamTypeCtorSignature.c_str(), + jninewElement_0_streamType, newElement_0_streamType); + jobject newElement_0_audioCodec; + std::string newElement_0_audioCodecClassName = "java/lang/Integer"; + std::string newElement_0_audioCodecCtorSignature = "(I)V"; + jint jninewElement_0_audioCodec = static_cast(entry_0.audioCodec); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_audioCodecClassName.c_str(), + newElement_0_audioCodecCtorSignature.c_str(), + jninewElement_0_audioCodec, newElement_0_audioCodec); + jobject newElement_0_channelCount; + std::string newElement_0_channelCountClassName = "java/lang/Integer"; + std::string newElement_0_channelCountCtorSignature = "(I)V"; + jint jninewElement_0_channelCount = static_cast(entry_0.channelCount); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_channelCountClassName.c_str(), + newElement_0_channelCountCtorSignature.c_str(), + jninewElement_0_channelCount, newElement_0_channelCount); + jobject newElement_0_sampleRate; + std::string newElement_0_sampleRateClassName = "java/lang/Long"; + std::string newElement_0_sampleRateCtorSignature = "(J)V"; + jlong jninewElement_0_sampleRate = static_cast(entry_0.sampleRate); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sampleRateClassName.c_str(), + newElement_0_sampleRateCtorSignature.c_str(), + jninewElement_0_sampleRate, newElement_0_sampleRate); + jobject newElement_0_bitRate; + std::string newElement_0_bitRateClassName = "java/lang/Long"; + std::string newElement_0_bitRateCtorSignature = "(J)V"; + jlong jninewElement_0_bitRate = static_cast(entry_0.bitRate); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_bitRateClassName.c_str(), + newElement_0_bitRateCtorSignature.c_str(), + jninewElement_0_bitRate, newElement_0_bitRate); + jobject newElement_0_bitDepth; + std::string newElement_0_bitDepthClassName = "java/lang/Integer"; + std::string newElement_0_bitDepthCtorSignature = "(I)V"; + jint jninewElement_0_bitDepth = static_cast(entry_0.bitDepth); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_bitDepthClassName.c_str(), + newElement_0_bitDepthCtorSignature.c_str(), + jninewElement_0_bitDepth, newElement_0_bitDepth); + jobject newElement_0_referenceCount; + std::string newElement_0_referenceCountClassName = "java/lang/Integer"; + std::string newElement_0_referenceCountCtorSignature = "(I)V"; + jint jninewElement_0_referenceCount = static_cast(entry_0.referenceCount); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_referenceCountClassName.c_str(), newElement_0_referenceCountCtorSignature.c_str(), + jninewElement_0_referenceCount, newElement_0_referenceCount); + + { + jclass audioStreamStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterAudioStreamStruct", + audioStreamStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterAudioStreamStruct"); + return nullptr; + } + + jmethodID audioStreamStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, audioStreamStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/" + "Long;Ljava/lang/Integer;Ljava/lang/Integer;)V", + &audioStreamStructStructCtor_1); + if (err != CHIP_NO_ERROR || audioStreamStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterAudioStreamStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(audioStreamStructStructClass_1, audioStreamStructStructCtor_1, + newElement_0_audioStreamID, newElement_0_streamType, newElement_0_audioCodec, + newElement_0_channelCount, newElement_0_sampleRate, newElement_0_bitRate, + newElement_0_bitDepth, newElement_0_referenceCount); + } + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AllocatedSnapshotStreams::Id: { + using TypeInfo = Attributes::AllocatedSnapshotStreams::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_snapshotStreamID; + std::string newElement_0_snapshotStreamIDClassName = "java/lang/Integer"; + std::string newElement_0_snapshotStreamIDCtorSignature = "(I)V"; + jint jninewElement_0_snapshotStreamID = static_cast(entry_0.snapshotStreamID); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_snapshotStreamIDClassName.c_str(), newElement_0_snapshotStreamIDCtorSignature.c_str(), + jninewElement_0_snapshotStreamID, newElement_0_snapshotStreamID); + jobject newElement_0_imageCodec; + std::string newElement_0_imageCodecClassName = "java/lang/Integer"; + std::string newElement_0_imageCodecCtorSignature = "(I)V"; + jint jninewElement_0_imageCodec = static_cast(entry_0.imageCodec); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_imageCodecClassName.c_str(), + newElement_0_imageCodecCtorSignature.c_str(), + jninewElement_0_imageCodec, newElement_0_imageCodec); + jobject newElement_0_frameRate; + std::string newElement_0_frameRateClassName = "java/lang/Integer"; + std::string newElement_0_frameRateCtorSignature = "(I)V"; + jint jninewElement_0_frameRate = static_cast(entry_0.frameRate); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_frameRateClassName.c_str(), + newElement_0_frameRateCtorSignature.c_str(), + jninewElement_0_frameRate, newElement_0_frameRate); + jobject newElement_0_bitRate; + std::string newElement_0_bitRateClassName = "java/lang/Long"; + std::string newElement_0_bitRateCtorSignature = "(J)V"; + jlong jninewElement_0_bitRate = static_cast(entry_0.bitRate); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_bitRateClassName.c_str(), + newElement_0_bitRateCtorSignature.c_str(), + jninewElement_0_bitRate, newElement_0_bitRate); + jobject newElement_0_minResolution; + jobject newElement_0_minResolution_width; + std::string newElement_0_minResolution_widthClassName = "java/lang/Integer"; + std::string newElement_0_minResolution_widthCtorSignature = "(I)V"; + jint jninewElement_0_minResolution_width = static_cast(entry_0.minResolution.width); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_minResolution_widthClassName.c_str(), newElement_0_minResolution_widthCtorSignature.c_str(), + jninewElement_0_minResolution_width, newElement_0_minResolution_width); + jobject newElement_0_minResolution_height; + std::string newElement_0_minResolution_heightClassName = "java/lang/Integer"; + std::string newElement_0_minResolution_heightCtorSignature = "(I)V"; + jint jninewElement_0_minResolution_height = static_cast(entry_0.minResolution.height); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_minResolution_heightClassName.c_str(), newElement_0_minResolution_heightCtorSignature.c_str(), + jninewElement_0_minResolution_height, newElement_0_minResolution_height); + + { + jclass videoResolutionStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", + videoResolutionStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); + return nullptr; + } + + jmethodID videoResolutionStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_2, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &videoResolutionStructStructCtor_2); + if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); + return nullptr; + } + + newElement_0_minResolution = + env->NewObject(videoResolutionStructStructClass_2, videoResolutionStructStructCtor_2, + newElement_0_minResolution_width, newElement_0_minResolution_height); + } + jobject newElement_0_maxResolution; + jobject newElement_0_maxResolution_width; + std::string newElement_0_maxResolution_widthClassName = "java/lang/Integer"; + std::string newElement_0_maxResolution_widthCtorSignature = "(I)V"; + jint jninewElement_0_maxResolution_width = static_cast(entry_0.maxResolution.width); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_maxResolution_widthClassName.c_str(), newElement_0_maxResolution_widthCtorSignature.c_str(), + jninewElement_0_maxResolution_width, newElement_0_maxResolution_width); + jobject newElement_0_maxResolution_height; + std::string newElement_0_maxResolution_heightClassName = "java/lang/Integer"; + std::string newElement_0_maxResolution_heightCtorSignature = "(I)V"; + jint jninewElement_0_maxResolution_height = static_cast(entry_0.maxResolution.height); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_maxResolution_heightClassName.c_str(), newElement_0_maxResolution_heightCtorSignature.c_str(), + jninewElement_0_maxResolution_height, newElement_0_maxResolution_height); + + { + jclass videoResolutionStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", + videoResolutionStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); + return nullptr; + } + + jmethodID videoResolutionStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_2, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &videoResolutionStructStructCtor_2); + if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); + return nullptr; + } + + newElement_0_maxResolution = + env->NewObject(videoResolutionStructStructClass_2, videoResolutionStructStructCtor_2, + newElement_0_maxResolution_width, newElement_0_maxResolution_height); + } + jobject newElement_0_quality; + std::string newElement_0_qualityClassName = "java/lang/Integer"; + std::string newElement_0_qualityCtorSignature = "(I)V"; + jint jninewElement_0_quality = static_cast(entry_0.quality); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_qualityClassName.c_str(), + newElement_0_qualityCtorSignature.c_str(), + jninewElement_0_quality, newElement_0_quality); + jobject newElement_0_referenceCount; + std::string newElement_0_referenceCountClassName = "java/lang/Integer"; + std::string newElement_0_referenceCountCtorSignature = "(I)V"; + jint jninewElement_0_referenceCount = static_cast(entry_0.referenceCount); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_referenceCountClassName.c_str(), newElement_0_referenceCountCtorSignature.c_str(), + jninewElement_0_referenceCount, newElement_0_referenceCount); + + { + jclass snapshotStreamStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterSnapshotStreamStruct", + snapshotStreamStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterSnapshotStreamStruct"); + return nullptr; + } + + jmethodID snapshotStreamStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, snapshotStreamStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Long;Lchip/devicecontroller/" + "ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct;Lchip/devicecontroller/" + "ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct;Ljava/lang/Integer;Ljava/lang/Integer;)V", + &snapshotStreamStructStructCtor_1); + if (err != CHIP_NO_ERROR || snapshotStreamStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterSnapshotStreamStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(snapshotStreamStructStructClass_1, snapshotStreamStructStructCtor_1, + newElement_0_snapshotStreamID, newElement_0_imageCodec, newElement_0_frameRate, + newElement_0_bitRate, newElement_0_minResolution, newElement_0_maxResolution, + newElement_0_quality, newElement_0_referenceCount); + } + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::RankedVideoStreamPrioritiesList::Id: { + using TypeInfo = Attributes::RankedVideoStreamPrioritiesList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::SoftRecordingPrivacyModeEnabled::Id: { + using TypeInfo = Attributes::SoftRecordingPrivacyModeEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::SoftLivestreamPrivacyModeEnabled::Id: { + using TypeInfo = Attributes::SoftLivestreamPrivacyModeEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::HardPrivacyModeOn::Id: { + using TypeInfo = Attributes::HardPrivacyModeOn::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::NightVision::Id: { + using TypeInfo = Attributes::NightVision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::NightVisionIllum::Id: { + using TypeInfo = Attributes::NightVisionIllum::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::AWBEnabled::Id: { + using TypeInfo = Attributes::AWBEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::AutoShutterSpeedEnabled::Id: { + using TypeInfo = Attributes::AutoShutterSpeedEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::AutoISOEnabled::Id: { + using TypeInfo = Attributes::AutoISOEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::Viewport::Id: { + using TypeInfo = Attributes::Viewport::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + jobject value_x1; + std::string value_x1ClassName = "java/lang/Integer"; + std::string value_x1CtorSignature = "(I)V"; + jint jnivalue_x1 = static_cast(cppValue.x1); + chip::JniReferences::GetInstance().CreateBoxedObject(value_x1ClassName.c_str(), value_x1CtorSignature.c_str(), + jnivalue_x1, value_x1); + jobject value_y1; + std::string value_y1ClassName = "java/lang/Integer"; + std::string value_y1CtorSignature = "(I)V"; + jint jnivalue_y1 = static_cast(cppValue.y1); + chip::JniReferences::GetInstance().CreateBoxedObject(value_y1ClassName.c_str(), value_y1CtorSignature.c_str(), + jnivalue_y1, value_y1); + jobject value_x2; + std::string value_x2ClassName = "java/lang/Integer"; + std::string value_x2CtorSignature = "(I)V"; + jint jnivalue_x2 = static_cast(cppValue.x2); + chip::JniReferences::GetInstance().CreateBoxedObject(value_x2ClassName.c_str(), value_x2CtorSignature.c_str(), + jnivalue_x2, value_x2); + jobject value_y2; + std::string value_y2ClassName = "java/lang/Integer"; + std::string value_y2CtorSignature = "(I)V"; + jint jnivalue_y2 = static_cast(cppValue.y2); + chip::JniReferences::GetInstance().CreateBoxedObject(value_y2ClassName.c_str(), value_y2CtorSignature.c_str(), + jnivalue_y2, value_y2); + + { + jclass viewportStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterViewportStruct", + viewportStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterViewportStruct"); + return nullptr; + } + + jmethodID viewportStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod( + env, viewportStructStructClass_0, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &viewportStructStructCtor_0); + if (err != CHIP_NO_ERROR || viewportStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$CameraAvStreamManagementClusterViewportStruct constructor"); + return nullptr; + } + + value = + env->NewObject(viewportStructStructClass_0, viewportStructStructCtor_0, value_x1, value_y1, value_x2, value_y2); + } + return value; + } + case Attributes::SpeakerMuted::Id: { + using TypeInfo = Attributes::SpeakerMuted::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::SpeakerVolumeLevel::Id: { + using TypeInfo = Attributes::SpeakerVolumeLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::SpeakerMaxLevel::Id: { + using TypeInfo = Attributes::SpeakerMaxLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::SpeakerMinLevel::Id: { + using TypeInfo = Attributes::SpeakerMinLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::MicrophoneMuted::Id: { + using TypeInfo = Attributes::MicrophoneMuted::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::MicrophoneVolumeLevel::Id: { + using TypeInfo = Attributes::MicrophoneVolumeLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::MicrophoneMaxLevel::Id: { + using TypeInfo = Attributes::MicrophoneMaxLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::MicrophoneMinLevel::Id: { + using TypeInfo = Attributes::MicrophoneMinLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::MicrophoneAGCEnabled::Id: { + using TypeInfo = Attributes::MicrophoneAGCEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::ImageRotation::Id: { + using TypeInfo = Attributes::ImageRotation::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::ImageFlipHorizontal::Id: { + using TypeInfo = Attributes::ImageFlipHorizontal::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::ImageFlipVertical::Id: { + using TypeInfo = Attributes::ImageFlipVertical::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::LocalVideoRecordingEnabled::Id: { + using TypeInfo = Attributes::LocalVideoRecordingEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::LocalSnapshotRecordingEnabled::Id: { + using TypeInfo = Attributes::LocalSnapshotRecordingEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::StatusLightEnabled::Id: { + using TypeInfo = Attributes::StatusLightEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Boolean"; + std::string valueCtorSignature = "(Z)V"; + jboolean jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::StatusLightBrightness::Id: { + using TypeInfo = Attributes::StatusLightBrightness::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::DepthSensorStatus::Id: { + using TypeInfo = Attributes::DepthSensorStatus::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::WebRTCTransportProvider::Id: { + using namespace app::Clusters::WebRTCTransportProvider; + switch (aPath.mAttributeId) + { + case Attributes::CurrentSessions::Id: { + using TypeInfo = Attributes::CurrentSessions::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_id; + std::string newElement_0_idClassName = "java/lang/Integer"; + std::string newElement_0_idCtorSignature = "(I)V"; + jint jninewElement_0_id = static_cast(entry_0.id); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_idClassName.c_str(), newElement_0_idCtorSignature.c_str(), jninewElement_0_id, newElement_0_id); + jobject newElement_0_peerNodeID; + std::string newElement_0_peerNodeIDClassName = "java/lang/Long"; + std::string newElement_0_peerNodeIDCtorSignature = "(J)V"; + jlong jninewElement_0_peerNodeID = static_cast(entry_0.peerNodeID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_peerNodeIDClassName.c_str(), + newElement_0_peerNodeIDCtorSignature.c_str(), + jninewElement_0_peerNodeID, newElement_0_peerNodeID); + jobject newElement_0_peerFabricIndex; + std::string newElement_0_peerFabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_peerFabricIndexCtorSignature = "(I)V"; + jint jninewElement_0_peerFabricIndex = static_cast(entry_0.peerFabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_peerFabricIndexClassName.c_str(), newElement_0_peerFabricIndexCtorSignature.c_str(), + jninewElement_0_peerFabricIndex, newElement_0_peerFabricIndex); + jobject newElement_0_streamType; + std::string newElement_0_streamTypeClassName = "java/lang/Integer"; + std::string newElement_0_streamTypeCtorSignature = "(I)V"; + jint jninewElement_0_streamType = static_cast(entry_0.streamType); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_streamTypeClassName.c_str(), + newElement_0_streamTypeCtorSignature.c_str(), + jninewElement_0_streamType, newElement_0_streamType); + jobject newElement_0_videoStreamID; + if (entry_0.videoStreamID.IsNull()) + { + newElement_0_videoStreamID = nullptr; + } + else + { + std::string newElement_0_videoStreamIDClassName = "java/lang/Integer"; + std::string newElement_0_videoStreamIDCtorSignature = "(I)V"; + jint jninewElement_0_videoStreamID = static_cast(entry_0.videoStreamID.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_videoStreamIDClassName.c_str(), newElement_0_videoStreamIDCtorSignature.c_str(), + jninewElement_0_videoStreamID, newElement_0_videoStreamID); + } + jobject newElement_0_audioStreamID; + if (entry_0.audioStreamID.IsNull()) + { + newElement_0_audioStreamID = nullptr; + } + else + { + std::string newElement_0_audioStreamIDClassName = "java/lang/Integer"; + std::string newElement_0_audioStreamIDCtorSignature = "(I)V"; + jint jninewElement_0_audioStreamID = static_cast(entry_0.audioStreamID.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_audioStreamIDClassName.c_str(), newElement_0_audioStreamIDCtorSignature.c_str(), + jninewElement_0_audioStreamID, newElement_0_audioStreamID); + } + jobject newElement_0_metadataOptions; + std::string newElement_0_metadataOptionsClassName = "java/lang/Integer"; + std::string newElement_0_metadataOptionsCtorSignature = "(I)V"; + jint jninewElement_0_metadataOptions = static_cast(entry_0.metadataOptions.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_metadataOptionsClassName.c_str(), newElement_0_metadataOptionsCtorSignature.c_str(), + jninewElement_0_metadataOptions, newElement_0_metadataOptions); + + { + jclass webRTCSessionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$WebRTCTransportProviderClusterWebRTCSessionStruct", + webRTCSessionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$WebRTCTransportProviderClusterWebRTCSessionStruct"); + return nullptr; + } + + jmethodID webRTCSessionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, webRTCSessionStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" + "Integer;Ljava/lang/Integer;)V", + &webRTCSessionStructStructCtor_1); + if (err != CHIP_NO_ERROR || webRTCSessionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$WebRTCTransportProviderClusterWebRTCSessionStruct constructor"); + return nullptr; + } + + newElement_0 = + env->NewObject(webRTCSessionStructStructClass_1, webRTCSessionStructStructCtor_1, newElement_0_id, + newElement_0_peerNodeID, newElement_0_peerFabricIndex, newElement_0_streamType, + newElement_0_videoStreamID, newElement_0_audioStreamID, newElement_0_metadataOptions); + } + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -42132,31 +41911,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -42220,8 +41974,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::WebRTCTransportProvider::Id: { - using namespace app::Clusters::WebRTCTransportProvider; + case app::Clusters::WebRTCTransportRequestor::Id: { + using namespace app::Clusters::WebRTCTransportRequestor; switch (aPath.mAttributeId) { case Attributes::CurrentSessions::Id: { @@ -42303,31 +42057,35 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_metadataOptionsClassName.c_str(), newElement_0_metadataOptionsCtorSignature.c_str(), jninewElement_0_metadataOptions, newElement_0_metadataOptions); - jclass webRTCSessionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$WebRTCTransportProviderClusterWebRTCSessionStruct", - webRTCSessionStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$WebRTCTransportProviderClusterWebRTCSessionStruct"); - return nullptr; - } + jclass webRTCSessionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$WebRTCTransportRequestorClusterWebRTCSessionStruct", + webRTCSessionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$WebRTCTransportRequestorClusterWebRTCSessionStruct"); + return nullptr; + } - jmethodID webRTCSessionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, webRTCSessionStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" - "Integer;Ljava/lang/Integer;)V", - &webRTCSessionStructStructCtor_1); - if (err != CHIP_NO_ERROR || webRTCSessionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$WebRTCTransportProviderClusterWebRTCSessionStruct constructor"); - return nullptr; - } + jmethodID webRTCSessionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, webRTCSessionStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/" + "Integer;Ljava/lang/Integer;)V", + &webRTCSessionStructStructCtor_1); + if (err != CHIP_NO_ERROR || webRTCSessionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$WebRTCTransportRequestorClusterWebRTCSessionStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(webRTCSessionStructStructClass_1, webRTCSessionStructStructCtor_1, newElement_0_id, - newElement_0_peerNodeID, newElement_0_peerFabricIndex, newElement_0_streamType, - newElement_0_videoStreamID, newElement_0_audioStreamID, newElement_0_metadataOptions); + newElement_0 = + env->NewObject(webRTCSessionStructStructClass_1, webRTCSessionStructStructCtor_1, newElement_0_id, + newElement_0_peerNodeID, newElement_0_peerFabricIndex, newElement_0_streamType, + newElement_0_videoStreamID, newElement_0_audioStreamID, newElement_0_metadataOptions); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -42382,31 +42140,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -42500,27 +42233,29 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - jclass chimeSoundStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ChimeClusterChimeSoundStruct", chimeSoundStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ChimeClusterChimeSoundStruct"); - return nullptr; - } + jclass chimeSoundStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ChimeClusterChimeSoundStruct", chimeSoundStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ChimeClusterChimeSoundStruct"); + return nullptr; + } - jmethodID chimeSoundStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, chimeSoundStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/String;)V", - &chimeSoundStructStructCtor_1); - if (err != CHIP_NO_ERROR || chimeSoundStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$ChimeClusterChimeSoundStruct constructor"); - return nullptr; - } + jmethodID chimeSoundStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, chimeSoundStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/String;)V", + &chimeSoundStructStructCtor_1); + if (err != CHIP_NO_ERROR || chimeSoundStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ChimeClusterChimeSoundStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(chimeSoundStructStructClass_1, chimeSoundStructStructCtor_1, newElement_0_chimeID, - newElement_0_name); + newElement_0 = env->NewObject(chimeSoundStructStructClass_1, chimeSoundStructStructCtor_1, newElement_0_chimeID, + newElement_0_name); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -42607,31 +42342,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -42783,28 +42493,30 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_revisionCtorSignature.c_str(), jninewElement_2_revision, newElement_2_revision); - jclass deviceTypeStructStructClass_3; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$EcosystemInformationClusterDeviceTypeStruct", - deviceTypeStructStructClass_3); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$EcosystemInformationClusterDeviceTypeStruct"); - return nullptr; - } + jclass deviceTypeStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$EcosystemInformationClusterDeviceTypeStruct", + deviceTypeStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$EcosystemInformationClusterDeviceTypeStruct"); + return nullptr; + } - jmethodID deviceTypeStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, deviceTypeStructStructClass_3, "", - "(Ljava/lang/Long;Ljava/lang/Integer;)V", - &deviceTypeStructStructCtor_3); - if (err != CHIP_NO_ERROR || deviceTypeStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$EcosystemInformationClusterDeviceTypeStruct constructor"); - return nullptr; - } + jmethodID deviceTypeStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, deviceTypeStructStructClass_3, "", + "(Ljava/lang/Long;Ljava/lang/Integer;)V", + &deviceTypeStructStructCtor_3); + if (err != CHIP_NO_ERROR || deviceTypeStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$EcosystemInformationClusterDeviceTypeStruct constructor"); + return nullptr; + } - newElement_2 = env->NewObject(deviceTypeStructStructClass_3, deviceTypeStructStructCtor_3, - newElement_2_deviceType, newElement_2_revision); + newElement_2 = env->NewObject(deviceTypeStructStructClass_3, deviceTypeStructStructCtor_3, + newElement_2_deviceType, newElement_2_revision); + } chip::JniReferences::GetInstance().AddToList(newElement_0_deviceTypes, newElement_2); } jobject newElement_0_uniqueLocationIDs; @@ -42834,33 +42546,36 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); - jclass ecosystemDeviceStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$EcosystemInformationClusterEcosystemDeviceStruct", - ecosystemDeviceStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$EcosystemInformationClusterEcosystemDeviceStruct"); - return nullptr; - } + jclass ecosystemDeviceStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$EcosystemInformationClusterEcosystemDeviceStruct", + ecosystemDeviceStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$EcosystemInformationClusterEcosystemDeviceStruct"); + return nullptr; + } - jmethodID ecosystemDeviceStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, ecosystemDeviceStructStructClass_1, "", - "(Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/" - "util/ArrayList;Ljava/lang/Long;Ljava/lang/Integer;)V", - &ecosystemDeviceStructStructCtor_1); - if (err != CHIP_NO_ERROR || ecosystemDeviceStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$EcosystemInformationClusterEcosystemDeviceStruct constructor"); - return nullptr; - } + jmethodID ecosystemDeviceStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, ecosystemDeviceStructStructClass_1, "", + "(Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/" + "util/ArrayList;Ljava/lang/Long;Ljava/lang/Integer;)V", + &ecosystemDeviceStructStructCtor_1); + if (err != CHIP_NO_ERROR || ecosystemDeviceStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$EcosystemInformationClusterEcosystemDeviceStruct constructor"); + return nullptr; + } - newElement_0 = - env->NewObject(ecosystemDeviceStructStructClass_1, ecosystemDeviceStructStructCtor_1, newElement_0_deviceName, - newElement_0_deviceNameLastEdit, newElement_0_bridgedEndpoint, newElement_0_originalEndpoint, - newElement_0_deviceTypes, newElement_0_uniqueLocationIDs, newElement_0_uniqueLocationIDsLastEdit, - newElement_0_fabricIndex); + newElement_0 = + env->NewObject(ecosystemDeviceStructStructClass_1, ecosystemDeviceStructStructCtor_1, + newElement_0_deviceName, newElement_0_deviceNameLastEdit, newElement_0_bridgedEndpoint, + newElement_0_originalEndpoint, newElement_0_deviceTypes, newElement_0_uniqueLocationIDs, + newElement_0_uniqueLocationIDsLastEdit, newElement_0_fabricIndex); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -42921,30 +42636,33 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_locationDescriptor_areaType); } - jclass locationDescriptorStructStructClass_2; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$EcosystemInformationClusterLocationDescriptorStruct", - locationDescriptorStructStructClass_2); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$EcosystemInformationClusterLocationDescriptorStruct"); - return nullptr; - } + jclass locationDescriptorStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$EcosystemInformationClusterLocationDescriptorStruct", + locationDescriptorStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$EcosystemInformationClusterLocationDescriptorStruct"); + return nullptr; + } - jmethodID locationDescriptorStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod(env, locationDescriptorStructStructClass_2, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &locationDescriptorStructStructCtor_2); - if (err != CHIP_NO_ERROR || locationDescriptorStructStructCtor_2 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$EcosystemInformationClusterLocationDescriptorStruct constructor"); - return nullptr; - } + jmethodID locationDescriptorStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod( + env, locationDescriptorStructStructClass_2, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;)V", &locationDescriptorStructStructCtor_2); + if (err != CHIP_NO_ERROR || locationDescriptorStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$EcosystemInformationClusterLocationDescriptorStruct constructor"); + return nullptr; + } - newElement_0_locationDescriptor = - env->NewObject(locationDescriptorStructStructClass_2, locationDescriptorStructStructCtor_2, - newElement_0_locationDescriptor_locationName, newElement_0_locationDescriptor_floorNumber, - newElement_0_locationDescriptor_areaType); + newElement_0_locationDescriptor = + env->NewObject(locationDescriptorStructStructClass_2, locationDescriptorStructStructCtor_2, + newElement_0_locationDescriptor_locationName, newElement_0_locationDescriptor_floorNumber, + newElement_0_locationDescriptor_areaType); + } jobject newElement_0_locationDescriptorLastEdit; std::string newElement_0_locationDescriptorLastEditClassName = "java/lang/Long"; std::string newElement_0_locationDescriptorLastEditCtorSignature = "(J)V"; @@ -42961,31 +42679,34 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); - jclass ecosystemLocationStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$EcosystemInformationClusterEcosystemLocationStruct", - ecosystemLocationStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$EcosystemInformationClusterEcosystemLocationStruct"); - return nullptr; - } + jclass ecosystemLocationStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$EcosystemInformationClusterEcosystemLocationStruct", + ecosystemLocationStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$EcosystemInformationClusterEcosystemLocationStruct"); + return nullptr; + } - jmethodID ecosystemLocationStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, ecosystemLocationStructStructClass_1, "", - "(Ljava/lang/String;Lchip/devicecontroller/" - "ChipStructs$EcosystemInformationClusterLocationDescriptorStruct;Ljava/lang/Long;Ljava/lang/Integer;)V", - &ecosystemLocationStructStructCtor_1); - if (err != CHIP_NO_ERROR || ecosystemLocationStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$EcosystemInformationClusterEcosystemLocationStruct constructor"); - return nullptr; - } + jmethodID ecosystemLocationStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, ecosystemLocationStructStructClass_1, "", + "(Ljava/lang/String;Lchip/devicecontroller/" + "ChipStructs$EcosystemInformationClusterLocationDescriptorStruct;Ljava/lang/Long;Ljava/lang/Integer;)V", + &ecosystemLocationStructStructCtor_1); + if (err != CHIP_NO_ERROR || ecosystemLocationStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$EcosystemInformationClusterEcosystemLocationStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(ecosystemLocationStructStructClass_1, ecosystemLocationStructStructCtor_1, - newElement_0_uniqueLocationID, newElement_0_locationDescriptor, - newElement_0_locationDescriptorLastEdit, newElement_0_fabricIndex); + newElement_0 = env->NewObject(ecosystemLocationStructStructClass_1, ecosystemLocationStructStructCtor_1, + newElement_0_uniqueLocationID, newElement_0_locationDescriptor, + newElement_0_locationDescriptorLastEdit, newElement_0_fabricIndex); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -43040,31 +42761,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -43198,31 +42894,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -43783,27 +43454,29 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR reinterpret_cast(entry_0.member2.data())); newElement_0_member2 = newElement_0_member2ByteArray; - jclass testListStructOctetStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestListStructOctet", - testListStructOctetStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestListStructOctet"); - return nullptr; - } + jclass testListStructOctetStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestListStructOctet", + testListStructOctetStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestListStructOctet"); + return nullptr; + } - jmethodID testListStructOctetStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, testListStructOctetStructClass_1, "", - "(Ljava/lang/Long;[B)V", &testListStructOctetStructCtor_1); - if (err != CHIP_NO_ERROR || testListStructOctetStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestListStructOctet constructor"); - return nullptr; - } + jmethodID testListStructOctetStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, testListStructOctetStructClass_1, "", + "(Ljava/lang/Long;[B)V", &testListStructOctetStructCtor_1); + if (err != CHIP_NO_ERROR || testListStructOctetStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestListStructOctet constructor"); + return nullptr; + } - newElement_0 = env->NewObject(testListStructOctetStructClass_1, testListStructOctetStructCtor_1, - newElement_0_member1, newElement_0_member2); + newElement_0 = env->NewObject(testListStructOctetStructClass_1, testListStructOctetStructCtor_1, + newElement_0_member1, newElement_0_member2); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -44091,32 +43764,34 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_nullableStruct_i); } - jclass simpleStructStructClass_3; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_3); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); - return nullptr; - } + jclass simpleStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); + return nullptr; + } - jmethodID simpleStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod( - env, simpleStructStructClass_3, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/Integer;Ljava/" - "lang/Float;Ljava/lang/Double;Ljava/util/Optional;)V", - &simpleStructStructCtor_3); - if (err != CHIP_NO_ERROR || simpleStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); - return nullptr; - } + jmethodID simpleStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod( + env, simpleStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" + "Integer;Ljava/lang/Float;Ljava/lang/Double;Ljava/util/Optional;)V", + &simpleStructStructCtor_3); + if (err != CHIP_NO_ERROR || simpleStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); + return nullptr; + } - newElement_0_nullableStruct = - env->NewObject(simpleStructStructClass_3, simpleStructStructCtor_3, newElement_0_nullableStruct_a, - newElement_0_nullableStruct_b, newElement_0_nullableStruct_c, newElement_0_nullableStruct_d, - newElement_0_nullableStruct_e, newElement_0_nullableStruct_f, newElement_0_nullableStruct_g, - newElement_0_nullableStruct_h, newElement_0_nullableStruct_i); + newElement_0_nullableStruct = env->NewObject( + simpleStructStructClass_3, simpleStructStructCtor_3, newElement_0_nullableStruct_a, + newElement_0_nullableStruct_b, newElement_0_nullableStruct_c, newElement_0_nullableStruct_d, + newElement_0_nullableStruct_e, newElement_0_nullableStruct_f, newElement_0_nullableStruct_g, + newElement_0_nullableStruct_h, newElement_0_nullableStruct_i); + } } jobject newElement_0_optionalStruct; if (!entry_0.optionalStruct.HasValue()) @@ -44206,33 +43881,35 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_optionalStructInsideOptional_i); } - jclass simpleStructStructClass_3; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_3); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); - return nullptr; - } + jclass simpleStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); + return nullptr; + } - jmethodID simpleStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod( - env, simpleStructStructClass_3, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/Integer;Ljava/" - "lang/Float;Ljava/lang/Double;Ljava/util/Optional;)V", - &simpleStructStructCtor_3); - if (err != CHIP_NO_ERROR || simpleStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); - return nullptr; - } + jmethodID simpleStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod( + env, simpleStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" + "Integer;Ljava/lang/Float;Ljava/lang/Double;Ljava/util/Optional;)V", + &simpleStructStructCtor_3); + if (err != CHIP_NO_ERROR || simpleStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); + return nullptr; + } - newElement_0_optionalStructInsideOptional = env->NewObject( - simpleStructStructClass_3, simpleStructStructCtor_3, newElement_0_optionalStructInsideOptional_a, - newElement_0_optionalStructInsideOptional_b, newElement_0_optionalStructInsideOptional_c, - newElement_0_optionalStructInsideOptional_d, newElement_0_optionalStructInsideOptional_e, - newElement_0_optionalStructInsideOptional_f, newElement_0_optionalStructInsideOptional_g, - newElement_0_optionalStructInsideOptional_h, newElement_0_optionalStructInsideOptional_i); + newElement_0_optionalStructInsideOptional = env->NewObject( + simpleStructStructClass_3, simpleStructStructCtor_3, newElement_0_optionalStructInsideOptional_a, + newElement_0_optionalStructInsideOptional_b, newElement_0_optionalStructInsideOptional_c, + newElement_0_optionalStructInsideOptional_d, newElement_0_optionalStructInsideOptional_e, + newElement_0_optionalStructInsideOptional_f, newElement_0_optionalStructInsideOptional_g, + newElement_0_optionalStructInsideOptional_h, newElement_0_optionalStructInsideOptional_i); + } chip::JniReferences::GetInstance().CreateOptional(newElement_0_optionalStructInsideOptional, newElement_0_optionalStruct); } @@ -44346,38 +44023,40 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_nullableOptionalStructInsideOptional_i); } - jclass simpleStructStructClass_4; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_4); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); - return nullptr; - } + jclass simpleStructStructClass_4; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); + return nullptr; + } - jmethodID simpleStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod( - env, simpleStructStructClass_4, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" - "Integer;Ljava/lang/Float;Ljava/lang/Double;Ljava/util/Optional;)V", - &simpleStructStructCtor_4); - if (err != CHIP_NO_ERROR || simpleStructStructCtor_4 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); - return nullptr; - } + jmethodID simpleStructStructCtor_4; + err = chip::JniReferences::GetInstance().FindMethod( + env, simpleStructStructClass_4, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/" + "Integer;Ljava/lang/Float;Ljava/lang/Double;Ljava/util/Optional;)V", + &simpleStructStructCtor_4); + if (err != CHIP_NO_ERROR || simpleStructStructCtor_4 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); + return nullptr; + } - newElement_0_nullableOptionalStructInsideOptional = - env->NewObject(simpleStructStructClass_4, simpleStructStructCtor_4, - newElement_0_nullableOptionalStructInsideOptional_a, - newElement_0_nullableOptionalStructInsideOptional_b, - newElement_0_nullableOptionalStructInsideOptional_c, - newElement_0_nullableOptionalStructInsideOptional_d, - newElement_0_nullableOptionalStructInsideOptional_e, - newElement_0_nullableOptionalStructInsideOptional_f, - newElement_0_nullableOptionalStructInsideOptional_g, - newElement_0_nullableOptionalStructInsideOptional_h, - newElement_0_nullableOptionalStructInsideOptional_i); + newElement_0_nullableOptionalStructInsideOptional = + env->NewObject(simpleStructStructClass_4, simpleStructStructCtor_4, + newElement_0_nullableOptionalStructInsideOptional_a, + newElement_0_nullableOptionalStructInsideOptional_b, + newElement_0_nullableOptionalStructInsideOptional_c, + newElement_0_nullableOptionalStructInsideOptional_d, + newElement_0_nullableOptionalStructInsideOptional_e, + newElement_0_nullableOptionalStructInsideOptional_f, + newElement_0_nullableOptionalStructInsideOptional_g, + newElement_0_nullableOptionalStructInsideOptional_h, + newElement_0_nullableOptionalStructInsideOptional_i); + } } chip::JniReferences::GetInstance().CreateOptional(newElement_0_nullableOptionalStructInsideOptional, newElement_0_nullableOptionalStruct); @@ -44464,35 +44143,37 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_nullableOptionalList); } - jclass nullablesAndOptionalsStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct", - nullablesAndOptionalsStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct"); - return nullptr; - } + jclass nullablesAndOptionalsStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct", + nullablesAndOptionalsStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct"); + return nullptr; + } - jmethodID nullablesAndOptionalsStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, nullablesAndOptionalsStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/String;Ljava/util/Optional;Ljava/util/" - "Optional;Lchip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/ArrayList;Ljava/util/Optional;Ljava/util/Optional;)V", - &nullablesAndOptionalsStructStructCtor_1); - if (err != CHIP_NO_ERROR || nullablesAndOptionalsStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct constructor"); - return nullptr; - } + jmethodID nullablesAndOptionalsStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, nullablesAndOptionalsStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/String;Ljava/util/Optional;Ljava/" + "util/Optional;Lchip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;Ljava/util/Optional;Ljava/" + "util/Optional;Ljava/util/ArrayList;Ljava/util/Optional;Ljava/util/Optional;)V", + &nullablesAndOptionalsStructStructCtor_1); + if (err != CHIP_NO_ERROR || nullablesAndOptionalsStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterNullablesAndOptionalsStruct constructor"); + return nullptr; + } - newElement_0 = - env->NewObject(nullablesAndOptionalsStructStructClass_1, nullablesAndOptionalsStructStructCtor_1, - newElement_0_nullableInt, newElement_0_optionalInt, newElement_0_nullableOptionalInt, - newElement_0_nullableString, newElement_0_optionalString, newElement_0_nullableOptionalString, - newElement_0_nullableStruct, newElement_0_optionalStruct, newElement_0_nullableOptionalStruct, - newElement_0_nullableList, newElement_0_optionalList, newElement_0_nullableOptionalList); + newElement_0 = env->NewObject( + nullablesAndOptionalsStructStructClass_1, nullablesAndOptionalsStructStructCtor_1, newElement_0_nullableInt, + newElement_0_optionalInt, newElement_0_nullableOptionalInt, newElement_0_nullableString, + newElement_0_optionalString, newElement_0_nullableOptionalString, newElement_0_nullableStruct, + newElement_0_optionalStruct, newElement_0_nullableOptionalStruct, newElement_0_nullableList, + newElement_0_optionalList, newElement_0_nullableOptionalList); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -44582,29 +44263,31 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(value_iInsideOptional, value_i); } - jclass simpleStructStructClass_0; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_0); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); - return nullptr; - } + jclass simpleStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); + return nullptr; + } - jmethodID simpleStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod( - env, simpleStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/" - "Float;Ljava/lang/Double;Ljava/util/Optional;)V", - &simpleStructStructCtor_0); - if (err != CHIP_NO_ERROR || simpleStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); - return nullptr; - } + jmethodID simpleStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod( + env, simpleStructStructClass_0, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/" + "Float;Ljava/lang/Double;Ljava/util/Optional;)V", + &simpleStructStructCtor_0); + if (err != CHIP_NO_ERROR || simpleStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); + return nullptr; + } - value = env->NewObject(simpleStructStructClass_0, simpleStructStructCtor_0, value_a, value_b, value_c, value_d, value_e, - value_f, value_g, value_h, value_i); + value = env->NewObject(simpleStructStructClass_0, simpleStructStructCtor_0, value_a, value_b, value_c, value_d, + value_e, value_f, value_g, value_h, value_i); + } return value; } case Attributes::RangeRestrictedInt8u::Id: { @@ -44864,33 +44547,35 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_fabricSensitiveStruct_i); } - jclass simpleStructStructClass_2; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_2); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); - return nullptr; - } + jclass simpleStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); + return nullptr; + } - jmethodID simpleStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod( - env, simpleStructStructClass_2, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/" - "Float;Ljava/lang/Double;Ljava/util/Optional;)V", - &simpleStructStructCtor_2); - if (err != CHIP_NO_ERROR || simpleStructStructCtor_2 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); - return nullptr; - } + jmethodID simpleStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod( + env, simpleStructStructClass_2, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/Integer;Ljava/" + "lang/Float;Ljava/lang/Double;Ljava/util/Optional;)V", + &simpleStructStructCtor_2); + if (err != CHIP_NO_ERROR || simpleStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); + return nullptr; + } - newElement_0_fabricSensitiveStruct = - env->NewObject(simpleStructStructClass_2, simpleStructStructCtor_2, newElement_0_fabricSensitiveStruct_a, - newElement_0_fabricSensitiveStruct_b, newElement_0_fabricSensitiveStruct_c, - newElement_0_fabricSensitiveStruct_d, newElement_0_fabricSensitiveStruct_e, - newElement_0_fabricSensitiveStruct_f, newElement_0_fabricSensitiveStruct_g, - newElement_0_fabricSensitiveStruct_h, newElement_0_fabricSensitiveStruct_i); + newElement_0_fabricSensitiveStruct = + env->NewObject(simpleStructStructClass_2, simpleStructStructCtor_2, newElement_0_fabricSensitiveStruct_a, + newElement_0_fabricSensitiveStruct_b, newElement_0_fabricSensitiveStruct_c, + newElement_0_fabricSensitiveStruct_d, newElement_0_fabricSensitiveStruct_e, + newElement_0_fabricSensitiveStruct_f, newElement_0_fabricSensitiveStruct_g, + newElement_0_fabricSensitiveStruct_h, newElement_0_fabricSensitiveStruct_i); + } jobject newElement_0_fabricSensitiveInt8uList; chip::JniReferences::GetInstance().CreateArrayList(newElement_0_fabricSensitiveInt8uList); @@ -44914,32 +44599,34 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_fabricIndexCtorSignature.c_str(), jninewElement_0_fabricIndex, newElement_0_fabricIndex); - jclass testFabricScopedStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestFabricScoped", testFabricScopedStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestFabricScoped"); - return nullptr; - } + jclass testFabricScopedStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestFabricScoped", testFabricScopedStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestFabricScoped"); + return nullptr; + } - jmethodID testFabricScopedStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, testFabricScopedStructClass_1, "", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/lang/Integer;Ljava/util/Optional;Ljava/lang/String;Lchip/" - "devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;Ljava/util/ArrayList;Ljava/lang/Integer;)V", - &testFabricScopedStructCtor_1); - if (err != CHIP_NO_ERROR || testFabricScopedStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestFabricScoped constructor"); - return nullptr; - } + jmethodID testFabricScopedStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, testFabricScopedStructClass_1, "", + "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/lang/Integer;Ljava/util/Optional;Ljava/lang/String;Lchip/" + "devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct;Ljava/util/ArrayList;Ljava/lang/Integer;)V", + &testFabricScopedStructCtor_1); + if (err != CHIP_NO_ERROR || testFabricScopedStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestFabricScoped constructor"); + return nullptr; + } - newElement_0 = env->NewObject( - testFabricScopedStructClass_1, testFabricScopedStructCtor_1, newElement_0_fabricSensitiveInt8u, - newElement_0_optionalFabricSensitiveInt8u, newElement_0_nullableFabricSensitiveInt8u, - newElement_0_nullableOptionalFabricSensitiveInt8u, newElement_0_fabricSensitiveCharString, - newElement_0_fabricSensitiveStruct, newElement_0_fabricSensitiveInt8uList, newElement_0_fabricIndex); + newElement_0 = env->NewObject( + testFabricScopedStructClass_1, testFabricScopedStructCtor_1, newElement_0_fabricSensitiveInt8u, + newElement_0_optionalFabricSensitiveInt8u, newElement_0_nullableFabricSensitiveInt8u, + newElement_0_nullableOptionalFabricSensitiveInt8u, newElement_0_fabricSensitiveCharString, + newElement_0_fabricSensitiveStruct, newElement_0_fabricSensitiveInt8uList, newElement_0_fabricIndex); + } chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -45056,27 +44743,29 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(value_myEnumInsideOptional, value_myEnum); } - jclass testGlobalStructStructClass_0; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestGlobalStruct", testGlobalStructStructClass_0); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestGlobalStruct"); - return nullptr; - } + jclass testGlobalStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestGlobalStruct", testGlobalStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestGlobalStruct"); + return nullptr; + } - jmethodID testGlobalStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, testGlobalStructStructClass_0, "", - "(Ljava/lang/String;Ljava/lang/Long;Ljava/util/Optional;)V", - &testGlobalStructStructCtor_0); - if (err != CHIP_NO_ERROR || testGlobalStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestGlobalStruct constructor"); - return nullptr; - } + jmethodID testGlobalStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod(env, testGlobalStructStructClass_0, "", + "(Ljava/lang/String;Ljava/lang/Long;Ljava/util/Optional;)V", + &testGlobalStructStructCtor_0); + if (err != CHIP_NO_ERROR || testGlobalStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestGlobalStruct constructor"); + return nullptr; + } - value = env->NewObject(testGlobalStructStructClass_0, testGlobalStructStructCtor_0, value_name, value_myBitmap, - value_myEnum); + value = env->NewObject(testGlobalStructStructClass_0, testGlobalStructStructCtor_0, value_name, value_myBitmap, + value_myEnum); + } return value; } case Attributes::Unsupported::Id: { @@ -45841,29 +45530,31 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(value_iInsideOptional, value_i); } - jclass simpleStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); - return nullptr; - } + jclass simpleStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); + return nullptr; + } - jmethodID simpleStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, simpleStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/" - "Float;Ljava/lang/Double;Ljava/util/Optional;)V", - &simpleStructStructCtor_1); - if (err != CHIP_NO_ERROR || simpleStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); - return nullptr; - } + jmethodID simpleStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, simpleStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/Integer;Ljava/" + "lang/Float;Ljava/lang/Double;Ljava/util/Optional;)V", + &simpleStructStructCtor_1); + if (err != CHIP_NO_ERROR || simpleStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); + return nullptr; + } - value = env->NewObject(simpleStructStructClass_1, simpleStructStructCtor_1, value_a, value_b, value_c, value_d, - value_e, value_f, value_g, value_h, value_i); + value = env->NewObject(simpleStructStructClass_1, simpleStructStructCtor_1, value_a, value_b, value_c, value_d, + value_e, value_f, value_g, value_h, value_i); + } } return value; } @@ -46052,27 +45743,29 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateOptional(value_myEnumInsideOptional, value_myEnum); } - jclass testGlobalStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestGlobalStruct", testGlobalStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestGlobalStruct"); - return nullptr; - } + jclass testGlobalStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterTestGlobalStruct", testGlobalStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterTestGlobalStruct"); + return nullptr; + } - jmethodID testGlobalStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, testGlobalStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Long;Ljava/util/Optional;)V", - &testGlobalStructStructCtor_1); - if (err != CHIP_NO_ERROR || testGlobalStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestGlobalStruct constructor"); - return nullptr; - } + jmethodID testGlobalStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, testGlobalStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Long;Ljava/util/Optional;)V", + &testGlobalStructStructCtor_1); + if (err != CHIP_NO_ERROR || testGlobalStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterTestGlobalStruct constructor"); + return nullptr; + } - value = env->NewObject(testGlobalStructStructClass_1, testGlobalStructStructCtor_1, value_name, value_myBitmap, - value_myEnum); + value = env->NewObject(testGlobalStructStructClass_1, testGlobalStructStructCtor_1, value_name, value_myBitmap, + value_myEnum); + } } return value; } @@ -46126,31 +45819,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -46284,31 +45952,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -46442,31 +46085,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index 9da4b9690e..fdb5c9fb65 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -255,29 +255,32 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jninewElement_3_deviceType, newElement_3_deviceType); } - jclass accessControlTargetStructStructClass_4; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlTargetStruct", - accessControlTargetStructStructClass_4); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlTargetStruct"); - return nullptr; - } - - jmethodID accessControlTargetStructStructCtor_4; - err = chip::JniReferences::GetInstance().FindMethod( - env, accessControlTargetStructStructClass_4, "", - "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;)V", &accessControlTargetStructStructCtor_4); - if (err != CHIP_NO_ERROR || accessControlTargetStructStructCtor_4 == nullptr) { - ChipLogError(Zcl, - "Could not find ChipStructs$AccessControlClusterAccessControlTargetStruct constructor"); - return nullptr; + jclass accessControlTargetStructStructClass_4; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlTargetStruct", + accessControlTargetStructStructClass_4); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlTargetStruct"); + return nullptr; + } + + jmethodID accessControlTargetStructStructCtor_4; + err = chip::JniReferences::GetInstance().FindMethod( + env, accessControlTargetStructStructClass_4, "", + "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Long;)V", &accessControlTargetStructStructCtor_4); + if (err != CHIP_NO_ERROR || accessControlTargetStructStructCtor_4 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlTargetStruct constructor"); + return nullptr; + } + + newElement_3 = + env->NewObject(accessControlTargetStructStructClass_4, accessControlTargetStructStructCtor_4, + newElement_3_cluster, newElement_3_endpoint, newElement_3_deviceType); } - - newElement_3 = env->NewObject(accessControlTargetStructStructClass_4, accessControlTargetStructStructCtor_4, - newElement_3_cluster, newElement_3_endpoint, newElement_3_deviceType); chip::JniReferences::GetInstance().AddToList(value_latestValue_targets, newElement_3); } } @@ -289,31 +292,33 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_latestValue_fabricIndexClassName.c_str(), value_latestValue_fabricIndexCtorSignature.c_str(), jnivalue_latestValue_fabricIndex, value_latestValue_fabricIndex); - jclass accessControlEntryStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlEntryStruct", - accessControlEntryStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlEntryStruct"); - return nullptr; - } + jclass accessControlEntryStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlEntryStruct", + accessControlEntryStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlEntryStruct"); + return nullptr; + } - jmethodID accessControlEntryStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, accessControlEntryStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/lang/Integer;)V", - &accessControlEntryStructStructCtor_1); - if (err != CHIP_NO_ERROR || accessControlEntryStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlEntryStruct constructor"); - return nullptr; - } + jmethodID accessControlEntryStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, accessControlEntryStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/lang/Integer;)V", + &accessControlEntryStructStructCtor_1); + if (err != CHIP_NO_ERROR || accessControlEntryStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlEntryStruct constructor"); + return nullptr; + } - value_latestValue = - env->NewObject(accessControlEntryStructStructClass_1, accessControlEntryStructStructCtor_1, - value_latestValue_privilege, value_latestValue_authMode, value_latestValue_subjects, - value_latestValue_targets, value_latestValue_fabricIndex); + value_latestValue = + env->NewObject(accessControlEntryStructStructClass_1, accessControlEntryStructStructCtor_1, + value_latestValue_privilege, value_latestValue_authMode, value_latestValue_subjects, + value_latestValue_targets, value_latestValue_fabricIndex); + } } jobject value_fabricIndex; @@ -418,29 +423,32 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_latestValue_fabricIndexClassName.c_str(), value_latestValue_fabricIndexCtorSignature.c_str(), jnivalue_latestValue_fabricIndex, value_latestValue_fabricIndex); - jclass accessControlExtensionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlExtensionStruct", - accessControlExtensionStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlExtensionStruct"); - return nullptr; - } + jclass accessControlExtensionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$AccessControlClusterAccessControlExtensionStruct", + accessControlExtensionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$AccessControlClusterAccessControlExtensionStruct"); + return nullptr; + } - jmethodID accessControlExtensionStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, accessControlExtensionStructStructClass_1, "", - "([BLjava/lang/Integer;)V", - &accessControlExtensionStructStructCtor_1); - if (err != CHIP_NO_ERROR || accessControlExtensionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$AccessControlClusterAccessControlExtensionStruct constructor"); - return nullptr; - } + jmethodID accessControlExtensionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, accessControlExtensionStructStructClass_1, "", + "([BLjava/lang/Integer;)V", + &accessControlExtensionStructStructCtor_1); + if (err != CHIP_NO_ERROR || accessControlExtensionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$AccessControlClusterAccessControlExtensionStruct constructor"); + return nullptr; + } - value_latestValue = - env->NewObject(accessControlExtensionStructStructClass_1, accessControlExtensionStructStructCtor_1, - value_latestValue_data, value_latestValue_fabricIndex); + value_latestValue = + env->NewObject(accessControlExtensionStructStructClass_1, accessControlExtensionStructStructCtor_1, + value_latestValue_data, value_latestValue_fabricIndex); + } } jobject value_fabricIndex; @@ -2740,29 +2748,31 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_errorState_errorStateDetails); } - jclass errorStateStructStructClass_0; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct", - errorStateStructStructClass_0); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct"); - return nullptr; - } + jclass errorStateStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct", + errorStateStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct"); + return nullptr; + } - jmethodID errorStateStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, errorStateStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", - &errorStateStructStructCtor_0); - if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct constructor"); - return nullptr; - } + jmethodID errorStateStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod( + env, errorStateStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", + &errorStateStructStructCtor_0); + if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OvenCavityOperationalStateClusterErrorStateStruct constructor"); + return nullptr; + } - value_errorState = - env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorState_errorStateID, - value_errorState_errorStateLabel, value_errorState_errorStateDetails); + value_errorState = + env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorState_errorStateID, + value_errorState_errorStateLabel, value_errorState_errorStateDetails); + } jclass operationalErrorStructClass; err = chip::JniReferences::GetInstance().GetLocalClassRef( @@ -3573,28 +3583,31 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_errorState_errorStateDetails); } - jclass errorStateStructStructClass_0; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterErrorStateStruct"); - return nullptr; - } + jclass errorStateStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$OperationalStateClusterErrorStateStruct", + errorStateStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterErrorStateStruct"); + return nullptr; + } - jmethodID errorStateStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, errorStateStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", - &errorStateStructStructCtor_0); - if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterErrorStateStruct constructor"); - return nullptr; - } + jmethodID errorStateStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod( + env, errorStateStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", + &errorStateStructStructCtor_0); + if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterErrorStateStruct constructor"); + return nullptr; + } - value_errorState = - env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorState_errorStateID, - value_errorState_errorStateLabel, value_errorState_errorStateDetails); + value_errorState = + env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorState_errorStateID, + value_errorState_errorStateLabel, value_errorState_errorStateDetails); + } jclass operationalErrorStructClass; err = chip::JniReferences::GetInstance().GetLocalClassRef( @@ -3763,28 +3776,31 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_errorState_errorStateDetails); } - jclass errorStateStructStructClass_0; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterErrorStateStruct", errorStateStructStructClass_0); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterErrorStateStruct"); - return nullptr; - } + jclass errorStateStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterErrorStateStruct", + errorStateStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterErrorStateStruct"); + return nullptr; + } - jmethodID errorStateStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, errorStateStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", - &errorStateStructStructCtor_0); - if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterErrorStateStruct constructor"); - return nullptr; - } + jmethodID errorStateStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod( + env, errorStateStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", + &errorStateStructStructCtor_0); + if (err != CHIP_NO_ERROR || errorStateStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterErrorStateStruct constructor"); + return nullptr; + } - value_errorState = - env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorState_errorStateID, - value_errorState_errorStateLabel, value_errorState_errorStateDetails); + value_errorState = + env->NewObject(errorStateStructStructClass_0, errorStateStructStructCtor_0, value_errorState_errorStateID, + value_errorState_errorStateLabel, value_errorState_errorStateDetails); + } jclass operationalErrorStructClass; err = chip::JniReferences::GetInstance().GetLocalClassRef( @@ -4334,35 +4350,38 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & newElement_0_maxSystime); } - jclass measurementRangeStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ElectricalPowerMeasurementClusterMeasurementRangeStruct", - measurementRangeStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalPowerMeasurementClusterMeasurementRangeStruct"); - return nullptr; - } + jclass measurementRangeStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalPowerMeasurementClusterMeasurementRangeStruct", + measurementRangeStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$ElectricalPowerMeasurementClusterMeasurementRangeStruct"); + return nullptr; + } - jmethodID measurementRangeStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, measurementRangeStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" - "Optional;)V", - &measurementRangeStructStructCtor_1); - if (err != CHIP_NO_ERROR || measurementRangeStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$ElectricalPowerMeasurementClusterMeasurementRangeStruct constructor"); - return nullptr; - } + jmethodID measurementRangeStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, measurementRangeStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;)V", + &measurementRangeStructStructCtor_1); + if (err != CHIP_NO_ERROR || measurementRangeStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipStructs$ElectricalPowerMeasurementClusterMeasurementRangeStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(measurementRangeStructStructClass_1, measurementRangeStructStructCtor_1, - newElement_0_measurementType, newElement_0_min, newElement_0_max, - newElement_0_startTimestamp, newElement_0_endTimestamp, newElement_0_minTimestamp, - newElement_0_maxTimestamp, newElement_0_startSystime, newElement_0_endSystime, - newElement_0_minSystime, newElement_0_maxSystime); + newElement_0 = env->NewObject(measurementRangeStructStructClass_1, measurementRangeStructStructCtor_1, + newElement_0_measurementType, newElement_0_min, newElement_0_max, + newElement_0_startTimestamp, newElement_0_endTimestamp, newElement_0_minTimestamp, + newElement_0_maxTimestamp, newElement_0_startSystime, newElement_0_endSystime, + newElement_0_minSystime, newElement_0_maxSystime); + } chip::JniReferences::GetInstance().AddToList(value_ranges, newElement_0); } @@ -4507,33 +4526,37 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_energyImportedInsideOptional_endSystime); } - jclass energyMeasurementStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", - energyMeasurementStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); - return nullptr; - } + jclass energyMeasurementStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", + energyMeasurementStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); + return nullptr; + } - jmethodID energyMeasurementStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, energyMeasurementStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &energyMeasurementStructStructCtor_1); - if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) - { - ChipLogError( - Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); - return nullptr; - } + jmethodID energyMeasurementStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, energyMeasurementStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &energyMeasurementStructStructCtor_1); + if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); + return nullptr; + } - value_energyImportedInsideOptional = - env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, - value_energyImportedInsideOptional_energy, value_energyImportedInsideOptional_startTimestamp, - value_energyImportedInsideOptional_endTimestamp, value_energyImportedInsideOptional_startSystime, - value_energyImportedInsideOptional_endSystime); + value_energyImportedInsideOptional = env->NewObject( + energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, + value_energyImportedInsideOptional_energy, value_energyImportedInsideOptional_startTimestamp, + value_energyImportedInsideOptional_endTimestamp, value_energyImportedInsideOptional_startSystime, + value_energyImportedInsideOptional_endSystime); + } chip::JniReferences::GetInstance().CreateOptional(value_energyImportedInsideOptional, value_energyImported); } @@ -4635,33 +4658,37 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_energyExportedInsideOptional_endSystime); } - jclass energyMeasurementStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", - energyMeasurementStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); - return nullptr; - } + jclass energyMeasurementStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", + energyMeasurementStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); + return nullptr; + } - jmethodID energyMeasurementStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, energyMeasurementStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &energyMeasurementStructStructCtor_1); - if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) - { - ChipLogError( - Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); - return nullptr; - } + jmethodID energyMeasurementStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, energyMeasurementStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &energyMeasurementStructStructCtor_1); + if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); + return nullptr; + } - value_energyExportedInsideOptional = - env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, - value_energyExportedInsideOptional_energy, value_energyExportedInsideOptional_startTimestamp, - value_energyExportedInsideOptional_endTimestamp, value_energyExportedInsideOptional_startSystime, - value_energyExportedInsideOptional_endSystime); + value_energyExportedInsideOptional = env->NewObject( + energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, + value_energyExportedInsideOptional_energy, value_energyExportedInsideOptional_startTimestamp, + value_energyExportedInsideOptional_endTimestamp, value_energyExportedInsideOptional_startSystime, + value_energyExportedInsideOptional_endSystime); + } chip::JniReferences::GetInstance().CreateOptional(value_energyExportedInsideOptional, value_energyExported); } @@ -4798,33 +4825,37 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_energyImportedInsideOptional_endSystime); } - jclass energyMeasurementStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", - energyMeasurementStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); - return nullptr; - } + jclass energyMeasurementStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", + energyMeasurementStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); + return nullptr; + } - jmethodID energyMeasurementStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, energyMeasurementStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &energyMeasurementStructStructCtor_1); - if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) - { - ChipLogError( - Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); - return nullptr; - } + jmethodID energyMeasurementStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, energyMeasurementStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &energyMeasurementStructStructCtor_1); + if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); + return nullptr; + } - value_energyImportedInsideOptional = - env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, - value_energyImportedInsideOptional_energy, value_energyImportedInsideOptional_startTimestamp, - value_energyImportedInsideOptional_endTimestamp, value_energyImportedInsideOptional_startSystime, - value_energyImportedInsideOptional_endSystime); + value_energyImportedInsideOptional = env->NewObject( + energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, + value_energyImportedInsideOptional_energy, value_energyImportedInsideOptional_startTimestamp, + value_energyImportedInsideOptional_endTimestamp, value_energyImportedInsideOptional_startSystime, + value_energyImportedInsideOptional_endSystime); + } chip::JniReferences::GetInstance().CreateOptional(value_energyImportedInsideOptional, value_energyImported); } @@ -4926,33 +4957,37 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_energyExportedInsideOptional_endSystime); } - jclass energyMeasurementStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", - energyMeasurementStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); - return nullptr; - } + jclass energyMeasurementStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct", + energyMeasurementStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct"); + return nullptr; + } - jmethodID energyMeasurementStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, energyMeasurementStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &energyMeasurementStructStructCtor_1); - if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) - { - ChipLogError( - Zcl, "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); - return nullptr; - } + jmethodID energyMeasurementStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, energyMeasurementStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &energyMeasurementStructStructCtor_1); + if (err != CHIP_NO_ERROR || energyMeasurementStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$ElectricalEnergyMeasurementClusterEnergyMeasurementStruct constructor"); + return nullptr; + } - value_energyExportedInsideOptional = - env->NewObject(energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, - value_energyExportedInsideOptional_energy, value_energyExportedInsideOptional_startTimestamp, - value_energyExportedInsideOptional_endTimestamp, value_energyExportedInsideOptional_startSystime, - value_energyExportedInsideOptional_endSystime); + value_energyExportedInsideOptional = env->NewObject( + energyMeasurementStructStructClass_1, energyMeasurementStructStructCtor_1, + value_energyExportedInsideOptional_energy, value_energyExportedInsideOptional_startTimestamp, + value_energyExportedInsideOptional_endTimestamp, value_energyExportedInsideOptional_startSystime, + value_energyExportedInsideOptional_endSystime); + } chip::JniReferences::GetInstance().CreateOptional(value_energyExportedInsideOptional, value_energyExported); } @@ -5102,31 +5137,35 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_boostInfo_targetReheat); } - jclass waterHeaterBoostInfoStructStructClass_0; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$WaterHeaterManagementClusterWaterHeaterBoostInfoStruct", - waterHeaterBoostInfoStructStructClass_0); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$WaterHeaterManagementClusterWaterHeaterBoostInfoStruct"); - return nullptr; - } + jclass waterHeaterBoostInfoStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$WaterHeaterManagementClusterWaterHeaterBoostInfoStruct", + waterHeaterBoostInfoStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$WaterHeaterManagementClusterWaterHeaterBoostInfoStruct"); + return nullptr; + } - jmethodID waterHeaterBoostInfoStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, waterHeaterBoostInfoStructStructClass_0, "", - "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/" - "util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &waterHeaterBoostInfoStructStructCtor_0); - if (err != CHIP_NO_ERROR || waterHeaterBoostInfoStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$WaterHeaterManagementClusterWaterHeaterBoostInfoStruct constructor"); - return nullptr; - } + jmethodID waterHeaterBoostInfoStructStructCtor_0; + err = + chip::JniReferences::GetInstance().FindMethod(env, waterHeaterBoostInfoStructStructClass_0, "", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/" + "util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &waterHeaterBoostInfoStructStructCtor_0); + if (err != CHIP_NO_ERROR || waterHeaterBoostInfoStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$WaterHeaterManagementClusterWaterHeaterBoostInfoStruct constructor"); + return nullptr; + } - value_boostInfo = - env->NewObject(waterHeaterBoostInfoStructStructClass_0, waterHeaterBoostInfoStructStructCtor_0, - value_boostInfo_duration, value_boostInfo_oneShot, value_boostInfo_emergencyBoost, - value_boostInfo_temporarySetpoint, value_boostInfo_targetPercentage, value_boostInfo_targetReheat); + value_boostInfo = env->NewObject(waterHeaterBoostInfoStructStructClass_0, waterHeaterBoostInfoStructStructCtor_0, + value_boostInfo_duration, value_boostInfo_oneShot, value_boostInfo_emergencyBoost, + value_boostInfo_temporarySetpoint, value_boostInfo_targetPercentage, + value_boostInfo_targetReheat); + } jclass boostStartedStructClass; err = chip::JniReferences::GetInstance().GetLocalClassRef( @@ -5380,35 +5419,38 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_temperatureControlInsideOptional_heatingTempSetpoint); } - jclass temperatureControlStructStructClass_2; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct", - temperatureControlStructStructClass_2); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, - "Could not find class ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct"); - return nullptr; - } + jclass temperatureControlStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct", + temperatureControlStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct"); + return nullptr; + } - jmethodID temperatureControlStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod( - env, temperatureControlStructStructClass_2, "", - "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &temperatureControlStructStructCtor_2); - if (err != CHIP_NO_ERROR || temperatureControlStructStructCtor_2 == nullptr) - { - ChipLogError( - Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct constructor"); - return nullptr; - } + jmethodID temperatureControlStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod( + env, temperatureControlStructStructClass_2, "", + "(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &temperatureControlStructStructCtor_2); + if (err != CHIP_NO_ERROR || temperatureControlStructStructCtor_2 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterTemperatureControlStruct constructor"); + return nullptr; + } - value_temperatureControlInsideOptional = - env->NewObject(temperatureControlStructStructClass_2, temperatureControlStructStructCtor_2, - value_temperatureControlInsideOptional_coolingTempOffset, - value_temperatureControlInsideOptional_heatingtTempOffset, - value_temperatureControlInsideOptional_coolingTempSetpoint, - value_temperatureControlInsideOptional_heatingTempSetpoint); + value_temperatureControlInsideOptional = + env->NewObject(temperatureControlStructStructClass_2, temperatureControlStructStructCtor_2, + value_temperatureControlInsideOptional_coolingTempOffset, + value_temperatureControlInsideOptional_heatingtTempOffset, + value_temperatureControlInsideOptional_coolingTempSetpoint, + value_temperatureControlInsideOptional_heatingTempSetpoint); + } } chip::JniReferences::GetInstance().CreateOptional(value_temperatureControlInsideOptional, value_temperatureControl); } @@ -5438,31 +5480,34 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jnivalue_averageLoadControlInsideOptional_loadAdjustment, value_averageLoadControlInsideOptional_loadAdjustment); - jclass averageLoadControlStructStructClass_2; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct", - averageLoadControlStructStructClass_2); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, - "Could not find class ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct"); - return nullptr; - } - - jmethodID averageLoadControlStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod(env, averageLoadControlStructStructClass_2, "", - "(Ljava/lang/Integer;)V", - &averageLoadControlStructStructCtor_2); - if (err != CHIP_NO_ERROR || averageLoadControlStructStructCtor_2 == nullptr) { - ChipLogError( - Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct constructor"); - return nullptr; - } + jclass averageLoadControlStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct", + averageLoadControlStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct"); + return nullptr; + } - value_averageLoadControlInsideOptional = - env->NewObject(averageLoadControlStructStructClass_2, averageLoadControlStructStructCtor_2, - value_averageLoadControlInsideOptional_loadAdjustment); + jmethodID averageLoadControlStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod(env, averageLoadControlStructStructClass_2, "", + "(Ljava/lang/Integer;)V", + &averageLoadControlStructStructCtor_2); + if (err != CHIP_NO_ERROR || averageLoadControlStructStructCtor_2 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterAverageLoadControlStruct constructor"); + return nullptr; + } + + value_averageLoadControlInsideOptional = + env->NewObject(averageLoadControlStructStructClass_2, averageLoadControlStructStructCtor_2, + value_averageLoadControlInsideOptional_loadAdjustment); + } } chip::JniReferences::GetInstance().CreateOptional(value_averageLoadControlInsideOptional, value_averageLoadControl); } @@ -5491,31 +5536,34 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_dutyCycleControlInsideOptional_dutyCycleCtorSignature.c_str(), jnivalue_dutyCycleControlInsideOptional_dutyCycle, value_dutyCycleControlInsideOptional_dutyCycle); - jclass dutyCycleControlStructStructClass_2; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct", - dutyCycleControlStructStructClass_2); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, - "Could not find class ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct"); - return nullptr; - } + jclass dutyCycleControlStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct", + dutyCycleControlStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct"); + return nullptr; + } - jmethodID dutyCycleControlStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod(env, dutyCycleControlStructStructClass_2, "", - "(Ljava/lang/Integer;)V", - &dutyCycleControlStructStructCtor_2); - if (err != CHIP_NO_ERROR || dutyCycleControlStructStructCtor_2 == nullptr) - { - ChipLogError( - Zcl, "Could not find ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct constructor"); - return nullptr; - } + jmethodID dutyCycleControlStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod(env, dutyCycleControlStructStructClass_2, "", + "(Ljava/lang/Integer;)V", + &dutyCycleControlStructStructCtor_2); + if (err != CHIP_NO_ERROR || dutyCycleControlStructStructCtor_2 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterDutyCycleControlStruct constructor"); + return nullptr; + } - value_dutyCycleControlInsideOptional = - env->NewObject(dutyCycleControlStructStructClass_2, dutyCycleControlStructStructCtor_2, - value_dutyCycleControlInsideOptional_dutyCycle); + value_dutyCycleControlInsideOptional = + env->NewObject(dutyCycleControlStructStructClass_2, dutyCycleControlStructStructCtor_2, + value_dutyCycleControlInsideOptional_dutyCycle); + } } chip::JniReferences::GetInstance().CreateOptional(value_dutyCycleControlInsideOptional, value_dutyCycleControl); } @@ -5545,32 +5593,34 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jnivalue_powerSavingsControlInsideOptional_powerSavings, value_powerSavingsControlInsideOptional_powerSavings); - jclass powerSavingsControlStructStructClass_2; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct", - powerSavingsControlStructStructClass_2); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, - "Could not find class ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct"); - return nullptr; - } + jclass powerSavingsControlStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct", + powerSavingsControlStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct"); + return nullptr; + } - jmethodID powerSavingsControlStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod(env, powerSavingsControlStructStructClass_2, "", - "(Ljava/lang/Integer;)V", - &powerSavingsControlStructStructCtor_2); - if (err != CHIP_NO_ERROR || powerSavingsControlStructStructCtor_2 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct constructor"); - return nullptr; - } + jmethodID powerSavingsControlStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod(env, powerSavingsControlStructStructClass_2, "", + "(Ljava/lang/Integer;)V", + &powerSavingsControlStructStructCtor_2); + if (err != CHIP_NO_ERROR || powerSavingsControlStructStructCtor_2 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterPowerSavingsControlStruct constructor"); + return nullptr; + } - value_powerSavingsControlInsideOptional = - env->NewObject(powerSavingsControlStructStructClass_2, powerSavingsControlStructStructCtor_2, - value_powerSavingsControlInsideOptional_powerSavings); + value_powerSavingsControlInsideOptional = + env->NewObject(powerSavingsControlStructStructClass_2, powerSavingsControlStructStructCtor_2, + value_powerSavingsControlInsideOptional_powerSavings); + } } chip::JniReferences::GetInstance().CreateOptional(value_powerSavingsControlInsideOptional, value_powerSavingsControl); @@ -5601,32 +5651,34 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jnivalue_heatingSourceControlInsideOptional_heatingSource, value_heatingSourceControlInsideOptional_heatingSource); - jclass heatingSourceControlStructStructClass_2; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct", - heatingSourceControlStructStructClass_2); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, - "Could not find class ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct"); - return nullptr; - } + jclass heatingSourceControlStructStructClass_2; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct", + heatingSourceControlStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct"); + return nullptr; + } - jmethodID heatingSourceControlStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod(env, heatingSourceControlStructStructClass_2, "", - "(Ljava/lang/Integer;)V", - &heatingSourceControlStructStructCtor_2); - if (err != CHIP_NO_ERROR || heatingSourceControlStructStructCtor_2 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct constructor"); - return nullptr; - } + jmethodID heatingSourceControlStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod(env, heatingSourceControlStructStructClass_2, "", + "(Ljava/lang/Integer;)V", + &heatingSourceControlStructStructCtor_2); + if (err != CHIP_NO_ERROR || heatingSourceControlStructStructCtor_2 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$DemandResponseLoadControlClusterHeatingSourceControlStruct " + "constructor"); + return nullptr; + } - value_heatingSourceControlInsideOptional = - env->NewObject(heatingSourceControlStructStructClass_2, heatingSourceControlStructStructCtor_2, - value_heatingSourceControlInsideOptional_heatingSource); + value_heatingSourceControlInsideOptional = + env->NewObject(heatingSourceControlStructStructClass_2, heatingSourceControlStructStructCtor_2, + value_heatingSourceControlInsideOptional_heatingSource); + } } chip::JniReferences::GetInstance().CreateOptional(value_heatingSourceControlInsideOptional, value_heatingSourceControl); @@ -6614,28 +6666,30 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & newElement_2_credentialIndexClassName.c_str(), newElement_2_credentialIndexCtorSignature.c_str(), jninewElement_2_credentialIndex, newElement_2_credentialIndex); - jclass credentialStructStructClass_3; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DoorLockClusterCredentialStruct", - credentialStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DoorLockClusterCredentialStruct"); - return nullptr; - } - - jmethodID credentialStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, credentialStructStructClass_3, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;)V", - &credentialStructStructCtor_3); - if (err != CHIP_NO_ERROR || credentialStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$DoorLockClusterCredentialStruct constructor"); - return nullptr; + jclass credentialStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DoorLockClusterCredentialStruct", + credentialStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DoorLockClusterCredentialStruct"); + return nullptr; + } + + jmethodID credentialStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, credentialStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &credentialStructStructCtor_3); + if (err != CHIP_NO_ERROR || credentialStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DoorLockClusterCredentialStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(credentialStructStructClass_3, credentialStructStructCtor_3, + newElement_2_credentialType, newElement_2_credentialIndex); } - - newElement_2 = env->NewObject(credentialStructStructClass_3, credentialStructStructCtor_3, - newElement_2_credentialType, newElement_2_credentialIndex); chip::JniReferences::GetInstance().AddToList(value_credentialsInsideOptional, newElement_2); } } @@ -6779,28 +6833,30 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & newElement_2_credentialIndexClassName.c_str(), newElement_2_credentialIndexCtorSignature.c_str(), jninewElement_2_credentialIndex, newElement_2_credentialIndex); - jclass credentialStructStructClass_3; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$DoorLockClusterCredentialStruct", - credentialStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DoorLockClusterCredentialStruct"); - return nullptr; - } - - jmethodID credentialStructStructCtor_3; - err = chip::JniReferences::GetInstance().FindMethod(env, credentialStructStructClass_3, "", - "(Ljava/lang/Integer;Ljava/lang/Integer;)V", - &credentialStructStructCtor_3); - if (err != CHIP_NO_ERROR || credentialStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$DoorLockClusterCredentialStruct constructor"); - return nullptr; + jclass credentialStructStructClass_3; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$DoorLockClusterCredentialStruct", + credentialStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DoorLockClusterCredentialStruct"); + return nullptr; + } + + jmethodID credentialStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, credentialStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &credentialStructStructCtor_3); + if (err != CHIP_NO_ERROR || credentialStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DoorLockClusterCredentialStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(credentialStructStructClass_3, credentialStructStructCtor_3, + newElement_2_credentialType, newElement_2_credentialIndex); } - - newElement_2 = env->NewObject(credentialStructStructClass_3, credentialStructStructCtor_3, - newElement_2_credentialType, newElement_2_credentialIndex); chip::JniReferences::GetInstance().AddToList(value_credentialsInsideOptional, newElement_2); } } @@ -7844,27 +7900,30 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jobject newElement_0_name; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name)); - jclass targetInfoStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$TargetNavigatorClusterTargetInfoStruct", targetInfoStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$TargetNavigatorClusterTargetInfoStruct"); - return nullptr; - } + jclass targetInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$TargetNavigatorClusterTargetInfoStruct", + targetInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$TargetNavigatorClusterTargetInfoStruct"); + return nullptr; + } - jmethodID targetInfoStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, targetInfoStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/String;)V", - &targetInfoStructStructCtor_1); - if (err != CHIP_NO_ERROR || targetInfoStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$TargetNavigatorClusterTargetInfoStruct constructor"); - return nullptr; - } + jmethodID targetInfoStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, targetInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/String;)V", + &targetInfoStructStructCtor_1); + if (err != CHIP_NO_ERROR || targetInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$TargetNavigatorClusterTargetInfoStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(targetInfoStructStructClass_1, targetInfoStructStructCtor_1, newElement_0_identifier, - newElement_0_name); + newElement_0 = env->NewObject(targetInfoStructStructClass_1, targetInfoStructStructCtor_1, + newElement_0_identifier, newElement_0_name); + } chip::JniReferences::GetInstance().AddToList(value_targetList, newElement_0); } @@ -7967,28 +8026,30 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jnivalue_sampledPosition_position, value_sampledPosition_position); } - jclass playbackPositionStructStructClass_0; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterPlaybackPositionStruct", - playbackPositionStructStructClass_0); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterPlaybackPositionStruct"); - return nullptr; - } + jclass playbackPositionStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$MediaPlaybackClusterPlaybackPositionStruct", + playbackPositionStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MediaPlaybackClusterPlaybackPositionStruct"); + return nullptr; + } - jmethodID playbackPositionStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod(env, playbackPositionStructStructClass_0, "", - "(Ljava/lang/Long;Ljava/lang/Long;)V", - &playbackPositionStructStructCtor_0); - if (err != CHIP_NO_ERROR || playbackPositionStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterPlaybackPositionStruct constructor"); - return nullptr; - } + jmethodID playbackPositionStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod(env, playbackPositionStructStructClass_0, "", + "(Ljava/lang/Long;Ljava/lang/Long;)V", + &playbackPositionStructStructCtor_0); + if (err != CHIP_NO_ERROR || playbackPositionStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MediaPlaybackClusterPlaybackPositionStruct constructor"); + return nullptr; + } - value_sampledPosition = env->NewObject(playbackPositionStructStructClass_0, playbackPositionStructStructCtor_0, - value_sampledPosition_updatedAt, value_sampledPosition_position); + value_sampledPosition = env->NewObject(playbackPositionStructStructClass_0, playbackPositionStructStructCtor_0, + value_sampledPosition_updatedAt, value_sampledPosition_position); + } jobject value_playbackSpeed; std::string value_playbackSpeedClassName = "java/lang/Float"; @@ -8248,101 +8309,111 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } - case app::Clusters::WebRTCTransportProvider::Id: { - using namespace app::Clusters::WebRTCTransportProvider; - switch (aPath.mEventId) - { - default: - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - break; - } - break; - } - case app::Clusters::Chime::Id: { - using namespace app::Clusters::Chime; - switch (aPath.mEventId) - { - default: - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - break; - } - break; - } - case app::Clusters::EcosystemInformation::Id: { - using namespace app::Clusters::EcosystemInformation; - switch (aPath.mEventId) - { - default: - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - break; - } - break; - } - case app::Clusters::CommissionerControl::Id: { - using namespace app::Clusters::CommissionerControl; + case app::Clusters::ZoneManagement::Id: { + using namespace app::Clusters::ZoneManagement; switch (aPath.mEventId) { - case Events::CommissioningRequestResult::Id: { - Events::CommissioningRequestResult::DecodableType cppValue; + case Events::ZoneTriggered::Id: { + Events::ZoneTriggered::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } - jobject value_requestID; - std::string value_requestIDClassName = "java/lang/Long"; - std::string value_requestIDCtorSignature = "(J)V"; - jlong jnivalue_requestID = static_cast(cppValue.requestID); - chip::JniReferences::GetInstance().CreateBoxedObject( - value_requestIDClassName.c_str(), value_requestIDCtorSignature.c_str(), jnivalue_requestID, value_requestID); + jobject value_zones; + chip::JniReferences::GetInstance().CreateArrayList(value_zones); - jobject value_clientNodeID; - std::string value_clientNodeIDClassName = "java/lang/Long"; - std::string value_clientNodeIDCtorSignature = "(J)V"; - jlong jnivalue_clientNodeID = static_cast(cppValue.clientNodeID); - chip::JniReferences::GetInstance().CreateBoxedObject(value_clientNodeIDClassName.c_str(), - value_clientNodeIDCtorSignature.c_str(), - jnivalue_clientNodeID, value_clientNodeID); + auto iter_value_zones_0 = cppValue.zones.begin(); + while (iter_value_zones_0.Next()) + { + auto & entry_0 = iter_value_zones_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value_zones, newElement_0); + } - jobject value_statusCode; - std::string value_statusCodeClassName = "java/lang/Integer"; - std::string value_statusCodeCtorSignature = "(I)V"; - jint jnivalue_statusCode = static_cast(cppValue.statusCode); + jobject value_reason; + std::string value_reasonClassName = "java/lang/Integer"; + std::string value_reasonCtorSignature = "(I)V"; + jint jnivalue_reason = static_cast(cppValue.reason); chip::JniReferences::GetInstance().CreateBoxedObject( - value_statusCodeClassName.c_str(), value_statusCodeCtorSignature.c_str(), jnivalue_statusCode, value_statusCode); + value_reasonClassName.c_str(), value_reasonCtorSignature.c_str(), jnivalue_reason, value_reason); - jobject value_fabricIndex; - std::string value_fabricIndexClassName = "java/lang/Integer"; - std::string value_fabricIndexCtorSignature = "(I)V"; - jint jnivalue_fabricIndex = static_cast(cppValue.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), - value_fabricIndexCtorSignature.c_str(), jnivalue_fabricIndex, - value_fabricIndex); + jclass zoneTriggeredStructClass; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipEventStructs$ZoneManagementClusterZoneTriggeredEvent", zoneTriggeredStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$ZoneManagementClusterZoneTriggeredEvent"); + return nullptr; + } - jclass commissioningRequestResultStructClass; + jmethodID zoneTriggeredStructCtor; + err = chip::JniReferences::GetInstance().FindMethod( + env, zoneTriggeredStructClass, "", "(Ljava/util/ArrayList;Ljava/lang/Integer;)V", &zoneTriggeredStructCtor); + if (err != CHIP_NO_ERROR || zoneTriggeredStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$ZoneManagementClusterZoneTriggeredEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(zoneTriggeredStructClass, zoneTriggeredStructCtor, value_zones, value_reason); + + return value; + } + case Events::ZoneStopped::Id: { + Events::ZoneStopped::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_zones; + chip::JniReferences::GetInstance().CreateArrayList(value_zones); + + auto iter_value_zones_0 = cppValue.zones.begin(); + while (iter_value_zones_0.Next()) + { + auto & entry_0 = iter_value_zones_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value_zones, newElement_0); + } + + jobject value_reason; + std::string value_reasonClassName = "java/lang/Integer"; + std::string value_reasonCtorSignature = "(I)V"; + jint jnivalue_reason = static_cast(cppValue.reason); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_reasonClassName.c_str(), value_reasonCtorSignature.c_str(), jnivalue_reason, value_reason); + + jclass zoneStoppedStructClass; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipEventStructs$CommissionerControlClusterCommissioningRequestResultEvent", - commissioningRequestResultStructClass); + env, "chip/devicecontroller/ChipEventStructs$ZoneManagementClusterZoneStoppedEvent", zoneStoppedStructClass); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, - "Could not find class ChipEventStructs$CommissionerControlClusterCommissioningRequestResultEvent"); + ChipLogError(Zcl, "Could not find class ChipEventStructs$ZoneManagementClusterZoneStoppedEvent"); return nullptr; } - jmethodID commissioningRequestResultStructCtor; + jmethodID zoneStoppedStructCtor; err = chip::JniReferences::GetInstance().FindMethod( - env, commissioningRequestResultStructClass, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;)V", &commissioningRequestResultStructCtor); - if (err != CHIP_NO_ERROR || commissioningRequestResultStructCtor == nullptr) + env, zoneStoppedStructClass, "", "(Ljava/util/ArrayList;Ljava/lang/Integer;)V", &zoneStoppedStructCtor); + if (err != CHIP_NO_ERROR || zoneStoppedStructCtor == nullptr) { - ChipLogError( - Zcl, "Could not find ChipEventStructs$CommissionerControlClusterCommissioningRequestResultEvent constructor"); + ChipLogError(Zcl, "Could not find ChipEventStructs$ZoneManagementClusterZoneStoppedEvent constructor"); return nullptr; } - jobject value = env->NewObject(commissioningRequestResultStructClass, commissioningRequestResultStructCtor, - value_requestID, value_clientNodeID, value_statusCode, value_fabricIndex); + jobject value = env->NewObject(zoneStoppedStructClass, zoneStoppedStructCtor, value_zones, value_reason); return value; } @@ -8352,34 +8423,814 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } - case app::Clusters::UnitTesting::Id: { - using namespace app::Clusters::UnitTesting; + case app::Clusters::CameraAvStreamManagement::Id: { + using namespace app::Clusters::CameraAvStreamManagement; switch (aPath.mEventId) { - case Events::TestEvent::Id: { - Events::TestEvent::DecodableType cppValue; + case Events::VideoStreamChanged::Id: { + Events::VideoStreamChanged::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nullptr; } - jobject value_arg1; - std::string value_arg1ClassName = "java/lang/Integer"; - std::string value_arg1CtorSignature = "(I)V"; - jint jnivalue_arg1 = static_cast(cppValue.arg1); - chip::JniReferences::GetInstance().CreateBoxedObject(value_arg1ClassName.c_str(), value_arg1CtorSignature.c_str(), - jnivalue_arg1, value_arg1); + jobject value_videoStreamID; + std::string value_videoStreamIDClassName = "java/lang/Integer"; + std::string value_videoStreamIDCtorSignature = "(I)V"; + jint jnivalue_videoStreamID = static_cast(cppValue.videoStreamID); + chip::JniReferences::GetInstance().CreateBoxedObject(value_videoStreamIDClassName.c_str(), + value_videoStreamIDCtorSignature.c_str(), + jnivalue_videoStreamID, value_videoStreamID); - jobject value_arg2; - std::string value_arg2ClassName = "java/lang/Integer"; - std::string value_arg2CtorSignature = "(I)V"; - jint jnivalue_arg2 = static_cast(cppValue.arg2); - chip::JniReferences::GetInstance().CreateBoxedObject(value_arg2ClassName.c_str(), value_arg2CtorSignature.c_str(), - jnivalue_arg2, value_arg2); + jobject value_streamType; + if (!cppValue.streamType.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_streamType); + } + else + { + jobject value_streamTypeInsideOptional; + std::string value_streamTypeInsideOptionalClassName = "java/lang/Integer"; + std::string value_streamTypeInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_streamTypeInsideOptional = static_cast(cppValue.streamType.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_streamTypeInsideOptionalClassName.c_str(), value_streamTypeInsideOptionalCtorSignature.c_str(), + jnivalue_streamTypeInsideOptional, value_streamTypeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_streamTypeInsideOptional, value_streamType); + } - jobject value_arg3; - std::string value_arg3ClassName = "java/lang/Boolean"; - std::string value_arg3CtorSignature = "(Z)V"; + jobject value_videoCodec; + if (!cppValue.videoCodec.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_videoCodec); + } + else + { + jobject value_videoCodecInsideOptional; + std::string value_videoCodecInsideOptionalClassName = "java/lang/Integer"; + std::string value_videoCodecInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_videoCodecInsideOptional = static_cast(cppValue.videoCodec.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_videoCodecInsideOptionalClassName.c_str(), value_videoCodecInsideOptionalCtorSignature.c_str(), + jnivalue_videoCodecInsideOptional, value_videoCodecInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_videoCodecInsideOptional, value_videoCodec); + } + + jobject value_minFrameRate; + if (!cppValue.minFrameRate.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_minFrameRate); + } + else + { + jobject value_minFrameRateInsideOptional; + std::string value_minFrameRateInsideOptionalClassName = "java/lang/Integer"; + std::string value_minFrameRateInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_minFrameRateInsideOptional = static_cast(cppValue.minFrameRate.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_minFrameRateInsideOptionalClassName.c_str(), value_minFrameRateInsideOptionalCtorSignature.c_str(), + jnivalue_minFrameRateInsideOptional, value_minFrameRateInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_minFrameRateInsideOptional, value_minFrameRate); + } + + jobject value_maxFrameRate; + if (!cppValue.maxFrameRate.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_maxFrameRate); + } + else + { + jobject value_maxFrameRateInsideOptional; + std::string value_maxFrameRateInsideOptionalClassName = "java/lang/Integer"; + std::string value_maxFrameRateInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_maxFrameRateInsideOptional = static_cast(cppValue.maxFrameRate.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_maxFrameRateInsideOptionalClassName.c_str(), value_maxFrameRateInsideOptionalCtorSignature.c_str(), + jnivalue_maxFrameRateInsideOptional, value_maxFrameRateInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_maxFrameRateInsideOptional, value_maxFrameRate); + } + + jobject value_minResolution; + if (!cppValue.minResolution.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_minResolution); + } + else + { + jobject value_minResolutionInsideOptional; + jobject value_minResolutionInsideOptional_width; + std::string value_minResolutionInsideOptional_widthClassName = "java/lang/Integer"; + std::string value_minResolutionInsideOptional_widthCtorSignature = "(I)V"; + jint jnivalue_minResolutionInsideOptional_width = static_cast(cppValue.minResolution.Value().width); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_minResolutionInsideOptional_widthClassName.c_str(), + value_minResolutionInsideOptional_widthCtorSignature.c_str(), jnivalue_minResolutionInsideOptional_width, + value_minResolutionInsideOptional_width); + jobject value_minResolutionInsideOptional_height; + std::string value_minResolutionInsideOptional_heightClassName = "java/lang/Integer"; + std::string value_minResolutionInsideOptional_heightCtorSignature = "(I)V"; + jint jnivalue_minResolutionInsideOptional_height = static_cast(cppValue.minResolution.Value().height); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_minResolutionInsideOptional_heightClassName.c_str(), + value_minResolutionInsideOptional_heightCtorSignature.c_str(), jnivalue_minResolutionInsideOptional_height, + value_minResolutionInsideOptional_height); + + { + jclass videoResolutionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", + videoResolutionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); + return nullptr; + } + + jmethodID videoResolutionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &videoResolutionStructStructCtor_1); + if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); + return nullptr; + } + + value_minResolutionInsideOptional = + env->NewObject(videoResolutionStructStructClass_1, videoResolutionStructStructCtor_1, + value_minResolutionInsideOptional_width, value_minResolutionInsideOptional_height); + } + chip::JniReferences::GetInstance().CreateOptional(value_minResolutionInsideOptional, value_minResolution); + } + + jobject value_maxResolution; + if (!cppValue.maxResolution.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_maxResolution); + } + else + { + jobject value_maxResolutionInsideOptional; + jobject value_maxResolutionInsideOptional_width; + std::string value_maxResolutionInsideOptional_widthClassName = "java/lang/Integer"; + std::string value_maxResolutionInsideOptional_widthCtorSignature = "(I)V"; + jint jnivalue_maxResolutionInsideOptional_width = static_cast(cppValue.maxResolution.Value().width); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_maxResolutionInsideOptional_widthClassName.c_str(), + value_maxResolutionInsideOptional_widthCtorSignature.c_str(), jnivalue_maxResolutionInsideOptional_width, + value_maxResolutionInsideOptional_width); + jobject value_maxResolutionInsideOptional_height; + std::string value_maxResolutionInsideOptional_heightClassName = "java/lang/Integer"; + std::string value_maxResolutionInsideOptional_heightCtorSignature = "(I)V"; + jint jnivalue_maxResolutionInsideOptional_height = static_cast(cppValue.maxResolution.Value().height); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_maxResolutionInsideOptional_heightClassName.c_str(), + value_maxResolutionInsideOptional_heightCtorSignature.c_str(), jnivalue_maxResolutionInsideOptional_height, + value_maxResolutionInsideOptional_height); + + { + jclass videoResolutionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", + videoResolutionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); + return nullptr; + } + + jmethodID videoResolutionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &videoResolutionStructStructCtor_1); + if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); + return nullptr; + } + + value_maxResolutionInsideOptional = + env->NewObject(videoResolutionStructStructClass_1, videoResolutionStructStructCtor_1, + value_maxResolutionInsideOptional_width, value_maxResolutionInsideOptional_height); + } + chip::JniReferences::GetInstance().CreateOptional(value_maxResolutionInsideOptional, value_maxResolution); + } + + jobject value_minBitRate; + if (!cppValue.minBitRate.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_minBitRate); + } + else + { + jobject value_minBitRateInsideOptional; + std::string value_minBitRateInsideOptionalClassName = "java/lang/Long"; + std::string value_minBitRateInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_minBitRateInsideOptional = static_cast(cppValue.minBitRate.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_minBitRateInsideOptionalClassName.c_str(), value_minBitRateInsideOptionalCtorSignature.c_str(), + jnivalue_minBitRateInsideOptional, value_minBitRateInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_minBitRateInsideOptional, value_minBitRate); + } + + jobject value_maxBitRate; + if (!cppValue.maxBitRate.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_maxBitRate); + } + else + { + jobject value_maxBitRateInsideOptional; + std::string value_maxBitRateInsideOptionalClassName = "java/lang/Long"; + std::string value_maxBitRateInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_maxBitRateInsideOptional = static_cast(cppValue.maxBitRate.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_maxBitRateInsideOptionalClassName.c_str(), value_maxBitRateInsideOptionalCtorSignature.c_str(), + jnivalue_maxBitRateInsideOptional, value_maxBitRateInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_maxBitRateInsideOptional, value_maxBitRate); + } + + jobject value_minFragmentLen; + if (!cppValue.minFragmentLen.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_minFragmentLen); + } + else + { + jobject value_minFragmentLenInsideOptional; + std::string value_minFragmentLenInsideOptionalClassName = "java/lang/Integer"; + std::string value_minFragmentLenInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_minFragmentLenInsideOptional = static_cast(cppValue.minFragmentLen.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_minFragmentLenInsideOptionalClassName.c_str(), value_minFragmentLenInsideOptionalCtorSignature.c_str(), + jnivalue_minFragmentLenInsideOptional, value_minFragmentLenInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_minFragmentLenInsideOptional, value_minFragmentLen); + } + + jobject value_maxFragmentLen; + if (!cppValue.maxFragmentLen.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_maxFragmentLen); + } + else + { + jobject value_maxFragmentLenInsideOptional; + std::string value_maxFragmentLenInsideOptionalClassName = "java/lang/Integer"; + std::string value_maxFragmentLenInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_maxFragmentLenInsideOptional = static_cast(cppValue.maxFragmentLen.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_maxFragmentLenInsideOptionalClassName.c_str(), value_maxFragmentLenInsideOptionalCtorSignature.c_str(), + jnivalue_maxFragmentLenInsideOptional, value_maxFragmentLenInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_maxFragmentLenInsideOptional, value_maxFragmentLen); + } + + jclass videoStreamChangedStructClass; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipEventStructs$CameraAvStreamManagementClusterVideoStreamChangedEvent", + videoStreamChangedStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$CameraAvStreamManagementClusterVideoStreamChangedEvent"); + return nullptr; + } + + jmethodID videoStreamChangedStructCtor; + err = chip::JniReferences::GetInstance().FindMethod( + env, videoStreamChangedStructClass, "", + "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &videoStreamChangedStructCtor); + if (err != CHIP_NO_ERROR || videoStreamChangedStructCtor == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipEventStructs$CameraAvStreamManagementClusterVideoStreamChangedEvent constructor"); + return nullptr; + } + + jobject value = + env->NewObject(videoStreamChangedStructClass, videoStreamChangedStructCtor, value_videoStreamID, value_streamType, + value_videoCodec, value_minFrameRate, value_maxFrameRate, value_minResolution, value_maxResolution, + value_minBitRate, value_maxBitRate, value_minFragmentLen, value_maxFragmentLen); + + return value; + } + case Events::AudioStreamChanged::Id: { + Events::AudioStreamChanged::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_audioStreamID; + std::string value_audioStreamIDClassName = "java/lang/Integer"; + std::string value_audioStreamIDCtorSignature = "(I)V"; + jint jnivalue_audioStreamID = static_cast(cppValue.audioStreamID); + chip::JniReferences::GetInstance().CreateBoxedObject(value_audioStreamIDClassName.c_str(), + value_audioStreamIDCtorSignature.c_str(), + jnivalue_audioStreamID, value_audioStreamID); + + jobject value_streamType; + if (!cppValue.streamType.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_streamType); + } + else + { + jobject value_streamTypeInsideOptional; + std::string value_streamTypeInsideOptionalClassName = "java/lang/Integer"; + std::string value_streamTypeInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_streamTypeInsideOptional = static_cast(cppValue.streamType.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_streamTypeInsideOptionalClassName.c_str(), value_streamTypeInsideOptionalCtorSignature.c_str(), + jnivalue_streamTypeInsideOptional, value_streamTypeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_streamTypeInsideOptional, value_streamType); + } + + jobject value_audioCodec; + if (!cppValue.audioCodec.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_audioCodec); + } + else + { + jobject value_audioCodecInsideOptional; + std::string value_audioCodecInsideOptionalClassName = "java/lang/Integer"; + std::string value_audioCodecInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_audioCodecInsideOptional = static_cast(cppValue.audioCodec.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_audioCodecInsideOptionalClassName.c_str(), value_audioCodecInsideOptionalCtorSignature.c_str(), + jnivalue_audioCodecInsideOptional, value_audioCodecInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_audioCodecInsideOptional, value_audioCodec); + } + + jobject value_channelCount; + if (!cppValue.channelCount.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_channelCount); + } + else + { + jobject value_channelCountInsideOptional; + std::string value_channelCountInsideOptionalClassName = "java/lang/Integer"; + std::string value_channelCountInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_channelCountInsideOptional = static_cast(cppValue.channelCount.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_channelCountInsideOptionalClassName.c_str(), value_channelCountInsideOptionalCtorSignature.c_str(), + jnivalue_channelCountInsideOptional, value_channelCountInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_channelCountInsideOptional, value_channelCount); + } + + jobject value_sampleRate; + if (!cppValue.sampleRate.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_sampleRate); + } + else + { + jobject value_sampleRateInsideOptional; + std::string value_sampleRateInsideOptionalClassName = "java/lang/Long"; + std::string value_sampleRateInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_sampleRateInsideOptional = static_cast(cppValue.sampleRate.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_sampleRateInsideOptionalClassName.c_str(), value_sampleRateInsideOptionalCtorSignature.c_str(), + jnivalue_sampleRateInsideOptional, value_sampleRateInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_sampleRateInsideOptional, value_sampleRate); + } + + jobject value_bitRate; + if (!cppValue.bitRate.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_bitRate); + } + else + { + jobject value_bitRateInsideOptional; + std::string value_bitRateInsideOptionalClassName = "java/lang/Long"; + std::string value_bitRateInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_bitRateInsideOptional = static_cast(cppValue.bitRate.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_bitRateInsideOptionalClassName.c_str(), value_bitRateInsideOptionalCtorSignature.c_str(), + jnivalue_bitRateInsideOptional, value_bitRateInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_bitRateInsideOptional, value_bitRate); + } + + jobject value_bitDepth; + if (!cppValue.bitDepth.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_bitDepth); + } + else + { + jobject value_bitDepthInsideOptional; + std::string value_bitDepthInsideOptionalClassName = "java/lang/Integer"; + std::string value_bitDepthInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_bitDepthInsideOptional = static_cast(cppValue.bitDepth.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_bitDepthInsideOptionalClassName.c_str(), value_bitDepthInsideOptionalCtorSignature.c_str(), + jnivalue_bitDepthInsideOptional, value_bitDepthInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_bitDepthInsideOptional, value_bitDepth); + } + + jclass audioStreamChangedStructClass; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipEventStructs$CameraAvStreamManagementClusterAudioStreamChangedEvent", + audioStreamChangedStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$CameraAvStreamManagementClusterAudioStreamChangedEvent"); + return nullptr; + } + + jmethodID audioStreamChangedStructCtor; + err = chip::JniReferences::GetInstance().FindMethod( + env, audioStreamChangedStructClass, "", + "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;)V", + &audioStreamChangedStructCtor); + if (err != CHIP_NO_ERROR || audioStreamChangedStructCtor == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipEventStructs$CameraAvStreamManagementClusterAudioStreamChangedEvent constructor"); + return nullptr; + } + + jobject value = + env->NewObject(audioStreamChangedStructClass, audioStreamChangedStructCtor, value_audioStreamID, value_streamType, + value_audioCodec, value_channelCount, value_sampleRate, value_bitRate, value_bitDepth); + + return value; + } + case Events::SnapshotStreamChanged::Id: { + Events::SnapshotStreamChanged::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_snapshotStreamID; + std::string value_snapshotStreamIDClassName = "java/lang/Integer"; + std::string value_snapshotStreamIDCtorSignature = "(I)V"; + jint jnivalue_snapshotStreamID = static_cast(cppValue.snapshotStreamID); + chip::JniReferences::GetInstance().CreateBoxedObject(value_snapshotStreamIDClassName.c_str(), + value_snapshotStreamIDCtorSignature.c_str(), + jnivalue_snapshotStreamID, value_snapshotStreamID); + + jobject value_imageCodec; + if (!cppValue.imageCodec.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_imageCodec); + } + else + { + jobject value_imageCodecInsideOptional; + std::string value_imageCodecInsideOptionalClassName = "java/lang/Integer"; + std::string value_imageCodecInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_imageCodecInsideOptional = static_cast(cppValue.imageCodec.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_imageCodecInsideOptionalClassName.c_str(), value_imageCodecInsideOptionalCtorSignature.c_str(), + jnivalue_imageCodecInsideOptional, value_imageCodecInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_imageCodecInsideOptional, value_imageCodec); + } + + jobject value_frameRate; + if (!cppValue.frameRate.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_frameRate); + } + else + { + jobject value_frameRateInsideOptional; + std::string value_frameRateInsideOptionalClassName = "java/lang/Integer"; + std::string value_frameRateInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_frameRateInsideOptional = static_cast(cppValue.frameRate.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_frameRateInsideOptionalClassName.c_str(), value_frameRateInsideOptionalCtorSignature.c_str(), + jnivalue_frameRateInsideOptional, value_frameRateInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_frameRateInsideOptional, value_frameRate); + } + + jobject value_bitRate; + if (!cppValue.bitRate.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_bitRate); + } + else + { + jobject value_bitRateInsideOptional; + std::string value_bitRateInsideOptionalClassName = "java/lang/Long"; + std::string value_bitRateInsideOptionalCtorSignature = "(J)V"; + jlong jnivalue_bitRateInsideOptional = static_cast(cppValue.bitRate.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_bitRateInsideOptionalClassName.c_str(), value_bitRateInsideOptionalCtorSignature.c_str(), + jnivalue_bitRateInsideOptional, value_bitRateInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_bitRateInsideOptional, value_bitRate); + } + + jobject value_minResolution; + if (!cppValue.minResolution.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_minResolution); + } + else + { + jobject value_minResolutionInsideOptional; + jobject value_minResolutionInsideOptional_width; + std::string value_minResolutionInsideOptional_widthClassName = "java/lang/Integer"; + std::string value_minResolutionInsideOptional_widthCtorSignature = "(I)V"; + jint jnivalue_minResolutionInsideOptional_width = static_cast(cppValue.minResolution.Value().width); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_minResolutionInsideOptional_widthClassName.c_str(), + value_minResolutionInsideOptional_widthCtorSignature.c_str(), jnivalue_minResolutionInsideOptional_width, + value_minResolutionInsideOptional_width); + jobject value_minResolutionInsideOptional_height; + std::string value_minResolutionInsideOptional_heightClassName = "java/lang/Integer"; + std::string value_minResolutionInsideOptional_heightCtorSignature = "(I)V"; + jint jnivalue_minResolutionInsideOptional_height = static_cast(cppValue.minResolution.Value().height); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_minResolutionInsideOptional_heightClassName.c_str(), + value_minResolutionInsideOptional_heightCtorSignature.c_str(), jnivalue_minResolutionInsideOptional_height, + value_minResolutionInsideOptional_height); + + { + jclass videoResolutionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", + videoResolutionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); + return nullptr; + } + + jmethodID videoResolutionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &videoResolutionStructStructCtor_1); + if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); + return nullptr; + } + + value_minResolutionInsideOptional = + env->NewObject(videoResolutionStructStructClass_1, videoResolutionStructStructCtor_1, + value_minResolutionInsideOptional_width, value_minResolutionInsideOptional_height); + } + chip::JniReferences::GetInstance().CreateOptional(value_minResolutionInsideOptional, value_minResolution); + } + + jobject value_maxResolution; + if (!cppValue.maxResolution.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_maxResolution); + } + else + { + jobject value_maxResolutionInsideOptional; + jobject value_maxResolutionInsideOptional_width; + std::string value_maxResolutionInsideOptional_widthClassName = "java/lang/Integer"; + std::string value_maxResolutionInsideOptional_widthCtorSignature = "(I)V"; + jint jnivalue_maxResolutionInsideOptional_width = static_cast(cppValue.maxResolution.Value().width); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_maxResolutionInsideOptional_widthClassName.c_str(), + value_maxResolutionInsideOptional_widthCtorSignature.c_str(), jnivalue_maxResolutionInsideOptional_width, + value_maxResolutionInsideOptional_width); + jobject value_maxResolutionInsideOptional_height; + std::string value_maxResolutionInsideOptional_heightClassName = "java/lang/Integer"; + std::string value_maxResolutionInsideOptional_heightCtorSignature = "(I)V"; + jint jnivalue_maxResolutionInsideOptional_height = static_cast(cppValue.maxResolution.Value().height); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_maxResolutionInsideOptional_heightClassName.c_str(), + value_maxResolutionInsideOptional_heightCtorSignature.c_str(), jnivalue_maxResolutionInsideOptional_height, + value_maxResolutionInsideOptional_height); + + { + jclass videoResolutionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct", + videoResolutionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct"); + return nullptr; + } + + jmethodID videoResolutionStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, videoResolutionStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;)V", + &videoResolutionStructStructCtor_1); + if (err != CHIP_NO_ERROR || videoResolutionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$CameraAvStreamManagementClusterVideoResolutionStruct constructor"); + return nullptr; + } + + value_maxResolutionInsideOptional = + env->NewObject(videoResolutionStructStructClass_1, videoResolutionStructStructCtor_1, + value_maxResolutionInsideOptional_width, value_maxResolutionInsideOptional_height); + } + chip::JniReferences::GetInstance().CreateOptional(value_maxResolutionInsideOptional, value_maxResolution); + } + + jobject value_quality; + if (!cppValue.quality.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_quality); + } + else + { + jobject value_qualityInsideOptional; + std::string value_qualityInsideOptionalClassName = "java/lang/Integer"; + std::string value_qualityInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_qualityInsideOptional = static_cast(cppValue.quality.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_qualityInsideOptionalClassName.c_str(), value_qualityInsideOptionalCtorSignature.c_str(), + jnivalue_qualityInsideOptional, value_qualityInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_qualityInsideOptional, value_quality); + } + + jclass snapshotStreamChangedStructClass; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipEventStructs$CameraAvStreamManagementClusterSnapshotStreamChangedEvent", + snapshotStreamChangedStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipEventStructs$CameraAvStreamManagementClusterSnapshotStreamChangedEvent"); + return nullptr; + } + + jmethodID snapshotStreamChangedStructCtor; + err = chip::JniReferences::GetInstance().FindMethod( + env, snapshotStreamChangedStructClass, "", + "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;)V", + &snapshotStreamChangedStructCtor); + if (err != CHIP_NO_ERROR || snapshotStreamChangedStructCtor == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipEventStructs$CameraAvStreamManagementClusterSnapshotStreamChangedEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(snapshotStreamChangedStructClass, snapshotStreamChangedStructCtor, + value_snapshotStreamID, value_imageCodec, value_frameRate, value_bitRate, + value_minResolution, value_maxResolution, value_quality); + + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::WebRTCTransportProvider::Id: { + using namespace app::Clusters::WebRTCTransportProvider; + switch (aPath.mEventId) + { + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::WebRTCTransportRequestor::Id: { + using namespace app::Clusters::WebRTCTransportRequestor; + switch (aPath.mEventId) + { + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::Chime::Id: { + using namespace app::Clusters::Chime; + switch (aPath.mEventId) + { + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::EcosystemInformation::Id: { + using namespace app::Clusters::EcosystemInformation; + switch (aPath.mEventId) + { + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::CommissionerControl::Id: { + using namespace app::Clusters::CommissionerControl; + switch (aPath.mEventId) + { + case Events::CommissioningRequestResult::Id: { + Events::CommissioningRequestResult::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_requestID; + std::string value_requestIDClassName = "java/lang/Long"; + std::string value_requestIDCtorSignature = "(J)V"; + jlong jnivalue_requestID = static_cast(cppValue.requestID); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_requestIDClassName.c_str(), value_requestIDCtorSignature.c_str(), jnivalue_requestID, value_requestID); + + jobject value_clientNodeID; + std::string value_clientNodeIDClassName = "java/lang/Long"; + std::string value_clientNodeIDCtorSignature = "(J)V"; + jlong jnivalue_clientNodeID = static_cast(cppValue.clientNodeID); + chip::JniReferences::GetInstance().CreateBoxedObject(value_clientNodeIDClassName.c_str(), + value_clientNodeIDCtorSignature.c_str(), + jnivalue_clientNodeID, value_clientNodeID); + + jobject value_statusCode; + std::string value_statusCodeClassName = "java/lang/Integer"; + std::string value_statusCodeCtorSignature = "(I)V"; + jint jnivalue_statusCode = static_cast(cppValue.statusCode); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_statusCodeClassName.c_str(), value_statusCodeCtorSignature.c_str(), jnivalue_statusCode, value_statusCode); + + jobject value_fabricIndex; + std::string value_fabricIndexClassName = "java/lang/Integer"; + std::string value_fabricIndexCtorSignature = "(I)V"; + jint jnivalue_fabricIndex = static_cast(cppValue.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), + value_fabricIndexCtorSignature.c_str(), jnivalue_fabricIndex, + value_fabricIndex); + + jclass commissioningRequestResultStructClass; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipEventStructs$CommissionerControlClusterCommissioningRequestResultEvent", + commissioningRequestResultStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipEventStructs$CommissionerControlClusterCommissioningRequestResultEvent"); + return nullptr; + } + + jmethodID commissioningRequestResultStructCtor; + err = chip::JniReferences::GetInstance().FindMethod( + env, commissioningRequestResultStructClass, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;)V", &commissioningRequestResultStructCtor); + if (err != CHIP_NO_ERROR || commissioningRequestResultStructCtor == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipEventStructs$CommissionerControlClusterCommissioningRequestResultEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(commissioningRequestResultStructClass, commissioningRequestResultStructCtor, + value_requestID, value_clientNodeID, value_statusCode, value_fabricIndex); + + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::UnitTesting::Id: { + using namespace app::Clusters::UnitTesting; + switch (aPath.mEventId) + { + case Events::TestEvent::Id: { + Events::TestEvent::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_arg1; + std::string value_arg1ClassName = "java/lang/Integer"; + std::string value_arg1CtorSignature = "(I)V"; + jint jnivalue_arg1 = static_cast(cppValue.arg1); + chip::JniReferences::GetInstance().CreateBoxedObject(value_arg1ClassName.c_str(), value_arg1CtorSignature.c_str(), + jnivalue_arg1, value_arg1); + + jobject value_arg2; + std::string value_arg2ClassName = "java/lang/Integer"; + std::string value_arg2CtorSignature = "(I)V"; + jint jnivalue_arg2 = static_cast(cppValue.arg2); + chip::JniReferences::GetInstance().CreateBoxedObject(value_arg2ClassName.c_str(), value_arg2CtorSignature.c_str(), + jnivalue_arg2, value_arg2); + + jobject value_arg3; + std::string value_arg3ClassName = "java/lang/Boolean"; + std::string value_arg3CtorSignature = "(Z)V"; jboolean jnivalue_arg3 = static_cast(cppValue.arg3); chip::JniReferences::GetInstance().CreateBoxedObject( value_arg3ClassName.c_str(), value_arg3CtorSignature.c_str(), jnivalue_arg3, value_arg3); @@ -8445,30 +9296,32 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & chip::JniReferences::GetInstance().CreateOptional(value_arg4_iInsideOptional, value_arg4_i); } - jclass simpleStructStructClass_0; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_0); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); - return nullptr; - } + jclass simpleStructStructClass_0; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); + return nullptr; + } - jmethodID simpleStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod( - env, simpleStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/" - "Float;Ljava/lang/Double;Ljava/util/Optional;)V", - &simpleStructStructCtor_0); - if (err != CHIP_NO_ERROR || simpleStructStructCtor_0 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); - return nullptr; - } + jmethodID simpleStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod( + env, simpleStructStructClass_0, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/" + "Float;Ljava/lang/Double;Ljava/util/Optional;)V", + &simpleStructStructCtor_0); + if (err != CHIP_NO_ERROR || simpleStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); + return nullptr; + } - value_arg4 = - env->NewObject(simpleStructStructClass_0, simpleStructStructCtor_0, value_arg4_a, value_arg4_b, value_arg4_c, - value_arg4_d, value_arg4_e, value_arg4_f, value_arg4_g, value_arg4_h, value_arg4_i); + value_arg4 = + env->NewObject(simpleStructStructClass_0, simpleStructStructCtor_0, value_arg4_a, value_arg4_b, value_arg4_c, + value_arg4_d, value_arg4_e, value_arg4_f, value_arg4_g, value_arg4_h, value_arg4_i); + } jobject value_arg5; chip::JniReferences::GetInstance().CreateArrayList(value_arg5); @@ -8538,30 +9391,32 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & chip::JniReferences::GetInstance().CreateOptional(newElement_0_iInsideOptional, newElement_0_i); } - jclass simpleStructStructClass_1; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_1); - if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); - return nullptr; - } + jclass simpleStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$UnitTestingClusterSimpleStruct", simpleStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$UnitTestingClusterSimpleStruct"); + return nullptr; + } - jmethodID simpleStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod( - env, simpleStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/Integer;Ljava/lang/" - "Float;Ljava/lang/Double;Ljava/util/Optional;)V", - &simpleStructStructCtor_1); - if (err != CHIP_NO_ERROR || simpleStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); - return nullptr; - } + jmethodID simpleStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, simpleStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Integer;[BLjava/lang/String;Ljava/lang/Integer;Ljava/" + "lang/Float;Ljava/lang/Double;Ljava/util/Optional;)V", + &simpleStructStructCtor_1); + if (err != CHIP_NO_ERROR || simpleStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$UnitTestingClusterSimpleStruct constructor"); + return nullptr; + } - newElement_0 = env->NewObject(simpleStructStructClass_1, simpleStructStructCtor_1, newElement_0_a, newElement_0_b, - newElement_0_c, newElement_0_d, newElement_0_e, newElement_0_f, newElement_0_g, - newElement_0_h, newElement_0_i); + newElement_0 = env->NewObject(simpleStructStructClass_1, simpleStructStructCtor_1, newElement_0_a, + newElement_0_b, newElement_0_c, newElement_0_d, newElement_0_e, newElement_0_f, + newElement_0_g, newElement_0_h, newElement_0_i); + } chip::JniReferences::GetInstance().AddToList(value_arg5, newElement_0); } diff --git a/src/controller/python/ChipDeviceController-ScriptBinding.cpp b/src/controller/python/ChipDeviceController-ScriptBinding.cpp index b31cb5b7b8..11fdf763da 100644 --- a/src/controller/python/ChipDeviceController-ScriptBinding.cpp +++ b/src/controller/python/ChipDeviceController-ScriptBinding.cpp @@ -512,7 +512,7 @@ PyChipError pychip_DeviceController_OnNetworkCommission(chip::Controller::Device PyChipError pychip_DeviceController_SetThreadOperationalDataset(const char * threadOperationalDataset, uint32_t size) { - ReturnErrorCodeIf(!sThreadBuf.Alloc(size), ToPyChipError(CHIP_ERROR_NO_MEMORY)); + VerifyOrReturnError(sThreadBuf.Alloc(size), ToPyChipError(CHIP_ERROR_NO_MEMORY)); memcpy(sThreadBuf.Get(), threadOperationalDataset, size); sCommissioningParameters.SetThreadOperationalDataset(ByteSpan(sThreadBuf.Get(), size)); return ToPyChipError(CHIP_NO_ERROR); @@ -520,11 +520,11 @@ PyChipError pychip_DeviceController_SetThreadOperationalDataset(const char * thr PyChipError pychip_DeviceController_SetWiFiCredentials(const char * ssid, const char * credentials) { size_t ssidSize = strlen(ssid); - ReturnErrorCodeIf(!sSsidBuf.Alloc(ssidSize), ToPyChipError(CHIP_ERROR_NO_MEMORY)); + VerifyOrReturnError(sSsidBuf.Alloc(ssidSize), ToPyChipError(CHIP_ERROR_NO_MEMORY)); memcpy(sSsidBuf.Get(), ssid, ssidSize); size_t credsSize = strlen(credentials); - ReturnErrorCodeIf(!sCredsBuf.Alloc(credsSize), ToPyChipError(CHIP_ERROR_NO_MEMORY)); + VerifyOrReturnError(sCredsBuf.Alloc(credsSize), ToPyChipError(CHIP_ERROR_NO_MEMORY)); memcpy(sCredsBuf.Get(), credentials, credsSize); sCommissioningParameters.SetWiFiCredentials( @@ -544,7 +544,7 @@ PyChipError pychip_DeviceController_SetTimeZone(int32_t offset, uint64_t validAt else { size_t len = strlen(name); - ReturnErrorCodeIf(!sTimeZoneNameBuf.Alloc(len), ToPyChipError(CHIP_ERROR_NO_MEMORY)); + VerifyOrReturnError(sTimeZoneNameBuf.Alloc(len), ToPyChipError(CHIP_ERROR_NO_MEMORY)); memcpy(sTimeZoneNameBuf.Get(), name, len); sTimeZoneBuf.name.SetValue(CharSpan(sTimeZoneNameBuf.Get(), len)); } @@ -564,7 +564,7 @@ PyChipError pychip_DeviceController_SetDSTOffset(int32_t offset, uint64_t validS PyChipError pychip_DeviceController_SetDefaultNtp(const char * defaultNTP) { size_t len = strlen(defaultNTP); - ReturnErrorCodeIf(!sDefaultNTPBuf.Alloc(len), ToPyChipError(CHIP_ERROR_NO_MEMORY)); + VerifyOrReturnError(sDefaultNTPBuf.Alloc(len), ToPyChipError(CHIP_ERROR_NO_MEMORY)); memcpy(sDefaultNTPBuf.Get(), defaultNTP, len); sCommissioningParameters.SetDefaultNTP(chip::app::DataModel::MakeNullable(CharSpan(sDefaultNTPBuf.Get(), len))); return ToPyChipError(CHIP_NO_ERROR); diff --git a/src/controller/python/ChipDeviceController-StorageDelegate.cpp b/src/controller/python/ChipDeviceController-StorageDelegate.cpp index 9fb19efccd..68e1531b7d 100644 --- a/src/controller/python/ChipDeviceController-StorageDelegate.cpp +++ b/src/controller/python/ChipDeviceController-StorageDelegate.cpp @@ -32,7 +32,7 @@ namespace Controller { CHIP_ERROR PythonPersistentStorageDelegate::SyncGetKeyValue(const char * key, void * value, uint16_t & size) { - ReturnErrorCodeIf(((value == nullptr) && (size != 0)), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError((value != nullptr) || (size == 0), CHIP_ERROR_INVALID_ARGUMENT); auto val = mStorage.find(key); if (val == mStorage.end()) @@ -47,8 +47,8 @@ CHIP_ERROR PythonPersistentStorageDelegate::SyncGetKeyValue(const char * key, vo } uint16_t neededSize = static_cast(val->second.size()); - ReturnErrorCodeIf(size == 0 && neededSize == 0, CHIP_NO_ERROR); - ReturnErrorCodeIf(value == nullptr, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(size != 0 || neededSize != 0, CHIP_NO_ERROR); + VerifyOrReturnError(value != nullptr, CHIP_ERROR_BUFFER_TOO_SMALL); if (size < neededSize) { @@ -114,7 +114,7 @@ CHIP_ERROR StorageAdapter::SyncGetKeyValue(const char * key, void * value, uint1 CHIP_ERROR StorageAdapter::SyncSetKeyValue(const char * key, const void * value, uint16_t size) { - ReturnErrorCodeIf(((value == nullptr) && (size != 0)), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError((value != nullptr) || (size == 0), CHIP_ERROR_INVALID_ARGUMENT); ChipLogDetail(Controller, "StorageAdapter::SetKeyValue: Key = %s, Value = %p (%u)", StringOrNullMarker(key), value, size); mSetKeyCb(mContext, key, value, size); return CHIP_NO_ERROR; diff --git a/src/controller/python/OpCredsBinding.cpp b/src/controller/python/OpCredsBinding.cpp index f5815922cc..37b1e9a9d1 100644 --- a/src/controller/python/OpCredsBinding.cpp +++ b/src/controller/python/OpCredsBinding.cpp @@ -413,9 +413,9 @@ PyChipError pychip_OpCreds_AllocateControllerForPythonCommissioningFLow( uint8_t * rcac, uint32_t rcacLen, const uint8_t * ipk, uint32_t ipkLen, chip::VendorId adminVendorId, bool enableServerInteractions) { - ReturnErrorCodeIf(nocLen > Controller::kMaxCHIPDERCertLength, ToPyChipError(CHIP_ERROR_NO_MEMORY)); - ReturnErrorCodeIf(icacLen > Controller::kMaxCHIPDERCertLength, ToPyChipError(CHIP_ERROR_NO_MEMORY)); - ReturnErrorCodeIf(rcacLen > Controller::kMaxCHIPDERCertLength, ToPyChipError(CHIP_ERROR_NO_MEMORY)); + VerifyOrReturnError(nocLen <= Controller::kMaxCHIPDERCertLength, ToPyChipError(CHIP_ERROR_NO_MEMORY)); + VerifyOrReturnError(icacLen <= Controller::kMaxCHIPDERCertLength, ToPyChipError(CHIP_ERROR_NO_MEMORY)); + VerifyOrReturnError(rcacLen <= Controller::kMaxCHIPDERCertLength, ToPyChipError(CHIP_ERROR_NO_MEMORY)); ChipLogDetail(Controller, "Creating New Device Controller"); @@ -507,15 +507,15 @@ PyChipError pychip_OpCreds_AllocateController(OpCredsContext * context, chip::Co } chip::Platform::ScopedMemoryBuffer noc; - ReturnErrorCodeIf(!noc.Alloc(Controller::kMaxCHIPDERCertLength), ToPyChipError(CHIP_ERROR_NO_MEMORY)); + VerifyOrReturnError(noc.Alloc(Controller::kMaxCHIPDERCertLength), ToPyChipError(CHIP_ERROR_NO_MEMORY)); MutableByteSpan nocSpan(noc.Get(), Controller::kMaxCHIPDERCertLength); chip::Platform::ScopedMemoryBuffer icac; - ReturnErrorCodeIf(!icac.Alloc(Controller::kMaxCHIPDERCertLength), ToPyChipError(CHIP_ERROR_NO_MEMORY)); + VerifyOrReturnError(icac.Alloc(Controller::kMaxCHIPDERCertLength), ToPyChipError(CHIP_ERROR_NO_MEMORY)); MutableByteSpan icacSpan(icac.Get(), Controller::kMaxCHIPDERCertLength); chip::Platform::ScopedMemoryBuffer rcac; - ReturnErrorCodeIf(!rcac.Alloc(Controller::kMaxCHIPDERCertLength), ToPyChipError(CHIP_ERROR_NO_MEMORY)); + VerifyOrReturnError(rcac.Alloc(Controller::kMaxCHIPDERCertLength), ToPyChipError(CHIP_ERROR_NO_MEMORY)); MutableByteSpan rcacSpan(rcac.Get(), Controller::kMaxCHIPDERCertLength); CATValues catValues; diff --git a/src/controller/python/chip/clusters/Attribute.py b/src/controller/python/chip/clusters/Attribute.py index 4d5bc1d17a..0b51ce4bfc 100644 --- a/src/controller/python/chip/clusters/Attribute.py +++ b/src/controller/python/chip/clusters/Attribute.py @@ -110,9 +110,11 @@ def __post_init__(self): '''Only one of either ClusterType and AttributeType OR Path may be provided.''' if (self.ClusterType is not None and self.AttributeType is not None) and self.Path is not None: - raise ValueError("Only one of either ClusterType and AttributeType OR Path may be provided.") + raise ValueError( + "Only one of either ClusterType and AttributeType OR Path may be provided.") if (self.ClusterType is None or self.AttributeType is None) and self.Path is None: - raise ValueError("Either ClusterType and AttributeType OR Path must be provided.") + raise ValueError( + "Either ClusterType and AttributeType OR Path must be provided.") # if ClusterType and AttributeType were provided we can continue onwards to deriving the label. # Otherwise, we'll need to walk the attribute index to find the right type information. @@ -373,7 +375,8 @@ def handle_cluster_view(endpointId, clusterId, clusterType): try: decodedData = clusterType.FromDict( data=clusterType.descriptor.TagDictToLabelDict([], self.attributeTLVCache[endpointId][clusterId])) - decodedData.SetDataVersion(self.versionList.get(endpointId, {}).get(clusterId)) + decodedData.SetDataVersion( + self.versionList.get(endpointId, {}).get(clusterId)) return decodedData except Exception as ex: return ValueDecodeFailure(self.attributeTLVCache[endpointId][clusterId], ex) @@ -404,12 +407,14 @@ def handle_attribute_view(endpointId, clusterId, attributeId, attributeType): clusterType = _ClusterIndex[clusterId] if self.returnClusterObject: - endpointCache[clusterType] = handle_cluster_view(endpointId, clusterId, clusterType) + endpointCache[clusterType] = handle_cluster_view( + endpointId, clusterId, clusterType) else: if clusterType not in endpointCache: endpointCache[clusterType] = {} clusterCache = endpointCache[clusterType] - clusterCache[DataVersion] = self.versionList.get(endpointId, {}).get(clusterId) + clusterCache[DataVersion] = self.versionList.get( + endpointId, {}).get(clusterId) if (clusterId, attributeId) not in _AttributeIndex: # @@ -419,7 +424,8 @@ def handle_attribute_view(endpointId, clusterId, attributeId, attributeType): continue attributeType = _AttributeIndex[(clusterId, attributeId)][0] - clusterCache[attributeType] = handle_attribute_view(endpointId, clusterId, attributeId, attributeType) + clusterCache[attributeType] = handle_attribute_view( + endpointId, clusterId, attributeId, attributeType) self._attributeCacheUpdateNeeded.clear() return self._attributeCache @@ -428,14 +434,18 @@ class SubscriptionTransaction: def __init__(self, transaction: AsyncReadTransaction, subscriptionId, devCtrl): self._onResubscriptionAttemptedCb: Callable[[SubscriptionTransaction, int, int], None] = DefaultResubscriptionAttemptedCallback - self._onAttributeChangeCb: Callable[[TypedAttributePath, SubscriptionTransaction], None] = DefaultAttributeChangeCallback - self._onEventChangeCb: Callable[[EventReadResult, SubscriptionTransaction], None] = DefaultEventChangeCallback - self._onErrorCb: Callable[[int, SubscriptionTransaction], None] = DefaultErrorCallback + self._onAttributeChangeCb: Callable[[ + TypedAttributePath, SubscriptionTransaction], None] = DefaultAttributeChangeCallback + self._onEventChangeCb: Callable[[ + EventReadResult, SubscriptionTransaction], None] = DefaultEventChangeCallback + self._onErrorCb: Callable[[ + int, SubscriptionTransaction], None] = DefaultErrorCallback self._readTransaction = transaction self._subscriptionId = subscriptionId self._devCtrl = devCtrl self._isDone = False - self._onResubscriptionSucceededCb: Optional[Callable[[SubscriptionTransaction], None]] = None + self._onResubscriptionSucceededCb: Optional[Callable[[ + SubscriptionTransaction], None]] = None self._onResubscriptionSucceededCb_isAsync = False self._onResubscriptionAttemptedCb_isAsync = False @@ -460,7 +470,8 @@ def GetEvents(self): def OverrideLivenessTimeoutMs(self, timeoutMs: int): handle = chip.native.GetLibraryHandle() builtins.chipStack.Call( - lambda: handle.pychip_ReadClient_OverrideLivenessTimeout(self._readTransaction._pReadClient, timeoutMs) + lambda: handle.pychip_ReadClient_OverrideLivenessTimeout( + self._readTransaction._pReadClient, timeoutMs) ) async def TriggerResubscribeIfScheduled(self, reason: str): @@ -501,7 +512,8 @@ def GetSubscriptionTimeoutMs(self) -> int: timeoutMs = ctypes.c_uint32(0) handle = chip.native.GetLibraryHandle() builtins.chipStack.Call( - lambda: handle.pychip_ReadClient_GetSubscriptionTimeoutMs(self._readTransaction._pReadClient, ctypes.pointer(timeoutMs)) + lambda: handle.pychip_ReadClient_GetSubscriptionTimeoutMs( + self._readTransaction._pReadClient, ctypes.pointer(timeoutMs)) ) return timeoutMs.value @@ -567,13 +579,14 @@ def subscriptionId(self) -> int: def Shutdown(self): if (self._isDone): - LOGGER.warning("Subscription 0x%08x was already terminated previously!", self.subscriptionId) + LOGGER.warning( + "Subscription 0x%08x was already terminated previously!", self.subscriptionId) return handle = chip.native.GetLibraryHandle() builtins.chipStack.Call( - lambda: handle.pychip_ReadClient_Abort( - self._readTransaction._pReadClient, self._readTransaction._pReadCallback)) + lambda: handle.pychip_ReadClient_ShutdownSubscription( + self._readTransaction._pReadClient)) self._isDone = True def __del__(self): @@ -585,7 +598,8 @@ def __repr__(self): def DefaultResubscriptionAttemptedCallback(transaction: SubscriptionTransaction, terminationError, nextResubscribeIntervalMsec): - print(f"Previous subscription failed with Error: {terminationError} - re-subscribing in {nextResubscribeIntervalMsec}ms...") + print( + f"Previous subscription failed with Error: {terminationError} - re-subscribing in {nextResubscribeIntervalMsec}ms...") def DefaultAttributeChangeCallback(path: TypedAttributePath, transaction: SubscriptionTransaction): @@ -648,12 +662,10 @@ def __init__(self, future: Future, eventLoop, devCtrl, returnClusterObject: bool self._cache = AttributeCache(returnClusterObject=returnClusterObject) self._changedPathSet: Set[AttributePath] = set() self._pReadClient = None - self._pReadCallback = None self._resultError: Optional[PyChipError] = None - def SetClientObjPointers(self, pReadClient, pReadCallback): + def SetClientObjPointers(self, pReadClient): self._pReadClient = pReadClient - self._pReadCallback = pReadCallback def GetAllEventValues(self): return self._events @@ -729,7 +741,8 @@ def handleEventData(self, header: EventHeader, path: EventPath, data: bytes, sta def handleError(self, chipError: PyChipError): if self._subscription_handler: - self._subscription_handler.OnErrorCb(chipError.code, self._subscription_handler) + self._subscription_handler.OnErrorCb( + chipError.code, self._subscription_handler) self._resultError = chipError def _handleSubscriptionEstablished(self, subscriptionId): @@ -744,7 +757,8 @@ def _handleSubscriptionEstablished(self, subscriptionId): self._event_loop.create_task( self._subscription_handler._onResubscriptionSucceededCb(self._subscription_handler)) else: - self._subscription_handler._onResubscriptionSucceededCb(self._subscription_handler) + self._subscription_handler._onResubscriptionSucceededCb( + self._subscription_handler) def handleSubscriptionEstablished(self, subscriptionId): self._event_loop.call_soon_threadsafe( @@ -820,7 +834,8 @@ def __init__(self, future: Future, eventLoop): def handleResponse(self, path: AttributePath, status: int): try: imStatus = chip.interaction_model.Status(status) - self._resultData.append(AttributeWriteResult(Path=path, Status=imStatus)) + self._resultData.append( + AttributeWriteResult(Path=path, Status=imStatus)) except ValueError as ex: LOGGER.exception(ex) @@ -835,8 +850,10 @@ def _handleDone(self): # if self._resultError is not None: if self._resultError.sdk_part is ErrorSDKPart.IM_GLOBAL_STATUS: - im_status = chip.interaction_model.Status(self._resultError.sdk_code) - self._future.set_exception(chip.interaction_model.InteractionModelError(im_status)) + im_status = chip.interaction_model.Status( + self._resultError.sdk_code) + self._future.set_exception( + chip.interaction_model.InteractionModelError(im_status)) else: self._future.set_exception(self._resultError.to_exception()) else: @@ -856,7 +873,8 @@ def handleDone(self): _OnReadAttributeDataCallbackFunct = CFUNCTYPE( None, py_object, c_uint32, c_uint16, c_uint32, c_uint32, c_uint8, c_void_p, c_size_t) _OnSubscriptionEstablishedCallbackFunct = CFUNCTYPE(None, py_object, c_uint32) -_OnResubscriptionAttemptedCallbackFunct = CFUNCTYPE(None, py_object, PyChipError, c_uint32) +_OnResubscriptionAttemptedCallbackFunct = CFUNCTYPE( + None, py_object, PyChipError, c_uint32) _OnReadEventDataCallbackFunct = CFUNCTYPE( None, py_object, c_uint16, c_uint32, c_uint32, c_uint64, c_uint8, c_uint64, c_uint8, c_void_p, c_size_t, c_uint8) _OnReadErrorCallbackFunct = CFUNCTYPE( @@ -897,7 +915,8 @@ def _OnSubscriptionEstablishedCallback(closure, subscriptionId): @_OnResubscriptionAttemptedCallbackFunct def _OnResubscriptionAttemptedCallback(closure, terminationCause: PyChipError, nextResubscribeIntervalMsec: int): - closure.handleResubscriptionAttempted(terminationCause, nextResubscribeIntervalMsec) + closure.handleResubscriptionAttempted( + terminationCause, nextResubscribeIntervalMsec) @_OnReadErrorCallbackFunct @@ -954,16 +973,23 @@ def WriteAttributes(future: Future, eventLoop, device, pyWriteAttributes = pyWriteAttributesArrayType() for idx, attr in enumerate(attributes): if attr.Attribute.must_use_timed_write and timedRequestTimeoutMs is None or timedRequestTimeoutMs == 0: - raise chip.interaction_model.InteractionModelError(chip.interaction_model.Status.NeedsTimedInteraction) + raise chip.interaction_model.InteractionModelError( + chip.interaction_model.Status.NeedsTimedInteraction) tlv = attr.Attribute.ToTLV(None, attr.Data) - pyWriteAttributes[idx].attributePath.endpointId = c_uint16(attr.EndpointId) - pyWriteAttributes[idx].attributePath.clusterId = c_uint32(attr.Attribute.cluster_id) - pyWriteAttributes[idx].attributePath.attributeId = c_uint32(attr.Attribute.attribute_id) - pyWriteAttributes[idx].attributePath.dataVersion = c_uint32(attr.DataVersion) - pyWriteAttributes[idx].attributePath.hasDataVersion = c_uint8(attr.HasDataVersion) - pyWriteAttributes[idx].tlvData = cast(ctypes.c_char_p(bytes(tlv)), c_void_p) + pyWriteAttributes[idx].attributePath.endpointId = c_uint16( + attr.EndpointId) + pyWriteAttributes[idx].attributePath.clusterId = c_uint32( + attr.Attribute.cluster_id) + pyWriteAttributes[idx].attributePath.attributeId = c_uint32( + attr.Attribute.attribute_id) + pyWriteAttributes[idx].attributePath.dataVersion = c_uint32( + attr.DataVersion) + pyWriteAttributes[idx].attributePath.hasDataVersion = c_uint8( + attr.HasDataVersion) + pyWriteAttributes[idx].tlvData = cast( + ctypes.c_char_p(bytes(tlv)), c_void_p) pyWriteAttributes[idx].tlvLength = c_size_t(len(tlv)) transaction = AsyncWriteTransaction(future, eventLoop) @@ -971,8 +997,10 @@ def WriteAttributes(future: Future, eventLoop, device, res = builtins.chipStack.Call( lambda: handle.pychip_WriteClient_WriteAttributes( ctypes.py_object(transaction), device, - ctypes.c_size_t(0 if timedRequestTimeoutMs is None else timedRequestTimeoutMs), - ctypes.c_size_t(0 if interactionTimeoutMs is None else interactionTimeoutMs), + ctypes.c_size_t( + 0 if timedRequestTimeoutMs is None else timedRequestTimeoutMs), + ctypes.c_size_t( + 0 if interactionTimeoutMs is None else interactionTimeoutMs), ctypes.c_size_t(0 if busyWaitMs is None else busyWaitMs), pyWriteAttributes, ctypes.c_size_t(numberOfAttributes)) ) @@ -991,12 +1019,18 @@ def WriteGroupAttributes(groupId: int, devCtrl: c_void_p, attributes: List[Attri tlv = attr.Attribute.ToTLV(None, attr.Data) - pyWriteAttributes[idx].attributePath.endpointId = c_uint16(attr.EndpointId) - pyWriteAttributes[idx].attributePath.clusterId = c_uint32(attr.Attribute.cluster_id) - pyWriteAttributes[idx].attributePath.attributeId = c_uint32(attr.Attribute.attribute_id) - pyWriteAttributes[idx].attributePath.dataVersion = c_uint32(attr.DataVersion) - pyWriteAttributes[idx].attributePath.hasDataVersion = c_uint8(attr.HasDataVersion) - pyWriteAttributes[idx].tlvData = cast(ctypes.c_char_p(bytes(tlv)), c_void_p) + pyWriteAttributes[idx].attributePath.endpointId = c_uint16( + attr.EndpointId) + pyWriteAttributes[idx].attributePath.clusterId = c_uint32( + attr.Attribute.cluster_id) + pyWriteAttributes[idx].attributePath.attributeId = c_uint32( + attr.Attribute.attribute_id) + pyWriteAttributes[idx].attributePath.dataVersion = c_uint32( + attr.DataVersion) + pyWriteAttributes[idx].attributePath.hasDataVersion = c_uint8( + attr.HasDataVersion) + pyWriteAttributes[idx].tlvData = cast( + ctypes.c_char_p(bytes(tlv)), c_void_p) pyWriteAttributes[idx].tlvLength = c_size_t(len(tlv)) return builtins.chipStack.Call( @@ -1071,7 +1105,8 @@ def Read(transaction: AsyncReadTransaction, device, "DataVersionFilter must provide DataVersion.") filter = chip.interaction_model.DataVersionFilterIBstruct.build( filter) - dataVersionFiltersForCffi[idx] = cast(ctypes.c_char_p(filter), c_void_p) + dataVersionFiltersForCffi[idx] = cast( + ctypes.c_char_p(filter), c_void_p) eventPathsForCffi = None if events is not None: @@ -1095,7 +1130,6 @@ def Read(transaction: AsyncReadTransaction, device, eventPathsForCffi[idx] = cast(ctypes.c_char_p(path), c_void_p) readClientObj = ctypes.POINTER(c_void_p)() - readCallbackObj = ctypes.POINTER(c_void_p)() ctypes.pythonapi.Py_IncRef(ctypes.py_object(transaction)) params = _ReadParams.parse(b'\x00' * _ReadParams.sizeof()) @@ -1109,13 +1143,13 @@ def Read(transaction: AsyncReadTransaction, device, params = _ReadParams.build(params) eventNumberFilterPtr = ctypes.POINTER(ctypes.c_ulonglong)() if eventNumberFilter is not None: - eventNumberFilterPtr = ctypes.POINTER(ctypes.c_ulonglong)(ctypes.c_ulonglong(eventNumberFilter)) + eventNumberFilterPtr = ctypes.POINTER(ctypes.c_ulonglong)( + ctypes.c_ulonglong(eventNumberFilter)) res = builtins.chipStack.Call( lambda: handle.pychip_ReadClient_Read( ctypes.py_object(transaction), ctypes.byref(readClientObj), - ctypes.byref(readCallbackObj), device, ctypes.c_char_p(params), attributePathsForCffi, @@ -1127,7 +1161,7 @@ def Read(transaction: AsyncReadTransaction, device, ctypes.c_size_t(0 if events is None else len(events)), eventNumberFilterPtr)) - transaction.SetClientObjPointers(readClientObj, readCallbackObj) + transaction.SetClientObjPointers(readClientObj) if not res.is_success: ctypes.pythonapi.Py_DecRef(ctypes.py_object(transaction)) diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 1df4d9c9f6..08f8182e6b 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -76,12 +76,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -169,12 +163,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -287,12 +275,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -507,12 +489,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -551,12 +527,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -625,12 +595,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -676,12 +640,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -771,12 +729,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -934,12 +886,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -1125,12 +1071,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -1199,12 +1139,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -1279,12 +1213,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -1336,12 +1264,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -1400,12 +1322,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -1451,12 +1367,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -1501,12 +1411,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -1737,12 +1641,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -1855,6 +1753,12 @@ class ChipClusters: "type": "bool", "reportable": True, }, + 0x00000009: { + "attributeName": "TCUpdateDeadline", + "attributeId": 0x00000009, + "type": "int", + "reportable": True, + }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, @@ -1867,12 +1771,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -2039,12 +1937,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -2092,12 +1984,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -2213,12 +2099,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -2287,12 +2167,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -2715,12 +2589,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -2843,12 +2711,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -2947,12 +2809,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -3106,12 +2962,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -3261,12 +3111,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -3323,12 +3167,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -3409,12 +3247,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -3551,12 +3383,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -3647,12 +3473,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -3697,12 +3517,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -3748,12 +3562,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -3792,12 +3600,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -3836,12 +3638,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -3880,12 +3676,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -3930,12 +3720,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -4060,12 +3844,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -4149,12 +3927,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -4253,12 +4025,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -4330,12 +4096,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -4387,12 +4147,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -4476,12 +4230,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -4553,12 +4301,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -4630,12 +4372,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -4700,12 +4436,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -4763,12 +4493,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -4826,12 +4550,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -4914,12 +4632,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -4976,12 +4688,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -5053,12 +4759,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -5103,12 +4803,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -5232,12 +4926,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -5314,12 +5002,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -5370,12 +5052,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -5486,12 +5162,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -5590,12 +5260,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -5688,12 +5352,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -5819,12 +5477,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -5906,12 +5558,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -5993,12 +5639,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -6100,12 +5740,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -6226,12 +5860,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -6384,12 +6012,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -6464,12 +6086,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -6557,12 +6173,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -6686,12 +6296,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -6762,12 +6366,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -6914,12 +6512,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -7147,12 +6739,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -7223,12 +6809,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -7279,12 +6859,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -7330,20 +6904,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x00000002: { - "attributeName": "StartUpMode", - "attributeId": 0x00000002, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x00000003: { - "attributeName": "OnMode", - "attributeId": 0x00000003, - "type": "int", - "reportable": True, - "writable": True, - }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, @@ -7356,12 +6916,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -7407,20 +6961,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x00000002: { - "attributeName": "StartUpMode", - "attributeId": 0x00000002, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x00000003: { - "attributeName": "OnMode", - "attributeId": 0x00000003, - "type": "int", - "reportable": True, - "writable": True, - }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, @@ -7433,12 +6973,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -7484,20 +7018,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x00000002: { - "attributeName": "StartUpMode", - "attributeId": 0x00000002, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x00000003: { - "attributeName": "OnMode", - "attributeId": 0x00000003, - "type": "int", - "reportable": True, - "writable": True, - }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, @@ -7510,12 +7030,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -8019,12 +7533,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -8242,12 +7750,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -8336,12 +7838,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -8522,12 +8018,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -9010,12 +8500,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -9141,12 +8625,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -9206,12 +8684,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -9780,12 +9252,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -9918,12 +9384,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -9992,12 +9452,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -10060,12 +9514,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -10158,12 +9606,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -10226,12 +9668,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -10294,12 +9730,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -10432,12 +9862,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -10542,12 +9966,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -10652,12 +10070,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -10762,12 +10174,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -10872,12 +10278,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -10982,12 +10382,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -11092,12 +10486,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -11202,12 +10590,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -11312,12 +10694,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -11422,12 +10798,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -11532,12 +10902,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -11594,12 +10958,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -11701,12 +11059,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -11785,12 +11137,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -11841,12 +11187,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -11958,12 +11298,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -12022,12 +11356,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -12224,12 +11552,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -12307,12 +11629,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -12357,12 +11673,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -12408,12 +11718,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -12484,12 +11788,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -12555,12 +11853,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -12633,12 +11925,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -12725,12 +12011,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -12792,12 +12072,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -12951,12 +12225,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -13003,12 +12271,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -13029,67 +12291,66 @@ class ChipClusters: }, }, } - _WEB_RTC_TRANSPORT_PROVIDER_CLUSTER_INFO = { - "clusterName": "WebRTCTransportProvider", - "clusterId": 0x00000553, + _ZONE_MANAGEMENT_CLUSTER_INFO = { + "clusterName": "ZoneManagement", + "clusterId": 0x00000550, "commands": { - 0x00000001: { - "commandId": 0x00000001, - "commandName": "SolicitOffer", + 0x00000000: { + "commandId": 0x00000000, + "commandName": "CreateTwoDCartesianZone", "args": { - "streamType": "int", - "videoStreamID": "int", - "audioStreamID": "int", - "ICEServers": "ICEServerStruct", - "ICETransportPolicy": "str", - "metadataOptions": "int", + "zone": "TwoDCartesianZoneStruct", + }, + }, + 0x00000002: { + "commandId": 0x00000002, + "commandName": "UpdateTwoDCartesianZone", + "args": { + "zoneID": "int", + "zone": "TwoDCartesianZoneStruct", }, }, 0x00000003: { "commandId": 0x00000003, - "commandName": "ProvideOffer", + "commandName": "GetTwoDCartesianZone", "args": { - "webRTCSessionID": "int", - "sdp": "str", - "streamType": "int", - "videoStreamID": "int", - "audioStreamID": "int", - "ICEServers": "ICEServerStruct", - "ICETransportPolicy": "str", - "metadataOptions": "int", + "zoneID": "int", }, }, 0x00000005: { "commandId": 0x00000005, - "commandName": "ProvideAnswer", - "args": { - "webRTCSessionID": "int", - "sdp": "str", - }, - }, - 0x00000006: { - "commandId": 0x00000006, - "commandName": "ProvideICECandidate", - "args": { - "webRTCSessionID": "int", - "ICECandidate": "str", - }, - }, - 0x00000007: { - "commandId": 0x00000007, - "commandName": "EndSession", + "commandName": "RemoveZone", "args": { - "webRTCSessionID": "int", - "reason": "int", + "zoneID": "int", }, }, }, "attributes": { 0x00000000: { - "attributeName": "CurrentSessions", + "attributeName": "SupportedZoneSources", "attributeId": 0x00000000, + "type": "int", + "reportable": True, + }, + 0x00000001: { + "attributeName": "Zones", + "attributeId": 0x00000001, + "type": "", + "reportable": True, + }, + 0x00000002: { + "attributeName": "TimeControl", + "attributeId": 0x00000002, "type": "", "reportable": True, + "writable": True, + }, + 0x00000003: { + "attributeName": "Sensitivity", + "attributeId": 0x00000003, + "type": "int", + "reportable": True, + "writable": True, }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", @@ -13103,12 +12364,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -13129,54 +12384,679 @@ class ChipClusters: }, }, } - _CHIME_CLUSTER_INFO = { - "clusterName": "Chime", - "clusterId": 0x00000556, + _CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_INFO = { + "clusterName": "CameraAvStreamManagement", + "clusterId": 0x00000551, "commands": { 0x00000000: { "commandId": 0x00000000, - "commandName": "PlayChimeSound", + "commandName": "AudioStreamAllocate", "args": { + "streamType": "int", + "audioCodec": "int", + "channelCount": "int", + "sampleRate": "int", + "bitRate": "int", + "bitDepth": "int", }, }, - }, - "attributes": { - 0x00000000: { - "attributeName": "InstalledChimeSounds", - "attributeId": 0x00000000, - "type": "", - "reportable": True, - }, - 0x00000001: { - "attributeName": "ActiveChimeID", - "attributeId": 0x00000001, - "type": "int", - "reportable": True, - "writable": True, - }, 0x00000002: { - "attributeName": "Enabled", - "attributeId": 0x00000002, - "type": "bool", - "reportable": True, - "writable": True, - }, - 0x0000FFF8: { - "attributeName": "GeneratedCommandList", - "attributeId": 0x0000FFF8, - "type": "int", - "reportable": True, + "commandId": 0x00000002, + "commandName": "AudioStreamDeallocate", + "args": { + "audioStreamID": "int", + }, }, - 0x0000FFF9: { - "attributeName": "AcceptedCommandList", - "attributeId": 0x0000FFF9, - "type": "int", - "reportable": True, + 0x00000003: { + "commandId": 0x00000003, + "commandName": "VideoStreamAllocate", + "args": { + "streamType": "int", + "videoCodec": "int", + "minFrameRate": "int", + "maxFrameRate": "int", + "minResolution": "VideoResolutionStruct", + "maxResolution": "VideoResolutionStruct", + "minBitRate": "int", + "maxBitRate": "int", + "minFragmentLen": "int", + "maxFragmentLen": "int", + "watermarkEnabled": "bool", + "OSDEnabled": "bool", + }, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", + 0x00000005: { + "commandId": 0x00000005, + "commandName": "VideoStreamModify", + "args": { + "videoStreamID": "int", + "resolution": "VideoResolutionStruct", + "watermarkEnabled": "bool", + "OSDEnabled": "bool", + }, + }, + 0x00000006: { + "commandId": 0x00000006, + "commandName": "VideoStreamDeallocate", + "args": { + "videoStreamID": "int", + }, + }, + 0x00000007: { + "commandId": 0x00000007, + "commandName": "SnapshotStreamAllocate", + "args": { + "imageCodec": "int", + "frameRate": "int", + "bitRate": "int", + "minResolution": "VideoResolutionStruct", + "maxResolution": "VideoResolutionStruct", + "quality": "int", + }, + }, + 0x00000009: { + "commandId": 0x00000009, + "commandName": "SnapshotStreamDeallocate", + "args": { + "snapshotStreamID": "int", + }, + }, + 0x0000000A: { + "commandId": 0x0000000A, + "commandName": "SetStreamPriorities", + "args": { + "streamPriorities": "int", + }, + }, + 0x0000000B: { + "commandId": 0x0000000B, + "commandName": "CaptureSnapshot", + "args": { + "snapshotStreamID": "int", + "requestedResolution": "VideoResolutionStruct", + }, + }, + 0x0000000D: { + "commandId": 0x0000000D, + "commandName": "SetViewport", + "args": { + "viewport": "ViewportStruct", + }, + }, + 0x0000000E: { + "commandId": 0x0000000E, + "commandName": "SetImageRotation", + "args": { + "angle": "int", + }, + }, + 0x0000000F: { + "commandId": 0x0000000F, + "commandName": "SetImageFlipHorizontal", + "args": { + "enabled": "bool", + }, + }, + 0x00000010: { + "commandId": 0x00000010, + "commandName": "SetImageFlipVertical", + "args": { + "enabled": "bool", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "MaxConcurrentVideoEncoders", + "attributeId": 0x00000000, + "type": "int", + "reportable": True, + }, + 0x00000001: { + "attributeName": "MaxEncodedPixelRate", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, + }, + 0x00000002: { + "attributeName": "VideoSensorParams", + "attributeId": 0x00000002, + "type": "", + "reportable": True, + }, + 0x00000003: { + "attributeName": "NightVisionCapable", + "attributeId": 0x00000003, + "type": "bool", + "reportable": True, + }, + 0x00000004: { + "attributeName": "MinViewport", + "attributeId": 0x00000004, + "type": "", + "reportable": True, + }, + 0x00000005: { + "attributeName": "RateDistortionTradeOffPoints", + "attributeId": 0x00000005, + "type": "", + "reportable": True, + }, + 0x00000006: { + "attributeName": "MaxContentBufferSize", + "attributeId": 0x00000006, + "type": "int", + "reportable": True, + }, + 0x00000007: { + "attributeName": "MicrophoneCapabilities", + "attributeId": 0x00000007, + "type": "", + "reportable": True, + }, + 0x00000008: { + "attributeName": "SpeakerCapabilities", + "attributeId": 0x00000008, + "type": "", + "reportable": True, + }, + 0x00000009: { + "attributeName": "TwoWayTalkSupport", + "attributeId": 0x00000009, + "type": "int", + "reportable": True, + }, + 0x0000000A: { + "attributeName": "SupportedSnapshotParams", + "attributeId": 0x0000000A, + "type": "", + "reportable": True, + }, + 0x0000000B: { + "attributeName": "MaxNetworkBandwidth", + "attributeId": 0x0000000B, + "type": "int", + "reportable": True, + }, + 0x0000000C: { + "attributeName": "CurrentFrameRate", + "attributeId": 0x0000000C, + "type": "int", + "reportable": True, + }, + 0x0000000D: { + "attributeName": "HDRModeEnabled", + "attributeId": 0x0000000D, + "type": "bool", + "reportable": True, + "writable": True, + }, + 0x0000000E: { + "attributeName": "CurrentVideoCodecs", + "attributeId": 0x0000000E, + "type": "int", + "reportable": True, + }, + 0x0000000F: { + "attributeName": "CurrentSnapshotConfig", + "attributeId": 0x0000000F, + "type": "", + "reportable": True, + }, + 0x00000010: { + "attributeName": "FabricsUsingCamera", + "attributeId": 0x00000010, + "type": "int", + "reportable": True, + }, + 0x00000011: { + "attributeName": "AllocatedVideoStreams", + "attributeId": 0x00000011, + "type": "", + "reportable": True, + }, + 0x00000012: { + "attributeName": "AllocatedAudioStreams", + "attributeId": 0x00000012, + "type": "", + "reportable": True, + }, + 0x00000013: { + "attributeName": "AllocatedSnapshotStreams", + "attributeId": 0x00000013, + "type": "", + "reportable": True, + }, + 0x00000014: { + "attributeName": "RankedVideoStreamPrioritiesList", + "attributeId": 0x00000014, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000015: { + "attributeName": "SoftRecordingPrivacyModeEnabled", + "attributeId": 0x00000015, + "type": "bool", + "reportable": True, + "writable": True, + }, + 0x00000016: { + "attributeName": "SoftLivestreamPrivacyModeEnabled", + "attributeId": 0x00000016, + "type": "bool", + "reportable": True, + "writable": True, + }, + 0x00000017: { + "attributeName": "HardPrivacyModeOn", + "attributeId": 0x00000017, + "type": "bool", + "reportable": True, + }, + 0x00000018: { + "attributeName": "NightVision", + "attributeId": 0x00000018, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000019: { + "attributeName": "NightVisionIllum", + "attributeId": 0x00000019, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x0000001A: { + "attributeName": "AWBEnabled", + "attributeId": 0x0000001A, + "type": "bool", + "reportable": True, + "writable": True, + }, + 0x0000001B: { + "attributeName": "AutoShutterSpeedEnabled", + "attributeId": 0x0000001B, + "type": "bool", + "reportable": True, + "writable": True, + }, + 0x0000001C: { + "attributeName": "AutoISOEnabled", + "attributeId": 0x0000001C, + "type": "bool", + "reportable": True, + "writable": True, + }, + 0x0000001D: { + "attributeName": "Viewport", + "attributeId": 0x0000001D, + "type": "", + "reportable": True, + }, + 0x0000001E: { + "attributeName": "SpeakerMuted", + "attributeId": 0x0000001E, + "type": "bool", + "reportable": True, + "writable": True, + }, + 0x0000001F: { + "attributeName": "SpeakerVolumeLevel", + "attributeId": 0x0000001F, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000020: { + "attributeName": "SpeakerMaxLevel", + "attributeId": 0x00000020, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000021: { + "attributeName": "SpeakerMinLevel", + "attributeId": 0x00000021, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000022: { + "attributeName": "MicrophoneMuted", + "attributeId": 0x00000022, + "type": "bool", + "reportable": True, + "writable": True, + }, + 0x00000023: { + "attributeName": "MicrophoneVolumeLevel", + "attributeId": 0x00000023, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000024: { + "attributeName": "MicrophoneMaxLevel", + "attributeId": 0x00000024, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000025: { + "attributeName": "MicrophoneMinLevel", + "attributeId": 0x00000025, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000026: { + "attributeName": "MicrophoneAGCEnabled", + "attributeId": 0x00000026, + "type": "bool", + "reportable": True, + "writable": True, + }, + 0x00000027: { + "attributeName": "ImageRotation", + "attributeId": 0x00000027, + "type": "int", + "reportable": True, + }, + 0x00000028: { + "attributeName": "ImageFlipHorizontal", + "attributeId": 0x00000028, + "type": "bool", + "reportable": True, + }, + 0x00000029: { + "attributeName": "ImageFlipVertical", + "attributeId": 0x00000029, + "type": "bool", + "reportable": True, + }, + 0x0000002A: { + "attributeName": "LocalVideoRecordingEnabled", + "attributeId": 0x0000002A, + "type": "bool", + "reportable": True, + "writable": True, + }, + 0x0000002B: { + "attributeName": "LocalSnapshotRecordingEnabled", + "attributeId": 0x0000002B, + "type": "bool", + "reportable": True, + "writable": True, + }, + 0x0000002C: { + "attributeName": "StatusLightEnabled", + "attributeId": 0x0000002C, + "type": "bool", + "reportable": True, + "writable": True, + }, + 0x0000002D: { + "attributeName": "StatusLightBrightness", + "attributeId": 0x0000002D, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x0000002E: { + "attributeName": "DepthSensorStatus", + "attributeId": 0x0000002E, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } + _WEB_RTC_TRANSPORT_PROVIDER_CLUSTER_INFO = { + "clusterName": "WebRTCTransportProvider", + "clusterId": 0x00000553, + "commands": { + 0x00000001: { + "commandId": 0x00000001, + "commandName": "SolicitOffer", + "args": { + "streamType": "int", + "videoStreamID": "int", + "audioStreamID": "int", + "ICEServers": "ICEServerStruct", + "ICETransportPolicy": "str", + "metadataOptions": "int", + }, + }, + 0x00000003: { + "commandId": 0x00000003, + "commandName": "ProvideOffer", + "args": { + "webRTCSessionID": "int", + "sdp": "str", + "streamType": "int", + "videoStreamID": "int", + "audioStreamID": "int", + "ICEServers": "ICEServerStruct", + "ICETransportPolicy": "str", + "metadataOptions": "int", + }, + }, + 0x00000005: { + "commandId": 0x00000005, + "commandName": "ProvideAnswer", + "args": { + "webRTCSessionID": "int", + "sdp": "str", + }, + }, + 0x00000006: { + "commandId": 0x00000006, + "commandName": "ProvideICECandidate", + "args": { + "webRTCSessionID": "int", + "ICECandidate": "str", + }, + }, + 0x00000007: { + "commandId": 0x00000007, + "commandName": "EndSession", + "args": { + "webRTCSessionID": "int", + "reason": "int", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "CurrentSessions", + "attributeId": 0x00000000, + "type": "", + "reportable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } + _WEB_RTC_TRANSPORT_REQUESTOR_CLUSTER_INFO = { + "clusterName": "WebRTCTransportRequestor", + "clusterId": 0x00000554, + "commands": { + 0x00000001: { + "commandId": 0x00000001, + "commandName": "Offer", + "args": { + "webRTCSessionID": "int", + "sdp": "str", + "ICEServers": "ICEServerStruct", + "ICETransportPolicy": "str", + }, + }, + 0x00000002: { + "commandId": 0x00000002, + "commandName": "Answer", + "args": { + "webRTCSessionID": "int", + "sdp": "str", + }, + }, + 0x00000003: { + "commandId": 0x00000003, + "commandName": "ICECandidate", + "args": { + "webRTCSessionID": "int", + "ICECandidate": "str", + }, + }, + 0x00000004: { + "commandId": 0x00000004, + "commandName": "End", + "args": { + "webRTCSessionID": "int", + "reason": "int", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "CurrentSessions", + "attributeId": 0x00000000, + "type": "", + "reportable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } + _CHIME_CLUSTER_INFO = { + "clusterName": "Chime", + "clusterId": 0x00000556, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "PlayChimeSound", + "args": { + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "InstalledChimeSounds", + "attributeId": 0x00000000, + "type": "", + "reportable": True, + }, + 0x00000001: { + "attributeName": "ActiveChimeID", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000002: { + "attributeName": "Enabled", + "attributeId": 0x00000002, + "type": "bool", + "reportable": True, + "writable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", "reportable": True, }, 0x0000FFFB: { @@ -13229,12 +13109,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -13297,12 +13171,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -14166,12 +14034,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -14237,12 +14099,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -14302,12 +14158,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "type": "int", - "reportable": True, - }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, @@ -14447,7 +14297,10 @@ class ChipClusters: 0x0000050E: _ACCOUNT_LOGIN_CLUSTER_INFO, 0x0000050F: _CONTENT_CONTROL_CLUSTER_INFO, 0x00000510: _CONTENT_APP_OBSERVER_CLUSTER_INFO, + 0x00000550: _ZONE_MANAGEMENT_CLUSTER_INFO, + 0x00000551: _CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_INFO, 0x00000553: _WEB_RTC_TRANSPORT_PROVIDER_CLUSTER_INFO, + 0x00000554: _WEB_RTC_TRANSPORT_REQUESTOR_CLUSTER_INFO, 0x00000556: _CHIME_CLUSTER_INFO, 0x00000750: _ECOSYSTEM_INFORMATION_CLUSTER_INFO, 0x00000751: _COMMISSIONER_CONTROL_CLUSTER_INFO, @@ -14574,7 +14427,10 @@ class ChipClusters: "AccountLogin": _ACCOUNT_LOGIN_CLUSTER_INFO, "ContentControl": _CONTENT_CONTROL_CLUSTER_INFO, "ContentAppObserver": _CONTENT_APP_OBSERVER_CLUSTER_INFO, + "ZoneManagement": _ZONE_MANAGEMENT_CLUSTER_INFO, + "CameraAvStreamManagement": _CAMERA_AV_STREAM_MANAGEMENT_CLUSTER_INFO, "WebRTCTransportProvider": _WEB_RTC_TRANSPORT_PROVIDER_CLUSTER_INFO, + "WebRTCTransportRequestor": _WEB_RTC_TRANSPORT_REQUESTOR_CLUSTER_INFO, "Chime": _CHIME_CLUSTER_INFO, "EcosystemInformation": _ECOSYSTEM_INFORMATION_CLUSTER_INFO, "CommissionerControl": _COMMISSIONER_CONTROL_CLUSTER_INFO, diff --git a/src/controller/python/chip/clusters/ClusterObjects.py b/src/controller/python/chip/clusters/ClusterObjects.py index ddafe87bf2..beb490c631 100644 --- a/src/controller/python/chip/clusters/ClusterObjects.py +++ b/src/controller/python/chip/clusters/ClusterObjects.py @@ -214,6 +214,7 @@ def descriptor(cls): # These need to be separate because there can be overlap in command ids for commands and responses. ALL_ACCEPTED_COMMANDS: typing.Dict = {} ALL_GENERATED_COMMANDS: typing.Dict = {} +ALL_EVENTS: typing.Dict = {} class ClusterCommand(ClusterObject): @@ -261,12 +262,7 @@ def __init_subclass__(cls, *args, **kwargs) -> None: """Register a subclass.""" super().__init_subclass__(*args, **kwargs) # register this cluster in the ALL_CLUSTERS dict for quick lookups - try: - ALL_CLUSTERS[cls.id] = cls - except NotImplementedError: - # handle case where the Cluster class is not (fully) subclassed - # and accessing the id property throws a NotImplementedError. - pass + ALL_CLUSTERS[cls.id] = cls @property def data_version(self) -> int: @@ -300,16 +296,11 @@ class ClusterAttributeDescriptor: def __init_subclass__(cls, *args, **kwargs) -> None: """Register a subclass.""" super().__init_subclass__(*args, **kwargs) - try: - if cls.standard_attribute: - if cls.cluster_id not in ALL_ATTRIBUTES: - ALL_ATTRIBUTES[cls.cluster_id] = {} - # register this clusterattribute in the ALL_ATTRIBUTES dict for quick lookups - ALL_ATTRIBUTES[cls.cluster_id][cls.attribute_id] = cls - except NotImplementedError: - # handle case where the ClusterAttribute class is not (fully) subclassed - # and accessing the id property throws a NotImplementedError. - pass + if cls.standard_attribute: + if cls.cluster_id not in ALL_ATTRIBUTES: + ALL_ATTRIBUTES[cls.cluster_id] = {} + # register this clusterattribute in the ALL_ATTRIBUTES dict for quick lookups + ALL_ATTRIBUTES[cls.cluster_id][cls.attribute_id] = cls @classmethod def ToTLV(cls, tag: Union[int, None], value): @@ -369,6 +360,15 @@ def _cluster_object(cls) -> ClusterObject: class ClusterEvent(ClusterObject): + def __init_subclass__(cls, *args, **kwargs) -> None: + """Register a subclass.""" + super().__init_subclass__(*args, **kwargs) + + if cls.cluster_id not in ALL_EVENTS: + ALL_EVENTS[cls.cluster_id] = {} + # register this clusterattribute in the ALL_ATTRIBUTES dict for quick lookups + ALL_EVENTS[cls.cluster_id][cls.event_id] = cls + @ChipUtility.classproperty def cluster_id(self) -> int: raise NotImplementedError() diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index b11ad8e725..b7b7328271 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -23,6 +23,7 @@ # Users are not expected to import this file, instead, users can use import chip.clusters, # which will import all symbols from this file and can get a readable, pretty naming like # clusters.OnOff.commands.OnCommand +from __future__ import annotations import typing from dataclasses import dataclass, field @@ -156,7 +157,10 @@ "AccountLogin", "ContentControl", "ContentAppObserver", + "ZoneManagement", + "CameraAvStreamManagement", "WebRTCTransportProvider", + "WebRTCTransportRequestor", "Chime", "EcosystemInformation", "CommissionerControl", @@ -268,7 +272,7 @@ class AreaTypeTag(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 95, + kUnknownEnumValue = 95 class AtomicRequestTypeEnum(MatterIntEnum): kBeginWrite = 0x00 @@ -278,7 +282,7 @@ class AtomicRequestTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class FloorSurfaceTag(MatterIntEnum): kCarpet = 0x00 @@ -309,7 +313,7 @@ class FloorSurfaceTag(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 24, + kUnknownEnumValue = 24 class LandmarkTag(MatterIntEnum): kAirConditioner = 0x00 @@ -367,7 +371,7 @@ class LandmarkTag(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 51, + kUnknownEnumValue = 51 class PositionTag(MatterIntEnum): kLeft = 0x00 @@ -381,7 +385,7 @@ class PositionTag(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 7, + kUnknownEnumValue = 7 class RelativePositionTag(MatterIntEnum): kUnder = 0x00 @@ -395,7 +399,7 @@ class RelativePositionTag(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 7, + kUnknownEnumValue = 7 class TestGlobalEnum(MatterIntEnum): kSomeValue = 0x00 @@ -405,7 +409,7 @@ class TestGlobalEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class ThreeLevelAutoEnum(MatterIntEnum): kLow = 0x00 @@ -416,7 +420,7 @@ class ThreeLevelAutoEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class Bitmaps: class TestGlobalBitmap(IntFlag): @@ -481,20 +485,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="identifyType", Tag=0x00000001, Type=Identify.Enums.IdentifyTypeEnum), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - identifyTime: 'uint' = None - identifyType: 'Identify.Enums.IdentifyTypeEnum' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + identifyTime: uint = 0 + identifyType: Identify.Enums.IdentifyTypeEnum = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class EffectIdentifierEnum(MatterIntEnum): @@ -508,7 +510,7 @@ class EffectIdentifierEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class EffectVariantEnum(MatterIntEnum): kDefault = 0x00 @@ -516,7 +518,7 @@ class EffectVariantEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 1, + kUnknownEnumValue = 1 class IdentifyTypeEnum(MatterIntEnum): kNone = 0x00 @@ -529,7 +531,7 @@ class IdentifyTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 6, + kUnknownEnumValue = 6 class Commands: @dataclass @@ -537,7 +539,7 @@ class Identify(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000003 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -546,14 +548,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="identifyTime", Tag=0, Type=uint), ]) - identifyTime: 'uint' = 0 + identifyTime: uint = 0 @dataclass class TriggerEffect(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000003 command_id: typing.ClassVar[int] = 0x00000040 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -563,8 +565,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="effectVariant", Tag=1, Type=Identify.Enums.EffectVariantEnum), ]) - effectIdentifier: 'Identify.Enums.EffectIdentifierEnum' = 0 - effectVariant: 'Identify.Enums.EffectVariantEnum' = 0 + effectIdentifier: Identify.Enums.EffectIdentifierEnum = 0 + effectVariant: Identify.Enums.EffectVariantEnum = 0 class Attributes: @dataclass @@ -581,7 +583,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class IdentifyType(ClusterAttributeDescriptor): @@ -597,7 +599,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=Identify.Enums.IdentifyTypeEnum) - value: 'Identify.Enums.IdentifyTypeEnum' = 0 + value: Identify.Enums.IdentifyTypeEnum = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -613,7 +615,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -629,23 +631,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000003 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -661,7 +647,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -677,7 +663,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -693,7 +679,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -707,19 +693,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="nameSupport", Tag=0x00000000, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - nameSupport: 'uint' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + nameSupport: uint = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Bitmaps: class Feature(IntFlag): @@ -744,15 +728,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="groupName", Tag=1, Type=str), ]) - groupID: 'uint' = 0 - groupName: 'str' = "" + groupID: uint = 0 + groupName: str = "" @dataclass class AddGroupResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000004 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -762,8 +746,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), ]) - status: 'uint' = 0 - groupID: 'uint' = 0 + status: uint = 0 + groupID: uint = 0 @dataclass class ViewGroup(ClusterCommand): @@ -779,14 +763,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), ]) - groupID: 'uint' = 0 + groupID: uint = 0 @dataclass class ViewGroupResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000004 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -797,9 +781,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="groupName", Tag=2, Type=str), ]) - status: 'uint' = 0 - groupID: 'uint' = 0 - groupName: 'str' = "" + status: uint = 0 + groupID: uint = 0 + groupName: str = "" @dataclass class GetGroupMembership(ClusterCommand): @@ -815,14 +799,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="groupList", Tag=0, Type=typing.List[uint]), ]) - groupList: 'typing.List[uint]' = field(default_factory=lambda: []) + groupList: typing.List[uint] = field(default_factory=lambda: []) @dataclass class GetGroupMembershipResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000004 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -832,8 +816,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="groupList", Tag=1, Type=typing.List[uint]), ]) - capacity: 'typing.Union[Nullable, uint]' = NullValue - groupList: 'typing.List[uint]' = field(default_factory=lambda: []) + capacity: typing.Union[Nullable, uint] = NullValue + groupList: typing.List[uint] = field(default_factory=lambda: []) @dataclass class RemoveGroup(ClusterCommand): @@ -849,14 +833,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), ]) - groupID: 'uint' = 0 + groupID: uint = 0 @dataclass class RemoveGroupResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000004 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -866,15 +850,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), ]) - status: 'uint' = 0 - groupID: 'uint' = 0 + status: uint = 0 + groupID: uint = 0 @dataclass class RemoveAllGroups(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000004 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -887,7 +871,7 @@ class AddGroupIfIdentifying(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000004 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -897,8 +881,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="groupName", Tag=1, Type=str), ]) - groupID: 'uint' = 0 - groupName: 'str' = "" + groupID: uint = 0 + groupName: str = "" class Attributes: @dataclass @@ -915,7 +899,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -931,7 +915,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -947,23 +931,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000004 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -979,7 +947,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -995,7 +963,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -1011,7 +979,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -1029,23 +997,21 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="startUpOnOff", Tag=0x00004003, Type=typing.Union[None, Nullable, OnOff.Enums.StartUpOnOffEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - onOff: 'bool' = None - globalSceneControl: 'typing.Optional[bool]' = None - onTime: 'typing.Optional[uint]' = None - offWaitTime: 'typing.Optional[uint]' = None - startUpOnOff: 'typing.Union[None, Nullable, OnOff.Enums.StartUpOnOffEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + onOff: bool = False + globalSceneControl: typing.Optional[bool] = None + onTime: typing.Optional[uint] = None + offWaitTime: typing.Optional[uint] = None + startUpOnOff: typing.Union[None, Nullable, OnOff.Enums.StartUpOnOffEnum] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class DelayedAllOffEffectVariantEnum(MatterIntEnum): @@ -1056,7 +1022,7 @@ class DelayedAllOffEffectVariantEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class DyingLightEffectVariantEnum(MatterIntEnum): kDyingLightFadeOff = 0x00 @@ -1064,7 +1030,7 @@ class DyingLightEffectVariantEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 1, + kUnknownEnumValue = 1 class EffectIdentifierEnum(MatterIntEnum): kDelayedAllOff = 0x00 @@ -1073,7 +1039,7 @@ class EffectIdentifierEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class StartUpOnOffEnum(MatterIntEnum): kOff = 0x00 @@ -1083,7 +1049,7 @@ class StartUpOnOffEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class Bitmaps: class Feature(IntFlag): @@ -1100,7 +1066,7 @@ class Off(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000006 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1113,7 +1079,7 @@ class On(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000006 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1126,7 +1092,7 @@ class Toggle(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000006 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1139,7 +1105,7 @@ class OffWithEffect(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000006 command_id: typing.ClassVar[int] = 0x00000040 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1149,15 +1115,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="effectVariant", Tag=1, Type=uint), ]) - effectIdentifier: 'OnOff.Enums.EffectIdentifierEnum' = 0 - effectVariant: 'uint' = 0 + effectIdentifier: OnOff.Enums.EffectIdentifierEnum = 0 + effectVariant: uint = 0 @dataclass class OnWithRecallGlobalScene(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000006 command_id: typing.ClassVar[int] = 0x00000041 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1170,7 +1136,7 @@ class OnWithTimedOff(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000006 command_id: typing.ClassVar[int] = 0x00000042 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1181,9 +1147,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="offWaitTime", Tag=2, Type=uint), ]) - onOffControl: 'uint' = 0 - onTime: 'uint' = 0 - offWaitTime: 'uint' = 0 + onOffControl: uint = 0 + onTime: uint = 0 + offWaitTime: uint = 0 class Attributes: @dataclass @@ -1200,7 +1166,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class GlobalSceneControl(ClusterAttributeDescriptor): @@ -1216,7 +1182,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Optional[bool]' = None + value: typing.Optional[bool] = None @dataclass class OnTime(ClusterAttributeDescriptor): @@ -1232,7 +1198,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class OffWaitTime(ClusterAttributeDescriptor): @@ -1248,7 +1214,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class StartUpOnOff(ClusterAttributeDescriptor): @@ -1264,7 +1230,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, OnOff.Enums.StartUpOnOffEnum]) - value: 'typing.Union[None, Nullable, OnOff.Enums.StartUpOnOffEnum]' = None + value: typing.Union[None, Nullable, OnOff.Enums.StartUpOnOffEnum] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -1280,7 +1246,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -1296,23 +1262,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000006 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -1328,7 +1278,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -1344,7 +1294,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -1360,7 +1310,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -1387,32 +1337,30 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="startUpCurrentLevel", Tag=0x00004000, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - currentLevel: 'typing.Union[Nullable, uint]' = None - remainingTime: 'typing.Optional[uint]' = None - minLevel: 'typing.Optional[uint]' = None - maxLevel: 'typing.Optional[uint]' = None - currentFrequency: 'typing.Optional[uint]' = None - minFrequency: 'typing.Optional[uint]' = None - maxFrequency: 'typing.Optional[uint]' = None - options: 'uint' = None - onOffTransitionTime: 'typing.Optional[uint]' = None - onLevel: 'typing.Union[Nullable, uint]' = None - onTransitionTime: 'typing.Union[None, Nullable, uint]' = None - offTransitionTime: 'typing.Union[None, Nullable, uint]' = None - defaultMoveRate: 'typing.Union[None, Nullable, uint]' = None - startUpCurrentLevel: 'typing.Union[None, Nullable, uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + currentLevel: typing.Union[Nullable, uint] = NullValue + remainingTime: typing.Optional[uint] = None + minLevel: typing.Optional[uint] = None + maxLevel: typing.Optional[uint] = None + currentFrequency: typing.Optional[uint] = None + minFrequency: typing.Optional[uint] = None + maxFrequency: typing.Optional[uint] = None + options: uint = 0 + onOffTransitionTime: typing.Optional[uint] = None + onLevel: typing.Union[Nullable, uint] = NullValue + onTransitionTime: typing.Union[None, Nullable, uint] = None + offTransitionTime: typing.Union[None, Nullable, uint] = None + defaultMoveRate: typing.Union[None, Nullable, uint] = None + startUpCurrentLevel: typing.Union[None, Nullable, uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class MoveModeEnum(MatterIntEnum): @@ -1422,7 +1370,7 @@ class MoveModeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class StepModeEnum(MatterIntEnum): kUp = 0x00 @@ -1431,7 +1379,7 @@ class StepModeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class Bitmaps: class Feature(IntFlag): @@ -1449,7 +1397,7 @@ class MoveToLevel(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1461,17 +1409,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) - level: 'uint' = 0 - transitionTime: 'typing.Union[Nullable, uint]' = NullValue - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + level: uint = 0 + transitionTime: typing.Union[Nullable, uint] = NullValue + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class Move(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1483,17 +1431,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) - moveMode: 'LevelControl.Enums.MoveModeEnum' = 0 - rate: 'typing.Union[Nullable, uint]' = NullValue - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + moveMode: LevelControl.Enums.MoveModeEnum = 0 + rate: typing.Union[Nullable, uint] = NullValue + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class Step(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1506,18 +1454,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) - stepMode: 'LevelControl.Enums.StepModeEnum' = 0 - stepSize: 'uint' = 0 - transitionTime: 'typing.Union[Nullable, uint]' = NullValue - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + stepMode: LevelControl.Enums.StepModeEnum = 0 + stepSize: uint = 0 + transitionTime: typing.Union[Nullable, uint] = NullValue + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class Stop(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1527,15 +1475,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=1, Type=uint), ]) - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class MoveToLevelWithOnOff(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1547,17 +1495,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) - level: 'uint' = 0 - transitionTime: 'typing.Union[Nullable, uint]' = NullValue - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + level: uint = 0 + transitionTime: typing.Union[Nullable, uint] = NullValue + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class MoveWithOnOff(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1569,17 +1517,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) - moveMode: 'LevelControl.Enums.MoveModeEnum' = 0 - rate: 'typing.Union[Nullable, uint]' = NullValue - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + moveMode: LevelControl.Enums.MoveModeEnum = 0 + rate: typing.Union[Nullable, uint] = NullValue + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class StepWithOnOff(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000006 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1592,18 +1540,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) - stepMode: 'LevelControl.Enums.StepModeEnum' = 0 - stepSize: 'uint' = 0 - transitionTime: 'typing.Union[Nullable, uint]' = NullValue - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + stepMode: LevelControl.Enums.StepModeEnum = 0 + stepSize: uint = 0 + transitionTime: typing.Union[Nullable, uint] = NullValue + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class StopWithOnOff(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1613,15 +1561,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=1, Type=uint), ]) - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class MoveToClosestFrequency(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000008 command_id: typing.ClassVar[int] = 0x00000008 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -1630,7 +1578,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="frequency", Tag=0, Type=uint), ]) - frequency: 'uint' = 0 + frequency: uint = 0 class Attributes: @dataclass @@ -1647,7 +1595,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class RemainingTime(ClusterAttributeDescriptor): @@ -1663,7 +1611,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class MinLevel(ClusterAttributeDescriptor): @@ -1679,7 +1627,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class MaxLevel(ClusterAttributeDescriptor): @@ -1695,7 +1643,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class CurrentFrequency(ClusterAttributeDescriptor): @@ -1711,7 +1659,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class MinFrequency(ClusterAttributeDescriptor): @@ -1727,7 +1675,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class MaxFrequency(ClusterAttributeDescriptor): @@ -1743,7 +1691,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Options(ClusterAttributeDescriptor): @@ -1759,7 +1707,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class OnOffTransitionTime(ClusterAttributeDescriptor): @@ -1775,7 +1723,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class OnLevel(ClusterAttributeDescriptor): @@ -1791,7 +1739,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class OnTransitionTime(ClusterAttributeDescriptor): @@ -1807,7 +1755,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class OffTransitionTime(ClusterAttributeDescriptor): @@ -1823,7 +1771,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class DefaultMoveRate(ClusterAttributeDescriptor): @@ -1839,7 +1787,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class StartUpCurrentLevel(ClusterAttributeDescriptor): @@ -1855,7 +1803,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -1871,7 +1819,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -1887,23 +1835,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000008 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -1919,7 +1851,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -1935,7 +1867,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -1951,7 +1883,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -1964,18 +1896,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Attributes: @dataclass @@ -1992,7 +1922,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -2008,23 +1938,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000001C - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -2040,7 +1954,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -2056,7 +1970,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -2072,7 +1986,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -2090,23 +2004,21 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="tagList", Tag=0x00000004, Type=typing.Optional[typing.List[Descriptor.Structs.SemanticTagStruct]]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - deviceTypeList: 'typing.List[Descriptor.Structs.DeviceTypeStruct]' = None - serverList: 'typing.List[uint]' = None - clientList: 'typing.List[uint]' = None - partsList: 'typing.List[uint]' = None - tagList: 'typing.Optional[typing.List[Descriptor.Structs.SemanticTagStruct]]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + deviceTypeList: typing.List[Descriptor.Structs.DeviceTypeStruct] = field(default_factory=lambda: []) + serverList: typing.List[uint] = field(default_factory=lambda: []) + clientList: typing.List[uint] = field(default_factory=lambda: []) + partsList: typing.List[uint] = field(default_factory=lambda: []) + tagList: typing.Optional[typing.List[Descriptor.Structs.SemanticTagStruct]] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Bitmaps: class Feature(IntFlag): @@ -2158,7 +2070,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[Descriptor.Structs.DeviceTypeStruct]) - value: 'typing.List[Descriptor.Structs.DeviceTypeStruct]' = field(default_factory=lambda: []) + value: typing.List[Descriptor.Structs.DeviceTypeStruct] = field(default_factory=lambda: []) @dataclass class ServerList(ClusterAttributeDescriptor): @@ -2174,7 +2086,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class ClientList(ClusterAttributeDescriptor): @@ -2190,7 +2102,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class PartsList(ClusterAttributeDescriptor): @@ -2206,7 +2118,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class TagList(ClusterAttributeDescriptor): @@ -2222,7 +2134,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[Descriptor.Structs.SemanticTagStruct]]) - value: 'typing.Optional[typing.List[Descriptor.Structs.SemanticTagStruct]]' = None + value: typing.Optional[typing.List[Descriptor.Structs.SemanticTagStruct]] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -2238,7 +2150,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -2254,23 +2166,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000001D - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -2286,7 +2182,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -2302,7 +2198,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -2318,7 +2214,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -2332,19 +2228,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="binding", Tag=0x00000000, Type=typing.List[Binding.Structs.TargetStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - binding: 'typing.List[Binding.Structs.TargetStruct]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + binding: typing.List[Binding.Structs.TargetStruct] = field(default_factory=lambda: []) + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Structs: @dataclass @@ -2381,7 +2275,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[Binding.Structs.TargetStruct]) - value: 'typing.List[Binding.Structs.TargetStruct]' = field(default_factory=lambda: []) + value: typing.List[Binding.Structs.TargetStruct] = field(default_factory=lambda: []) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -2397,7 +2291,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -2413,23 +2307,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000001E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -2445,7 +2323,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -2461,7 +2339,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -2477,7 +2355,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -2497,25 +2375,23 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arl", Tag=0x00000006, Type=typing.Optional[typing.List[AccessControl.Structs.AccessRestrictionEntryStruct]]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - acl: 'typing.List[AccessControl.Structs.AccessControlEntryStruct]' = None - extension: 'typing.Optional[typing.List[AccessControl.Structs.AccessControlExtensionStruct]]' = None - subjectsPerAccessControlEntry: 'uint' = None - targetsPerAccessControlEntry: 'uint' = None - accessControlEntriesPerFabric: 'uint' = None - commissioningARL: 'typing.Optional[typing.List[AccessControl.Structs.CommissioningAccessRestrictionEntryStruct]]' = None - arl: 'typing.Optional[typing.List[AccessControl.Structs.AccessRestrictionEntryStruct]]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + acl: typing.List[AccessControl.Structs.AccessControlEntryStruct] = field(default_factory=lambda: []) + extension: typing.Optional[typing.List[AccessControl.Structs.AccessControlExtensionStruct]] = None + subjectsPerAccessControlEntry: uint = 0 + targetsPerAccessControlEntry: uint = 0 + accessControlEntriesPerFabric: uint = 0 + commissioningARL: typing.Optional[typing.List[AccessControl.Structs.CommissioningAccessRestrictionEntryStruct]] = None + arl: typing.Optional[typing.List[AccessControl.Structs.AccessRestrictionEntryStruct]] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class AccessControlEntryAuthModeEnum(MatterIntEnum): @@ -2526,7 +2402,7 @@ class AccessControlEntryAuthModeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 0, + kUnknownEnumValue = 0 class AccessControlEntryPrivilegeEnum(MatterIntEnum): kView = 0x01 @@ -2538,7 +2414,7 @@ class AccessControlEntryPrivilegeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 0, + kUnknownEnumValue = 0 class AccessRestrictionTypeEnum(MatterIntEnum): kAttributeAccessForbidden = 0x00 @@ -2549,7 +2425,7 @@ class AccessRestrictionTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class ChangeTypeEnum(MatterIntEnum): kChanged = 0x00 @@ -2559,7 +2435,7 @@ class ChangeTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class Bitmaps: class Feature(IntFlag): @@ -2674,14 +2550,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arl", Tag=0, Type=typing.List[AccessControl.Structs.CommissioningAccessRestrictionEntryStruct]), ]) - arl: 'typing.List[AccessControl.Structs.CommissioningAccessRestrictionEntryStruct]' = field(default_factory=lambda: []) + arl: typing.List[AccessControl.Structs.CommissioningAccessRestrictionEntryStruct] = field(default_factory=lambda: []) @dataclass class ReviewFabricRestrictionsResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000001F command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -2690,7 +2566,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="token", Tag=0, Type=uint), ]) - token: 'uint' = 0 + token: uint = 0 class Attributes: @dataclass @@ -2707,7 +2583,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[AccessControl.Structs.AccessControlEntryStruct]) - value: 'typing.List[AccessControl.Structs.AccessControlEntryStruct]' = field(default_factory=lambda: []) + value: typing.List[AccessControl.Structs.AccessControlEntryStruct] = field(default_factory=lambda: []) @dataclass class Extension(ClusterAttributeDescriptor): @@ -2723,7 +2599,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[AccessControl.Structs.AccessControlExtensionStruct]]) - value: 'typing.Optional[typing.List[AccessControl.Structs.AccessControlExtensionStruct]]' = None + value: typing.Optional[typing.List[AccessControl.Structs.AccessControlExtensionStruct]] = None @dataclass class SubjectsPerAccessControlEntry(ClusterAttributeDescriptor): @@ -2739,7 +2615,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class TargetsPerAccessControlEntry(ClusterAttributeDescriptor): @@ -2755,7 +2631,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class AccessControlEntriesPerFabric(ClusterAttributeDescriptor): @@ -2771,7 +2647,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class CommissioningARL(ClusterAttributeDescriptor): @@ -2787,7 +2663,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[AccessControl.Structs.CommissioningAccessRestrictionEntryStruct]]) - value: 'typing.Optional[typing.List[AccessControl.Structs.CommissioningAccessRestrictionEntryStruct]]' = None + value: typing.Optional[typing.List[AccessControl.Structs.CommissioningAccessRestrictionEntryStruct]] = None @dataclass class Arl(ClusterAttributeDescriptor): @@ -2803,7 +2679,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[AccessControl.Structs.AccessRestrictionEntryStruct]]) - value: 'typing.Optional[typing.List[AccessControl.Structs.AccessRestrictionEntryStruct]]' = None + value: typing.Optional[typing.List[AccessControl.Structs.AccessRestrictionEntryStruct]] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -2819,7 +2695,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -2835,23 +2711,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000001F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -2867,7 +2727,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -2883,7 +2743,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -2899,7 +2759,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -2923,11 +2783,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) - adminNodeID: 'typing.Union[Nullable, uint]' = NullValue - adminPasscodeID: 'typing.Union[Nullable, uint]' = NullValue - changeType: 'AccessControl.Enums.ChangeTypeEnum' = 0 - latestValue: 'typing.Union[Nullable, AccessControl.Structs.AccessControlEntryStruct]' = NullValue - fabricIndex: 'uint' = 0 + adminNodeID: typing.Union[Nullable, uint] = NullValue + adminPasscodeID: typing.Union[Nullable, uint] = NullValue + changeType: AccessControl.Enums.ChangeTypeEnum = 0 + latestValue: typing.Union[Nullable, AccessControl.Structs.AccessControlEntryStruct] = NullValue + fabricIndex: uint = 0 @dataclass class AccessControlExtensionChanged(ClusterEvent): @@ -2950,11 +2810,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) - adminNodeID: 'typing.Union[Nullable, uint]' = NullValue - adminPasscodeID: 'typing.Union[Nullable, uint]' = NullValue - changeType: 'AccessControl.Enums.ChangeTypeEnum' = 0 - latestValue: 'typing.Union[Nullable, AccessControl.Structs.AccessControlExtensionStruct]' = NullValue - fabricIndex: 'uint' = 0 + adminNodeID: typing.Union[Nullable, uint] = NullValue + adminPasscodeID: typing.Union[Nullable, uint] = NullValue + changeType: AccessControl.Enums.ChangeTypeEnum = 0 + latestValue: typing.Union[Nullable, AccessControl.Structs.AccessControlExtensionStruct] = NullValue + fabricIndex: uint = 0 @dataclass class FabricRestrictionReviewUpdate(ClusterEvent): @@ -2976,10 +2836,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) - token: 'uint' = 0 - instruction: 'typing.Optional[str]' = None - ARLRequestFlowUrl: 'typing.Optional[str]' = None - fabricIndex: 'uint' = 0 + token: uint = 0 + instruction: typing.Optional[str] = None + ARLRequestFlowUrl: typing.Optional[str] = None + fabricIndex: uint = 0 @dataclass @@ -2995,21 +2855,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="setupURL", Tag=0x00000002, Type=typing.Optional[str]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - actionList: 'typing.List[Actions.Structs.ActionStruct]' = None - endpointLists: 'typing.List[Actions.Structs.EndpointListStruct]' = None - setupURL: 'typing.Optional[str]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + actionList: typing.List[Actions.Structs.ActionStruct] = field(default_factory=lambda: []) + endpointLists: typing.List[Actions.Structs.EndpointListStruct] = field(default_factory=lambda: []) + setupURL: typing.Optional[str] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ActionErrorEnum(MatterIntEnum): @@ -3019,7 +2877,7 @@ class ActionErrorEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class ActionStateEnum(MatterIntEnum): kInactive = 0x00 @@ -3030,7 +2888,7 @@ class ActionStateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class ActionTypeEnum(MatterIntEnum): kOther = 0x00 @@ -3044,7 +2902,7 @@ class ActionTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 7, + kUnknownEnumValue = 7 class EndpointListTypeEnum(MatterIntEnum): kOther = 0x00 @@ -3054,7 +2912,7 @@ class EndpointListTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class Bitmaps: class CommandBits(IntFlag): @@ -3116,7 +2974,7 @@ class InstantAction(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3126,15 +2984,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), ]) - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None + actionID: uint = 0 + invokeID: typing.Optional[uint] = None @dataclass class InstantActionWithTransition(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3145,16 +3003,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=uint), ]) - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None - transitionTime: 'uint' = 0 + actionID: uint = 0 + invokeID: typing.Optional[uint] = None + transitionTime: uint = 0 @dataclass class StartAction(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3164,15 +3022,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), ]) - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None + actionID: uint = 0 + invokeID: typing.Optional[uint] = None @dataclass class StartActionWithDuration(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3183,16 +3041,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="duration", Tag=2, Type=uint), ]) - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None - duration: 'uint' = 0 + actionID: uint = 0 + invokeID: typing.Optional[uint] = None + duration: uint = 0 @dataclass class StopAction(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3202,15 +3060,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), ]) - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None + actionID: uint = 0 + invokeID: typing.Optional[uint] = None @dataclass class PauseAction(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3220,15 +3078,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), ]) - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None + actionID: uint = 0 + invokeID: typing.Optional[uint] = None @dataclass class PauseActionWithDuration(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000006 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3239,16 +3097,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="duration", Tag=2, Type=uint), ]) - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None - duration: 'uint' = 0 + actionID: uint = 0 + invokeID: typing.Optional[uint] = None + duration: uint = 0 @dataclass class ResumeAction(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3258,15 +3116,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), ]) - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None + actionID: uint = 0 + invokeID: typing.Optional[uint] = None @dataclass class EnableAction(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000008 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3276,15 +3134,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), ]) - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None + actionID: uint = 0 + invokeID: typing.Optional[uint] = None @dataclass class EnableActionWithDuration(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x00000009 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3295,16 +3153,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="duration", Tag=2, Type=uint), ]) - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None - duration: 'uint' = 0 + actionID: uint = 0 + invokeID: typing.Optional[uint] = None + duration: uint = 0 @dataclass class DisableAction(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x0000000A is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3314,15 +3172,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="invokeID", Tag=1, Type=typing.Optional[uint]), ]) - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None + actionID: uint = 0 + invokeID: typing.Optional[uint] = None @dataclass class DisableActionWithDuration(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000025 command_id: typing.ClassVar[int] = 0x0000000B is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3333,9 +3191,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="duration", Tag=2, Type=uint), ]) - actionID: 'uint' = 0 - invokeID: 'typing.Optional[uint]' = None - duration: 'uint' = 0 + actionID: uint = 0 + invokeID: typing.Optional[uint] = None + duration: uint = 0 class Attributes: @dataclass @@ -3352,7 +3210,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[Actions.Structs.ActionStruct]) - value: 'typing.List[Actions.Structs.ActionStruct]' = field(default_factory=lambda: []) + value: typing.List[Actions.Structs.ActionStruct] = field(default_factory=lambda: []) @dataclass class EndpointLists(ClusterAttributeDescriptor): @@ -3368,7 +3226,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[Actions.Structs.EndpointListStruct]) - value: 'typing.List[Actions.Structs.EndpointListStruct]' = field(default_factory=lambda: []) + value: typing.List[Actions.Structs.EndpointListStruct] = field(default_factory=lambda: []) @dataclass class SetupURL(ClusterAttributeDescriptor): @@ -3384,7 +3242,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -3400,7 +3258,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -3416,23 +3274,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000025 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -3448,7 +3290,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -3464,7 +3306,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -3480,7 +3322,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -3502,9 +3344,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="newState", Tag=2, Type=Actions.Enums.ActionStateEnum), ]) - actionID: 'uint' = 0 - invokeID: 'uint' = 0 - newState: 'Actions.Enums.ActionStateEnum' = 0 + actionID: uint = 0 + invokeID: uint = 0 + newState: Actions.Enums.ActionStateEnum = 0 @dataclass class ActionFailed(ClusterEvent): @@ -3526,10 +3368,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="error", Tag=3, Type=Actions.Enums.ActionErrorEnum), ]) - actionID: 'uint' = 0 - invokeID: 'uint' = 0 - newState: 'Actions.Enums.ActionStateEnum' = 0 - error: 'Actions.Enums.ActionErrorEnum' = 0 + actionID: uint = 0 + invokeID: uint = 0 + newState: Actions.Enums.ActionStateEnum = 0 + error: Actions.Enums.ActionErrorEnum = 0 @dataclass @@ -3565,41 +3407,39 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="maxPathsPerInvoke", Tag=0x00000016, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - dataModelRevision: 'uint' = None - vendorName: 'str' = None - vendorID: 'uint' = None - productName: 'str' = None - productID: 'uint' = None - nodeLabel: 'str' = None - location: 'str' = None - hardwareVersion: 'uint' = None - hardwareVersionString: 'str' = None - softwareVersion: 'uint' = None - softwareVersionString: 'str' = None - manufacturingDate: 'typing.Optional[str]' = None - partNumber: 'typing.Optional[str]' = None - productURL: 'typing.Optional[str]' = None - productLabel: 'typing.Optional[str]' = None - serialNumber: 'typing.Optional[str]' = None - localConfigDisabled: 'typing.Optional[bool]' = None - reachable: 'typing.Optional[bool]' = None - uniqueID: 'str' = None - capabilityMinima: 'BasicInformation.Structs.CapabilityMinimaStruct' = None - productAppearance: 'typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]' = None - specificationVersion: 'uint' = None - maxPathsPerInvoke: 'uint' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + dataModelRevision: uint = 0 + vendorName: str = "" + vendorID: uint = 0 + productName: str = "" + productID: uint = 0 + nodeLabel: str = "" + location: str = "" + hardwareVersion: uint = 0 + hardwareVersionString: str = "" + softwareVersion: uint = 0 + softwareVersionString: str = "" + manufacturingDate: typing.Optional[str] = None + partNumber: typing.Optional[str] = None + productURL: typing.Optional[str] = None + productLabel: typing.Optional[str] = None + serialNumber: typing.Optional[str] = None + localConfigDisabled: typing.Optional[bool] = None + reachable: typing.Optional[bool] = None + uniqueID: str = "" + capabilityMinima: BasicInformation.Structs.CapabilityMinimaStruct = field(default_factory=lambda: BasicInformation.Structs.CapabilityMinimaStruct()) + productAppearance: typing.Optional[BasicInformation.Structs.ProductAppearanceStruct] = None + specificationVersion: uint = 0 + maxPathsPerInvoke: uint = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ColorEnum(MatterIntEnum): @@ -3628,7 +3468,7 @@ class ColorEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 21, + kUnknownEnumValue = 21 class ProductFinishEnum(MatterIntEnum): kOther = 0x00 @@ -3641,7 +3481,7 @@ class ProductFinishEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 6, + kUnknownEnumValue = 6 class Structs: @dataclass @@ -3676,7 +3516,7 @@ class MfgSpecificPing(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000028 command_id: typing.ClassVar[int] = 0x10020000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3699,7 +3539,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class VendorName(ClusterAttributeDescriptor): @@ -3715,7 +3555,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=str) - value: 'str' = "" + value: str = "" @dataclass class VendorID(ClusterAttributeDescriptor): @@ -3731,7 +3571,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ProductName(ClusterAttributeDescriptor): @@ -3747,7 +3587,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=str) - value: 'str' = "" + value: str = "" @dataclass class ProductID(ClusterAttributeDescriptor): @@ -3763,7 +3603,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class NodeLabel(ClusterAttributeDescriptor): @@ -3779,7 +3619,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=str) - value: 'str' = "" + value: str = "" @dataclass class Location(ClusterAttributeDescriptor): @@ -3795,7 +3635,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=str) - value: 'str' = "" + value: str = "" @dataclass class HardwareVersion(ClusterAttributeDescriptor): @@ -3811,7 +3651,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class HardwareVersionString(ClusterAttributeDescriptor): @@ -3827,7 +3667,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=str) - value: 'str' = "" + value: str = "" @dataclass class SoftwareVersion(ClusterAttributeDescriptor): @@ -3843,7 +3683,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class SoftwareVersionString(ClusterAttributeDescriptor): @@ -3859,7 +3699,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=str) - value: 'str' = "" + value: str = "" @dataclass class ManufacturingDate(ClusterAttributeDescriptor): @@ -3875,7 +3715,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class PartNumber(ClusterAttributeDescriptor): @@ -3891,7 +3731,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class ProductURL(ClusterAttributeDescriptor): @@ -3907,7 +3747,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class ProductLabel(ClusterAttributeDescriptor): @@ -3923,7 +3763,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class SerialNumber(ClusterAttributeDescriptor): @@ -3939,7 +3779,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class LocalConfigDisabled(ClusterAttributeDescriptor): @@ -3955,7 +3795,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Optional[bool]' = None + value: typing.Optional[bool] = None @dataclass class Reachable(ClusterAttributeDescriptor): @@ -3971,7 +3811,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Optional[bool]' = None + value: typing.Optional[bool] = None @dataclass class UniqueID(ClusterAttributeDescriptor): @@ -3987,7 +3827,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=str) - value: 'str' = "" + value: str = "" @dataclass class CapabilityMinima(ClusterAttributeDescriptor): @@ -4003,7 +3843,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=BasicInformation.Structs.CapabilityMinimaStruct) - value: 'BasicInformation.Structs.CapabilityMinimaStruct' = field(default_factory=lambda: BasicInformation.Structs.CapabilityMinimaStruct()) + value: BasicInformation.Structs.CapabilityMinimaStruct = field(default_factory=lambda: BasicInformation.Structs.CapabilityMinimaStruct()) @dataclass class ProductAppearance(ClusterAttributeDescriptor): @@ -4019,7 +3859,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]) - value: 'typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]' = None + value: typing.Optional[BasicInformation.Structs.ProductAppearanceStruct] = None @dataclass class SpecificationVersion(ClusterAttributeDescriptor): @@ -4035,7 +3875,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class MaxPathsPerInvoke(ClusterAttributeDescriptor): @@ -4051,7 +3891,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -4067,7 +3907,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -4083,23 +3923,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000028 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -4115,7 +3939,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -4131,7 +3955,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -4147,7 +3971,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -4167,7 +3991,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=0, Type=uint), ]) - softwareVersion: 'uint' = 0 + softwareVersion: uint = 0 @dataclass class ShutDown(ClusterEvent): @@ -4202,7 +4026,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=0, Type=uint), ]) - fabricIndex: 'uint' = 0 + fabricIndex: uint = 0 @dataclass class ReachableChanged(ClusterEvent): @@ -4221,7 +4045,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="reachableNewValue", Tag=0, Type=bool), ]) - reachableNewValue: 'bool' = False + reachableNewValue: bool = False @dataclass @@ -4234,18 +4058,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ApplyUpdateActionEnum(MatterIntEnum): @@ -4256,7 +4078,7 @@ class ApplyUpdateActionEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class DownloadProtocolEnum(MatterIntEnum): kBDXSynchronous = 0x00 @@ -4267,7 +4089,7 @@ class DownloadProtocolEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class StatusEnum(MatterIntEnum): kUpdateAvailable = 0x00 @@ -4278,7 +4100,7 @@ class StatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class Commands: @dataclass @@ -4302,21 +4124,21 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="metadataForProvider", Tag=7, Type=typing.Optional[bytes]), ]) - vendorID: 'uint' = 0 - productID: 'uint' = 0 - softwareVersion: 'uint' = 0 - protocolsSupported: 'typing.List[OtaSoftwareUpdateProvider.Enums.DownloadProtocolEnum]' = field(default_factory=lambda: []) - hardwareVersion: 'typing.Optional[uint]' = None - location: 'typing.Optional[str]' = None - requestorCanConsent: 'typing.Optional[bool]' = None - metadataForProvider: 'typing.Optional[bytes]' = None + vendorID: uint = 0 + productID: uint = 0 + softwareVersion: uint = 0 + protocolsSupported: typing.List[OtaSoftwareUpdateProvider.Enums.DownloadProtocolEnum] = field(default_factory=lambda: []) + hardwareVersion: typing.Optional[uint] = None + location: typing.Optional[str] = None + requestorCanConsent: typing.Optional[bool] = None + metadataForProvider: typing.Optional[bytes] = None @dataclass class QueryImageResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000029 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -4332,14 +4154,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="metadataForRequestor", Tag=7, Type=typing.Optional[bytes]), ]) - status: 'OtaSoftwareUpdateProvider.Enums.StatusEnum' = 0 - delayedActionTime: 'typing.Optional[uint]' = None - imageURI: 'typing.Optional[str]' = None - softwareVersion: 'typing.Optional[uint]' = None - softwareVersionString: 'typing.Optional[str]' = None - updateToken: 'typing.Optional[bytes]' = None - userConsentNeeded: 'typing.Optional[bool]' = None - metadataForRequestor: 'typing.Optional[bytes]' = None + status: OtaSoftwareUpdateProvider.Enums.StatusEnum = 0 + delayedActionTime: typing.Optional[uint] = None + imageURI: typing.Optional[str] = None + softwareVersion: typing.Optional[uint] = None + softwareVersionString: typing.Optional[str] = None + updateToken: typing.Optional[bytes] = None + userConsentNeeded: typing.Optional[bool] = None + metadataForRequestor: typing.Optional[bytes] = None @dataclass class ApplyUpdateRequest(ClusterCommand): @@ -4356,15 +4178,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="newVersion", Tag=1, Type=uint), ]) - updateToken: 'bytes' = b"" - newVersion: 'uint' = 0 + updateToken: bytes = b"" + newVersion: uint = 0 @dataclass class ApplyUpdateResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000029 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -4374,15 +4196,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="delayedActionTime", Tag=1, Type=uint), ]) - action: 'OtaSoftwareUpdateProvider.Enums.ApplyUpdateActionEnum' = 0 - delayedActionTime: 'uint' = 0 + action: OtaSoftwareUpdateProvider.Enums.ApplyUpdateActionEnum = 0 + delayedActionTime: uint = 0 @dataclass class NotifyUpdateApplied(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000029 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -4392,8 +4214,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=1, Type=uint), ]) - updateToken: 'bytes' = b"" - softwareVersion: 'uint' = 0 + updateToken: bytes = b"" + softwareVersion: uint = 0 class Attributes: @dataclass @@ -4410,7 +4232,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -4426,23 +4248,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000029 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -4458,7 +4264,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -4474,7 +4280,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -4490,7 +4296,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -4507,22 +4313,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="updateStateProgress", Tag=0x00000003, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - defaultOTAProviders: 'typing.List[OtaSoftwareUpdateRequestor.Structs.ProviderLocation]' = None - updatePossible: 'bool' = None - updateState: 'OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum' = None - updateStateProgress: 'typing.Union[Nullable, uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + defaultOTAProviders: typing.List[OtaSoftwareUpdateRequestor.Structs.ProviderLocation] = field(default_factory=lambda: []) + updatePossible: bool = False + updateState: OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum = 0 + updateStateProgress: typing.Union[Nullable, uint] = NullValue + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class AnnouncementReasonEnum(MatterIntEnum): @@ -4533,7 +4337,7 @@ class AnnouncementReasonEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class ChangeReasonEnum(MatterIntEnum): kUnknown = 0x00 @@ -4545,7 +4349,7 @@ class ChangeReasonEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class UpdateStateEnum(MatterIntEnum): kUnknown = 0x00 @@ -4561,7 +4365,7 @@ class UpdateStateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 9, + kUnknownEnumValue = 9 class Structs: @dataclass @@ -4585,7 +4389,7 @@ class AnnounceOTAProvider(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000002A command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -4598,11 +4402,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="endpoint", Tag=4, Type=uint), ]) - providerNodeID: 'uint' = 0 - vendorID: 'uint' = 0 - announcementReason: 'OtaSoftwareUpdateRequestor.Enums.AnnouncementReasonEnum' = 0 - metadataForNode: 'typing.Optional[bytes]' = None - endpoint: 'uint' = 0 + providerNodeID: uint = 0 + vendorID: uint = 0 + announcementReason: OtaSoftwareUpdateRequestor.Enums.AnnouncementReasonEnum = 0 + metadataForNode: typing.Optional[bytes] = None + endpoint: uint = 0 class Attributes: @dataclass @@ -4619,7 +4423,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[OtaSoftwareUpdateRequestor.Structs.ProviderLocation]) - value: 'typing.List[OtaSoftwareUpdateRequestor.Structs.ProviderLocation]' = field(default_factory=lambda: []) + value: typing.List[OtaSoftwareUpdateRequestor.Structs.ProviderLocation] = field(default_factory=lambda: []) @dataclass class UpdatePossible(ClusterAttributeDescriptor): @@ -4635,7 +4439,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class UpdateState(ClusterAttributeDescriptor): @@ -4651,7 +4455,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum) - value: 'OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum' = 0 + value: OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum = 0 @dataclass class UpdateStateProgress(ClusterAttributeDescriptor): @@ -4667,7 +4471,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -4683,7 +4487,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -4699,23 +4503,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002A - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -4731,7 +4519,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -4747,7 +4535,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -4763,7 +4551,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -4786,10 +4574,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="targetSoftwareVersion", Tag=3, Type=typing.Union[Nullable, uint]), ]) - previousState: 'OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum' = 0 - newState: 'OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum' = 0 - reason: 'OtaSoftwareUpdateRequestor.Enums.ChangeReasonEnum' = 0 - targetSoftwareVersion: 'typing.Union[Nullable, uint]' = NullValue + previousState: OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum = 0 + newState: OtaSoftwareUpdateRequestor.Enums.UpdateStateEnum = 0 + reason: OtaSoftwareUpdateRequestor.Enums.ChangeReasonEnum = 0 + targetSoftwareVersion: typing.Union[Nullable, uint] = NullValue @dataclass class VersionApplied(ClusterEvent): @@ -4809,8 +4597,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="productID", Tag=1, Type=uint), ]) - softwareVersion: 'uint' = 0 - productID: 'uint' = 0 + softwareVersion: uint = 0 + productID: uint = 0 @dataclass class DownloadError(ClusterEvent): @@ -4832,10 +4620,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="platformCode", Tag=3, Type=typing.Union[Nullable, int]), ]) - softwareVersion: 'uint' = 0 - bytesDownloaded: 'uint' = 0 - progressPercent: 'typing.Union[Nullable, uint]' = NullValue - platformCode: 'typing.Union[Nullable, int]' = NullValue + softwareVersion: uint = 0 + bytesDownloaded: uint = 0 + progressPercent: typing.Union[Nullable, uint] = NullValue + platformCode: typing.Union[Nullable, int] = NullValue @dataclass @@ -4850,20 +4638,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="supportedLocales", Tag=0x00000001, Type=typing.List[str]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - activeLocale: 'str' = None - supportedLocales: 'typing.List[str]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + activeLocale: str = "" + supportedLocales: typing.List[str] = field(default_factory=lambda: []) + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Attributes: @dataclass @@ -4880,7 +4666,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=str) - value: 'str' = "" + value: str = "" @dataclass class SupportedLocales(ClusterAttributeDescriptor): @@ -4896,7 +4682,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[str]) - value: 'typing.List[str]' = field(default_factory=lambda: []) + value: typing.List[str] = field(default_factory=lambda: []) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -4912,7 +4698,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -4928,23 +4714,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002B - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -4960,7 +4730,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -4976,7 +4746,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -4992,7 +4762,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -5008,21 +4778,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="supportedCalendarTypes", Tag=0x00000002, Type=typing.Optional[typing.List[TimeFormatLocalization.Enums.CalendarTypeEnum]]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - hourFormat: 'TimeFormatLocalization.Enums.HourFormatEnum' = None - activeCalendarType: 'typing.Optional[TimeFormatLocalization.Enums.CalendarTypeEnum]' = None - supportedCalendarTypes: 'typing.Optional[typing.List[TimeFormatLocalization.Enums.CalendarTypeEnum]]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + hourFormat: TimeFormatLocalization.Enums.HourFormatEnum = 0 + activeCalendarType: typing.Optional[TimeFormatLocalization.Enums.CalendarTypeEnum] = None + supportedCalendarTypes: typing.Optional[typing.List[TimeFormatLocalization.Enums.CalendarTypeEnum]] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class CalendarTypeEnum(MatterIntEnum): @@ -5043,7 +4811,7 @@ class CalendarTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 12, + kUnknownEnumValue = 12 class HourFormatEnum(MatterIntEnum): k12hr = 0x00 @@ -5053,7 +4821,7 @@ class HourFormatEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class Bitmaps: class Feature(IntFlag): @@ -5074,7 +4842,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=TimeFormatLocalization.Enums.HourFormatEnum) - value: 'TimeFormatLocalization.Enums.HourFormatEnum' = 0 + value: TimeFormatLocalization.Enums.HourFormatEnum = 0 @dataclass class ActiveCalendarType(ClusterAttributeDescriptor): @@ -5090,7 +4858,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[TimeFormatLocalization.Enums.CalendarTypeEnum]) - value: 'typing.Optional[TimeFormatLocalization.Enums.CalendarTypeEnum]' = None + value: typing.Optional[TimeFormatLocalization.Enums.CalendarTypeEnum] = None @dataclass class SupportedCalendarTypes(ClusterAttributeDescriptor): @@ -5106,7 +4874,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[TimeFormatLocalization.Enums.CalendarTypeEnum]]) - value: 'typing.Optional[typing.List[TimeFormatLocalization.Enums.CalendarTypeEnum]]' = None + value: typing.Optional[typing.List[TimeFormatLocalization.Enums.CalendarTypeEnum]] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -5122,7 +4890,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -5138,23 +4906,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002C - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -5170,7 +4922,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -5186,7 +4938,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -5202,7 +4954,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -5216,19 +4968,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="temperatureUnit", Tag=0x00000000, Type=typing.Optional[UnitLocalization.Enums.TempUnitEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - temperatureUnit: 'typing.Optional[UnitLocalization.Enums.TempUnitEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + temperatureUnit: typing.Optional[UnitLocalization.Enums.TempUnitEnum] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class TempUnitEnum(MatterIntEnum): @@ -5239,7 +4989,7 @@ class TempUnitEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class Bitmaps: class Feature(IntFlag): @@ -5260,7 +5010,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[UnitLocalization.Enums.TempUnitEnum]) - value: 'typing.Optional[UnitLocalization.Enums.TempUnitEnum]' = None + value: typing.Optional[UnitLocalization.Enums.TempUnitEnum] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -5276,7 +5026,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -5292,23 +5042,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002D - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -5324,7 +5058,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -5340,7 +5074,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -5356,7 +5090,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -5370,19 +5104,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="sources", Tag=0x00000000, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - sources: 'typing.List[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + sources: typing.List[uint] = field(default_factory=lambda: []) + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Attributes: @dataclass @@ -5399,7 +5131,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -5415,7 +5147,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -5431,23 +5163,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -5463,7 +5179,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -5479,7 +5195,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -5495,7 +5211,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -5540,50 +5256,48 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="endpointList", Tag=0x0000001F, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - status: 'PowerSource.Enums.PowerSourceStatusEnum' = None - order: 'uint' = None - description: 'str' = None - wiredAssessedInputVoltage: 'typing.Union[None, Nullable, uint]' = None - wiredAssessedInputFrequency: 'typing.Union[None, Nullable, uint]' = None - wiredCurrentType: 'typing.Optional[PowerSource.Enums.WiredCurrentTypeEnum]' = None - wiredAssessedCurrent: 'typing.Union[None, Nullable, uint]' = None - wiredNominalVoltage: 'typing.Optional[uint]' = None - wiredMaximumCurrent: 'typing.Optional[uint]' = None - wiredPresent: 'typing.Optional[bool]' = None - activeWiredFaults: 'typing.Optional[typing.List[PowerSource.Enums.WiredFaultEnum]]' = None - batVoltage: 'typing.Union[None, Nullable, uint]' = None - batPercentRemaining: 'typing.Union[None, Nullable, uint]' = None - batTimeRemaining: 'typing.Union[None, Nullable, uint]' = None - batChargeLevel: 'typing.Optional[PowerSource.Enums.BatChargeLevelEnum]' = None - batReplacementNeeded: 'typing.Optional[bool]' = None - batReplaceability: 'typing.Optional[PowerSource.Enums.BatReplaceabilityEnum]' = None - batPresent: 'typing.Optional[bool]' = None - activeBatFaults: 'typing.Optional[typing.List[PowerSource.Enums.BatFaultEnum]]' = None - batReplacementDescription: 'typing.Optional[str]' = None - batCommonDesignation: 'typing.Optional[PowerSource.Enums.BatCommonDesignationEnum]' = None - batANSIDesignation: 'typing.Optional[str]' = None - batIECDesignation: 'typing.Optional[str]' = None - batApprovedChemistry: 'typing.Optional[PowerSource.Enums.BatApprovedChemistryEnum]' = None - batCapacity: 'typing.Optional[uint]' = None - batQuantity: 'typing.Optional[uint]' = None - batChargeState: 'typing.Optional[PowerSource.Enums.BatChargeStateEnum]' = None - batTimeToFullCharge: 'typing.Union[None, Nullable, uint]' = None - batFunctionalWhileCharging: 'typing.Optional[bool]' = None - batChargingCurrent: 'typing.Union[None, Nullable, uint]' = None - activeBatChargeFaults: 'typing.Optional[typing.List[PowerSource.Enums.BatChargeFaultEnum]]' = None - endpointList: 'typing.List[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + status: PowerSource.Enums.PowerSourceStatusEnum = 0 + order: uint = 0 + description: str = "" + wiredAssessedInputVoltage: typing.Union[None, Nullable, uint] = None + wiredAssessedInputFrequency: typing.Union[None, Nullable, uint] = None + wiredCurrentType: typing.Optional[PowerSource.Enums.WiredCurrentTypeEnum] = None + wiredAssessedCurrent: typing.Union[None, Nullable, uint] = None + wiredNominalVoltage: typing.Optional[uint] = None + wiredMaximumCurrent: typing.Optional[uint] = None + wiredPresent: typing.Optional[bool] = None + activeWiredFaults: typing.Optional[typing.List[PowerSource.Enums.WiredFaultEnum]] = None + batVoltage: typing.Union[None, Nullable, uint] = None + batPercentRemaining: typing.Union[None, Nullable, uint] = None + batTimeRemaining: typing.Union[None, Nullable, uint] = None + batChargeLevel: typing.Optional[PowerSource.Enums.BatChargeLevelEnum] = None + batReplacementNeeded: typing.Optional[bool] = None + batReplaceability: typing.Optional[PowerSource.Enums.BatReplaceabilityEnum] = None + batPresent: typing.Optional[bool] = None + activeBatFaults: typing.Optional[typing.List[PowerSource.Enums.BatFaultEnum]] = None + batReplacementDescription: typing.Optional[str] = None + batCommonDesignation: typing.Optional[PowerSource.Enums.BatCommonDesignationEnum] = None + batANSIDesignation: typing.Optional[str] = None + batIECDesignation: typing.Optional[str] = None + batApprovedChemistry: typing.Optional[PowerSource.Enums.BatApprovedChemistryEnum] = None + batCapacity: typing.Optional[uint] = None + batQuantity: typing.Optional[uint] = None + batChargeState: typing.Optional[PowerSource.Enums.BatChargeStateEnum] = None + batTimeToFullCharge: typing.Union[None, Nullable, uint] = None + batFunctionalWhileCharging: typing.Optional[bool] = None + batChargingCurrent: typing.Union[None, Nullable, uint] = None + activeBatChargeFaults: typing.Optional[typing.List[PowerSource.Enums.BatChargeFaultEnum]] = None + endpointList: typing.List[uint] = field(default_factory=lambda: []) + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class BatApprovedChemistryEnum(MatterIntEnum): @@ -5624,7 +5338,7 @@ class BatApprovedChemistryEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 33, + kUnknownEnumValue = 33 class BatChargeFaultEnum(MatterIntEnum): kUnspecified = 0x00 @@ -5642,7 +5356,7 @@ class BatChargeFaultEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 11, + kUnknownEnumValue = 11 class BatChargeLevelEnum(MatterIntEnum): kOk = 0x00 @@ -5652,7 +5366,7 @@ class BatChargeLevelEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class BatChargeStateEnum(MatterIntEnum): kUnknown = 0x00 @@ -5663,7 +5377,7 @@ class BatChargeStateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class BatCommonDesignationEnum(MatterIntEnum): kUnspecified = 0x00 @@ -5751,7 +5465,7 @@ class BatCommonDesignationEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 81, + kUnknownEnumValue = 81 class BatFaultEnum(MatterIntEnum): kUnspecified = 0x00 @@ -5761,7 +5475,7 @@ class BatFaultEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class BatReplaceabilityEnum(MatterIntEnum): kUnspecified = 0x00 @@ -5772,7 +5486,7 @@ class BatReplaceabilityEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class PowerSourceStatusEnum(MatterIntEnum): kUnspecified = 0x00 @@ -5783,7 +5497,7 @@ class PowerSourceStatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class WiredCurrentTypeEnum(MatterIntEnum): kAc = 0x00 @@ -5792,7 +5506,7 @@ class WiredCurrentTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class WiredFaultEnum(MatterIntEnum): kUnspecified = 0x00 @@ -5802,7 +5516,7 @@ class WiredFaultEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class Bitmaps: class Feature(IntFlag): @@ -5866,7 +5580,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=PowerSource.Enums.PowerSourceStatusEnum) - value: 'PowerSource.Enums.PowerSourceStatusEnum' = 0 + value: PowerSource.Enums.PowerSourceStatusEnum = 0 @dataclass class Order(ClusterAttributeDescriptor): @@ -5882,7 +5596,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Description(ClusterAttributeDescriptor): @@ -5898,7 +5612,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=str) - value: 'str' = "" + value: str = "" @dataclass class WiredAssessedInputVoltage(ClusterAttributeDescriptor): @@ -5914,7 +5628,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class WiredAssessedInputFrequency(ClusterAttributeDescriptor): @@ -5930,7 +5644,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class WiredCurrentType(ClusterAttributeDescriptor): @@ -5946,7 +5660,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.WiredCurrentTypeEnum]) - value: 'typing.Optional[PowerSource.Enums.WiredCurrentTypeEnum]' = None + value: typing.Optional[PowerSource.Enums.WiredCurrentTypeEnum] = None @dataclass class WiredAssessedCurrent(ClusterAttributeDescriptor): @@ -5962,7 +5676,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class WiredNominalVoltage(ClusterAttributeDescriptor): @@ -5978,7 +5692,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class WiredMaximumCurrent(ClusterAttributeDescriptor): @@ -5994,7 +5708,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class WiredPresent(ClusterAttributeDescriptor): @@ -6010,7 +5724,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Optional[bool]' = None + value: typing.Optional[bool] = None @dataclass class ActiveWiredFaults(ClusterAttributeDescriptor): @@ -6026,7 +5740,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[PowerSource.Enums.WiredFaultEnum]]) - value: 'typing.Optional[typing.List[PowerSource.Enums.WiredFaultEnum]]' = None + value: typing.Optional[typing.List[PowerSource.Enums.WiredFaultEnum]] = None @dataclass class BatVoltage(ClusterAttributeDescriptor): @@ -6042,7 +5756,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class BatPercentRemaining(ClusterAttributeDescriptor): @@ -6058,7 +5772,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class BatTimeRemaining(ClusterAttributeDescriptor): @@ -6074,7 +5788,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class BatChargeLevel(ClusterAttributeDescriptor): @@ -6090,7 +5804,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatChargeLevelEnum]) - value: 'typing.Optional[PowerSource.Enums.BatChargeLevelEnum]' = None + value: typing.Optional[PowerSource.Enums.BatChargeLevelEnum] = None @dataclass class BatReplacementNeeded(ClusterAttributeDescriptor): @@ -6106,7 +5820,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Optional[bool]' = None + value: typing.Optional[bool] = None @dataclass class BatReplaceability(ClusterAttributeDescriptor): @@ -6122,7 +5836,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatReplaceabilityEnum]) - value: 'typing.Optional[PowerSource.Enums.BatReplaceabilityEnum]' = None + value: typing.Optional[PowerSource.Enums.BatReplaceabilityEnum] = None @dataclass class BatPresent(ClusterAttributeDescriptor): @@ -6138,7 +5852,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Optional[bool]' = None + value: typing.Optional[bool] = None @dataclass class ActiveBatFaults(ClusterAttributeDescriptor): @@ -6154,7 +5868,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[PowerSource.Enums.BatFaultEnum]]) - value: 'typing.Optional[typing.List[PowerSource.Enums.BatFaultEnum]]' = None + value: typing.Optional[typing.List[PowerSource.Enums.BatFaultEnum]] = None @dataclass class BatReplacementDescription(ClusterAttributeDescriptor): @@ -6170,7 +5884,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class BatCommonDesignation(ClusterAttributeDescriptor): @@ -6186,7 +5900,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatCommonDesignationEnum]) - value: 'typing.Optional[PowerSource.Enums.BatCommonDesignationEnum]' = None + value: typing.Optional[PowerSource.Enums.BatCommonDesignationEnum] = None @dataclass class BatANSIDesignation(ClusterAttributeDescriptor): @@ -6202,7 +5916,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class BatIECDesignation(ClusterAttributeDescriptor): @@ -6218,7 +5932,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class BatApprovedChemistry(ClusterAttributeDescriptor): @@ -6234,7 +5948,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatApprovedChemistryEnum]) - value: 'typing.Optional[PowerSource.Enums.BatApprovedChemistryEnum]' = None + value: typing.Optional[PowerSource.Enums.BatApprovedChemistryEnum] = None @dataclass class BatCapacity(ClusterAttributeDescriptor): @@ -6250,7 +5964,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class BatQuantity(ClusterAttributeDescriptor): @@ -6266,7 +5980,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class BatChargeState(ClusterAttributeDescriptor): @@ -6282,7 +5996,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[PowerSource.Enums.BatChargeStateEnum]) - value: 'typing.Optional[PowerSource.Enums.BatChargeStateEnum]' = None + value: typing.Optional[PowerSource.Enums.BatChargeStateEnum] = None @dataclass class BatTimeToFullCharge(ClusterAttributeDescriptor): @@ -6298,7 +6012,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class BatFunctionalWhileCharging(ClusterAttributeDescriptor): @@ -6314,7 +6028,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Optional[bool]' = None + value: typing.Optional[bool] = None @dataclass class BatChargingCurrent(ClusterAttributeDescriptor): @@ -6330,7 +6044,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class ActiveBatChargeFaults(ClusterAttributeDescriptor): @@ -6346,7 +6060,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[PowerSource.Enums.BatChargeFaultEnum]]) - value: 'typing.Optional[typing.List[PowerSource.Enums.BatChargeFaultEnum]]' = None + value: typing.Optional[typing.List[PowerSource.Enums.BatChargeFaultEnum]] = None @dataclass class EndpointList(ClusterAttributeDescriptor): @@ -6362,7 +6076,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -6378,7 +6092,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -6394,23 +6108,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000002F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -6426,7 +6124,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -6442,7 +6140,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -6458,7 +6156,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -6479,8 +6177,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.WiredFaultEnum]), ]) - current: 'typing.List[PowerSource.Enums.WiredFaultEnum]' = field(default_factory=lambda: []) - previous: 'typing.List[PowerSource.Enums.WiredFaultEnum]' = field(default_factory=lambda: []) + current: typing.List[PowerSource.Enums.WiredFaultEnum] = field(default_factory=lambda: []) + previous: typing.List[PowerSource.Enums.WiredFaultEnum] = field(default_factory=lambda: []) @dataclass class BatFaultChange(ClusterEvent): @@ -6500,8 +6198,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.BatFaultEnum]), ]) - current: 'typing.List[PowerSource.Enums.BatFaultEnum]' = field(default_factory=lambda: []) - previous: 'typing.List[PowerSource.Enums.BatFaultEnum]' = field(default_factory=lambda: []) + current: typing.List[PowerSource.Enums.BatFaultEnum] = field(default_factory=lambda: []) + previous: typing.List[PowerSource.Enums.BatFaultEnum] = field(default_factory=lambda: []) @dataclass class BatChargeFaultChange(ClusterEvent): @@ -6521,8 +6219,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[PowerSource.Enums.BatChargeFaultEnum]), ]) - current: 'typing.List[PowerSource.Enums.BatChargeFaultEnum]' = field(default_factory=lambda: []) - previous: 'typing.List[PowerSource.Enums.BatChargeFaultEnum]' = field(default_factory=lambda: []) + current: typing.List[PowerSource.Enums.BatChargeFaultEnum] = field(default_factory=lambda: []) + previous: typing.List[PowerSource.Enums.BatChargeFaultEnum] = field(default_factory=lambda: []) @dataclass @@ -6542,29 +6240,29 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="TCMinRequiredVersion", Tag=0x00000006, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="TCAcknowledgements", Tag=0x00000007, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="TCAcknowledgementsRequired", Tag=0x00000008, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="TCUpdateDeadline", Tag=0x00000009, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - breadcrumb: 'uint' = None - basicCommissioningInfo: 'GeneralCommissioning.Structs.BasicCommissioningInfo' = None - regulatoryConfig: 'GeneralCommissioning.Enums.RegulatoryLocationTypeEnum' = None - locationCapability: 'GeneralCommissioning.Enums.RegulatoryLocationTypeEnum' = None - supportsConcurrentConnection: 'bool' = None - TCAcceptedVersion: 'typing.Optional[uint]' = None - TCMinRequiredVersion: 'typing.Optional[uint]' = None - TCAcknowledgements: 'typing.Optional[uint]' = None - TCAcknowledgementsRequired: 'typing.Optional[bool]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + breadcrumb: uint = 0 + basicCommissioningInfo: GeneralCommissioning.Structs.BasicCommissioningInfo = field(default_factory=lambda: GeneralCommissioning.Structs.BasicCommissioningInfo()) + regulatoryConfig: GeneralCommissioning.Enums.RegulatoryLocationTypeEnum = 0 + locationCapability: GeneralCommissioning.Enums.RegulatoryLocationTypeEnum = 0 + supportsConcurrentConnection: bool = False + TCAcceptedVersion: typing.Optional[uint] = None + TCMinRequiredVersion: typing.Optional[uint] = None + TCAcknowledgements: typing.Optional[uint] = None + TCAcknowledgementsRequired: typing.Optional[bool] = None + TCUpdateDeadline: typing.Optional[uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class CommissioningErrorEnum(MatterIntEnum): @@ -6580,7 +6278,7 @@ class CommissioningErrorEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 8, + kUnknownEnumValue = 8 class RegulatoryLocationTypeEnum(MatterIntEnum): kIndoor = 0x00 @@ -6590,7 +6288,7 @@ class RegulatoryLocationTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class Bitmaps: class Feature(IntFlag): @@ -6626,15 +6324,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="breadcrumb", Tag=1, Type=uint), ]) - expiryLengthSeconds: 'uint' = 0 - breadcrumb: 'uint' = 0 + expiryLengthSeconds: uint = 0 + breadcrumb: uint = 0 @dataclass class ArmFailSafeResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000030 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6644,8 +6342,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="debugText", Tag=1, Type=str), ]) - errorCode: 'GeneralCommissioning.Enums.CommissioningErrorEnum' = 0 - debugText: 'str' = "" + errorCode: GeneralCommissioning.Enums.CommissioningErrorEnum = 0 + debugText: str = "" @dataclass class SetRegulatoryConfig(ClusterCommand): @@ -6663,16 +6361,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="breadcrumb", Tag=2, Type=uint), ]) - newRegulatoryConfig: 'GeneralCommissioning.Enums.RegulatoryLocationTypeEnum' = 0 - countryCode: 'str' = "" - breadcrumb: 'uint' = 0 + newRegulatoryConfig: GeneralCommissioning.Enums.RegulatoryLocationTypeEnum = 0 + countryCode: str = "" + breadcrumb: uint = 0 @dataclass class SetRegulatoryConfigResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000030 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6682,8 +6380,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="debugText", Tag=1, Type=str), ]) - errorCode: 'GeneralCommissioning.Enums.CommissioningErrorEnum' = 0 - debugText: 'str' = "" + errorCode: GeneralCommissioning.Enums.CommissioningErrorEnum = 0 + debugText: str = "" @dataclass class CommissioningComplete(ClusterCommand): @@ -6703,7 +6401,7 @@ class CommissioningCompleteResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000030 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6713,8 +6411,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="debugText", Tag=1, Type=str), ]) - errorCode: 'GeneralCommissioning.Enums.CommissioningErrorEnum' = 0 - debugText: 'str' = "" + errorCode: GeneralCommissioning.Enums.CommissioningErrorEnum = 0 + debugText: str = "" @dataclass class SetTCAcknowledgements(ClusterCommand): @@ -6731,15 +6429,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="TCUserResponse", Tag=1, Type=uint), ]) - TCVersion: 'uint' = 0 - TCUserResponse: 'uint' = 0 + TCVersion: uint = 0 + TCUserResponse: uint = 0 @dataclass class SetTCAcknowledgementsResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000030 command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -6748,7 +6446,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="errorCode", Tag=0, Type=GeneralCommissioning.Enums.CommissioningErrorEnum), ]) - errorCode: 'GeneralCommissioning.Enums.CommissioningErrorEnum' = 0 + errorCode: GeneralCommissioning.Enums.CommissioningErrorEnum = 0 class Attributes: @dataclass @@ -6765,7 +6463,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class BasicCommissioningInfo(ClusterAttributeDescriptor): @@ -6781,7 +6479,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=GeneralCommissioning.Structs.BasicCommissioningInfo) - value: 'GeneralCommissioning.Structs.BasicCommissioningInfo' = field(default_factory=lambda: GeneralCommissioning.Structs.BasicCommissioningInfo()) + value: GeneralCommissioning.Structs.BasicCommissioningInfo = field(default_factory=lambda: GeneralCommissioning.Structs.BasicCommissioningInfo()) @dataclass class RegulatoryConfig(ClusterAttributeDescriptor): @@ -6797,7 +6495,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=GeneralCommissioning.Enums.RegulatoryLocationTypeEnum) - value: 'GeneralCommissioning.Enums.RegulatoryLocationTypeEnum' = 0 + value: GeneralCommissioning.Enums.RegulatoryLocationTypeEnum = 0 @dataclass class LocationCapability(ClusterAttributeDescriptor): @@ -6813,7 +6511,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=GeneralCommissioning.Enums.RegulatoryLocationTypeEnum) - value: 'GeneralCommissioning.Enums.RegulatoryLocationTypeEnum' = 0 + value: GeneralCommissioning.Enums.RegulatoryLocationTypeEnum = 0 @dataclass class SupportsConcurrentConnection(ClusterAttributeDescriptor): @@ -6829,7 +6527,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class TCAcceptedVersion(ClusterAttributeDescriptor): @@ -6845,7 +6543,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TCMinRequiredVersion(ClusterAttributeDescriptor): @@ -6861,7 +6559,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TCAcknowledgements(ClusterAttributeDescriptor): @@ -6877,7 +6575,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TCAcknowledgementsRequired(ClusterAttributeDescriptor): @@ -6893,55 +6591,55 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Optional[bool]' = None + value: typing.Optional[bool] = None @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): + class TCUpdateDeadline(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000030 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFF8 + return 0x00000009 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.Optional[uint] = None @dataclass - class AcceptedCommandList(ClusterAttributeDescriptor): + class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000030 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFF9 + return 0x0000FFF8 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass - class EventList(ClusterAttributeDescriptor): + class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000030 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFA + return 0x0000FFF9 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -6957,7 +6655,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -6973,7 +6671,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -6989,7 +6687,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -7013,29 +6711,27 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="threadVersion", Tag=0x0000000A, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - maxNetworks: 'uint' = None - networks: 'typing.List[NetworkCommissioning.Structs.NetworkInfoStruct]' = None - scanMaxTimeSeconds: 'typing.Optional[uint]' = None - connectMaxTimeSeconds: 'typing.Optional[uint]' = None - interfaceEnabled: 'bool' = None - lastNetworkingStatus: 'typing.Union[Nullable, NetworkCommissioning.Enums.NetworkCommissioningStatusEnum]' = None - lastNetworkID: 'typing.Union[Nullable, bytes]' = None - lastConnectErrorValue: 'typing.Union[Nullable, int]' = None - supportedWiFiBands: 'typing.Optional[typing.List[NetworkCommissioning.Enums.WiFiBandEnum]]' = None - supportedThreadFeatures: 'typing.Optional[uint]' = None - threadVersion: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + maxNetworks: uint = 0 + networks: typing.List[NetworkCommissioning.Structs.NetworkInfoStruct] = field(default_factory=lambda: []) + scanMaxTimeSeconds: typing.Optional[uint] = None + connectMaxTimeSeconds: typing.Optional[uint] = None + interfaceEnabled: bool = False + lastNetworkingStatus: typing.Union[Nullable, NetworkCommissioning.Enums.NetworkCommissioningStatusEnum] = NullValue + lastNetworkID: typing.Union[Nullable, bytes] = NullValue + lastConnectErrorValue: typing.Union[Nullable, int] = NullValue + supportedWiFiBands: typing.Optional[typing.List[NetworkCommissioning.Enums.WiFiBandEnum]] = None + supportedThreadFeatures: typing.Optional[uint] = None + threadVersion: typing.Optional[uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class NetworkCommissioningStatusEnum(MatterIntEnum): @@ -7056,7 +6752,7 @@ class NetworkCommissioningStatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 13, + kUnknownEnumValue = 13 class WiFiBandEnum(MatterIntEnum): k2g4 = 0x00 @@ -7069,7 +6765,7 @@ class WiFiBandEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 6, + kUnknownEnumValue = 6 class Bitmaps: class Feature(IntFlag): @@ -7173,15 +6869,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="breadcrumb", Tag=1, Type=typing.Optional[uint]), ]) - ssid: 'typing.Union[None, Nullable, bytes]' = None - breadcrumb: 'typing.Optional[uint]' = None + ssid: typing.Union[None, Nullable, bytes] = None + breadcrumb: typing.Optional[uint] = None @dataclass class ScanNetworksResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000031 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -7193,10 +6889,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="threadScanResults", Tag=3, Type=typing.Optional[typing.List[NetworkCommissioning.Structs.ThreadInterfaceScanResultStruct]]), ]) - networkingStatus: 'NetworkCommissioning.Enums.NetworkCommissioningStatusEnum' = 0 - debugText: 'typing.Optional[str]' = None - wiFiScanResults: 'typing.Optional[typing.List[NetworkCommissioning.Structs.WiFiInterfaceScanResultStruct]]' = None - threadScanResults: 'typing.Optional[typing.List[NetworkCommissioning.Structs.ThreadInterfaceScanResultStruct]]' = None + networkingStatus: NetworkCommissioning.Enums.NetworkCommissioningStatusEnum = 0 + debugText: typing.Optional[str] = None + wiFiScanResults: typing.Optional[typing.List[NetworkCommissioning.Structs.WiFiInterfaceScanResultStruct]] = None + threadScanResults: typing.Optional[typing.List[NetworkCommissioning.Structs.ThreadInterfaceScanResultStruct]] = None @dataclass class AddOrUpdateWiFiNetwork(ClusterCommand): @@ -7217,12 +6913,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="possessionNonce", Tag=5, Type=typing.Optional[bytes]), ]) - ssid: 'bytes' = b"" - credentials: 'bytes' = b"" - breadcrumb: 'typing.Optional[uint]' = None - networkIdentity: 'typing.Optional[bytes]' = None - clientIdentifier: 'typing.Optional[bytes]' = None - possessionNonce: 'typing.Optional[bytes]' = None + ssid: bytes = b"" + credentials: bytes = b"" + breadcrumb: typing.Optional[uint] = None + networkIdentity: typing.Optional[bytes] = None + clientIdentifier: typing.Optional[bytes] = None + possessionNonce: typing.Optional[bytes] = None @dataclass class AddOrUpdateThreadNetwork(ClusterCommand): @@ -7239,8 +6935,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="breadcrumb", Tag=1, Type=typing.Optional[uint]), ]) - operationalDataset: 'bytes' = b"" - breadcrumb: 'typing.Optional[uint]' = None + operationalDataset: bytes = b"" + breadcrumb: typing.Optional[uint] = None @dataclass class RemoveNetwork(ClusterCommand): @@ -7257,15 +6953,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="breadcrumb", Tag=1, Type=typing.Optional[uint]), ]) - networkID: 'bytes' = b"" - breadcrumb: 'typing.Optional[uint]' = None + networkID: bytes = b"" + breadcrumb: typing.Optional[uint] = None @dataclass class NetworkConfigResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000031 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -7278,11 +6974,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="possessionSignature", Tag=4, Type=typing.Optional[bytes]), ]) - networkingStatus: 'NetworkCommissioning.Enums.NetworkCommissioningStatusEnum' = 0 - debugText: 'typing.Optional[str]' = None - networkIndex: 'typing.Optional[uint]' = None - clientIdentity: 'typing.Optional[bytes]' = None - possessionSignature: 'typing.Optional[bytes]' = None + networkingStatus: NetworkCommissioning.Enums.NetworkCommissioningStatusEnum = 0 + debugText: typing.Optional[str] = None + networkIndex: typing.Optional[uint] = None + clientIdentity: typing.Optional[bytes] = None + possessionSignature: typing.Optional[bytes] = None @dataclass class ConnectNetwork(ClusterCommand): @@ -7299,15 +6995,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="breadcrumb", Tag=1, Type=typing.Optional[uint]), ]) - networkID: 'bytes' = b"" - breadcrumb: 'typing.Optional[uint]' = None + networkID: bytes = b"" + breadcrumb: typing.Optional[uint] = None @dataclass class ConnectNetworkResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000031 command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -7318,9 +7014,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="errorValue", Tag=2, Type=typing.Union[Nullable, int]), ]) - networkingStatus: 'NetworkCommissioning.Enums.NetworkCommissioningStatusEnum' = 0 - debugText: 'typing.Optional[str]' = None - errorValue: 'typing.Union[Nullable, int]' = NullValue + networkingStatus: NetworkCommissioning.Enums.NetworkCommissioningStatusEnum = 0 + debugText: typing.Optional[str] = None + errorValue: typing.Union[Nullable, int] = NullValue @dataclass class ReorderNetwork(ClusterCommand): @@ -7338,9 +7034,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="breadcrumb", Tag=2, Type=typing.Optional[uint]), ]) - networkID: 'bytes' = b"" - networkIndex: 'uint' = 0 - breadcrumb: 'typing.Optional[uint]' = None + networkID: bytes = b"" + networkIndex: uint = 0 + breadcrumb: typing.Optional[uint] = None @dataclass class QueryIdentity(ClusterCommand): @@ -7357,15 +7053,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="possessionNonce", Tag=1, Type=typing.Optional[bytes]), ]) - keyIdentifier: 'bytes' = b"" - possessionNonce: 'typing.Optional[bytes]' = None + keyIdentifier: bytes = b"" + possessionNonce: typing.Optional[bytes] = None @dataclass class QueryIdentityResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000031 command_id: typing.ClassVar[int] = 0x0000000A is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -7375,8 +7071,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="possessionSignature", Tag=1, Type=typing.Optional[bytes]), ]) - identity: 'bytes' = b"" - possessionSignature: 'typing.Optional[bytes]' = None + identity: bytes = b"" + possessionSignature: typing.Optional[bytes] = None class Attributes: @dataclass @@ -7393,7 +7089,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Networks(ClusterAttributeDescriptor): @@ -7409,7 +7105,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[NetworkCommissioning.Structs.NetworkInfoStruct]) - value: 'typing.List[NetworkCommissioning.Structs.NetworkInfoStruct]' = field(default_factory=lambda: []) + value: typing.List[NetworkCommissioning.Structs.NetworkInfoStruct] = field(default_factory=lambda: []) @dataclass class ScanMaxTimeSeconds(ClusterAttributeDescriptor): @@ -7425,7 +7121,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ConnectMaxTimeSeconds(ClusterAttributeDescriptor): @@ -7441,7 +7137,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class InterfaceEnabled(ClusterAttributeDescriptor): @@ -7457,7 +7153,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class LastNetworkingStatus(ClusterAttributeDescriptor): @@ -7473,7 +7169,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, NetworkCommissioning.Enums.NetworkCommissioningStatusEnum]) - value: 'typing.Union[Nullable, NetworkCommissioning.Enums.NetworkCommissioningStatusEnum]' = NullValue + value: typing.Union[Nullable, NetworkCommissioning.Enums.NetworkCommissioningStatusEnum] = NullValue @dataclass class LastNetworkID(ClusterAttributeDescriptor): @@ -7489,7 +7185,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, bytes]) - value: 'typing.Union[Nullable, bytes]' = NullValue + value: typing.Union[Nullable, bytes] = NullValue @dataclass class LastConnectErrorValue(ClusterAttributeDescriptor): @@ -7505,7 +7201,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class SupportedWiFiBands(ClusterAttributeDescriptor): @@ -7521,7 +7217,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[NetworkCommissioning.Enums.WiFiBandEnum]]) - value: 'typing.Optional[typing.List[NetworkCommissioning.Enums.WiFiBandEnum]]' = None + value: typing.Optional[typing.List[NetworkCommissioning.Enums.WiFiBandEnum]] = None @dataclass class SupportedThreadFeatures(ClusterAttributeDescriptor): @@ -7537,7 +7233,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ThreadVersion(ClusterAttributeDescriptor): @@ -7553,7 +7249,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -7569,7 +7265,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -7585,23 +7281,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000031 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -7617,7 +7297,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -7633,7 +7313,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -7649,7 +7329,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -7662,18 +7342,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class IntentEnum(MatterIntEnum): @@ -7684,7 +7362,7 @@ class IntentEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class StatusEnum(MatterIntEnum): kSuccess = 0x00 @@ -7696,7 +7374,7 @@ class StatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class TransferProtocolEnum(MatterIntEnum): kResponsePayload = 0x00 @@ -7705,7 +7383,7 @@ class TransferProtocolEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class Commands: @dataclass @@ -7724,16 +7402,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="transferFileDesignator", Tag=2, Type=typing.Optional[str]), ]) - intent: 'DiagnosticLogs.Enums.IntentEnum' = 0 - requestedProtocol: 'DiagnosticLogs.Enums.TransferProtocolEnum' = 0 - transferFileDesignator: 'typing.Optional[str]' = None + intent: DiagnosticLogs.Enums.IntentEnum = 0 + requestedProtocol: DiagnosticLogs.Enums.TransferProtocolEnum = 0 + transferFileDesignator: typing.Optional[str] = None @dataclass class RetrieveLogsResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000032 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -7745,10 +7423,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="timeSinceBoot", Tag=3, Type=typing.Optional[uint]), ]) - status: 'DiagnosticLogs.Enums.StatusEnum' = 0 - logContent: 'bytes' = b"" - UTCTimeStamp: 'typing.Optional[uint]' = None - timeSinceBoot: 'typing.Optional[uint]' = None + status: DiagnosticLogs.Enums.StatusEnum = 0 + logContent: bytes = b"" + UTCTimeStamp: typing.Optional[uint] = None + timeSinceBoot: typing.Optional[uint] = None class Attributes: @dataclass @@ -7765,7 +7443,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -7781,23 +7459,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000032 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -7813,7 +7475,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -7829,7 +7491,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -7845,7 +7507,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -7867,27 +7529,25 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="testEventTriggersEnabled", Tag=0x00000008, Type=bool), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - networkInterfaces: 'typing.List[GeneralDiagnostics.Structs.NetworkInterface]' = None - rebootCount: 'uint' = None - upTime: 'typing.Optional[uint]' = None - totalOperationalHours: 'typing.Optional[uint]' = None - bootReason: 'typing.Optional[GeneralDiagnostics.Enums.BootReasonEnum]' = None - activeHardwareFaults: 'typing.Optional[typing.List[GeneralDiagnostics.Enums.HardwareFaultEnum]]' = None - activeRadioFaults: 'typing.Optional[typing.List[GeneralDiagnostics.Enums.RadioFaultEnum]]' = None - activeNetworkFaults: 'typing.Optional[typing.List[GeneralDiagnostics.Enums.NetworkFaultEnum]]' = None - testEventTriggersEnabled: 'bool' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + networkInterfaces: typing.List[GeneralDiagnostics.Structs.NetworkInterface] = field(default_factory=lambda: []) + rebootCount: uint = 0 + upTime: typing.Optional[uint] = None + totalOperationalHours: typing.Optional[uint] = None + bootReason: typing.Optional[GeneralDiagnostics.Enums.BootReasonEnum] = None + activeHardwareFaults: typing.Optional[typing.List[GeneralDiagnostics.Enums.HardwareFaultEnum]] = None + activeRadioFaults: typing.Optional[typing.List[GeneralDiagnostics.Enums.RadioFaultEnum]] = None + activeNetworkFaults: typing.Optional[typing.List[GeneralDiagnostics.Enums.NetworkFaultEnum]] = None + testEventTriggersEnabled: bool = False + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class BootReasonEnum(MatterIntEnum): @@ -7902,7 +7562,7 @@ class BootReasonEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 7, + kUnknownEnumValue = 7 class HardwareFaultEnum(MatterIntEnum): kUnspecified = 0x00 @@ -7920,7 +7580,7 @@ class HardwareFaultEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 11, + kUnknownEnumValue = 11 class InterfaceTypeEnum(MatterIntEnum): kUnspecified = 0x00 @@ -7932,7 +7592,7 @@ class InterfaceTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class NetworkFaultEnum(MatterIntEnum): kUnspecified = 0x00 @@ -7943,7 +7603,7 @@ class NetworkFaultEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class RadioFaultEnum(MatterIntEnum): kUnspecified = 0x00 @@ -7957,7 +7617,7 @@ class RadioFaultEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 7, + kUnknownEnumValue = 7 class Bitmaps: class Feature(IntFlag): @@ -7995,7 +7655,7 @@ class TestEventTrigger(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000033 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -8005,8 +7665,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="eventTrigger", Tag=1, Type=uint), ]) - enableKey: 'bytes' = b"" - eventTrigger: 'uint' = 0 + enableKey: bytes = b"" + eventTrigger: uint = 0 @dataclass class TimeSnapshot(ClusterCommand): @@ -8026,7 +7686,7 @@ class TimeSnapshotResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000033 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -8036,8 +7696,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="posixTimeMs", Tag=1, Type=typing.Union[Nullable, uint]), ]) - systemTimeMs: 'uint' = 0 - posixTimeMs: 'typing.Union[Nullable, uint]' = NullValue + systemTimeMs: uint = 0 + posixTimeMs: typing.Union[Nullable, uint] = NullValue @dataclass class PayloadTestRequest(ClusterCommand): @@ -8055,16 +7715,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="count", Tag=2, Type=uint), ]) - enableKey: 'bytes' = b"" - value: 'uint' = 0 - count: 'uint' = 0 + enableKey: bytes = b"" + value: uint = 0 + count: uint = 0 @dataclass class PayloadTestResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000033 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -8073,7 +7733,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="payload", Tag=0, Type=bytes), ]) - payload: 'bytes' = b"" + payload: bytes = b"" class Attributes: @dataclass @@ -8090,7 +7750,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[GeneralDiagnostics.Structs.NetworkInterface]) - value: 'typing.List[GeneralDiagnostics.Structs.NetworkInterface]' = field(default_factory=lambda: []) + value: typing.List[GeneralDiagnostics.Structs.NetworkInterface] = field(default_factory=lambda: []) @dataclass class RebootCount(ClusterAttributeDescriptor): @@ -8106,7 +7766,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class UpTime(ClusterAttributeDescriptor): @@ -8122,7 +7782,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TotalOperationalHours(ClusterAttributeDescriptor): @@ -8138,7 +7798,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class BootReason(ClusterAttributeDescriptor): @@ -8154,7 +7814,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[GeneralDiagnostics.Enums.BootReasonEnum]) - value: 'typing.Optional[GeneralDiagnostics.Enums.BootReasonEnum]' = None + value: typing.Optional[GeneralDiagnostics.Enums.BootReasonEnum] = None @dataclass class ActiveHardwareFaults(ClusterAttributeDescriptor): @@ -8170,7 +7830,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[GeneralDiagnostics.Enums.HardwareFaultEnum]]) - value: 'typing.Optional[typing.List[GeneralDiagnostics.Enums.HardwareFaultEnum]]' = None + value: typing.Optional[typing.List[GeneralDiagnostics.Enums.HardwareFaultEnum]] = None @dataclass class ActiveRadioFaults(ClusterAttributeDescriptor): @@ -8186,7 +7846,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[GeneralDiagnostics.Enums.RadioFaultEnum]]) - value: 'typing.Optional[typing.List[GeneralDiagnostics.Enums.RadioFaultEnum]]' = None + value: typing.Optional[typing.List[GeneralDiagnostics.Enums.RadioFaultEnum]] = None @dataclass class ActiveNetworkFaults(ClusterAttributeDescriptor): @@ -8202,7 +7862,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[GeneralDiagnostics.Enums.NetworkFaultEnum]]) - value: 'typing.Optional[typing.List[GeneralDiagnostics.Enums.NetworkFaultEnum]]' = None + value: typing.Optional[typing.List[GeneralDiagnostics.Enums.NetworkFaultEnum]] = None @dataclass class TestEventTriggersEnabled(ClusterAttributeDescriptor): @@ -8218,7 +7878,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -8234,7 +7894,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -8250,23 +7910,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000033 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -8282,7 +7926,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -8298,7 +7942,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -8314,7 +7958,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -8335,8 +7979,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[GeneralDiagnostics.Enums.HardwareFaultEnum]), ]) - current: 'typing.List[GeneralDiagnostics.Enums.HardwareFaultEnum]' = field(default_factory=lambda: []) - previous: 'typing.List[GeneralDiagnostics.Enums.HardwareFaultEnum]' = field(default_factory=lambda: []) + current: typing.List[GeneralDiagnostics.Enums.HardwareFaultEnum] = field(default_factory=lambda: []) + previous: typing.List[GeneralDiagnostics.Enums.HardwareFaultEnum] = field(default_factory=lambda: []) @dataclass class RadioFaultChange(ClusterEvent): @@ -8356,8 +8000,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[GeneralDiagnostics.Enums.RadioFaultEnum]), ]) - current: 'typing.List[GeneralDiagnostics.Enums.RadioFaultEnum]' = field(default_factory=lambda: []) - previous: 'typing.List[GeneralDiagnostics.Enums.RadioFaultEnum]' = field(default_factory=lambda: []) + current: typing.List[GeneralDiagnostics.Enums.RadioFaultEnum] = field(default_factory=lambda: []) + previous: typing.List[GeneralDiagnostics.Enums.RadioFaultEnum] = field(default_factory=lambda: []) @dataclass class NetworkFaultChange(ClusterEvent): @@ -8377,8 +8021,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[GeneralDiagnostics.Enums.NetworkFaultEnum]), ]) - current: 'typing.List[GeneralDiagnostics.Enums.NetworkFaultEnum]' = field(default_factory=lambda: []) - previous: 'typing.List[GeneralDiagnostics.Enums.NetworkFaultEnum]' = field(default_factory=lambda: []) + current: typing.List[GeneralDiagnostics.Enums.NetworkFaultEnum] = field(default_factory=lambda: []) + previous: typing.List[GeneralDiagnostics.Enums.NetworkFaultEnum] = field(default_factory=lambda: []) @dataclass class BootReason(ClusterEvent): @@ -8397,7 +8041,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="bootReason", Tag=0, Type=GeneralDiagnostics.Enums.BootReasonEnum), ]) - bootReason: 'GeneralDiagnostics.Enums.BootReasonEnum' = 0 + bootReason: GeneralDiagnostics.Enums.BootReasonEnum = 0 @dataclass @@ -8414,22 +8058,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="currentHeapHighWatermark", Tag=0x00000003, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - threadMetrics: 'typing.Optional[typing.List[SoftwareDiagnostics.Structs.ThreadMetricsStruct]]' = None - currentHeapFree: 'typing.Optional[uint]' = None - currentHeapUsed: 'typing.Optional[uint]' = None - currentHeapHighWatermark: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + threadMetrics: typing.Optional[typing.List[SoftwareDiagnostics.Structs.ThreadMetricsStruct]] = None + currentHeapFree: typing.Optional[uint] = None + currentHeapUsed: typing.Optional[uint] = None + currentHeapHighWatermark: typing.Optional[uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Bitmaps: class Feature(IntFlag): @@ -8461,7 +8103,7 @@ class ResetWatermarks(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000034 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -8484,7 +8126,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[SoftwareDiagnostics.Structs.ThreadMetricsStruct]]) - value: 'typing.Optional[typing.List[SoftwareDiagnostics.Structs.ThreadMetricsStruct]]' = None + value: typing.Optional[typing.List[SoftwareDiagnostics.Structs.ThreadMetricsStruct]] = None @dataclass class CurrentHeapFree(ClusterAttributeDescriptor): @@ -8500,7 +8142,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class CurrentHeapUsed(ClusterAttributeDescriptor): @@ -8516,7 +8158,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class CurrentHeapHighWatermark(ClusterAttributeDescriptor): @@ -8532,7 +8174,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -8548,7 +8190,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -8564,23 +8206,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000034 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -8596,7 +8222,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -8612,7 +8238,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -8628,7 +8254,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -8650,9 +8276,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="faultRecording", Tag=2, Type=typing.Optional[bytes]), ]) - id: 'uint' = 0 - name: 'typing.Optional[str]' = None - faultRecording: 'typing.Optional[bytes]' = None + id: uint = 0 + name: typing.Optional[str] = None + faultRecording: typing.Optional[bytes] = None @dataclass @@ -8728,81 +8354,79 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="activeNetworkFaultsList", Tag=0x0000003E, Type=typing.List[ThreadNetworkDiagnostics.Enums.NetworkFaultEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - channel: 'typing.Union[Nullable, uint]' = None - routingRole: 'typing.Union[Nullable, ThreadNetworkDiagnostics.Enums.RoutingRoleEnum]' = None - networkName: 'typing.Union[Nullable, str]' = None - panId: 'typing.Union[Nullable, uint]' = None - extendedPanId: 'typing.Union[Nullable, uint]' = None - meshLocalPrefix: 'typing.Union[Nullable, bytes]' = None - overrunCount: 'typing.Optional[uint]' = None - neighborTable: 'typing.List[ThreadNetworkDiagnostics.Structs.NeighborTableStruct]' = None - routeTable: 'typing.List[ThreadNetworkDiagnostics.Structs.RouteTableStruct]' = None - partitionId: 'typing.Union[Nullable, uint]' = None - weighting: 'typing.Union[Nullable, uint]' = None - dataVersion: 'typing.Union[Nullable, uint]' = None - stableDataVersion: 'typing.Union[Nullable, uint]' = None - leaderRouterId: 'typing.Union[Nullable, uint]' = None - detachedRoleCount: 'typing.Optional[uint]' = None - childRoleCount: 'typing.Optional[uint]' = None - routerRoleCount: 'typing.Optional[uint]' = None - leaderRoleCount: 'typing.Optional[uint]' = None - attachAttemptCount: 'typing.Optional[uint]' = None - partitionIdChangeCount: 'typing.Optional[uint]' = None - betterPartitionAttachAttemptCount: 'typing.Optional[uint]' = None - parentChangeCount: 'typing.Optional[uint]' = None - txTotalCount: 'typing.Optional[uint]' = None - txUnicastCount: 'typing.Optional[uint]' = None - txBroadcastCount: 'typing.Optional[uint]' = None - txAckRequestedCount: 'typing.Optional[uint]' = None - txAckedCount: 'typing.Optional[uint]' = None - txNoAckRequestedCount: 'typing.Optional[uint]' = None - txDataCount: 'typing.Optional[uint]' = None - txDataPollCount: 'typing.Optional[uint]' = None - txBeaconCount: 'typing.Optional[uint]' = None - txBeaconRequestCount: 'typing.Optional[uint]' = None - txOtherCount: 'typing.Optional[uint]' = None - txRetryCount: 'typing.Optional[uint]' = None - txDirectMaxRetryExpiryCount: 'typing.Optional[uint]' = None - txIndirectMaxRetryExpiryCount: 'typing.Optional[uint]' = None - txErrCcaCount: 'typing.Optional[uint]' = None - txErrAbortCount: 'typing.Optional[uint]' = None - txErrBusyChannelCount: 'typing.Optional[uint]' = None - rxTotalCount: 'typing.Optional[uint]' = None - rxUnicastCount: 'typing.Optional[uint]' = None - rxBroadcastCount: 'typing.Optional[uint]' = None - rxDataCount: 'typing.Optional[uint]' = None - rxDataPollCount: 'typing.Optional[uint]' = None - rxBeaconCount: 'typing.Optional[uint]' = None - rxBeaconRequestCount: 'typing.Optional[uint]' = None - rxOtherCount: 'typing.Optional[uint]' = None - rxAddressFilteredCount: 'typing.Optional[uint]' = None - rxDestAddrFilteredCount: 'typing.Optional[uint]' = None - rxDuplicatedCount: 'typing.Optional[uint]' = None - rxErrNoFrameCount: 'typing.Optional[uint]' = None - rxErrUnknownNeighborCount: 'typing.Optional[uint]' = None - rxErrInvalidSrcAddrCount: 'typing.Optional[uint]' = None - rxErrSecCount: 'typing.Optional[uint]' = None - rxErrFcsCount: 'typing.Optional[uint]' = None - rxErrOtherCount: 'typing.Optional[uint]' = None - activeTimestamp: 'typing.Union[None, Nullable, uint]' = None - pendingTimestamp: 'typing.Union[None, Nullable, uint]' = None - delay: 'typing.Union[None, Nullable, uint]' = None - securityPolicy: 'typing.Union[Nullable, ThreadNetworkDiagnostics.Structs.SecurityPolicy]' = None - channelPage0Mask: 'typing.Union[Nullable, bytes]' = None - operationalDatasetComponents: 'typing.Union[Nullable, ThreadNetworkDiagnostics.Structs.OperationalDatasetComponents]' = None - activeNetworkFaultsList: 'typing.List[ThreadNetworkDiagnostics.Enums.NetworkFaultEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + channel: typing.Union[Nullable, uint] = NullValue + routingRole: typing.Union[Nullable, ThreadNetworkDiagnostics.Enums.RoutingRoleEnum] = NullValue + networkName: typing.Union[Nullable, str] = NullValue + panId: typing.Union[Nullable, uint] = NullValue + extendedPanId: typing.Union[Nullable, uint] = NullValue + meshLocalPrefix: typing.Union[Nullable, bytes] = NullValue + overrunCount: typing.Optional[uint] = None + neighborTable: typing.List[ThreadNetworkDiagnostics.Structs.NeighborTableStruct] = field(default_factory=lambda: []) + routeTable: typing.List[ThreadNetworkDiagnostics.Structs.RouteTableStruct] = field(default_factory=lambda: []) + partitionId: typing.Union[Nullable, uint] = NullValue + weighting: typing.Union[Nullable, uint] = NullValue + dataVersion: typing.Union[Nullable, uint] = NullValue + stableDataVersion: typing.Union[Nullable, uint] = NullValue + leaderRouterId: typing.Union[Nullable, uint] = NullValue + detachedRoleCount: typing.Optional[uint] = None + childRoleCount: typing.Optional[uint] = None + routerRoleCount: typing.Optional[uint] = None + leaderRoleCount: typing.Optional[uint] = None + attachAttemptCount: typing.Optional[uint] = None + partitionIdChangeCount: typing.Optional[uint] = None + betterPartitionAttachAttemptCount: typing.Optional[uint] = None + parentChangeCount: typing.Optional[uint] = None + txTotalCount: typing.Optional[uint] = None + txUnicastCount: typing.Optional[uint] = None + txBroadcastCount: typing.Optional[uint] = None + txAckRequestedCount: typing.Optional[uint] = None + txAckedCount: typing.Optional[uint] = None + txNoAckRequestedCount: typing.Optional[uint] = None + txDataCount: typing.Optional[uint] = None + txDataPollCount: typing.Optional[uint] = None + txBeaconCount: typing.Optional[uint] = None + txBeaconRequestCount: typing.Optional[uint] = None + txOtherCount: typing.Optional[uint] = None + txRetryCount: typing.Optional[uint] = None + txDirectMaxRetryExpiryCount: typing.Optional[uint] = None + txIndirectMaxRetryExpiryCount: typing.Optional[uint] = None + txErrCcaCount: typing.Optional[uint] = None + txErrAbortCount: typing.Optional[uint] = None + txErrBusyChannelCount: typing.Optional[uint] = None + rxTotalCount: typing.Optional[uint] = None + rxUnicastCount: typing.Optional[uint] = None + rxBroadcastCount: typing.Optional[uint] = None + rxDataCount: typing.Optional[uint] = None + rxDataPollCount: typing.Optional[uint] = None + rxBeaconCount: typing.Optional[uint] = None + rxBeaconRequestCount: typing.Optional[uint] = None + rxOtherCount: typing.Optional[uint] = None + rxAddressFilteredCount: typing.Optional[uint] = None + rxDestAddrFilteredCount: typing.Optional[uint] = None + rxDuplicatedCount: typing.Optional[uint] = None + rxErrNoFrameCount: typing.Optional[uint] = None + rxErrUnknownNeighborCount: typing.Optional[uint] = None + rxErrInvalidSrcAddrCount: typing.Optional[uint] = None + rxErrSecCount: typing.Optional[uint] = None + rxErrFcsCount: typing.Optional[uint] = None + rxErrOtherCount: typing.Optional[uint] = None + activeTimestamp: typing.Union[None, Nullable, uint] = None + pendingTimestamp: typing.Union[None, Nullable, uint] = None + delay: typing.Union[None, Nullable, uint] = None + securityPolicy: typing.Union[Nullable, ThreadNetworkDiagnostics.Structs.SecurityPolicy] = NullValue + channelPage0Mask: typing.Union[Nullable, bytes] = NullValue + operationalDatasetComponents: typing.Union[Nullable, ThreadNetworkDiagnostics.Structs.OperationalDatasetComponents] = NullValue + activeNetworkFaultsList: typing.List[ThreadNetworkDiagnostics.Enums.NetworkFaultEnum] = field(default_factory=lambda: []) + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ConnectionStatusEnum(MatterIntEnum): @@ -8812,7 +8436,7 @@ class ConnectionStatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class NetworkFaultEnum(MatterIntEnum): kUnspecified = 0x00 @@ -8823,7 +8447,7 @@ class NetworkFaultEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class RoutingRoleEnum(MatterIntEnum): kUnspecified = 0x00 @@ -8837,7 +8461,7 @@ class RoutingRoleEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 7, + kUnknownEnumValue = 7 class Bitmaps: class Feature(IntFlag): @@ -8965,7 +8589,7 @@ class ResetCounts(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000035 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -8988,7 +8612,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class RoutingRole(ClusterAttributeDescriptor): @@ -9004,7 +8628,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, ThreadNetworkDiagnostics.Enums.RoutingRoleEnum]) - value: 'typing.Union[Nullable, ThreadNetworkDiagnostics.Enums.RoutingRoleEnum]' = NullValue + value: typing.Union[Nullable, ThreadNetworkDiagnostics.Enums.RoutingRoleEnum] = NullValue @dataclass class NetworkName(ClusterAttributeDescriptor): @@ -9020,7 +8644,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, str]) - value: 'typing.Union[Nullable, str]' = NullValue + value: typing.Union[Nullable, str] = NullValue @dataclass class PanId(ClusterAttributeDescriptor): @@ -9036,7 +8660,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class ExtendedPanId(ClusterAttributeDescriptor): @@ -9052,7 +8676,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class MeshLocalPrefix(ClusterAttributeDescriptor): @@ -9068,7 +8692,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, bytes]) - value: 'typing.Union[Nullable, bytes]' = NullValue + value: typing.Union[Nullable, bytes] = NullValue @dataclass class OverrunCount(ClusterAttributeDescriptor): @@ -9084,7 +8708,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class NeighborTable(ClusterAttributeDescriptor): @@ -9100,7 +8724,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[ThreadNetworkDiagnostics.Structs.NeighborTableStruct]) - value: 'typing.List[ThreadNetworkDiagnostics.Structs.NeighborTableStruct]' = field(default_factory=lambda: []) + value: typing.List[ThreadNetworkDiagnostics.Structs.NeighborTableStruct] = field(default_factory=lambda: []) @dataclass class RouteTable(ClusterAttributeDescriptor): @@ -9116,7 +8740,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[ThreadNetworkDiagnostics.Structs.RouteTableStruct]) - value: 'typing.List[ThreadNetworkDiagnostics.Structs.RouteTableStruct]' = field(default_factory=lambda: []) + value: typing.List[ThreadNetworkDiagnostics.Structs.RouteTableStruct] = field(default_factory=lambda: []) @dataclass class PartitionId(ClusterAttributeDescriptor): @@ -9132,7 +8756,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class Weighting(ClusterAttributeDescriptor): @@ -9148,7 +8772,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class DataVersion(ClusterAttributeDescriptor): @@ -9164,7 +8788,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class StableDataVersion(ClusterAttributeDescriptor): @@ -9180,7 +8804,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class LeaderRouterId(ClusterAttributeDescriptor): @@ -9196,7 +8820,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class DetachedRoleCount(ClusterAttributeDescriptor): @@ -9212,7 +8836,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ChildRoleCount(ClusterAttributeDescriptor): @@ -9228,7 +8852,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RouterRoleCount(ClusterAttributeDescriptor): @@ -9244,7 +8868,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class LeaderRoleCount(ClusterAttributeDescriptor): @@ -9260,7 +8884,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class AttachAttemptCount(ClusterAttributeDescriptor): @@ -9276,7 +8900,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class PartitionIdChangeCount(ClusterAttributeDescriptor): @@ -9292,7 +8916,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class BetterPartitionAttachAttemptCount(ClusterAttributeDescriptor): @@ -9308,7 +8932,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ParentChangeCount(ClusterAttributeDescriptor): @@ -9324,7 +8948,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TxTotalCount(ClusterAttributeDescriptor): @@ -9340,7 +8964,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TxUnicastCount(ClusterAttributeDescriptor): @@ -9356,7 +8980,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TxBroadcastCount(ClusterAttributeDescriptor): @@ -9372,7 +8996,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TxAckRequestedCount(ClusterAttributeDescriptor): @@ -9388,7 +9012,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TxAckedCount(ClusterAttributeDescriptor): @@ -9404,7 +9028,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TxNoAckRequestedCount(ClusterAttributeDescriptor): @@ -9420,7 +9044,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TxDataCount(ClusterAttributeDescriptor): @@ -9436,7 +9060,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TxDataPollCount(ClusterAttributeDescriptor): @@ -9452,7 +9076,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TxBeaconCount(ClusterAttributeDescriptor): @@ -9468,7 +9092,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TxBeaconRequestCount(ClusterAttributeDescriptor): @@ -9484,7 +9108,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TxOtherCount(ClusterAttributeDescriptor): @@ -9500,7 +9124,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TxRetryCount(ClusterAttributeDescriptor): @@ -9516,7 +9140,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TxDirectMaxRetryExpiryCount(ClusterAttributeDescriptor): @@ -9532,7 +9156,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TxIndirectMaxRetryExpiryCount(ClusterAttributeDescriptor): @@ -9548,7 +9172,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TxErrCcaCount(ClusterAttributeDescriptor): @@ -9564,7 +9188,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TxErrAbortCount(ClusterAttributeDescriptor): @@ -9580,7 +9204,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TxErrBusyChannelCount(ClusterAttributeDescriptor): @@ -9596,7 +9220,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RxTotalCount(ClusterAttributeDescriptor): @@ -9612,7 +9236,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RxUnicastCount(ClusterAttributeDescriptor): @@ -9628,7 +9252,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RxBroadcastCount(ClusterAttributeDescriptor): @@ -9644,7 +9268,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RxDataCount(ClusterAttributeDescriptor): @@ -9660,7 +9284,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RxDataPollCount(ClusterAttributeDescriptor): @@ -9676,7 +9300,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RxBeaconCount(ClusterAttributeDescriptor): @@ -9692,7 +9316,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RxBeaconRequestCount(ClusterAttributeDescriptor): @@ -9708,7 +9332,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RxOtherCount(ClusterAttributeDescriptor): @@ -9724,7 +9348,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RxAddressFilteredCount(ClusterAttributeDescriptor): @@ -9740,7 +9364,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RxDestAddrFilteredCount(ClusterAttributeDescriptor): @@ -9756,7 +9380,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RxDuplicatedCount(ClusterAttributeDescriptor): @@ -9772,7 +9396,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RxErrNoFrameCount(ClusterAttributeDescriptor): @@ -9788,7 +9412,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RxErrUnknownNeighborCount(ClusterAttributeDescriptor): @@ -9804,7 +9428,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RxErrInvalidSrcAddrCount(ClusterAttributeDescriptor): @@ -9820,7 +9444,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RxErrSecCount(ClusterAttributeDescriptor): @@ -9836,7 +9460,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RxErrFcsCount(ClusterAttributeDescriptor): @@ -9852,7 +9476,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RxErrOtherCount(ClusterAttributeDescriptor): @@ -9868,7 +9492,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ActiveTimestamp(ClusterAttributeDescriptor): @@ -9884,7 +9508,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class PendingTimestamp(ClusterAttributeDescriptor): @@ -9900,7 +9524,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class Delay(ClusterAttributeDescriptor): @@ -9916,7 +9540,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class SecurityPolicy(ClusterAttributeDescriptor): @@ -9932,7 +9556,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, ThreadNetworkDiagnostics.Structs.SecurityPolicy]) - value: 'typing.Union[Nullable, ThreadNetworkDiagnostics.Structs.SecurityPolicy]' = NullValue + value: typing.Union[Nullable, ThreadNetworkDiagnostics.Structs.SecurityPolicy] = NullValue @dataclass class ChannelPage0Mask(ClusterAttributeDescriptor): @@ -9948,7 +9572,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, bytes]) - value: 'typing.Union[Nullable, bytes]' = NullValue + value: typing.Union[Nullable, bytes] = NullValue @dataclass class OperationalDatasetComponents(ClusterAttributeDescriptor): @@ -9964,7 +9588,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, ThreadNetworkDiagnostics.Structs.OperationalDatasetComponents]) - value: 'typing.Union[Nullable, ThreadNetworkDiagnostics.Structs.OperationalDatasetComponents]' = NullValue + value: typing.Union[Nullable, ThreadNetworkDiagnostics.Structs.OperationalDatasetComponents] = NullValue @dataclass class ActiveNetworkFaultsList(ClusterAttributeDescriptor): @@ -9980,7 +9604,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[ThreadNetworkDiagnostics.Enums.NetworkFaultEnum]) - value: 'typing.List[ThreadNetworkDiagnostics.Enums.NetworkFaultEnum]' = field(default_factory=lambda: []) + value: typing.List[ThreadNetworkDiagnostics.Enums.NetworkFaultEnum] = field(default_factory=lambda: []) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -9996,7 +9620,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -10012,23 +9636,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000035 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -10044,7 +9652,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -10060,7 +9668,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -10076,7 +9684,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -10096,7 +9704,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="connectionStatus", Tag=0, Type=ThreadNetworkDiagnostics.Enums.ConnectionStatusEnum), ]) - connectionStatus: 'ThreadNetworkDiagnostics.Enums.ConnectionStatusEnum' = 0 + connectionStatus: ThreadNetworkDiagnostics.Enums.ConnectionStatusEnum = 0 @dataclass class NetworkFaultChange(ClusterEvent): @@ -10116,8 +9724,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="previous", Tag=1, Type=typing.List[ThreadNetworkDiagnostics.Enums.NetworkFaultEnum]), ]) - current: 'typing.List[ThreadNetworkDiagnostics.Enums.NetworkFaultEnum]' = field(default_factory=lambda: []) - previous: 'typing.List[ThreadNetworkDiagnostics.Enums.NetworkFaultEnum]' = field(default_factory=lambda: []) + current: typing.List[ThreadNetworkDiagnostics.Enums.NetworkFaultEnum] = field(default_factory=lambda: []) + previous: typing.List[ThreadNetworkDiagnostics.Enums.NetworkFaultEnum] = field(default_factory=lambda: []) @dataclass @@ -10143,31 +9751,29 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="overrunCount", Tag=0x0000000C, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - bssid: 'typing.Union[Nullable, bytes]' = None - securityType: 'typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.SecurityTypeEnum]' = None - wiFiVersion: 'typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.WiFiVersionEnum]' = None - channelNumber: 'typing.Union[Nullable, uint]' = None - rssi: 'typing.Union[Nullable, int]' = None - beaconLostCount: 'typing.Union[None, Nullable, uint]' = None - beaconRxCount: 'typing.Union[None, Nullable, uint]' = None - packetMulticastRxCount: 'typing.Union[None, Nullable, uint]' = None - packetMulticastTxCount: 'typing.Union[None, Nullable, uint]' = None - packetUnicastRxCount: 'typing.Union[None, Nullable, uint]' = None - packetUnicastTxCount: 'typing.Union[None, Nullable, uint]' = None - currentMaxRate: 'typing.Union[None, Nullable, uint]' = None - overrunCount: 'typing.Union[None, Nullable, uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + bssid: typing.Union[Nullable, bytes] = NullValue + securityType: typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.SecurityTypeEnum] = NullValue + wiFiVersion: typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.WiFiVersionEnum] = NullValue + channelNumber: typing.Union[Nullable, uint] = NullValue + rssi: typing.Union[Nullable, int] = NullValue + beaconLostCount: typing.Union[None, Nullable, uint] = None + beaconRxCount: typing.Union[None, Nullable, uint] = None + packetMulticastRxCount: typing.Union[None, Nullable, uint] = None + packetMulticastTxCount: typing.Union[None, Nullable, uint] = None + packetUnicastRxCount: typing.Union[None, Nullable, uint] = None + packetUnicastTxCount: typing.Union[None, Nullable, uint] = None + currentMaxRate: typing.Union[None, Nullable, uint] = None + overrunCount: typing.Union[None, Nullable, uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class AssociationFailureCauseEnum(MatterIntEnum): @@ -10179,7 +9785,7 @@ class AssociationFailureCauseEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class ConnectionStatusEnum(MatterIntEnum): kConnected = 0x00 @@ -10188,7 +9794,7 @@ class ConnectionStatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class SecurityTypeEnum(MatterIntEnum): kUnspecified = 0x00 @@ -10201,7 +9807,7 @@ class SecurityTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 6, + kUnknownEnumValue = 6 class WiFiVersionEnum(MatterIntEnum): kA = 0x00 @@ -10215,7 +9821,7 @@ class WiFiVersionEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 7, + kUnknownEnumValue = 7 class Bitmaps: class Feature(IntFlag): @@ -10228,7 +9834,7 @@ class ResetCounts(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000036 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -10251,7 +9857,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, bytes]) - value: 'typing.Union[Nullable, bytes]' = NullValue + value: typing.Union[Nullable, bytes] = NullValue @dataclass class SecurityType(ClusterAttributeDescriptor): @@ -10267,7 +9873,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.SecurityTypeEnum]) - value: 'typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.SecurityTypeEnum]' = NullValue + value: typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.SecurityTypeEnum] = NullValue @dataclass class WiFiVersion(ClusterAttributeDescriptor): @@ -10283,7 +9889,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.WiFiVersionEnum]) - value: 'typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.WiFiVersionEnum]' = NullValue + value: typing.Union[Nullable, WiFiNetworkDiagnostics.Enums.WiFiVersionEnum] = NullValue @dataclass class ChannelNumber(ClusterAttributeDescriptor): @@ -10299,7 +9905,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class Rssi(ClusterAttributeDescriptor): @@ -10315,7 +9921,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class BeaconLostCount(ClusterAttributeDescriptor): @@ -10331,7 +9937,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class BeaconRxCount(ClusterAttributeDescriptor): @@ -10347,7 +9953,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class PacketMulticastRxCount(ClusterAttributeDescriptor): @@ -10363,7 +9969,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class PacketMulticastTxCount(ClusterAttributeDescriptor): @@ -10379,7 +9985,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class PacketUnicastRxCount(ClusterAttributeDescriptor): @@ -10395,7 +10001,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class PacketUnicastTxCount(ClusterAttributeDescriptor): @@ -10411,7 +10017,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class CurrentMaxRate(ClusterAttributeDescriptor): @@ -10427,7 +10033,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class OverrunCount(ClusterAttributeDescriptor): @@ -10443,7 +10049,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -10459,7 +10065,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -10475,23 +10081,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000036 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -10507,7 +10097,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -10523,7 +10113,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -10539,7 +10129,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -10559,7 +10149,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="reasonCode", Tag=0, Type=uint), ]) - reasonCode: 'uint' = 0 + reasonCode: uint = 0 @dataclass class AssociationFailure(ClusterEvent): @@ -10579,8 +10169,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="status", Tag=1, Type=uint), ]) - associationFailureCause: 'WiFiNetworkDiagnostics.Enums.AssociationFailureCauseEnum' = 0 - status: 'uint' = 0 + associationFailureCause: WiFiNetworkDiagnostics.Enums.AssociationFailureCauseEnum = 0 + status: uint = 0 @dataclass class ConnectionStatus(ClusterEvent): @@ -10599,7 +10189,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="connectionStatus", Tag=0, Type=WiFiNetworkDiagnostics.Enums.ConnectionStatusEnum), ]) - connectionStatus: 'WiFiNetworkDiagnostics.Enums.ConnectionStatusEnum' = 0 + connectionStatus: WiFiNetworkDiagnostics.Enums.ConnectionStatusEnum = 0 @dataclass @@ -10621,27 +10211,25 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="timeSinceReset", Tag=0x00000008, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - PHYRate: 'typing.Union[None, Nullable, EthernetNetworkDiagnostics.Enums.PHYRateEnum]' = None - fullDuplex: 'typing.Union[None, Nullable, bool]' = None - packetRxCount: 'typing.Optional[uint]' = None - packetTxCount: 'typing.Optional[uint]' = None - txErrCount: 'typing.Optional[uint]' = None - collisionCount: 'typing.Optional[uint]' = None - overrunCount: 'typing.Optional[uint]' = None - carrierDetect: 'typing.Union[None, Nullable, bool]' = None - timeSinceReset: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + PHYRate: typing.Union[None, Nullable, EthernetNetworkDiagnostics.Enums.PHYRateEnum] = None + fullDuplex: typing.Union[None, Nullable, bool] = None + packetRxCount: typing.Optional[uint] = None + packetTxCount: typing.Optional[uint] = None + txErrCount: typing.Optional[uint] = None + collisionCount: typing.Optional[uint] = None + overrunCount: typing.Optional[uint] = None + carrierDetect: typing.Union[None, Nullable, bool] = None + timeSinceReset: typing.Optional[uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class PHYRateEnum(MatterIntEnum): @@ -10659,7 +10247,7 @@ class PHYRateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 10, + kUnknownEnumValue = 10 class Bitmaps: class Feature(IntFlag): @@ -10672,7 +10260,7 @@ class ResetCounts(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000037 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -10695,7 +10283,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, EthernetNetworkDiagnostics.Enums.PHYRateEnum]) - value: 'typing.Union[None, Nullable, EthernetNetworkDiagnostics.Enums.PHYRateEnum]' = None + value: typing.Union[None, Nullable, EthernetNetworkDiagnostics.Enums.PHYRateEnum] = None @dataclass class FullDuplex(ClusterAttributeDescriptor): @@ -10711,7 +10299,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, bool]) - value: 'typing.Union[None, Nullable, bool]' = None + value: typing.Union[None, Nullable, bool] = None @dataclass class PacketRxCount(ClusterAttributeDescriptor): @@ -10727,7 +10315,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class PacketTxCount(ClusterAttributeDescriptor): @@ -10743,7 +10331,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TxErrCount(ClusterAttributeDescriptor): @@ -10759,7 +10347,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class CollisionCount(ClusterAttributeDescriptor): @@ -10775,7 +10363,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class OverrunCount(ClusterAttributeDescriptor): @@ -10791,7 +10379,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class CarrierDetect(ClusterAttributeDescriptor): @@ -10807,7 +10395,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, bool]) - value: 'typing.Union[None, Nullable, bool]' = None + value: typing.Union[None, Nullable, bool] = None @dataclass class TimeSinceReset(ClusterAttributeDescriptor): @@ -10823,7 +10411,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -10839,7 +10427,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -10855,23 +10443,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000037 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -10887,7 +10459,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -10903,7 +10475,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -10919,7 +10491,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -10945,31 +10517,29 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="supportsDNSResolve", Tag=0x0000000C, Type=typing.Optional[bool]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - UTCTime: 'typing.Union[Nullable, uint]' = None - granularity: 'TimeSynchronization.Enums.GranularityEnum' = None - timeSource: 'typing.Optional[TimeSynchronization.Enums.TimeSourceEnum]' = None - trustedTimeSource: 'typing.Union[None, Nullable, TimeSynchronization.Structs.TrustedTimeSourceStruct]' = None - defaultNTP: 'typing.Union[None, Nullable, str]' = None - timeZone: 'typing.Optional[typing.List[TimeSynchronization.Structs.TimeZoneStruct]]' = None - DSTOffset: 'typing.Optional[typing.List[TimeSynchronization.Structs.DSTOffsetStruct]]' = None - localTime: 'typing.Union[None, Nullable, uint]' = None - timeZoneDatabase: 'typing.Optional[TimeSynchronization.Enums.TimeZoneDatabaseEnum]' = None - NTPServerAvailable: 'typing.Optional[bool]' = None - timeZoneListMaxSize: 'typing.Optional[uint]' = None - DSTOffsetListMaxSize: 'typing.Optional[uint]' = None - supportsDNSResolve: 'typing.Optional[bool]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + UTCTime: typing.Union[Nullable, uint] = NullValue + granularity: TimeSynchronization.Enums.GranularityEnum = 0 + timeSource: typing.Optional[TimeSynchronization.Enums.TimeSourceEnum] = None + trustedTimeSource: typing.Union[None, Nullable, TimeSynchronization.Structs.TrustedTimeSourceStruct] = None + defaultNTP: typing.Union[None, Nullable, str] = None + timeZone: typing.Optional[typing.List[TimeSynchronization.Structs.TimeZoneStruct]] = None + DSTOffset: typing.Optional[typing.List[TimeSynchronization.Structs.DSTOffsetStruct]] = None + localTime: typing.Union[None, Nullable, uint] = None + timeZoneDatabase: typing.Optional[TimeSynchronization.Enums.TimeZoneDatabaseEnum] = None + NTPServerAvailable: typing.Optional[bool] = None + timeZoneListMaxSize: typing.Optional[uint] = None + DSTOffsetListMaxSize: typing.Optional[uint] = None + supportsDNSResolve: typing.Optional[bool] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class GranularityEnum(MatterIntEnum): @@ -10982,7 +10552,7 @@ class GranularityEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class StatusCode(MatterIntEnum): kTimeNotAccepted = 0x02 @@ -10990,7 +10560,7 @@ class StatusCode(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 0, + kUnknownEnumValue = 0 class TimeSourceEnum(MatterIntEnum): kNone = 0x00 @@ -11014,7 +10584,7 @@ class TimeSourceEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 17, + kUnknownEnumValue = 17 class TimeZoneDatabaseEnum(MatterIntEnum): kFull = 0x00 @@ -11024,7 +10594,7 @@ class TimeZoneDatabaseEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class Bitmaps: class Feature(IntFlag): @@ -11098,7 +10668,7 @@ class SetUTCTime(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000038 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11109,16 +10679,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="timeSource", Tag=2, Type=typing.Optional[TimeSynchronization.Enums.TimeSourceEnum]), ]) - UTCTime: 'uint' = 0 - granularity: 'TimeSynchronization.Enums.GranularityEnum' = 0 - timeSource: 'typing.Optional[TimeSynchronization.Enums.TimeSourceEnum]' = None + UTCTime: uint = 0 + granularity: TimeSynchronization.Enums.GranularityEnum = 0 + timeSource: typing.Optional[TimeSynchronization.Enums.TimeSourceEnum] = None @dataclass class SetTrustedTimeSource(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000038 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11127,7 +10697,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="trustedTimeSource", Tag=0, Type=typing.Union[Nullable, TimeSynchronization.Structs.FabricScopedTrustedTimeSourceStruct]), ]) - trustedTimeSource: 'typing.Union[Nullable, TimeSynchronization.Structs.FabricScopedTrustedTimeSourceStruct]' = NullValue + trustedTimeSource: typing.Union[Nullable, TimeSynchronization.Structs.FabricScopedTrustedTimeSourceStruct] = NullValue @dataclass class SetTimeZone(ClusterCommand): @@ -11143,14 +10713,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="timeZone", Tag=0, Type=typing.List[TimeSynchronization.Structs.TimeZoneStruct]), ]) - timeZone: 'typing.List[TimeSynchronization.Structs.TimeZoneStruct]' = field(default_factory=lambda: []) + timeZone: typing.List[TimeSynchronization.Structs.TimeZoneStruct] = field(default_factory=lambda: []) @dataclass class SetTimeZoneResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000038 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11159,14 +10729,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="DSTOffsetRequired", Tag=0, Type=bool), ]) - DSTOffsetRequired: 'bool' = False + DSTOffsetRequired: bool = False @dataclass class SetDSTOffset(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000038 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11175,14 +10745,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="DSTOffset", Tag=0, Type=typing.List[TimeSynchronization.Structs.DSTOffsetStruct]), ]) - DSTOffset: 'typing.List[TimeSynchronization.Structs.DSTOffsetStruct]' = field(default_factory=lambda: []) + DSTOffset: typing.List[TimeSynchronization.Structs.DSTOffsetStruct] = field(default_factory=lambda: []) @dataclass class SetDefaultNTP(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000038 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11191,7 +10761,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="defaultNTP", Tag=0, Type=typing.Union[Nullable, str]), ]) - defaultNTP: 'typing.Union[Nullable, str]' = NullValue + defaultNTP: typing.Union[Nullable, str] = NullValue class Attributes: @dataclass @@ -11208,7 +10778,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class Granularity(ClusterAttributeDescriptor): @@ -11224,7 +10794,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=TimeSynchronization.Enums.GranularityEnum) - value: 'TimeSynchronization.Enums.GranularityEnum' = 0 + value: TimeSynchronization.Enums.GranularityEnum = 0 @dataclass class TimeSource(ClusterAttributeDescriptor): @@ -11240,7 +10810,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[TimeSynchronization.Enums.TimeSourceEnum]) - value: 'typing.Optional[TimeSynchronization.Enums.TimeSourceEnum]' = None + value: typing.Optional[TimeSynchronization.Enums.TimeSourceEnum] = None @dataclass class TrustedTimeSource(ClusterAttributeDescriptor): @@ -11256,7 +10826,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, TimeSynchronization.Structs.TrustedTimeSourceStruct]) - value: 'typing.Union[None, Nullable, TimeSynchronization.Structs.TrustedTimeSourceStruct]' = None + value: typing.Union[None, Nullable, TimeSynchronization.Structs.TrustedTimeSourceStruct] = None @dataclass class DefaultNTP(ClusterAttributeDescriptor): @@ -11272,7 +10842,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, str]) - value: 'typing.Union[None, Nullable, str]' = None + value: typing.Union[None, Nullable, str] = None @dataclass class TimeZone(ClusterAttributeDescriptor): @@ -11288,7 +10858,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[TimeSynchronization.Structs.TimeZoneStruct]]) - value: 'typing.Optional[typing.List[TimeSynchronization.Structs.TimeZoneStruct]]' = None + value: typing.Optional[typing.List[TimeSynchronization.Structs.TimeZoneStruct]] = None @dataclass class DSTOffset(ClusterAttributeDescriptor): @@ -11304,7 +10874,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[TimeSynchronization.Structs.DSTOffsetStruct]]) - value: 'typing.Optional[typing.List[TimeSynchronization.Structs.DSTOffsetStruct]]' = None + value: typing.Optional[typing.List[TimeSynchronization.Structs.DSTOffsetStruct]] = None @dataclass class LocalTime(ClusterAttributeDescriptor): @@ -11320,7 +10890,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class TimeZoneDatabase(ClusterAttributeDescriptor): @@ -11336,7 +10906,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[TimeSynchronization.Enums.TimeZoneDatabaseEnum]) - value: 'typing.Optional[TimeSynchronization.Enums.TimeZoneDatabaseEnum]' = None + value: typing.Optional[TimeSynchronization.Enums.TimeZoneDatabaseEnum] = None @dataclass class NTPServerAvailable(ClusterAttributeDescriptor): @@ -11352,7 +10922,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Optional[bool]' = None + value: typing.Optional[bool] = None @dataclass class TimeZoneListMaxSize(ClusterAttributeDescriptor): @@ -11368,7 +10938,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class DSTOffsetListMaxSize(ClusterAttributeDescriptor): @@ -11384,7 +10954,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class SupportsDNSResolve(ClusterAttributeDescriptor): @@ -11400,7 +10970,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Optional[bool]' = None + value: typing.Optional[bool] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -11416,7 +10986,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -11432,23 +11002,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000038 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -11464,7 +11018,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -11480,7 +11034,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -11496,7 +11050,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -11532,7 +11086,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="DSTOffsetActive", Tag=0, Type=bool), ]) - DSTOffsetActive: 'bool' = False + DSTOffsetActive: bool = False @dataclass class TimeZoneStatus(ClusterEvent): @@ -11552,8 +11106,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=typing.Optional[str]), ]) - offset: 'int' = 0 - name: 'typing.Optional[str]' = None + offset: int = 0 + name: typing.Optional[str] = None @dataclass class TimeFailure(ClusterEvent): @@ -11615,35 +11169,33 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="productAppearance", Tag=0x00000014, Type=typing.Optional[BridgedDeviceBasicInformation.Structs.ProductAppearanceStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - vendorName: 'typing.Optional[str]' = None - vendorID: 'typing.Optional[uint]' = None - productName: 'typing.Optional[str]' = None - productID: 'typing.Optional[uint]' = None - nodeLabel: 'typing.Optional[str]' = None - hardwareVersion: 'typing.Optional[uint]' = None - hardwareVersionString: 'typing.Optional[str]' = None - softwareVersion: 'typing.Optional[uint]' = None - softwareVersionString: 'typing.Optional[str]' = None - manufacturingDate: 'typing.Optional[str]' = None - partNumber: 'typing.Optional[str]' = None - productURL: 'typing.Optional[str]' = None - productLabel: 'typing.Optional[str]' = None - serialNumber: 'typing.Optional[str]' = None - reachable: 'bool' = None - uniqueID: 'str' = None - productAppearance: 'typing.Optional[BridgedDeviceBasicInformation.Structs.ProductAppearanceStruct]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + vendorName: typing.Optional[str] = None + vendorID: typing.Optional[uint] = None + productName: typing.Optional[str] = None + productID: typing.Optional[uint] = None + nodeLabel: typing.Optional[str] = None + hardwareVersion: typing.Optional[uint] = None + hardwareVersionString: typing.Optional[str] = None + softwareVersion: typing.Optional[uint] = None + softwareVersionString: typing.Optional[str] = None + manufacturingDate: typing.Optional[str] = None + partNumber: typing.Optional[str] = None + productURL: typing.Optional[str] = None + productLabel: typing.Optional[str] = None + serialNumber: typing.Optional[str] = None + reachable: bool = False + uniqueID: str = "" + productAppearance: typing.Optional[BridgedDeviceBasicInformation.Structs.ProductAppearanceStruct] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ColorEnum(MatterIntEnum): @@ -11672,7 +11224,7 @@ class ColorEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 21, + kUnknownEnumValue = 21 class ProductFinishEnum(MatterIntEnum): kOther = 0x00 @@ -11685,7 +11237,7 @@ class ProductFinishEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 6, + kUnknownEnumValue = 6 class Bitmaps: class Feature(IntFlag): @@ -11711,7 +11263,7 @@ class KeepActive(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000039 command_id: typing.ClassVar[int] = 0x00000080 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -11721,8 +11273,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="timeoutMs", Tag=1, Type=uint), ]) - stayActiveDuration: 'uint' = 0 - timeoutMs: 'uint' = 0 + stayActiveDuration: uint = 0 + timeoutMs: uint = 0 class Attributes: @dataclass @@ -11739,7 +11291,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class VendorID(ClusterAttributeDescriptor): @@ -11755,7 +11307,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ProductName(ClusterAttributeDescriptor): @@ -11771,7 +11323,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class ProductID(ClusterAttributeDescriptor): @@ -11787,7 +11339,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class NodeLabel(ClusterAttributeDescriptor): @@ -11803,7 +11355,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class HardwareVersion(ClusterAttributeDescriptor): @@ -11819,7 +11371,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class HardwareVersionString(ClusterAttributeDescriptor): @@ -11835,7 +11387,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class SoftwareVersion(ClusterAttributeDescriptor): @@ -11851,7 +11403,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class SoftwareVersionString(ClusterAttributeDescriptor): @@ -11867,7 +11419,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class ManufacturingDate(ClusterAttributeDescriptor): @@ -11883,7 +11435,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class PartNumber(ClusterAttributeDescriptor): @@ -11899,7 +11451,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class ProductURL(ClusterAttributeDescriptor): @@ -11915,7 +11467,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class ProductLabel(ClusterAttributeDescriptor): @@ -11931,7 +11483,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class SerialNumber(ClusterAttributeDescriptor): @@ -11947,7 +11499,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class Reachable(ClusterAttributeDescriptor): @@ -11963,7 +11515,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class UniqueID(ClusterAttributeDescriptor): @@ -11979,7 +11531,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=str) - value: 'str' = "" + value: str = "" @dataclass class ProductAppearance(ClusterAttributeDescriptor): @@ -11995,7 +11547,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[BridgedDeviceBasicInformation.Structs.ProductAppearanceStruct]) - value: 'typing.Optional[BridgedDeviceBasicInformation.Structs.ProductAppearanceStruct]' = None + value: typing.Optional[BridgedDeviceBasicInformation.Structs.ProductAppearanceStruct] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -12011,7 +11563,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -12027,23 +11579,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000039 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -12059,7 +11595,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -12075,7 +11611,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -12091,7 +11627,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -12111,7 +11647,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=0, Type=uint), ]) - softwareVersion: 'uint' = 0 + softwareVersion: uint = 0 @dataclass class ShutDown(ClusterEvent): @@ -12162,7 +11698,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="reachableNewValue", Tag=0, Type=bool), ]) - reachableNewValue: 'bool' = False + reachableNewValue: bool = False @dataclass class ActiveChanged(ClusterEvent): @@ -12181,7 +11717,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="promisedActiveDuration", Tag=0, Type=uint), ]) - promisedActiveDuration: 'uint' = 0 + promisedActiveDuration: uint = 0 @dataclass @@ -12197,21 +11733,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="multiPressMax", Tag=0x00000002, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - numberOfPositions: 'uint' = None - currentPosition: 'uint' = None - multiPressMax: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + numberOfPositions: uint = 0 + currentPosition: uint = 0 + multiPressMax: typing.Optional[uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Bitmaps: class Feature(IntFlag): @@ -12237,7 +11771,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class CurrentPosition(ClusterAttributeDescriptor): @@ -12253,7 +11787,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class MultiPressMax(ClusterAttributeDescriptor): @@ -12269,7 +11803,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -12285,7 +11819,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -12301,23 +11835,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000003B - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -12333,7 +11851,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -12349,7 +11867,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -12365,7 +11883,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -12385,7 +11903,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="newPosition", Tag=0, Type=uint), ]) - newPosition: 'uint' = 0 + newPosition: uint = 0 @dataclass class InitialPress(ClusterEvent): @@ -12404,7 +11922,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="newPosition", Tag=0, Type=uint), ]) - newPosition: 'uint' = 0 + newPosition: uint = 0 @dataclass class LongPress(ClusterEvent): @@ -12423,7 +11941,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="newPosition", Tag=0, Type=uint), ]) - newPosition: 'uint' = 0 + newPosition: uint = 0 @dataclass class ShortRelease(ClusterEvent): @@ -12442,7 +11960,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="previousPosition", Tag=0, Type=uint), ]) - previousPosition: 'uint' = 0 + previousPosition: uint = 0 @dataclass class LongRelease(ClusterEvent): @@ -12461,7 +11979,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="previousPosition", Tag=0, Type=uint), ]) - previousPosition: 'uint' = 0 + previousPosition: uint = 0 @dataclass class MultiPressOngoing(ClusterEvent): @@ -12481,8 +11999,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="currentNumberOfPressesCounted", Tag=1, Type=uint), ]) - newPosition: 'uint' = 0 - currentNumberOfPressesCounted: 'uint' = 0 + newPosition: uint = 0 + currentNumberOfPressesCounted: uint = 0 @dataclass class MultiPressComplete(ClusterEvent): @@ -12502,8 +12020,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="totalNumberOfPressesCounted", Tag=1, Type=uint), ]) - previousPosition: 'uint' = 0 - totalNumberOfPressesCounted: 'uint' = 0 + previousPosition: uint = 0 + totalNumberOfPressesCounted: uint = 0 @dataclass @@ -12519,21 +12037,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="adminVendorId", Tag=0x00000002, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - windowStatus: 'AdministratorCommissioning.Enums.CommissioningWindowStatusEnum' = None - adminFabricIndex: 'typing.Union[Nullable, uint]' = None - adminVendorId: 'typing.Union[Nullable, uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + windowStatus: AdministratorCommissioning.Enums.CommissioningWindowStatusEnum = 0 + adminFabricIndex: typing.Union[Nullable, uint] = NullValue + adminVendorId: typing.Union[Nullable, uint] = NullValue + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class CommissioningWindowStatusEnum(MatterIntEnum): @@ -12544,7 +12060,7 @@ class CommissioningWindowStatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class StatusCode(MatterIntEnum): kBusy = 0x02 @@ -12554,7 +12070,7 @@ class StatusCode(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 0, + kUnknownEnumValue = 0 class Bitmaps: class Feature(IntFlag): @@ -12566,7 +12082,7 @@ class OpenCommissioningWindow(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000003C command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -12583,18 +12099,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: def must_use_timed_invoke(cls) -> bool: return True - commissioningTimeout: 'uint' = 0 - PAKEPasscodeVerifier: 'bytes' = b"" - discriminator: 'uint' = 0 - iterations: 'uint' = 0 - salt: 'bytes' = b"" + commissioningTimeout: uint = 0 + PAKEPasscodeVerifier: bytes = b"" + discriminator: uint = 0 + iterations: uint = 0 + salt: bytes = b"" @dataclass class OpenBasicCommissioningWindow(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000003C command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -12607,14 +12123,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: def must_use_timed_invoke(cls) -> bool: return True - commissioningTimeout: 'uint' = 0 + commissioningTimeout: uint = 0 @dataclass class RevokeCommissioning(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000003C command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -12641,7 +12157,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=AdministratorCommissioning.Enums.CommissioningWindowStatusEnum) - value: 'AdministratorCommissioning.Enums.CommissioningWindowStatusEnum' = 0 + value: AdministratorCommissioning.Enums.CommissioningWindowStatusEnum = 0 @dataclass class AdminFabricIndex(ClusterAttributeDescriptor): @@ -12657,7 +12173,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class AdminVendorId(ClusterAttributeDescriptor): @@ -12673,7 +12189,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -12689,7 +12205,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -12705,23 +12221,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000003C - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -12737,7 +12237,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -12753,7 +12253,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -12769,7 +12269,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -12788,24 +12288,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="currentFabricIndex", Tag=0x00000005, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - NOCs: 'typing.List[OperationalCredentials.Structs.NOCStruct]' = None - fabrics: 'typing.List[OperationalCredentials.Structs.FabricDescriptorStruct]' = None - supportedFabrics: 'uint' = None - commissionedFabrics: 'uint' = None - trustedRootCertificates: 'typing.List[bytes]' = None - currentFabricIndex: 'uint' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + NOCs: typing.List[OperationalCredentials.Structs.NOCStruct] = field(default_factory=lambda: []) + fabrics: typing.List[OperationalCredentials.Structs.FabricDescriptorStruct] = field(default_factory=lambda: []) + supportedFabrics: uint = 0 + commissionedFabrics: uint = 0 + trustedRootCertificates: typing.List[bytes] = field(default_factory=lambda: []) + currentFabricIndex: uint = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class CertificateChainTypeEnum(MatterIntEnum): @@ -12815,7 +12313,7 @@ class CertificateChainTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 0, + kUnknownEnumValue = 0 class NodeOperationalCertStatusEnum(MatterIntEnum): kOk = 0x00 @@ -12832,7 +12330,7 @@ class NodeOperationalCertStatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 7, + kUnknownEnumValue = 7 class Structs: @dataclass @@ -12886,14 +12384,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="attestationNonce", Tag=0, Type=bytes), ]) - attestationNonce: 'bytes' = b"" + attestationNonce: bytes = b"" @dataclass class AttestationResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000003E command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -12903,8 +12401,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="attestationSignature", Tag=1, Type=bytes), ]) - attestationElements: 'bytes' = b"" - attestationSignature: 'bytes' = b"" + attestationElements: bytes = b"" + attestationSignature: bytes = b"" @dataclass class CertificateChainRequest(ClusterCommand): @@ -12920,14 +12418,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="certificateType", Tag=0, Type=OperationalCredentials.Enums.CertificateChainTypeEnum), ]) - certificateType: 'OperationalCredentials.Enums.CertificateChainTypeEnum' = 0 + certificateType: OperationalCredentials.Enums.CertificateChainTypeEnum = 0 @dataclass class CertificateChainResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000003E command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -12936,7 +12434,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="certificate", Tag=0, Type=bytes), ]) - certificate: 'bytes' = b"" + certificate: bytes = b"" @dataclass class CSRRequest(ClusterCommand): @@ -12953,15 +12451,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="isForUpdateNOC", Tag=1, Type=typing.Optional[bool]), ]) - CSRNonce: 'bytes' = b"" - isForUpdateNOC: 'typing.Optional[bool]' = None + CSRNonce: bytes = b"" + isForUpdateNOC: typing.Optional[bool] = None @dataclass class CSRResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000003E command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -12971,8 +12469,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="attestationSignature", Tag=1, Type=bytes), ]) - NOCSRElements: 'bytes' = b"" - attestationSignature: 'bytes' = b"" + NOCSRElements: bytes = b"" + attestationSignature: bytes = b"" @dataclass class AddNOC(ClusterCommand): @@ -12992,11 +12490,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="adminVendorId", Tag=4, Type=uint), ]) - NOCValue: 'bytes' = b"" - ICACValue: 'typing.Optional[bytes]' = None - IPKValue: 'bytes' = b"" - caseAdminSubject: 'uint' = 0 - adminVendorId: 'uint' = 0 + NOCValue: bytes = b"" + ICACValue: typing.Optional[bytes] = None + IPKValue: bytes = b"" + caseAdminSubject: uint = 0 + adminVendorId: uint = 0 @dataclass class UpdateNOC(ClusterCommand): @@ -13013,15 +12511,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="ICACValue", Tag=1, Type=typing.Optional[bytes]), ]) - NOCValue: 'bytes' = b"" - ICACValue: 'typing.Optional[bytes]' = None + NOCValue: bytes = b"" + ICACValue: typing.Optional[bytes] = None @dataclass class NOCResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000003E command_id: typing.ClassVar[int] = 0x00000008 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13032,9 +12530,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="debugText", Tag=2, Type=typing.Optional[str]), ]) - statusCode: 'OperationalCredentials.Enums.NodeOperationalCertStatusEnum' = 0 - fabricIndex: 'typing.Optional[uint]' = None - debugText: 'typing.Optional[str]' = None + statusCode: OperationalCredentials.Enums.NodeOperationalCertStatusEnum = 0 + fabricIndex: typing.Optional[uint] = None + debugText: typing.Optional[str] = None @dataclass class UpdateFabricLabel(ClusterCommand): @@ -13050,7 +12548,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=str), ]) - label: 'str' = "" + label: str = "" @dataclass class RemoveFabric(ClusterCommand): @@ -13066,14 +12564,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=0, Type=uint), ]) - fabricIndex: 'uint' = 0 + fabricIndex: uint = 0 @dataclass class AddTrustedRootCertificate(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000003E command_id: typing.ClassVar[int] = 0x0000000B is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13082,7 +12580,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="rootCACertificate", Tag=0, Type=bytes), ]) - rootCACertificate: 'bytes' = b"" + rootCACertificate: bytes = b"" class Attributes: @dataclass @@ -13099,7 +12597,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[OperationalCredentials.Structs.NOCStruct]) - value: 'typing.List[OperationalCredentials.Structs.NOCStruct]' = field(default_factory=lambda: []) + value: typing.List[OperationalCredentials.Structs.NOCStruct] = field(default_factory=lambda: []) @dataclass class Fabrics(ClusterAttributeDescriptor): @@ -13115,7 +12613,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[OperationalCredentials.Structs.FabricDescriptorStruct]) - value: 'typing.List[OperationalCredentials.Structs.FabricDescriptorStruct]' = field(default_factory=lambda: []) + value: typing.List[OperationalCredentials.Structs.FabricDescriptorStruct] = field(default_factory=lambda: []) @dataclass class SupportedFabrics(ClusterAttributeDescriptor): @@ -13131,7 +12629,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class CommissionedFabrics(ClusterAttributeDescriptor): @@ -13147,7 +12645,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class TrustedRootCertificates(ClusterAttributeDescriptor): @@ -13163,7 +12661,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[bytes]) - value: 'typing.List[bytes]' = field(default_factory=lambda: []) + value: typing.List[bytes] = field(default_factory=lambda: []) @dataclass class CurrentFabricIndex(ClusterAttributeDescriptor): @@ -13179,7 +12677,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -13195,7 +12693,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -13211,23 +12709,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000003E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -13243,7 +12725,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -13259,7 +12741,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -13275,7 +12757,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -13292,22 +12774,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="maxGroupKeysPerFabric", Tag=0x00000003, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - groupKeyMap: 'typing.List[GroupKeyManagement.Structs.GroupKeyMapStruct]' = None - groupTable: 'typing.List[GroupKeyManagement.Structs.GroupInfoMapStruct]' = None - maxGroupsPerFabric: 'uint' = None - maxGroupKeysPerFabric: 'uint' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + groupKeyMap: typing.List[GroupKeyManagement.Structs.GroupKeyMapStruct] = field(default_factory=lambda: []) + groupTable: typing.List[GroupKeyManagement.Structs.GroupInfoMapStruct] = field(default_factory=lambda: []) + maxGroupsPerFabric: uint = 0 + maxGroupKeysPerFabric: uint = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class GroupKeySecurityPolicyEnum(MatterIntEnum): @@ -13317,7 +12797,7 @@ class GroupKeySecurityPolicyEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class Bitmaps: class Feature(IntFlag): @@ -13387,7 +12867,7 @@ class KeySetWrite(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000003F command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13396,7 +12876,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="groupKeySet", Tag=0, Type=GroupKeyManagement.Structs.GroupKeySetStruct), ]) - groupKeySet: 'GroupKeyManagement.Structs.GroupKeySetStruct' = field(default_factory=lambda: GroupKeyManagement.Structs.GroupKeySetStruct()) + groupKeySet: GroupKeyManagement.Structs.GroupKeySetStruct = field(default_factory=lambda: GroupKeyManagement.Structs.GroupKeySetStruct()) @dataclass class KeySetRead(ClusterCommand): @@ -13412,14 +12892,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="groupKeySetID", Tag=0, Type=uint), ]) - groupKeySetID: 'uint' = 0 + groupKeySetID: uint = 0 @dataclass class KeySetReadResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000003F command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13428,14 +12908,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="groupKeySet", Tag=0, Type=GroupKeyManagement.Structs.GroupKeySetStruct), ]) - groupKeySet: 'GroupKeyManagement.Structs.GroupKeySetStruct' = field(default_factory=lambda: GroupKeyManagement.Structs.GroupKeySetStruct()) + groupKeySet: GroupKeyManagement.Structs.GroupKeySetStruct = field(default_factory=lambda: GroupKeyManagement.Structs.GroupKeySetStruct()) @dataclass class KeySetRemove(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000003F command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13444,7 +12924,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="groupKeySetID", Tag=0, Type=uint), ]) - groupKeySetID: 'uint' = 0 + groupKeySetID: uint = 0 @dataclass class KeySetReadAllIndices(ClusterCommand): @@ -13464,7 +12944,7 @@ class KeySetReadAllIndicesResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000003F command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -13473,7 +12953,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="groupKeySetIDs", Tag=0, Type=typing.List[uint]), ]) - groupKeySetIDs: 'typing.List[uint]' = field(default_factory=lambda: []) + groupKeySetIDs: typing.List[uint] = field(default_factory=lambda: []) class Attributes: @dataclass @@ -13490,7 +12970,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[GroupKeyManagement.Structs.GroupKeyMapStruct]) - value: 'typing.List[GroupKeyManagement.Structs.GroupKeyMapStruct]' = field(default_factory=lambda: []) + value: typing.List[GroupKeyManagement.Structs.GroupKeyMapStruct] = field(default_factory=lambda: []) @dataclass class GroupTable(ClusterAttributeDescriptor): @@ -13506,7 +12986,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[GroupKeyManagement.Structs.GroupInfoMapStruct]) - value: 'typing.List[GroupKeyManagement.Structs.GroupInfoMapStruct]' = field(default_factory=lambda: []) + value: typing.List[GroupKeyManagement.Structs.GroupInfoMapStruct] = field(default_factory=lambda: []) @dataclass class MaxGroupsPerFabric(ClusterAttributeDescriptor): @@ -13522,7 +13002,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class MaxGroupKeysPerFabric(ClusterAttributeDescriptor): @@ -13538,7 +13018,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -13554,7 +13034,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -13570,23 +13050,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000003F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -13602,7 +13066,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -13618,7 +13082,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -13634,7 +13098,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -13648,19 +13112,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="labelList", Tag=0x00000000, Type=typing.List[FixedLabel.Structs.LabelStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - labelList: 'typing.List[FixedLabel.Structs.LabelStruct]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + labelList: typing.List[FixedLabel.Structs.LabelStruct] = field(default_factory=lambda: []) + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Structs: @dataclass @@ -13691,7 +13153,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[FixedLabel.Structs.LabelStruct]) - value: 'typing.List[FixedLabel.Structs.LabelStruct]' = field(default_factory=lambda: []) + value: typing.List[FixedLabel.Structs.LabelStruct] = field(default_factory=lambda: []) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -13707,7 +13169,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -13723,23 +13185,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000040 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -13755,7 +13201,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -13771,7 +13217,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -13787,7 +13233,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -13801,19 +13247,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="labelList", Tag=0x00000000, Type=typing.List[UserLabel.Structs.LabelStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - labelList: 'typing.List[UserLabel.Structs.LabelStruct]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + labelList: typing.List[UserLabel.Structs.LabelStruct] = field(default_factory=lambda: []) + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Structs: @dataclass @@ -13844,7 +13288,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[UserLabel.Structs.LabelStruct]) - value: 'typing.List[UserLabel.Structs.LabelStruct]' = field(default_factory=lambda: []) + value: typing.List[UserLabel.Structs.LabelStruct] = field(default_factory=lambda: []) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -13860,7 +13304,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -13876,23 +13320,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000041 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -13908,7 +13336,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -13924,7 +13352,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -13940,7 +13368,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -13953,18 +13381,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Attributes: @dataclass @@ -13981,7 +13407,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -13997,23 +13423,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000042 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -14029,7 +13439,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -14045,7 +13455,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -14061,7 +13471,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -14074,18 +13484,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Attributes: @dataclass @@ -14102,7 +13510,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -14118,23 +13526,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000043 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -14150,7 +13542,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -14166,7 +13558,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -14182,7 +13574,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -14195,18 +13587,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Attributes: @dataclass @@ -14223,7 +13613,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -14239,23 +13629,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000044 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -14271,7 +13645,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -14287,7 +13661,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -14303,7 +13677,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -14317,19 +13691,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="stateValue", Tag=0x00000000, Type=bool), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - stateValue: 'bool' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + stateValue: bool = False + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Attributes: @dataclass @@ -14346,7 +13718,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -14362,7 +13734,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -14378,23 +13750,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000045 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -14410,7 +13766,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -14426,7 +13782,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -14442,7 +13798,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -14462,7 +13818,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="stateValue", Tag=0, Type=bool), ]) - stateValue: 'bool' = False + stateValue: bool = False @dataclass @@ -14485,28 +13841,26 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="maximumCheckInBackOff", Tag=0x00000009, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - idleModeDuration: 'uint' = None - activeModeDuration: 'uint' = None - activeModeThreshold: 'uint' = None - registeredClients: 'typing.Optional[typing.List[IcdManagement.Structs.MonitoringRegistrationStruct]]' = None - ICDCounter: 'typing.Optional[uint]' = None - clientsSupportedPerFabric: 'typing.Optional[uint]' = None - userActiveModeTriggerHint: 'typing.Optional[uint]' = None - userActiveModeTriggerInstruction: 'typing.Optional[str]' = None - operatingMode: 'typing.Optional[IcdManagement.Enums.OperatingModeEnum]' = None - maximumCheckInBackOff: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + idleModeDuration: uint = 0 + activeModeDuration: uint = 0 + activeModeThreshold: uint = 0 + registeredClients: typing.Optional[typing.List[IcdManagement.Structs.MonitoringRegistrationStruct]] = None + ICDCounter: typing.Optional[uint] = None + clientsSupportedPerFabric: typing.Optional[uint] = None + userActiveModeTriggerHint: typing.Optional[uint] = None + userActiveModeTriggerInstruction: typing.Optional[str] = None + operatingMode: typing.Optional[IcdManagement.Enums.OperatingModeEnum] = None + maximumCheckInBackOff: typing.Optional[uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ClientTypeEnum(MatterIntEnum): @@ -14516,7 +13870,7 @@ class ClientTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class OperatingModeEnum(MatterIntEnum): kSit = 0x00 @@ -14525,7 +13879,7 @@ class OperatingModeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class Bitmaps: class Feature(IntFlag): @@ -14590,18 +13944,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clientType", Tag=4, Type=IcdManagement.Enums.ClientTypeEnum), ]) - checkInNodeID: 'uint' = 0 - monitoredSubject: 'uint' = 0 - key: 'bytes' = b"" - verificationKey: 'typing.Optional[bytes]' = None - clientType: 'IcdManagement.Enums.ClientTypeEnum' = 0 + checkInNodeID: uint = 0 + monitoredSubject: uint = 0 + key: bytes = b"" + verificationKey: typing.Optional[bytes] = None + clientType: IcdManagement.Enums.ClientTypeEnum = 0 @dataclass class RegisterClientResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000046 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14610,14 +13964,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="ICDCounter", Tag=0, Type=uint), ]) - ICDCounter: 'uint' = 0 + ICDCounter: uint = 0 @dataclass class UnregisterClient(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000046 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14627,8 +13981,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="verificationKey", Tag=1, Type=typing.Optional[bytes]), ]) - checkInNodeID: 'uint' = 0 - verificationKey: 'typing.Optional[bytes]' = None + checkInNodeID: uint = 0 + verificationKey: typing.Optional[bytes] = None @dataclass class StayActiveRequest(ClusterCommand): @@ -14644,14 +13998,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="stayActiveDuration", Tag=0, Type=uint), ]) - stayActiveDuration: 'uint' = 0 + stayActiveDuration: uint = 0 @dataclass class StayActiveResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000046 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14660,7 +14014,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="promisedActiveDuration", Tag=0, Type=uint), ]) - promisedActiveDuration: 'uint' = 0 + promisedActiveDuration: uint = 0 class Attributes: @dataclass @@ -14677,7 +14031,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ActiveModeDuration(ClusterAttributeDescriptor): @@ -14693,7 +14047,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ActiveModeThreshold(ClusterAttributeDescriptor): @@ -14709,7 +14063,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class RegisteredClients(ClusterAttributeDescriptor): @@ -14725,7 +14079,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[IcdManagement.Structs.MonitoringRegistrationStruct]]) - value: 'typing.Optional[typing.List[IcdManagement.Structs.MonitoringRegistrationStruct]]' = None + value: typing.Optional[typing.List[IcdManagement.Structs.MonitoringRegistrationStruct]] = None @dataclass class ICDCounter(ClusterAttributeDescriptor): @@ -14741,7 +14095,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ClientsSupportedPerFabric(ClusterAttributeDescriptor): @@ -14757,7 +14111,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class UserActiveModeTriggerHint(ClusterAttributeDescriptor): @@ -14773,7 +14127,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class UserActiveModeTriggerInstruction(ClusterAttributeDescriptor): @@ -14789,7 +14143,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class OperatingMode(ClusterAttributeDescriptor): @@ -14805,7 +14159,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[IcdManagement.Enums.OperatingModeEnum]) - value: 'typing.Optional[IcdManagement.Enums.OperatingModeEnum]' = None + value: typing.Optional[IcdManagement.Enums.OperatingModeEnum] = None @dataclass class MaximumCheckInBackOff(ClusterAttributeDescriptor): @@ -14821,7 +14175,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -14837,7 +14191,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -14853,23 +14207,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000046 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -14885,7 +14223,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -14901,7 +14239,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -14917,7 +14255,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -14933,21 +14271,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="timerState", Tag=0x00000002, Type=Timer.Enums.TimerStatusEnum), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - setTime: 'uint' = None - timeRemaining: 'uint' = None - timerState: 'Timer.Enums.TimerStatusEnum' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + setTime: uint = 0 + timeRemaining: uint = 0 + timerState: Timer.Enums.TimerStatusEnum = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class TimerStatusEnum(MatterIntEnum): @@ -14959,7 +14295,7 @@ class TimerStatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class Bitmaps: class Feature(IntFlag): @@ -14971,7 +14307,7 @@ class SetTimer(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000047 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -14980,14 +14316,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="newTime", Tag=0, Type=uint), ]) - newTime: 'uint' = 0 + newTime: uint = 0 @dataclass class ResetTimer(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000047 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -15000,7 +14336,7 @@ class AddTime(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000047 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -15009,14 +14345,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="additionalTime", Tag=0, Type=uint), ]) - additionalTime: 'uint' = 0 + additionalTime: uint = 0 @dataclass class ReduceTime(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000047 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -15025,7 +14361,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="timeReduction", Tag=0, Type=uint), ]) - timeReduction: 'uint' = 0 + timeReduction: uint = 0 class Attributes: @dataclass @@ -15042,7 +14378,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class TimeRemaining(ClusterAttributeDescriptor): @@ -15058,7 +14394,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class TimerState(ClusterAttributeDescriptor): @@ -15074,7 +14410,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=Timer.Enums.TimerStatusEnum) - value: 'Timer.Enums.TimerStatusEnum' = 0 + value: Timer.Enums.TimerStatusEnum = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -15090,7 +14426,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -15106,23 +14442,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000047 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -15138,7 +14458,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -15154,7 +14474,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -15170,7 +14490,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -15189,24 +14509,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="operationalError", Tag=0x00000005, Type=OvenCavityOperationalState.Structs.ErrorStateStruct), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - phaseList: 'typing.Union[Nullable, typing.List[str]]' = None - currentPhase: 'typing.Union[Nullable, uint]' = None - countdownTime: 'typing.Union[None, Nullable, uint]' = None - operationalStateList: 'typing.List[OvenCavityOperationalState.Structs.OperationalStateStruct]' = None - operationalState: 'OvenCavityOperationalState.Enums.OperationalStateEnum' = None - operationalError: 'OvenCavityOperationalState.Structs.ErrorStateStruct' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + phaseList: typing.Union[Nullable, typing.List[str]] = NullValue + currentPhase: typing.Union[Nullable, uint] = NullValue + countdownTime: typing.Union[None, Nullable, uint] = None + operationalStateList: typing.List[OvenCavityOperationalState.Structs.OperationalStateStruct] = field(default_factory=lambda: []) + operationalState: OvenCavityOperationalState.Enums.OperationalStateEnum = 0 + operationalError: OvenCavityOperationalState.Structs.ErrorStateStruct = field(default_factory=lambda: OvenCavityOperationalState.Structs.ErrorStateStruct()) + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ErrorStateEnum(MatterIntEnum): @@ -15218,7 +14536,7 @@ class ErrorStateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class OperationalStateEnum(MatterIntEnum): kStopped = 0x00 @@ -15229,7 +14547,7 @@ class OperationalStateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class Structs: @dataclass @@ -15318,7 +14636,7 @@ class OperationalCommandResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000048 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -15327,7 +14645,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="commandResponseState", Tag=0, Type=OvenCavityOperationalState.Structs.ErrorStateStruct), ]) - commandResponseState: 'OvenCavityOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: OvenCavityOperationalState.Structs.ErrorStateStruct()) + commandResponseState: OvenCavityOperationalState.Structs.ErrorStateStruct = field(default_factory=lambda: OvenCavityOperationalState.Structs.ErrorStateStruct()) class Attributes: @dataclass @@ -15344,7 +14662,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, typing.List[str]]) - value: 'typing.Union[Nullable, typing.List[str]]' = NullValue + value: typing.Union[Nullable, typing.List[str]] = NullValue @dataclass class CurrentPhase(ClusterAttributeDescriptor): @@ -15360,7 +14678,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class CountdownTime(ClusterAttributeDescriptor): @@ -15376,7 +14694,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class OperationalStateList(ClusterAttributeDescriptor): @@ -15392,7 +14710,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[OvenCavityOperationalState.Structs.OperationalStateStruct]) - value: 'typing.List[OvenCavityOperationalState.Structs.OperationalStateStruct]' = field(default_factory=lambda: []) + value: typing.List[OvenCavityOperationalState.Structs.OperationalStateStruct] = field(default_factory=lambda: []) @dataclass class OperationalState(ClusterAttributeDescriptor): @@ -15408,7 +14726,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=OvenCavityOperationalState.Enums.OperationalStateEnum) - value: 'OvenCavityOperationalState.Enums.OperationalStateEnum' = 0 + value: OvenCavityOperationalState.Enums.OperationalStateEnum = 0 @dataclass class OperationalError(ClusterAttributeDescriptor): @@ -15424,7 +14742,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=OvenCavityOperationalState.Structs.ErrorStateStruct) - value: 'OvenCavityOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: OvenCavityOperationalState.Structs.ErrorStateStruct()) + value: OvenCavityOperationalState.Structs.ErrorStateStruct = field(default_factory=lambda: OvenCavityOperationalState.Structs.ErrorStateStruct()) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -15440,7 +14758,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -15456,23 +14774,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000048 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -15488,7 +14790,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -15504,7 +14806,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -15520,7 +14822,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -15540,7 +14842,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="errorState", Tag=0, Type=OvenCavityOperationalState.Structs.ErrorStateStruct), ]) - errorState: 'OvenCavityOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: OvenCavityOperationalState.Structs.ErrorStateStruct()) + errorState: OvenCavityOperationalState.Structs.ErrorStateStruct = field(default_factory=lambda: OvenCavityOperationalState.Structs.ErrorStateStruct()) @dataclass class OperationCompletion(ClusterEvent): @@ -15561,9 +14863,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="pausedTime", Tag=2, Type=typing.Union[None, Nullable, uint]), ]) - completionErrorCode: 'uint' = 0 - totalOperationalTime: 'typing.Union[None, Nullable, uint]' = None - pausedTime: 'typing.Union[None, Nullable, uint]' = None + completionErrorCode: uint = 0 + totalOperationalTime: typing.Union[None, Nullable, uint] = None + pausedTime: typing.Union[None, Nullable, uint] = None @dataclass @@ -15580,22 +14882,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - supportedModes: 'typing.List[OvenMode.Structs.ModeOptionStruct]' = None - currentMode: 'uint' = None - startUpMode: 'typing.Union[None, Nullable, uint]' = None - onMode: 'typing.Union[None, Nullable, uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + supportedModes: typing.List[OvenMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) + currentMode: uint = 0 + startUpMode: typing.Union[None, Nullable, uint] = None + onMode: typing.Union[None, Nullable, uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ModeTag(MatterIntEnum): @@ -15622,7 +14922,7 @@ class ModeTag(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 10, + kUnknownEnumValue = 10 class Bitmaps: class Feature(IntFlag): @@ -15672,14 +14972,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), ]) - newMode: 'uint' = 0 + newMode: uint = 0 @dataclass class ChangeToModeResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000049 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -15689,8 +14989,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), ]) - status: 'uint' = 0 - statusText: 'typing.Optional[str]' = None + status: uint = 0 + statusText: typing.Optional[str] = None class Attributes: @dataclass @@ -15707,7 +15007,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[OvenMode.Structs.ModeOptionStruct]) - value: 'typing.List[OvenMode.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + value: typing.List[OvenMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) @dataclass class CurrentMode(ClusterAttributeDescriptor): @@ -15723,7 +15023,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class StartUpMode(ClusterAttributeDescriptor): @@ -15739,7 +15039,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class OnMode(ClusterAttributeDescriptor): @@ -15755,7 +15055,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -15771,7 +15071,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -15787,23 +15087,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000049 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -15819,7 +15103,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -15835,7 +15119,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -15851,7 +15135,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -15866,20 +15150,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="selectedDrynessLevel", Tag=0x00000001, Type=typing.Union[Nullable, LaundryDryerControls.Enums.DrynessLevelEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - supportedDrynessLevels: 'typing.List[LaundryDryerControls.Enums.DrynessLevelEnum]' = None - selectedDrynessLevel: 'typing.Union[Nullable, LaundryDryerControls.Enums.DrynessLevelEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + supportedDrynessLevels: typing.List[LaundryDryerControls.Enums.DrynessLevelEnum] = field(default_factory=lambda: []) + selectedDrynessLevel: typing.Union[Nullable, LaundryDryerControls.Enums.DrynessLevelEnum] = NullValue + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class DrynessLevelEnum(MatterIntEnum): @@ -15891,7 +15173,7 @@ class DrynessLevelEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class Attributes: @dataclass @@ -15908,7 +15190,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[LaundryDryerControls.Enums.DrynessLevelEnum]) - value: 'typing.List[LaundryDryerControls.Enums.DrynessLevelEnum]' = field(default_factory=lambda: []) + value: typing.List[LaundryDryerControls.Enums.DrynessLevelEnum] = field(default_factory=lambda: []) @dataclass class SelectedDrynessLevel(ClusterAttributeDescriptor): @@ -15924,7 +15206,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, LaundryDryerControls.Enums.DrynessLevelEnum]) - value: 'typing.Union[Nullable, LaundryDryerControls.Enums.DrynessLevelEnum]' = NullValue + value: typing.Union[Nullable, LaundryDryerControls.Enums.DrynessLevelEnum] = NullValue @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -15940,7 +15222,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -15956,23 +15238,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000004A - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -15988,7 +15254,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -16004,7 +15270,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -16020,7 +15286,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -16039,24 +15305,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - description: 'str' = None - standardNamespace: 'typing.Union[Nullable, uint]' = None - supportedModes: 'typing.List[ModeSelect.Structs.ModeOptionStruct]' = None - currentMode: 'uint' = None - startUpMode: 'typing.Union[None, Nullable, uint]' = None - onMode: 'typing.Union[None, Nullable, uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + description: str = "" + standardNamespace: typing.Union[Nullable, uint] = NullValue + supportedModes: typing.List[ModeSelect.Structs.ModeOptionStruct] = field(default_factory=lambda: []) + currentMode: uint = 0 + startUpMode: typing.Union[None, Nullable, uint] = None + onMode: typing.Union[None, Nullable, uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Bitmaps: class Feature(IntFlag): @@ -16097,7 +15361,7 @@ class ChangeToMode(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000050 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -16106,7 +15370,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), ]) - newMode: 'uint' = 0 + newMode: uint = 0 class Attributes: @dataclass @@ -16123,7 +15387,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=str) - value: 'str' = "" + value: str = "" @dataclass class StandardNamespace(ClusterAttributeDescriptor): @@ -16139,7 +15403,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class SupportedModes(ClusterAttributeDescriptor): @@ -16155,7 +15419,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[ModeSelect.Structs.ModeOptionStruct]) - value: 'typing.List[ModeSelect.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + value: typing.List[ModeSelect.Structs.ModeOptionStruct] = field(default_factory=lambda: []) @dataclass class CurrentMode(ClusterAttributeDescriptor): @@ -16171,7 +15435,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class StartUpMode(ClusterAttributeDescriptor): @@ -16187,7 +15451,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class OnMode(ClusterAttributeDescriptor): @@ -16203,7 +15467,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -16219,7 +15483,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -16235,23 +15499,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000050 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -16267,7 +15515,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -16283,7 +15531,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -16299,7 +15547,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -16316,22 +15564,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - supportedModes: 'typing.List[LaundryWasherMode.Structs.ModeOptionStruct]' = None - currentMode: 'uint' = None - startUpMode: 'typing.Union[None, Nullable, uint]' = None - onMode: 'typing.Union[None, Nullable, uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + supportedModes: typing.List[LaundryWasherMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) + currentMode: uint = 0 + startUpMode: typing.Union[None, Nullable, uint] = None + onMode: typing.Union[None, Nullable, uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ModeTag(MatterIntEnum): @@ -16403,14 +15649,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), ]) - newMode: 'uint' = 0 + newMode: uint = 0 @dataclass class ChangeToModeResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000051 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -16420,8 +15666,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), ]) - status: 'uint' = 0 - statusText: 'typing.Optional[str]' = None + status: uint = 0 + statusText: typing.Optional[str] = None class Attributes: @dataclass @@ -16438,7 +15684,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[LaundryWasherMode.Structs.ModeOptionStruct]) - value: 'typing.List[LaundryWasherMode.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + value: typing.List[LaundryWasherMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) @dataclass class CurrentMode(ClusterAttributeDescriptor): @@ -16454,7 +15700,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class StartUpMode(ClusterAttributeDescriptor): @@ -16470,7 +15716,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class OnMode(ClusterAttributeDescriptor): @@ -16486,7 +15732,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -16502,7 +15748,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -16518,23 +15764,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000051 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -16550,7 +15780,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -16566,7 +15796,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -16582,7 +15812,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -16599,22 +15829,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - supportedModes: 'typing.List[RefrigeratorAndTemperatureControlledCabinetMode.Structs.ModeOptionStruct]' = None - currentMode: 'uint' = None - startUpMode: 'typing.Union[None, Nullable, uint]' = None - onMode: 'typing.Union[None, Nullable, uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + supportedModes: typing.List[RefrigeratorAndTemperatureControlledCabinetMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) + currentMode: uint = 0 + startUpMode: typing.Union[None, Nullable, uint] = None + onMode: typing.Union[None, Nullable, uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ModeTag(MatterIntEnum): @@ -16684,14 +15912,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), ]) - newMode: 'uint' = 0 + newMode: uint = 0 @dataclass class ChangeToModeResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000052 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -16701,8 +15929,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), ]) - status: 'uint' = 0 - statusText: 'typing.Optional[str]' = None + status: uint = 0 + statusText: typing.Optional[str] = None class Attributes: @dataclass @@ -16719,7 +15947,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[RefrigeratorAndTemperatureControlledCabinetMode.Structs.ModeOptionStruct]) - value: 'typing.List[RefrigeratorAndTemperatureControlledCabinetMode.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + value: typing.List[RefrigeratorAndTemperatureControlledCabinetMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) @dataclass class CurrentMode(ClusterAttributeDescriptor): @@ -16735,7 +15963,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class StartUpMode(ClusterAttributeDescriptor): @@ -16751,7 +15979,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class OnMode(ClusterAttributeDescriptor): @@ -16767,7 +15995,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -16783,7 +16011,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -16799,23 +16027,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000052 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -16831,7 +16043,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -16847,7 +16059,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -16863,7 +16075,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -16880,22 +16092,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="supportedRinses", Tag=0x00000003, Type=typing.Optional[typing.List[LaundryWasherControls.Enums.NumberOfRinsesEnum]]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - spinSpeeds: 'typing.Optional[typing.List[str]]' = None - spinSpeedCurrent: 'typing.Union[None, Nullable, uint]' = None - numberOfRinses: 'typing.Optional[LaundryWasherControls.Enums.NumberOfRinsesEnum]' = None - supportedRinses: 'typing.Optional[typing.List[LaundryWasherControls.Enums.NumberOfRinsesEnum]]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + spinSpeeds: typing.Optional[typing.List[str]] = None + spinSpeedCurrent: typing.Union[None, Nullable, uint] = None + numberOfRinses: typing.Optional[LaundryWasherControls.Enums.NumberOfRinsesEnum] = None + supportedRinses: typing.Optional[typing.List[LaundryWasherControls.Enums.NumberOfRinsesEnum]] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class NumberOfRinsesEnum(MatterIntEnum): @@ -16907,7 +16117,7 @@ class NumberOfRinsesEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class Bitmaps: class Feature(IntFlag): @@ -16929,7 +16139,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[str]]) - value: 'typing.Optional[typing.List[str]]' = None + value: typing.Optional[typing.List[str]] = None @dataclass class SpinSpeedCurrent(ClusterAttributeDescriptor): @@ -16945,7 +16155,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class NumberOfRinses(ClusterAttributeDescriptor): @@ -16961,7 +16171,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[LaundryWasherControls.Enums.NumberOfRinsesEnum]) - value: 'typing.Optional[LaundryWasherControls.Enums.NumberOfRinsesEnum]' = None + value: typing.Optional[LaundryWasherControls.Enums.NumberOfRinsesEnum] = None @dataclass class SupportedRinses(ClusterAttributeDescriptor): @@ -16977,7 +16187,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[LaundryWasherControls.Enums.NumberOfRinsesEnum]]) - value: 'typing.Optional[typing.List[LaundryWasherControls.Enums.NumberOfRinsesEnum]]' = None + value: typing.Optional[typing.List[LaundryWasherControls.Enums.NumberOfRinsesEnum]] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -16993,7 +16203,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -17009,23 +16219,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000053 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -17041,7 +16235,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -17057,7 +16251,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -17073,7 +16267,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -17088,20 +16282,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000001, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - supportedModes: 'typing.List[RvcRunMode.Structs.ModeOptionStruct]' = None - currentMode: 'uint' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + supportedModes: typing.List[RvcRunMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) + currentMode: uint = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ModeTag(MatterIntEnum): @@ -17187,14 +16379,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), ]) - newMode: 'uint' = 0 + newMode: uint = 0 @dataclass class ChangeToModeResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000054 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -17204,8 +16396,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), ]) - status: 'uint' = 0 - statusText: 'typing.Optional[str]' = None + status: uint = 0 + statusText: typing.Optional[str] = None class Attributes: @dataclass @@ -17222,7 +16414,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[RvcRunMode.Structs.ModeOptionStruct]) - value: 'typing.List[RvcRunMode.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + value: typing.List[RvcRunMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) @dataclass class CurrentMode(ClusterAttributeDescriptor): @@ -17238,7 +16430,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -17254,7 +16446,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -17270,23 +16462,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000054 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -17302,7 +16478,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -17318,7 +16494,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -17334,7 +16510,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -17349,20 +16525,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000001, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - supportedModes: 'typing.List[RvcCleanMode.Structs.ModeOptionStruct]' = None - currentMode: 'uint' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + supportedModes: typing.List[RvcCleanMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) + currentMode: uint = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ModeTag(MatterIntEnum): @@ -17441,14 +16615,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), ]) - newMode: 'uint' = 0 + newMode: uint = 0 @dataclass class ChangeToModeResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000055 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -17458,8 +16632,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), ]) - status: 'uint' = 0 - statusText: 'typing.Optional[str]' = None + status: uint = 0 + statusText: typing.Optional[str] = None class Attributes: @dataclass @@ -17476,7 +16650,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[RvcCleanMode.Structs.ModeOptionStruct]) - value: 'typing.List[RvcCleanMode.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + value: typing.List[RvcCleanMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) @dataclass class CurrentMode(ClusterAttributeDescriptor): @@ -17492,7 +16666,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -17508,7 +16682,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -17524,23 +16698,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000055 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -17556,7 +16714,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -17572,7 +16730,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -17588,7 +16746,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -17607,24 +16765,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="supportedTemperatureLevels", Tag=0x00000005, Type=typing.Optional[typing.List[str]]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - temperatureSetpoint: 'typing.Optional[int]' = None - minTemperature: 'typing.Optional[int]' = None - maxTemperature: 'typing.Optional[int]' = None - step: 'typing.Optional[int]' = None - selectedTemperatureLevel: 'typing.Optional[uint]' = None - supportedTemperatureLevels: 'typing.Optional[typing.List[str]]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + temperatureSetpoint: typing.Optional[int] = None + minTemperature: typing.Optional[int] = None + maxTemperature: typing.Optional[int] = None + step: typing.Optional[int] = None + selectedTemperatureLevel: typing.Optional[uint] = None + supportedTemperatureLevels: typing.Optional[typing.List[str]] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Bitmaps: class Feature(IntFlag): @@ -17638,7 +16794,7 @@ class SetTemperature(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000056 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -17648,8 +16804,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="targetTemperatureLevel", Tag=1, Type=typing.Optional[uint]), ]) - targetTemperature: 'typing.Optional[int]' = None - targetTemperatureLevel: 'typing.Optional[uint]' = None + targetTemperature: typing.Optional[int] = None + targetTemperatureLevel: typing.Optional[uint] = None class Attributes: @dataclass @@ -17666,7 +16822,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class MinTemperature(ClusterAttributeDescriptor): @@ -17682,7 +16838,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class MaxTemperature(ClusterAttributeDescriptor): @@ -17698,7 +16854,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class Step(ClusterAttributeDescriptor): @@ -17714,7 +16870,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class SelectedTemperatureLevel(ClusterAttributeDescriptor): @@ -17730,7 +16886,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class SupportedTemperatureLevels(ClusterAttributeDescriptor): @@ -17746,7 +16902,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[str]]) - value: 'typing.Optional[typing.List[str]]' = None + value: typing.Optional[typing.List[str]] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -17762,7 +16918,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -17778,23 +16934,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000056 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -17810,7 +16950,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -17826,7 +16966,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -17842,7 +16982,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -17858,21 +16998,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="supported", Tag=0x00000003, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - mask: 'uint' = None - state: 'uint' = None - supported: 'uint' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + mask: uint = 0 + state: uint = 0 + supported: uint = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Bitmaps: class AlarmBitmap(IntFlag): @@ -17893,7 +17031,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class State(ClusterAttributeDescriptor): @@ -17909,7 +17047,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Supported(ClusterAttributeDescriptor): @@ -17925,7 +17063,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -17941,7 +17079,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -17957,23 +17095,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000057 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -17989,7 +17111,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -18005,7 +17127,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -18021,7 +17143,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -18044,10 +17166,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="mask", Tag=3, Type=uint), ]) - active: 'uint' = 0 - inactive: 'uint' = 0 - state: 'uint' = 0 - mask: 'uint' = 0 + active: uint = 0 + inactive: uint = 0 + state: uint = 0 + mask: uint = 0 @dataclass @@ -18064,22 +17186,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - supportedModes: 'typing.List[DishwasherMode.Structs.ModeOptionStruct]' = None - currentMode: 'uint' = None - startUpMode: 'typing.Union[None, Nullable, uint]' = None - onMode: 'typing.Union[None, Nullable, uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + supportedModes: typing.List[DishwasherMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) + currentMode: uint = 0 + startUpMode: typing.Union[None, Nullable, uint] = None + onMode: typing.Union[None, Nullable, uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ModeTag(MatterIntEnum): @@ -18150,14 +17270,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), ]) - newMode: 'uint' = 0 + newMode: uint = 0 @dataclass class ChangeToModeResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000059 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18167,8 +17287,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), ]) - status: 'uint' = 0 - statusText: 'typing.Optional[str]' = None + status: uint = 0 + statusText: typing.Optional[str] = None class Attributes: @dataclass @@ -18185,7 +17305,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[DishwasherMode.Structs.ModeOptionStruct]) - value: 'typing.List[DishwasherMode.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + value: typing.List[DishwasherMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) @dataclass class CurrentMode(ClusterAttributeDescriptor): @@ -18201,7 +17321,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class StartUpMode(ClusterAttributeDescriptor): @@ -18217,7 +17337,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class OnMode(ClusterAttributeDescriptor): @@ -18233,7 +17353,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -18249,7 +17369,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -18265,23 +17385,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000059 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -18297,7 +17401,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -18313,7 +17417,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -18329,7 +17433,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -18343,19 +17447,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="airQuality", Tag=0x00000000, Type=AirQuality.Enums.AirQualityEnum), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - airQuality: 'AirQuality.Enums.AirQualityEnum' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + airQuality: AirQuality.Enums.AirQualityEnum = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class AirQualityEnum(MatterIntEnum): @@ -18370,7 +17472,7 @@ class AirQualityEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 7, + kUnknownEnumValue = 7 class Bitmaps: class Feature(IntFlag): @@ -18394,7 +17496,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=AirQuality.Enums.AirQualityEnum) - value: 'AirQuality.Enums.AirQualityEnum' = 0 + value: AirQuality.Enums.AirQualityEnum = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -18410,7 +17512,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -18426,23 +17528,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000005B - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -18458,7 +17544,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -18474,7 +17560,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -18490,7 +17576,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -18516,31 +17602,29 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="expiryDate", Tag=0x0000000C, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - expressedState: 'SmokeCoAlarm.Enums.ExpressedStateEnum' = None - smokeState: 'typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum]' = None - COState: 'typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum]' = None - batteryAlert: 'SmokeCoAlarm.Enums.AlarmStateEnum' = None - deviceMuted: 'typing.Optional[SmokeCoAlarm.Enums.MuteStateEnum]' = None - testInProgress: 'bool' = None - hardwareFaultAlert: 'bool' = None - endOfServiceAlert: 'SmokeCoAlarm.Enums.EndOfServiceEnum' = None - interconnectSmokeAlarm: 'typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum]' = None - interconnectCOAlarm: 'typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum]' = None - contaminationState: 'typing.Optional[SmokeCoAlarm.Enums.ContaminationStateEnum]' = None - smokeSensitivityLevel: 'typing.Optional[SmokeCoAlarm.Enums.SensitivityEnum]' = None - expiryDate: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + expressedState: SmokeCoAlarm.Enums.ExpressedStateEnum = 0 + smokeState: typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum] = None + COState: typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum] = None + batteryAlert: SmokeCoAlarm.Enums.AlarmStateEnum = 0 + deviceMuted: typing.Optional[SmokeCoAlarm.Enums.MuteStateEnum] = None + testInProgress: bool = False + hardwareFaultAlert: bool = False + endOfServiceAlert: SmokeCoAlarm.Enums.EndOfServiceEnum = 0 + interconnectSmokeAlarm: typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum] = None + interconnectCOAlarm: typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum] = None + contaminationState: typing.Optional[SmokeCoAlarm.Enums.ContaminationStateEnum] = None + smokeSensitivityLevel: typing.Optional[SmokeCoAlarm.Enums.SensitivityEnum] = None + expiryDate: typing.Optional[uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class AlarmStateEnum(MatterIntEnum): @@ -18551,7 +17635,7 @@ class AlarmStateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class ContaminationStateEnum(MatterIntEnum): kNormal = 0x00 @@ -18562,7 +17646,7 @@ class ContaminationStateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class EndOfServiceEnum(MatterIntEnum): kNormal = 0x00 @@ -18571,7 +17655,7 @@ class EndOfServiceEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class ExpressedStateEnum(MatterIntEnum): kNormal = 0x00 @@ -18587,7 +17671,7 @@ class ExpressedStateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 9, + kUnknownEnumValue = 9 class MuteStateEnum(MatterIntEnum): kNotMuted = 0x00 @@ -18596,7 +17680,7 @@ class MuteStateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class SensitivityEnum(MatterIntEnum): kHigh = 0x00 @@ -18606,7 +17690,7 @@ class SensitivityEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class Bitmaps: class Feature(IntFlag): @@ -18619,7 +17703,7 @@ class SelfTestRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000005C command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -18642,7 +17726,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=SmokeCoAlarm.Enums.ExpressedStateEnum) - value: 'SmokeCoAlarm.Enums.ExpressedStateEnum' = 0 + value: SmokeCoAlarm.Enums.ExpressedStateEnum = 0 @dataclass class SmokeState(ClusterAttributeDescriptor): @@ -18658,7 +17742,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum]) - value: 'typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum]' = None + value: typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum] = None @dataclass class COState(ClusterAttributeDescriptor): @@ -18674,7 +17758,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum]) - value: 'typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum]' = None + value: typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum] = None @dataclass class BatteryAlert(ClusterAttributeDescriptor): @@ -18690,7 +17774,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=SmokeCoAlarm.Enums.AlarmStateEnum) - value: 'SmokeCoAlarm.Enums.AlarmStateEnum' = 0 + value: SmokeCoAlarm.Enums.AlarmStateEnum = 0 @dataclass class DeviceMuted(ClusterAttributeDescriptor): @@ -18706,7 +17790,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[SmokeCoAlarm.Enums.MuteStateEnum]) - value: 'typing.Optional[SmokeCoAlarm.Enums.MuteStateEnum]' = None + value: typing.Optional[SmokeCoAlarm.Enums.MuteStateEnum] = None @dataclass class TestInProgress(ClusterAttributeDescriptor): @@ -18722,7 +17806,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class HardwareFaultAlert(ClusterAttributeDescriptor): @@ -18738,7 +17822,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class EndOfServiceAlert(ClusterAttributeDescriptor): @@ -18754,7 +17838,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=SmokeCoAlarm.Enums.EndOfServiceEnum) - value: 'SmokeCoAlarm.Enums.EndOfServiceEnum' = 0 + value: SmokeCoAlarm.Enums.EndOfServiceEnum = 0 @dataclass class InterconnectSmokeAlarm(ClusterAttributeDescriptor): @@ -18770,7 +17854,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum]) - value: 'typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum]' = None + value: typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum] = None @dataclass class InterconnectCOAlarm(ClusterAttributeDescriptor): @@ -18786,7 +17870,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum]) - value: 'typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum]' = None + value: typing.Optional[SmokeCoAlarm.Enums.AlarmStateEnum] = None @dataclass class ContaminationState(ClusterAttributeDescriptor): @@ -18802,7 +17886,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[SmokeCoAlarm.Enums.ContaminationStateEnum]) - value: 'typing.Optional[SmokeCoAlarm.Enums.ContaminationStateEnum]' = None + value: typing.Optional[SmokeCoAlarm.Enums.ContaminationStateEnum] = None @dataclass class SmokeSensitivityLevel(ClusterAttributeDescriptor): @@ -18818,7 +17902,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[SmokeCoAlarm.Enums.SensitivityEnum]) - value: 'typing.Optional[SmokeCoAlarm.Enums.SensitivityEnum]' = None + value: typing.Optional[SmokeCoAlarm.Enums.SensitivityEnum] = None @dataclass class ExpiryDate(ClusterAttributeDescriptor): @@ -18834,7 +17918,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -18850,7 +17934,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -18866,23 +17950,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000005C - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -18898,7 +17966,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -18914,7 +17982,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -18930,7 +17998,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -18950,7 +18018,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="alarmSeverityLevel", Tag=0, Type=SmokeCoAlarm.Enums.AlarmStateEnum), ]) - alarmSeverityLevel: 'SmokeCoAlarm.Enums.AlarmStateEnum' = 0 + alarmSeverityLevel: SmokeCoAlarm.Enums.AlarmStateEnum = 0 @dataclass class COAlarm(ClusterEvent): @@ -18969,7 +18037,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="alarmSeverityLevel", Tag=0, Type=SmokeCoAlarm.Enums.AlarmStateEnum), ]) - alarmSeverityLevel: 'SmokeCoAlarm.Enums.AlarmStateEnum' = 0 + alarmSeverityLevel: SmokeCoAlarm.Enums.AlarmStateEnum = 0 @dataclass class LowBattery(ClusterEvent): @@ -18988,7 +18056,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="alarmSeverityLevel", Tag=0, Type=SmokeCoAlarm.Enums.AlarmStateEnum), ]) - alarmSeverityLevel: 'SmokeCoAlarm.Enums.AlarmStateEnum' = 0 + alarmSeverityLevel: SmokeCoAlarm.Enums.AlarmStateEnum = 0 @dataclass class HardwareFault(ClusterEvent): @@ -19087,7 +18155,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="alarmSeverityLevel", Tag=0, Type=SmokeCoAlarm.Enums.AlarmStateEnum), ]) - alarmSeverityLevel: 'SmokeCoAlarm.Enums.AlarmStateEnum' = 0 + alarmSeverityLevel: SmokeCoAlarm.Enums.AlarmStateEnum = 0 @dataclass class InterconnectCOAlarm(ClusterEvent): @@ -19106,7 +18174,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="alarmSeverityLevel", Tag=0, Type=SmokeCoAlarm.Enums.AlarmStateEnum), ]) - alarmSeverityLevel: 'SmokeCoAlarm.Enums.AlarmStateEnum' = 0 + alarmSeverityLevel: SmokeCoAlarm.Enums.AlarmStateEnum = 0 @dataclass class AllClear(ClusterEvent): @@ -19139,22 +18207,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="supported", Tag=0x00000003, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - mask: 'uint' = None - latch: 'typing.Optional[uint]' = None - state: 'uint' = None - supported: 'uint' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + mask: uint = 0 + latch: typing.Optional[uint] = None + state: uint = 0 + supported: uint = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Bitmaps: class AlarmBitmap(IntFlag): @@ -19174,7 +18240,7 @@ class Reset(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000005D command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -19183,14 +18249,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="alarms", Tag=0, Type=uint), ]) - alarms: 'uint' = 0 + alarms: uint = 0 @dataclass class ModifyEnabledAlarms(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000005D command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -19199,7 +18265,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="mask", Tag=0, Type=uint), ]) - mask: 'uint' = 0 + mask: uint = 0 class Attributes: @dataclass @@ -19216,7 +18282,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Latch(ClusterAttributeDescriptor): @@ -19232,7 +18298,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class State(ClusterAttributeDescriptor): @@ -19248,7 +18314,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Supported(ClusterAttributeDescriptor): @@ -19264,7 +18330,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -19280,7 +18346,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -19296,23 +18362,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000005D - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -19328,7 +18378,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -19344,7 +18394,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -19360,7 +18410,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -19383,10 +18433,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="mask", Tag=3, Type=uint), ]) - active: 'uint' = 0 - inactive: 'uint' = 0 - state: 'uint' = 0 - mask: 'uint' = 0 + active: uint = 0 + inactive: uint = 0 + state: uint = 0 + mask: uint = 0 @dataclass @@ -19401,20 +18451,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000001, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - supportedModes: 'typing.List[MicrowaveOvenMode.Structs.ModeOptionStruct]' = None - currentMode: 'uint' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + supportedModes: typing.List[MicrowaveOvenMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) + currentMode: uint = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ModeTag(MatterIntEnum): @@ -19434,7 +18482,7 @@ class ModeTag(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 10, + kUnknownEnumValue = 10 class Bitmaps: class Feature(IntFlag): @@ -19484,7 +18532,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[MicrowaveOvenMode.Structs.ModeOptionStruct]) - value: 'typing.List[MicrowaveOvenMode.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + value: typing.List[MicrowaveOvenMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) @dataclass class CurrentMode(ClusterAttributeDescriptor): @@ -19500,7 +18548,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -19516,7 +18564,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -19532,23 +18580,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000005E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -19564,7 +18596,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -19580,7 +18612,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -19596,7 +18628,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -19618,27 +18650,25 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="wattRating", Tag=0x00000008, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - cookTime: 'uint' = None - maxCookTime: 'uint' = None - powerSetting: 'typing.Optional[uint]' = None - minPower: 'typing.Optional[uint]' = None - maxPower: 'typing.Optional[uint]' = None - powerStep: 'typing.Optional[uint]' = None - supportedWatts: 'typing.Optional[typing.List[uint]]' = None - selectedWattIndex: 'typing.Optional[uint]' = None - wattRating: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + cookTime: uint = 0 + maxCookTime: uint = 0 + powerSetting: typing.Optional[uint] = None + minPower: typing.Optional[uint] = None + maxPower: typing.Optional[uint] = None + powerStep: typing.Optional[uint] = None + supportedWatts: typing.Optional[typing.List[uint]] = None + selectedWattIndex: typing.Optional[uint] = None + wattRating: typing.Optional[uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Bitmaps: class Feature(IntFlag): @@ -19652,7 +18682,7 @@ class SetCookingParameters(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000005F command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -19665,18 +18695,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="startAfterSetting", Tag=4, Type=typing.Optional[bool]), ]) - cookMode: 'typing.Optional[uint]' = None - cookTime: 'typing.Optional[uint]' = None - powerSetting: 'typing.Optional[uint]' = None - wattSettingIndex: 'typing.Optional[uint]' = None - startAfterSetting: 'typing.Optional[bool]' = None + cookMode: typing.Optional[uint] = None + cookTime: typing.Optional[uint] = None + powerSetting: typing.Optional[uint] = None + wattSettingIndex: typing.Optional[uint] = None + startAfterSetting: typing.Optional[bool] = None @dataclass class AddMoreTime(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000005F command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -19685,7 +18715,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="timeToAdd", Tag=0, Type=uint), ]) - timeToAdd: 'uint' = 0 + timeToAdd: uint = 0 class Attributes: @dataclass @@ -19702,7 +18732,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class MaxCookTime(ClusterAttributeDescriptor): @@ -19718,7 +18748,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class PowerSetting(ClusterAttributeDescriptor): @@ -19734,7 +18764,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class MinPower(ClusterAttributeDescriptor): @@ -19750,7 +18780,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class MaxPower(ClusterAttributeDescriptor): @@ -19766,7 +18796,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class PowerStep(ClusterAttributeDescriptor): @@ -19782,7 +18812,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class SupportedWatts(ClusterAttributeDescriptor): @@ -19798,7 +18828,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[uint]]) - value: 'typing.Optional[typing.List[uint]]' = None + value: typing.Optional[typing.List[uint]] = None @dataclass class SelectedWattIndex(ClusterAttributeDescriptor): @@ -19814,7 +18844,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class WattRating(ClusterAttributeDescriptor): @@ -19830,7 +18860,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -19846,7 +18876,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -19862,23 +18892,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000005F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -19894,7 +18908,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -19910,7 +18924,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -19926,7 +18940,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -19945,24 +18959,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: 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]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - phaseList: 'typing.Union[Nullable, typing.List[str]]' = None - currentPhase: 'typing.Union[Nullable, uint]' = None - countdownTime: 'typing.Union[None, Nullable, uint]' = None - operationalStateList: 'typing.List[OperationalState.Structs.OperationalStateStruct]' = None - operationalState: 'OperationalState.Enums.OperationalStateEnum' = None - operationalError: 'OperationalState.Structs.ErrorStateStruct' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + phaseList: typing.Union[Nullable, typing.List[str]] = NullValue + currentPhase: typing.Union[Nullable, uint] = NullValue + countdownTime: typing.Union[None, Nullable, uint] = None + operationalStateList: typing.List[OperationalState.Structs.OperationalStateStruct] = field(default_factory=lambda: []) + operationalState: OperationalState.Enums.OperationalStateEnum = 0 + operationalError: OperationalState.Structs.ErrorStateStruct = field(default_factory=lambda: OperationalState.Structs.ErrorStateStruct()) + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ErrorStateEnum(MatterIntEnum): @@ -19974,7 +18986,7 @@ class ErrorStateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class OperationalStateEnum(MatterIntEnum): kStopped = 0x00 @@ -19985,7 +18997,7 @@ class OperationalStateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class Structs: @dataclass @@ -20074,7 +19086,7 @@ class OperationalCommandResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000060 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -20083,7 +19095,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="commandResponseState", Tag=0, Type=OperationalState.Structs.ErrorStateStruct), ]) - commandResponseState: 'OperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: OperationalState.Structs.ErrorStateStruct()) + commandResponseState: OperationalState.Structs.ErrorStateStruct = field(default_factory=lambda: OperationalState.Structs.ErrorStateStruct()) class Attributes: @dataclass @@ -20100,7 +19112,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, typing.List[str]]) - value: 'typing.Union[Nullable, typing.List[str]]' = NullValue + value: typing.Union[Nullable, typing.List[str]] = NullValue @dataclass class CurrentPhase(ClusterAttributeDescriptor): @@ -20116,7 +19128,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class CountdownTime(ClusterAttributeDescriptor): @@ -20132,7 +19144,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class OperationalStateList(ClusterAttributeDescriptor): @@ -20148,7 +19160,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[OperationalState.Structs.OperationalStateStruct]) - value: 'typing.List[OperationalState.Structs.OperationalStateStruct]' = field(default_factory=lambda: []) + value: typing.List[OperationalState.Structs.OperationalStateStruct] = field(default_factory=lambda: []) @dataclass class OperationalState(ClusterAttributeDescriptor): @@ -20164,7 +19176,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=OperationalState.Enums.OperationalStateEnum) - value: 'OperationalState.Enums.OperationalStateEnum' = 0 + value: OperationalState.Enums.OperationalStateEnum = 0 @dataclass class OperationalError(ClusterAttributeDescriptor): @@ -20180,7 +19192,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=OperationalState.Structs.ErrorStateStruct) - value: 'OperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: OperationalState.Structs.ErrorStateStruct()) + value: OperationalState.Structs.ErrorStateStruct = field(default_factory=lambda: OperationalState.Structs.ErrorStateStruct()) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -20196,7 +19208,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -20212,23 +19224,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000060 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -20244,7 +19240,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -20260,7 +19256,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -20276,7 +19272,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -20296,7 +19292,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="errorState", Tag=0, Type=OperationalState.Structs.ErrorStateStruct), ]) - errorState: 'OperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: OperationalState.Structs.ErrorStateStruct()) + errorState: OperationalState.Structs.ErrorStateStruct = field(default_factory=lambda: OperationalState.Structs.ErrorStateStruct()) @dataclass class OperationCompletion(ClusterEvent): @@ -20317,9 +19313,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="pausedTime", Tag=2, Type=typing.Union[None, Nullable, uint]), ]) - completionErrorCode: 'uint' = 0 - totalOperationalTime: 'typing.Union[None, Nullable, uint]' = None - pausedTime: 'typing.Union[None, Nullable, uint]' = None + completionErrorCode: uint = 0 + totalOperationalTime: typing.Union[None, Nullable, uint] = None + pausedTime: typing.Union[None, Nullable, uint] = None @dataclass @@ -20338,24 +19334,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: 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]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - phaseList: 'typing.Union[Nullable, typing.List[str]]' = None - currentPhase: 'typing.Union[Nullable, uint]' = None - countdownTime: 'typing.Union[None, Nullable, uint]' = None - operationalStateList: 'typing.List[RvcOperationalState.Structs.OperationalStateStruct]' = None - operationalState: 'uint' = None - operationalError: 'RvcOperationalState.Structs.ErrorStateStruct' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + phaseList: typing.Union[Nullable, typing.List[str]] = NullValue + currentPhase: typing.Union[Nullable, uint] = NullValue + countdownTime: typing.Union[None, Nullable, uint] = None + operationalStateList: typing.List[RvcOperationalState.Structs.OperationalStateStruct] = field(default_factory=lambda: []) + operationalState: uint = 0 + operationalError: RvcOperationalState.Structs.ErrorStateStruct = field(default_factory=lambda: RvcOperationalState.Structs.ErrorStateStruct()) + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ErrorStateEnum(MatterIntEnum): @@ -20452,7 +19446,7 @@ class OperationalCommandResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000061 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -20461,7 +19455,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="commandResponseState", Tag=0, Type=RvcOperationalState.Structs.ErrorStateStruct), ]) - commandResponseState: 'RvcOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: RvcOperationalState.Structs.ErrorStateStruct()) + commandResponseState: RvcOperationalState.Structs.ErrorStateStruct = field(default_factory=lambda: RvcOperationalState.Structs.ErrorStateStruct()) @dataclass class GoHome(ClusterCommand): @@ -20491,7 +19485,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, typing.List[str]]) - value: 'typing.Union[Nullable, typing.List[str]]' = NullValue + value: typing.Union[Nullable, typing.List[str]] = NullValue @dataclass class CurrentPhase(ClusterAttributeDescriptor): @@ -20507,7 +19501,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class CountdownTime(ClusterAttributeDescriptor): @@ -20523,7 +19517,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class OperationalStateList(ClusterAttributeDescriptor): @@ -20539,7 +19533,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[RvcOperationalState.Structs.OperationalStateStruct]) - value: 'typing.List[RvcOperationalState.Structs.OperationalStateStruct]' = field(default_factory=lambda: []) + value: typing.List[RvcOperationalState.Structs.OperationalStateStruct] = field(default_factory=lambda: []) @dataclass class OperationalState(ClusterAttributeDescriptor): @@ -20555,7 +19549,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class OperationalError(ClusterAttributeDescriptor): @@ -20571,7 +19565,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=RvcOperationalState.Structs.ErrorStateStruct) - value: 'RvcOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: RvcOperationalState.Structs.ErrorStateStruct()) + value: RvcOperationalState.Structs.ErrorStateStruct = field(default_factory=lambda: RvcOperationalState.Structs.ErrorStateStruct()) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -20587,7 +19581,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -20603,23 +19597,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000061 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -20635,7 +19613,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -20651,7 +19629,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -20667,7 +19645,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -20687,7 +19665,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="errorState", Tag=0, Type=RvcOperationalState.Structs.ErrorStateStruct), ]) - errorState: 'RvcOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: RvcOperationalState.Structs.ErrorStateStruct()) + errorState: RvcOperationalState.Structs.ErrorStateStruct = field(default_factory=lambda: RvcOperationalState.Structs.ErrorStateStruct()) @dataclass class OperationCompletion(ClusterEvent): @@ -20708,9 +19686,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="pausedTime", Tag=2, Type=typing.Union[None, Nullable, uint]), ]) - completionErrorCode: 'uint' = 0 - totalOperationalTime: 'typing.Union[None, Nullable, uint]' = None - pausedTime: 'typing.Union[None, Nullable, uint]' = None + completionErrorCode: uint = 0 + totalOperationalTime: typing.Union[None, Nullable, uint] = None + pausedTime: typing.Union[None, Nullable, uint] = None @dataclass @@ -20726,21 +19704,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="fabricSceneInfo", Tag=0x00000002, Type=typing.List[ScenesManagement.Structs.SceneInfoStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - lastConfiguredBy: 'typing.Union[None, Nullable, uint]' = None - sceneTableSize: 'uint' = None - fabricSceneInfo: 'typing.List[ScenesManagement.Structs.SceneInfoStruct]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + lastConfiguredBy: typing.Union[None, Nullable, uint] = None + sceneTableSize: uint = 0 + fabricSceneInfo: typing.List[ScenesManagement.Structs.SceneInfoStruct] = field(default_factory=lambda: []) + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Bitmaps: class CopyModeBitmap(IntFlag): @@ -20830,18 +19806,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="extensionFieldSets", Tag=4, Type=typing.List[ScenesManagement.Structs.ExtensionFieldSet]), ]) - groupID: 'uint' = 0 - sceneID: 'uint' = 0 - transitionTime: 'uint' = 0 - sceneName: 'str' = "" - extensionFieldSets: 'typing.List[ScenesManagement.Structs.ExtensionFieldSet]' = field(default_factory=lambda: []) + groupID: uint = 0 + sceneID: uint = 0 + transitionTime: uint = 0 + sceneName: str = "" + extensionFieldSets: typing.List[ScenesManagement.Structs.ExtensionFieldSet] = field(default_factory=lambda: []) @dataclass class AddSceneResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000062 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -20852,9 +19828,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="sceneID", Tag=2, Type=uint), ]) - status: 'uint' = 0 - groupID: 'uint' = 0 - sceneID: 'uint' = 0 + status: uint = 0 + groupID: uint = 0 + sceneID: uint = 0 @dataclass class ViewScene(ClusterCommand): @@ -20871,15 +19847,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), ]) - groupID: 'uint' = 0 - sceneID: 'uint' = 0 + groupID: uint = 0 + sceneID: uint = 0 @dataclass class ViewSceneResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000062 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -20893,12 +19869,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="extensionFieldSets", Tag=5, Type=typing.Optional[typing.List[ScenesManagement.Structs.ExtensionFieldSet]]), ]) - status: 'uint' = 0 - groupID: 'uint' = 0 - sceneID: 'uint' = 0 - transitionTime: 'typing.Optional[uint]' = None - sceneName: 'typing.Optional[str]' = None - extensionFieldSets: 'typing.Optional[typing.List[ScenesManagement.Structs.ExtensionFieldSet]]' = None + status: uint = 0 + groupID: uint = 0 + sceneID: uint = 0 + transitionTime: typing.Optional[uint] = None + sceneName: typing.Optional[str] = None + extensionFieldSets: typing.Optional[typing.List[ScenesManagement.Structs.ExtensionFieldSet]] = None @dataclass class RemoveScene(ClusterCommand): @@ -20915,15 +19891,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), ]) - groupID: 'uint' = 0 - sceneID: 'uint' = 0 + groupID: uint = 0 + sceneID: uint = 0 @dataclass class RemoveSceneResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000062 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -20934,9 +19910,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="sceneID", Tag=2, Type=uint), ]) - status: 'uint' = 0 - groupID: 'uint' = 0 - sceneID: 'uint' = 0 + status: uint = 0 + groupID: uint = 0 + sceneID: uint = 0 @dataclass class RemoveAllScenes(ClusterCommand): @@ -20952,14 +19928,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), ]) - groupID: 'uint' = 0 + groupID: uint = 0 @dataclass class RemoveAllScenesResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000062 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -20969,8 +19945,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), ]) - status: 'uint' = 0 - groupID: 'uint' = 0 + status: uint = 0 + groupID: uint = 0 @dataclass class StoreScene(ClusterCommand): @@ -20987,15 +19963,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), ]) - groupID: 'uint' = 0 - sceneID: 'uint' = 0 + groupID: uint = 0 + sceneID: uint = 0 @dataclass class StoreSceneResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000062 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21006,16 +19982,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="sceneID", Tag=2, Type=uint), ]) - status: 'uint' = 0 - groupID: 'uint' = 0 - sceneID: 'uint' = 0 + status: uint = 0 + groupID: uint = 0 + sceneID: uint = 0 @dataclass class RecallScene(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000062 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21026,9 +20002,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="transitionTime", Tag=2, Type=typing.Union[None, Nullable, uint]), ]) - groupID: 'uint' = 0 - sceneID: 'uint' = 0 - transitionTime: 'typing.Union[None, Nullable, uint]' = None + groupID: uint = 0 + sceneID: uint = 0 + transitionTime: typing.Union[None, Nullable, uint] = None @dataclass class GetSceneMembership(ClusterCommand): @@ -21044,14 +20020,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), ]) - groupID: 'uint' = 0 + groupID: uint = 0 @dataclass class GetSceneMembershipResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000062 command_id: typing.ClassVar[int] = 0x00000006 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21063,10 +20039,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="sceneList", Tag=3, Type=typing.Optional[typing.List[uint]]), ]) - status: 'uint' = 0 - capacity: 'typing.Union[Nullable, uint]' = NullValue - groupID: 'uint' = 0 - sceneList: 'typing.Optional[typing.List[uint]]' = None + status: uint = 0 + capacity: typing.Union[Nullable, uint] = NullValue + groupID: uint = 0 + sceneList: typing.Optional[typing.List[uint]] = None @dataclass class CopyScene(ClusterCommand): @@ -21086,18 +20062,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="sceneIdentifierTo", Tag=4, Type=uint), ]) - mode: 'uint' = 0 - groupIdentifierFrom: 'uint' = 0 - sceneIdentifierFrom: 'uint' = 0 - groupIdentifierTo: 'uint' = 0 - sceneIdentifierTo: 'uint' = 0 + mode: uint = 0 + groupIdentifierFrom: uint = 0 + sceneIdentifierFrom: uint = 0 + groupIdentifierTo: uint = 0 + sceneIdentifierTo: uint = 0 @dataclass class CopySceneResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000062 command_id: typing.ClassVar[int] = 0x00000040 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21108,9 +20084,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="sceneIdentifierFrom", Tag=2, Type=uint), ]) - status: 'uint' = 0 - groupIdentifierFrom: 'uint' = 0 - sceneIdentifierFrom: 'uint' = 0 + status: uint = 0 + groupIdentifierFrom: uint = 0 + sceneIdentifierFrom: uint = 0 class Attributes: @dataclass @@ -21127,7 +20103,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class SceneTableSize(ClusterAttributeDescriptor): @@ -21143,7 +20119,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class FabricSceneInfo(ClusterAttributeDescriptor): @@ -21159,7 +20135,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[ScenesManagement.Structs.SceneInfoStruct]) - value: 'typing.List[ScenesManagement.Structs.SceneInfoStruct]' = field(default_factory=lambda: []) + value: typing.List[ScenesManagement.Structs.SceneInfoStruct] = field(default_factory=lambda: []) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -21175,7 +20151,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -21191,23 +20167,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000062 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -21223,7 +20183,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -21239,7 +20199,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -21255,7 +20215,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -21274,24 +20234,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="replacementProductList", Tag=0x00000005, Type=typing.Optional[typing.List[HepaFilterMonitoring.Structs.ReplacementProductStruct]]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - condition: 'typing.Optional[uint]' = None - degradationDirection: 'typing.Optional[HepaFilterMonitoring.Enums.DegradationDirectionEnum]' = None - changeIndication: 'HepaFilterMonitoring.Enums.ChangeIndicationEnum' = None - inPlaceIndicator: 'typing.Optional[bool]' = None - lastChangedTime: 'typing.Union[None, Nullable, uint]' = None - replacementProductList: 'typing.Optional[typing.List[HepaFilterMonitoring.Structs.ReplacementProductStruct]]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + condition: typing.Optional[uint] = None + degradationDirection: typing.Optional[HepaFilterMonitoring.Enums.DegradationDirectionEnum] = None + changeIndication: HepaFilterMonitoring.Enums.ChangeIndicationEnum = 0 + inPlaceIndicator: typing.Optional[bool] = None + lastChangedTime: typing.Union[None, Nullable, uint] = None + replacementProductList: typing.Optional[typing.List[HepaFilterMonitoring.Structs.ReplacementProductStruct]] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ChangeIndicationEnum(MatterIntEnum): @@ -21302,7 +20260,7 @@ class ChangeIndicationEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class DegradationDirectionEnum(MatterIntEnum): kUp = 0x00 @@ -21311,7 +20269,7 @@ class DegradationDirectionEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class ProductIdentifierTypeEnum(MatterIntEnum): kUpc = 0x00 @@ -21323,7 +20281,7 @@ class ProductIdentifierTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class Bitmaps: class Feature(IntFlag): @@ -21351,7 +20309,7 @@ class ResetCondition(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000071 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21374,7 +20332,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class DegradationDirection(ClusterAttributeDescriptor): @@ -21390,7 +20348,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[HepaFilterMonitoring.Enums.DegradationDirectionEnum]) - value: 'typing.Optional[HepaFilterMonitoring.Enums.DegradationDirectionEnum]' = None + value: typing.Optional[HepaFilterMonitoring.Enums.DegradationDirectionEnum] = None @dataclass class ChangeIndication(ClusterAttributeDescriptor): @@ -21406,7 +20364,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=HepaFilterMonitoring.Enums.ChangeIndicationEnum) - value: 'HepaFilterMonitoring.Enums.ChangeIndicationEnum' = 0 + value: HepaFilterMonitoring.Enums.ChangeIndicationEnum = 0 @dataclass class InPlaceIndicator(ClusterAttributeDescriptor): @@ -21422,7 +20380,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Optional[bool]' = None + value: typing.Optional[bool] = None @dataclass class LastChangedTime(ClusterAttributeDescriptor): @@ -21438,7 +20396,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class ReplacementProductList(ClusterAttributeDescriptor): @@ -21454,7 +20412,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[HepaFilterMonitoring.Structs.ReplacementProductStruct]]) - value: 'typing.Optional[typing.List[HepaFilterMonitoring.Structs.ReplacementProductStruct]]' = None + value: typing.Optional[typing.List[HepaFilterMonitoring.Structs.ReplacementProductStruct]] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -21470,7 +20428,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -21486,23 +20444,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000071 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -21518,7 +20460,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -21534,7 +20476,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -21550,7 +20492,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -21569,24 +20511,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="replacementProductList", Tag=0x00000005, Type=typing.Optional[typing.List[ActivatedCarbonFilterMonitoring.Structs.ReplacementProductStruct]]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - condition: 'typing.Optional[uint]' = None - degradationDirection: 'typing.Optional[ActivatedCarbonFilterMonitoring.Enums.DegradationDirectionEnum]' = None - changeIndication: 'ActivatedCarbonFilterMonitoring.Enums.ChangeIndicationEnum' = None - inPlaceIndicator: 'typing.Optional[bool]' = None - lastChangedTime: 'typing.Union[None, Nullable, uint]' = None - replacementProductList: 'typing.Optional[typing.List[ActivatedCarbonFilterMonitoring.Structs.ReplacementProductStruct]]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + condition: typing.Optional[uint] = None + degradationDirection: typing.Optional[ActivatedCarbonFilterMonitoring.Enums.DegradationDirectionEnum] = None + changeIndication: ActivatedCarbonFilterMonitoring.Enums.ChangeIndicationEnum = 0 + inPlaceIndicator: typing.Optional[bool] = None + lastChangedTime: typing.Union[None, Nullable, uint] = None + replacementProductList: typing.Optional[typing.List[ActivatedCarbonFilterMonitoring.Structs.ReplacementProductStruct]] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ChangeIndicationEnum(MatterIntEnum): @@ -21597,7 +20537,7 @@ class ChangeIndicationEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class DegradationDirectionEnum(MatterIntEnum): kUp = 0x00 @@ -21606,7 +20546,7 @@ class DegradationDirectionEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class ProductIdentifierTypeEnum(MatterIntEnum): kUpc = 0x00 @@ -21618,7 +20558,7 @@ class ProductIdentifierTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class Bitmaps: class Feature(IntFlag): @@ -21646,7 +20586,7 @@ class ResetCondition(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000072 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21669,7 +20609,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class DegradationDirection(ClusterAttributeDescriptor): @@ -21685,7 +20625,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[ActivatedCarbonFilterMonitoring.Enums.DegradationDirectionEnum]) - value: 'typing.Optional[ActivatedCarbonFilterMonitoring.Enums.DegradationDirectionEnum]' = None + value: typing.Optional[ActivatedCarbonFilterMonitoring.Enums.DegradationDirectionEnum] = None @dataclass class ChangeIndication(ClusterAttributeDescriptor): @@ -21701,7 +20641,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=ActivatedCarbonFilterMonitoring.Enums.ChangeIndicationEnum) - value: 'ActivatedCarbonFilterMonitoring.Enums.ChangeIndicationEnum' = 0 + value: ActivatedCarbonFilterMonitoring.Enums.ChangeIndicationEnum = 0 @dataclass class InPlaceIndicator(ClusterAttributeDescriptor): @@ -21717,7 +20657,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Optional[bool]' = None + value: typing.Optional[bool] = None @dataclass class LastChangedTime(ClusterAttributeDescriptor): @@ -21733,7 +20673,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class ReplacementProductList(ClusterAttributeDescriptor): @@ -21749,7 +20689,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[ActivatedCarbonFilterMonitoring.Structs.ReplacementProductStruct]]) - value: 'typing.Optional[typing.List[ActivatedCarbonFilterMonitoring.Structs.ReplacementProductStruct]]' = None + value: typing.Optional[typing.List[ActivatedCarbonFilterMonitoring.Structs.ReplacementProductStruct]] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -21765,7 +20705,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -21781,23 +20721,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000072 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -21813,7 +20737,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -21829,7 +20753,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -21845,7 +20769,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -21866,26 +20790,24 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="sensorFault", Tag=0x00000007, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - currentSensitivityLevel: 'typing.Optional[uint]' = None - supportedSensitivityLevels: 'typing.Optional[uint]' = None - defaultSensitivityLevel: 'typing.Optional[uint]' = None - alarmsActive: 'typing.Optional[uint]' = None - alarmsSuppressed: 'typing.Optional[uint]' = None - alarmsEnabled: 'typing.Optional[uint]' = None - alarmsSupported: 'typing.Optional[uint]' = None - sensorFault: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + currentSensitivityLevel: typing.Optional[uint] = None + supportedSensitivityLevels: typing.Optional[uint] = None + defaultSensitivityLevel: typing.Optional[uint] = None + alarmsActive: typing.Optional[uint] = None + alarmsSuppressed: typing.Optional[uint] = None + alarmsEnabled: typing.Optional[uint] = None + alarmsSupported: typing.Optional[uint] = None + sensorFault: typing.Optional[uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Bitmaps: class AlarmModeBitmap(IntFlag): @@ -21907,7 +20829,7 @@ class SuppressAlarm(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000080 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21916,14 +20838,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="alarmsToSuppress", Tag=0, Type=uint), ]) - alarmsToSuppress: 'uint' = 0 + alarmsToSuppress: uint = 0 @dataclass class EnableDisableAlarm(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000080 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -21932,7 +20854,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="alarmsToEnableDisable", Tag=0, Type=uint), ]) - alarmsToEnableDisable: 'uint' = 0 + alarmsToEnableDisable: uint = 0 class Attributes: @dataclass @@ -21949,7 +20871,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class SupportedSensitivityLevels(ClusterAttributeDescriptor): @@ -21965,7 +20887,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class DefaultSensitivityLevel(ClusterAttributeDescriptor): @@ -21981,7 +20903,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class AlarmsActive(ClusterAttributeDescriptor): @@ -21997,7 +20919,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class AlarmsSuppressed(ClusterAttributeDescriptor): @@ -22013,7 +20935,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class AlarmsEnabled(ClusterAttributeDescriptor): @@ -22029,7 +20951,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class AlarmsSupported(ClusterAttributeDescriptor): @@ -22045,7 +20967,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class SensorFault(ClusterAttributeDescriptor): @@ -22061,7 +20983,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -22077,7 +20999,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -22093,23 +21015,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000080 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -22125,7 +21031,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -22141,7 +21047,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -22157,7 +21063,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -22178,8 +21084,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="alarmsSuppressed", Tag=1, Type=typing.Optional[uint]), ]) - alarmsActive: 'uint' = 0 - alarmsSuppressed: 'typing.Optional[uint]' = None + alarmsActive: uint = 0 + alarmsSuppressed: typing.Optional[uint] = None @dataclass class SensorFault(ClusterEvent): @@ -22198,7 +21104,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="sensorFault", Tag=0, Type=uint), ]) - sensorFault: 'uint' = 0 + sensorFault: uint = 0 @dataclass @@ -22222,29 +21128,27 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="levelStep", Tag=0x0000000A, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - openDuration: 'typing.Union[Nullable, uint]' = None - defaultOpenDuration: 'typing.Union[Nullable, uint]' = None - autoCloseTime: 'typing.Union[None, Nullable, uint]' = None - remainingDuration: 'typing.Union[Nullable, uint]' = None - currentState: 'typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]' = None - targetState: 'typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]' = None - currentLevel: 'typing.Union[None, Nullable, uint]' = None - targetLevel: 'typing.Union[None, Nullable, uint]' = None - defaultOpenLevel: 'typing.Optional[uint]' = None - valveFault: 'typing.Optional[uint]' = None - levelStep: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + openDuration: typing.Union[Nullable, uint] = NullValue + defaultOpenDuration: typing.Union[Nullable, uint] = NullValue + autoCloseTime: typing.Union[None, Nullable, uint] = None + remainingDuration: typing.Union[Nullable, uint] = NullValue + currentState: typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum] = NullValue + targetState: typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum] = NullValue + currentLevel: typing.Union[None, Nullable, uint] = None + targetLevel: typing.Union[None, Nullable, uint] = None + defaultOpenLevel: typing.Optional[uint] = None + valveFault: typing.Optional[uint] = None + levelStep: typing.Optional[uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class StatusCodeEnum(MatterIntEnum): @@ -22253,7 +21157,7 @@ class StatusCodeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 0, + kUnknownEnumValue = 0 class ValveStateEnum(MatterIntEnum): kClosed = 0x00 @@ -22263,7 +21167,7 @@ class ValveStateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class Bitmaps: class Feature(IntFlag): @@ -22284,7 +21188,7 @@ class Open(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000081 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22294,15 +21198,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="targetLevel", Tag=1, Type=typing.Optional[uint]), ]) - openDuration: 'typing.Union[None, Nullable, uint]' = None - targetLevel: 'typing.Optional[uint]' = None + openDuration: typing.Union[None, Nullable, uint] = None + targetLevel: typing.Optional[uint] = None @dataclass class Close(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000081 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -22325,7 +21229,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class DefaultOpenDuration(ClusterAttributeDescriptor): @@ -22341,7 +21245,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class AutoCloseTime(ClusterAttributeDescriptor): @@ -22357,7 +21261,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class RemainingDuration(ClusterAttributeDescriptor): @@ -22373,7 +21277,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class CurrentState(ClusterAttributeDescriptor): @@ -22389,7 +21293,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]) - value: 'typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]' = NullValue + value: typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum] = NullValue @dataclass class TargetState(ClusterAttributeDescriptor): @@ -22405,7 +21309,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]) - value: 'typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]' = NullValue + value: typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum] = NullValue @dataclass class CurrentLevel(ClusterAttributeDescriptor): @@ -22421,7 +21325,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class TargetLevel(ClusterAttributeDescriptor): @@ -22437,7 +21341,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class DefaultOpenLevel(ClusterAttributeDescriptor): @@ -22453,7 +21357,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ValveFault(ClusterAttributeDescriptor): @@ -22469,7 +21373,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class LevelStep(ClusterAttributeDescriptor): @@ -22485,7 +21389,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -22501,7 +21405,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -22517,23 +21421,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000081 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -22549,7 +21437,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -22565,7 +21453,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -22581,7 +21469,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -22602,8 +21490,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="valveLevel", Tag=1, Type=typing.Optional[uint]), ]) - valveState: 'ValveConfigurationAndControl.Enums.ValveStateEnum' = 0 - valveLevel: 'typing.Optional[uint]' = None + valveState: ValveConfigurationAndControl.Enums.ValveStateEnum = 0 + valveLevel: typing.Optional[uint] = None @dataclass class ValveFault(ClusterEvent): @@ -22622,7 +21510,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="valveFault", Tag=0, Type=uint), ]) - valveFault: 'uint' = 0 + valveFault: uint = 0 @dataclass @@ -22654,37 +21542,35 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="neutralCurrent", Tag=0x00000012, Type=typing.Union[None, Nullable, int]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - powerMode: 'ElectricalPowerMeasurement.Enums.PowerModeEnum' = None - numberOfMeasurementTypes: 'uint' = None - accuracy: 'typing.List[ElectricalPowerMeasurement.Structs.MeasurementAccuracyStruct]' = None - ranges: 'typing.Optional[typing.List[ElectricalPowerMeasurement.Structs.MeasurementRangeStruct]]' = None - voltage: 'typing.Union[None, Nullable, int]' = None - activeCurrent: 'typing.Union[None, Nullable, int]' = None - reactiveCurrent: 'typing.Union[None, Nullable, int]' = None - apparentCurrent: 'typing.Union[None, Nullable, int]' = None - activePower: 'typing.Union[Nullable, int]' = None - reactivePower: 'typing.Union[None, Nullable, int]' = None - apparentPower: 'typing.Union[None, Nullable, int]' = None - RMSVoltage: 'typing.Union[None, Nullable, int]' = None - RMSCurrent: 'typing.Union[None, Nullable, int]' = None - RMSPower: 'typing.Union[None, Nullable, int]' = None - frequency: 'typing.Union[None, Nullable, int]' = None - harmonicCurrents: 'typing.Union[None, Nullable, typing.List[ElectricalPowerMeasurement.Structs.HarmonicMeasurementStruct]]' = None - harmonicPhases: 'typing.Union[None, Nullable, typing.List[ElectricalPowerMeasurement.Structs.HarmonicMeasurementStruct]]' = None - powerFactor: 'typing.Union[None, Nullable, int]' = None - neutralCurrent: 'typing.Union[None, Nullable, int]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + powerMode: ElectricalPowerMeasurement.Enums.PowerModeEnum = 0 + numberOfMeasurementTypes: uint = 0 + accuracy: typing.List[ElectricalPowerMeasurement.Structs.MeasurementAccuracyStruct] = field(default_factory=lambda: []) + ranges: typing.Optional[typing.List[ElectricalPowerMeasurement.Structs.MeasurementRangeStruct]] = None + voltage: typing.Union[None, Nullable, int] = None + activeCurrent: typing.Union[None, Nullable, int] = None + reactiveCurrent: typing.Union[None, Nullable, int] = None + apparentCurrent: typing.Union[None, Nullable, int] = None + activePower: typing.Union[Nullable, int] = NullValue + reactivePower: typing.Union[None, Nullable, int] = None + apparentPower: typing.Union[None, Nullable, int] = None + RMSVoltage: typing.Union[None, Nullable, int] = None + RMSCurrent: typing.Union[None, Nullable, int] = None + RMSPower: typing.Union[None, Nullable, int] = None + frequency: typing.Union[None, Nullable, int] = None + harmonicCurrents: typing.Union[None, Nullable, typing.List[ElectricalPowerMeasurement.Structs.HarmonicMeasurementStruct]] = None + harmonicPhases: typing.Union[None, Nullable, typing.List[ElectricalPowerMeasurement.Structs.HarmonicMeasurementStruct]] = None + powerFactor: typing.Union[None, Nullable, int] = None + neutralCurrent: typing.Union[None, Nullable, int] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class MeasurementTypeEnum(MatterIntEnum): @@ -22707,7 +21593,7 @@ class MeasurementTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 15, + kUnknownEnumValue = 15 class PowerModeEnum(MatterIntEnum): kUnknown = 0x00 @@ -22717,7 +21603,7 @@ class PowerModeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class Bitmaps: class Feature(IntFlag): @@ -22831,7 +21717,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=ElectricalPowerMeasurement.Enums.PowerModeEnum) - value: 'ElectricalPowerMeasurement.Enums.PowerModeEnum' = 0 + value: ElectricalPowerMeasurement.Enums.PowerModeEnum = 0 @dataclass class NumberOfMeasurementTypes(ClusterAttributeDescriptor): @@ -22847,7 +21733,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Accuracy(ClusterAttributeDescriptor): @@ -22863,7 +21749,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[ElectricalPowerMeasurement.Structs.MeasurementAccuracyStruct]) - value: 'typing.List[ElectricalPowerMeasurement.Structs.MeasurementAccuracyStruct]' = field(default_factory=lambda: []) + value: typing.List[ElectricalPowerMeasurement.Structs.MeasurementAccuracyStruct] = field(default_factory=lambda: []) @dataclass class Ranges(ClusterAttributeDescriptor): @@ -22879,7 +21765,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[ElectricalPowerMeasurement.Structs.MeasurementRangeStruct]]) - value: 'typing.Optional[typing.List[ElectricalPowerMeasurement.Structs.MeasurementRangeStruct]]' = None + value: typing.Optional[typing.List[ElectricalPowerMeasurement.Structs.MeasurementRangeStruct]] = None @dataclass class Voltage(ClusterAttributeDescriptor): @@ -22895,7 +21781,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class ActiveCurrent(ClusterAttributeDescriptor): @@ -22911,7 +21797,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class ReactiveCurrent(ClusterAttributeDescriptor): @@ -22927,7 +21813,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class ApparentCurrent(ClusterAttributeDescriptor): @@ -22943,7 +21829,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class ActivePower(ClusterAttributeDescriptor): @@ -22959,7 +21845,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class ReactivePower(ClusterAttributeDescriptor): @@ -22975,7 +21861,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class ApparentPower(ClusterAttributeDescriptor): @@ -22991,7 +21877,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class RMSVoltage(ClusterAttributeDescriptor): @@ -23007,7 +21893,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class RMSCurrent(ClusterAttributeDescriptor): @@ -23023,7 +21909,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class RMSPower(ClusterAttributeDescriptor): @@ -23039,7 +21925,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class Frequency(ClusterAttributeDescriptor): @@ -23055,7 +21941,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class HarmonicCurrents(ClusterAttributeDescriptor): @@ -23071,7 +21957,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, typing.List[ElectricalPowerMeasurement.Structs.HarmonicMeasurementStruct]]) - value: 'typing.Union[None, Nullable, typing.List[ElectricalPowerMeasurement.Structs.HarmonicMeasurementStruct]]' = None + value: typing.Union[None, Nullable, typing.List[ElectricalPowerMeasurement.Structs.HarmonicMeasurementStruct]] = None @dataclass class HarmonicPhases(ClusterAttributeDescriptor): @@ -23087,7 +21973,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, typing.List[ElectricalPowerMeasurement.Structs.HarmonicMeasurementStruct]]) - value: 'typing.Union[None, Nullable, typing.List[ElectricalPowerMeasurement.Structs.HarmonicMeasurementStruct]]' = None + value: typing.Union[None, Nullable, typing.List[ElectricalPowerMeasurement.Structs.HarmonicMeasurementStruct]] = None @dataclass class PowerFactor(ClusterAttributeDescriptor): @@ -23103,7 +21989,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class NeutralCurrent(ClusterAttributeDescriptor): @@ -23119,7 +22005,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -23135,7 +22021,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -23151,23 +22037,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000090 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -23183,7 +22053,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -23199,7 +22069,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -23215,7 +22085,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -23235,7 +22105,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="ranges", Tag=0, Type=typing.List[ElectricalPowerMeasurement.Structs.MeasurementRangeStruct]), ]) - ranges: 'typing.List[ElectricalPowerMeasurement.Structs.MeasurementRangeStruct]' = field(default_factory=lambda: []) + ranges: typing.List[ElectricalPowerMeasurement.Structs.MeasurementRangeStruct] = field(default_factory=lambda: []) @dataclass @@ -23254,24 +22124,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="cumulativeEnergyReset", Tag=0x00000005, Type=typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.CumulativeEnergyResetStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - accuracy: 'ElectricalEnergyMeasurement.Structs.MeasurementAccuracyStruct' = None - cumulativeEnergyImported: 'typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None - cumulativeEnergyExported: 'typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None - periodicEnergyImported: 'typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None - periodicEnergyExported: 'typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None - cumulativeEnergyReset: 'typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.CumulativeEnergyResetStruct]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + accuracy: ElectricalEnergyMeasurement.Structs.MeasurementAccuracyStruct = field(default_factory=lambda: ElectricalEnergyMeasurement.Structs.MeasurementAccuracyStruct()) + cumulativeEnergyImported: typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct] = None + cumulativeEnergyExported: typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct] = None + periodicEnergyImported: typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct] = None + periodicEnergyExported: typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct] = None + cumulativeEnergyReset: typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.CumulativeEnergyResetStruct] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class MeasurementTypeEnum(MatterIntEnum): @@ -23294,7 +22162,7 @@ class MeasurementTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 15, + kUnknownEnumValue = 15 class Bitmaps: class Feature(IntFlag): @@ -23399,7 +22267,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=ElectricalEnergyMeasurement.Structs.MeasurementAccuracyStruct) - value: 'ElectricalEnergyMeasurement.Structs.MeasurementAccuracyStruct' = field(default_factory=lambda: ElectricalEnergyMeasurement.Structs.MeasurementAccuracyStruct()) + value: ElectricalEnergyMeasurement.Structs.MeasurementAccuracyStruct = field(default_factory=lambda: ElectricalEnergyMeasurement.Structs.MeasurementAccuracyStruct()) @dataclass class CumulativeEnergyImported(ClusterAttributeDescriptor): @@ -23415,7 +22283,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]) - value: 'typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None + value: typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct] = None @dataclass class CumulativeEnergyExported(ClusterAttributeDescriptor): @@ -23431,7 +22299,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]) - value: 'typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None + value: typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct] = None @dataclass class PeriodicEnergyImported(ClusterAttributeDescriptor): @@ -23447,7 +22315,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]) - value: 'typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None + value: typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct] = None @dataclass class PeriodicEnergyExported(ClusterAttributeDescriptor): @@ -23463,7 +22331,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]) - value: 'typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None + value: typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct] = None @dataclass class CumulativeEnergyReset(ClusterAttributeDescriptor): @@ -23479,7 +22347,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.CumulativeEnergyResetStruct]) - value: 'typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.CumulativeEnergyResetStruct]' = None + value: typing.Union[None, Nullable, ElectricalEnergyMeasurement.Structs.CumulativeEnergyResetStruct] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -23495,7 +22363,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -23511,23 +22379,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000091 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -23543,7 +22395,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -23559,7 +22411,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -23575,7 +22427,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -23596,8 +22448,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="energyExported", Tag=1, Type=typing.Optional[ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]), ]) - energyImported: 'typing.Optional[ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None - energyExported: 'typing.Optional[ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None + energyImported: typing.Optional[ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct] = None + energyExported: typing.Optional[ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct] = None @dataclass class PeriodicEnergyMeasured(ClusterEvent): @@ -23617,8 +22469,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="energyExported", Tag=1, Type=typing.Optional[ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]), ]) - energyImported: 'typing.Optional[ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None - energyExported: 'typing.Optional[ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct]' = None + energyImported: typing.Optional[ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct] = None + energyExported: typing.Optional[ElectricalEnergyMeasurement.Structs.EnergyMeasurementStruct] = None @dataclass @@ -23637,24 +22489,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="boostState", Tag=0x00000005, Type=WaterHeaterManagement.Enums.BoostStateEnum), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - heaterTypes: 'uint' = None - heatDemand: 'uint' = None - tankVolume: 'typing.Optional[uint]' = None - estimatedHeatRequired: 'typing.Optional[int]' = None - tankPercentage: 'typing.Optional[uint]' = None - boostState: 'WaterHeaterManagement.Enums.BoostStateEnum' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + heaterTypes: uint = 0 + heatDemand: uint = 0 + tankVolume: typing.Optional[uint] = None + estimatedHeatRequired: typing.Optional[int] = None + tankPercentage: typing.Optional[uint] = None + boostState: WaterHeaterManagement.Enums.BoostStateEnum = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class BoostStateEnum(MatterIntEnum): @@ -23664,7 +22514,7 @@ class BoostStateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class Bitmaps: class Feature(IntFlag): @@ -23706,7 +22556,7 @@ class Boost(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000094 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23715,14 +22565,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="boostInfo", Tag=0, Type=WaterHeaterManagement.Structs.WaterHeaterBoostInfoStruct), ]) - boostInfo: 'WaterHeaterManagement.Structs.WaterHeaterBoostInfoStruct' = field(default_factory=lambda: WaterHeaterManagement.Structs.WaterHeaterBoostInfoStruct()) + boostInfo: WaterHeaterManagement.Structs.WaterHeaterBoostInfoStruct = field(default_factory=lambda: WaterHeaterManagement.Structs.WaterHeaterBoostInfoStruct()) @dataclass class CancelBoost(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000094 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -23745,7 +22595,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class HeatDemand(ClusterAttributeDescriptor): @@ -23761,7 +22611,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class TankVolume(ClusterAttributeDescriptor): @@ -23777,7 +22627,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class EstimatedHeatRequired(ClusterAttributeDescriptor): @@ -23793,7 +22643,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class TankPercentage(ClusterAttributeDescriptor): @@ -23809,7 +22659,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class BoostState(ClusterAttributeDescriptor): @@ -23825,7 +22675,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=WaterHeaterManagement.Enums.BoostStateEnum) - value: 'WaterHeaterManagement.Enums.BoostStateEnum' = 0 + value: WaterHeaterManagement.Enums.BoostStateEnum = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -23841,7 +22691,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -23857,23 +22707,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000094 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -23889,7 +22723,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -23905,7 +22739,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -23921,7 +22755,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -23941,7 +22775,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="boostInfo", Tag=0, Type=WaterHeaterManagement.Structs.WaterHeaterBoostInfoStruct), ]) - boostInfo: 'WaterHeaterManagement.Structs.WaterHeaterBoostInfoStruct' = field(default_factory=lambda: WaterHeaterManagement.Structs.WaterHeaterBoostInfoStruct()) + boostInfo: WaterHeaterManagement.Structs.WaterHeaterBoostInfoStruct = field(default_factory=lambda: WaterHeaterManagement.Structs.WaterHeaterBoostInfoStruct()) @dataclass class BoostEnded(ClusterEvent): @@ -23978,26 +22812,24 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="defaultRandomDuration", Tag=0x00000007, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - loadControlPrograms: 'typing.List[DemandResponseLoadControl.Structs.LoadControlProgramStruct]' = None - numberOfLoadControlPrograms: 'uint' = None - events: 'typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]' = None - activeEvents: 'typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]' = None - numberOfEventsPerProgram: 'uint' = None - numberOfTransitions: 'uint' = None - defaultRandomStart: 'uint' = None - defaultRandomDuration: 'uint' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + loadControlPrograms: typing.List[DemandResponseLoadControl.Structs.LoadControlProgramStruct] = field(default_factory=lambda: []) + numberOfLoadControlPrograms: uint = 0 + events: typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct] = field(default_factory=lambda: []) + activeEvents: typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct] = field(default_factory=lambda: []) + numberOfEventsPerProgram: uint = 0 + numberOfTransitions: uint = 0 + defaultRandomStart: uint = 0 + defaultRandomDuration: uint = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class CriticalityLevelEnum(MatterIntEnum): @@ -24015,7 +22847,7 @@ class CriticalityLevelEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 10, + kUnknownEnumValue = 10 class HeatingSourceEnum(MatterIntEnum): kAny = 0x00 @@ -24025,7 +22857,7 @@ class HeatingSourceEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class LoadControlEventChangeSourceEnum(MatterIntEnum): kAutomatic = 0x00 @@ -24034,7 +22866,7 @@ class LoadControlEventChangeSourceEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class LoadControlEventStatusEnum(MatterIntEnum): kUnknown = 0x00 @@ -24054,7 +22886,7 @@ class LoadControlEventStatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 13, + kUnknownEnumValue = 13 class Bitmaps: class CancelControlBitmap(IntFlag): @@ -24230,7 +23062,7 @@ class RegisterLoadControlProgramRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000096 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24239,14 +23071,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="loadControlProgram", Tag=0, Type=DemandResponseLoadControl.Structs.LoadControlProgramStruct), ]) - loadControlProgram: 'DemandResponseLoadControl.Structs.LoadControlProgramStruct' = field(default_factory=lambda: DemandResponseLoadControl.Structs.LoadControlProgramStruct()) + loadControlProgram: DemandResponseLoadControl.Structs.LoadControlProgramStruct = field(default_factory=lambda: DemandResponseLoadControl.Structs.LoadControlProgramStruct()) @dataclass class UnregisterLoadControlProgramRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000096 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24255,14 +23087,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="loadControlProgramID", Tag=0, Type=bytes), ]) - loadControlProgramID: 'bytes' = b"" + loadControlProgramID: bytes = b"" @dataclass class AddLoadControlEventRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000096 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24271,14 +23103,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="event", Tag=0, Type=DemandResponseLoadControl.Structs.LoadControlEventStruct), ]) - event: 'DemandResponseLoadControl.Structs.LoadControlEventStruct' = field(default_factory=lambda: DemandResponseLoadControl.Structs.LoadControlEventStruct()) + event: DemandResponseLoadControl.Structs.LoadControlEventStruct = field(default_factory=lambda: DemandResponseLoadControl.Structs.LoadControlEventStruct()) @dataclass class RemoveLoadControlEventRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000096 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24288,15 +23120,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="cancelControl", Tag=1, Type=uint), ]) - eventID: 'bytes' = b"" - cancelControl: 'uint' = 0 + eventID: bytes = b"" + cancelControl: uint = 0 @dataclass class ClearLoadControlEventsRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000096 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24319,7 +23151,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[DemandResponseLoadControl.Structs.LoadControlProgramStruct]) - value: 'typing.List[DemandResponseLoadControl.Structs.LoadControlProgramStruct]' = field(default_factory=lambda: []) + value: typing.List[DemandResponseLoadControl.Structs.LoadControlProgramStruct] = field(default_factory=lambda: []) @dataclass class NumberOfLoadControlPrograms(ClusterAttributeDescriptor): @@ -24335,7 +23167,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Events(ClusterAttributeDescriptor): @@ -24351,7 +23183,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]) - value: 'typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]' = field(default_factory=lambda: []) + value: typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct] = field(default_factory=lambda: []) @dataclass class ActiveEvents(ClusterAttributeDescriptor): @@ -24367,7 +23199,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]) - value: 'typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]' = field(default_factory=lambda: []) + value: typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct] = field(default_factory=lambda: []) @dataclass class NumberOfEventsPerProgram(ClusterAttributeDescriptor): @@ -24383,7 +23215,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class NumberOfTransitions(ClusterAttributeDescriptor): @@ -24399,7 +23231,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class DefaultRandomStart(ClusterAttributeDescriptor): @@ -24415,7 +23247,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class DefaultRandomDuration(ClusterAttributeDescriptor): @@ -24431,7 +23263,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -24447,7 +23279,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -24463,23 +23295,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000096 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -24495,7 +23311,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -24511,7 +23327,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -24527,7 +23343,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -24556,16 +23372,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="heatingSourceControl", Tag=9, Type=typing.Union[None, Nullable, DemandResponseLoadControl.Structs.HeatingSourceControlStruct]), ]) - eventID: 'bytes' = b"" - transitionIndex: 'typing.Union[Nullable, uint]' = NullValue - status: 'DemandResponseLoadControl.Enums.LoadControlEventStatusEnum' = 0 - criticality: 'DemandResponseLoadControl.Enums.CriticalityLevelEnum' = 0 - control: 'uint' = 0 - temperatureControl: 'typing.Union[None, Nullable, DemandResponseLoadControl.Structs.TemperatureControlStruct]' = None - averageLoadControl: 'typing.Union[None, Nullable, DemandResponseLoadControl.Structs.AverageLoadControlStruct]' = None - dutyCycleControl: 'typing.Union[None, Nullable, DemandResponseLoadControl.Structs.DutyCycleControlStruct]' = None - powerSavingsControl: 'typing.Union[None, Nullable, DemandResponseLoadControl.Structs.PowerSavingsControlStruct]' = None - heatingSourceControl: 'typing.Union[None, Nullable, DemandResponseLoadControl.Structs.HeatingSourceControlStruct]' = None + eventID: bytes = b"" + transitionIndex: typing.Union[Nullable, uint] = NullValue + status: DemandResponseLoadControl.Enums.LoadControlEventStatusEnum = 0 + criticality: DemandResponseLoadControl.Enums.CriticalityLevelEnum = 0 + control: uint = 0 + temperatureControl: typing.Union[None, Nullable, DemandResponseLoadControl.Structs.TemperatureControlStruct] = None + averageLoadControl: typing.Union[None, Nullable, DemandResponseLoadControl.Structs.AverageLoadControlStruct] = None + dutyCycleControl: typing.Union[None, Nullable, DemandResponseLoadControl.Structs.DutyCycleControlStruct] = None + powerSavingsControl: typing.Union[None, Nullable, DemandResponseLoadControl.Structs.PowerSavingsControlStruct] = None + heatingSourceControl: typing.Union[None, Nullable, DemandResponseLoadControl.Structs.HeatingSourceControlStruct] = None @dataclass @@ -24580,20 +23396,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="activeMessageIDs", Tag=0x00000001, Type=typing.List[bytes]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - messages: 'typing.List[Messages.Structs.MessageStruct]' = None - activeMessageIDs: 'typing.List[bytes]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + messages: typing.List[Messages.Structs.MessageStruct] = field(default_factory=lambda: []) + activeMessageIDs: typing.List[bytes] = field(default_factory=lambda: []) + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class FutureMessagePreferenceEnum(MatterIntEnum): @@ -24606,7 +23420,7 @@ class FutureMessagePreferenceEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class MessagePriorityEnum(MatterIntEnum): kLow = 0x00 @@ -24617,7 +23431,7 @@ class MessagePriorityEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class Bitmaps: class Feature(IntFlag): @@ -24676,7 +23490,7 @@ class PresentMessagesRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000097 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24691,20 +23505,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="responses", Tag=6, Type=typing.Optional[typing.List[Messages.Structs.MessageResponseOptionStruct]]), ]) - messageID: 'bytes' = b"" - priority: 'Messages.Enums.MessagePriorityEnum' = 0 - messageControl: 'uint' = 0 - startTime: 'typing.Union[Nullable, uint]' = NullValue - duration: 'typing.Union[Nullable, uint]' = NullValue - messageText: 'str' = "" - responses: 'typing.Optional[typing.List[Messages.Structs.MessageResponseOptionStruct]]' = None + messageID: bytes = b"" + priority: Messages.Enums.MessagePriorityEnum = 0 + messageControl: uint = 0 + startTime: typing.Union[Nullable, uint] = NullValue + duration: typing.Union[Nullable, uint] = NullValue + messageText: str = "" + responses: typing.Optional[typing.List[Messages.Structs.MessageResponseOptionStruct]] = None @dataclass class CancelMessagesRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000097 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -24713,7 +23527,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="messageIDs", Tag=0, Type=typing.List[bytes]), ]) - messageIDs: 'typing.List[bytes]' = field(default_factory=lambda: []) + messageIDs: typing.List[bytes] = field(default_factory=lambda: []) class Attributes: @dataclass @@ -24730,7 +23544,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[Messages.Structs.MessageStruct]) - value: 'typing.List[Messages.Structs.MessageStruct]' = field(default_factory=lambda: []) + value: typing.List[Messages.Structs.MessageStruct] = field(default_factory=lambda: []) @dataclass class ActiveMessageIDs(ClusterAttributeDescriptor): @@ -24746,7 +23560,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[bytes]) - value: 'typing.List[bytes]' = field(default_factory=lambda: []) + value: typing.List[bytes] = field(default_factory=lambda: []) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -24762,7 +23576,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -24778,23 +23592,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000097 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -24810,7 +23608,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -24826,7 +23624,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -24842,7 +23640,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -24862,7 +23660,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="messageID", Tag=0, Type=bytes), ]) - messageID: 'bytes' = b"" + messageID: bytes = b"" @dataclass class MessagePresented(ClusterEvent): @@ -24881,7 +23679,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="messageID", Tag=0, Type=bytes), ]) - messageID: 'bytes' = b"" + messageID: bytes = b"" @dataclass class MessageComplete(ClusterEvent): @@ -24903,10 +23701,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="futureMessagesPreference", Tag=3, Type=typing.Union[Nullable, Messages.Enums.FutureMessagePreferenceEnum]), ]) - messageID: 'bytes' = b"" - responseID: 'typing.Union[None, Nullable, uint]' = None - reply: 'typing.Union[None, Nullable, str]' = None - futureMessagesPreference: 'typing.Union[Nullable, Messages.Enums.FutureMessagePreferenceEnum]' = NullValue + messageID: bytes = b"" + responseID: typing.Union[None, Nullable, uint] = None + reply: typing.Union[None, Nullable, str] = None + futureMessagesPreference: typing.Union[Nullable, Messages.Enums.FutureMessagePreferenceEnum] = NullValue @dataclass @@ -24927,26 +23725,24 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optOutState", Tag=0x00000007, Type=typing.Optional[DeviceEnergyManagement.Enums.OptOutStateEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - ESAType: 'DeviceEnergyManagement.Enums.ESATypeEnum' = None - ESACanGenerate: 'bool' = None - ESAState: 'DeviceEnergyManagement.Enums.ESAStateEnum' = None - absMinPower: 'int' = None - absMaxPower: 'int' = None - powerAdjustmentCapability: 'typing.Union[None, Nullable, DeviceEnergyManagement.Structs.PowerAdjustCapabilityStruct]' = None - forecast: 'typing.Union[None, Nullable, DeviceEnergyManagement.Structs.ForecastStruct]' = None - optOutState: 'typing.Optional[DeviceEnergyManagement.Enums.OptOutStateEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + ESAType: DeviceEnergyManagement.Enums.ESATypeEnum = 0 + ESACanGenerate: bool = False + ESAState: DeviceEnergyManagement.Enums.ESAStateEnum = 0 + absMinPower: int = 0 + absMaxPower: int = 0 + powerAdjustmentCapability: typing.Union[None, Nullable, DeviceEnergyManagement.Structs.PowerAdjustCapabilityStruct] = None + forecast: typing.Union[None, Nullable, DeviceEnergyManagement.Structs.ForecastStruct] = None + optOutState: typing.Optional[DeviceEnergyManagement.Enums.OptOutStateEnum] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class AdjustmentCauseEnum(MatterIntEnum): @@ -24956,7 +23752,7 @@ class AdjustmentCauseEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class CauseEnum(MatterIntEnum): kNormalCompletion = 0x00 @@ -24968,7 +23764,7 @@ class CauseEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class CostTypeEnum(MatterIntEnum): kFinancial = 0x00 @@ -24979,7 +23775,7 @@ class CostTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class ESAStateEnum(MatterIntEnum): kOffline = 0x00 @@ -24991,7 +23787,7 @@ class ESAStateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class ESATypeEnum(MatterIntEnum): kEvse = 0x00 @@ -25013,7 +23809,7 @@ class ESATypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 14, + kUnknownEnumValue = 14 class ForecastUpdateReasonEnum(MatterIntEnum): kInternalOptimization = 0x00 @@ -25023,7 +23819,7 @@ class ForecastUpdateReasonEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class OptOutStateEnum(MatterIntEnum): kNoOptOut = 0x00 @@ -25034,7 +23830,7 @@ class OptOutStateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class PowerAdjustReasonEnum(MatterIntEnum): kNoAdjustment = 0x00 @@ -25044,7 +23840,7 @@ class PowerAdjustReasonEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class Bitmaps: class Feature(IntFlag): @@ -25216,7 +24012,7 @@ class PowerAdjustRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000098 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -25227,16 +24023,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="cause", Tag=2, Type=DeviceEnergyManagement.Enums.AdjustmentCauseEnum), ]) - power: 'int' = 0 - duration: 'uint' = 0 - cause: 'DeviceEnergyManagement.Enums.AdjustmentCauseEnum' = 0 + power: int = 0 + duration: uint = 0 + cause: DeviceEnergyManagement.Enums.AdjustmentCauseEnum = 0 @dataclass class CancelPowerAdjustRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000098 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -25249,7 +24045,7 @@ class StartTimeAdjustRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000098 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -25259,15 +24055,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="cause", Tag=1, Type=DeviceEnergyManagement.Enums.AdjustmentCauseEnum), ]) - requestedStartTime: 'uint' = 0 - cause: 'DeviceEnergyManagement.Enums.AdjustmentCauseEnum' = 0 + requestedStartTime: uint = 0 + cause: DeviceEnergyManagement.Enums.AdjustmentCauseEnum = 0 @dataclass class PauseRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000098 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -25277,15 +24073,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="cause", Tag=1, Type=DeviceEnergyManagement.Enums.AdjustmentCauseEnum), ]) - duration: 'uint' = 0 - cause: 'DeviceEnergyManagement.Enums.AdjustmentCauseEnum' = 0 + duration: uint = 0 + cause: DeviceEnergyManagement.Enums.AdjustmentCauseEnum = 0 @dataclass class ResumeRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000098 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -25298,7 +24094,7 @@ class ModifyForecastRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000098 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -25309,16 +24105,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="cause", Tag=2, Type=DeviceEnergyManagement.Enums.AdjustmentCauseEnum), ]) - forecastID: 'uint' = 0 - slotAdjustments: 'typing.List[DeviceEnergyManagement.Structs.SlotAdjustmentStruct]' = field(default_factory=lambda: []) - cause: 'DeviceEnergyManagement.Enums.AdjustmentCauseEnum' = 0 + forecastID: uint = 0 + slotAdjustments: typing.List[DeviceEnergyManagement.Structs.SlotAdjustmentStruct] = field(default_factory=lambda: []) + cause: DeviceEnergyManagement.Enums.AdjustmentCauseEnum = 0 @dataclass class RequestConstraintBasedForecast(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000098 command_id: typing.ClassVar[int] = 0x00000006 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -25328,15 +24124,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="cause", Tag=1, Type=DeviceEnergyManagement.Enums.AdjustmentCauseEnum), ]) - constraints: 'typing.List[DeviceEnergyManagement.Structs.ConstraintsStruct]' = field(default_factory=lambda: []) - cause: 'DeviceEnergyManagement.Enums.AdjustmentCauseEnum' = 0 + constraints: typing.List[DeviceEnergyManagement.Structs.ConstraintsStruct] = field(default_factory=lambda: []) + cause: DeviceEnergyManagement.Enums.AdjustmentCauseEnum = 0 @dataclass class CancelRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000098 command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -25359,7 +24155,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=DeviceEnergyManagement.Enums.ESATypeEnum) - value: 'DeviceEnergyManagement.Enums.ESATypeEnum' = 0 + value: DeviceEnergyManagement.Enums.ESATypeEnum = 0 @dataclass class ESACanGenerate(ClusterAttributeDescriptor): @@ -25375,7 +24171,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class ESAState(ClusterAttributeDescriptor): @@ -25391,7 +24187,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=DeviceEnergyManagement.Enums.ESAStateEnum) - value: 'DeviceEnergyManagement.Enums.ESAStateEnum' = 0 + value: DeviceEnergyManagement.Enums.ESAStateEnum = 0 @dataclass class AbsMinPower(ClusterAttributeDescriptor): @@ -25407,7 +24203,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=int) - value: 'int' = 0 + value: int = 0 @dataclass class AbsMaxPower(ClusterAttributeDescriptor): @@ -25423,7 +24219,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=int) - value: 'int' = 0 + value: int = 0 @dataclass class PowerAdjustmentCapability(ClusterAttributeDescriptor): @@ -25439,7 +24235,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, DeviceEnergyManagement.Structs.PowerAdjustCapabilityStruct]) - value: 'typing.Union[None, Nullable, DeviceEnergyManagement.Structs.PowerAdjustCapabilityStruct]' = None + value: typing.Union[None, Nullable, DeviceEnergyManagement.Structs.PowerAdjustCapabilityStruct] = None @dataclass class Forecast(ClusterAttributeDescriptor): @@ -25455,7 +24251,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, DeviceEnergyManagement.Structs.ForecastStruct]) - value: 'typing.Union[None, Nullable, DeviceEnergyManagement.Structs.ForecastStruct]' = None + value: typing.Union[None, Nullable, DeviceEnergyManagement.Structs.ForecastStruct] = None @dataclass class OptOutState(ClusterAttributeDescriptor): @@ -25471,7 +24267,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[DeviceEnergyManagement.Enums.OptOutStateEnum]) - value: 'typing.Optional[DeviceEnergyManagement.Enums.OptOutStateEnum]' = None + value: typing.Optional[DeviceEnergyManagement.Enums.OptOutStateEnum] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -25487,7 +24283,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -25503,23 +24299,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000098 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -25535,7 +24315,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -25551,7 +24331,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -25567,7 +24347,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -25605,9 +24385,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="energyUse", Tag=2, Type=int), ]) - cause: 'DeviceEnergyManagement.Enums.CauseEnum' = 0 - duration: 'uint' = 0 - energyUse: 'int' = 0 + cause: DeviceEnergyManagement.Enums.CauseEnum = 0 + duration: uint = 0 + energyUse: int = 0 @dataclass class Paused(ClusterEvent): @@ -25642,7 +24422,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="cause", Tag=0, Type=DeviceEnergyManagement.Enums.CauseEnum), ]) - cause: 'DeviceEnergyManagement.Enums.CauseEnum' = 0 + cause: DeviceEnergyManagement.Enums.CauseEnum = 0 @dataclass @@ -25678,41 +24458,39 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="sessionEnergyDischarged", Tag=0x00000043, Type=typing.Union[None, Nullable, int]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - state: 'typing.Union[Nullable, EnergyEvse.Enums.StateEnum]' = None - supplyState: 'EnergyEvse.Enums.SupplyStateEnum' = None - faultState: 'EnergyEvse.Enums.FaultStateEnum' = None - chargingEnabledUntil: 'typing.Union[Nullable, uint]' = None - dischargingEnabledUntil: 'typing.Union[None, Nullable, uint]' = None - circuitCapacity: 'int' = None - minimumChargeCurrent: 'int' = None - maximumChargeCurrent: 'int' = None - maximumDischargeCurrent: 'typing.Optional[int]' = None - userMaximumChargeCurrent: 'typing.Optional[int]' = None - randomizationDelayWindow: 'typing.Optional[uint]' = None - nextChargeStartTime: 'typing.Union[None, Nullable, uint]' = None - nextChargeTargetTime: 'typing.Union[None, Nullable, uint]' = None - nextChargeRequiredEnergy: 'typing.Union[None, Nullable, int]' = None - nextChargeTargetSoC: 'typing.Union[None, Nullable, uint]' = None - approximateEVEfficiency: 'typing.Union[None, Nullable, uint]' = None - stateOfCharge: 'typing.Union[None, Nullable, uint]' = None - batteryCapacity: 'typing.Union[None, Nullable, int]' = None - vehicleID: 'typing.Union[None, Nullable, str]' = None - sessionID: 'typing.Union[Nullable, uint]' = None - sessionDuration: 'typing.Union[Nullable, uint]' = None - sessionEnergyCharged: 'typing.Union[Nullable, int]' = None - sessionEnergyDischarged: 'typing.Union[None, Nullable, int]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + state: typing.Union[Nullable, EnergyEvse.Enums.StateEnum] = NullValue + supplyState: EnergyEvse.Enums.SupplyStateEnum = 0 + faultState: EnergyEvse.Enums.FaultStateEnum = 0 + chargingEnabledUntil: typing.Union[Nullable, uint] = NullValue + dischargingEnabledUntil: typing.Union[None, Nullable, uint] = None + circuitCapacity: int = 0 + minimumChargeCurrent: int = 0 + maximumChargeCurrent: int = 0 + maximumDischargeCurrent: typing.Optional[int] = None + userMaximumChargeCurrent: typing.Optional[int] = None + randomizationDelayWindow: typing.Optional[uint] = None + nextChargeStartTime: typing.Union[None, Nullable, uint] = None + nextChargeTargetTime: typing.Union[None, Nullable, uint] = None + nextChargeRequiredEnergy: typing.Union[None, Nullable, int] = None + nextChargeTargetSoC: typing.Union[None, Nullable, uint] = None + approximateEVEfficiency: typing.Union[None, Nullable, uint] = None + stateOfCharge: typing.Union[None, Nullable, uint] = None + batteryCapacity: typing.Union[None, Nullable, int] = None + vehicleID: typing.Union[None, Nullable, str] = None + sessionID: typing.Union[Nullable, uint] = NullValue + sessionDuration: typing.Union[Nullable, uint] = NullValue + sessionEnergyCharged: typing.Union[Nullable, int] = NullValue + sessionEnergyDischarged: typing.Union[None, Nullable, int] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class EnergyTransferStoppedReasonEnum(MatterIntEnum): @@ -25723,7 +24501,7 @@ class EnergyTransferStoppedReasonEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class FaultStateEnum(MatterIntEnum): kNoError = 0x00 @@ -25747,7 +24525,7 @@ class FaultStateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 16, + kUnknownEnumValue = 16 class StateEnum(MatterIntEnum): kNotPluggedIn = 0x00 @@ -25761,7 +24539,7 @@ class StateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 7, + kUnknownEnumValue = 7 class SupplyStateEnum(MatterIntEnum): kDisabled = 0x00 @@ -25774,7 +24552,7 @@ class SupplyStateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 6, + kUnknownEnumValue = 6 class Bitmaps: class Feature(IntFlag): @@ -25828,7 +24606,7 @@ class GetTargetsResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000099 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -25837,14 +24615,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="chargingTargetSchedules", Tag=0, Type=typing.List[EnergyEvse.Structs.ChargingTargetScheduleStruct]), ]) - chargingTargetSchedules: 'typing.List[EnergyEvse.Structs.ChargingTargetScheduleStruct]' = field(default_factory=lambda: []) + chargingTargetSchedules: typing.List[EnergyEvse.Structs.ChargingTargetScheduleStruct] = field(default_factory=lambda: []) @dataclass class Disable(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000099 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -25861,7 +24639,7 @@ class EnableCharging(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000099 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -25876,16 +24654,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: def must_use_timed_invoke(cls) -> bool: return True - chargingEnabledUntil: 'typing.Union[Nullable, uint]' = NullValue - minimumChargeCurrent: 'int' = 0 - maximumChargeCurrent: 'int' = 0 + chargingEnabledUntil: typing.Union[Nullable, uint] = NullValue + minimumChargeCurrent: int = 0 + maximumChargeCurrent: int = 0 @dataclass class EnableDischarging(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000099 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -25899,15 +24677,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: def must_use_timed_invoke(cls) -> bool: return True - dischargingEnabledUntil: 'typing.Union[Nullable, uint]' = NullValue - maximumDischargeCurrent: 'int' = 0 + dischargingEnabledUntil: typing.Union[Nullable, uint] = NullValue + maximumDischargeCurrent: int = 0 @dataclass class StartDiagnostics(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000099 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -25924,7 +24702,7 @@ class SetTargets(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000099 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -25937,7 +24715,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: def must_use_timed_invoke(cls) -> bool: return True - chargingTargetSchedules: 'typing.List[EnergyEvse.Structs.ChargingTargetScheduleStruct]' = field(default_factory=lambda: []) + chargingTargetSchedules: typing.List[EnergyEvse.Structs.ChargingTargetScheduleStruct] = field(default_factory=lambda: []) @dataclass class GetTargets(ClusterCommand): @@ -25961,7 +24739,7 @@ class ClearTargets(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000099 command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -25988,7 +24766,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, EnergyEvse.Enums.StateEnum]) - value: 'typing.Union[Nullable, EnergyEvse.Enums.StateEnum]' = NullValue + value: typing.Union[Nullable, EnergyEvse.Enums.StateEnum] = NullValue @dataclass class SupplyState(ClusterAttributeDescriptor): @@ -26004,7 +24782,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=EnergyEvse.Enums.SupplyStateEnum) - value: 'EnergyEvse.Enums.SupplyStateEnum' = 0 + value: EnergyEvse.Enums.SupplyStateEnum = 0 @dataclass class FaultState(ClusterAttributeDescriptor): @@ -26020,7 +24798,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=EnergyEvse.Enums.FaultStateEnum) - value: 'EnergyEvse.Enums.FaultStateEnum' = 0 + value: EnergyEvse.Enums.FaultStateEnum = 0 @dataclass class ChargingEnabledUntil(ClusterAttributeDescriptor): @@ -26036,7 +24814,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class DischargingEnabledUntil(ClusterAttributeDescriptor): @@ -26052,7 +24830,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class CircuitCapacity(ClusterAttributeDescriptor): @@ -26068,7 +24846,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=int) - value: 'int' = 0 + value: int = 0 @dataclass class MinimumChargeCurrent(ClusterAttributeDescriptor): @@ -26084,7 +24862,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=int) - value: 'int' = 0 + value: int = 0 @dataclass class MaximumChargeCurrent(ClusterAttributeDescriptor): @@ -26100,7 +24878,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=int) - value: 'int' = 0 + value: int = 0 @dataclass class MaximumDischargeCurrent(ClusterAttributeDescriptor): @@ -26116,7 +24894,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class UserMaximumChargeCurrent(ClusterAttributeDescriptor): @@ -26132,7 +24910,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class RandomizationDelayWindow(ClusterAttributeDescriptor): @@ -26148,7 +24926,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class NextChargeStartTime(ClusterAttributeDescriptor): @@ -26164,7 +24942,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class NextChargeTargetTime(ClusterAttributeDescriptor): @@ -26180,7 +24958,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class NextChargeRequiredEnergy(ClusterAttributeDescriptor): @@ -26196,7 +24974,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class NextChargeTargetSoC(ClusterAttributeDescriptor): @@ -26212,7 +24990,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class ApproximateEVEfficiency(ClusterAttributeDescriptor): @@ -26228,7 +25006,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class StateOfCharge(ClusterAttributeDescriptor): @@ -26244,7 +25022,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class BatteryCapacity(ClusterAttributeDescriptor): @@ -26260,7 +25038,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class VehicleID(ClusterAttributeDescriptor): @@ -26276,7 +25054,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, str]) - value: 'typing.Union[None, Nullable, str]' = None + value: typing.Union[None, Nullable, str] = None @dataclass class SessionID(ClusterAttributeDescriptor): @@ -26292,7 +25070,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class SessionDuration(ClusterAttributeDescriptor): @@ -26308,7 +25086,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class SessionEnergyCharged(ClusterAttributeDescriptor): @@ -26324,7 +25102,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class SessionEnergyDischarged(ClusterAttributeDescriptor): @@ -26340,7 +25118,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -26356,7 +25134,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -26372,23 +25150,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000099 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -26404,7 +25166,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -26420,7 +25182,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -26436,7 +25198,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -26456,7 +25218,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="sessionID", Tag=0, Type=uint), ]) - sessionID: 'uint' = 0 + sessionID: uint = 0 @dataclass class EVNotDetected(ClusterEvent): @@ -26479,11 +25241,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="sessionEnergyDischarged", Tag=4, Type=typing.Optional[int]), ]) - sessionID: 'uint' = 0 - state: 'EnergyEvse.Enums.StateEnum' = 0 - sessionDuration: 'uint' = 0 - sessionEnergyCharged: 'int' = 0 - sessionEnergyDischarged: 'typing.Optional[int]' = None + sessionID: uint = 0 + state: EnergyEvse.Enums.StateEnum = 0 + sessionDuration: uint = 0 + sessionEnergyCharged: int = 0 + sessionEnergyDischarged: typing.Optional[int] = None @dataclass class EnergyTransferStarted(ClusterEvent): @@ -26505,10 +25267,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="maximumDischargeCurrent", Tag=3, Type=typing.Optional[int]), ]) - sessionID: 'uint' = 0 - state: 'EnergyEvse.Enums.StateEnum' = 0 - maximumCurrent: 'int' = 0 - maximumDischargeCurrent: 'typing.Optional[int]' = None + sessionID: uint = 0 + state: EnergyEvse.Enums.StateEnum = 0 + maximumCurrent: int = 0 + maximumDischargeCurrent: typing.Optional[int] = None @dataclass class EnergyTransferStopped(ClusterEvent): @@ -26531,11 +25293,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="energyDischarged", Tag=5, Type=typing.Optional[int]), ]) - sessionID: 'uint' = 0 - state: 'EnergyEvse.Enums.StateEnum' = 0 - reason: 'EnergyEvse.Enums.EnergyTransferStoppedReasonEnum' = 0 - energyTransferred: 'int' = 0 - energyDischarged: 'typing.Optional[int]' = None + sessionID: uint = 0 + state: EnergyEvse.Enums.StateEnum = 0 + reason: EnergyEvse.Enums.EnergyTransferStoppedReasonEnum = 0 + energyTransferred: int = 0 + energyDischarged: typing.Optional[int] = None @dataclass class Fault(ClusterEvent): @@ -26557,10 +25319,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="faultStateCurrentState", Tag=4, Type=EnergyEvse.Enums.FaultStateEnum), ]) - sessionID: 'typing.Union[Nullable, uint]' = NullValue - state: 'EnergyEvse.Enums.StateEnum' = 0 - faultStatePreviousState: 'EnergyEvse.Enums.FaultStateEnum' = 0 - faultStateCurrentState: 'EnergyEvse.Enums.FaultStateEnum' = 0 + sessionID: typing.Union[Nullable, uint] = NullValue + state: EnergyEvse.Enums.StateEnum = 0 + faultStatePreviousState: EnergyEvse.Enums.FaultStateEnum = 0 + faultStateCurrentState: EnergyEvse.Enums.FaultStateEnum = 0 @dataclass class Rfid(ClusterEvent): @@ -26579,7 +25341,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="uid", Tag=0, Type=bytes), ]) - uid: 'bytes' = b"" + uid: bytes = b"" @dataclass @@ -26597,23 +25359,21 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="currentLowPowerModeSensitivity", Tag=0x00000004, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - energyBalances: 'typing.Optional[typing.List[EnergyPreference.Structs.BalanceStruct]]' = None - currentEnergyBalance: 'typing.Optional[uint]' = None - energyPriorities: 'typing.Optional[typing.List[EnergyPreference.Enums.EnergyPriorityEnum]]' = None - lowPowerModeSensitivities: 'typing.Optional[typing.List[EnergyPreference.Structs.BalanceStruct]]' = None - currentLowPowerModeSensitivity: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + energyBalances: typing.Optional[typing.List[EnergyPreference.Structs.BalanceStruct]] = None + currentEnergyBalance: typing.Optional[uint] = None + energyPriorities: typing.Optional[typing.List[EnergyPreference.Enums.EnergyPriorityEnum]] = None + lowPowerModeSensitivities: typing.Optional[typing.List[EnergyPreference.Structs.BalanceStruct]] = None + currentLowPowerModeSensitivity: typing.Optional[uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class EnergyPriorityEnum(MatterIntEnum): @@ -26625,7 +25385,7 @@ class EnergyPriorityEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class Bitmaps: class Feature(IntFlag): @@ -26661,7 +25421,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[EnergyPreference.Structs.BalanceStruct]]) - value: 'typing.Optional[typing.List[EnergyPreference.Structs.BalanceStruct]]' = None + value: typing.Optional[typing.List[EnergyPreference.Structs.BalanceStruct]] = None @dataclass class CurrentEnergyBalance(ClusterAttributeDescriptor): @@ -26677,7 +25437,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class EnergyPriorities(ClusterAttributeDescriptor): @@ -26693,7 +25453,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[EnergyPreference.Enums.EnergyPriorityEnum]]) - value: 'typing.Optional[typing.List[EnergyPreference.Enums.EnergyPriorityEnum]]' = None + value: typing.Optional[typing.List[EnergyPreference.Enums.EnergyPriorityEnum]] = None @dataclass class LowPowerModeSensitivities(ClusterAttributeDescriptor): @@ -26709,7 +25469,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[EnergyPreference.Structs.BalanceStruct]]) - value: 'typing.Optional[typing.List[EnergyPreference.Structs.BalanceStruct]]' = None + value: typing.Optional[typing.List[EnergyPreference.Structs.BalanceStruct]] = None @dataclass class CurrentLowPowerModeSensitivity(ClusterAttributeDescriptor): @@ -26725,7 +25485,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -26741,7 +25501,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -26757,23 +25517,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000009B - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -26789,7 +25533,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -26805,7 +25549,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -26821,7 +25565,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -26836,20 +25580,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="activeEndpoints", Tag=0x00000001, Type=typing.Optional[typing.List[uint]]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - availableEndpoints: 'typing.Optional[typing.List[uint]]' = None - activeEndpoints: 'typing.Optional[typing.List[uint]]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + availableEndpoints: typing.Optional[typing.List[uint]] = None + activeEndpoints: typing.Optional[typing.List[uint]] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Bitmaps: class Feature(IntFlag): @@ -26873,7 +25615,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[uint]]) - value: 'typing.Optional[typing.List[uint]]' = None + value: typing.Optional[typing.List[uint]] = None @dataclass class ActiveEndpoints(ClusterAttributeDescriptor): @@ -26889,7 +25631,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[uint]]) - value: 'typing.Optional[typing.List[uint]]' = None + value: typing.Optional[typing.List[uint]] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -26905,7 +25647,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -26921,23 +25663,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000009C - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -26953,7 +25679,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -26969,7 +25695,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -26985,7 +25711,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -26998,26 +25724,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000000, Type=typing.List[EnergyEvseMode.Structs.ModeOptionStruct]), ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - supportedModes: 'typing.List[EnergyEvseMode.Structs.ModeOptionStruct]' = None - currentMode: 'uint' = None - startUpMode: 'typing.Union[None, Nullable, uint]' = None - onMode: 'typing.Union[None, Nullable, uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + supportedModes: typing.List[EnergyEvseMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) + currentMode: uint = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ModeTag(MatterIntEnum): @@ -27034,6 +25754,7 @@ class ModeTag(MatterIntEnum): kManual = 0x4000 kTimeOfUse = 0x4001 kSolarCharging = 0x4002 + kV2x = 0x4003 # kUnknownEnumValue intentionally not defined. This enum never goes # through DataModel::Decode, likely because it is a part of a derived # cluster. As a result having kUnknownEnumValue in this enum is error @@ -27088,14 +25809,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), ]) - newMode: 'uint' = 0 + newMode: uint = 0 @dataclass class ChangeToModeResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000009D command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27105,8 +25826,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), ]) - status: 'uint' = 0 - statusText: 'typing.Optional[str]' = None + status: uint = 0 + statusText: typing.Optional[str] = None class Attributes: @dataclass @@ -27123,7 +25844,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[EnergyEvseMode.Structs.ModeOptionStruct]) - value: 'typing.List[EnergyEvseMode.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + value: typing.List[EnergyEvseMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) @dataclass class CurrentMode(ClusterAttributeDescriptor): @@ -27139,39 +25860,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 - - @dataclass - class StartUpMode(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000009D - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000002 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None - - @dataclass - class OnMode(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000009D - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000003 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None + value: uint = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -27187,7 +25876,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -27203,23 +25892,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000009D - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -27235,7 +25908,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -27251,7 +25924,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -27267,7 +25940,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -27280,26 +25953,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000000, Type=typing.List[WaterHeaterMode.Structs.ModeOptionStruct]), ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - supportedModes: 'typing.List[WaterHeaterMode.Structs.ModeOptionStruct]' = None - currentMode: 'uint' = None - startUpMode: 'typing.Union[None, Nullable, uint]' = None - onMode: 'typing.Union[None, Nullable, uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + supportedModes: typing.List[WaterHeaterMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) + currentMode: uint = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ModeTag(MatterIntEnum): @@ -27370,14 +26037,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), ]) - newMode: 'uint' = 0 + newMode: uint = 0 @dataclass class ChangeToModeResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000009E command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27387,8 +26054,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), ]) - status: 'uint' = 0 - statusText: 'typing.Optional[str]' = None + status: uint = 0 + statusText: typing.Optional[str] = None class Attributes: @dataclass @@ -27405,7 +26072,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[WaterHeaterMode.Structs.ModeOptionStruct]) - value: 'typing.List[WaterHeaterMode.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + value: typing.List[WaterHeaterMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) @dataclass class CurrentMode(ClusterAttributeDescriptor): @@ -27421,39 +26088,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 - - @dataclass - class StartUpMode(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000009E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000002 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None - - @dataclass - class OnMode(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000009E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000003 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None + value: uint = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -27469,7 +26104,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -27485,23 +26120,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000009E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -27517,7 +26136,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -27533,7 +26152,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -27549,7 +26168,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -27562,26 +26181,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000000, Type=typing.List[DeviceEnergyManagementMode.Structs.ModeOptionStruct]), ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - supportedModes: 'typing.List[DeviceEnergyManagementMode.Structs.ModeOptionStruct]' = None - currentMode: 'uint' = None - startUpMode: 'typing.Union[None, Nullable, uint]' = None - onMode: 'typing.Union[None, Nullable, uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + supportedModes: typing.List[DeviceEnergyManagementMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) + currentMode: uint = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ModeTag(MatterIntEnum): @@ -27653,14 +26266,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), ]) - newMode: 'uint' = 0 + newMode: uint = 0 @dataclass class ChangeToModeResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000009F command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -27670,8 +26283,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), ]) - status: 'uint' = 0 - statusText: 'typing.Optional[str]' = None + status: uint = 0 + statusText: typing.Optional[str] = None class Attributes: @dataclass @@ -27688,7 +26301,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[DeviceEnergyManagementMode.Structs.ModeOptionStruct]) - value: 'typing.List[DeviceEnergyManagementMode.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + value: typing.List[DeviceEnergyManagementMode.Structs.ModeOptionStruct] = field(default_factory=lambda: []) @dataclass class CurrentMode(ClusterAttributeDescriptor): @@ -27704,39 +26317,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 - - @dataclass - class StartUpMode(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000009F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000002 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None - - @dataclass - class OnMode(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000009F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000003 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None + value: uint = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -27752,7 +26333,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -27768,23 +26349,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000009F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -27800,7 +26365,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -27816,7 +26381,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -27832,7 +26397,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -27890,63 +26455,61 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="numberOfAliroEndpointKeysSupported", Tag=0x00000088, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - lockState: 'typing.Union[Nullable, DoorLock.Enums.DlLockState]' = None - lockType: 'DoorLock.Enums.DlLockType' = None - actuatorEnabled: 'bool' = None - doorState: 'typing.Union[None, Nullable, DoorLock.Enums.DoorStateEnum]' = None - doorOpenEvents: 'typing.Optional[uint]' = None - doorClosedEvents: 'typing.Optional[uint]' = None - openPeriod: 'typing.Optional[uint]' = None - numberOfTotalUsersSupported: 'typing.Optional[uint]' = None - numberOfPINUsersSupported: 'typing.Optional[uint]' = None - numberOfRFIDUsersSupported: 'typing.Optional[uint]' = None - numberOfWeekDaySchedulesSupportedPerUser: 'typing.Optional[uint]' = None - numberOfYearDaySchedulesSupportedPerUser: 'typing.Optional[uint]' = None - numberOfHolidaySchedulesSupported: 'typing.Optional[uint]' = None - maxPINCodeLength: 'typing.Optional[uint]' = None - minPINCodeLength: 'typing.Optional[uint]' = None - maxRFIDCodeLength: 'typing.Optional[uint]' = None - minRFIDCodeLength: 'typing.Optional[uint]' = None - credentialRulesSupport: 'typing.Optional[uint]' = None - numberOfCredentialsSupportedPerUser: 'typing.Optional[uint]' = None - language: 'typing.Optional[str]' = None - LEDSettings: 'typing.Optional[uint]' = None - autoRelockTime: 'typing.Optional[uint]' = None - soundVolume: 'typing.Optional[uint]' = None - operatingMode: 'DoorLock.Enums.OperatingModeEnum' = None - supportedOperatingModes: 'uint' = None - defaultConfigurationRegister: 'typing.Optional[uint]' = None - enableLocalProgramming: 'typing.Optional[bool]' = None - enableOneTouchLocking: 'typing.Optional[bool]' = None - enableInsideStatusLED: 'typing.Optional[bool]' = None - enablePrivacyModeButton: 'typing.Optional[bool]' = None - localProgrammingFeatures: 'typing.Optional[uint]' = None - wrongCodeEntryLimit: 'typing.Optional[uint]' = None - userCodeTemporaryDisableTime: 'typing.Optional[uint]' = None - sendPINOverTheAir: 'typing.Optional[bool]' = None - requirePINforRemoteOperation: 'typing.Optional[bool]' = None - expiringUserTimeout: 'typing.Optional[uint]' = None - aliroReaderVerificationKey: 'typing.Union[None, Nullable, bytes]' = None - aliroReaderGroupIdentifier: 'typing.Union[None, Nullable, bytes]' = None - aliroReaderGroupSubIdentifier: 'typing.Optional[bytes]' = None - aliroExpeditedTransactionSupportedProtocolVersions: 'typing.Optional[typing.List[bytes]]' = None - aliroGroupResolvingKey: 'typing.Union[None, Nullable, bytes]' = None - aliroSupportedBLEUWBProtocolVersions: 'typing.Optional[typing.List[bytes]]' = None - aliroBLEAdvertisingVersion: 'typing.Optional[uint]' = None - numberOfAliroCredentialIssuerKeysSupported: 'typing.Optional[uint]' = None - numberOfAliroEndpointKeysSupported: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + lockState: typing.Union[Nullable, DoorLock.Enums.DlLockState] = NullValue + lockType: DoorLock.Enums.DlLockType = 0 + actuatorEnabled: bool = False + doorState: typing.Union[None, Nullable, DoorLock.Enums.DoorStateEnum] = None + doorOpenEvents: typing.Optional[uint] = None + doorClosedEvents: typing.Optional[uint] = None + openPeriod: typing.Optional[uint] = None + numberOfTotalUsersSupported: typing.Optional[uint] = None + numberOfPINUsersSupported: typing.Optional[uint] = None + numberOfRFIDUsersSupported: typing.Optional[uint] = None + numberOfWeekDaySchedulesSupportedPerUser: typing.Optional[uint] = None + numberOfYearDaySchedulesSupportedPerUser: typing.Optional[uint] = None + numberOfHolidaySchedulesSupported: typing.Optional[uint] = None + maxPINCodeLength: typing.Optional[uint] = None + minPINCodeLength: typing.Optional[uint] = None + maxRFIDCodeLength: typing.Optional[uint] = None + minRFIDCodeLength: typing.Optional[uint] = None + credentialRulesSupport: typing.Optional[uint] = None + numberOfCredentialsSupportedPerUser: typing.Optional[uint] = None + language: typing.Optional[str] = None + LEDSettings: typing.Optional[uint] = None + autoRelockTime: typing.Optional[uint] = None + soundVolume: typing.Optional[uint] = None + operatingMode: DoorLock.Enums.OperatingModeEnum = 0 + supportedOperatingModes: uint = 0 + defaultConfigurationRegister: typing.Optional[uint] = None + enableLocalProgramming: typing.Optional[bool] = None + enableOneTouchLocking: typing.Optional[bool] = None + enableInsideStatusLED: typing.Optional[bool] = None + enablePrivacyModeButton: typing.Optional[bool] = None + localProgrammingFeatures: typing.Optional[uint] = None + wrongCodeEntryLimit: typing.Optional[uint] = None + userCodeTemporaryDisableTime: typing.Optional[uint] = None + sendPINOverTheAir: typing.Optional[bool] = None + requirePINforRemoteOperation: typing.Optional[bool] = None + expiringUserTimeout: typing.Optional[uint] = None + aliroReaderVerificationKey: typing.Union[None, Nullable, bytes] = None + aliroReaderGroupIdentifier: typing.Union[None, Nullable, bytes] = None + aliroReaderGroupSubIdentifier: typing.Optional[bytes] = None + aliroExpeditedTransactionSupportedProtocolVersions: typing.Optional[typing.List[bytes]] = None + aliroGroupResolvingKey: typing.Union[None, Nullable, bytes] = None + aliroSupportedBLEUWBProtocolVersions: typing.Optional[typing.List[bytes]] = None + aliroBLEAdvertisingVersion: typing.Optional[uint] = None + numberOfAliroCredentialIssuerKeysSupported: typing.Optional[uint] = None + numberOfAliroEndpointKeysSupported: typing.Optional[uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class AlarmCodeEnum(MatterIntEnum): @@ -27962,7 +26525,7 @@ class AlarmCodeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class CredentialRuleEnum(MatterIntEnum): kSingle = 0x00 @@ -27972,7 +26535,7 @@ class CredentialRuleEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class CredentialTypeEnum(MatterIntEnum): kProgrammingPIN = 0x00 @@ -27988,7 +26551,7 @@ class CredentialTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 9, + kUnknownEnumValue = 9 class DataOperationTypeEnum(MatterIntEnum): kAdd = 0x00 @@ -27998,7 +26561,7 @@ class DataOperationTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class DlLockState(MatterIntEnum): kNotFullyLocked = 0x00 @@ -28009,7 +26572,7 @@ class DlLockState(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class DlLockType(MatterIntEnum): kDeadBolt = 0x00 @@ -28028,7 +26591,7 @@ class DlLockType(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 12, + kUnknownEnumValue = 12 class DlStatus(MatterIntEnum): kSuccess = 0x00 @@ -28042,7 +26605,7 @@ class DlStatus(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class DoorLockOperationEventCode(MatterIntEnum): kUnknownOrMfgSpecific = 0x00 @@ -28064,7 +26627,7 @@ class DoorLockOperationEventCode(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 15, + kUnknownEnumValue = 15 class DoorLockProgrammingEventCode(MatterIntEnum): kUnknownOrMfgSpecific = 0x00 @@ -28078,7 +26641,7 @@ class DoorLockProgrammingEventCode(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 7, + kUnknownEnumValue = 7 class DoorLockSetPinOrIdStatus(MatterIntEnum): kSuccess = 0x00 @@ -28089,7 +26652,7 @@ class DoorLockSetPinOrIdStatus(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class DoorLockUserStatus(MatterIntEnum): kAvailable = 0x00 @@ -28100,7 +26663,7 @@ class DoorLockUserStatus(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class DoorLockUserType(MatterIntEnum): kUnrestricted = 0x00 @@ -28113,7 +26676,7 @@ class DoorLockUserType(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class DoorStateEnum(MatterIntEnum): kDoorOpen = 0x00 @@ -28126,7 +26689,7 @@ class DoorStateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 6, + kUnknownEnumValue = 6 class LockDataTypeEnum(MatterIntEnum): kUnspecified = 0x00 @@ -28147,7 +26710,7 @@ class LockDataTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 14, + kUnknownEnumValue = 14 class LockOperationTypeEnum(MatterIntEnum): kLock = 0x00 @@ -28159,7 +26722,7 @@ class LockOperationTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class OperatingModeEnum(MatterIntEnum): kNormal = 0x00 @@ -28171,7 +26734,7 @@ class OperatingModeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class OperationErrorEnum(MatterIntEnum): kUnspecified = 0x00 @@ -28183,7 +26746,7 @@ class OperationErrorEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class OperationSourceEnum(MatterIntEnum): kUnspecified = 0x00 @@ -28201,7 +26764,7 @@ class OperationSourceEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 11, + kUnknownEnumValue = 11 class UserStatusEnum(MatterIntEnum): kAvailable = 0x00 @@ -28211,7 +26774,7 @@ class UserStatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class UserTypeEnum(MatterIntEnum): kUnrestrictedUser = 0x00 @@ -28228,7 +26791,7 @@ class UserTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 10, + kUnknownEnumValue = 10 class Bitmaps: class DaysMaskMap(IntFlag): @@ -28379,7 +26942,7 @@ class LockDoor(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28392,14 +26955,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: def must_use_timed_invoke(cls) -> bool: return True - PINCode: 'typing.Optional[bytes]' = None + PINCode: typing.Optional[bytes] = None @dataclass class UnlockDoor(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28412,14 +26975,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: def must_use_timed_invoke(cls) -> bool: return True - PINCode: 'typing.Optional[bytes]' = None + PINCode: typing.Optional[bytes] = None @dataclass class UnlockWithTimeout(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28433,15 +26996,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: def must_use_timed_invoke(cls) -> bool: return True - timeout: 'uint' = 0 - PINCode: 'typing.Optional[bytes]' = None + timeout: uint = 0 + PINCode: typing.Optional[bytes] = None @dataclass class SetWeekDaySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x0000000B is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28456,13 +27019,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="endMinute", Tag=6, Type=uint), ]) - weekDayIndex: 'uint' = 0 - userIndex: 'uint' = 0 - daysMask: 'uint' = 0 - startHour: 'uint' = 0 - startMinute: 'uint' = 0 - endHour: 'uint' = 0 - endMinute: 'uint' = 0 + weekDayIndex: uint = 0 + userIndex: uint = 0 + daysMask: uint = 0 + startHour: uint = 0 + startMinute: uint = 0 + endHour: uint = 0 + endMinute: uint = 0 @dataclass class GetWeekDaySchedule(ClusterCommand): @@ -28479,15 +27042,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), ]) - weekDayIndex: 'uint' = 0 - userIndex: 'uint' = 0 + weekDayIndex: uint = 0 + userIndex: uint = 0 @dataclass class GetWeekDayScheduleResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x0000000C is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28503,21 +27066,21 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="endMinute", Tag=7, Type=typing.Optional[uint]), ]) - weekDayIndex: 'uint' = 0 - userIndex: 'uint' = 0 - status: 'DoorLock.Enums.DlStatus' = 0 - daysMask: 'typing.Optional[uint]' = None - startHour: 'typing.Optional[uint]' = None - startMinute: 'typing.Optional[uint]' = None - endHour: 'typing.Optional[uint]' = None - endMinute: 'typing.Optional[uint]' = None + weekDayIndex: uint = 0 + userIndex: uint = 0 + status: DoorLock.Enums.DlStatus = 0 + daysMask: typing.Optional[uint] = None + startHour: typing.Optional[uint] = None + startMinute: typing.Optional[uint] = None + endHour: typing.Optional[uint] = None + endMinute: typing.Optional[uint] = None @dataclass class ClearWeekDaySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x0000000D is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28527,15 +27090,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), ]) - weekDayIndex: 'uint' = 0 - userIndex: 'uint' = 0 + weekDayIndex: uint = 0 + userIndex: uint = 0 @dataclass class SetYearDaySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x0000000E is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28547,10 +27110,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="localEndTime", Tag=3, Type=uint), ]) - yearDayIndex: 'uint' = 0 - userIndex: 'uint' = 0 - localStartTime: 'uint' = 0 - localEndTime: 'uint' = 0 + yearDayIndex: uint = 0 + userIndex: uint = 0 + localStartTime: uint = 0 + localEndTime: uint = 0 @dataclass class GetYearDaySchedule(ClusterCommand): @@ -28567,15 +27130,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), ]) - yearDayIndex: 'uint' = 0 - userIndex: 'uint' = 0 + yearDayIndex: uint = 0 + userIndex: uint = 0 @dataclass class GetYearDayScheduleResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x0000000F is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28588,18 +27151,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="localEndTime", Tag=4, Type=typing.Optional[uint]), ]) - yearDayIndex: 'uint' = 0 - userIndex: 'uint' = 0 - status: 'DoorLock.Enums.DlStatus' = 0 - localStartTime: 'typing.Optional[uint]' = None - localEndTime: 'typing.Optional[uint]' = None + yearDayIndex: uint = 0 + userIndex: uint = 0 + status: DoorLock.Enums.DlStatus = 0 + localStartTime: typing.Optional[uint] = None + localEndTime: typing.Optional[uint] = None @dataclass class ClearYearDaySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000010 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28609,15 +27172,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=uint), ]) - yearDayIndex: 'uint' = 0 - userIndex: 'uint' = 0 + yearDayIndex: uint = 0 + userIndex: uint = 0 @dataclass class SetHolidaySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000011 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28629,10 +27192,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="operatingMode", Tag=3, Type=DoorLock.Enums.OperatingModeEnum), ]) - holidayIndex: 'uint' = 0 - localStartTime: 'uint' = 0 - localEndTime: 'uint' = 0 - operatingMode: 'DoorLock.Enums.OperatingModeEnum' = 0 + holidayIndex: uint = 0 + localStartTime: uint = 0 + localEndTime: uint = 0 + operatingMode: DoorLock.Enums.OperatingModeEnum = 0 @dataclass class GetHolidaySchedule(ClusterCommand): @@ -28648,14 +27211,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="holidayIndex", Tag=0, Type=uint), ]) - holidayIndex: 'uint' = 0 + holidayIndex: uint = 0 @dataclass class GetHolidayScheduleResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000012 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28668,18 +27231,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="operatingMode", Tag=4, Type=typing.Optional[DoorLock.Enums.OperatingModeEnum]), ]) - holidayIndex: 'uint' = 0 - status: 'DoorLock.Enums.DlStatus' = 0 - localStartTime: 'typing.Optional[uint]' = None - localEndTime: 'typing.Optional[uint]' = None - operatingMode: 'typing.Optional[DoorLock.Enums.OperatingModeEnum]' = None + holidayIndex: uint = 0 + status: DoorLock.Enums.DlStatus = 0 + localStartTime: typing.Optional[uint] = None + localEndTime: typing.Optional[uint] = None + operatingMode: typing.Optional[DoorLock.Enums.OperatingModeEnum] = None @dataclass class ClearHolidaySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000013 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28688,14 +27251,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="holidayIndex", Tag=0, Type=uint), ]) - holidayIndex: 'uint' = 0 + holidayIndex: uint = 0 @dataclass class SetUser(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x0000001A is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28714,13 +27277,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: def must_use_timed_invoke(cls) -> bool: return True - operationType: 'DoorLock.Enums.DataOperationTypeEnum' = 0 - userIndex: 'uint' = 0 - userName: 'typing.Union[Nullable, str]' = NullValue - userUniqueID: 'typing.Union[Nullable, uint]' = NullValue - userStatus: 'typing.Union[Nullable, DoorLock.Enums.UserStatusEnum]' = NullValue - userType: 'typing.Union[Nullable, DoorLock.Enums.UserTypeEnum]' = NullValue - credentialRule: 'typing.Union[Nullable, DoorLock.Enums.CredentialRuleEnum]' = NullValue + operationType: DoorLock.Enums.DataOperationTypeEnum = 0 + userIndex: uint = 0 + userName: typing.Union[Nullable, str] = NullValue + userUniqueID: typing.Union[Nullable, uint] = NullValue + userStatus: typing.Union[Nullable, DoorLock.Enums.UserStatusEnum] = NullValue + userType: typing.Union[Nullable, DoorLock.Enums.UserTypeEnum] = NullValue + credentialRule: typing.Union[Nullable, DoorLock.Enums.CredentialRuleEnum] = NullValue @dataclass class GetUser(ClusterCommand): @@ -28736,14 +27299,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="userIndex", Tag=0, Type=uint), ]) - userIndex: 'uint' = 0 + userIndex: uint = 0 @dataclass class GetUserResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x0000001C is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28761,23 +27324,23 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="nextUserIndex", Tag=9, Type=typing.Union[Nullable, uint]), ]) - userIndex: 'uint' = 0 - userName: 'typing.Union[Nullable, str]' = NullValue - userUniqueID: 'typing.Union[Nullable, uint]' = NullValue - userStatus: 'typing.Union[Nullable, DoorLock.Enums.UserStatusEnum]' = NullValue - userType: 'typing.Union[Nullable, DoorLock.Enums.UserTypeEnum]' = NullValue - credentialRule: 'typing.Union[Nullable, DoorLock.Enums.CredentialRuleEnum]' = NullValue - credentials: 'typing.Union[Nullable, typing.List[DoorLock.Structs.CredentialStruct]]' = NullValue - creatorFabricIndex: 'typing.Union[Nullable, uint]' = NullValue - lastModifiedFabricIndex: 'typing.Union[Nullable, uint]' = NullValue - nextUserIndex: 'typing.Union[Nullable, uint]' = NullValue + userIndex: uint = 0 + userName: typing.Union[Nullable, str] = NullValue + userUniqueID: typing.Union[Nullable, uint] = NullValue + userStatus: typing.Union[Nullable, DoorLock.Enums.UserStatusEnum] = NullValue + userType: typing.Union[Nullable, DoorLock.Enums.UserTypeEnum] = NullValue + credentialRule: typing.Union[Nullable, DoorLock.Enums.CredentialRuleEnum] = NullValue + credentials: typing.Union[Nullable, typing.List[DoorLock.Structs.CredentialStruct]] = NullValue + creatorFabricIndex: typing.Union[Nullable, uint] = NullValue + lastModifiedFabricIndex: typing.Union[Nullable, uint] = NullValue + nextUserIndex: typing.Union[Nullable, uint] = NullValue @dataclass class ClearUser(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x0000001D is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28790,7 +27353,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: def must_use_timed_invoke(cls) -> bool: return True - userIndex: 'uint' = 0 + userIndex: uint = 0 @dataclass class SetCredential(ClusterCommand): @@ -28815,19 +27378,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: def must_use_timed_invoke(cls) -> bool: return True - operationType: 'DoorLock.Enums.DataOperationTypeEnum' = 0 - credential: 'DoorLock.Structs.CredentialStruct' = field(default_factory=lambda: DoorLock.Structs.CredentialStruct()) - credentialData: 'bytes' = b"" - userIndex: 'typing.Union[Nullable, uint]' = NullValue - userStatus: 'typing.Union[Nullable, DoorLock.Enums.UserStatusEnum]' = NullValue - userType: 'typing.Union[Nullable, DoorLock.Enums.UserTypeEnum]' = NullValue + operationType: DoorLock.Enums.DataOperationTypeEnum = 0 + credential: DoorLock.Structs.CredentialStruct = field(default_factory=lambda: DoorLock.Structs.CredentialStruct()) + credentialData: bytes = b"" + userIndex: typing.Union[Nullable, uint] = NullValue + userStatus: typing.Union[Nullable, DoorLock.Enums.UserStatusEnum] = NullValue + userType: typing.Union[Nullable, DoorLock.Enums.UserTypeEnum] = NullValue @dataclass class SetCredentialResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000023 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28838,9 +27401,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="nextCredentialIndex", Tag=2, Type=typing.Union[Nullable, uint]), ]) - status: 'DoorLock.Enums.DlStatus' = 0 - userIndex: 'typing.Union[Nullable, uint]' = NullValue - nextCredentialIndex: 'typing.Union[Nullable, uint]' = NullValue + status: DoorLock.Enums.DlStatus = 0 + userIndex: typing.Union[Nullable, uint] = NullValue + nextCredentialIndex: typing.Union[Nullable, uint] = NullValue @dataclass class GetCredentialStatus(ClusterCommand): @@ -28856,14 +27419,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="credential", Tag=0, Type=DoorLock.Structs.CredentialStruct), ]) - credential: 'DoorLock.Structs.CredentialStruct' = field(default_factory=lambda: DoorLock.Structs.CredentialStruct()) + credential: DoorLock.Structs.CredentialStruct = field(default_factory=lambda: DoorLock.Structs.CredentialStruct()) @dataclass class GetCredentialStatusResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000025 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28877,19 +27440,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="credentialData", Tag=5, Type=typing.Union[None, Nullable, bytes]), ]) - credentialExists: 'bool' = False - userIndex: 'typing.Union[Nullable, uint]' = NullValue - creatorFabricIndex: 'typing.Union[Nullable, uint]' = NullValue - lastModifiedFabricIndex: 'typing.Union[Nullable, uint]' = NullValue - nextCredentialIndex: 'typing.Union[Nullable, uint]' = NullValue - credentialData: 'typing.Union[None, Nullable, bytes]' = None + credentialExists: bool = False + userIndex: typing.Union[Nullable, uint] = NullValue + creatorFabricIndex: typing.Union[Nullable, uint] = NullValue + lastModifiedFabricIndex: typing.Union[Nullable, uint] = NullValue + nextCredentialIndex: typing.Union[Nullable, uint] = NullValue + credentialData: typing.Union[None, Nullable, bytes] = None @dataclass class ClearCredential(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000026 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28902,14 +27465,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: def must_use_timed_invoke(cls) -> bool: return True - credential: 'typing.Union[Nullable, DoorLock.Structs.CredentialStruct]' = NullValue + credential: typing.Union[Nullable, DoorLock.Structs.CredentialStruct] = NullValue @dataclass class UnboltDoor(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000027 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28922,14 +27485,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: def must_use_timed_invoke(cls) -> bool: return True - PINCode: 'typing.Optional[bytes]' = None + PINCode: typing.Optional[bytes] = None @dataclass class SetAliroReaderConfig(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000028 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28945,17 +27508,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: def must_use_timed_invoke(cls) -> bool: return True - signingKey: 'bytes' = b"" - verificationKey: 'bytes' = b"" - groupIdentifier: 'bytes' = b"" - groupResolvingKey: 'typing.Optional[bytes]' = None + signingKey: bytes = b"" + verificationKey: bytes = b"" + groupIdentifier: bytes = b"" + groupResolvingKey: typing.Optional[bytes] = None @dataclass class ClearAliroReaderConfig(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000101 command_id: typing.ClassVar[int] = 0x00000029 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -28982,7 +27545,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, DoorLock.Enums.DlLockState]) - value: 'typing.Union[Nullable, DoorLock.Enums.DlLockState]' = NullValue + value: typing.Union[Nullable, DoorLock.Enums.DlLockState] = NullValue @dataclass class LockType(ClusterAttributeDescriptor): @@ -28998,7 +27561,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=DoorLock.Enums.DlLockType) - value: 'DoorLock.Enums.DlLockType' = 0 + value: DoorLock.Enums.DlLockType = 0 @dataclass class ActuatorEnabled(ClusterAttributeDescriptor): @@ -29014,7 +27577,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class DoorState(ClusterAttributeDescriptor): @@ -29030,7 +27593,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, DoorLock.Enums.DoorStateEnum]) - value: 'typing.Union[None, Nullable, DoorLock.Enums.DoorStateEnum]' = None + value: typing.Union[None, Nullable, DoorLock.Enums.DoorStateEnum] = None @dataclass class DoorOpenEvents(ClusterAttributeDescriptor): @@ -29046,7 +27609,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class DoorClosedEvents(ClusterAttributeDescriptor): @@ -29062,7 +27625,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class OpenPeriod(ClusterAttributeDescriptor): @@ -29078,7 +27641,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class NumberOfTotalUsersSupported(ClusterAttributeDescriptor): @@ -29094,7 +27657,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class NumberOfPINUsersSupported(ClusterAttributeDescriptor): @@ -29110,7 +27673,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class NumberOfRFIDUsersSupported(ClusterAttributeDescriptor): @@ -29126,7 +27689,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class NumberOfWeekDaySchedulesSupportedPerUser(ClusterAttributeDescriptor): @@ -29142,7 +27705,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class NumberOfYearDaySchedulesSupportedPerUser(ClusterAttributeDescriptor): @@ -29158,7 +27721,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class NumberOfHolidaySchedulesSupported(ClusterAttributeDescriptor): @@ -29174,7 +27737,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class MaxPINCodeLength(ClusterAttributeDescriptor): @@ -29190,7 +27753,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class MinPINCodeLength(ClusterAttributeDescriptor): @@ -29206,7 +27769,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class MaxRFIDCodeLength(ClusterAttributeDescriptor): @@ -29222,7 +27785,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class MinRFIDCodeLength(ClusterAttributeDescriptor): @@ -29238,7 +27801,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class CredentialRulesSupport(ClusterAttributeDescriptor): @@ -29254,7 +27817,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class NumberOfCredentialsSupportedPerUser(ClusterAttributeDescriptor): @@ -29270,7 +27833,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Language(ClusterAttributeDescriptor): @@ -29286,7 +27849,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class LEDSettings(ClusterAttributeDescriptor): @@ -29302,7 +27865,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class AutoRelockTime(ClusterAttributeDescriptor): @@ -29318,7 +27881,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class SoundVolume(ClusterAttributeDescriptor): @@ -29334,7 +27897,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class OperatingMode(ClusterAttributeDescriptor): @@ -29350,7 +27913,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=DoorLock.Enums.OperatingModeEnum) - value: 'DoorLock.Enums.OperatingModeEnum' = 0 + value: DoorLock.Enums.OperatingModeEnum = 0 @dataclass class SupportedOperatingModes(ClusterAttributeDescriptor): @@ -29366,7 +27929,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class DefaultConfigurationRegister(ClusterAttributeDescriptor): @@ -29382,7 +27945,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class EnableLocalProgramming(ClusterAttributeDescriptor): @@ -29398,7 +27961,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Optional[bool]' = None + value: typing.Optional[bool] = None @dataclass class EnableOneTouchLocking(ClusterAttributeDescriptor): @@ -29414,7 +27977,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Optional[bool]' = None + value: typing.Optional[bool] = None @dataclass class EnableInsideStatusLED(ClusterAttributeDescriptor): @@ -29430,7 +27993,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Optional[bool]' = None + value: typing.Optional[bool] = None @dataclass class EnablePrivacyModeButton(ClusterAttributeDescriptor): @@ -29446,7 +28009,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Optional[bool]' = None + value: typing.Optional[bool] = None @dataclass class LocalProgrammingFeatures(ClusterAttributeDescriptor): @@ -29462,7 +28025,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class WrongCodeEntryLimit(ClusterAttributeDescriptor): @@ -29478,7 +28041,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class UserCodeTemporaryDisableTime(ClusterAttributeDescriptor): @@ -29494,7 +28057,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class SendPINOverTheAir(ClusterAttributeDescriptor): @@ -29510,7 +28073,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Optional[bool]' = None + value: typing.Optional[bool] = None @dataclass class RequirePINforRemoteOperation(ClusterAttributeDescriptor): @@ -29526,7 +28089,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Optional[bool]' = None + value: typing.Optional[bool] = None @dataclass class ExpiringUserTimeout(ClusterAttributeDescriptor): @@ -29542,7 +28105,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class AliroReaderVerificationKey(ClusterAttributeDescriptor): @@ -29558,7 +28121,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, bytes]) - value: 'typing.Union[None, Nullable, bytes]' = None + value: typing.Union[None, Nullable, bytes] = None @dataclass class AliroReaderGroupIdentifier(ClusterAttributeDescriptor): @@ -29574,7 +28137,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, bytes]) - value: 'typing.Union[None, Nullable, bytes]' = None + value: typing.Union[None, Nullable, bytes] = None @dataclass class AliroReaderGroupSubIdentifier(ClusterAttributeDescriptor): @@ -29590,7 +28153,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bytes]) - value: 'typing.Optional[bytes]' = None + value: typing.Optional[bytes] = None @dataclass class AliroExpeditedTransactionSupportedProtocolVersions(ClusterAttributeDescriptor): @@ -29606,7 +28169,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[bytes]]) - value: 'typing.Optional[typing.List[bytes]]' = None + value: typing.Optional[typing.List[bytes]] = None @dataclass class AliroGroupResolvingKey(ClusterAttributeDescriptor): @@ -29622,7 +28185,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, bytes]) - value: 'typing.Union[None, Nullable, bytes]' = None + value: typing.Union[None, Nullable, bytes] = None @dataclass class AliroSupportedBLEUWBProtocolVersions(ClusterAttributeDescriptor): @@ -29638,7 +28201,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[bytes]]) - value: 'typing.Optional[typing.List[bytes]]' = None + value: typing.Optional[typing.List[bytes]] = None @dataclass class AliroBLEAdvertisingVersion(ClusterAttributeDescriptor): @@ -29654,7 +28217,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class NumberOfAliroCredentialIssuerKeysSupported(ClusterAttributeDescriptor): @@ -29670,7 +28233,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class NumberOfAliroEndpointKeysSupported(ClusterAttributeDescriptor): @@ -29686,7 +28249,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -29702,7 +28265,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -29718,23 +28281,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000101 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -29750,7 +28297,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -29766,7 +28313,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -29782,7 +28329,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -29802,7 +28349,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="alarmCode", Tag=0, Type=DoorLock.Enums.AlarmCodeEnum), ]) - alarmCode: 'DoorLock.Enums.AlarmCodeEnum' = 0 + alarmCode: DoorLock.Enums.AlarmCodeEnum = 0 @dataclass class DoorStateChange(ClusterEvent): @@ -29821,7 +28368,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="doorState", Tag=0, Type=DoorLock.Enums.DoorStateEnum), ]) - doorState: 'DoorLock.Enums.DoorStateEnum' = 0 + doorState: DoorLock.Enums.DoorStateEnum = 0 @dataclass class LockOperation(ClusterEvent): @@ -29845,12 +28392,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="credentials", Tag=5, Type=typing.Union[None, Nullable, typing.List[DoorLock.Structs.CredentialStruct]]), ]) - lockOperationType: 'DoorLock.Enums.LockOperationTypeEnum' = 0 - operationSource: 'DoorLock.Enums.OperationSourceEnum' = 0 - userIndex: 'typing.Union[Nullable, uint]' = NullValue - fabricIndex: 'typing.Union[Nullable, uint]' = NullValue - sourceNode: 'typing.Union[Nullable, uint]' = NullValue - credentials: 'typing.Union[None, Nullable, typing.List[DoorLock.Structs.CredentialStruct]]' = None + lockOperationType: DoorLock.Enums.LockOperationTypeEnum = 0 + operationSource: DoorLock.Enums.OperationSourceEnum = 0 + userIndex: typing.Union[Nullable, uint] = NullValue + fabricIndex: typing.Union[Nullable, uint] = NullValue + sourceNode: typing.Union[Nullable, uint] = NullValue + credentials: typing.Union[None, Nullable, typing.List[DoorLock.Structs.CredentialStruct]] = None @dataclass class LockOperationError(ClusterEvent): @@ -29875,13 +28422,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="credentials", Tag=6, Type=typing.Union[None, Nullable, typing.List[DoorLock.Structs.CredentialStruct]]), ]) - lockOperationType: 'DoorLock.Enums.LockOperationTypeEnum' = 0 - operationSource: 'DoorLock.Enums.OperationSourceEnum' = 0 - operationError: 'DoorLock.Enums.OperationErrorEnum' = 0 - userIndex: 'typing.Union[Nullable, uint]' = NullValue - fabricIndex: 'typing.Union[Nullable, uint]' = NullValue - sourceNode: 'typing.Union[Nullable, uint]' = NullValue - credentials: 'typing.Union[None, Nullable, typing.List[DoorLock.Structs.CredentialStruct]]' = None + lockOperationType: DoorLock.Enums.LockOperationTypeEnum = 0 + operationSource: DoorLock.Enums.OperationSourceEnum = 0 + operationError: DoorLock.Enums.OperationErrorEnum = 0 + userIndex: typing.Union[Nullable, uint] = NullValue + fabricIndex: typing.Union[Nullable, uint] = NullValue + sourceNode: typing.Union[Nullable, uint] = NullValue + credentials: typing.Union[None, Nullable, typing.List[DoorLock.Structs.CredentialStruct]] = None @dataclass class LockUserChange(ClusterEvent): @@ -29906,13 +28453,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="dataIndex", Tag=6, Type=typing.Union[Nullable, uint]), ]) - lockDataType: 'DoorLock.Enums.LockDataTypeEnum' = 0 - dataOperationType: 'DoorLock.Enums.DataOperationTypeEnum' = 0 - operationSource: 'DoorLock.Enums.OperationSourceEnum' = 0 - userIndex: 'typing.Union[Nullable, uint]' = NullValue - fabricIndex: 'typing.Union[Nullable, uint]' = NullValue - sourceNode: 'typing.Union[Nullable, uint]' = NullValue - dataIndex: 'typing.Union[Nullable, uint]' = NullValue + lockDataType: DoorLock.Enums.LockDataTypeEnum = 0 + dataOperationType: DoorLock.Enums.DataOperationTypeEnum = 0 + operationSource: DoorLock.Enums.OperationSourceEnum = 0 + userIndex: typing.Union[Nullable, uint] = NullValue + fabricIndex: typing.Union[Nullable, uint] = NullValue + sourceNode: typing.Union[Nullable, uint] = NullValue + dataIndex: typing.Union[Nullable, uint] = NullValue @dataclass @@ -29947,40 +28494,38 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="safetyStatus", Tag=0x0000001A, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - type: 'WindowCovering.Enums.Type' = None - physicalClosedLimitLift: 'typing.Optional[uint]' = None - physicalClosedLimitTilt: 'typing.Optional[uint]' = None - currentPositionLift: 'typing.Union[None, Nullable, uint]' = None - currentPositionTilt: 'typing.Union[None, Nullable, uint]' = None - numberOfActuationsLift: 'typing.Optional[uint]' = None - numberOfActuationsTilt: 'typing.Optional[uint]' = None - configStatus: 'uint' = None - currentPositionLiftPercentage: 'typing.Union[None, Nullable, uint]' = None - currentPositionTiltPercentage: 'typing.Union[None, Nullable, uint]' = None - operationalStatus: 'uint' = None - targetPositionLiftPercent100ths: 'typing.Union[None, Nullable, uint]' = None - targetPositionTiltPercent100ths: 'typing.Union[None, Nullable, uint]' = None - endProductType: 'WindowCovering.Enums.EndProductType' = None - currentPositionLiftPercent100ths: 'typing.Union[None, Nullable, uint]' = None - currentPositionTiltPercent100ths: 'typing.Union[None, Nullable, uint]' = None - installedOpenLimitLift: 'typing.Optional[uint]' = None - installedClosedLimitLift: 'typing.Optional[uint]' = None - installedOpenLimitTilt: 'typing.Optional[uint]' = None - installedClosedLimitTilt: 'typing.Optional[uint]' = None - mode: 'uint' = None - safetyStatus: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + type: WindowCovering.Enums.Type = 0 + physicalClosedLimitLift: typing.Optional[uint] = None + physicalClosedLimitTilt: typing.Optional[uint] = None + currentPositionLift: typing.Union[None, Nullable, uint] = None + currentPositionTilt: typing.Union[None, Nullable, uint] = None + numberOfActuationsLift: typing.Optional[uint] = None + numberOfActuationsTilt: typing.Optional[uint] = None + configStatus: uint = 0 + currentPositionLiftPercentage: typing.Union[None, Nullable, uint] = None + currentPositionTiltPercentage: typing.Union[None, Nullable, uint] = None + operationalStatus: uint = 0 + targetPositionLiftPercent100ths: typing.Union[None, Nullable, uint] = None + targetPositionTiltPercent100ths: typing.Union[None, Nullable, uint] = None + endProductType: WindowCovering.Enums.EndProductType = 0 + currentPositionLiftPercent100ths: typing.Union[None, Nullable, uint] = None + currentPositionTiltPercent100ths: typing.Union[None, Nullable, uint] = None + installedOpenLimitLift: typing.Optional[uint] = None + installedClosedLimitLift: typing.Optional[uint] = None + installedOpenLimitTilt: typing.Optional[uint] = None + installedClosedLimitTilt: typing.Optional[uint] = None + mode: uint = 0 + safetyStatus: typing.Optional[uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class EndProductType(MatterIntEnum): @@ -30013,7 +28558,7 @@ class EndProductType(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 24, + kUnknownEnumValue = 24 class Type(MatterIntEnum): kRollerShade = 0x00 @@ -30031,7 +28576,7 @@ class Type(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 10, + kUnknownEnumValue = 10 class Bitmaps: class ConfigStatus(IntFlag): @@ -30081,7 +28626,7 @@ class UpOrOpen(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000102 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -30094,7 +28639,7 @@ class DownOrClose(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000102 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -30107,7 +28652,7 @@ class StopMotion(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000102 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -30120,7 +28665,7 @@ class GoToLiftValue(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000102 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -30129,14 +28674,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="liftValue", Tag=0, Type=uint), ]) - liftValue: 'uint' = 0 + liftValue: uint = 0 @dataclass class GoToLiftPercentage(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000102 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -30145,14 +28690,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="liftPercent100thsValue", Tag=0, Type=uint), ]) - liftPercent100thsValue: 'uint' = 0 + liftPercent100thsValue: uint = 0 @dataclass class GoToTiltValue(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000102 command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -30161,14 +28706,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="tiltValue", Tag=0, Type=uint), ]) - tiltValue: 'uint' = 0 + tiltValue: uint = 0 @dataclass class GoToTiltPercentage(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000102 command_id: typing.ClassVar[int] = 0x00000008 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -30177,7 +28722,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="tiltPercent100thsValue", Tag=0, Type=uint), ]) - tiltPercent100thsValue: 'uint' = 0 + tiltPercent100thsValue: uint = 0 class Attributes: @dataclass @@ -30194,7 +28739,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=WindowCovering.Enums.Type) - value: 'WindowCovering.Enums.Type' = 0 + value: WindowCovering.Enums.Type = 0 @dataclass class PhysicalClosedLimitLift(ClusterAttributeDescriptor): @@ -30210,7 +28755,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class PhysicalClosedLimitTilt(ClusterAttributeDescriptor): @@ -30226,7 +28771,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class CurrentPositionLift(ClusterAttributeDescriptor): @@ -30242,7 +28787,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class CurrentPositionTilt(ClusterAttributeDescriptor): @@ -30258,7 +28803,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class NumberOfActuationsLift(ClusterAttributeDescriptor): @@ -30274,7 +28819,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class NumberOfActuationsTilt(ClusterAttributeDescriptor): @@ -30290,7 +28835,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ConfigStatus(ClusterAttributeDescriptor): @@ -30306,7 +28851,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class CurrentPositionLiftPercentage(ClusterAttributeDescriptor): @@ -30322,7 +28867,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class CurrentPositionTiltPercentage(ClusterAttributeDescriptor): @@ -30338,7 +28883,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class OperationalStatus(ClusterAttributeDescriptor): @@ -30354,7 +28899,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class TargetPositionLiftPercent100ths(ClusterAttributeDescriptor): @@ -30370,7 +28915,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class TargetPositionTiltPercent100ths(ClusterAttributeDescriptor): @@ -30386,7 +28931,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class EndProductType(ClusterAttributeDescriptor): @@ -30402,7 +28947,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=WindowCovering.Enums.EndProductType) - value: 'WindowCovering.Enums.EndProductType' = 0 + value: WindowCovering.Enums.EndProductType = 0 @dataclass class CurrentPositionLiftPercent100ths(ClusterAttributeDescriptor): @@ -30418,7 +28963,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class CurrentPositionTiltPercent100ths(ClusterAttributeDescriptor): @@ -30434,7 +28979,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class InstalledOpenLimitLift(ClusterAttributeDescriptor): @@ -30450,7 +28995,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class InstalledClosedLimitLift(ClusterAttributeDescriptor): @@ -30466,7 +29011,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class InstalledOpenLimitTilt(ClusterAttributeDescriptor): @@ -30482,7 +29027,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class InstalledClosedLimitTilt(ClusterAttributeDescriptor): @@ -30498,7 +29043,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Mode(ClusterAttributeDescriptor): @@ -30514,7 +29059,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class SafetyStatus(ClusterAttributeDescriptor): @@ -30530,7 +29075,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -30546,7 +29091,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -30562,23 +29107,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000102 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -30594,7 +29123,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -30610,7 +29139,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -30626,7 +29155,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -30645,24 +29174,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="progress", Tag=0x00000005, Type=typing.Optional[typing.List[ServiceArea.Structs.ProgressStruct]]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - supportedAreas: 'typing.List[ServiceArea.Structs.AreaStruct]' = None - supportedMaps: 'typing.Optional[typing.List[ServiceArea.Structs.MapStruct]]' = None - selectedAreas: 'typing.List[uint]' = None - currentArea: 'typing.Union[None, Nullable, uint]' = None - estimatedEndTime: 'typing.Union[None, Nullable, uint]' = None - progress: 'typing.Optional[typing.List[ServiceArea.Structs.ProgressStruct]]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + supportedAreas: typing.List[ServiceArea.Structs.AreaStruct] = field(default_factory=lambda: []) + supportedMaps: typing.Optional[typing.List[ServiceArea.Structs.MapStruct]] = None + selectedAreas: typing.List[uint] = field(default_factory=lambda: []) + currentArea: typing.Union[None, Nullable, uint] = None + estimatedEndTime: typing.Union[None, Nullable, uint] = None + progress: typing.Optional[typing.List[ServiceArea.Structs.ProgressStruct]] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class OperationalStatusEnum(MatterIntEnum): @@ -30674,7 +29201,7 @@ class OperationalStatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class SelectAreasStatus(MatterIntEnum): kSuccess = 0x00 @@ -30685,7 +29212,7 @@ class SelectAreasStatus(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class SkipAreaStatus(MatterIntEnum): kSuccess = 0x00 @@ -30696,7 +29223,7 @@ class SkipAreaStatus(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class Bitmaps: class Feature(IntFlag): @@ -30791,14 +29318,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="newAreas", Tag=0, Type=typing.List[uint]), ]) - newAreas: 'typing.List[uint]' = field(default_factory=lambda: []) + newAreas: typing.List[uint] = field(default_factory=lambda: []) @dataclass class SelectAreasResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000150 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -30808,8 +29335,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=str), ]) - status: 'ServiceArea.Enums.SelectAreasStatus' = 0 - statusText: 'str' = "" + status: ServiceArea.Enums.SelectAreasStatus = 0 + statusText: str = "" @dataclass class SkipArea(ClusterCommand): @@ -30825,14 +29352,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="skippedArea", Tag=0, Type=uint), ]) - skippedArea: 'uint' = 0 + skippedArea: uint = 0 @dataclass class SkipAreaResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000150 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -30842,8 +29369,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=str), ]) - status: 'ServiceArea.Enums.SkipAreaStatus' = 0 - statusText: 'str' = "" + status: ServiceArea.Enums.SkipAreaStatus = 0 + statusText: str = "" class Attributes: @dataclass @@ -30860,7 +29387,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[ServiceArea.Structs.AreaStruct]) - value: 'typing.List[ServiceArea.Structs.AreaStruct]' = field(default_factory=lambda: []) + value: typing.List[ServiceArea.Structs.AreaStruct] = field(default_factory=lambda: []) @dataclass class SupportedMaps(ClusterAttributeDescriptor): @@ -30876,7 +29403,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[ServiceArea.Structs.MapStruct]]) - value: 'typing.Optional[typing.List[ServiceArea.Structs.MapStruct]]' = None + value: typing.Optional[typing.List[ServiceArea.Structs.MapStruct]] = None @dataclass class SelectedAreas(ClusterAttributeDescriptor): @@ -30892,7 +29419,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class CurrentArea(ClusterAttributeDescriptor): @@ -30908,7 +29435,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class EstimatedEndTime(ClusterAttributeDescriptor): @@ -30924,7 +29451,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class Progress(ClusterAttributeDescriptor): @@ -30940,7 +29467,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[ServiceArea.Structs.ProgressStruct]]) - value: 'typing.Optional[typing.List[ServiceArea.Structs.ProgressStruct]]' = None + value: typing.Optional[typing.List[ServiceArea.Structs.ProgressStruct]] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -30956,7 +29483,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -30972,23 +29499,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000150 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -31004,7 +29515,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -31020,7 +29531,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -31036,7 +29547,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -31072,41 +29583,39 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="controlMode", Tag=0x00000021, Type=typing.Optional[PumpConfigurationAndControl.Enums.ControlModeEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - maxPressure: 'typing.Union[Nullable, int]' = None - maxSpeed: 'typing.Union[Nullable, uint]' = None - maxFlow: 'typing.Union[Nullable, uint]' = None - minConstPressure: 'typing.Union[None, Nullable, int]' = None - maxConstPressure: 'typing.Union[None, Nullable, int]' = None - minCompPressure: 'typing.Union[None, Nullable, int]' = None - maxCompPressure: 'typing.Union[None, Nullable, int]' = None - minConstSpeed: 'typing.Union[None, Nullable, uint]' = None - maxConstSpeed: 'typing.Union[None, Nullable, uint]' = None - minConstFlow: 'typing.Union[None, Nullable, uint]' = None - maxConstFlow: 'typing.Union[None, Nullable, uint]' = None - minConstTemp: 'typing.Union[None, Nullable, int]' = None - maxConstTemp: 'typing.Union[None, Nullable, int]' = None - pumpStatus: 'typing.Optional[uint]' = None - effectiveOperationMode: 'PumpConfigurationAndControl.Enums.OperationModeEnum' = None - effectiveControlMode: 'PumpConfigurationAndControl.Enums.ControlModeEnum' = None - capacity: 'typing.Union[Nullable, int]' = None - speed: 'typing.Union[None, Nullable, uint]' = None - lifetimeRunningHours: 'typing.Union[None, Nullable, uint]' = None - power: 'typing.Union[None, Nullable, uint]' = None - lifetimeEnergyConsumed: 'typing.Union[None, Nullable, uint]' = None - operationMode: 'PumpConfigurationAndControl.Enums.OperationModeEnum' = None - controlMode: 'typing.Optional[PumpConfigurationAndControl.Enums.ControlModeEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + maxPressure: typing.Union[Nullable, int] = NullValue + maxSpeed: typing.Union[Nullable, uint] = NullValue + maxFlow: typing.Union[Nullable, uint] = NullValue + minConstPressure: typing.Union[None, Nullable, int] = None + maxConstPressure: typing.Union[None, Nullable, int] = None + minCompPressure: typing.Union[None, Nullable, int] = None + maxCompPressure: typing.Union[None, Nullable, int] = None + minConstSpeed: typing.Union[None, Nullable, uint] = None + maxConstSpeed: typing.Union[None, Nullable, uint] = None + minConstFlow: typing.Union[None, Nullable, uint] = None + maxConstFlow: typing.Union[None, Nullable, uint] = None + minConstTemp: typing.Union[None, Nullable, int] = None + maxConstTemp: typing.Union[None, Nullable, int] = None + pumpStatus: typing.Optional[uint] = None + effectiveOperationMode: PumpConfigurationAndControl.Enums.OperationModeEnum = 0 + effectiveControlMode: PumpConfigurationAndControl.Enums.ControlModeEnum = 0 + capacity: typing.Union[Nullable, int] = NullValue + speed: typing.Union[None, Nullable, uint] = None + lifetimeRunningHours: typing.Union[None, Nullable, uint] = None + power: typing.Union[None, Nullable, uint] = None + lifetimeEnergyConsumed: typing.Union[None, Nullable, uint] = None + operationMode: PumpConfigurationAndControl.Enums.OperationModeEnum = 0 + controlMode: typing.Optional[PumpConfigurationAndControl.Enums.ControlModeEnum] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ControlModeEnum(MatterIntEnum): @@ -31120,7 +29629,7 @@ class ControlModeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class OperationModeEnum(MatterIntEnum): kNormal = 0x00 @@ -31131,7 +29640,7 @@ class OperationModeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class Bitmaps: class Feature(IntFlag): @@ -31169,7 +29678,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class MaxSpeed(ClusterAttributeDescriptor): @@ -31185,7 +29694,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class MaxFlow(ClusterAttributeDescriptor): @@ -31201,7 +29710,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class MinConstPressure(ClusterAttributeDescriptor): @@ -31217,7 +29726,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class MaxConstPressure(ClusterAttributeDescriptor): @@ -31233,7 +29742,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class MinCompPressure(ClusterAttributeDescriptor): @@ -31249,7 +29758,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class MaxCompPressure(ClusterAttributeDescriptor): @@ -31265,7 +29774,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class MinConstSpeed(ClusterAttributeDescriptor): @@ -31281,7 +29790,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class MaxConstSpeed(ClusterAttributeDescriptor): @@ -31297,7 +29806,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class MinConstFlow(ClusterAttributeDescriptor): @@ -31313,7 +29822,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class MaxConstFlow(ClusterAttributeDescriptor): @@ -31329,7 +29838,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class MinConstTemp(ClusterAttributeDescriptor): @@ -31345,7 +29854,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class MaxConstTemp(ClusterAttributeDescriptor): @@ -31361,7 +29870,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class PumpStatus(ClusterAttributeDescriptor): @@ -31377,7 +29886,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class EffectiveOperationMode(ClusterAttributeDescriptor): @@ -31393,7 +29902,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=PumpConfigurationAndControl.Enums.OperationModeEnum) - value: 'PumpConfigurationAndControl.Enums.OperationModeEnum' = 0 + value: PumpConfigurationAndControl.Enums.OperationModeEnum = 0 @dataclass class EffectiveControlMode(ClusterAttributeDescriptor): @@ -31409,7 +29918,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=PumpConfigurationAndControl.Enums.ControlModeEnum) - value: 'PumpConfigurationAndControl.Enums.ControlModeEnum' = 0 + value: PumpConfigurationAndControl.Enums.ControlModeEnum = 0 @dataclass class Capacity(ClusterAttributeDescriptor): @@ -31425,7 +29934,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class Speed(ClusterAttributeDescriptor): @@ -31441,7 +29950,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class LifetimeRunningHours(ClusterAttributeDescriptor): @@ -31457,7 +29966,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class Power(ClusterAttributeDescriptor): @@ -31473,7 +29982,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class LifetimeEnergyConsumed(ClusterAttributeDescriptor): @@ -31489,7 +29998,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class OperationMode(ClusterAttributeDescriptor): @@ -31505,7 +30014,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=PumpConfigurationAndControl.Enums.OperationModeEnum) - value: 'PumpConfigurationAndControl.Enums.OperationModeEnum' = 0 + value: PumpConfigurationAndControl.Enums.OperationModeEnum = 0 @dataclass class ControlMode(ClusterAttributeDescriptor): @@ -31521,7 +30030,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[PumpConfigurationAndControl.Enums.ControlModeEnum]) - value: 'typing.Optional[PumpConfigurationAndControl.Enums.ControlModeEnum]' = None + value: typing.Optional[PumpConfigurationAndControl.Enums.ControlModeEnum] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -31537,7 +30046,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -31553,23 +30062,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000200 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -31585,7 +30078,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -31601,7 +30094,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -31617,7 +30110,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -31963,78 +30456,76 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="setpointHoldExpiryTimestamp", Tag=0x00000052, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - localTemperature: 'typing.Union[Nullable, int]' = None - outdoorTemperature: 'typing.Union[None, Nullable, int]' = None - occupancy: 'typing.Optional[uint]' = None - absMinHeatSetpointLimit: 'typing.Optional[int]' = None - absMaxHeatSetpointLimit: 'typing.Optional[int]' = None - absMinCoolSetpointLimit: 'typing.Optional[int]' = None - absMaxCoolSetpointLimit: 'typing.Optional[int]' = None - PICoolingDemand: 'typing.Optional[uint]' = None - PIHeatingDemand: 'typing.Optional[uint]' = None - HVACSystemTypeConfiguration: 'typing.Optional[uint]' = None - localTemperatureCalibration: 'typing.Optional[int]' = None - occupiedCoolingSetpoint: 'typing.Optional[int]' = None - occupiedHeatingSetpoint: 'typing.Optional[int]' = None - unoccupiedCoolingSetpoint: 'typing.Optional[int]' = None - unoccupiedHeatingSetpoint: 'typing.Optional[int]' = None - minHeatSetpointLimit: 'typing.Optional[int]' = None - maxHeatSetpointLimit: 'typing.Optional[int]' = None - minCoolSetpointLimit: 'typing.Optional[int]' = None - maxCoolSetpointLimit: 'typing.Optional[int]' = None - minSetpointDeadBand: 'typing.Optional[int]' = None - remoteSensing: 'typing.Optional[uint]' = None - controlSequenceOfOperation: 'Thermostat.Enums.ControlSequenceOfOperationEnum' = None - systemMode: 'Thermostat.Enums.SystemModeEnum' = None - thermostatRunningMode: 'typing.Optional[Thermostat.Enums.ThermostatRunningModeEnum]' = None - startOfWeek: 'typing.Optional[Thermostat.Enums.StartOfWeekEnum]' = None - numberOfWeeklyTransitions: 'typing.Optional[uint]' = None - numberOfDailyTransitions: 'typing.Optional[uint]' = None - temperatureSetpointHold: 'typing.Optional[Thermostat.Enums.TemperatureSetpointHoldEnum]' = None - temperatureSetpointHoldDuration: 'typing.Union[None, Nullable, uint]' = None - thermostatProgrammingOperationMode: 'typing.Optional[uint]' = None - thermostatRunningState: 'typing.Optional[uint]' = None - setpointChangeSource: 'typing.Optional[Thermostat.Enums.SetpointChangeSourceEnum]' = None - setpointChangeAmount: 'typing.Union[None, Nullable, int]' = None - setpointChangeSourceTimestamp: 'typing.Optional[uint]' = None - occupiedSetback: 'typing.Union[None, Nullable, uint]' = None - occupiedSetbackMin: 'typing.Union[None, Nullable, uint]' = None - occupiedSetbackMax: 'typing.Union[None, Nullable, uint]' = None - unoccupiedSetback: 'typing.Union[None, Nullable, uint]' = None - unoccupiedSetbackMin: 'typing.Union[None, Nullable, uint]' = None - unoccupiedSetbackMax: 'typing.Union[None, Nullable, uint]' = None - emergencyHeatDelta: 'typing.Optional[uint]' = None - ACType: 'typing.Optional[Thermostat.Enums.ACTypeEnum]' = None - ACCapacity: 'typing.Optional[uint]' = None - ACRefrigerantType: 'typing.Optional[Thermostat.Enums.ACRefrigerantTypeEnum]' = None - ACCompressorType: 'typing.Optional[Thermostat.Enums.ACCompressorTypeEnum]' = None - ACErrorCode: 'typing.Optional[uint]' = None - ACLouverPosition: 'typing.Optional[Thermostat.Enums.ACLouverPositionEnum]' = None - ACCoilTemperature: 'typing.Union[None, Nullable, int]' = None - ACCapacityformat: 'typing.Optional[Thermostat.Enums.ACCapacityFormatEnum]' = None - presetTypes: 'typing.Optional[typing.List[Thermostat.Structs.PresetTypeStruct]]' = None - scheduleTypes: 'typing.Optional[typing.List[Thermostat.Structs.ScheduleTypeStruct]]' = None - numberOfPresets: 'typing.Optional[uint]' = None - numberOfSchedules: 'typing.Optional[uint]' = None - numberOfScheduleTransitions: 'typing.Optional[uint]' = None - numberOfScheduleTransitionPerDay: 'typing.Union[None, Nullable, uint]' = None - activePresetHandle: 'typing.Union[None, Nullable, bytes]' = None - activeScheduleHandle: 'typing.Union[None, Nullable, bytes]' = None - presets: 'typing.Optional[typing.List[Thermostat.Structs.PresetStruct]]' = None - schedules: 'typing.Optional[typing.List[Thermostat.Structs.ScheduleStruct]]' = None - setpointHoldExpiryTimestamp: 'typing.Union[None, Nullable, uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + localTemperature: typing.Union[Nullable, int] = NullValue + outdoorTemperature: typing.Union[None, Nullable, int] = None + occupancy: typing.Optional[uint] = None + absMinHeatSetpointLimit: typing.Optional[int] = None + absMaxHeatSetpointLimit: typing.Optional[int] = None + absMinCoolSetpointLimit: typing.Optional[int] = None + absMaxCoolSetpointLimit: typing.Optional[int] = None + PICoolingDemand: typing.Optional[uint] = None + PIHeatingDemand: typing.Optional[uint] = None + HVACSystemTypeConfiguration: typing.Optional[uint] = None + localTemperatureCalibration: typing.Optional[int] = None + occupiedCoolingSetpoint: typing.Optional[int] = None + occupiedHeatingSetpoint: typing.Optional[int] = None + unoccupiedCoolingSetpoint: typing.Optional[int] = None + unoccupiedHeatingSetpoint: typing.Optional[int] = None + minHeatSetpointLimit: typing.Optional[int] = None + maxHeatSetpointLimit: typing.Optional[int] = None + minCoolSetpointLimit: typing.Optional[int] = None + maxCoolSetpointLimit: typing.Optional[int] = None + minSetpointDeadBand: typing.Optional[int] = None + remoteSensing: typing.Optional[uint] = None + controlSequenceOfOperation: Thermostat.Enums.ControlSequenceOfOperationEnum = 0 + systemMode: Thermostat.Enums.SystemModeEnum = 0 + thermostatRunningMode: typing.Optional[Thermostat.Enums.ThermostatRunningModeEnum] = None + startOfWeek: typing.Optional[Thermostat.Enums.StartOfWeekEnum] = None + numberOfWeeklyTransitions: typing.Optional[uint] = None + numberOfDailyTransitions: typing.Optional[uint] = None + temperatureSetpointHold: typing.Optional[Thermostat.Enums.TemperatureSetpointHoldEnum] = None + temperatureSetpointHoldDuration: typing.Union[None, Nullable, uint] = None + thermostatProgrammingOperationMode: typing.Optional[uint] = None + thermostatRunningState: typing.Optional[uint] = None + setpointChangeSource: typing.Optional[Thermostat.Enums.SetpointChangeSourceEnum] = None + setpointChangeAmount: typing.Union[None, Nullable, int] = None + setpointChangeSourceTimestamp: typing.Optional[uint] = None + occupiedSetback: typing.Union[None, Nullable, uint] = None + occupiedSetbackMin: typing.Union[None, Nullable, uint] = None + occupiedSetbackMax: typing.Union[None, Nullable, uint] = None + unoccupiedSetback: typing.Union[None, Nullable, uint] = None + unoccupiedSetbackMin: typing.Union[None, Nullable, uint] = None + unoccupiedSetbackMax: typing.Union[None, Nullable, uint] = None + emergencyHeatDelta: typing.Optional[uint] = None + ACType: typing.Optional[Thermostat.Enums.ACTypeEnum] = None + ACCapacity: typing.Optional[uint] = None + ACRefrigerantType: typing.Optional[Thermostat.Enums.ACRefrigerantTypeEnum] = None + ACCompressorType: typing.Optional[Thermostat.Enums.ACCompressorTypeEnum] = None + ACErrorCode: typing.Optional[uint] = None + ACLouverPosition: typing.Optional[Thermostat.Enums.ACLouverPositionEnum] = None + ACCoilTemperature: typing.Union[None, Nullable, int] = None + ACCapacityformat: typing.Optional[Thermostat.Enums.ACCapacityFormatEnum] = None + presetTypes: typing.Optional[typing.List[Thermostat.Structs.PresetTypeStruct]] = None + scheduleTypes: typing.Optional[typing.List[Thermostat.Structs.ScheduleTypeStruct]] = None + numberOfPresets: typing.Optional[uint] = None + numberOfSchedules: typing.Optional[uint] = None + numberOfScheduleTransitions: typing.Optional[uint] = None + numberOfScheduleTransitionPerDay: typing.Union[None, Nullable, uint] = None + activePresetHandle: typing.Union[None, Nullable, bytes] = None + activeScheduleHandle: typing.Union[None, Nullable, bytes] = None + presets: typing.Optional[typing.List[Thermostat.Structs.PresetStruct]] = None + schedules: typing.Optional[typing.List[Thermostat.Structs.ScheduleStruct]] = None + setpointHoldExpiryTimestamp: typing.Union[None, Nullable, uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ACCapacityFormatEnum(MatterIntEnum): @@ -32043,7 +30534,7 @@ class ACCapacityFormatEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 1, + kUnknownEnumValue = 1 class ACCompressorTypeEnum(MatterIntEnum): kUnknown = 0x00 @@ -32054,7 +30545,7 @@ class ACCompressorTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class ACLouverPositionEnum(MatterIntEnum): kClosed = 0x01 @@ -32066,7 +30557,7 @@ class ACLouverPositionEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 0, + kUnknownEnumValue = 0 class ACRefrigerantTypeEnum(MatterIntEnum): kUnknown = 0x00 @@ -32077,7 +30568,7 @@ class ACRefrigerantTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class ACTypeEnum(MatterIntEnum): kUnknown = 0x00 @@ -32089,7 +30580,7 @@ class ACTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class ControlSequenceOfOperationEnum(MatterIntEnum): kCoolingOnly = 0x00 @@ -32102,7 +30593,7 @@ class ControlSequenceOfOperationEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 6, + kUnknownEnumValue = 6 class PresetScenarioEnum(MatterIntEnum): kOccupied = 0x01 @@ -32116,7 +30607,7 @@ class PresetScenarioEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 0, + kUnknownEnumValue = 0 class SetpointChangeSourceEnum(MatterIntEnum): kManual = 0x00 @@ -32126,7 +30617,7 @@ class SetpointChangeSourceEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class SetpointRaiseLowerModeEnum(MatterIntEnum): kHeat = 0x00 @@ -32136,7 +30627,7 @@ class SetpointRaiseLowerModeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class StartOfWeekEnum(MatterIntEnum): kSunday = 0x00 @@ -32150,7 +30641,7 @@ class StartOfWeekEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 7, + kUnknownEnumValue = 7 class SystemModeEnum(MatterIntEnum): kOff = 0x00 @@ -32166,7 +30657,7 @@ class SystemModeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class TemperatureSetpointHoldEnum(MatterIntEnum): kSetpointHoldOff = 0x00 @@ -32175,7 +30666,7 @@ class TemperatureSetpointHoldEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class ThermostatRunningModeEnum(MatterIntEnum): kOff = 0x00 @@ -32185,7 +30676,7 @@ class ThermostatRunningModeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 1, + kUnknownEnumValue = 1 class Bitmaps: class ACErrorCodeBitmap(IntFlag): @@ -32373,7 +30864,7 @@ class SetpointRaiseLower(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000201 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -32383,15 +30874,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="amount", Tag=1, Type=int), ]) - mode: 'Thermostat.Enums.SetpointRaiseLowerModeEnum' = 0 - amount: 'int' = 0 + mode: Thermostat.Enums.SetpointRaiseLowerModeEnum = 0 + amount: int = 0 @dataclass class GetWeeklyScheduleResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000201 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -32403,17 +30894,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="transitions", Tag=3, Type=typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]), ]) - numberOfTransitionsForSequence: 'uint' = 0 - dayOfWeekForSequence: 'uint' = 0 - modeForSequence: 'uint' = 0 - transitions: 'typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]' = field(default_factory=lambda: []) + numberOfTransitionsForSequence: uint = 0 + dayOfWeekForSequence: uint = 0 + modeForSequence: uint = 0 + transitions: typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct] = field(default_factory=lambda: []) @dataclass class SetWeeklySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000201 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -32425,10 +30916,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="transitions", Tag=3, Type=typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]), ]) - numberOfTransitionsForSequence: 'uint' = 0 - dayOfWeekForSequence: 'uint' = 0 - modeForSequence: 'uint' = 0 - transitions: 'typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]' = field(default_factory=lambda: []) + numberOfTransitionsForSequence: uint = 0 + dayOfWeekForSequence: uint = 0 + modeForSequence: uint = 0 + transitions: typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct] = field(default_factory=lambda: []) @dataclass class GetWeeklySchedule(ClusterCommand): @@ -32445,15 +30936,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="modeToReturn", Tag=1, Type=uint), ]) - daysToReturn: 'uint' = 0 - modeToReturn: 'uint' = 0 + daysToReturn: uint = 0 + modeToReturn: uint = 0 @dataclass class ClearWeeklySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000201 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -32466,7 +30957,7 @@ class SetActiveScheduleRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000201 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -32475,14 +30966,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="scheduleHandle", Tag=0, Type=bytes), ]) - scheduleHandle: 'bytes' = b"" + scheduleHandle: bytes = b"" @dataclass class SetActivePresetRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000201 command_id: typing.ClassVar[int] = 0x00000006 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -32491,14 +30982,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="presetHandle", Tag=0, Type=typing.Union[Nullable, bytes]), ]) - presetHandle: 'typing.Union[Nullable, bytes]' = NullValue + presetHandle: typing.Union[Nullable, bytes] = NullValue @dataclass class AtomicResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000201 command_id: typing.ClassVar[int] = 0x000000FD is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -32509,9 +31000,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="timeout", Tag=2, Type=typing.Optional[uint]), ]) - statusCode: 'uint' = 0 - attributeStatus: 'typing.List[Globals.Structs.AtomicAttributeStatusStruct]' = field(default_factory=lambda: []) - timeout: 'typing.Optional[uint]' = None + statusCode: uint = 0 + attributeStatus: typing.List[Globals.Structs.AtomicAttributeStatusStruct] = field(default_factory=lambda: []) + timeout: typing.Optional[uint] = None @dataclass class AtomicRequest(ClusterCommand): @@ -32529,9 +31020,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="timeout", Tag=2, Type=typing.Optional[uint]), ]) - requestType: 'Globals.Enums.AtomicRequestTypeEnum' = 0 - attributeRequests: 'typing.List[uint]' = field(default_factory=lambda: []) - timeout: 'typing.Optional[uint]' = None + requestType: Globals.Enums.AtomicRequestTypeEnum = 0 + attributeRequests: typing.List[uint] = field(default_factory=lambda: []) + timeout: typing.Optional[uint] = None class Attributes: @dataclass @@ -32548,7 +31039,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class OutdoorTemperature(ClusterAttributeDescriptor): @@ -32564,7 +31055,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class Occupancy(ClusterAttributeDescriptor): @@ -32580,7 +31071,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class AbsMinHeatSetpointLimit(ClusterAttributeDescriptor): @@ -32596,7 +31087,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class AbsMaxHeatSetpointLimit(ClusterAttributeDescriptor): @@ -32612,7 +31103,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class AbsMinCoolSetpointLimit(ClusterAttributeDescriptor): @@ -32628,7 +31119,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class AbsMaxCoolSetpointLimit(ClusterAttributeDescriptor): @@ -32644,7 +31135,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class PICoolingDemand(ClusterAttributeDescriptor): @@ -32660,7 +31151,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class PIHeatingDemand(ClusterAttributeDescriptor): @@ -32676,7 +31167,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class HVACSystemTypeConfiguration(ClusterAttributeDescriptor): @@ -32692,7 +31183,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class LocalTemperatureCalibration(ClusterAttributeDescriptor): @@ -32708,7 +31199,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class OccupiedCoolingSetpoint(ClusterAttributeDescriptor): @@ -32724,7 +31215,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class OccupiedHeatingSetpoint(ClusterAttributeDescriptor): @@ -32740,7 +31231,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class UnoccupiedCoolingSetpoint(ClusterAttributeDescriptor): @@ -32756,7 +31247,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class UnoccupiedHeatingSetpoint(ClusterAttributeDescriptor): @@ -32772,7 +31263,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class MinHeatSetpointLimit(ClusterAttributeDescriptor): @@ -32788,7 +31279,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class MaxHeatSetpointLimit(ClusterAttributeDescriptor): @@ -32804,7 +31295,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class MinCoolSetpointLimit(ClusterAttributeDescriptor): @@ -32820,7 +31311,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class MaxCoolSetpointLimit(ClusterAttributeDescriptor): @@ -32836,7 +31327,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class MinSetpointDeadBand(ClusterAttributeDescriptor): @@ -32852,7 +31343,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class RemoteSensing(ClusterAttributeDescriptor): @@ -32868,7 +31359,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ControlSequenceOfOperation(ClusterAttributeDescriptor): @@ -32884,7 +31375,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=Thermostat.Enums.ControlSequenceOfOperationEnum) - value: 'Thermostat.Enums.ControlSequenceOfOperationEnum' = 0 + value: Thermostat.Enums.ControlSequenceOfOperationEnum = 0 @dataclass class SystemMode(ClusterAttributeDescriptor): @@ -32900,7 +31391,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=Thermostat.Enums.SystemModeEnum) - value: 'Thermostat.Enums.SystemModeEnum' = 0 + value: Thermostat.Enums.SystemModeEnum = 0 @dataclass class ThermostatRunningMode(ClusterAttributeDescriptor): @@ -32916,7 +31407,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ThermostatRunningModeEnum]) - value: 'typing.Optional[Thermostat.Enums.ThermostatRunningModeEnum]' = None + value: typing.Optional[Thermostat.Enums.ThermostatRunningModeEnum] = None @dataclass class StartOfWeek(ClusterAttributeDescriptor): @@ -32932,7 +31423,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.StartOfWeekEnum]) - value: 'typing.Optional[Thermostat.Enums.StartOfWeekEnum]' = None + value: typing.Optional[Thermostat.Enums.StartOfWeekEnum] = None @dataclass class NumberOfWeeklyTransitions(ClusterAttributeDescriptor): @@ -32948,7 +31439,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class NumberOfDailyTransitions(ClusterAttributeDescriptor): @@ -32964,7 +31455,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class TemperatureSetpointHold(ClusterAttributeDescriptor): @@ -32980,7 +31471,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.TemperatureSetpointHoldEnum]) - value: 'typing.Optional[Thermostat.Enums.TemperatureSetpointHoldEnum]' = None + value: typing.Optional[Thermostat.Enums.TemperatureSetpointHoldEnum] = None @dataclass class TemperatureSetpointHoldDuration(ClusterAttributeDescriptor): @@ -32996,7 +31487,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class ThermostatProgrammingOperationMode(ClusterAttributeDescriptor): @@ -33012,7 +31503,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ThermostatRunningState(ClusterAttributeDescriptor): @@ -33028,7 +31519,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class SetpointChangeSource(ClusterAttributeDescriptor): @@ -33044,7 +31535,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.SetpointChangeSourceEnum]) - value: 'typing.Optional[Thermostat.Enums.SetpointChangeSourceEnum]' = None + value: typing.Optional[Thermostat.Enums.SetpointChangeSourceEnum] = None @dataclass class SetpointChangeAmount(ClusterAttributeDescriptor): @@ -33060,7 +31551,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class SetpointChangeSourceTimestamp(ClusterAttributeDescriptor): @@ -33076,7 +31567,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class OccupiedSetback(ClusterAttributeDescriptor): @@ -33092,7 +31583,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class OccupiedSetbackMin(ClusterAttributeDescriptor): @@ -33108,7 +31599,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class OccupiedSetbackMax(ClusterAttributeDescriptor): @@ -33124,7 +31615,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class UnoccupiedSetback(ClusterAttributeDescriptor): @@ -33140,7 +31631,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class UnoccupiedSetbackMin(ClusterAttributeDescriptor): @@ -33156,7 +31647,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class UnoccupiedSetbackMax(ClusterAttributeDescriptor): @@ -33172,7 +31663,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class EmergencyHeatDelta(ClusterAttributeDescriptor): @@ -33188,7 +31679,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ACType(ClusterAttributeDescriptor): @@ -33204,7 +31695,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACTypeEnum]) - value: 'typing.Optional[Thermostat.Enums.ACTypeEnum]' = None + value: typing.Optional[Thermostat.Enums.ACTypeEnum] = None @dataclass class ACCapacity(ClusterAttributeDescriptor): @@ -33220,7 +31711,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ACRefrigerantType(ClusterAttributeDescriptor): @@ -33236,7 +31727,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACRefrigerantTypeEnum]) - value: 'typing.Optional[Thermostat.Enums.ACRefrigerantTypeEnum]' = None + value: typing.Optional[Thermostat.Enums.ACRefrigerantTypeEnum] = None @dataclass class ACCompressorType(ClusterAttributeDescriptor): @@ -33252,7 +31743,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACCompressorTypeEnum]) - value: 'typing.Optional[Thermostat.Enums.ACCompressorTypeEnum]' = None + value: typing.Optional[Thermostat.Enums.ACCompressorTypeEnum] = None @dataclass class ACErrorCode(ClusterAttributeDescriptor): @@ -33268,7 +31759,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ACLouverPosition(ClusterAttributeDescriptor): @@ -33284,7 +31775,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACLouverPositionEnum]) - value: 'typing.Optional[Thermostat.Enums.ACLouverPositionEnum]' = None + value: typing.Optional[Thermostat.Enums.ACLouverPositionEnum] = None @dataclass class ACCoilTemperature(ClusterAttributeDescriptor): @@ -33300,7 +31791,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class ACCapacityformat(ClusterAttributeDescriptor): @@ -33316,7 +31807,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACCapacityFormatEnum]) - value: 'typing.Optional[Thermostat.Enums.ACCapacityFormatEnum]' = None + value: typing.Optional[Thermostat.Enums.ACCapacityFormatEnum] = None @dataclass class PresetTypes(ClusterAttributeDescriptor): @@ -33332,7 +31823,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[Thermostat.Structs.PresetTypeStruct]]) - value: 'typing.Optional[typing.List[Thermostat.Structs.PresetTypeStruct]]' = None + value: typing.Optional[typing.List[Thermostat.Structs.PresetTypeStruct]] = None @dataclass class ScheduleTypes(ClusterAttributeDescriptor): @@ -33348,7 +31839,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[Thermostat.Structs.ScheduleTypeStruct]]) - value: 'typing.Optional[typing.List[Thermostat.Structs.ScheduleTypeStruct]]' = None + value: typing.Optional[typing.List[Thermostat.Structs.ScheduleTypeStruct]] = None @dataclass class NumberOfPresets(ClusterAttributeDescriptor): @@ -33364,7 +31855,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class NumberOfSchedules(ClusterAttributeDescriptor): @@ -33380,7 +31871,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class NumberOfScheduleTransitions(ClusterAttributeDescriptor): @@ -33396,7 +31887,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class NumberOfScheduleTransitionPerDay(ClusterAttributeDescriptor): @@ -33412,7 +31903,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class ActivePresetHandle(ClusterAttributeDescriptor): @@ -33428,7 +31919,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, bytes]) - value: 'typing.Union[None, Nullable, bytes]' = None + value: typing.Union[None, Nullable, bytes] = None @dataclass class ActiveScheduleHandle(ClusterAttributeDescriptor): @@ -33444,7 +31935,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, bytes]) - value: 'typing.Union[None, Nullable, bytes]' = None + value: typing.Union[None, Nullable, bytes] = None @dataclass class Presets(ClusterAttributeDescriptor): @@ -33460,7 +31951,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[Thermostat.Structs.PresetStruct]]) - value: 'typing.Optional[typing.List[Thermostat.Structs.PresetStruct]]' = None + value: typing.Optional[typing.List[Thermostat.Structs.PresetStruct]] = None @dataclass class Schedules(ClusterAttributeDescriptor): @@ -33476,7 +31967,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[Thermostat.Structs.ScheduleStruct]]) - value: 'typing.Optional[typing.List[Thermostat.Structs.ScheduleStruct]]' = None + value: typing.Optional[typing.List[Thermostat.Structs.ScheduleStruct]] = None @dataclass class SetpointHoldExpiryTimestamp(ClusterAttributeDescriptor): @@ -33492,7 +31983,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -33508,7 +31999,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -33524,23 +32015,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000201 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -33556,7 +32031,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -33572,7 +32047,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -33588,7 +32063,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -33613,30 +32088,28 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="airflowDirection", Tag=0x0000000B, Type=typing.Optional[FanControl.Enums.AirflowDirectionEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - fanMode: 'FanControl.Enums.FanModeEnum' = None - fanModeSequence: 'FanControl.Enums.FanModeSequenceEnum' = None - percentSetting: 'typing.Union[Nullable, uint]' = None - percentCurrent: 'uint' = None - speedMax: 'typing.Optional[uint]' = None - speedSetting: 'typing.Union[None, Nullable, uint]' = None - speedCurrent: 'typing.Optional[uint]' = None - rockSupport: 'typing.Optional[uint]' = None - rockSetting: 'typing.Optional[uint]' = None - windSupport: 'typing.Optional[uint]' = None - windSetting: 'typing.Optional[uint]' = None - airflowDirection: 'typing.Optional[FanControl.Enums.AirflowDirectionEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + fanMode: FanControl.Enums.FanModeEnum = 0 + fanModeSequence: FanControl.Enums.FanModeSequenceEnum = 0 + percentSetting: typing.Union[Nullable, uint] = NullValue + percentCurrent: uint = 0 + speedMax: typing.Optional[uint] = None + speedSetting: typing.Union[None, Nullable, uint] = None + speedCurrent: typing.Optional[uint] = None + rockSupport: typing.Optional[uint] = None + rockSetting: typing.Optional[uint] = None + windSupport: typing.Optional[uint] = None + windSetting: typing.Optional[uint] = None + airflowDirection: typing.Optional[FanControl.Enums.AirflowDirectionEnum] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class AirflowDirectionEnum(MatterIntEnum): @@ -33646,7 +32119,7 @@ class AirflowDirectionEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class FanModeEnum(MatterIntEnum): kOff = 0x00 @@ -33660,7 +32133,7 @@ class FanModeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 7, + kUnknownEnumValue = 7 class FanModeSequenceEnum(MatterIntEnum): kOffLowMedHigh = 0x00 @@ -33673,7 +32146,7 @@ class FanModeSequenceEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 6, + kUnknownEnumValue = 6 class StepDirectionEnum(MatterIntEnum): kIncrease = 0x00 @@ -33682,7 +32155,7 @@ class StepDirectionEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class Bitmaps: class Feature(IntFlag): @@ -33708,7 +32181,7 @@ class Step(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000202 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -33719,9 +32192,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="lowestOff", Tag=2, Type=typing.Optional[bool]), ]) - direction: 'FanControl.Enums.StepDirectionEnum' = 0 - wrap: 'typing.Optional[bool]' = None - lowestOff: 'typing.Optional[bool]' = None + direction: FanControl.Enums.StepDirectionEnum = 0 + wrap: typing.Optional[bool] = None + lowestOff: typing.Optional[bool] = None class Attributes: @dataclass @@ -33738,7 +32211,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=FanControl.Enums.FanModeEnum) - value: 'FanControl.Enums.FanModeEnum' = 0 + value: FanControl.Enums.FanModeEnum = 0 @dataclass class FanModeSequence(ClusterAttributeDescriptor): @@ -33754,7 +32227,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=FanControl.Enums.FanModeSequenceEnum) - value: 'FanControl.Enums.FanModeSequenceEnum' = 0 + value: FanControl.Enums.FanModeSequenceEnum = 0 @dataclass class PercentSetting(ClusterAttributeDescriptor): @@ -33770,7 +32243,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class PercentCurrent(ClusterAttributeDescriptor): @@ -33786,7 +32259,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class SpeedMax(ClusterAttributeDescriptor): @@ -33802,7 +32275,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class SpeedSetting(ClusterAttributeDescriptor): @@ -33818,7 +32291,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class SpeedCurrent(ClusterAttributeDescriptor): @@ -33834,7 +32307,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RockSupport(ClusterAttributeDescriptor): @@ -33850,7 +32323,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RockSetting(ClusterAttributeDescriptor): @@ -33866,7 +32339,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class WindSupport(ClusterAttributeDescriptor): @@ -33882,7 +32355,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class WindSetting(ClusterAttributeDescriptor): @@ -33898,7 +32371,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class AirflowDirection(ClusterAttributeDescriptor): @@ -33914,7 +32387,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[FanControl.Enums.AirflowDirectionEnum]) - value: 'typing.Optional[FanControl.Enums.AirflowDirectionEnum]' = None + value: typing.Optional[FanControl.Enums.AirflowDirectionEnum] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -33930,7 +32403,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -33946,23 +32419,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000202 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -33978,7 +32435,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -33994,7 +32451,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -34010,7 +32467,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -34026,21 +32483,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="scheduleProgrammingVisibility", Tag=0x00000002, Type=typing.Optional[ThermostatUserInterfaceConfiguration.Enums.ScheduleProgrammingVisibilityEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - temperatureDisplayMode: 'ThermostatUserInterfaceConfiguration.Enums.TemperatureDisplayModeEnum' = None - keypadLockout: 'ThermostatUserInterfaceConfiguration.Enums.KeypadLockoutEnum' = None - scheduleProgrammingVisibility: 'typing.Optional[ThermostatUserInterfaceConfiguration.Enums.ScheduleProgrammingVisibilityEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + temperatureDisplayMode: ThermostatUserInterfaceConfiguration.Enums.TemperatureDisplayModeEnum = 0 + keypadLockout: ThermostatUserInterfaceConfiguration.Enums.KeypadLockoutEnum = 0 + scheduleProgrammingVisibility: typing.Optional[ThermostatUserInterfaceConfiguration.Enums.ScheduleProgrammingVisibilityEnum] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class KeypadLockoutEnum(MatterIntEnum): @@ -34054,7 +32509,7 @@ class KeypadLockoutEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 6, + kUnknownEnumValue = 6 class ScheduleProgrammingVisibilityEnum(MatterIntEnum): kScheduleProgrammingPermitted = 0x00 @@ -34063,7 +32518,7 @@ class ScheduleProgrammingVisibilityEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class TemperatureDisplayModeEnum(MatterIntEnum): kCelsius = 0x00 @@ -34072,7 +32527,7 @@ class TemperatureDisplayModeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class Attributes: @dataclass @@ -34089,7 +32544,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=ThermostatUserInterfaceConfiguration.Enums.TemperatureDisplayModeEnum) - value: 'ThermostatUserInterfaceConfiguration.Enums.TemperatureDisplayModeEnum' = 0 + value: ThermostatUserInterfaceConfiguration.Enums.TemperatureDisplayModeEnum = 0 @dataclass class KeypadLockout(ClusterAttributeDescriptor): @@ -34105,7 +32560,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=ThermostatUserInterfaceConfiguration.Enums.KeypadLockoutEnum) - value: 'ThermostatUserInterfaceConfiguration.Enums.KeypadLockoutEnum' = 0 + value: ThermostatUserInterfaceConfiguration.Enums.KeypadLockoutEnum = 0 @dataclass class ScheduleProgrammingVisibility(ClusterAttributeDescriptor): @@ -34121,7 +32576,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[ThermostatUserInterfaceConfiguration.Enums.ScheduleProgrammingVisibilityEnum]) - value: 'typing.Optional[ThermostatUserInterfaceConfiguration.Enums.ScheduleProgrammingVisibilityEnum]' = None + value: typing.Optional[ThermostatUserInterfaceConfiguration.Enums.ScheduleProgrammingVisibilityEnum] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -34137,7 +32592,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -34153,23 +32608,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000204 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -34185,7 +32624,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -34201,7 +32640,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -34217,7 +32656,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -34282,70 +32721,68 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="startUpColorTemperatureMireds", Tag=0x00004010, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - currentHue: 'typing.Optional[uint]' = None - currentSaturation: 'typing.Optional[uint]' = None - remainingTime: 'typing.Optional[uint]' = None - currentX: 'typing.Optional[uint]' = None - currentY: 'typing.Optional[uint]' = None - driftCompensation: 'typing.Optional[ColorControl.Enums.DriftCompensationEnum]' = None - compensationText: 'typing.Optional[str]' = None - colorTemperatureMireds: 'typing.Optional[uint]' = None - colorMode: 'ColorControl.Enums.ColorModeEnum' = None - options: 'uint' = None - numberOfPrimaries: 'typing.Union[Nullable, uint]' = None - primary1X: 'typing.Optional[uint]' = None - primary1Y: 'typing.Optional[uint]' = None - primary1Intensity: 'typing.Union[None, Nullable, uint]' = None - primary2X: 'typing.Optional[uint]' = None - primary2Y: 'typing.Optional[uint]' = None - primary2Intensity: 'typing.Union[None, Nullable, uint]' = None - primary3X: 'typing.Optional[uint]' = None - primary3Y: 'typing.Optional[uint]' = None - primary3Intensity: 'typing.Union[None, Nullable, uint]' = None - primary4X: 'typing.Optional[uint]' = None - primary4Y: 'typing.Optional[uint]' = None - primary4Intensity: 'typing.Union[None, Nullable, uint]' = None - primary5X: 'typing.Optional[uint]' = None - primary5Y: 'typing.Optional[uint]' = None - primary5Intensity: 'typing.Union[None, Nullable, uint]' = None - primary6X: 'typing.Optional[uint]' = None - primary6Y: 'typing.Optional[uint]' = None - primary6Intensity: 'typing.Union[None, Nullable, uint]' = None - whitePointX: 'typing.Optional[uint]' = None - whitePointY: 'typing.Optional[uint]' = None - colorPointRX: 'typing.Optional[uint]' = None - colorPointRY: 'typing.Optional[uint]' = None - colorPointRIntensity: 'typing.Union[None, Nullable, uint]' = None - colorPointGX: 'typing.Optional[uint]' = None - colorPointGY: 'typing.Optional[uint]' = None - colorPointGIntensity: 'typing.Union[None, Nullable, uint]' = None - colorPointBX: 'typing.Optional[uint]' = None - colorPointBY: 'typing.Optional[uint]' = None - colorPointBIntensity: 'typing.Union[None, Nullable, uint]' = None - enhancedCurrentHue: 'typing.Optional[uint]' = None - enhancedColorMode: 'ColorControl.Enums.EnhancedColorModeEnum' = None - colorLoopActive: 'typing.Optional[uint]' = None - colorLoopDirection: 'typing.Optional[uint]' = None - colorLoopTime: 'typing.Optional[uint]' = None - colorLoopStartEnhancedHue: 'typing.Optional[uint]' = None - colorLoopStoredEnhancedHue: 'typing.Optional[uint]' = None - colorCapabilities: 'uint' = None - colorTempPhysicalMinMireds: 'typing.Optional[uint]' = None - colorTempPhysicalMaxMireds: 'typing.Optional[uint]' = None - coupleColorTempToLevelMinMireds: 'typing.Optional[uint]' = None - startUpColorTemperatureMireds: 'typing.Union[None, Nullable, uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + currentHue: typing.Optional[uint] = None + currentSaturation: typing.Optional[uint] = None + remainingTime: typing.Optional[uint] = None + currentX: typing.Optional[uint] = None + currentY: typing.Optional[uint] = None + driftCompensation: typing.Optional[ColorControl.Enums.DriftCompensationEnum] = None + compensationText: typing.Optional[str] = None + colorTemperatureMireds: typing.Optional[uint] = None + colorMode: ColorControl.Enums.ColorModeEnum = 0 + options: uint = 0 + numberOfPrimaries: typing.Union[Nullable, uint] = NullValue + primary1X: typing.Optional[uint] = None + primary1Y: typing.Optional[uint] = None + primary1Intensity: typing.Union[None, Nullable, uint] = None + primary2X: typing.Optional[uint] = None + primary2Y: typing.Optional[uint] = None + primary2Intensity: typing.Union[None, Nullable, uint] = None + primary3X: typing.Optional[uint] = None + primary3Y: typing.Optional[uint] = None + primary3Intensity: typing.Union[None, Nullable, uint] = None + primary4X: typing.Optional[uint] = None + primary4Y: typing.Optional[uint] = None + primary4Intensity: typing.Union[None, Nullable, uint] = None + primary5X: typing.Optional[uint] = None + primary5Y: typing.Optional[uint] = None + primary5Intensity: typing.Union[None, Nullable, uint] = None + primary6X: typing.Optional[uint] = None + primary6Y: typing.Optional[uint] = None + primary6Intensity: typing.Union[None, Nullable, uint] = None + whitePointX: typing.Optional[uint] = None + whitePointY: typing.Optional[uint] = None + colorPointRX: typing.Optional[uint] = None + colorPointRY: typing.Optional[uint] = None + colorPointRIntensity: typing.Union[None, Nullable, uint] = None + colorPointGX: typing.Optional[uint] = None + colorPointGY: typing.Optional[uint] = None + colorPointGIntensity: typing.Union[None, Nullable, uint] = None + colorPointBX: typing.Optional[uint] = None + colorPointBY: typing.Optional[uint] = None + colorPointBIntensity: typing.Union[None, Nullable, uint] = None + enhancedCurrentHue: typing.Optional[uint] = None + enhancedColorMode: ColorControl.Enums.EnhancedColorModeEnum = 0 + colorLoopActive: typing.Optional[uint] = None + colorLoopDirection: typing.Optional[uint] = None + colorLoopTime: typing.Optional[uint] = None + colorLoopStartEnhancedHue: typing.Optional[uint] = None + colorLoopStoredEnhancedHue: typing.Optional[uint] = None + colorCapabilities: uint = 0 + colorTempPhysicalMinMireds: typing.Optional[uint] = None + colorTempPhysicalMaxMireds: typing.Optional[uint] = None + coupleColorTempToLevelMinMireds: typing.Optional[uint] = None + startUpColorTemperatureMireds: typing.Union[None, Nullable, uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ColorLoopActionEnum(MatterIntEnum): @@ -34356,7 +32793,7 @@ class ColorLoopActionEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class ColorLoopDirectionEnum(MatterIntEnum): kDecrement = 0x00 @@ -34365,7 +32802,7 @@ class ColorLoopDirectionEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class ColorModeEnum(MatterIntEnum): kCurrentHueAndCurrentSaturation = 0x00 @@ -34375,7 +32812,7 @@ class ColorModeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class DirectionEnum(MatterIntEnum): kShortest = 0x00 @@ -34386,7 +32823,7 @@ class DirectionEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class DriftCompensationEnum(MatterIntEnum): kNone = 0x00 @@ -34398,7 +32835,7 @@ class DriftCompensationEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class EnhancedColorModeEnum(MatterIntEnum): kCurrentHueAndCurrentSaturation = 0x00 @@ -34409,7 +32846,7 @@ class EnhancedColorModeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class MoveModeEnum(MatterIntEnum): kStop = 0x00 @@ -34419,7 +32856,7 @@ class MoveModeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class StepModeEnum(MatterIntEnum): kUp = 0x01 @@ -34428,7 +32865,7 @@ class StepModeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 0, + kUnknownEnumValue = 0 class Bitmaps: class ColorCapabilitiesBitmap(IntFlag): @@ -34460,7 +32897,7 @@ class MoveToHue(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34473,18 +32910,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) - hue: 'uint' = 0 - direction: 'ColorControl.Enums.DirectionEnum' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + hue: uint = 0 + direction: ColorControl.Enums.DirectionEnum = 0 + transitionTime: uint = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class MoveHue(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34496,17 +32933,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) - moveMode: 'ColorControl.Enums.MoveModeEnum' = 0 - rate: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + moveMode: ColorControl.Enums.MoveModeEnum = 0 + rate: uint = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class StepHue(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34519,18 +32956,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) - stepMode: 'ColorControl.Enums.StepModeEnum' = 0 - stepSize: 'uint' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + stepMode: ColorControl.Enums.StepModeEnum = 0 + stepSize: uint = 0 + transitionTime: uint = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class MoveToSaturation(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34542,17 +32979,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) - saturation: 'uint' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + saturation: uint = 0 + transitionTime: uint = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class MoveSaturation(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34564,17 +33001,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) - moveMode: 'ColorControl.Enums.MoveModeEnum' = 0 - rate: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + moveMode: ColorControl.Enums.MoveModeEnum = 0 + rate: uint = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class StepSaturation(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34587,18 +33024,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) - stepMode: 'ColorControl.Enums.StepModeEnum' = 0 - stepSize: 'uint' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + stepMode: ColorControl.Enums.StepModeEnum = 0 + stepSize: uint = 0 + transitionTime: uint = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class MoveToHueAndSaturation(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000006 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34611,18 +33048,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) - hue: 'uint' = 0 - saturation: 'uint' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + hue: uint = 0 + saturation: uint = 0 + transitionTime: uint = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class MoveToColor(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34635,18 +33072,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) - colorX: 'uint' = 0 - colorY: 'uint' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + colorX: uint = 0 + colorY: uint = 0 + transitionTime: uint = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class MoveColor(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000008 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34658,17 +33095,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) - rateX: 'int' = 0 - rateY: 'int' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + rateX: int = 0 + rateY: int = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class StepColor(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000009 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34681,18 +33118,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) - stepX: 'int' = 0 - stepY: 'int' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + stepX: int = 0 + stepY: int = 0 + transitionTime: uint = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class MoveToColorTemperature(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x0000000A is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34704,17 +33141,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) - colorTemperatureMireds: 'uint' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + colorTemperatureMireds: uint = 0 + transitionTime: uint = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class EnhancedMoveToHue(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000040 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34727,18 +33164,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) - enhancedHue: 'uint' = 0 - direction: 'ColorControl.Enums.DirectionEnum' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + enhancedHue: uint = 0 + direction: ColorControl.Enums.DirectionEnum = 0 + transitionTime: uint = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class EnhancedMoveHue(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000041 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34750,17 +33187,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) - moveMode: 'ColorControl.Enums.MoveModeEnum' = 0 - rate: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + moveMode: ColorControl.Enums.MoveModeEnum = 0 + rate: uint = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class EnhancedStepHue(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000042 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34773,18 +33210,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) - stepMode: 'ColorControl.Enums.StepModeEnum' = 0 - stepSize: 'uint' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + stepMode: ColorControl.Enums.StepModeEnum = 0 + stepSize: uint = 0 + transitionTime: uint = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class EnhancedMoveToHueAndSaturation(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000043 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34797,18 +33234,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=4, Type=uint), ]) - enhancedHue: 'uint' = 0 - saturation: 'uint' = 0 - transitionTime: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + enhancedHue: uint = 0 + saturation: uint = 0 + transitionTime: uint = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class ColorLoopSet(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000044 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34823,20 +33260,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=6, Type=uint), ]) - updateFlags: 'uint' = 0 - action: 'ColorControl.Enums.ColorLoopActionEnum' = 0 - direction: 'ColorControl.Enums.ColorLoopDirectionEnum' = 0 - time: 'uint' = 0 - startHue: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + updateFlags: uint = 0 + action: ColorControl.Enums.ColorLoopActionEnum = 0 + direction: ColorControl.Enums.ColorLoopDirectionEnum = 0 + time: uint = 0 + startHue: uint = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class StopMoveStep(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x00000047 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34846,15 +33283,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=1, Type=uint), ]) - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class MoveColorTemperature(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x0000004B is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34868,19 +33305,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=5, Type=uint), ]) - moveMode: 'ColorControl.Enums.MoveModeEnum' = 0 - rate: 'uint' = 0 - colorTemperatureMinimumMireds: 'uint' = 0 - colorTemperatureMaximumMireds: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + moveMode: ColorControl.Enums.MoveModeEnum = 0 + rate: uint = 0 + colorTemperatureMinimumMireds: uint = 0 + colorTemperatureMaximumMireds: uint = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 @dataclass class StepColorTemperature(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000300 command_id: typing.ClassVar[int] = 0x0000004C is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -34895,13 +33332,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=6, Type=uint), ]) - stepMode: 'ColorControl.Enums.StepModeEnum' = 0 - stepSize: 'uint' = 0 - transitionTime: 'uint' = 0 - colorTemperatureMinimumMireds: 'uint' = 0 - colorTemperatureMaximumMireds: 'uint' = 0 - optionsMask: 'uint' = 0 - optionsOverride: 'uint' = 0 + stepMode: ColorControl.Enums.StepModeEnum = 0 + stepSize: uint = 0 + transitionTime: uint = 0 + colorTemperatureMinimumMireds: uint = 0 + colorTemperatureMaximumMireds: uint = 0 + optionsMask: uint = 0 + optionsOverride: uint = 0 class Attributes: @dataclass @@ -34918,7 +33355,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class CurrentSaturation(ClusterAttributeDescriptor): @@ -34934,7 +33371,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RemainingTime(ClusterAttributeDescriptor): @@ -34950,7 +33387,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class CurrentX(ClusterAttributeDescriptor): @@ -34966,7 +33403,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class CurrentY(ClusterAttributeDescriptor): @@ -34982,7 +33419,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class DriftCompensation(ClusterAttributeDescriptor): @@ -34998,7 +33435,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[ColorControl.Enums.DriftCompensationEnum]) - value: 'typing.Optional[ColorControl.Enums.DriftCompensationEnum]' = None + value: typing.Optional[ColorControl.Enums.DriftCompensationEnum] = None @dataclass class CompensationText(ClusterAttributeDescriptor): @@ -35014,7 +33451,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class ColorTemperatureMireds(ClusterAttributeDescriptor): @@ -35030,7 +33467,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ColorMode(ClusterAttributeDescriptor): @@ -35046,7 +33483,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=ColorControl.Enums.ColorModeEnum) - value: 'ColorControl.Enums.ColorModeEnum' = 0 + value: ColorControl.Enums.ColorModeEnum = 0 @dataclass class Options(ClusterAttributeDescriptor): @@ -35062,7 +33499,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class NumberOfPrimaries(ClusterAttributeDescriptor): @@ -35078,7 +33515,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class Primary1X(ClusterAttributeDescriptor): @@ -35094,7 +33531,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Primary1Y(ClusterAttributeDescriptor): @@ -35110,7 +33547,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Primary1Intensity(ClusterAttributeDescriptor): @@ -35126,7 +33563,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class Primary2X(ClusterAttributeDescriptor): @@ -35142,7 +33579,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Primary2Y(ClusterAttributeDescriptor): @@ -35158,7 +33595,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Primary2Intensity(ClusterAttributeDescriptor): @@ -35174,7 +33611,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class Primary3X(ClusterAttributeDescriptor): @@ -35190,7 +33627,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Primary3Y(ClusterAttributeDescriptor): @@ -35206,7 +33643,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Primary3Intensity(ClusterAttributeDescriptor): @@ -35222,7 +33659,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class Primary4X(ClusterAttributeDescriptor): @@ -35238,7 +33675,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Primary4Y(ClusterAttributeDescriptor): @@ -35254,7 +33691,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Primary4Intensity(ClusterAttributeDescriptor): @@ -35270,7 +33707,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class Primary5X(ClusterAttributeDescriptor): @@ -35286,7 +33723,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Primary5Y(ClusterAttributeDescriptor): @@ -35302,7 +33739,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Primary5Intensity(ClusterAttributeDescriptor): @@ -35318,7 +33755,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class Primary6X(ClusterAttributeDescriptor): @@ -35334,7 +33771,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Primary6Y(ClusterAttributeDescriptor): @@ -35350,7 +33787,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Primary6Intensity(ClusterAttributeDescriptor): @@ -35366,7 +33803,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class WhitePointX(ClusterAttributeDescriptor): @@ -35382,7 +33819,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class WhitePointY(ClusterAttributeDescriptor): @@ -35398,7 +33835,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ColorPointRX(ClusterAttributeDescriptor): @@ -35414,7 +33851,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ColorPointRY(ClusterAttributeDescriptor): @@ -35430,7 +33867,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ColorPointRIntensity(ClusterAttributeDescriptor): @@ -35446,7 +33883,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class ColorPointGX(ClusterAttributeDescriptor): @@ -35462,7 +33899,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ColorPointGY(ClusterAttributeDescriptor): @@ -35478,7 +33915,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ColorPointGIntensity(ClusterAttributeDescriptor): @@ -35494,7 +33931,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class ColorPointBX(ClusterAttributeDescriptor): @@ -35510,7 +33947,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ColorPointBY(ClusterAttributeDescriptor): @@ -35526,7 +33963,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ColorPointBIntensity(ClusterAttributeDescriptor): @@ -35542,7 +33979,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class EnhancedCurrentHue(ClusterAttributeDescriptor): @@ -35558,7 +33995,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class EnhancedColorMode(ClusterAttributeDescriptor): @@ -35574,7 +34011,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=ColorControl.Enums.EnhancedColorModeEnum) - value: 'ColorControl.Enums.EnhancedColorModeEnum' = 0 + value: ColorControl.Enums.EnhancedColorModeEnum = 0 @dataclass class ColorLoopActive(ClusterAttributeDescriptor): @@ -35590,7 +34027,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ColorLoopDirection(ClusterAttributeDescriptor): @@ -35606,7 +34043,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ColorLoopTime(ClusterAttributeDescriptor): @@ -35622,7 +34059,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ColorLoopStartEnhancedHue(ClusterAttributeDescriptor): @@ -35638,7 +34075,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ColorLoopStoredEnhancedHue(ClusterAttributeDescriptor): @@ -35654,7 +34091,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ColorCapabilities(ClusterAttributeDescriptor): @@ -35670,7 +34107,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ColorTempPhysicalMinMireds(ClusterAttributeDescriptor): @@ -35686,7 +34123,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ColorTempPhysicalMaxMireds(ClusterAttributeDescriptor): @@ -35702,7 +34139,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class CoupleColorTempToLevelMinMireds(ClusterAttributeDescriptor): @@ -35718,7 +34155,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class StartUpColorTemperatureMireds(ClusterAttributeDescriptor): @@ -35734,7 +34171,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -35750,7 +34187,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -35766,23 +34203,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000300 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -35798,7 +34219,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -35814,7 +34235,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -35830,7 +34251,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -35857,32 +34278,30 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="lampBurnHoursTripPoint", Tag=0x00000035, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - physicalMinLevel: 'uint' = None - physicalMaxLevel: 'uint' = None - ballastStatus: 'typing.Optional[uint]' = None - minLevel: 'uint' = None - maxLevel: 'uint' = None - intrinsicBallastFactor: 'typing.Union[None, Nullable, uint]' = None - ballastFactorAdjustment: 'typing.Union[None, Nullable, uint]' = None - lampQuantity: 'uint' = None - lampType: 'typing.Optional[str]' = None - lampManufacturer: 'typing.Optional[str]' = None - lampRatedHours: 'typing.Union[None, Nullable, uint]' = None - lampBurnHours: 'typing.Union[None, Nullable, uint]' = None - lampAlarmMode: 'typing.Optional[uint]' = None - lampBurnHoursTripPoint: 'typing.Union[None, Nullable, uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + physicalMinLevel: uint = 0 + physicalMaxLevel: uint = 0 + ballastStatus: typing.Optional[uint] = None + minLevel: uint = 0 + maxLevel: uint = 0 + intrinsicBallastFactor: typing.Union[None, Nullable, uint] = None + ballastFactorAdjustment: typing.Union[None, Nullable, uint] = None + lampQuantity: uint = 0 + lampType: typing.Optional[str] = None + lampManufacturer: typing.Optional[str] = None + lampRatedHours: typing.Union[None, Nullable, uint] = None + lampBurnHours: typing.Union[None, Nullable, uint] = None + lampAlarmMode: typing.Optional[uint] = None + lampBurnHoursTripPoint: typing.Union[None, Nullable, uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Bitmaps: class BallastStatusBitmap(IntFlag): @@ -35907,7 +34326,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class PhysicalMaxLevel(ClusterAttributeDescriptor): @@ -35923,7 +34342,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class BallastStatus(ClusterAttributeDescriptor): @@ -35939,7 +34358,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class MinLevel(ClusterAttributeDescriptor): @@ -35955,7 +34374,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class MaxLevel(ClusterAttributeDescriptor): @@ -35971,7 +34390,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class IntrinsicBallastFactor(ClusterAttributeDescriptor): @@ -35987,7 +34406,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class BallastFactorAdjustment(ClusterAttributeDescriptor): @@ -36003,7 +34422,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class LampQuantity(ClusterAttributeDescriptor): @@ -36019,7 +34438,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class LampType(ClusterAttributeDescriptor): @@ -36035,7 +34454,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class LampManufacturer(ClusterAttributeDescriptor): @@ -36051,7 +34470,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class LampRatedHours(ClusterAttributeDescriptor): @@ -36067,7 +34486,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class LampBurnHours(ClusterAttributeDescriptor): @@ -36083,7 +34502,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class LampAlarmMode(ClusterAttributeDescriptor): @@ -36099,7 +34518,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class LampBurnHoursTripPoint(ClusterAttributeDescriptor): @@ -36115,7 +34534,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -36131,7 +34550,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -36147,23 +34566,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000301 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -36179,7 +34582,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -36195,7 +34598,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -36211,7 +34614,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -36229,23 +34632,21 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="lightSensorType", Tag=0x00000004, Type=typing.Union[None, Nullable, IlluminanceMeasurement.Enums.LightSensorTypeEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[Nullable, uint]' = None - minMeasuredValue: 'typing.Union[Nullable, uint]' = None - maxMeasuredValue: 'typing.Union[Nullable, uint]' = None - tolerance: 'typing.Optional[uint]' = None - lightSensorType: 'typing.Union[None, Nullable, IlluminanceMeasurement.Enums.LightSensorTypeEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + measuredValue: typing.Union[Nullable, uint] = NullValue + minMeasuredValue: typing.Union[Nullable, uint] = NullValue + maxMeasuredValue: typing.Union[Nullable, uint] = NullValue + tolerance: typing.Optional[uint] = None + lightSensorType: typing.Union[None, Nullable, IlluminanceMeasurement.Enums.LightSensorTypeEnum] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class LightSensorTypeEnum(MatterIntEnum): @@ -36255,7 +34656,7 @@ class LightSensorTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class Attributes: @dataclass @@ -36272,7 +34673,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class MinMeasuredValue(ClusterAttributeDescriptor): @@ -36288,7 +34689,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class MaxMeasuredValue(ClusterAttributeDescriptor): @@ -36304,7 +34705,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class Tolerance(ClusterAttributeDescriptor): @@ -36320,7 +34721,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class LightSensorType(ClusterAttributeDescriptor): @@ -36336,7 +34737,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, IlluminanceMeasurement.Enums.LightSensorTypeEnum]) - value: 'typing.Union[None, Nullable, IlluminanceMeasurement.Enums.LightSensorTypeEnum]' = None + value: typing.Union[None, Nullable, IlluminanceMeasurement.Enums.LightSensorTypeEnum] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -36352,7 +34753,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -36368,23 +34769,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000400 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -36400,7 +34785,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -36416,7 +34801,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -36432,7 +34817,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -36449,22 +34834,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="tolerance", Tag=0x00000003, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[Nullable, int]' = None - minMeasuredValue: 'typing.Union[Nullable, int]' = None - maxMeasuredValue: 'typing.Union[Nullable, int]' = None - tolerance: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + measuredValue: typing.Union[Nullable, int] = NullValue + minMeasuredValue: typing.Union[Nullable, int] = NullValue + maxMeasuredValue: typing.Union[Nullable, int] = NullValue + tolerance: typing.Optional[uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Attributes: @dataclass @@ -36481,7 +34864,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class MinMeasuredValue(ClusterAttributeDescriptor): @@ -36497,7 +34880,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class MaxMeasuredValue(ClusterAttributeDescriptor): @@ -36513,7 +34896,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class Tolerance(ClusterAttributeDescriptor): @@ -36529,7 +34912,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -36545,7 +34928,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -36561,23 +34944,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000402 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -36593,7 +34960,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -36609,7 +34976,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -36625,7 +34992,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -36647,27 +35014,25 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="scale", Tag=0x00000014, Type=typing.Optional[int]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[Nullable, int]' = None - minMeasuredValue: 'typing.Union[Nullable, int]' = None - maxMeasuredValue: 'typing.Union[Nullable, int]' = None - tolerance: 'typing.Optional[uint]' = None - scaledValue: 'typing.Union[None, Nullable, int]' = None - minScaledValue: 'typing.Union[None, Nullable, int]' = None - maxScaledValue: 'typing.Union[None, Nullable, int]' = None - scaledTolerance: 'typing.Optional[uint]' = None - scale: 'typing.Optional[int]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + measuredValue: typing.Union[Nullable, int] = NullValue + minMeasuredValue: typing.Union[Nullable, int] = NullValue + maxMeasuredValue: typing.Union[Nullable, int] = NullValue + tolerance: typing.Optional[uint] = None + scaledValue: typing.Union[None, Nullable, int] = None + minScaledValue: typing.Union[None, Nullable, int] = None + maxScaledValue: typing.Union[None, Nullable, int] = None + scaledTolerance: typing.Optional[uint] = None + scale: typing.Optional[int] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Bitmaps: class Feature(IntFlag): @@ -36688,7 +35053,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class MinMeasuredValue(ClusterAttributeDescriptor): @@ -36704,7 +35069,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class MaxMeasuredValue(ClusterAttributeDescriptor): @@ -36720,7 +35085,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class Tolerance(ClusterAttributeDescriptor): @@ -36736,7 +35101,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ScaledValue(ClusterAttributeDescriptor): @@ -36752,7 +35117,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class MinScaledValue(ClusterAttributeDescriptor): @@ -36768,7 +35133,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class MaxScaledValue(ClusterAttributeDescriptor): @@ -36784,7 +35149,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int]) - value: 'typing.Union[None, Nullable, int]' = None + value: typing.Union[None, Nullable, int] = None @dataclass class ScaledTolerance(ClusterAttributeDescriptor): @@ -36800,7 +35165,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Scale(ClusterAttributeDescriptor): @@ -36816,7 +35181,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - value: 'typing.Optional[int]' = None + value: typing.Optional[int] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -36832,7 +35197,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -36848,23 +35213,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000403 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -36880,7 +35229,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -36896,7 +35245,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -36912,7 +35261,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -36929,22 +35278,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="tolerance", Tag=0x00000003, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[Nullable, uint]' = None - minMeasuredValue: 'typing.Union[Nullable, uint]' = None - maxMeasuredValue: 'typing.Union[Nullable, uint]' = None - tolerance: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + measuredValue: typing.Union[Nullable, uint] = NullValue + minMeasuredValue: typing.Union[Nullable, uint] = NullValue + maxMeasuredValue: typing.Union[Nullable, uint] = NullValue + tolerance: typing.Optional[uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Attributes: @dataclass @@ -36961,7 +35308,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class MinMeasuredValue(ClusterAttributeDescriptor): @@ -36977,7 +35324,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class MaxMeasuredValue(ClusterAttributeDescriptor): @@ -36993,7 +35340,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class Tolerance(ClusterAttributeDescriptor): @@ -37009,7 +35356,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -37025,7 +35372,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -37041,23 +35388,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000404 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -37073,7 +35404,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -37089,7 +35420,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -37105,7 +35436,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -37122,22 +35453,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="tolerance", Tag=0x00000003, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[Nullable, uint]' = None - minMeasuredValue: 'typing.Union[Nullable, uint]' = None - maxMeasuredValue: 'typing.Union[Nullable, uint]' = None - tolerance: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + measuredValue: typing.Union[Nullable, uint] = NullValue + minMeasuredValue: typing.Union[Nullable, uint] = NullValue + maxMeasuredValue: typing.Union[Nullable, uint] = NullValue + tolerance: typing.Optional[uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Attributes: @dataclass @@ -37154,7 +35483,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class MinMeasuredValue(ClusterAttributeDescriptor): @@ -37170,7 +35499,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class MaxMeasuredValue(ClusterAttributeDescriptor): @@ -37186,7 +35515,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class Tolerance(ClusterAttributeDescriptor): @@ -37202,7 +35531,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -37218,7 +35547,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -37234,23 +35563,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000405 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -37266,7 +35579,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -37282,7 +35595,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -37298,7 +35611,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -37325,32 +35638,30 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="physicalContactUnoccupiedToOccupiedThreshold", Tag=0x00000032, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - occupancy: 'uint' = None - occupancySensorType: 'OccupancySensing.Enums.OccupancySensorTypeEnum' = None - occupancySensorTypeBitmap: 'uint' = None - holdTime: 'typing.Optional[uint]' = None - holdTimeLimits: 'typing.Optional[OccupancySensing.Structs.HoldTimeLimitsStruct]' = None - PIROccupiedToUnoccupiedDelay: 'typing.Optional[uint]' = None - PIRUnoccupiedToOccupiedDelay: 'typing.Optional[uint]' = None - PIRUnoccupiedToOccupiedThreshold: 'typing.Optional[uint]' = None - ultrasonicOccupiedToUnoccupiedDelay: 'typing.Optional[uint]' = None - ultrasonicUnoccupiedToOccupiedDelay: 'typing.Optional[uint]' = None - ultrasonicUnoccupiedToOccupiedThreshold: 'typing.Optional[uint]' = None - physicalContactOccupiedToUnoccupiedDelay: 'typing.Optional[uint]' = None - physicalContactUnoccupiedToOccupiedDelay: 'typing.Optional[uint]' = None - physicalContactUnoccupiedToOccupiedThreshold: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + occupancy: uint = 0 + occupancySensorType: OccupancySensing.Enums.OccupancySensorTypeEnum = 0 + occupancySensorTypeBitmap: uint = 0 + holdTime: typing.Optional[uint] = None + holdTimeLimits: typing.Optional[OccupancySensing.Structs.HoldTimeLimitsStruct] = None + PIROccupiedToUnoccupiedDelay: typing.Optional[uint] = None + PIRUnoccupiedToOccupiedDelay: typing.Optional[uint] = None + PIRUnoccupiedToOccupiedThreshold: typing.Optional[uint] = None + ultrasonicOccupiedToUnoccupiedDelay: typing.Optional[uint] = None + ultrasonicUnoccupiedToOccupiedDelay: typing.Optional[uint] = None + ultrasonicUnoccupiedToOccupiedThreshold: typing.Optional[uint] = None + physicalContactOccupiedToUnoccupiedDelay: typing.Optional[uint] = None + physicalContactUnoccupiedToOccupiedDelay: typing.Optional[uint] = None + physicalContactUnoccupiedToOccupiedThreshold: typing.Optional[uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class OccupancySensorTypeEnum(MatterIntEnum): @@ -37362,7 +35673,7 @@ class OccupancySensorTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class Bitmaps: class Feature(IntFlag): @@ -37414,7 +35725,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class OccupancySensorType(ClusterAttributeDescriptor): @@ -37430,7 +35741,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=OccupancySensing.Enums.OccupancySensorTypeEnum) - value: 'OccupancySensing.Enums.OccupancySensorTypeEnum' = 0 + value: OccupancySensing.Enums.OccupancySensorTypeEnum = 0 @dataclass class OccupancySensorTypeBitmap(ClusterAttributeDescriptor): @@ -37446,7 +35757,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class HoldTime(ClusterAttributeDescriptor): @@ -37462,7 +35773,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class HoldTimeLimits(ClusterAttributeDescriptor): @@ -37478,7 +35789,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[OccupancySensing.Structs.HoldTimeLimitsStruct]) - value: 'typing.Optional[OccupancySensing.Structs.HoldTimeLimitsStruct]' = None + value: typing.Optional[OccupancySensing.Structs.HoldTimeLimitsStruct] = None @dataclass class PIROccupiedToUnoccupiedDelay(ClusterAttributeDescriptor): @@ -37494,7 +35805,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class PIRUnoccupiedToOccupiedDelay(ClusterAttributeDescriptor): @@ -37510,7 +35821,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class PIRUnoccupiedToOccupiedThreshold(ClusterAttributeDescriptor): @@ -37526,7 +35837,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class UltrasonicOccupiedToUnoccupiedDelay(ClusterAttributeDescriptor): @@ -37542,7 +35853,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class UltrasonicUnoccupiedToOccupiedDelay(ClusterAttributeDescriptor): @@ -37558,7 +35869,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class UltrasonicUnoccupiedToOccupiedThreshold(ClusterAttributeDescriptor): @@ -37574,7 +35885,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class PhysicalContactOccupiedToUnoccupiedDelay(ClusterAttributeDescriptor): @@ -37590,7 +35901,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class PhysicalContactUnoccupiedToOccupiedDelay(ClusterAttributeDescriptor): @@ -37606,7 +35917,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class PhysicalContactUnoccupiedToOccupiedThreshold(ClusterAttributeDescriptor): @@ -37622,7 +35933,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -37638,7 +35949,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -37654,23 +35965,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000406 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -37686,7 +35981,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -37702,7 +35997,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -37718,7 +36013,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -37738,7 +36033,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="occupancy", Tag=0, Type=uint), ]) - occupancy: 'uint' = 0 + occupancy: uint = 0 @dataclass @@ -37762,29 +36057,27 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[None, Nullable, float32]' = None - minMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - maxMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValueWindow: 'typing.Optional[uint]' = None - averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - averageMeasuredValueWindow: 'typing.Optional[uint]' = None - uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.LevelValueEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + measuredValue: typing.Union[None, Nullable, float32] = None + minMeasuredValue: typing.Union[None, Nullable, float32] = None + maxMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValueWindow: typing.Optional[uint] = None + averageMeasuredValue: typing.Union[None, Nullable, float32] = None + averageMeasuredValueWindow: typing.Optional[uint] = None + uncertainty: typing.Optional[float32] = None + measurementUnit: typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementUnitEnum] = None + measurementMedium: typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementMediumEnum] = None + levelValue: typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.LevelValueEnum] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class LevelValueEnum(MatterIntEnum): @@ -37797,7 +36090,7 @@ class LevelValueEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class MeasurementMediumEnum(MatterIntEnum): kAir = 0x00 @@ -37807,7 +36100,7 @@ class MeasurementMediumEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class MeasurementUnitEnum(MatterIntEnum): kPpm = 0x00 @@ -37822,7 +36115,7 @@ class MeasurementUnitEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 8, + kUnknownEnumValue = 8 class Bitmaps: class Feature(IntFlag): @@ -37848,7 +36141,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MinMeasuredValue(ClusterAttributeDescriptor): @@ -37864,7 +36157,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MaxMeasuredValue(ClusterAttributeDescriptor): @@ -37880,7 +36173,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValue(ClusterAttributeDescriptor): @@ -37896,7 +36189,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @@ -37912,7 +36205,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class AverageMeasuredValue(ClusterAttributeDescriptor): @@ -37928,7 +36221,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @@ -37944,7 +36237,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Uncertainty(ClusterAttributeDescriptor): @@ -37960,7 +36253,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[float32]) - value: 'typing.Optional[float32]' = None + value: typing.Optional[float32] = None @dataclass class MeasurementUnit(ClusterAttributeDescriptor): @@ -37976,7 +36269,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + value: typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementUnitEnum] = None @dataclass class MeasurementMedium(ClusterAttributeDescriptor): @@ -37992,7 +36285,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + value: typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.MeasurementMediumEnum] = None @dataclass class LevelValue(ClusterAttributeDescriptor): @@ -38008,7 +36301,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.LevelValueEnum]) - value: 'typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.LevelValueEnum]' = None + value: typing.Optional[CarbonMonoxideConcentrationMeasurement.Enums.LevelValueEnum] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -38024,7 +36317,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -38040,23 +36333,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000040C - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -38072,7 +36349,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -38088,7 +36365,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -38104,7 +36381,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -38128,29 +36405,27 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[None, Nullable, float32]' = None - minMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - maxMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValueWindow: 'typing.Optional[uint]' = None - averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - averageMeasuredValueWindow: 'typing.Optional[uint]' = None - uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.LevelValueEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + measuredValue: typing.Union[None, Nullable, float32] = None + minMeasuredValue: typing.Union[None, Nullable, float32] = None + maxMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValueWindow: typing.Optional[uint] = None + averageMeasuredValue: typing.Union[None, Nullable, float32] = None + averageMeasuredValueWindow: typing.Optional[uint] = None + uncertainty: typing.Optional[float32] = None + measurementUnit: typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum] = None + measurementMedium: typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum] = None + levelValue: typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.LevelValueEnum] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class LevelValueEnum(MatterIntEnum): @@ -38163,7 +36438,7 @@ class LevelValueEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class MeasurementMediumEnum(MatterIntEnum): kAir = 0x00 @@ -38173,7 +36448,7 @@ class MeasurementMediumEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class MeasurementUnitEnum(MatterIntEnum): kPpm = 0x00 @@ -38188,7 +36463,7 @@ class MeasurementUnitEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 8, + kUnknownEnumValue = 8 class Bitmaps: class Feature(IntFlag): @@ -38214,7 +36489,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MinMeasuredValue(ClusterAttributeDescriptor): @@ -38230,7 +36505,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MaxMeasuredValue(ClusterAttributeDescriptor): @@ -38246,7 +36521,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValue(ClusterAttributeDescriptor): @@ -38262,7 +36537,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @@ -38278,7 +36553,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class AverageMeasuredValue(ClusterAttributeDescriptor): @@ -38294,7 +36569,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @@ -38310,7 +36585,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Uncertainty(ClusterAttributeDescriptor): @@ -38326,7 +36601,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[float32]) - value: 'typing.Optional[float32]' = None + value: typing.Optional[float32] = None @dataclass class MeasurementUnit(ClusterAttributeDescriptor): @@ -38342,7 +36617,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + value: typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum] = None @dataclass class MeasurementMedium(ClusterAttributeDescriptor): @@ -38358,7 +36633,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + value: typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum] = None @dataclass class LevelValue(ClusterAttributeDescriptor): @@ -38374,7 +36649,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.LevelValueEnum]) - value: 'typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.LevelValueEnum]' = None + value: typing.Optional[CarbonDioxideConcentrationMeasurement.Enums.LevelValueEnum] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -38390,7 +36665,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -38406,23 +36681,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000040D - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -38438,7 +36697,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -38454,7 +36713,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -38470,7 +36729,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -38494,29 +36753,27 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[None, Nullable, float32]' = None - minMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - maxMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValueWindow: 'typing.Optional[uint]' = None - averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - averageMeasuredValueWindow: 'typing.Optional[uint]' = None - uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.LevelValueEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + measuredValue: typing.Union[None, Nullable, float32] = None + minMeasuredValue: typing.Union[None, Nullable, float32] = None + maxMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValueWindow: typing.Optional[uint] = None + averageMeasuredValue: typing.Union[None, Nullable, float32] = None + averageMeasuredValueWindow: typing.Optional[uint] = None + uncertainty: typing.Optional[float32] = None + measurementUnit: typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum] = None + measurementMedium: typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum] = None + levelValue: typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.LevelValueEnum] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class LevelValueEnum(MatterIntEnum): @@ -38529,7 +36786,7 @@ class LevelValueEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class MeasurementMediumEnum(MatterIntEnum): kAir = 0x00 @@ -38539,7 +36796,7 @@ class MeasurementMediumEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class MeasurementUnitEnum(MatterIntEnum): kPpm = 0x00 @@ -38554,7 +36811,7 @@ class MeasurementUnitEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 8, + kUnknownEnumValue = 8 class Bitmaps: class Feature(IntFlag): @@ -38580,7 +36837,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MinMeasuredValue(ClusterAttributeDescriptor): @@ -38596,7 +36853,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MaxMeasuredValue(ClusterAttributeDescriptor): @@ -38612,7 +36869,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValue(ClusterAttributeDescriptor): @@ -38628,7 +36885,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @@ -38644,7 +36901,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class AverageMeasuredValue(ClusterAttributeDescriptor): @@ -38660,7 +36917,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @@ -38676,7 +36933,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Uncertainty(ClusterAttributeDescriptor): @@ -38692,7 +36949,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[float32]) - value: 'typing.Optional[float32]' = None + value: typing.Optional[float32] = None @dataclass class MeasurementUnit(ClusterAttributeDescriptor): @@ -38708,7 +36965,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + value: typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementUnitEnum] = None @dataclass class MeasurementMedium(ClusterAttributeDescriptor): @@ -38724,7 +36981,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + value: typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.MeasurementMediumEnum] = None @dataclass class LevelValue(ClusterAttributeDescriptor): @@ -38740,7 +36997,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.LevelValueEnum]) - value: 'typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.LevelValueEnum]' = None + value: typing.Optional[NitrogenDioxideConcentrationMeasurement.Enums.LevelValueEnum] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -38756,7 +37013,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -38772,23 +37029,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000413 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -38804,7 +37045,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -38820,7 +37061,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -38836,7 +37077,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -38860,29 +37101,27 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[OzoneConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[None, Nullable, float32]' = None - minMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - maxMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValueWindow: 'typing.Optional[uint]' = None - averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - averageMeasuredValueWindow: 'typing.Optional[uint]' = None - uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[OzoneConcentrationMeasurement.Enums.LevelValueEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + measuredValue: typing.Union[None, Nullable, float32] = None + minMeasuredValue: typing.Union[None, Nullable, float32] = None + maxMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValueWindow: typing.Optional[uint] = None + averageMeasuredValue: typing.Union[None, Nullable, float32] = None + averageMeasuredValueWindow: typing.Optional[uint] = None + uncertainty: typing.Optional[float32] = None + measurementUnit: typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementUnitEnum] = None + measurementMedium: typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementMediumEnum] = None + levelValue: typing.Optional[OzoneConcentrationMeasurement.Enums.LevelValueEnum] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class LevelValueEnum(MatterIntEnum): @@ -38895,7 +37134,7 @@ class LevelValueEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class MeasurementMediumEnum(MatterIntEnum): kAir = 0x00 @@ -38905,7 +37144,7 @@ class MeasurementMediumEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class MeasurementUnitEnum(MatterIntEnum): kPpm = 0x00 @@ -38920,7 +37159,7 @@ class MeasurementUnitEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 8, + kUnknownEnumValue = 8 class Bitmaps: class Feature(IntFlag): @@ -38946,7 +37185,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MinMeasuredValue(ClusterAttributeDescriptor): @@ -38962,7 +37201,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MaxMeasuredValue(ClusterAttributeDescriptor): @@ -38978,7 +37217,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValue(ClusterAttributeDescriptor): @@ -38994,7 +37233,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @@ -39010,7 +37249,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class AverageMeasuredValue(ClusterAttributeDescriptor): @@ -39026,7 +37265,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @@ -39042,7 +37281,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Uncertainty(ClusterAttributeDescriptor): @@ -39058,7 +37297,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[float32]) - value: 'typing.Optional[float32]' = None + value: typing.Optional[float32] = None @dataclass class MeasurementUnit(ClusterAttributeDescriptor): @@ -39074,7 +37313,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + value: typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementUnitEnum] = None @dataclass class MeasurementMedium(ClusterAttributeDescriptor): @@ -39090,7 +37329,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + value: typing.Optional[OzoneConcentrationMeasurement.Enums.MeasurementMediumEnum] = None @dataclass class LevelValue(ClusterAttributeDescriptor): @@ -39106,7 +37345,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[OzoneConcentrationMeasurement.Enums.LevelValueEnum]) - value: 'typing.Optional[OzoneConcentrationMeasurement.Enums.LevelValueEnum]' = None + value: typing.Optional[OzoneConcentrationMeasurement.Enums.LevelValueEnum] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -39122,7 +37361,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -39138,23 +37377,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000415 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -39170,7 +37393,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -39186,7 +37409,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -39202,7 +37425,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -39226,29 +37449,27 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[Pm25ConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[None, Nullable, float32]' = None - minMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - maxMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValueWindow: 'typing.Optional[uint]' = None - averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - averageMeasuredValueWindow: 'typing.Optional[uint]' = None - uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[Pm25ConcentrationMeasurement.Enums.LevelValueEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + measuredValue: typing.Union[None, Nullable, float32] = None + minMeasuredValue: typing.Union[None, Nullable, float32] = None + maxMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValueWindow: typing.Optional[uint] = None + averageMeasuredValue: typing.Union[None, Nullable, float32] = None + averageMeasuredValueWindow: typing.Optional[uint] = None + uncertainty: typing.Optional[float32] = None + measurementUnit: typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementUnitEnum] = None + measurementMedium: typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementMediumEnum] = None + levelValue: typing.Optional[Pm25ConcentrationMeasurement.Enums.LevelValueEnum] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class LevelValueEnum(MatterIntEnum): @@ -39261,7 +37482,7 @@ class LevelValueEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class MeasurementMediumEnum(MatterIntEnum): kAir = 0x00 @@ -39271,7 +37492,7 @@ class MeasurementMediumEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class MeasurementUnitEnum(MatterIntEnum): kPpm = 0x00 @@ -39286,7 +37507,7 @@ class MeasurementUnitEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 8, + kUnknownEnumValue = 8 class Bitmaps: class Feature(IntFlag): @@ -39312,7 +37533,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MinMeasuredValue(ClusterAttributeDescriptor): @@ -39328,7 +37549,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MaxMeasuredValue(ClusterAttributeDescriptor): @@ -39344,7 +37565,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValue(ClusterAttributeDescriptor): @@ -39360,7 +37581,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @@ -39376,7 +37597,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class AverageMeasuredValue(ClusterAttributeDescriptor): @@ -39392,7 +37613,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @@ -39408,7 +37629,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Uncertainty(ClusterAttributeDescriptor): @@ -39424,7 +37645,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[float32]) - value: 'typing.Optional[float32]' = None + value: typing.Optional[float32] = None @dataclass class MeasurementUnit(ClusterAttributeDescriptor): @@ -39440,7 +37661,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + value: typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementUnitEnum] = None @dataclass class MeasurementMedium(ClusterAttributeDescriptor): @@ -39456,7 +37677,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + value: typing.Optional[Pm25ConcentrationMeasurement.Enums.MeasurementMediumEnum] = None @dataclass class LevelValue(ClusterAttributeDescriptor): @@ -39472,7 +37693,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm25ConcentrationMeasurement.Enums.LevelValueEnum]) - value: 'typing.Optional[Pm25ConcentrationMeasurement.Enums.LevelValueEnum]' = None + value: typing.Optional[Pm25ConcentrationMeasurement.Enums.LevelValueEnum] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -39488,7 +37709,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -39504,23 +37725,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042A - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -39536,7 +37741,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -39552,7 +37757,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -39568,7 +37773,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -39592,29 +37797,27 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[FormaldehydeConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[None, Nullable, float32]' = None - minMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - maxMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValueWindow: 'typing.Optional[uint]' = None - averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - averageMeasuredValueWindow: 'typing.Optional[uint]' = None - uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[FormaldehydeConcentrationMeasurement.Enums.LevelValueEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + measuredValue: typing.Union[None, Nullable, float32] = None + minMeasuredValue: typing.Union[None, Nullable, float32] = None + maxMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValueWindow: typing.Optional[uint] = None + averageMeasuredValue: typing.Union[None, Nullable, float32] = None + averageMeasuredValueWindow: typing.Optional[uint] = None + uncertainty: typing.Optional[float32] = None + measurementUnit: typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementUnitEnum] = None + measurementMedium: typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementMediumEnum] = None + levelValue: typing.Optional[FormaldehydeConcentrationMeasurement.Enums.LevelValueEnum] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class LevelValueEnum(MatterIntEnum): @@ -39627,7 +37830,7 @@ class LevelValueEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class MeasurementMediumEnum(MatterIntEnum): kAir = 0x00 @@ -39637,7 +37840,7 @@ class MeasurementMediumEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class MeasurementUnitEnum(MatterIntEnum): kPpm = 0x00 @@ -39652,7 +37855,7 @@ class MeasurementUnitEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 8, + kUnknownEnumValue = 8 class Bitmaps: class Feature(IntFlag): @@ -39678,7 +37881,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MinMeasuredValue(ClusterAttributeDescriptor): @@ -39694,7 +37897,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MaxMeasuredValue(ClusterAttributeDescriptor): @@ -39710,7 +37913,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValue(ClusterAttributeDescriptor): @@ -39726,7 +37929,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @@ -39742,7 +37945,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class AverageMeasuredValue(ClusterAttributeDescriptor): @@ -39758,7 +37961,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @@ -39774,7 +37977,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Uncertainty(ClusterAttributeDescriptor): @@ -39790,7 +37993,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[float32]) - value: 'typing.Optional[float32]' = None + value: typing.Optional[float32] = None @dataclass class MeasurementUnit(ClusterAttributeDescriptor): @@ -39806,7 +38009,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + value: typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementUnitEnum] = None @dataclass class MeasurementMedium(ClusterAttributeDescriptor): @@ -39822,7 +38025,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + value: typing.Optional[FormaldehydeConcentrationMeasurement.Enums.MeasurementMediumEnum] = None @dataclass class LevelValue(ClusterAttributeDescriptor): @@ -39838,7 +38041,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[FormaldehydeConcentrationMeasurement.Enums.LevelValueEnum]) - value: 'typing.Optional[FormaldehydeConcentrationMeasurement.Enums.LevelValueEnum]' = None + value: typing.Optional[FormaldehydeConcentrationMeasurement.Enums.LevelValueEnum] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -39854,7 +38057,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -39870,23 +38073,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042B - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -39902,7 +38089,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -39918,7 +38105,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -39934,7 +38121,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -39958,29 +38145,27 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[Pm1ConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[None, Nullable, float32]' = None - minMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - maxMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValueWindow: 'typing.Optional[uint]' = None - averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - averageMeasuredValueWindow: 'typing.Optional[uint]' = None - uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[Pm1ConcentrationMeasurement.Enums.LevelValueEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + measuredValue: typing.Union[None, Nullable, float32] = None + minMeasuredValue: typing.Union[None, Nullable, float32] = None + maxMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValueWindow: typing.Optional[uint] = None + averageMeasuredValue: typing.Union[None, Nullable, float32] = None + averageMeasuredValueWindow: typing.Optional[uint] = None + uncertainty: typing.Optional[float32] = None + measurementUnit: typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementUnitEnum] = None + measurementMedium: typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementMediumEnum] = None + levelValue: typing.Optional[Pm1ConcentrationMeasurement.Enums.LevelValueEnum] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class LevelValueEnum(MatterIntEnum): @@ -39993,7 +38178,7 @@ class LevelValueEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class MeasurementMediumEnum(MatterIntEnum): kAir = 0x00 @@ -40003,7 +38188,7 @@ class MeasurementMediumEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class MeasurementUnitEnum(MatterIntEnum): kPpm = 0x00 @@ -40018,7 +38203,7 @@ class MeasurementUnitEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 8, + kUnknownEnumValue = 8 class Bitmaps: class Feature(IntFlag): @@ -40044,7 +38229,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MinMeasuredValue(ClusterAttributeDescriptor): @@ -40060,7 +38245,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MaxMeasuredValue(ClusterAttributeDescriptor): @@ -40076,7 +38261,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValue(ClusterAttributeDescriptor): @@ -40092,7 +38277,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @@ -40108,7 +38293,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class AverageMeasuredValue(ClusterAttributeDescriptor): @@ -40124,7 +38309,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @@ -40140,7 +38325,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Uncertainty(ClusterAttributeDescriptor): @@ -40156,7 +38341,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[float32]) - value: 'typing.Optional[float32]' = None + value: typing.Optional[float32] = None @dataclass class MeasurementUnit(ClusterAttributeDescriptor): @@ -40172,7 +38357,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + value: typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementUnitEnum] = None @dataclass class MeasurementMedium(ClusterAttributeDescriptor): @@ -40188,7 +38373,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + value: typing.Optional[Pm1ConcentrationMeasurement.Enums.MeasurementMediumEnum] = None @dataclass class LevelValue(ClusterAttributeDescriptor): @@ -40204,7 +38389,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm1ConcentrationMeasurement.Enums.LevelValueEnum]) - value: 'typing.Optional[Pm1ConcentrationMeasurement.Enums.LevelValueEnum]' = None + value: typing.Optional[Pm1ConcentrationMeasurement.Enums.LevelValueEnum] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -40220,7 +38405,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -40236,23 +38421,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042C - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -40268,7 +38437,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -40284,7 +38453,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -40300,7 +38469,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -40324,29 +38493,27 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[Pm10ConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[None, Nullable, float32]' = None - minMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - maxMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValueWindow: 'typing.Optional[uint]' = None - averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - averageMeasuredValueWindow: 'typing.Optional[uint]' = None - uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[Pm10ConcentrationMeasurement.Enums.LevelValueEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + measuredValue: typing.Union[None, Nullable, float32] = None + minMeasuredValue: typing.Union[None, Nullable, float32] = None + maxMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValueWindow: typing.Optional[uint] = None + averageMeasuredValue: typing.Union[None, Nullable, float32] = None + averageMeasuredValueWindow: typing.Optional[uint] = None + uncertainty: typing.Optional[float32] = None + measurementUnit: typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementUnitEnum] = None + measurementMedium: typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementMediumEnum] = None + levelValue: typing.Optional[Pm10ConcentrationMeasurement.Enums.LevelValueEnum] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class LevelValueEnum(MatterIntEnum): @@ -40359,7 +38526,7 @@ class LevelValueEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class MeasurementMediumEnum(MatterIntEnum): kAir = 0x00 @@ -40369,7 +38536,7 @@ class MeasurementMediumEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class MeasurementUnitEnum(MatterIntEnum): kPpm = 0x00 @@ -40384,7 +38551,7 @@ class MeasurementUnitEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 8, + kUnknownEnumValue = 8 class Bitmaps: class Feature(IntFlag): @@ -40410,7 +38577,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MinMeasuredValue(ClusterAttributeDescriptor): @@ -40426,7 +38593,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MaxMeasuredValue(ClusterAttributeDescriptor): @@ -40442,7 +38609,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValue(ClusterAttributeDescriptor): @@ -40458,7 +38625,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @@ -40474,7 +38641,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class AverageMeasuredValue(ClusterAttributeDescriptor): @@ -40490,7 +38657,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @@ -40506,7 +38673,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Uncertainty(ClusterAttributeDescriptor): @@ -40522,7 +38689,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[float32]) - value: 'typing.Optional[float32]' = None + value: typing.Optional[float32] = None @dataclass class MeasurementUnit(ClusterAttributeDescriptor): @@ -40538,7 +38705,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + value: typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementUnitEnum] = None @dataclass class MeasurementMedium(ClusterAttributeDescriptor): @@ -40554,7 +38721,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + value: typing.Optional[Pm10ConcentrationMeasurement.Enums.MeasurementMediumEnum] = None @dataclass class LevelValue(ClusterAttributeDescriptor): @@ -40570,7 +38737,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[Pm10ConcentrationMeasurement.Enums.LevelValueEnum]) - value: 'typing.Optional[Pm10ConcentrationMeasurement.Enums.LevelValueEnum]' = None + value: typing.Optional[Pm10ConcentrationMeasurement.Enums.LevelValueEnum] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -40586,7 +38753,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -40602,23 +38769,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042D - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -40634,7 +38785,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -40650,7 +38801,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -40666,7 +38817,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -40690,29 +38841,27 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[None, Nullable, float32]' = None - minMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - maxMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValueWindow: 'typing.Optional[uint]' = None - averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - averageMeasuredValueWindow: 'typing.Optional[uint]' = None - uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.LevelValueEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + measuredValue: typing.Union[None, Nullable, float32] = None + minMeasuredValue: typing.Union[None, Nullable, float32] = None + maxMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValueWindow: typing.Optional[uint] = None + averageMeasuredValue: typing.Union[None, Nullable, float32] = None + averageMeasuredValueWindow: typing.Optional[uint] = None + uncertainty: typing.Optional[float32] = None + measurementUnit: typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementUnitEnum] = None + measurementMedium: typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementMediumEnum] = None + levelValue: typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.LevelValueEnum] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class LevelValueEnum(MatterIntEnum): @@ -40725,7 +38874,7 @@ class LevelValueEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class MeasurementMediumEnum(MatterIntEnum): kAir = 0x00 @@ -40735,7 +38884,7 @@ class MeasurementMediumEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class MeasurementUnitEnum(MatterIntEnum): kPpm = 0x00 @@ -40750,7 +38899,7 @@ class MeasurementUnitEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 8, + kUnknownEnumValue = 8 class Bitmaps: class Feature(IntFlag): @@ -40776,7 +38925,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MinMeasuredValue(ClusterAttributeDescriptor): @@ -40792,7 +38941,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MaxMeasuredValue(ClusterAttributeDescriptor): @@ -40808,7 +38957,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValue(ClusterAttributeDescriptor): @@ -40824,7 +38973,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @@ -40840,7 +38989,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class AverageMeasuredValue(ClusterAttributeDescriptor): @@ -40856,7 +39005,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @@ -40872,7 +39021,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Uncertainty(ClusterAttributeDescriptor): @@ -40888,7 +39037,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[float32]) - value: 'typing.Optional[float32]' = None + value: typing.Optional[float32] = None @dataclass class MeasurementUnit(ClusterAttributeDescriptor): @@ -40904,7 +39053,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + value: typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementUnitEnum] = None @dataclass class MeasurementMedium(ClusterAttributeDescriptor): @@ -40920,7 +39069,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + value: typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.MeasurementMediumEnum] = None @dataclass class LevelValue(ClusterAttributeDescriptor): @@ -40936,7 +39085,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.LevelValueEnum]) - value: 'typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.LevelValueEnum]' = None + value: typing.Optional[TotalVolatileOrganicCompoundsConcentrationMeasurement.Enums.LevelValueEnum] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -40952,7 +39101,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -40968,23 +39117,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -41000,7 +39133,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -41016,7 +39149,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -41032,7 +39165,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -41056,29 +39189,27 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="levelValue", Tag=0x0000000A, Type=typing.Optional[RadonConcentrationMeasurement.Enums.LevelValueEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - measuredValue: 'typing.Union[None, Nullable, float32]' = None - minMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - maxMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - peakMeasuredValueWindow: 'typing.Optional[uint]' = None - averageMeasuredValue: 'typing.Union[None, Nullable, float32]' = None - averageMeasuredValueWindow: 'typing.Optional[uint]' = None - uncertainty: 'typing.Optional[float32]' = None - measurementUnit: 'typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None - measurementMedium: 'typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None - levelValue: 'typing.Optional[RadonConcentrationMeasurement.Enums.LevelValueEnum]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + measuredValue: typing.Union[None, Nullable, float32] = None + minMeasuredValue: typing.Union[None, Nullable, float32] = None + maxMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValue: typing.Union[None, Nullable, float32] = None + peakMeasuredValueWindow: typing.Optional[uint] = None + averageMeasuredValue: typing.Union[None, Nullable, float32] = None + averageMeasuredValueWindow: typing.Optional[uint] = None + uncertainty: typing.Optional[float32] = None + measurementUnit: typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementUnitEnum] = None + measurementMedium: typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementMediumEnum] = None + levelValue: typing.Optional[RadonConcentrationMeasurement.Enums.LevelValueEnum] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class LevelValueEnum(MatterIntEnum): @@ -41091,7 +39222,7 @@ class LevelValueEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class MeasurementMediumEnum(MatterIntEnum): kAir = 0x00 @@ -41101,7 +39232,7 @@ class MeasurementMediumEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class MeasurementUnitEnum(MatterIntEnum): kPpm = 0x00 @@ -41116,7 +39247,7 @@ class MeasurementUnitEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 8, + kUnknownEnumValue = 8 class Bitmaps: class Feature(IntFlag): @@ -41142,7 +39273,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MinMeasuredValue(ClusterAttributeDescriptor): @@ -41158,7 +39289,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class MaxMeasuredValue(ClusterAttributeDescriptor): @@ -41174,7 +39305,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValue(ClusterAttributeDescriptor): @@ -41190,7 +39321,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class PeakMeasuredValueWindow(ClusterAttributeDescriptor): @@ -41206,7 +39337,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class AverageMeasuredValue(ClusterAttributeDescriptor): @@ -41222,7 +39353,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, float32]) - value: 'typing.Union[None, Nullable, float32]' = None + value: typing.Union[None, Nullable, float32] = None @dataclass class AverageMeasuredValueWindow(ClusterAttributeDescriptor): @@ -41238,7 +39369,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Uncertainty(ClusterAttributeDescriptor): @@ -41254,7 +39385,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[float32]) - value: 'typing.Optional[float32]' = None + value: typing.Optional[float32] = None @dataclass class MeasurementUnit(ClusterAttributeDescriptor): @@ -41270,7 +39401,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementUnitEnum]) - value: 'typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementUnitEnum]' = None + value: typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementUnitEnum] = None @dataclass class MeasurementMedium(ClusterAttributeDescriptor): @@ -41286,7 +39417,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementMediumEnum]) - value: 'typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementMediumEnum]' = None + value: typing.Optional[RadonConcentrationMeasurement.Enums.MeasurementMediumEnum] = None @dataclass class LevelValue(ClusterAttributeDescriptor): @@ -41302,7 +39433,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[RadonConcentrationMeasurement.Enums.LevelValueEnum]) - value: 'typing.Optional[RadonConcentrationMeasurement.Enums.LevelValueEnum]' = None + value: typing.Optional[RadonConcentrationMeasurement.Enums.LevelValueEnum] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -41318,7 +39449,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -41334,23 +39465,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000042F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -41366,7 +39481,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -41382,7 +39497,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -41398,7 +39513,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -41413,20 +39528,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="passphraseSurrogate", Tag=0x00000001, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - ssid: 'typing.Union[Nullable, bytes]' = None - passphraseSurrogate: 'typing.Union[Nullable, uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + ssid: typing.Union[Nullable, bytes] = NullValue + passphraseSurrogate: typing.Union[Nullable, uint] = NullValue + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Commands: @dataclass @@ -41447,7 +39560,7 @@ class NetworkPassphraseResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000451 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -41456,7 +39569,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="passphrase", Tag=0, Type=bytes), ]) - passphrase: 'bytes' = b"" + passphrase: bytes = b"" class Attributes: @dataclass @@ -41473,7 +39586,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, bytes]) - value: 'typing.Union[Nullable, bytes]' = NullValue + value: typing.Union[Nullable, bytes] = NullValue @dataclass class PassphraseSurrogate(ClusterAttributeDescriptor): @@ -41489,7 +39602,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -41505,7 +39618,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -41521,23 +39634,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000451 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -41553,7 +39650,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -41569,7 +39666,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -41585,7 +39682,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -41604,24 +39701,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="pendingDatasetTimestamp", Tag=0x00000005, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - borderRouterName: 'str' = None - borderAgentID: 'bytes' = None - threadVersion: 'uint' = None - interfaceEnabled: 'bool' = None - activeDatasetTimestamp: 'typing.Union[Nullable, uint]' = None - pendingDatasetTimestamp: 'typing.Union[Nullable, uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + borderRouterName: str = "" + borderAgentID: bytes = b"" + threadVersion: uint = 0 + interfaceEnabled: bool = False + activeDatasetTimestamp: typing.Union[Nullable, uint] = NullValue + pendingDatasetTimestamp: typing.Union[Nullable, uint] = NullValue + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Bitmaps: class Feature(IntFlag): @@ -41659,7 +39754,7 @@ class DatasetResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000452 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -41668,14 +39763,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="dataset", Tag=0, Type=bytes), ]) - dataset: 'bytes' = b"" + dataset: bytes = b"" @dataclass class SetActiveDatasetRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000452 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -41685,15 +39780,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="breadcrumb", Tag=1, Type=typing.Optional[uint]), ]) - activeDataset: 'bytes' = b"" - breadcrumb: 'typing.Optional[uint]' = None + activeDataset: bytes = b"" + breadcrumb: typing.Optional[uint] = None @dataclass class SetPendingDatasetRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000452 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -41702,7 +39797,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="pendingDataset", Tag=0, Type=bytes), ]) - pendingDataset: 'bytes' = b"" + pendingDataset: bytes = b"" class Attributes: @dataclass @@ -41719,7 +39814,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=str) - value: 'str' = "" + value: str = "" @dataclass class BorderAgentID(ClusterAttributeDescriptor): @@ -41735,7 +39830,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bytes) - value: 'bytes' = b"" + value: bytes = b"" @dataclass class ThreadVersion(ClusterAttributeDescriptor): @@ -41751,7 +39846,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class InterfaceEnabled(ClusterAttributeDescriptor): @@ -41767,7 +39862,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class ActiveDatasetTimestamp(ClusterAttributeDescriptor): @@ -41783,7 +39878,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class PendingDatasetTimestamp(ClusterAttributeDescriptor): @@ -41799,7 +39894,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -41815,7 +39910,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -41831,23 +39926,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000452 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -41863,7 +39942,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -41879,7 +39958,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -41895,7 +39974,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -41911,21 +39990,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="threadNetworkTableSize", Tag=0x00000002, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - preferredExtendedPanID: 'typing.Union[Nullable, bytes]' = None - threadNetworks: 'typing.List[ThreadNetworkDirectory.Structs.ThreadNetworkStruct]' = None - threadNetworkTableSize: 'uint' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + preferredExtendedPanID: typing.Union[Nullable, bytes] = NullValue + threadNetworks: typing.List[ThreadNetworkDirectory.Structs.ThreadNetworkStruct] = field(default_factory=lambda: []) + threadNetworkTableSize: uint = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Structs: @dataclass @@ -41951,7 +40028,7 @@ class AddNetwork(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000453 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -41964,14 +40041,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: def must_use_timed_invoke(cls) -> bool: return True - operationalDataset: 'bytes' = b"" + operationalDataset: bytes = b"" @dataclass class RemoveNetwork(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000453 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -41984,7 +40061,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: def must_use_timed_invoke(cls) -> bool: return True - extendedPanID: 'bytes' = b"" + extendedPanID: bytes = b"" @dataclass class GetOperationalDataset(ClusterCommand): @@ -42000,14 +40077,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="extendedPanID", Tag=0, Type=bytes), ]) - extendedPanID: 'bytes' = b"" + extendedPanID: bytes = b"" @dataclass class OperationalDatasetResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000453 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -42016,7 +40093,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="operationalDataset", Tag=0, Type=bytes), ]) - operationalDataset: 'bytes' = b"" + operationalDataset: bytes = b"" class Attributes: @dataclass @@ -42033,7 +40110,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, bytes]) - value: 'typing.Union[Nullable, bytes]' = NullValue + value: typing.Union[Nullable, bytes] = NullValue @dataclass class ThreadNetworks(ClusterAttributeDescriptor): @@ -42049,7 +40126,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[ThreadNetworkDirectory.Structs.ThreadNetworkStruct]) - value: 'typing.List[ThreadNetworkDirectory.Structs.ThreadNetworkStruct]' = field(default_factory=lambda: []) + value: typing.List[ThreadNetworkDirectory.Structs.ThreadNetworkStruct] = field(default_factory=lambda: []) @dataclass class ThreadNetworkTableSize(ClusterAttributeDescriptor): @@ -42065,7 +40142,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -42081,7 +40158,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -42097,23 +40174,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000453 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -42129,7 +40190,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -42145,7 +40206,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -42161,7 +40222,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -42176,20 +40237,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="linkLocalAddress", Tag=0x00000001, Type=typing.Optional[bytes]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - MACAddress: 'typing.Optional[str]' = None - linkLocalAddress: 'typing.Optional[bytes]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + MACAddress: typing.Optional[str] = None + linkLocalAddress: typing.Optional[bytes] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Attributes: @dataclass @@ -42206,7 +40265,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class LinkLocalAddress(ClusterAttributeDescriptor): @@ -42222,7 +40281,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bytes]) - value: 'typing.Optional[bytes]' = None + value: typing.Optional[bytes] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -42238,7 +40297,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -42254,23 +40313,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000503 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -42286,7 +40329,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -42302,7 +40345,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -42318,7 +40361,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -42334,21 +40377,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="currentChannel", Tag=0x00000002, Type=typing.Union[None, Nullable, Channel.Structs.ChannelInfoStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - channelList: 'typing.Optional[typing.List[Channel.Structs.ChannelInfoStruct]]' = None - lineup: 'typing.Union[None, Nullable, Channel.Structs.LineupInfoStruct]' = None - currentChannel: 'typing.Union[None, Nullable, Channel.Structs.ChannelInfoStruct]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + channelList: typing.Optional[typing.List[Channel.Structs.ChannelInfoStruct]] = None + lineup: typing.Union[None, Nullable, Channel.Structs.LineupInfoStruct] = None + currentChannel: typing.Union[None, Nullable, Channel.Structs.ChannelInfoStruct] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ChannelTypeEnum(MatterIntEnum): @@ -42360,7 +40401,7 @@ class ChannelTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class LineupInfoTypeEnum(MatterIntEnum): kMso = 0x00 @@ -42368,7 +40409,7 @@ class LineupInfoTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 1, + kUnknownEnumValue = 1 class StatusEnum(MatterIntEnum): kSuccess = 0x00 @@ -42378,7 +40419,7 @@ class StatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class Bitmaps: class Feature(IntFlag): @@ -42575,14 +40616,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="match", Tag=0, Type=str), ]) - match: 'str' = "" + match: str = "" @dataclass class ChangeChannelResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000504 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -42592,15 +40633,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[str]), ]) - status: 'Channel.Enums.StatusEnum' = 0 - data: 'typing.Optional[str]' = None + status: Channel.Enums.StatusEnum = 0 + data: typing.Optional[str] = None @dataclass class ChangeChannelByNumber(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000504 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -42610,15 +40651,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="minorNumber", Tag=1, Type=uint), ]) - majorNumber: 'uint' = 0 - minorNumber: 'uint' = 0 + majorNumber: uint = 0 + minorNumber: uint = 0 @dataclass class SkipChannel(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000504 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -42627,7 +40668,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="count", Tag=0, Type=int), ]) - count: 'int' = 0 + count: int = 0 @dataclass class GetProgramGuide(ClusterCommand): @@ -42649,20 +40690,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="data", Tag=6, Type=typing.Optional[bytes]), ]) - startTime: 'typing.Optional[uint]' = None - endTime: 'typing.Optional[uint]' = None - channelList: 'typing.Optional[typing.List[Channel.Structs.ChannelInfoStruct]]' = None - pageToken: 'typing.Optional[Channel.Structs.PageTokenStruct]' = None - recordingFlag: 'typing.Optional[uint]' = None - externalIDList: 'typing.Optional[typing.List[Channel.Structs.AdditionalInfoStruct]]' = None - data: 'typing.Optional[bytes]' = None + startTime: typing.Optional[uint] = None + endTime: typing.Optional[uint] = None + channelList: typing.Optional[typing.List[Channel.Structs.ChannelInfoStruct]] = None + pageToken: typing.Optional[Channel.Structs.PageTokenStruct] = None + recordingFlag: typing.Optional[uint] = None + externalIDList: typing.Optional[typing.List[Channel.Structs.AdditionalInfoStruct]] = None + data: typing.Optional[bytes] = None @dataclass class ProgramGuideResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000504 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -42672,15 +40713,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="programList", Tag=1, Type=typing.List[Channel.Structs.ProgramStruct]), ]) - paging: 'Channel.Structs.ChannelPagingStruct' = field(default_factory=lambda: Channel.Structs.ChannelPagingStruct()) - programList: 'typing.List[Channel.Structs.ProgramStruct]' = field(default_factory=lambda: []) + paging: Channel.Structs.ChannelPagingStruct = field(default_factory=lambda: Channel.Structs.ChannelPagingStruct()) + programList: typing.List[Channel.Structs.ProgramStruct] = field(default_factory=lambda: []) @dataclass class RecordProgram(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000504 command_id: typing.ClassVar[int] = 0x00000006 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -42692,17 +40733,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="data", Tag=3, Type=bytes), ]) - programIdentifier: 'str' = "" - shouldRecordSeries: 'bool' = False - externalIDList: 'typing.List[Channel.Structs.AdditionalInfoStruct]' = field(default_factory=lambda: []) - data: 'bytes' = b"" + programIdentifier: str = "" + shouldRecordSeries: bool = False + externalIDList: typing.List[Channel.Structs.AdditionalInfoStruct] = field(default_factory=lambda: []) + data: bytes = b"" @dataclass class CancelRecordProgram(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000504 command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -42714,10 +40755,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="data", Tag=3, Type=bytes), ]) - programIdentifier: 'str' = "" - shouldRecordSeries: 'bool' = False - externalIDList: 'typing.List[Channel.Structs.AdditionalInfoStruct]' = field(default_factory=lambda: []) - data: 'bytes' = b"" + programIdentifier: str = "" + shouldRecordSeries: bool = False + externalIDList: typing.List[Channel.Structs.AdditionalInfoStruct] = field(default_factory=lambda: []) + data: bytes = b"" class Attributes: @dataclass @@ -42734,7 +40775,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[Channel.Structs.ChannelInfoStruct]]) - value: 'typing.Optional[typing.List[Channel.Structs.ChannelInfoStruct]]' = None + value: typing.Optional[typing.List[Channel.Structs.ChannelInfoStruct]] = None @dataclass class Lineup(ClusterAttributeDescriptor): @@ -42750,7 +40791,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, Channel.Structs.LineupInfoStruct]) - value: 'typing.Union[None, Nullable, Channel.Structs.LineupInfoStruct]' = None + value: typing.Union[None, Nullable, Channel.Structs.LineupInfoStruct] = None @dataclass class CurrentChannel(ClusterAttributeDescriptor): @@ -42766,7 +40807,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, Channel.Structs.ChannelInfoStruct]) - value: 'typing.Union[None, Nullable, Channel.Structs.ChannelInfoStruct]' = None + value: typing.Union[None, Nullable, Channel.Structs.ChannelInfoStruct] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -42782,7 +40823,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -42798,23 +40839,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000504 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -42830,7 +40855,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -42846,7 +40871,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -42862,7 +40887,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -42877,20 +40902,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="currentTarget", Tag=0x00000001, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - targetList: 'typing.List[TargetNavigator.Structs.TargetInfoStruct]' = None - currentTarget: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + targetList: typing.List[TargetNavigator.Structs.TargetInfoStruct] = field(default_factory=lambda: []) + currentTarget: typing.Optional[uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class StatusEnum(MatterIntEnum): @@ -42901,7 +40924,7 @@ class StatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class Structs: @dataclass @@ -42933,15 +40956,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[str]), ]) - target: 'uint' = 0 - data: 'typing.Optional[str]' = None + target: uint = 0 + data: typing.Optional[str] = None @dataclass class NavigateTargetResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000505 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -42951,8 +40974,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[str]), ]) - status: 'TargetNavigator.Enums.StatusEnum' = 0 - data: 'typing.Optional[str]' = None + status: TargetNavigator.Enums.StatusEnum = 0 + data: typing.Optional[str] = None class Attributes: @dataclass @@ -42969,7 +40992,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[TargetNavigator.Structs.TargetInfoStruct]) - value: 'typing.List[TargetNavigator.Structs.TargetInfoStruct]' = field(default_factory=lambda: []) + value: typing.List[TargetNavigator.Structs.TargetInfoStruct] = field(default_factory=lambda: []) @dataclass class CurrentTarget(ClusterAttributeDescriptor): @@ -42985,7 +41008,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -43001,7 +41024,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -43017,23 +41040,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000505 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -43049,7 +41056,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -43065,7 +41072,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -43081,7 +41088,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -43103,9 +41110,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="data", Tag=2, Type=bytes), ]) - targetList: 'typing.List[TargetNavigator.Structs.TargetInfoStruct]' = field(default_factory=lambda: []) - currentTarget: 'uint' = 0 - data: 'bytes' = b"" + targetList: typing.List[TargetNavigator.Structs.TargetInfoStruct] = field(default_factory=lambda: []) + currentTarget: uint = 0 + data: bytes = b"" @dataclass @@ -43129,29 +41136,27 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="availableTextTracks", Tag=0x0000000A, Type=typing.Union[None, Nullable, typing.List[MediaPlayback.Structs.TrackStruct]]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - currentState: 'MediaPlayback.Enums.PlaybackStateEnum' = None - startTime: 'typing.Union[None, Nullable, uint]' = None - duration: 'typing.Union[None, Nullable, uint]' = None - sampledPosition: 'typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPositionStruct]' = None - playbackSpeed: 'typing.Optional[float32]' = None - seekRangeEnd: 'typing.Union[None, Nullable, uint]' = None - seekRangeStart: 'typing.Union[None, Nullable, uint]' = None - activeAudioTrack: 'typing.Union[None, Nullable, MediaPlayback.Structs.TrackStruct]' = None - availableAudioTracks: 'typing.Union[None, Nullable, typing.List[MediaPlayback.Structs.TrackStruct]]' = None - activeTextTrack: 'typing.Union[None, Nullable, MediaPlayback.Structs.TrackStruct]' = None - availableTextTracks: 'typing.Union[None, Nullable, typing.List[MediaPlayback.Structs.TrackStruct]]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + currentState: MediaPlayback.Enums.PlaybackStateEnum = 0 + startTime: typing.Union[None, Nullable, uint] = None + duration: typing.Union[None, Nullable, uint] = None + sampledPosition: typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPositionStruct] = None + playbackSpeed: typing.Optional[float32] = None + seekRangeEnd: typing.Union[None, Nullable, uint] = None + seekRangeStart: typing.Union[None, Nullable, uint] = None + activeAudioTrack: typing.Union[None, Nullable, MediaPlayback.Structs.TrackStruct] = None + availableAudioTracks: typing.Union[None, Nullable, typing.List[MediaPlayback.Structs.TrackStruct]] = None + activeTextTrack: typing.Union[None, Nullable, MediaPlayback.Structs.TrackStruct] = None + availableTextTracks: typing.Union[None, Nullable, typing.List[MediaPlayback.Structs.TrackStruct]] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class CharacteristicEnum(MatterIntEnum): @@ -43177,7 +41182,7 @@ class CharacteristicEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 18, + kUnknownEnumValue = 18 class PlaybackStateEnum(MatterIntEnum): kPlaying = 0x00 @@ -43188,7 +41193,7 @@ class PlaybackStateEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class StatusEnum(MatterIntEnum): kSuccess = 0x00 @@ -43201,7 +41206,7 @@ class StatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 6, + kUnknownEnumValue = 6 class Bitmaps: class Feature(IntFlag): @@ -43344,7 +41349,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="audioAdvanceUnmuted", Tag=0, Type=typing.Optional[bool]), ]) - audioAdvanceUnmuted: 'typing.Optional[bool]' = None + audioAdvanceUnmuted: typing.Optional[bool] = None @dataclass class FastForward(ClusterCommand): @@ -43360,7 +41365,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="audioAdvanceUnmuted", Tag=0, Type=typing.Optional[bool]), ]) - audioAdvanceUnmuted: 'typing.Optional[bool]' = None + audioAdvanceUnmuted: typing.Optional[bool] = None @dataclass class SkipForward(ClusterCommand): @@ -43376,7 +41381,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="deltaPositionMilliseconds", Tag=0, Type=uint), ]) - deltaPositionMilliseconds: 'uint' = 0 + deltaPositionMilliseconds: uint = 0 @dataclass class SkipBackward(ClusterCommand): @@ -43392,14 +41397,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="deltaPositionMilliseconds", Tag=0, Type=uint), ]) - deltaPositionMilliseconds: 'uint' = 0 + deltaPositionMilliseconds: uint = 0 @dataclass class PlaybackResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000506 command_id: typing.ClassVar[int] = 0x0000000A is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -43409,8 +41414,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[str]), ]) - status: 'MediaPlayback.Enums.StatusEnum' = 0 - data: 'typing.Optional[str]' = None + status: MediaPlayback.Enums.StatusEnum = 0 + data: typing.Optional[str] = None @dataclass class Seek(ClusterCommand): @@ -43426,14 +41431,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="position", Tag=0, Type=uint), ]) - position: 'uint' = 0 + position: uint = 0 @dataclass class ActivateAudioTrack(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000506 command_id: typing.ClassVar[int] = 0x0000000C is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -43443,15 +41448,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="audioOutputIndex", Tag=1, Type=uint), ]) - trackID: 'str' = "" - audioOutputIndex: 'uint' = 0 + trackID: str = "" + audioOutputIndex: uint = 0 @dataclass class ActivateTextTrack(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000506 command_id: typing.ClassVar[int] = 0x0000000D is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -43460,14 +41465,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="trackID", Tag=0, Type=str), ]) - trackID: 'str' = "" + trackID: str = "" @dataclass class DeactivateTextTrack(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000506 command_id: typing.ClassVar[int] = 0x0000000E is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -43490,7 +41495,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=MediaPlayback.Enums.PlaybackStateEnum) - value: 'MediaPlayback.Enums.PlaybackStateEnum' = 0 + value: MediaPlayback.Enums.PlaybackStateEnum = 0 @dataclass class StartTime(ClusterAttributeDescriptor): @@ -43506,7 +41511,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class Duration(ClusterAttributeDescriptor): @@ -43522,7 +41527,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class SampledPosition(ClusterAttributeDescriptor): @@ -43538,7 +41543,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPositionStruct]) - value: 'typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPositionStruct]' = None + value: typing.Union[None, Nullable, MediaPlayback.Structs.PlaybackPositionStruct] = None @dataclass class PlaybackSpeed(ClusterAttributeDescriptor): @@ -43554,7 +41559,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[float32]) - value: 'typing.Optional[float32]' = None + value: typing.Optional[float32] = None @dataclass class SeekRangeEnd(ClusterAttributeDescriptor): @@ -43570,7 +41575,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class SeekRangeStart(ClusterAttributeDescriptor): @@ -43586,7 +41591,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Union[None, Nullable, uint]' = None + value: typing.Union[None, Nullable, uint] = None @dataclass class ActiveAudioTrack(ClusterAttributeDescriptor): @@ -43602,7 +41607,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, MediaPlayback.Structs.TrackStruct]) - value: 'typing.Union[None, Nullable, MediaPlayback.Structs.TrackStruct]' = None + value: typing.Union[None, Nullable, MediaPlayback.Structs.TrackStruct] = None @dataclass class AvailableAudioTracks(ClusterAttributeDescriptor): @@ -43618,7 +41623,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, typing.List[MediaPlayback.Structs.TrackStruct]]) - value: 'typing.Union[None, Nullable, typing.List[MediaPlayback.Structs.TrackStruct]]' = None + value: typing.Union[None, Nullable, typing.List[MediaPlayback.Structs.TrackStruct]] = None @dataclass class ActiveTextTrack(ClusterAttributeDescriptor): @@ -43634,7 +41639,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, MediaPlayback.Structs.TrackStruct]) - value: 'typing.Union[None, Nullable, MediaPlayback.Structs.TrackStruct]' = None + value: typing.Union[None, Nullable, MediaPlayback.Structs.TrackStruct] = None @dataclass class AvailableTextTracks(ClusterAttributeDescriptor): @@ -43650,7 +41655,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, typing.List[MediaPlayback.Structs.TrackStruct]]) - value: 'typing.Union[None, Nullable, typing.List[MediaPlayback.Structs.TrackStruct]]' = None + value: typing.Union[None, Nullable, typing.List[MediaPlayback.Structs.TrackStruct]] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -43666,7 +41671,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -43682,23 +41687,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000506 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -43714,7 +41703,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -43730,7 +41719,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -43746,7 +41735,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -43774,15 +41763,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="audioAdvanceUnmuted", Tag=8, Type=bool), ]) - currentState: 'MediaPlayback.Enums.PlaybackStateEnum' = 0 - startTime: 'uint' = 0 - duration: 'uint' = 0 - sampledPosition: 'MediaPlayback.Structs.PlaybackPositionStruct' = field(default_factory=lambda: MediaPlayback.Structs.PlaybackPositionStruct()) - playbackSpeed: 'float32' = 0.0 - seekRangeEnd: 'uint' = 0 - seekRangeStart: 'uint' = 0 - data: 'typing.Optional[bytes]' = None - audioAdvanceUnmuted: 'bool' = False + currentState: MediaPlayback.Enums.PlaybackStateEnum = 0 + startTime: uint = 0 + duration: uint = 0 + sampledPosition: MediaPlayback.Structs.PlaybackPositionStruct = field(default_factory=lambda: MediaPlayback.Structs.PlaybackPositionStruct()) + playbackSpeed: float32 = 0.0 + seekRangeEnd: uint = 0 + seekRangeStart: uint = 0 + data: typing.Optional[bytes] = None + audioAdvanceUnmuted: bool = False @dataclass @@ -43797,20 +41786,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="currentInput", Tag=0x00000001, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - inputList: 'typing.List[MediaInput.Structs.InputInfoStruct]' = None - currentInput: 'uint' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + inputList: typing.List[MediaInput.Structs.InputInfoStruct] = field(default_factory=lambda: []) + currentInput: uint = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class InputTypeEnum(MatterIntEnum): @@ -43830,7 +41817,7 @@ class InputTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 12, + kUnknownEnumValue = 12 class Bitmaps: class Feature(IntFlag): @@ -43860,7 +41847,7 @@ class SelectInput(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000507 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -43869,14 +41856,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="index", Tag=0, Type=uint), ]) - index: 'uint' = 0 + index: uint = 0 @dataclass class ShowInputStatus(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000507 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -43889,7 +41876,7 @@ class HideInputStatus(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000507 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -43902,7 +41889,7 @@ class RenameInput(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000507 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -43912,8 +41899,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), ]) - index: 'uint' = 0 - name: 'str' = "" + index: uint = 0 + name: str = "" class Attributes: @dataclass @@ -43930,7 +41917,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[MediaInput.Structs.InputInfoStruct]) - value: 'typing.List[MediaInput.Structs.InputInfoStruct]' = field(default_factory=lambda: []) + value: typing.List[MediaInput.Structs.InputInfoStruct] = field(default_factory=lambda: []) @dataclass class CurrentInput(ClusterAttributeDescriptor): @@ -43946,7 +41933,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -43962,7 +41949,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -43978,23 +41965,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000507 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -44010,7 +41981,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -44026,7 +41997,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -44042,7 +42013,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -44055,18 +42026,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Commands: @dataclass @@ -44074,7 +42043,7 @@ class Sleep(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000508 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -44097,7 +42066,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -44113,23 +42082,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000508 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -44145,7 +42098,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -44161,7 +42114,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -44177,7 +42130,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -44190,18 +42143,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class CECKeyCodeEnum(MatterIntEnum): @@ -44295,7 +42246,7 @@ class CECKeyCodeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 14, + kUnknownEnumValue = 14 class StatusEnum(MatterIntEnum): kSuccess = 0x00 @@ -44305,7 +42256,7 @@ class StatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 3 class Bitmaps: class Feature(IntFlag): @@ -44328,14 +42279,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="keyCode", Tag=0, Type=KeypadInput.Enums.CECKeyCodeEnum), ]) - keyCode: 'KeypadInput.Enums.CECKeyCodeEnum' = 0 + keyCode: KeypadInput.Enums.CECKeyCodeEnum = 0 @dataclass class SendKeyResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000509 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -44344,7 +42295,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=KeypadInput.Enums.StatusEnum), ]) - status: 'KeypadInput.Enums.StatusEnum' = 0 + status: KeypadInput.Enums.StatusEnum = 0 class Attributes: @dataclass @@ -44361,7 +42312,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -44377,23 +42328,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000509 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -44409,7 +42344,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -44425,7 +42360,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -44441,7 +42376,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -44456,20 +42391,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="supportedStreamingProtocols", Tag=0x00000001, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - acceptHeader: 'typing.Optional[typing.List[str]]' = None - supportedStreamingProtocols: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + acceptHeader: typing.Optional[typing.List[str]] = None + supportedStreamingProtocols: typing.Optional[uint] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class CharacteristicEnum(MatterIntEnum): @@ -44495,7 +42428,7 @@ class CharacteristicEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 18, + kUnknownEnumValue = 18 class MetricTypeEnum(MatterIntEnum): kPixels = 0x00 @@ -44504,7 +42437,7 @@ class MetricTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class ParameterEnum(MatterIntEnum): kActor = 0x00 @@ -44528,7 +42461,7 @@ class ParameterEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 17, + kUnknownEnumValue = 17 class StatusEnum(MatterIntEnum): kSuccess = 0x00 @@ -44540,7 +42473,7 @@ class StatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class Bitmaps: class Feature(IntFlag): @@ -44694,11 +42627,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="useCurrentContext", Tag=4, Type=typing.Optional[bool]), ]) - search: 'ContentLauncher.Structs.ContentSearchStruct' = field(default_factory=lambda: ContentLauncher.Structs.ContentSearchStruct()) - autoPlay: 'bool' = False - data: 'typing.Optional[str]' = None - playbackPreferences: 'typing.Optional[ContentLauncher.Structs.PlaybackPreferencesStruct]' = None - useCurrentContext: 'typing.Optional[bool]' = None + search: ContentLauncher.Structs.ContentSearchStruct = field(default_factory=lambda: ContentLauncher.Structs.ContentSearchStruct()) + autoPlay: bool = False + data: typing.Optional[str] = None + playbackPreferences: typing.Optional[ContentLauncher.Structs.PlaybackPreferencesStruct] = None + useCurrentContext: typing.Optional[bool] = None @dataclass class LaunchURL(ClusterCommand): @@ -44716,16 +42649,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="brandingInformation", Tag=2, Type=typing.Optional[ContentLauncher.Structs.BrandingInformationStruct]), ]) - contentURL: 'str' = "" - displayString: 'typing.Optional[str]' = None - brandingInformation: 'typing.Optional[ContentLauncher.Structs.BrandingInformationStruct]' = None + contentURL: str = "" + displayString: typing.Optional[str] = None + brandingInformation: typing.Optional[ContentLauncher.Structs.BrandingInformationStruct] = None @dataclass class LauncherResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050A command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -44735,8 +42668,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[str]), ]) - status: 'ContentLauncher.Enums.StatusEnum' = 0 - data: 'typing.Optional[str]' = None + status: ContentLauncher.Enums.StatusEnum = 0 + data: typing.Optional[str] = None class Attributes: @dataclass @@ -44753,7 +42686,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[str]]) - value: 'typing.Optional[typing.List[str]]' = None + value: typing.Optional[typing.List[str]] = None @dataclass class SupportedStreamingProtocols(ClusterAttributeDescriptor): @@ -44769,7 +42702,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -44785,7 +42718,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -44801,23 +42734,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000050A - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -44833,7 +42750,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -44849,7 +42766,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -44865,7 +42782,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -44880,20 +42797,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="currentOutput", Tag=0x00000001, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - outputList: 'typing.List[AudioOutput.Structs.OutputInfoStruct]' = None - currentOutput: 'uint' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + outputList: typing.List[AudioOutput.Structs.OutputInfoStruct] = field(default_factory=lambda: []) + currentOutput: uint = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class OutputTypeEnum(MatterIntEnum): @@ -44907,7 +42822,7 @@ class OutputTypeEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 6, + kUnknownEnumValue = 6 class Bitmaps: class Feature(IntFlag): @@ -44935,7 +42850,7 @@ class SelectOutput(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050B command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -44944,14 +42859,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="index", Tag=0, Type=uint), ]) - index: 'uint' = 0 + index: uint = 0 @dataclass class RenameOutput(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050B command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -44961,8 +42876,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="name", Tag=1, Type=str), ]) - index: 'uint' = 0 - name: 'str' = "" + index: uint = 0 + name: str = "" class Attributes: @dataclass @@ -44979,7 +42894,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[AudioOutput.Structs.OutputInfoStruct]) - value: 'typing.List[AudioOutput.Structs.OutputInfoStruct]' = field(default_factory=lambda: []) + value: typing.List[AudioOutput.Structs.OutputInfoStruct] = field(default_factory=lambda: []) @dataclass class CurrentOutput(ClusterAttributeDescriptor): @@ -44995,7 +42910,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -45011,7 +42926,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -45027,23 +42942,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000050B - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -45059,7 +42958,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -45075,7 +42974,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -45091,7 +42990,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -45106,20 +43005,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="currentApp", Tag=0x00000001, Type=typing.Union[None, Nullable, ApplicationLauncher.Structs.ApplicationEPStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - catalogList: 'typing.Optional[typing.List[uint]]' = None - currentApp: 'typing.Union[None, Nullable, ApplicationLauncher.Structs.ApplicationEPStruct]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + catalogList: typing.Optional[typing.List[uint]] = None + currentApp: typing.Union[None, Nullable, ApplicationLauncher.Structs.ApplicationEPStruct] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class StatusEnum(MatterIntEnum): @@ -45133,7 +43030,7 @@ class StatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 6, + kUnknownEnumValue = 6 class Bitmaps: class Feature(IntFlag): @@ -45182,8 +43079,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[bytes]), ]) - application: 'typing.Optional[ApplicationLauncher.Structs.ApplicationStruct]' = None - data: 'typing.Optional[bytes]' = None + application: typing.Optional[ApplicationLauncher.Structs.ApplicationStruct] = None + data: typing.Optional[bytes] = None @dataclass class StopApp(ClusterCommand): @@ -45199,7 +43096,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="application", Tag=0, Type=typing.Optional[ApplicationLauncher.Structs.ApplicationStruct]), ]) - application: 'typing.Optional[ApplicationLauncher.Structs.ApplicationStruct]' = None + application: typing.Optional[ApplicationLauncher.Structs.ApplicationStruct] = None @dataclass class HideApp(ClusterCommand): @@ -45215,14 +43112,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="application", Tag=0, Type=typing.Optional[ApplicationLauncher.Structs.ApplicationStruct]), ]) - application: 'typing.Optional[ApplicationLauncher.Structs.ApplicationStruct]' = None + application: typing.Optional[ApplicationLauncher.Structs.ApplicationStruct] = None @dataclass class LauncherResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050C command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -45232,8 +43129,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="data", Tag=1, Type=typing.Optional[bytes]), ]) - status: 'ApplicationLauncher.Enums.StatusEnum' = 0 - data: 'typing.Optional[bytes]' = None + status: ApplicationLauncher.Enums.StatusEnum = 0 + data: typing.Optional[bytes] = None class Attributes: @dataclass @@ -45250,7 +43147,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[uint]]) - value: 'typing.Optional[typing.List[uint]]' = None + value: typing.Optional[typing.List[uint]] = None @dataclass class CurrentApp(ClusterAttributeDescriptor): @@ -45266,7 +43163,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, ApplicationLauncher.Structs.ApplicationEPStruct]) - value: 'typing.Union[None, Nullable, ApplicationLauncher.Structs.ApplicationEPStruct]' = None + value: typing.Union[None, Nullable, ApplicationLauncher.Structs.ApplicationEPStruct] = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -45282,7 +43179,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -45298,23 +43195,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000050C - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -45330,7 +43211,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -45346,7 +43227,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -45362,7 +43243,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -45383,26 +43264,24 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="allowedVendorList", Tag=0x00000007, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - vendorName: 'typing.Optional[str]' = None - vendorID: 'typing.Optional[uint]' = None - applicationName: 'str' = None - productID: 'typing.Optional[uint]' = None - application: 'ApplicationBasic.Structs.ApplicationStruct' = None - status: 'ApplicationBasic.Enums.ApplicationStatusEnum' = None - applicationVersion: 'str' = None - allowedVendorList: 'typing.List[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + vendorName: typing.Optional[str] = None + vendorID: typing.Optional[uint] = None + applicationName: str = "" + productID: typing.Optional[uint] = None + application: ApplicationBasic.Structs.ApplicationStruct = field(default_factory=lambda: ApplicationBasic.Structs.ApplicationStruct()) + status: ApplicationBasic.Enums.ApplicationStatusEnum = 0 + applicationVersion: str = "" + allowedVendorList: typing.List[uint] = field(default_factory=lambda: []) + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class ApplicationStatusEnum(MatterIntEnum): @@ -45414,7 +43293,7 @@ class ApplicationStatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class Structs: @dataclass @@ -45445,7 +43324,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class VendorID(ClusterAttributeDescriptor): @@ -45461,7 +43340,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class ApplicationName(ClusterAttributeDescriptor): @@ -45477,7 +43356,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=str) - value: 'str' = "" + value: str = "" @dataclass class ProductID(ClusterAttributeDescriptor): @@ -45493,7 +43372,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class Application(ClusterAttributeDescriptor): @@ -45509,7 +43388,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=ApplicationBasic.Structs.ApplicationStruct) - value: 'ApplicationBasic.Structs.ApplicationStruct' = field(default_factory=lambda: ApplicationBasic.Structs.ApplicationStruct()) + value: ApplicationBasic.Structs.ApplicationStruct = field(default_factory=lambda: ApplicationBasic.Structs.ApplicationStruct()) @dataclass class Status(ClusterAttributeDescriptor): @@ -45525,7 +43404,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=ApplicationBasic.Enums.ApplicationStatusEnum) - value: 'ApplicationBasic.Enums.ApplicationStatusEnum' = 0 + value: ApplicationBasic.Enums.ApplicationStatusEnum = 0 @dataclass class ApplicationVersion(ClusterAttributeDescriptor): @@ -45541,7 +43420,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=str) - value: 'str' = "" + value: str = "" @dataclass class AllowedVendorList(ClusterAttributeDescriptor): @@ -45557,7 +43436,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -45573,7 +43452,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -45589,23 +43468,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000050D - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -45621,7 +43484,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -45637,7 +43500,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -45653,7 +43516,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -45666,18 +43529,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Commands: @dataclass @@ -45698,14 +43559,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: def must_use_timed_invoke(cls) -> bool: return True - tempAccountIdentifier: 'str' = "" + tempAccountIdentifier: str = "" @dataclass class GetSetupPINResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050E command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -45714,14 +43575,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="setupPIN", Tag=0, Type=str), ]) - setupPIN: 'str' = "" + setupPIN: str = "" @dataclass class Login(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050E command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -45736,16 +43597,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: def must_use_timed_invoke(cls) -> bool: return True - tempAccountIdentifier: 'str' = "" - setupPIN: 'str' = "" - node: 'typing.Optional[uint]' = None + tempAccountIdentifier: str = "" + setupPIN: str = "" + node: typing.Optional[uint] = None @dataclass class Logout(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050E command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -45758,7 +43619,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: def must_use_timed_invoke(cls) -> bool: return True - node: 'typing.Optional[uint]' = None + node: typing.Optional[uint] = None class Attributes: @dataclass @@ -45775,7 +43636,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -45791,23 +43652,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000050E - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -45823,7 +43668,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -45839,7 +43684,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -45855,7 +43700,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -45875,7 +43720,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="node", Tag=0, Type=typing.Optional[uint]), ]) - node: 'typing.Optional[uint]' = None + node: typing.Optional[uint] = None @dataclass @@ -45896,26 +43741,24 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="blockUnrated", Tag=0x00000007, Type=bool), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - enabled: 'bool' = None - onDemandRatings: 'typing.Optional[typing.List[ContentControl.Structs.RatingNameStruct]]' = None - onDemandRatingThreshold: 'typing.Optional[str]' = None - scheduledContentRatings: 'typing.Optional[typing.List[ContentControl.Structs.RatingNameStruct]]' = None - scheduledContentRatingThreshold: 'typing.Optional[str]' = None - screenDailyTime: 'typing.Optional[uint]' = None - remainingScreenTime: 'typing.Optional[uint]' = None - blockUnrated: 'bool' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + enabled: bool = False + onDemandRatings: typing.Optional[typing.List[ContentControl.Structs.RatingNameStruct]] = None + onDemandRatingThreshold: typing.Optional[str] = None + scheduledContentRatings: typing.Optional[typing.List[ContentControl.Structs.RatingNameStruct]] = None + scheduledContentRatingThreshold: typing.Optional[str] = None + screenDailyTime: typing.Optional[uint] = None + remainingScreenTime: typing.Optional[uint] = None + blockUnrated: bool = False + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Bitmaps: class Feature(IntFlag): @@ -45945,7 +43788,7 @@ class UpdatePIN(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050F command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -45955,8 +43798,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="newPIN", Tag=1, Type=str), ]) - oldPIN: 'typing.Optional[str]' = None - newPIN: 'str' = "" + oldPIN: typing.Optional[str] = None + newPIN: str = "" @dataclass class ResetPIN(ClusterCommand): @@ -45976,7 +43819,7 @@ class ResetPINResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050F command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -45985,14 +43828,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="PINCode", Tag=0, Type=str), ]) - PINCode: 'str' = "" + PINCode: str = "" @dataclass class Enable(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050F command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -46005,7 +43848,7 @@ class Disable(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050F command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -46018,7 +43861,7 @@ class AddBonusTime(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050F command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -46028,15 +43871,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="bonusTime", Tag=1, Type=typing.Optional[uint]), ]) - PINCode: 'typing.Optional[str]' = None - bonusTime: 'typing.Optional[uint]' = None + PINCode: typing.Optional[str] = None + bonusTime: typing.Optional[uint] = None @dataclass class SetScreenDailyTime(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050F command_id: typing.ClassVar[int] = 0x00000006 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -46045,14 +43888,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="screenTime", Tag=0, Type=uint), ]) - screenTime: 'uint' = 0 + screenTime: uint = 0 @dataclass class BlockUnratedContent(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050F command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -46065,7 +43908,7 @@ class UnblockUnratedContent(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050F command_id: typing.ClassVar[int] = 0x00000008 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -46078,7 +43921,7 @@ class SetOnDemandRatingThreshold(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050F command_id: typing.ClassVar[int] = 0x00000009 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -46087,14 +43930,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="rating", Tag=0, Type=str), ]) - rating: 'str' = "" + rating: str = "" @dataclass class SetScheduledContentRatingThreshold(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000050F command_id: typing.ClassVar[int] = 0x0000000A is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -46103,7 +43946,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="rating", Tag=0, Type=str), ]) - rating: 'str' = "" + rating: str = "" class Attributes: @dataclass @@ -46120,7 +43963,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class OnDemandRatings(ClusterAttributeDescriptor): @@ -46136,7 +43979,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[ContentControl.Structs.RatingNameStruct]]) - value: 'typing.Optional[typing.List[ContentControl.Structs.RatingNameStruct]]' = None + value: typing.Optional[typing.List[ContentControl.Structs.RatingNameStruct]] = None @dataclass class OnDemandRatingThreshold(ClusterAttributeDescriptor): @@ -46152,7 +43995,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class ScheduledContentRatings(ClusterAttributeDescriptor): @@ -46168,7 +44011,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[ContentControl.Structs.RatingNameStruct]]) - value: 'typing.Optional[typing.List[ContentControl.Structs.RatingNameStruct]]' = None + value: typing.Optional[typing.List[ContentControl.Structs.RatingNameStruct]] = None @dataclass class ScheduledContentRatingThreshold(ClusterAttributeDescriptor): @@ -46184,7 +44027,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - value: 'typing.Optional[str]' = None + value: typing.Optional[str] = None @dataclass class ScreenDailyTime(ClusterAttributeDescriptor): @@ -46200,7 +44043,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class RemainingScreenTime(ClusterAttributeDescriptor): @@ -46216,7 +44059,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class BlockUnrated(ClusterAttributeDescriptor): @@ -46232,7 +44075,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -46248,7 +44091,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -46264,23 +44107,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000050F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -46296,7 +44123,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -46312,7 +44139,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -46328,7 +44155,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -46358,18 +44185,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class StatusEnum(MatterIntEnum): @@ -46379,7 +44204,7 @@ class StatusEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 2, + kUnknownEnumValue = 2 class Commands: @dataclass @@ -46397,15 +44222,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="encodingHint", Tag=1, Type=str), ]) - data: 'typing.Optional[str]' = None - encodingHint: 'str' = "" + data: typing.Optional[str] = None + encodingHint: str = "" @dataclass class ContentAppMessageResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000510 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -46416,9 +44241,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="encodingHint", Tag=2, Type=typing.Optional[str]), ]) - status: 'ContentAppObserver.Enums.StatusEnum' = 0 - data: 'typing.Optional[str]' = None - encodingHint: 'typing.Optional[str]' = None + status: ContentAppObserver.Enums.StatusEnum = 0 + data: typing.Optional[str] = None + encodingHint: typing.Optional[str] = None class Attributes: @dataclass @@ -46435,7 +44260,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -46451,23 +44276,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000510 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -46483,7 +44292,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -46499,7 +44308,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -46515,215 +44324,2285 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass -class WebRTCTransportProvider(Cluster): - id: typing.ClassVar[int] = 0x00000553 +class ZoneManagement(Cluster): + id: typing.ClassVar[int] = 0x00000550 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="currentSessions", Tag=0x00000000, Type=typing.List[WebRTCTransportProvider.Structs.WebRTCSessionStruct]), + ClusterObjectFieldDescriptor(Label="supportedZoneSources", Tag=0x00000000, Type=typing.List[ZoneManagement.Enums.ZoneSourceEnum]), + ClusterObjectFieldDescriptor(Label="zones", Tag=0x00000001, Type=typing.Optional[typing.List[ZoneManagement.Structs.ZoneInformationStruct]]), + ClusterObjectFieldDescriptor(Label="timeControl", Tag=0x00000002, Type=typing.List[ZoneManagement.Structs.ZoneTriggeringTimeControlStruct]), + ClusterObjectFieldDescriptor(Label="sensitivity", Tag=0x00000003, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - currentSessions: 'typing.List[WebRTCTransportProvider.Structs.WebRTCSessionStruct]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + supportedZoneSources: typing.List[ZoneManagement.Enums.ZoneSourceEnum] = field(default_factory=lambda: []) + zones: typing.Optional[typing.List[ZoneManagement.Structs.ZoneInformationStruct]] = None + timeControl: typing.List[ZoneManagement.Structs.ZoneTriggeringTimeControlStruct] = field(default_factory=lambda: []) + sensitivity: uint = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: - class StreamTypeEnum(MatterIntEnum): - kInternal = 0x00 - kRecording = 0x01 - kAnalysis = 0x02 - kLiveView = 0x03 + class StatusCodeEnum(MatterIntEnum): + kZoneNotFound = 0x02 + kZoneInUse = 0x03 # 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 an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 0 - class WebRTCEndReasonEnum(MatterIntEnum): - kIceFailed = 0x00 - kIceTimeout = 0x01 - kUserHangup = 0x02 - kUserBusy = 0x03 - kReplaced = 0x04 - kNoUserMedia = 0x05 - kInviteTimeout = 0x06 - kAnsweredElsewhere = 0x07 - kOutOfResources = 0x08 - kMediaTimeout = 0x09 - kLowPower = 0x0A - kUnknownReason = 0x0B + class ZoneEventStoppedReasonEnum(MatterIntEnum): + kActionStopped = 0x00 + kTimeout = 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 an unknown + # enum value. This specific value should never be transmitted. + kUnknownEnumValue = 2 + + class ZoneEventTriggeredReasonEnum(MatterIntEnum): + kMotion = 0x00 + # 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 an unknown + # enum value. This specific value should never be transmitted. + kUnknownEnumValue = 1 + + class ZoneSourceEnum(MatterIntEnum): + kMfg = 0x00 + kUser = 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 an unknown + # enum value. This specific value should never be transmitted. + kUnknownEnumValue = 2 + + class ZoneTypeEnum(MatterIntEnum): + kTwoDCARTZone = 0x00 # 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 an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 12, + kUnknownEnumValue = 1 + + class ZoneUseEnum(MatterIntEnum): + kMotion = 0x00 + kPrivacy = 0x01 + kFocus = 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 an unknown + # enum value. This specific value should never be transmitted. + kUnknownEnumValue = 3 class Bitmaps: - class WebRTCMetadataOptions(IntFlag): - kDataTLV = 0x1 + class Feature(IntFlag): + kTwoDimensionalCartesianZone = 0x1 class Structs: @dataclass - class ICEServerStruct(ClusterObject): + class TwoDCartesianVertexStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="urls", Tag=1, Type=typing.List[str]), - ClusterObjectFieldDescriptor(Label="username", Tag=2, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="credential", Tag=3, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="caid", Tag=4, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="x", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="y", Tag=1, Type=uint), ]) - urls: 'typing.List[str]' = field(default_factory=lambda: []) - username: 'typing.Optional[str]' = None - credential: 'typing.Optional[str]' = None - caid: 'typing.Optional[uint]' = None + x: 'uint' = 0 + y: 'uint' = 0 @dataclass - class WebRTCSessionStruct(ClusterObject): + class TwoDCartesianZoneStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="id", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="peerNodeID", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="peerFabricIndex", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="streamType", Tag=4, Type=WebRTCTransportProvider.Enums.StreamTypeEnum), - ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=5, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=6, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="metadataOptions", Tag=7, Type=uint), + ClusterObjectFieldDescriptor(Label="name", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="use", Tag=1, Type=ZoneManagement.Enums.ZoneUseEnum), + ClusterObjectFieldDescriptor(Label="vertices", Tag=2, Type=typing.List[ZoneManagement.Structs.TwoDCartesianVertexStruct]), + ClusterObjectFieldDescriptor(Label="color", Tag=3, Type=typing.Optional[str]), ]) - id: 'uint' = 0 - peerNodeID: 'uint' = 0 - peerFabricIndex: 'uint' = 0 - streamType: 'WebRTCTransportProvider.Enums.StreamTypeEnum' = 0 - videoStreamID: 'typing.Union[Nullable, uint]' = NullValue - audioStreamID: 'typing.Union[Nullable, uint]' = NullValue - metadataOptions: 'uint' = 0 + name: 'str' = "" + use: 'ZoneManagement.Enums.ZoneUseEnum' = 0 + vertices: 'typing.List[ZoneManagement.Structs.TwoDCartesianVertexStruct]' = field(default_factory=lambda: []) + color: 'typing.Optional[str]' = None + + @dataclass + class ZoneInformationStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="zoneID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="zoneType", Tag=1, Type=ZoneManagement.Enums.ZoneTypeEnum), + ClusterObjectFieldDescriptor(Label="zoneSource", Tag=2, Type=ZoneManagement.Enums.ZoneSourceEnum), + ]) + + zoneID: 'uint' = 0 + zoneType: 'ZoneManagement.Enums.ZoneTypeEnum' = 0 + zoneSource: 'ZoneManagement.Enums.ZoneSourceEnum' = 0 + + @dataclass + class ZoneTriggeringTimeControlStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="initialDuration", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="augmentationDuration", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="maxDuration", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="blindDuration", Tag=3, Type=uint), + ]) + + initialDuration: 'uint' = 0 + augmentationDuration: 'uint' = 0 + maxDuration: 'uint' = 0 + blindDuration: 'uint' = 0 class Commands: @dataclass - class SolicitOffer(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000553 - command_id: typing.ClassVar[int] = 0x00000001 + class CreateTwoDCartesianZone(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000550 + command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'SolicitOfferResponse' + response_type: typing.ClassVar[str] = 'CreateTwoDCartesianZoneResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="streamType", Tag=0, Type=WebRTCTransportProvider.Enums.StreamTypeEnum), - ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=1, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=2, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="ICEServers", Tag=3, Type=typing.Optional[typing.List[WebRTCTransportProvider.Structs.ICEServerStruct]]), - ClusterObjectFieldDescriptor(Label="ICETransportPolicy", Tag=4, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="metadataOptions", Tag=5, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="zone", Tag=0, Type=ZoneManagement.Structs.TwoDCartesianZoneStruct), ]) - streamType: 'WebRTCTransportProvider.Enums.StreamTypeEnum' = 0 - videoStreamID: 'typing.Union[None, Nullable, uint]' = None - audioStreamID: 'typing.Union[None, Nullable, uint]' = None - ICEServers: 'typing.Optional[typing.List[WebRTCTransportProvider.Structs.ICEServerStruct]]' = None - ICETransportPolicy: 'typing.Optional[str]' = None - metadataOptions: 'typing.Optional[uint]' = None + zone: ZoneManagement.Structs.TwoDCartesianZoneStruct = field(default_factory=lambda: ZoneManagement.Structs.TwoDCartesianZoneStruct()) @dataclass - class SolicitOfferResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000553 - command_id: typing.ClassVar[int] = 0x00000002 + class CreateTwoDCartesianZoneResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000550 + command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="webRTCSessionID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="deferredOffer", Tag=1, Type=bool), - ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=2, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=3, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="zoneID", Tag=0, Type=uint), ]) - webRTCSessionID: 'uint' = 0 - deferredOffer: 'bool' = False - videoStreamID: 'typing.Union[None, Nullable, uint]' = None - audioStreamID: 'typing.Union[None, Nullable, uint]' = None + zoneID: uint = 0 @dataclass - class ProvideOffer(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000553 + class UpdateTwoDCartesianZone(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000550 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="zoneID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="zone", Tag=1, Type=ZoneManagement.Structs.TwoDCartesianZoneStruct), + ]) + + zoneID: uint = 0 + zone: ZoneManagement.Structs.TwoDCartesianZoneStruct = field(default_factory=lambda: ZoneManagement.Structs.TwoDCartesianZoneStruct()) + + @dataclass + class GetTwoDCartesianZone(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000550 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'ProvideOfferResponse' + response_type: typing.ClassVar[str] = 'GetTwoDCartesianZoneResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="webRTCSessionID", Tag=0, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="sdp", Tag=1, Type=str), - ClusterObjectFieldDescriptor(Label="streamType", Tag=2, Type=WebRTCTransportProvider.Enums.StreamTypeEnum), - ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=3, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=4, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="ICEServers", Tag=5, Type=typing.Optional[typing.List[WebRTCTransportProvider.Structs.ICEServerStruct]]), - ClusterObjectFieldDescriptor(Label="ICETransportPolicy", Tag=6, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="metadataOptions", Tag=7, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="zoneID", Tag=0, Type=typing.Union[None, Nullable, uint]), ]) - webRTCSessionID: 'typing.Union[Nullable, uint]' = NullValue - sdp: 'str' = "" - streamType: 'WebRTCTransportProvider.Enums.StreamTypeEnum' = 0 - videoStreamID: 'typing.Union[None, Nullable, uint]' = None - audioStreamID: 'typing.Union[None, Nullable, uint]' = None - ICEServers: 'typing.Optional[typing.List[WebRTCTransportProvider.Structs.ICEServerStruct]]' = None - ICETransportPolicy: 'typing.Optional[str]' = None - metadataOptions: 'typing.Optional[uint]' = None + zoneID: typing.Union[None, Nullable, uint] = None @dataclass - class ProvideOfferResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000553 + class GetTwoDCartesianZoneResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000550 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="webRTCSessionID", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="zones", Tag=0, Type=typing.List[ZoneManagement.Structs.TwoDCartesianZoneStruct]), ]) - webRTCSessionID: 'uint' = 0 - videoStreamID: 'uint' = 0 - audioStreamID: 'uint' = 0 + zones: typing.List[ZoneManagement.Structs.TwoDCartesianZoneStruct] = field(default_factory=lambda: []) + + @dataclass + class RemoveZone(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000550 + command_id: typing.ClassVar[int] = 0x00000005 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="zoneID", Tag=0, Type=uint), + ]) + + zoneID: uint = 0 + + class Attributes: + @dataclass + class SupportedZoneSources(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000550 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[ZoneManagement.Enums.ZoneSourceEnum]) + + value: typing.List[ZoneManagement.Enums.ZoneSourceEnum] = field(default_factory=lambda: []) + + @dataclass + class Zones(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000550 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[ZoneManagement.Structs.ZoneInformationStruct]]) + + value: typing.Optional[typing.List[ZoneManagement.Structs.ZoneInformationStruct]] = None + + @dataclass + class TimeControl(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000550 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[ZoneManagement.Structs.ZoneTriggeringTimeControlStruct]) + + value: typing.List[ZoneManagement.Structs.ZoneTriggeringTimeControlStruct] = field(default_factory=lambda: []) + + @dataclass + class Sensitivity(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000550 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: uint = 0 + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000550 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: typing.List[uint] = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000550 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: typing.List[uint] = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000550 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: typing.List[uint] = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000550 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: uint = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000550 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: uint = 0 + + class Events: + @dataclass + class ZoneTriggered(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000550 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="zones", Tag=0, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="reason", Tag=1, Type=ZoneManagement.Enums.ZoneEventTriggeredReasonEnum), + ]) + + zones: typing.List[uint] = field(default_factory=lambda: []) + reason: ZoneManagement.Enums.ZoneEventTriggeredReasonEnum = 0 + + @dataclass + class ZoneStopped(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000550 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="zones", Tag=0, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="reason", Tag=1, Type=ZoneManagement.Enums.ZoneEventStoppedReasonEnum), + ]) + + zones: typing.List[uint] = field(default_factory=lambda: []) + reason: ZoneManagement.Enums.ZoneEventStoppedReasonEnum = 0 + + +@dataclass +class CameraAvStreamManagement(Cluster): + id: typing.ClassVar[int] = 0x00000551 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="maxConcurrentVideoEncoders", Tag=0x00000000, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="maxEncodedPixelRate", Tag=0x00000001, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="videoSensorParams", Tag=0x00000002, Type=typing.Optional[CameraAvStreamManagement.Structs.VideoSensorParamsStruct]), + ClusterObjectFieldDescriptor(Label="nightVisionCapable", Tag=0x00000003, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="minViewport", Tag=0x00000004, Type=typing.Optional[CameraAvStreamManagement.Structs.VideoResolutionStruct]), + ClusterObjectFieldDescriptor(Label="rateDistortionTradeOffPoints", Tag=0x00000005, Type=typing.Optional[typing.List[CameraAvStreamManagement.Structs.RateDistortionTradeOffPointsStruct]]), + ClusterObjectFieldDescriptor(Label="maxContentBufferSize", Tag=0x00000006, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="microphoneCapabilities", Tag=0x00000007, Type=typing.Optional[CameraAvStreamManagement.Structs.AudioCapabilitiesStruct]), + ClusterObjectFieldDescriptor(Label="speakerCapabilities", Tag=0x00000008, Type=typing.Optional[CameraAvStreamManagement.Structs.AudioCapabilitiesStruct]), + ClusterObjectFieldDescriptor(Label="twoWayTalkSupport", Tag=0x00000009, Type=typing.Optional[CameraAvStreamManagement.Enums.TwoWayTalkSupportTypeEnum]), + ClusterObjectFieldDescriptor(Label="supportedSnapshotParams", Tag=0x0000000A, Type=typing.Optional[typing.List[CameraAvStreamManagement.Structs.SnapshotParamsStruct]]), + ClusterObjectFieldDescriptor(Label="maxNetworkBandwidth", Tag=0x0000000B, Type=uint), + ClusterObjectFieldDescriptor(Label="currentFrameRate", Tag=0x0000000C, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="HDRModeEnabled", Tag=0x0000000D, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="currentVideoCodecs", Tag=0x0000000E, Type=typing.Optional[typing.List[CameraAvStreamManagement.Enums.VideoCodecEnum]]), + ClusterObjectFieldDescriptor(Label="currentSnapshotConfig", Tag=0x0000000F, Type=typing.Optional[CameraAvStreamManagement.Structs.SnapshotParamsStruct]), + ClusterObjectFieldDescriptor(Label="fabricsUsingCamera", Tag=0x00000010, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="allocatedVideoStreams", Tag=0x00000011, Type=typing.Optional[typing.List[CameraAvStreamManagement.Structs.VideoStreamStruct]]), + ClusterObjectFieldDescriptor(Label="allocatedAudioStreams", Tag=0x00000012, Type=typing.Optional[typing.List[CameraAvStreamManagement.Structs.AudioStreamStruct]]), + ClusterObjectFieldDescriptor(Label="allocatedSnapshotStreams", Tag=0x00000013, Type=typing.Optional[typing.List[CameraAvStreamManagement.Structs.SnapshotStreamStruct]]), + ClusterObjectFieldDescriptor(Label="rankedVideoStreamPrioritiesList", Tag=0x00000014, Type=typing.Optional[typing.List[CameraAvStreamManagement.Enums.StreamTypeEnum]]), + ClusterObjectFieldDescriptor(Label="softRecordingPrivacyModeEnabled", Tag=0x00000015, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="softLivestreamPrivacyModeEnabled", Tag=0x00000016, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="hardPrivacyModeOn", Tag=0x00000017, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="nightVision", Tag=0x00000018, Type=typing.Optional[CameraAvStreamManagement.Enums.TriStateAutoEnum]), + ClusterObjectFieldDescriptor(Label="nightVisionIllum", Tag=0x00000019, Type=typing.Optional[CameraAvStreamManagement.Enums.TriStateAutoEnum]), + ClusterObjectFieldDescriptor(Label="AWBEnabled", Tag=0x0000001A, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="autoShutterSpeedEnabled", Tag=0x0000001B, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="autoISOEnabled", Tag=0x0000001C, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="viewport", Tag=0x0000001D, Type=typing.Optional[CameraAvStreamManagement.Structs.ViewportStruct]), + ClusterObjectFieldDescriptor(Label="speakerMuted", Tag=0x0000001E, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="speakerVolumeLevel", Tag=0x0000001F, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="speakerMaxLevel", Tag=0x00000020, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="speakerMinLevel", Tag=0x00000021, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="microphoneMuted", Tag=0x00000022, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="microphoneVolumeLevel", Tag=0x00000023, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="microphoneMaxLevel", Tag=0x00000024, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="microphoneMinLevel", Tag=0x00000025, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="microphoneAGCEnabled", Tag=0x00000026, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="imageRotation", Tag=0x00000027, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="imageFlipHorizontal", Tag=0x00000028, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="imageFlipVertical", Tag=0x00000029, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="localVideoRecordingEnabled", Tag=0x0000002A, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="localSnapshotRecordingEnabled", Tag=0x0000002B, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="statusLightEnabled", Tag=0x0000002C, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="statusLightBrightness", Tag=0x0000002D, Type=typing.Optional[Globals.Enums.ThreeLevelAutoEnum]), + ClusterObjectFieldDescriptor(Label="depthSensorStatus", Tag=0x0000002E, Type=typing.Optional[CameraAvStreamManagement.Enums.TriStateAutoEnum]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + maxConcurrentVideoEncoders: typing.Optional[uint] = None + maxEncodedPixelRate: typing.Optional[uint] = None + videoSensorParams: typing.Optional[CameraAvStreamManagement.Structs.VideoSensorParamsStruct] = None + nightVisionCapable: typing.Optional[bool] = None + minViewport: typing.Optional[CameraAvStreamManagement.Structs.VideoResolutionStruct] = None + rateDistortionTradeOffPoints: typing.Optional[typing.List[CameraAvStreamManagement.Structs.RateDistortionTradeOffPointsStruct]] = None + maxContentBufferSize: typing.Optional[uint] = None + microphoneCapabilities: typing.Optional[CameraAvStreamManagement.Structs.AudioCapabilitiesStruct] = None + speakerCapabilities: typing.Optional[CameraAvStreamManagement.Structs.AudioCapabilitiesStruct] = None + twoWayTalkSupport: typing.Optional[CameraAvStreamManagement.Enums.TwoWayTalkSupportTypeEnum] = None + supportedSnapshotParams: typing.Optional[typing.List[CameraAvStreamManagement.Structs.SnapshotParamsStruct]] = None + maxNetworkBandwidth: uint = 0 + currentFrameRate: typing.Optional[uint] = None + HDRModeEnabled: typing.Optional[bool] = None + currentVideoCodecs: typing.Optional[typing.List[CameraAvStreamManagement.Enums.VideoCodecEnum]] = None + currentSnapshotConfig: typing.Optional[CameraAvStreamManagement.Structs.SnapshotParamsStruct] = None + fabricsUsingCamera: typing.List[uint] = field(default_factory=lambda: []) + allocatedVideoStreams: typing.Optional[typing.List[CameraAvStreamManagement.Structs.VideoStreamStruct]] = None + allocatedAudioStreams: typing.Optional[typing.List[CameraAvStreamManagement.Structs.AudioStreamStruct]] = None + allocatedSnapshotStreams: typing.Optional[typing.List[CameraAvStreamManagement.Structs.SnapshotStreamStruct]] = None + rankedVideoStreamPrioritiesList: typing.Optional[typing.List[CameraAvStreamManagement.Enums.StreamTypeEnum]] = None + softRecordingPrivacyModeEnabled: typing.Optional[bool] = None + softLivestreamPrivacyModeEnabled: typing.Optional[bool] = None + hardPrivacyModeOn: typing.Optional[bool] = None + nightVision: typing.Optional[CameraAvStreamManagement.Enums.TriStateAutoEnum] = None + nightVisionIllum: typing.Optional[CameraAvStreamManagement.Enums.TriStateAutoEnum] = None + AWBEnabled: typing.Optional[bool] = None + autoShutterSpeedEnabled: typing.Optional[bool] = None + autoISOEnabled: typing.Optional[bool] = None + viewport: typing.Optional[CameraAvStreamManagement.Structs.ViewportStruct] = None + speakerMuted: typing.Optional[bool] = None + speakerVolumeLevel: typing.Optional[uint] = None + speakerMaxLevel: typing.Optional[uint] = None + speakerMinLevel: typing.Optional[uint] = None + microphoneMuted: typing.Optional[bool] = None + microphoneVolumeLevel: typing.Optional[uint] = None + microphoneMaxLevel: typing.Optional[uint] = None + microphoneMinLevel: typing.Optional[uint] = None + microphoneAGCEnabled: typing.Optional[bool] = None + imageRotation: typing.Optional[uint] = None + imageFlipHorizontal: typing.Optional[bool] = None + imageFlipVertical: typing.Optional[bool] = None + localVideoRecordingEnabled: typing.Optional[bool] = None + localSnapshotRecordingEnabled: typing.Optional[bool] = None + statusLightEnabled: typing.Optional[bool] = None + statusLightBrightness: typing.Optional[Globals.Enums.ThreeLevelAutoEnum] = None + depthSensorStatus: typing.Optional[CameraAvStreamManagement.Enums.TriStateAutoEnum] = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 + + class Enums: + class AudioCodecEnum(MatterIntEnum): + kOpus = 0x00 + kAacLc = 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 an unknown + # enum value. This specific value should never be transmitted. + kUnknownEnumValue = 2 + + class ImageCodecEnum(MatterIntEnum): + kJpeg = 0x00 + # 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 an unknown + # enum value. This specific value should never be transmitted. + kUnknownEnumValue = 1 + + class StreamTypeEnum(MatterIntEnum): + kInternal = 0x00 + kRecording = 0x01 + kAnalysis = 0x02 + kLiveView = 0x03 + # 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 an unknown + # enum value. This specific value should never be transmitted. + kUnknownEnumValue = 4 + + class TriStateAutoEnum(MatterIntEnum): + kOff = 0x00 + kOn = 0x01 + kAuto = 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 an unknown + # enum value. This specific value should never be transmitted. + kUnknownEnumValue = 3 + + class TwoWayTalkSupportTypeEnum(MatterIntEnum): + kNotSupported = 0x00 + kHalfDuplex = 0x01 + kFullDuplex = 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 an unknown + # enum value. This specific value should never be transmitted. + kUnknownEnumValue = 3 + + class VideoCodecEnum(MatterIntEnum): + kH264 = 0x00 + kHevc = 0x01 + kVvc = 0x02 + kAv1 = 0x03 + # 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 an unknown + # enum value. This specific value should never be transmitted. + kUnknownEnumValue = 4 + + class Bitmaps: + class Feature(IntFlag): + kPrivacy = 0x1 + kAudio = 0x2 + kSpeaker = 0x4 + kImageControl = 0x8 + kVideo = 0x10 + kSnapshot = 0x20 + kWatermark = 0x40 + kOnScreenDisplay = 0x80 + kLocalStorage = 0x100 + + class Structs: + @dataclass + class VideoResolutionStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="width", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="height", Tag=1, Type=uint), + ]) + + width: 'uint' = 0 + height: 'uint' = 0 + + @dataclass + class VideoStreamStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="streamType", Tag=1, Type=CameraAvStreamManagement.Enums.StreamTypeEnum), + ClusterObjectFieldDescriptor(Label="videoCodec", Tag=2, Type=CameraAvStreamManagement.Enums.VideoCodecEnum), + ClusterObjectFieldDescriptor(Label="minFrameRate", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="maxFrameRate", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="minResolution", Tag=5, Type=CameraAvStreamManagement.Structs.VideoResolutionStruct), + ClusterObjectFieldDescriptor(Label="maxResolution", Tag=6, Type=CameraAvStreamManagement.Structs.VideoResolutionStruct), + ClusterObjectFieldDescriptor(Label="minBitRate", Tag=7, Type=uint), + ClusterObjectFieldDescriptor(Label="maxBitRate", Tag=8, Type=uint), + ClusterObjectFieldDescriptor(Label="minFragmentLen", Tag=9, Type=uint), + ClusterObjectFieldDescriptor(Label="maxFragmentLen", Tag=10, Type=uint), + ClusterObjectFieldDescriptor(Label="watermarkEnabled", Tag=11, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="OSDEnabled", Tag=12, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="referenceCount", Tag=13, Type=uint), + ]) + + videoStreamID: 'uint' = 0 + streamType: 'CameraAvStreamManagement.Enums.StreamTypeEnum' = 0 + videoCodec: 'CameraAvStreamManagement.Enums.VideoCodecEnum' = 0 + minFrameRate: 'uint' = 0 + maxFrameRate: 'uint' = 0 + minResolution: 'CameraAvStreamManagement.Structs.VideoResolutionStruct' = field(default_factory=lambda: CameraAvStreamManagement.Structs.VideoResolutionStruct()) + maxResolution: 'CameraAvStreamManagement.Structs.VideoResolutionStruct' = field(default_factory=lambda: CameraAvStreamManagement.Structs.VideoResolutionStruct()) + minBitRate: 'uint' = 0 + maxBitRate: 'uint' = 0 + minFragmentLen: 'uint' = 0 + maxFragmentLen: 'uint' = 0 + watermarkEnabled: 'typing.Optional[bool]' = None + OSDEnabled: 'typing.Optional[bool]' = None + referenceCount: 'uint' = 0 + + @dataclass + class SnapshotStreamStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="snapshotStreamID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="imageCodec", Tag=1, Type=CameraAvStreamManagement.Enums.ImageCodecEnum), + ClusterObjectFieldDescriptor(Label="frameRate", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="bitRate", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="minResolution", Tag=4, Type=CameraAvStreamManagement.Structs.VideoResolutionStruct), + ClusterObjectFieldDescriptor(Label="maxResolution", Tag=5, Type=CameraAvStreamManagement.Structs.VideoResolutionStruct), + ClusterObjectFieldDescriptor(Label="quality", Tag=6, Type=uint), + ClusterObjectFieldDescriptor(Label="referenceCount", Tag=7, Type=uint), + ]) + + snapshotStreamID: 'uint' = 0 + imageCodec: 'CameraAvStreamManagement.Enums.ImageCodecEnum' = 0 + frameRate: 'uint' = 0 + bitRate: 'uint' = 0 + minResolution: 'CameraAvStreamManagement.Structs.VideoResolutionStruct' = field(default_factory=lambda: CameraAvStreamManagement.Structs.VideoResolutionStruct()) + maxResolution: 'CameraAvStreamManagement.Structs.VideoResolutionStruct' = field(default_factory=lambda: CameraAvStreamManagement.Structs.VideoResolutionStruct()) + quality: 'uint' = 0 + referenceCount: 'uint' = 0 + + @dataclass + class SnapshotParamsStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="resolution", Tag=0, Type=CameraAvStreamManagement.Structs.VideoResolutionStruct), + ClusterObjectFieldDescriptor(Label="maxFrameRate", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="imageCodec", Tag=2, Type=CameraAvStreamManagement.Enums.ImageCodecEnum), + ]) + + resolution: 'CameraAvStreamManagement.Structs.VideoResolutionStruct' = field(default_factory=lambda: CameraAvStreamManagement.Structs.VideoResolutionStruct()) + maxFrameRate: 'uint' = 0 + imageCodec: 'CameraAvStreamManagement.Enums.ImageCodecEnum' = 0 + + @dataclass + class RateDistortionTradeOffPointsStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="codec", Tag=0, Type=CameraAvStreamManagement.Enums.VideoCodecEnum), + ClusterObjectFieldDescriptor(Label="resolution", Tag=1, Type=CameraAvStreamManagement.Structs.VideoResolutionStruct), + ClusterObjectFieldDescriptor(Label="minBitRate", Tag=2, Type=uint), + ]) + + codec: 'CameraAvStreamManagement.Enums.VideoCodecEnum' = 0 + resolution: 'CameraAvStreamManagement.Structs.VideoResolutionStruct' = field(default_factory=lambda: CameraAvStreamManagement.Structs.VideoResolutionStruct()) + minBitRate: 'uint' = 0 + + @dataclass + class AudioCapabilitiesStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="maxNumberOfChannels", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="supportedCodecs", Tag=1, Type=typing.List[CameraAvStreamManagement.Enums.AudioCodecEnum]), + ClusterObjectFieldDescriptor(Label="supportedSampleRates", Tag=2, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="supportedBitDepths", Tag=3, Type=typing.List[uint]), + ]) + + maxNumberOfChannels: 'uint' = 0 + supportedCodecs: 'typing.List[CameraAvStreamManagement.Enums.AudioCodecEnum]' = field(default_factory=lambda: []) + supportedSampleRates: 'typing.List[uint]' = field(default_factory=lambda: []) + supportedBitDepths: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AudioStreamStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="streamType", Tag=1, Type=CameraAvStreamManagement.Enums.StreamTypeEnum), + ClusterObjectFieldDescriptor(Label="audioCodec", Tag=2, Type=CameraAvStreamManagement.Enums.AudioCodecEnum), + ClusterObjectFieldDescriptor(Label="channelCount", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="sampleRate", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="bitRate", Tag=5, Type=uint), + ClusterObjectFieldDescriptor(Label="bitDepth", Tag=6, Type=uint), + ClusterObjectFieldDescriptor(Label="referenceCount", Tag=7, Type=uint), + ]) + + audioStreamID: 'uint' = 0 + streamType: 'CameraAvStreamManagement.Enums.StreamTypeEnum' = 0 + audioCodec: 'CameraAvStreamManagement.Enums.AudioCodecEnum' = 0 + channelCount: 'uint' = 0 + sampleRate: 'uint' = 0 + bitRate: 'uint' = 0 + bitDepth: 'uint' = 0 + referenceCount: 'uint' = 0 + + @dataclass + class VideoSensorParamsStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="sensorWidth", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="sensorHeight", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="HDRCapable", Tag=2, Type=bool), + ClusterObjectFieldDescriptor(Label="maxFPS", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="maxHDRFPS", Tag=4, Type=uint), + ]) + + sensorWidth: 'uint' = 0 + sensorHeight: 'uint' = 0 + HDRCapable: 'bool' = False + maxFPS: 'uint' = 0 + maxHDRFPS: 'uint' = 0 + + @dataclass + class ViewportStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="x1", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="y1", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="x2", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="y2", Tag=3, Type=uint), + ]) + + x1: 'uint' = 0 + y1: 'uint' = 0 + x2: 'uint' = 0 + y2: 'uint' = 0 + + class Commands: + @dataclass + class AudioStreamAllocate(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000551 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'AudioStreamAllocateResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="streamType", Tag=0, Type=CameraAvStreamManagement.Enums.StreamTypeEnum), + ClusterObjectFieldDescriptor(Label="audioCodec", Tag=1, Type=CameraAvStreamManagement.Enums.AudioCodecEnum), + ClusterObjectFieldDescriptor(Label="channelCount", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="sampleRate", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="bitRate", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="bitDepth", Tag=5, Type=uint), + ]) + + streamType: CameraAvStreamManagement.Enums.StreamTypeEnum = 0 + audioCodec: CameraAvStreamManagement.Enums.AudioCodecEnum = 0 + channelCount: uint = 0 + sampleRate: uint = 0 + bitRate: uint = 0 + bitDepth: uint = 0 + + @dataclass + class AudioStreamAllocateResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000551 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=0, Type=uint), + ]) + + audioStreamID: uint = 0 + + @dataclass + class AudioStreamDeallocate(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000551 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=0, Type=uint), + ]) + + audioStreamID: uint = 0 + + @dataclass + class VideoStreamAllocate(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000551 + command_id: typing.ClassVar[int] = 0x00000003 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'VideoStreamAllocateResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="streamType", Tag=0, Type=CameraAvStreamManagement.Enums.StreamTypeEnum), + ClusterObjectFieldDescriptor(Label="videoCodec", Tag=1, Type=CameraAvStreamManagement.Enums.VideoCodecEnum), + ClusterObjectFieldDescriptor(Label="minFrameRate", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="maxFrameRate", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="minResolution", Tag=4, Type=CameraAvStreamManagement.Structs.VideoResolutionStruct), + ClusterObjectFieldDescriptor(Label="maxResolution", Tag=5, Type=CameraAvStreamManagement.Structs.VideoResolutionStruct), + ClusterObjectFieldDescriptor(Label="minBitRate", Tag=6, Type=uint), + ClusterObjectFieldDescriptor(Label="maxBitRate", Tag=7, Type=uint), + ClusterObjectFieldDescriptor(Label="minFragmentLen", Tag=8, Type=uint), + ClusterObjectFieldDescriptor(Label="maxFragmentLen", Tag=9, Type=uint), + ClusterObjectFieldDescriptor(Label="watermarkEnabled", Tag=10, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="OSDEnabled", Tag=11, Type=typing.Optional[bool]), + ]) + + streamType: CameraAvStreamManagement.Enums.StreamTypeEnum = 0 + videoCodec: CameraAvStreamManagement.Enums.VideoCodecEnum = 0 + minFrameRate: uint = 0 + maxFrameRate: uint = 0 + minResolution: CameraAvStreamManagement.Structs.VideoResolutionStruct = field(default_factory=lambda: CameraAvStreamManagement.Structs.VideoResolutionStruct()) + maxResolution: CameraAvStreamManagement.Structs.VideoResolutionStruct = field(default_factory=lambda: CameraAvStreamManagement.Structs.VideoResolutionStruct()) + minBitRate: uint = 0 + maxBitRate: uint = 0 + minFragmentLen: uint = 0 + maxFragmentLen: uint = 0 + watermarkEnabled: typing.Optional[bool] = None + OSDEnabled: typing.Optional[bool] = None + + @dataclass + class VideoStreamAllocateResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000551 + command_id: typing.ClassVar[int] = 0x00000004 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=0, Type=uint), + ]) + + videoStreamID: uint = 0 + + @dataclass + class VideoStreamModify(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000551 + command_id: typing.ClassVar[int] = 0x00000005 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="resolution", Tag=1, Type=typing.Optional[CameraAvStreamManagement.Structs.VideoResolutionStruct]), + ClusterObjectFieldDescriptor(Label="watermarkEnabled", Tag=2, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="OSDEnabled", Tag=3, Type=typing.Optional[bool]), + ]) + + videoStreamID: uint = 0 + resolution: typing.Optional[CameraAvStreamManagement.Structs.VideoResolutionStruct] = None + watermarkEnabled: typing.Optional[bool] = None + OSDEnabled: typing.Optional[bool] = None + + @dataclass + class VideoStreamDeallocate(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000551 + command_id: typing.ClassVar[int] = 0x00000006 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=0, Type=uint), + ]) + + videoStreamID: uint = 0 + + @dataclass + class SnapshotStreamAllocate(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000551 + command_id: typing.ClassVar[int] = 0x00000007 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'SnapshotStreamAllocateResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="imageCodec", Tag=0, Type=CameraAvStreamManagement.Enums.ImageCodecEnum), + ClusterObjectFieldDescriptor(Label="frameRate", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="bitRate", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="minResolution", Tag=3, Type=CameraAvStreamManagement.Structs.VideoResolutionStruct), + ClusterObjectFieldDescriptor(Label="maxResolution", Tag=4, Type=CameraAvStreamManagement.Structs.VideoResolutionStruct), + ClusterObjectFieldDescriptor(Label="quality", Tag=5, Type=uint), + ]) + + imageCodec: CameraAvStreamManagement.Enums.ImageCodecEnum = 0 + frameRate: uint = 0 + bitRate: uint = 0 + minResolution: CameraAvStreamManagement.Structs.VideoResolutionStruct = field(default_factory=lambda: CameraAvStreamManagement.Structs.VideoResolutionStruct()) + maxResolution: CameraAvStreamManagement.Structs.VideoResolutionStruct = field(default_factory=lambda: CameraAvStreamManagement.Structs.VideoResolutionStruct()) + quality: uint = 0 + + @dataclass + class SnapshotStreamAllocateResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000551 + command_id: typing.ClassVar[int] = 0x00000008 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="snapshotStreamID", Tag=0, Type=uint), + ]) + + snapshotStreamID: uint = 0 + + @dataclass + class SnapshotStreamDeallocate(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000551 + command_id: typing.ClassVar[int] = 0x00000009 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="snapshotStreamID", Tag=0, Type=uint), + ]) + + snapshotStreamID: uint = 0 + + @dataclass + class SetStreamPriorities(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000551 + command_id: typing.ClassVar[int] = 0x0000000A + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="streamPriorities", Tag=0, Type=typing.List[CameraAvStreamManagement.Enums.StreamTypeEnum]), + ]) + + streamPriorities: typing.List[CameraAvStreamManagement.Enums.StreamTypeEnum] = field(default_factory=lambda: []) + + @dataclass + class CaptureSnapshot(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000551 + command_id: typing.ClassVar[int] = 0x0000000B + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="snapshotStreamID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="requestedResolution", Tag=1, Type=CameraAvStreamManagement.Structs.VideoResolutionStruct), + ]) + + snapshotStreamID: uint = 0 + requestedResolution: CameraAvStreamManagement.Structs.VideoResolutionStruct = field(default_factory=lambda: CameraAvStreamManagement.Structs.VideoResolutionStruct()) + + @dataclass + class CaptureSnapshotResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000551 + command_id: typing.ClassVar[int] = 0x0000000C + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="data", Tag=0, Type=bytes), + ClusterObjectFieldDescriptor(Label="imageCodec", Tag=1, Type=CameraAvStreamManagement.Enums.ImageCodecEnum), + ClusterObjectFieldDescriptor(Label="resolution", Tag=2, Type=CameraAvStreamManagement.Structs.VideoResolutionStruct), + ]) + + data: bytes = b"" + imageCodec: CameraAvStreamManagement.Enums.ImageCodecEnum = 0 + resolution: CameraAvStreamManagement.Structs.VideoResolutionStruct = field(default_factory=lambda: CameraAvStreamManagement.Structs.VideoResolutionStruct()) + + @dataclass + class SetViewport(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000551 + command_id: typing.ClassVar[int] = 0x0000000D + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="viewport", Tag=0, Type=CameraAvStreamManagement.Structs.ViewportStruct), + ]) + + viewport: CameraAvStreamManagement.Structs.ViewportStruct = field(default_factory=lambda: CameraAvStreamManagement.Structs.ViewportStruct()) + + @dataclass + class SetImageRotation(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000551 + command_id: typing.ClassVar[int] = 0x0000000E + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="angle", Tag=0, Type=uint), + ]) + + angle: uint = 0 + + @dataclass + class SetImageFlipHorizontal(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000551 + command_id: typing.ClassVar[int] = 0x0000000F + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="enabled", Tag=0, Type=bool), + ]) + + enabled: bool = False + + @dataclass + class SetImageFlipVertical(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000551 + command_id: typing.ClassVar[int] = 0x00000010 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="enabled", Tag=0, Type=bool), + ]) + + enabled: bool = False + + class Attributes: + @dataclass + class MaxConcurrentVideoEncoders(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: typing.Optional[uint] = None + + @dataclass + class MaxEncodedPixelRate(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: typing.Optional[uint] = None + + @dataclass + class VideoSensorParams(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[CameraAvStreamManagement.Structs.VideoSensorParamsStruct]) + + value: typing.Optional[CameraAvStreamManagement.Structs.VideoSensorParamsStruct] = None + + @dataclass + class NightVisionCapable(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + + value: typing.Optional[bool] = None + + @dataclass + class MinViewport(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[CameraAvStreamManagement.Structs.VideoResolutionStruct]) + + value: typing.Optional[CameraAvStreamManagement.Structs.VideoResolutionStruct] = None + + @dataclass + class RateDistortionTradeOffPoints(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000005 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[CameraAvStreamManagement.Structs.RateDistortionTradeOffPointsStruct]]) + + value: typing.Optional[typing.List[CameraAvStreamManagement.Structs.RateDistortionTradeOffPointsStruct]] = None + + @dataclass + class MaxContentBufferSize(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000006 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: typing.Optional[uint] = None + + @dataclass + class MicrophoneCapabilities(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000007 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[CameraAvStreamManagement.Structs.AudioCapabilitiesStruct]) + + value: typing.Optional[CameraAvStreamManagement.Structs.AudioCapabilitiesStruct] = None + + @dataclass + class SpeakerCapabilities(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000008 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[CameraAvStreamManagement.Structs.AudioCapabilitiesStruct]) + + value: typing.Optional[CameraAvStreamManagement.Structs.AudioCapabilitiesStruct] = None + + @dataclass + class TwoWayTalkSupport(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000009 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[CameraAvStreamManagement.Enums.TwoWayTalkSupportTypeEnum]) + + value: typing.Optional[CameraAvStreamManagement.Enums.TwoWayTalkSupportTypeEnum] = None + + @dataclass + class SupportedSnapshotParams(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000000A + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[CameraAvStreamManagement.Structs.SnapshotParamsStruct]]) + + value: typing.Optional[typing.List[CameraAvStreamManagement.Structs.SnapshotParamsStruct]] = None + + @dataclass + class MaxNetworkBandwidth(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000000B + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: uint = 0 + + @dataclass + class CurrentFrameRate(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000000C + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: typing.Optional[uint] = None + + @dataclass + class HDRModeEnabled(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000000D + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + + value: typing.Optional[bool] = None + + @dataclass + class CurrentVideoCodecs(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000000E + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[CameraAvStreamManagement.Enums.VideoCodecEnum]]) + + value: typing.Optional[typing.List[CameraAvStreamManagement.Enums.VideoCodecEnum]] = None + + @dataclass + class CurrentSnapshotConfig(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000000F + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[CameraAvStreamManagement.Structs.SnapshotParamsStruct]) + + value: typing.Optional[CameraAvStreamManagement.Structs.SnapshotParamsStruct] = None + + @dataclass + class FabricsUsingCamera(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000010 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: typing.List[uint] = field(default_factory=lambda: []) + + @dataclass + class AllocatedVideoStreams(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000011 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[CameraAvStreamManagement.Structs.VideoStreamStruct]]) + + value: typing.Optional[typing.List[CameraAvStreamManagement.Structs.VideoStreamStruct]] = None + + @dataclass + class AllocatedAudioStreams(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000012 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[CameraAvStreamManagement.Structs.AudioStreamStruct]]) + + value: typing.Optional[typing.List[CameraAvStreamManagement.Structs.AudioStreamStruct]] = None + + @dataclass + class AllocatedSnapshotStreams(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000013 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[CameraAvStreamManagement.Structs.SnapshotStreamStruct]]) + + value: typing.Optional[typing.List[CameraAvStreamManagement.Structs.SnapshotStreamStruct]] = None + + @dataclass + class RankedVideoStreamPrioritiesList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000014 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[CameraAvStreamManagement.Enums.StreamTypeEnum]]) + + value: typing.Optional[typing.List[CameraAvStreamManagement.Enums.StreamTypeEnum]] = None + + @dataclass + class SoftRecordingPrivacyModeEnabled(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000015 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + + value: typing.Optional[bool] = None + + @dataclass + class SoftLivestreamPrivacyModeEnabled(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000016 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + + value: typing.Optional[bool] = None + + @dataclass + class HardPrivacyModeOn(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000017 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + + value: typing.Optional[bool] = None + + @dataclass + class NightVision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000018 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[CameraAvStreamManagement.Enums.TriStateAutoEnum]) + + value: typing.Optional[CameraAvStreamManagement.Enums.TriStateAutoEnum] = None + + @dataclass + class NightVisionIllum(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000019 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[CameraAvStreamManagement.Enums.TriStateAutoEnum]) + + value: typing.Optional[CameraAvStreamManagement.Enums.TriStateAutoEnum] = None + + @dataclass + class AWBEnabled(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000001A + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + + value: typing.Optional[bool] = None + + @dataclass + class AutoShutterSpeedEnabled(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000001B + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + + value: typing.Optional[bool] = None + + @dataclass + class AutoISOEnabled(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000001C + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + + value: typing.Optional[bool] = None + + @dataclass + class Viewport(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000001D + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[CameraAvStreamManagement.Structs.ViewportStruct]) + + value: typing.Optional[CameraAvStreamManagement.Structs.ViewportStruct] = None + + @dataclass + class SpeakerMuted(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000001E + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + + value: typing.Optional[bool] = None + + @dataclass + class SpeakerVolumeLevel(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000001F + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: typing.Optional[uint] = None + + @dataclass + class SpeakerMaxLevel(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000020 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: typing.Optional[uint] = None + + @dataclass + class SpeakerMinLevel(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000021 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: typing.Optional[uint] = None + + @dataclass + class MicrophoneMuted(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000022 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + + value: typing.Optional[bool] = None + + @dataclass + class MicrophoneVolumeLevel(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000023 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: typing.Optional[uint] = None + + @dataclass + class MicrophoneMaxLevel(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000024 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: typing.Optional[uint] = None + + @dataclass + class MicrophoneMinLevel(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000025 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: typing.Optional[uint] = None + + @dataclass + class MicrophoneAGCEnabled(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000026 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + + value: typing.Optional[bool] = None + + @dataclass + class ImageRotation(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000027 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: typing.Optional[uint] = None + + @dataclass + class ImageFlipHorizontal(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000028 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + + value: typing.Optional[bool] = None + + @dataclass + class ImageFlipVertical(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000029 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + + value: typing.Optional[bool] = None + + @dataclass + class LocalVideoRecordingEnabled(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000002A + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + + value: typing.Optional[bool] = None + + @dataclass + class LocalSnapshotRecordingEnabled(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000002B + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + + value: typing.Optional[bool] = None + + @dataclass + class StatusLightEnabled(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000002C + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + + value: typing.Optional[bool] = None + + @dataclass + class StatusLightBrightness(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000002D + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[Globals.Enums.ThreeLevelAutoEnum]) + + value: typing.Optional[Globals.Enums.ThreeLevelAutoEnum] = None + + @dataclass + class DepthSensorStatus(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000002E + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[CameraAvStreamManagement.Enums.TriStateAutoEnum]) + + value: typing.Optional[CameraAvStreamManagement.Enums.TriStateAutoEnum] = None + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: typing.List[uint] = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: typing.List[uint] = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: typing.List[uint] = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: uint = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: uint = 0 + + class Events: + @dataclass + class VideoStreamChanged(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="streamType", Tag=1, Type=typing.Optional[CameraAvStreamManagement.Enums.StreamTypeEnum]), + ClusterObjectFieldDescriptor(Label="videoCodec", Tag=2, Type=typing.Optional[CameraAvStreamManagement.Enums.VideoCodecEnum]), + ClusterObjectFieldDescriptor(Label="minFrameRate", Tag=3, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="maxFrameRate", Tag=4, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="minResolution", Tag=5, Type=typing.Optional[CameraAvStreamManagement.Structs.VideoResolutionStruct]), + ClusterObjectFieldDescriptor(Label="maxResolution", Tag=6, Type=typing.Optional[CameraAvStreamManagement.Structs.VideoResolutionStruct]), + ClusterObjectFieldDescriptor(Label="minBitRate", Tag=7, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="maxBitRate", Tag=8, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="minFragmentLen", Tag=9, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="maxFragmentLen", Tag=10, Type=typing.Optional[uint]), + ]) + + videoStreamID: uint = 0 + streamType: typing.Optional[CameraAvStreamManagement.Enums.StreamTypeEnum] = None + videoCodec: typing.Optional[CameraAvStreamManagement.Enums.VideoCodecEnum] = None + minFrameRate: typing.Optional[uint] = None + maxFrameRate: typing.Optional[uint] = None + minResolution: typing.Optional[CameraAvStreamManagement.Structs.VideoResolutionStruct] = None + maxResolution: typing.Optional[CameraAvStreamManagement.Structs.VideoResolutionStruct] = None + minBitRate: typing.Optional[uint] = None + maxBitRate: typing.Optional[uint] = None + minFragmentLen: typing.Optional[uint] = None + maxFragmentLen: typing.Optional[uint] = None + + @dataclass + class AudioStreamChanged(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="streamType", Tag=1, Type=typing.Optional[CameraAvStreamManagement.Enums.StreamTypeEnum]), + ClusterObjectFieldDescriptor(Label="audioCodec", Tag=2, Type=typing.Optional[CameraAvStreamManagement.Enums.AudioCodecEnum]), + ClusterObjectFieldDescriptor(Label="channelCount", Tag=3, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="sampleRate", Tag=4, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="bitRate", Tag=5, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="bitDepth", Tag=6, Type=typing.Optional[uint]), + ]) + + audioStreamID: uint = 0 + streamType: typing.Optional[CameraAvStreamManagement.Enums.StreamTypeEnum] = None + audioCodec: typing.Optional[CameraAvStreamManagement.Enums.AudioCodecEnum] = None + channelCount: typing.Optional[uint] = None + sampleRate: typing.Optional[uint] = None + bitRate: typing.Optional[uint] = None + bitDepth: typing.Optional[uint] = None + + @dataclass + class SnapshotStreamChanged(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000551 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="snapshotStreamID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="imageCodec", Tag=1, Type=typing.Optional[CameraAvStreamManagement.Enums.ImageCodecEnum]), + ClusterObjectFieldDescriptor(Label="frameRate", Tag=2, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="bitRate", Tag=3, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="minResolution", Tag=4, Type=typing.Optional[CameraAvStreamManagement.Structs.VideoResolutionStruct]), + ClusterObjectFieldDescriptor(Label="maxResolution", Tag=5, Type=typing.Optional[CameraAvStreamManagement.Structs.VideoResolutionStruct]), + ClusterObjectFieldDescriptor(Label="quality", Tag=6, Type=typing.Optional[uint]), + ]) + + snapshotStreamID: uint = 0 + imageCodec: typing.Optional[CameraAvStreamManagement.Enums.ImageCodecEnum] = None + frameRate: typing.Optional[uint] = None + bitRate: typing.Optional[uint] = None + minResolution: typing.Optional[CameraAvStreamManagement.Structs.VideoResolutionStruct] = None + maxResolution: typing.Optional[CameraAvStreamManagement.Structs.VideoResolutionStruct] = None + quality: typing.Optional[uint] = None + + +@dataclass +class WebRTCTransportProvider(Cluster): + id: typing.ClassVar[int] = 0x00000553 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="currentSessions", Tag=0x00000000, Type=typing.List[WebRTCTransportProvider.Structs.WebRTCSessionStruct]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + currentSessions: typing.List[WebRTCTransportProvider.Structs.WebRTCSessionStruct] = field(default_factory=lambda: []) + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 + + class Enums: + class StreamTypeEnum(MatterIntEnum): + kInternal = 0x00 + kRecording = 0x01 + kAnalysis = 0x02 + kLiveView = 0x03 + # 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 an unknown + # enum value. This specific value should never be transmitted. + kUnknownEnumValue = 4 + + class WebRTCEndReasonEnum(MatterIntEnum): + kIceFailed = 0x00 + kIceTimeout = 0x01 + kUserHangup = 0x02 + kUserBusy = 0x03 + kReplaced = 0x04 + kNoUserMedia = 0x05 + kInviteTimeout = 0x06 + kAnsweredElsewhere = 0x07 + kOutOfResources = 0x08 + kMediaTimeout = 0x09 + kLowPower = 0x0A + kUnknownReason = 0x0B + # 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 an unknown + # enum value. This specific value should never be transmitted. + kUnknownEnumValue = 12 + + class Bitmaps: + class WebRTCMetadataOptions(IntFlag): + kDataTLV = 0x1 + + class Structs: + @dataclass + class ICEServerStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="urls", Tag=1, Type=typing.List[str]), + ClusterObjectFieldDescriptor(Label="username", Tag=2, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="credential", Tag=3, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="caid", Tag=4, Type=typing.Optional[uint]), + ]) + + urls: 'typing.List[str]' = field(default_factory=lambda: []) + username: 'typing.Optional[str]' = None + credential: 'typing.Optional[str]' = None + caid: 'typing.Optional[uint]' = None + + @dataclass + class WebRTCSessionStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="id", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="peerNodeID", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="peerFabricIndex", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="streamType", Tag=4, Type=WebRTCTransportProvider.Enums.StreamTypeEnum), + ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=5, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=6, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="metadataOptions", Tag=7, Type=uint), + ]) + + id: 'uint' = 0 + peerNodeID: 'uint' = 0 + peerFabricIndex: 'uint' = 0 + streamType: 'WebRTCTransportProvider.Enums.StreamTypeEnum' = 0 + videoStreamID: 'typing.Union[Nullable, uint]' = NullValue + audioStreamID: 'typing.Union[Nullable, uint]' = NullValue + metadataOptions: 'uint' = 0 + + class Commands: + @dataclass + class SolicitOffer(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000553 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'SolicitOfferResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="streamType", Tag=0, Type=WebRTCTransportProvider.Enums.StreamTypeEnum), + ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=1, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=2, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="ICEServers", Tag=3, Type=typing.Optional[typing.List[WebRTCTransportProvider.Structs.ICEServerStruct]]), + ClusterObjectFieldDescriptor(Label="ICETransportPolicy", Tag=4, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="metadataOptions", Tag=5, Type=typing.Optional[uint]), + ]) + + streamType: WebRTCTransportProvider.Enums.StreamTypeEnum = 0 + videoStreamID: typing.Union[None, Nullable, uint] = None + audioStreamID: typing.Union[None, Nullable, uint] = None + ICEServers: typing.Optional[typing.List[WebRTCTransportProvider.Structs.ICEServerStruct]] = None + ICETransportPolicy: typing.Optional[str] = None + metadataOptions: typing.Optional[uint] = None + + @dataclass + class SolicitOfferResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000553 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="webRTCSessionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="deferredOffer", Tag=1, Type=bool), + ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=2, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=3, Type=typing.Union[None, Nullable, uint]), + ]) + + webRTCSessionID: uint = 0 + deferredOffer: bool = False + videoStreamID: typing.Union[None, Nullable, uint] = None + audioStreamID: typing.Union[None, Nullable, uint] = None + + @dataclass + class ProvideOffer(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000553 + command_id: typing.ClassVar[int] = 0x00000003 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ProvideOfferResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="webRTCSessionID", Tag=0, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="sdp", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="streamType", Tag=2, Type=WebRTCTransportProvider.Enums.StreamTypeEnum), + ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=3, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=4, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="ICEServers", Tag=5, Type=typing.Optional[typing.List[WebRTCTransportProvider.Structs.ICEServerStruct]]), + ClusterObjectFieldDescriptor(Label="ICETransportPolicy", Tag=6, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="metadataOptions", Tag=7, Type=typing.Optional[uint]), + ]) + + webRTCSessionID: typing.Union[Nullable, uint] = NullValue + sdp: str = "" + streamType: WebRTCTransportProvider.Enums.StreamTypeEnum = 0 + videoStreamID: typing.Union[None, Nullable, uint] = None + audioStreamID: typing.Union[None, Nullable, uint] = None + ICEServers: typing.Optional[typing.List[WebRTCTransportProvider.Structs.ICEServerStruct]] = None + ICETransportPolicy: typing.Optional[str] = None + metadataOptions: typing.Optional[uint] = None + + @dataclass + class ProvideOfferResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000553 + command_id: typing.ClassVar[int] = 0x00000004 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="webRTCSessionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=2, Type=uint), + ]) + + webRTCSessionID: uint = 0 + videoStreamID: uint = 0 + audioStreamID: uint = 0 @dataclass class ProvideAnswer(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000553 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -46733,15 +46612,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="sdp", Tag=1, Type=str), ]) - webRTCSessionID: 'uint' = 0 - sdp: 'str' = "" + webRTCSessionID: uint = 0 + sdp: str = "" @dataclass class ProvideICECandidate(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000553 command_id: typing.ClassVar[int] = 0x00000006 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -46751,15 +46630,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="ICECandidate", Tag=1, Type=str), ]) - webRTCSessionID: 'uint' = 0 - ICECandidate: 'str' = "" + webRTCSessionID: uint = 0 + ICECandidate: str = "" @dataclass class EndSession(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000553 command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -46769,8 +46648,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="reason", Tag=1, Type=WebRTCTransportProvider.Enums.WebRTCEndReasonEnum), ]) - webRTCSessionID: 'uint' = 0 - reason: 'WebRTCTransportProvider.Enums.WebRTCEndReasonEnum' = 0 + webRTCSessionID: uint = 0 + reason: WebRTCTransportProvider.Enums.WebRTCEndReasonEnum = 0 class Attributes: @dataclass @@ -46787,7 +46666,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[WebRTCTransportProvider.Structs.WebRTCSessionStruct]) - value: 'typing.List[WebRTCTransportProvider.Structs.WebRTCSessionStruct]' = field(default_factory=lambda: []) + value: typing.List[WebRTCTransportProvider.Structs.WebRTCSessionStruct] = field(default_factory=lambda: []) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -46803,7 +46682,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -46819,30 +46698,288 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass - class EventList(ClusterAttributeDescriptor): + class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000553 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFA + return 0x0000FFFB @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass - class AttributeList(ClusterAttributeDescriptor): + class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000553 + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: uint = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000553 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: uint = 0 + + +@dataclass +class WebRTCTransportRequestor(Cluster): + id: typing.ClassVar[int] = 0x00000554 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="currentSessions", Tag=0x00000000, Type=typing.List[WebRTCTransportRequestor.Structs.WebRTCSessionStruct]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + currentSessions: typing.List[WebRTCTransportRequestor.Structs.WebRTCSessionStruct] = field(default_factory=lambda: []) + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 + + class Enums: + class StreamTypeEnum(MatterIntEnum): + kInternal = 0x00 + kRecording = 0x01 + kAnalysis = 0x02 + kLiveView = 0x03 + # 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 an unknown + # enum value. This specific value should never be transmitted. + kUnknownEnumValue = 4 + + class WebRTCEndReasonEnum(MatterIntEnum): + kIceFailed = 0x00 + kIceTimeout = 0x01 + kUserHangup = 0x02 + kUserBusy = 0x03 + kReplaced = 0x04 + kNoUserMedia = 0x05 + kInviteTimeout = 0x06 + kAnsweredElsewhere = 0x07 + kOutOfResources = 0x08 + kMediaTimeout = 0x09 + kLowPower = 0x0A + kUnknownReason = 0x0B + # 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 an unknown + # enum value. This specific value should never be transmitted. + kUnknownEnumValue = 12 + + class Bitmaps: + class WebRTCMetadataOptions(IntFlag): + kDataTLV = 0x1 + + class Structs: + @dataclass + class ICEServerStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="urls", Tag=1, Type=typing.List[str]), + ClusterObjectFieldDescriptor(Label="username", Tag=2, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="credential", Tag=3, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="caid", Tag=4, Type=typing.Optional[uint]), + ]) + + urls: 'typing.List[str]' = field(default_factory=lambda: []) + username: 'typing.Optional[str]' = None + credential: 'typing.Optional[str]' = None + caid: 'typing.Optional[uint]' = None + + @dataclass + class WebRTCSessionStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="id", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="peerNodeID", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="peerFabricIndex", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="streamType", Tag=4, Type=WebRTCTransportRequestor.Enums.StreamTypeEnum), + ClusterObjectFieldDescriptor(Label="videoStreamID", Tag=5, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="audioStreamID", Tag=6, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="metadataOptions", Tag=7, Type=uint), + ]) + + id: 'uint' = 0 + peerNodeID: 'uint' = 0 + peerFabricIndex: 'uint' = 0 + streamType: 'WebRTCTransportRequestor.Enums.StreamTypeEnum' = 0 + videoStreamID: 'typing.Union[Nullable, uint]' = NullValue + audioStreamID: 'typing.Union[Nullable, uint]' = NullValue + metadataOptions: 'uint' = 0 + + class Commands: + @dataclass + class Offer(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000554 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="webRTCSessionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="sdp", Tag=1, Type=str), + ClusterObjectFieldDescriptor(Label="ICEServers", Tag=2, Type=typing.Optional[typing.List[WebRTCTransportRequestor.Structs.ICEServerStruct]]), + ClusterObjectFieldDescriptor(Label="ICETransportPolicy", Tag=3, Type=typing.Optional[str]), + ]) + + webRTCSessionID: uint = 0 + sdp: str = "" + ICEServers: typing.Optional[typing.List[WebRTCTransportRequestor.Structs.ICEServerStruct]] = None + ICETransportPolicy: typing.Optional[str] = None + + @dataclass + class Answer(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000554 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="webRTCSessionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="sdp", Tag=1, Type=str), + ]) + + webRTCSessionID: uint = 0 + sdp: str = "" + + @dataclass + class ICECandidate(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000554 + command_id: typing.ClassVar[int] = 0x00000003 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="webRTCSessionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="ICECandidate", Tag=1, Type=str), + ]) + + webRTCSessionID: uint = 0 + ICECandidate: str = "" + + @dataclass + class End(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000554 + command_id: typing.ClassVar[int] = 0x00000004 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[typing.Optional[str]] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="webRTCSessionID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="reason", Tag=1, Type=WebRTCTransportRequestor.Enums.WebRTCEndReasonEnum), + ]) + + webRTCSessionID: uint = 0 + reason: WebRTCTransportRequestor.Enums.WebRTCEndReasonEnum = 0 + + class Attributes: + @dataclass + class CurrentSessions(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000554 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[WebRTCTransportRequestor.Structs.WebRTCSessionStruct]) + + value: typing.List[WebRTCTransportRequestor.Structs.WebRTCSessionStruct] = field(default_factory=lambda: []) + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000554 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: typing.List[uint] = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000554 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: typing.List[uint] = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000554 + @ChipUtility.classproperty def attribute_id(cls) -> int: return 0x0000FFFB @@ -46851,13 +46988,13 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000553 + return 0x00000554 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -46867,13 +47004,13 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000553 + return 0x00000554 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -46883,7 +47020,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -46899,21 +47036,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="enabled", Tag=0x00000002, Type=bool), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - installedChimeSounds: 'typing.List[Chime.Structs.ChimeSoundStruct]' = None - activeChimeID: 'uint' = None - enabled: 'bool' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + installedChimeSounds: typing.List[Chime.Structs.ChimeSoundStruct] = field(default_factory=lambda: []) + activeChimeID: uint = 0 + enabled: bool = False + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Structs: @dataclass @@ -46935,7 +47070,7 @@ class PlayChimeSound(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000556 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -46958,7 +47093,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[Chime.Structs.ChimeSoundStruct]) - value: 'typing.List[Chime.Structs.ChimeSoundStruct]' = field(default_factory=lambda: []) + value: typing.List[Chime.Structs.ChimeSoundStruct] = field(default_factory=lambda: []) @dataclass class ActiveChimeID(ClusterAttributeDescriptor): @@ -46974,7 +47109,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Enabled(ClusterAttributeDescriptor): @@ -46990,7 +47125,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -47006,7 +47141,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -47022,23 +47157,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000556 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -47054,7 +47173,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -47070,7 +47189,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -47086,7 +47205,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -47101,20 +47220,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="locationDirectory", Tag=0x00000001, Type=typing.List[EcosystemInformation.Structs.EcosystemLocationStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - deviceDirectory: 'typing.List[EcosystemInformation.Structs.EcosystemDeviceStruct]' = None - locationDirectory: 'typing.List[EcosystemInformation.Structs.EcosystemLocationStruct]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + deviceDirectory: typing.List[EcosystemInformation.Structs.EcosystemDeviceStruct] = field(default_factory=lambda: []) + locationDirectory: typing.List[EcosystemInformation.Structs.EcosystemLocationStruct] = field(default_factory=lambda: []) + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Structs: @dataclass @@ -47187,7 +47304,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[EcosystemInformation.Structs.EcosystemDeviceStruct]) - value: 'typing.List[EcosystemInformation.Structs.EcosystemDeviceStruct]' = field(default_factory=lambda: []) + value: typing.List[EcosystemInformation.Structs.EcosystemDeviceStruct] = field(default_factory=lambda: []) @dataclass class LocationDirectory(ClusterAttributeDescriptor): @@ -47203,7 +47320,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[EcosystemInformation.Structs.EcosystemLocationStruct]) - value: 'typing.List[EcosystemInformation.Structs.EcosystemLocationStruct]' = field(default_factory=lambda: []) + value: typing.List[EcosystemInformation.Structs.EcosystemLocationStruct] = field(default_factory=lambda: []) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -47219,7 +47336,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -47235,23 +47352,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000750 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -47267,7 +47368,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -47283,7 +47384,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -47299,7 +47400,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -47313,19 +47414,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="supportedDeviceCategories", Tag=0x00000000, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - supportedDeviceCategories: 'uint' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + supportedDeviceCategories: uint = 0 + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Bitmaps: class SupportedDeviceCategoryBitmap(IntFlag): @@ -47337,7 +47436,7 @@ class RequestCommissioningApproval(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000751 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -47349,10 +47448,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="label", Tag=3, Type=typing.Optional[str]), ]) - requestID: 'uint' = 0 - vendorID: 'uint' = 0 - productID: 'uint' = 0 - label: 'typing.Optional[str]' = None + requestID: uint = 0 + vendorID: uint = 0 + productID: uint = 0 + label: typing.Optional[str] = None @dataclass class CommissionNode(ClusterCommand): @@ -47369,15 +47468,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="responseTimeoutSeconds", Tag=1, Type=uint), ]) - requestID: 'uint' = 0 - responseTimeoutSeconds: 'uint' = 0 + requestID: uint = 0 + responseTimeoutSeconds: uint = 0 @dataclass class ReverseOpenCommissioningWindow(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000751 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -47390,11 +47489,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="salt", Tag=4, Type=bytes), ]) - commissioningTimeout: 'uint' = 0 - PAKEPasscodeVerifier: 'bytes' = b"" - discriminator: 'uint' = 0 - iterations: 'uint' = 0 - salt: 'bytes' = b"" + commissioningTimeout: uint = 0 + PAKEPasscodeVerifier: bytes = b"" + discriminator: uint = 0 + iterations: uint = 0 + salt: bytes = b"" class Attributes: @dataclass @@ -47411,7 +47510,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -47427,7 +47526,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -47443,23 +47542,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000751 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -47475,7 +47558,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -47491,7 +47574,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -47507,7 +47590,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -47530,10 +47613,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) - requestID: 'uint' = 0 - clientNodeID: 'uint' = 0 - statusCode: 'uint' = 0 - fabricIndex: 'uint' = 0 + requestID: uint = 0 + clientNodeID: uint = 0 + statusCode: uint = 0 + fabricIndex: uint = 0 @dataclass @@ -47634,108 +47717,106 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="nullableGlobalStruct", Tag=0x00004034, Type=typing.Union[Nullable, Globals.Structs.TestGlobalStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ClusterObjectFieldDescriptor(Label="meiInt8u", Tag=0xFFF24F01, Type=uint), ]) - boolean: 'bool' = None - bitmap8: 'uint' = None - bitmap16: 'uint' = None - bitmap32: 'uint' = None - bitmap64: 'uint' = None - int8u: 'uint' = None - int16u: 'uint' = None - int24u: 'uint' = None - int32u: 'uint' = None - int40u: 'uint' = None - int48u: 'uint' = None - int56u: 'uint' = None - int64u: 'uint' = None - int8s: 'int' = None - int16s: 'int' = None - int24s: 'int' = None - int32s: 'int' = None - int40s: 'int' = None - int48s: 'int' = None - int56s: 'int' = None - int64s: 'int' = None - enum8: 'uint' = None - enum16: 'uint' = None - floatSingle: 'float32' = None - floatDouble: 'float' = None - octetString: 'bytes' = None - listInt8u: 'typing.List[uint]' = None - listOctetString: 'typing.List[bytes]' = None - listStructOctetString: 'typing.List[UnitTesting.Structs.TestListStructOctet]' = None - longOctetString: 'bytes' = None - charString: 'str' = None - longCharString: 'str' = None - epochUs: 'uint' = None - epochS: 'uint' = None - vendorId: 'uint' = None - listNullablesAndOptionalsStruct: 'typing.List[UnitTesting.Structs.NullablesAndOptionalsStruct]' = None - enumAttr: 'UnitTesting.Enums.SimpleEnum' = None - structAttr: 'UnitTesting.Structs.SimpleStruct' = None - rangeRestrictedInt8u: 'uint' = None - rangeRestrictedInt8s: 'int' = None - rangeRestrictedInt16u: 'uint' = None - rangeRestrictedInt16s: 'int' = None - listLongOctetString: 'typing.List[bytes]' = None - listFabricScoped: 'typing.List[UnitTesting.Structs.TestFabricScoped]' = None - timedWriteBoolean: 'bool' = None - generalErrorBoolean: 'bool' = None - clusterErrorBoolean: 'bool' = None - globalEnum: 'Globals.Enums.TestGlobalEnum' = None - globalStruct: 'Globals.Structs.TestGlobalStruct' = None - unsupported: 'typing.Optional[bool]' = None - readFailureCode: 'typing.Optional[uint]' = None - failureInt32U: 'typing.Optional[uint]' = None - nullableBoolean: 'typing.Union[Nullable, bool]' = None - nullableBitmap8: 'typing.Union[Nullable, uint]' = None - nullableBitmap16: 'typing.Union[Nullable, uint]' = None - nullableBitmap32: 'typing.Union[Nullable, uint]' = None - nullableBitmap64: 'typing.Union[Nullable, uint]' = None - nullableInt8u: 'typing.Union[Nullable, uint]' = None - nullableInt16u: 'typing.Union[Nullable, uint]' = None - nullableInt24u: 'typing.Union[Nullable, uint]' = None - nullableInt32u: 'typing.Union[Nullable, uint]' = None - nullableInt40u: 'typing.Union[Nullable, uint]' = None - nullableInt48u: 'typing.Union[Nullable, uint]' = None - nullableInt56u: 'typing.Union[Nullable, uint]' = None - nullableInt64u: 'typing.Union[Nullable, uint]' = None - nullableInt8s: 'typing.Union[Nullable, int]' = None - nullableInt16s: 'typing.Union[Nullable, int]' = None - nullableInt24s: 'typing.Union[Nullable, int]' = None - nullableInt32s: 'typing.Union[Nullable, int]' = None - nullableInt40s: 'typing.Union[Nullable, int]' = None - nullableInt48s: 'typing.Union[Nullable, int]' = None - nullableInt56s: 'typing.Union[Nullable, int]' = None - nullableInt64s: 'typing.Union[Nullable, int]' = None - nullableEnum8: 'typing.Union[Nullable, uint]' = None - nullableEnum16: 'typing.Union[Nullable, uint]' = None - nullableFloatSingle: 'typing.Union[Nullable, float32]' = None - nullableFloatDouble: 'typing.Union[Nullable, float]' = None - nullableOctetString: 'typing.Union[Nullable, bytes]' = None - nullableCharString: 'typing.Union[Nullable, str]' = None - nullableEnumAttr: 'typing.Union[Nullable, UnitTesting.Enums.SimpleEnum]' = None - nullableStruct: 'typing.Union[Nullable, UnitTesting.Structs.SimpleStruct]' = None - nullableRangeRestrictedInt8u: 'typing.Union[Nullable, uint]' = None - nullableRangeRestrictedInt8s: 'typing.Union[Nullable, int]' = None - nullableRangeRestrictedInt16u: 'typing.Union[Nullable, uint]' = None - nullableRangeRestrictedInt16s: 'typing.Union[Nullable, int]' = None - writeOnlyInt8u: 'typing.Optional[uint]' = None - nullableGlobalEnum: 'typing.Union[Nullable, Globals.Enums.TestGlobalEnum]' = None - nullableGlobalStruct: 'typing.Union[Nullable, Globals.Structs.TestGlobalStruct]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None - meiInt8u: 'uint' = None + boolean: bool = False + bitmap8: uint = 0 + bitmap16: uint = 0 + bitmap32: uint = 0 + bitmap64: uint = 0 + int8u: uint = 0 + int16u: uint = 0 + int24u: uint = 0 + int32u: uint = 0 + int40u: uint = 0 + int48u: uint = 0 + int56u: uint = 0 + int64u: uint = 0 + int8s: int = 0 + int16s: int = 0 + int24s: int = 0 + int32s: int = 0 + int40s: int = 0 + int48s: int = 0 + int56s: int = 0 + int64s: int = 0 + enum8: uint = 0 + enum16: uint = 0 + floatSingle: float32 = 0.0 + floatDouble: float = 0.0 + octetString: bytes = b"" + listInt8u: typing.List[uint] = field(default_factory=lambda: []) + listOctetString: typing.List[bytes] = field(default_factory=lambda: []) + listStructOctetString: typing.List[UnitTesting.Structs.TestListStructOctet] = field(default_factory=lambda: []) + longOctetString: bytes = b"" + charString: str = "" + longCharString: str = "" + epochUs: uint = 0 + epochS: uint = 0 + vendorId: uint = 0 + listNullablesAndOptionalsStruct: typing.List[UnitTesting.Structs.NullablesAndOptionalsStruct] = field(default_factory=lambda: []) + enumAttr: UnitTesting.Enums.SimpleEnum = 0 + structAttr: UnitTesting.Structs.SimpleStruct = field(default_factory=lambda: UnitTesting.Structs.SimpleStruct()) + rangeRestrictedInt8u: uint = 0 + rangeRestrictedInt8s: int = 0 + rangeRestrictedInt16u: uint = 0 + rangeRestrictedInt16s: int = 0 + listLongOctetString: typing.List[bytes] = field(default_factory=lambda: []) + listFabricScoped: typing.List[UnitTesting.Structs.TestFabricScoped] = field(default_factory=lambda: []) + timedWriteBoolean: bool = False + generalErrorBoolean: bool = False + clusterErrorBoolean: bool = False + globalEnum: Globals.Enums.TestGlobalEnum = 0 + globalStruct: Globals.Structs.TestGlobalStruct = field(default_factory=lambda: Globals.Structs.TestGlobalStruct()) + unsupported: typing.Optional[bool] = None + readFailureCode: typing.Optional[uint] = None + failureInt32U: typing.Optional[uint] = None + nullableBoolean: typing.Union[Nullable, bool] = NullValue + nullableBitmap8: typing.Union[Nullable, uint] = NullValue + nullableBitmap16: typing.Union[Nullable, uint] = NullValue + nullableBitmap32: typing.Union[Nullable, uint] = NullValue + nullableBitmap64: typing.Union[Nullable, uint] = NullValue + nullableInt8u: typing.Union[Nullable, uint] = NullValue + nullableInt16u: typing.Union[Nullable, uint] = NullValue + nullableInt24u: typing.Union[Nullable, uint] = NullValue + nullableInt32u: typing.Union[Nullable, uint] = NullValue + nullableInt40u: typing.Union[Nullable, uint] = NullValue + nullableInt48u: typing.Union[Nullable, uint] = NullValue + nullableInt56u: typing.Union[Nullable, uint] = NullValue + nullableInt64u: typing.Union[Nullable, uint] = NullValue + nullableInt8s: typing.Union[Nullable, int] = NullValue + nullableInt16s: typing.Union[Nullable, int] = NullValue + nullableInt24s: typing.Union[Nullable, int] = NullValue + nullableInt32s: typing.Union[Nullable, int] = NullValue + nullableInt40s: typing.Union[Nullable, int] = NullValue + nullableInt48s: typing.Union[Nullable, int] = NullValue + nullableInt56s: typing.Union[Nullable, int] = NullValue + nullableInt64s: typing.Union[Nullable, int] = NullValue + nullableEnum8: typing.Union[Nullable, uint] = NullValue + nullableEnum16: typing.Union[Nullable, uint] = NullValue + nullableFloatSingle: typing.Union[Nullable, float32] = NullValue + nullableFloatDouble: typing.Union[Nullable, float] = NullValue + nullableOctetString: typing.Union[Nullable, bytes] = NullValue + nullableCharString: typing.Union[Nullable, str] = NullValue + nullableEnumAttr: typing.Union[Nullable, UnitTesting.Enums.SimpleEnum] = NullValue + nullableStruct: typing.Union[Nullable, UnitTesting.Structs.SimpleStruct] = NullValue + nullableRangeRestrictedInt8u: typing.Union[Nullable, uint] = NullValue + nullableRangeRestrictedInt8s: typing.Union[Nullable, int] = NullValue + nullableRangeRestrictedInt16u: typing.Union[Nullable, uint] = NullValue + nullableRangeRestrictedInt16s: typing.Union[Nullable, int] = NullValue + writeOnlyInt8u: typing.Optional[uint] = None + nullableGlobalEnum: typing.Union[Nullable, Globals.Enums.TestGlobalEnum] = NullValue + nullableGlobalStruct: typing.Union[Nullable, Globals.Structs.TestGlobalStruct] = NullValue + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 + meiInt8u: uint = 0 class Enums: class SimpleEnum(MatterIntEnum): @@ -47747,7 +47828,7 @@ class SimpleEnum(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 4, + kUnknownEnumValue = 4 class Bitmaps: class Bitmap16MaskMap(IntFlag): @@ -47935,7 +48016,7 @@ class Test(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -47948,7 +48029,7 @@ class TestSpecificResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -47957,14 +48038,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="returnValue", Tag=0, Type=uint), ]) - returnValue: 'uint' = 0 + returnValue: uint = 0 @dataclass class TestNotHandled(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -47977,7 +48058,7 @@ class TestAddArgumentsResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -47986,7 +48067,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="returnValue", Tag=0, Type=uint), ]) - returnValue: 'uint' = 0 + returnValue: uint = 0 @dataclass class TestSpecific(ClusterCommand): @@ -48006,7 +48087,7 @@ class TestSimpleArgumentResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -48015,14 +48096,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="returnValue", Tag=0, Type=bool), ]) - returnValue: 'bool' = False + returnValue: bool = False @dataclass class TestUnknownCommand(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -48035,7 +48116,7 @@ class TestStructArrayArgumentResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -48049,12 +48130,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg6", Tag=5, Type=bool), ]) - arg1: 'typing.List[UnitTesting.Structs.NestedStructList]' = field(default_factory=lambda: []) - arg2: 'typing.List[UnitTesting.Structs.SimpleStruct]' = field(default_factory=lambda: []) - arg3: 'typing.List[UnitTesting.Enums.SimpleEnum]' = field(default_factory=lambda: []) - arg4: 'typing.List[bool]' = field(default_factory=lambda: []) - arg5: 'UnitTesting.Enums.SimpleEnum' = 0 - arg6: 'bool' = False + arg1: typing.List[UnitTesting.Structs.NestedStructList] = field(default_factory=lambda: []) + arg2: typing.List[UnitTesting.Structs.SimpleStruct] = field(default_factory=lambda: []) + arg3: typing.List[UnitTesting.Enums.SimpleEnum] = field(default_factory=lambda: []) + arg4: typing.List[bool] = field(default_factory=lambda: []) + arg5: UnitTesting.Enums.SimpleEnum = 0 + arg6: bool = False @dataclass class TestAddArguments(ClusterCommand): @@ -48071,15 +48152,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg2", Tag=1, Type=uint), ]) - arg1: 'uint' = 0 - arg2: 'uint' = 0 + arg1: uint = 0 + arg2: uint = 0 @dataclass class TestListInt8UReverseResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x00000004 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -48088,7 +48169,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=typing.List[uint]), ]) - arg1: 'typing.List[uint]' = field(default_factory=lambda: []) + arg1: typing.List[uint] = field(default_factory=lambda: []) @dataclass class TestSimpleArgumentRequest(ClusterCommand): @@ -48104,14 +48185,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=bool), ]) - arg1: 'bool' = False + arg1: bool = False @dataclass class TestEnumsResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x00000005 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -48121,8 +48202,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg2", Tag=1, Type=UnitTesting.Enums.SimpleEnum), ]) - arg1: 'uint' = 0 - arg2: 'UnitTesting.Enums.SimpleEnum' = 0 + arg1: uint = 0 + arg2: UnitTesting.Enums.SimpleEnum = 0 @dataclass class TestStructArrayArgumentRequest(ClusterCommand): @@ -48143,19 +48224,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg6", Tag=5, Type=bool), ]) - arg1: 'typing.List[UnitTesting.Structs.NestedStructList]' = field(default_factory=lambda: []) - arg2: 'typing.List[UnitTesting.Structs.SimpleStruct]' = field(default_factory=lambda: []) - arg3: 'typing.List[UnitTesting.Enums.SimpleEnum]' = field(default_factory=lambda: []) - arg4: 'typing.List[bool]' = field(default_factory=lambda: []) - arg5: 'UnitTesting.Enums.SimpleEnum' = 0 - arg6: 'bool' = False + arg1: typing.List[UnitTesting.Structs.NestedStructList] = field(default_factory=lambda: []) + arg2: typing.List[UnitTesting.Structs.SimpleStruct] = field(default_factory=lambda: []) + arg3: typing.List[UnitTesting.Enums.SimpleEnum] = field(default_factory=lambda: []) + arg4: typing.List[bool] = field(default_factory=lambda: []) + arg5: UnitTesting.Enums.SimpleEnum = 0 + arg6: bool = False @dataclass class TestNullableOptionalResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x00000006 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -48167,10 +48248,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="originalValue", Tag=3, Type=typing.Union[None, Nullable, uint]), ]) - wasPresent: 'bool' = False - wasNull: 'typing.Optional[bool]' = None - value: 'typing.Optional[uint]' = None - originalValue: 'typing.Union[None, Nullable, uint]' = None + wasPresent: bool = False + wasNull: typing.Optional[bool] = None + value: typing.Optional[uint] = None + originalValue: typing.Union[None, Nullable, uint] = None @dataclass class TestStructArgumentRequest(ClusterCommand): @@ -48186,14 +48267,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=UnitTesting.Structs.SimpleStruct), ]) - arg1: 'UnitTesting.Structs.SimpleStruct' = field(default_factory=lambda: UnitTesting.Structs.SimpleStruct()) + arg1: UnitTesting.Structs.SimpleStruct = field(default_factory=lambda: UnitTesting.Structs.SimpleStruct()) @dataclass class TestComplexNullableOptionalResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -48229,34 +48310,34 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="nullableOptionalListValue", Tag=27, Type=typing.Optional[typing.List[UnitTesting.Enums.SimpleEnum]]), ]) - nullableIntWasNull: 'bool' = False - nullableIntValue: 'typing.Optional[uint]' = None - optionalIntWasPresent: 'bool' = False - optionalIntValue: 'typing.Optional[uint]' = None - nullableOptionalIntWasPresent: 'bool' = False - nullableOptionalIntWasNull: 'typing.Optional[bool]' = None - nullableOptionalIntValue: 'typing.Optional[uint]' = None - nullableStringWasNull: 'bool' = False - nullableStringValue: 'typing.Optional[str]' = None - optionalStringWasPresent: 'bool' = False - optionalStringValue: 'typing.Optional[str]' = None - nullableOptionalStringWasPresent: 'bool' = False - nullableOptionalStringWasNull: 'typing.Optional[bool]' = None - nullableOptionalStringValue: 'typing.Optional[str]' = None - nullableStructWasNull: 'bool' = False - nullableStructValue: 'typing.Optional[UnitTesting.Structs.SimpleStruct]' = None - optionalStructWasPresent: 'bool' = False - optionalStructValue: 'typing.Optional[UnitTesting.Structs.SimpleStruct]' = None - nullableOptionalStructWasPresent: 'bool' = False - nullableOptionalStructWasNull: 'typing.Optional[bool]' = None - nullableOptionalStructValue: 'typing.Optional[UnitTesting.Structs.SimpleStruct]' = None - nullableListWasNull: 'bool' = False - nullableListValue: 'typing.Optional[typing.List[UnitTesting.Enums.SimpleEnum]]' = None - optionalListWasPresent: 'bool' = False - optionalListValue: 'typing.Optional[typing.List[UnitTesting.Enums.SimpleEnum]]' = None - nullableOptionalListWasPresent: 'bool' = False - nullableOptionalListWasNull: 'typing.Optional[bool]' = None - nullableOptionalListValue: 'typing.Optional[typing.List[UnitTesting.Enums.SimpleEnum]]' = None + nullableIntWasNull: bool = False + nullableIntValue: typing.Optional[uint] = None + optionalIntWasPresent: bool = False + optionalIntValue: typing.Optional[uint] = None + nullableOptionalIntWasPresent: bool = False + nullableOptionalIntWasNull: typing.Optional[bool] = None + nullableOptionalIntValue: typing.Optional[uint] = None + nullableStringWasNull: bool = False + nullableStringValue: typing.Optional[str] = None + optionalStringWasPresent: bool = False + optionalStringValue: typing.Optional[str] = None + nullableOptionalStringWasPresent: bool = False + nullableOptionalStringWasNull: typing.Optional[bool] = None + nullableOptionalStringValue: typing.Optional[str] = None + nullableStructWasNull: bool = False + nullableStructValue: typing.Optional[UnitTesting.Structs.SimpleStruct] = None + optionalStructWasPresent: bool = False + optionalStructValue: typing.Optional[UnitTesting.Structs.SimpleStruct] = None + nullableOptionalStructWasPresent: bool = False + nullableOptionalStructWasNull: typing.Optional[bool] = None + nullableOptionalStructValue: typing.Optional[UnitTesting.Structs.SimpleStruct] = None + nullableListWasNull: bool = False + nullableListValue: typing.Optional[typing.List[UnitTesting.Enums.SimpleEnum]] = None + optionalListWasPresent: bool = False + optionalListValue: typing.Optional[typing.List[UnitTesting.Enums.SimpleEnum]] = None + nullableOptionalListWasPresent: bool = False + nullableOptionalListWasNull: typing.Optional[bool] = None + nullableOptionalListValue: typing.Optional[typing.List[UnitTesting.Enums.SimpleEnum]] = None @dataclass class TestNestedStructArgumentRequest(ClusterCommand): @@ -48272,14 +48353,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=UnitTesting.Structs.NestedStruct), ]) - arg1: 'UnitTesting.Structs.NestedStruct' = field(default_factory=lambda: UnitTesting.Structs.NestedStruct()) + arg1: UnitTesting.Structs.NestedStruct = field(default_factory=lambda: UnitTesting.Structs.NestedStruct()) @dataclass class BooleanResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x00000008 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -48288,7 +48369,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="value", Tag=0, Type=bool), ]) - value: 'bool' = False + value: bool = False @dataclass class TestListStructArgumentRequest(ClusterCommand): @@ -48304,14 +48385,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=typing.List[UnitTesting.Structs.SimpleStruct]), ]) - arg1: 'typing.List[UnitTesting.Structs.SimpleStruct]' = field(default_factory=lambda: []) + arg1: typing.List[UnitTesting.Structs.SimpleStruct] = field(default_factory=lambda: []) @dataclass class SimpleStructResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x00000009 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -48320,7 +48401,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=UnitTesting.Structs.SimpleStruct), ]) - arg1: 'UnitTesting.Structs.SimpleStruct' = field(default_factory=lambda: UnitTesting.Structs.SimpleStruct()) + arg1: UnitTesting.Structs.SimpleStruct = field(default_factory=lambda: UnitTesting.Structs.SimpleStruct()) @dataclass class TestListInt8UArgumentRequest(ClusterCommand): @@ -48336,14 +48417,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=typing.List[uint]), ]) - arg1: 'typing.List[uint]' = field(default_factory=lambda: []) + arg1: typing.List[uint] = field(default_factory=lambda: []) @dataclass class TestEmitTestEventResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0000000A is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -48352,7 +48433,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="value", Tag=0, Type=uint), ]) - value: 'uint' = 0 + value: uint = 0 @dataclass class TestNestedStructListArgumentRequest(ClusterCommand): @@ -48368,14 +48449,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=UnitTesting.Structs.NestedStructList), ]) - arg1: 'UnitTesting.Structs.NestedStructList' = field(default_factory=lambda: UnitTesting.Structs.NestedStructList()) + arg1: UnitTesting.Structs.NestedStructList = field(default_factory=lambda: UnitTesting.Structs.NestedStructList()) @dataclass class TestEmitTestFabricScopedEventResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0000000B is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -48384,7 +48465,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="value", Tag=0, Type=uint), ]) - value: 'uint' = 0 + value: uint = 0 @dataclass class TestListNestedStructListArgumentRequest(ClusterCommand): @@ -48400,14 +48481,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=typing.List[UnitTesting.Structs.NestedStructList]), ]) - arg1: 'typing.List[UnitTesting.Structs.NestedStructList]' = field(default_factory=lambda: []) + arg1: typing.List[UnitTesting.Structs.NestedStructList] = field(default_factory=lambda: []) @dataclass class TestBatchHelperResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0000000C is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -48416,7 +48497,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="buffer", Tag=0, Type=bytes), ]) - buffer: 'bytes' = b"" + buffer: bytes = b"" @dataclass class TestListInt8UReverseRequest(ClusterCommand): @@ -48432,14 +48513,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=typing.List[uint]), ]) - arg1: 'typing.List[uint]' = field(default_factory=lambda: []) + arg1: typing.List[uint] = field(default_factory=lambda: []) @dataclass class StringEchoResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0000000D is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -48448,7 +48529,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="payload", Tag=0, Type=bytes), ]) - payload: 'bytes' = b"" + payload: bytes = b"" @dataclass class TestEnumsRequest(ClusterCommand): @@ -48465,15 +48546,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg2", Tag=1, Type=UnitTesting.Enums.SimpleEnum), ]) - arg1: 'uint' = 0 - arg2: 'UnitTesting.Enums.SimpleEnum' = 0 + arg1: uint = 0 + arg2: UnitTesting.Enums.SimpleEnum = 0 @dataclass class GlobalEchoResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x0000000E is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -48483,8 +48564,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="field2", Tag=1, Type=Globals.Enums.TestGlobalEnum), ]) - field1: 'Globals.Structs.TestGlobalStruct' = field(default_factory=lambda: Globals.Structs.TestGlobalStruct()) - field2: 'Globals.Enums.TestGlobalEnum' = 0 + field1: Globals.Structs.TestGlobalStruct = field(default_factory=lambda: Globals.Structs.TestGlobalStruct()) + field2: Globals.Enums.TestGlobalEnum = 0 @dataclass class TestNullableOptionalRequest(ClusterCommand): @@ -48500,7 +48581,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=typing.Union[None, Nullable, uint]), ]) - arg1: 'typing.Union[None, Nullable, uint]' = None + arg1: typing.Union[None, Nullable, uint] = None @dataclass class TestComplexNullableOptionalRequest(ClusterCommand): @@ -48527,18 +48608,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="nullableOptionalList", Tag=11, Type=typing.Union[None, Nullable, typing.List[UnitTesting.Enums.SimpleEnum]]), ]) - nullableInt: 'typing.Union[Nullable, uint]' = NullValue - optionalInt: 'typing.Optional[uint]' = None - nullableOptionalInt: 'typing.Union[None, Nullable, uint]' = None - nullableString: 'typing.Union[Nullable, str]' = NullValue - optionalString: 'typing.Optional[str]' = None - nullableOptionalString: 'typing.Union[None, Nullable, str]' = None - nullableStruct: 'typing.Union[Nullable, UnitTesting.Structs.SimpleStruct]' = NullValue - optionalStruct: 'typing.Optional[UnitTesting.Structs.SimpleStruct]' = None - nullableOptionalStruct: 'typing.Union[None, Nullable, UnitTesting.Structs.SimpleStruct]' = None - nullableList: 'typing.Union[Nullable, typing.List[UnitTesting.Enums.SimpleEnum]]' = NullValue - optionalList: 'typing.Optional[typing.List[UnitTesting.Enums.SimpleEnum]]' = None - nullableOptionalList: 'typing.Union[None, Nullable, typing.List[UnitTesting.Enums.SimpleEnum]]' = None + nullableInt: typing.Union[Nullable, uint] = NullValue + optionalInt: typing.Optional[uint] = None + nullableOptionalInt: typing.Union[None, Nullable, uint] = None + nullableString: typing.Union[Nullable, str] = NullValue + optionalString: typing.Optional[str] = None + nullableOptionalString: typing.Union[None, Nullable, str] = None + nullableStruct: typing.Union[Nullable, UnitTesting.Structs.SimpleStruct] = NullValue + optionalStruct: typing.Optional[UnitTesting.Structs.SimpleStruct] = None + nullableOptionalStruct: typing.Union[None, Nullable, UnitTesting.Structs.SimpleStruct] = None + nullableList: typing.Union[Nullable, typing.List[UnitTesting.Enums.SimpleEnum]] = NullValue + optionalList: typing.Optional[typing.List[UnitTesting.Enums.SimpleEnum]] = None + nullableOptionalList: typing.Union[None, Nullable, typing.List[UnitTesting.Enums.SimpleEnum]] = None @dataclass class SimpleStructEchoRequest(ClusterCommand): @@ -48554,14 +48635,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=UnitTesting.Structs.SimpleStruct), ]) - arg1: 'UnitTesting.Structs.SimpleStruct' = field(default_factory=lambda: UnitTesting.Structs.SimpleStruct()) + arg1: UnitTesting.Structs.SimpleStruct = field(default_factory=lambda: UnitTesting.Structs.SimpleStruct()) @dataclass class TimedInvokeRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x00000012 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -48578,7 +48659,7 @@ class TestSimpleOptionalArgumentRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0x00000013 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -48587,7 +48668,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=typing.Optional[bool]), ]) - arg1: 'typing.Optional[bool]' = None + arg1: typing.Optional[bool] = None @dataclass class TestEmitTestEventRequest(ClusterCommand): @@ -48605,9 +48686,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg3", Tag=2, Type=bool), ]) - arg1: 'uint' = 0 - arg2: 'UnitTesting.Enums.SimpleEnum' = 0 - arg3: 'bool' = False + arg1: uint = 0 + arg2: UnitTesting.Enums.SimpleEnum = 0 + arg3: bool = False @dataclass class TestEmitTestFabricScopedEventRequest(ClusterCommand): @@ -48623,7 +48704,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=uint), ]) - arg1: 'uint' = 0 + arg1: uint = 0 @dataclass class TestBatchHelperRequest(ClusterCommand): @@ -48641,9 +48722,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="fillCharacter", Tag=2, Type=uint), ]) - sleepBeforeResponseTimeMs: 'uint' = 0 - sizeOfResponseBuffer: 'uint' = 0 - fillCharacter: 'uint' = 0 + sleepBeforeResponseTimeMs: uint = 0 + sizeOfResponseBuffer: uint = 0 + fillCharacter: uint = 0 @dataclass class TestSecondBatchHelperRequest(ClusterCommand): @@ -48661,9 +48742,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="fillCharacter", Tag=2, Type=uint), ]) - sleepBeforeResponseTimeMs: 'uint' = 0 - sizeOfResponseBuffer: 'uint' = 0 - fillCharacter: 'uint' = 0 + sleepBeforeResponseTimeMs: uint = 0 + sizeOfResponseBuffer: uint = 0 + fillCharacter: uint = 0 @dataclass class StringEchoRequest(ClusterCommand): @@ -48679,7 +48760,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="payload", Tag=0, Type=bytes), ]) - payload: 'bytes' = b"" + payload: bytes = b"" @dataclass class GlobalEchoRequest(ClusterCommand): @@ -48696,8 +48777,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="field2", Tag=1, Type=Globals.Enums.TestGlobalEnum), ]) - field1: 'Globals.Structs.TestGlobalStruct' = field(default_factory=lambda: Globals.Structs.TestGlobalStruct()) - field2: 'Globals.Enums.TestGlobalEnum' = 0 + field1: Globals.Structs.TestGlobalStruct = field(default_factory=lambda: Globals.Structs.TestGlobalStruct()) + field2: Globals.Enums.TestGlobalEnum = 0 @dataclass class TestDifferentVendorMeiRequest(ClusterCommand): @@ -48713,14 +48794,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg1", Tag=0, Type=uint), ]) - arg1: 'uint' = 0 + arg1: uint = 0 @dataclass class TestDifferentVendorMeiResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC05 command_id: typing.ClassVar[int] = 0xFFF200BB is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -48730,8 +48811,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="eventNumber", Tag=1, Type=uint), ]) - arg1: 'uint' = 0 - eventNumber: 'uint' = 0 + arg1: uint = 0 + eventNumber: uint = 0 class Attributes: @dataclass @@ -48748,7 +48829,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class Bitmap8(ClusterAttributeDescriptor): @@ -48764,7 +48845,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Bitmap16(ClusterAttributeDescriptor): @@ -48780,7 +48861,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Bitmap32(ClusterAttributeDescriptor): @@ -48796,7 +48877,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Bitmap64(ClusterAttributeDescriptor): @@ -48812,7 +48893,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Int8u(ClusterAttributeDescriptor): @@ -48828,7 +48909,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Int16u(ClusterAttributeDescriptor): @@ -48844,7 +48925,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Int24u(ClusterAttributeDescriptor): @@ -48860,7 +48941,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Int32u(ClusterAttributeDescriptor): @@ -48876,7 +48957,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Int40u(ClusterAttributeDescriptor): @@ -48892,7 +48973,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Int48u(ClusterAttributeDescriptor): @@ -48908,7 +48989,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Int56u(ClusterAttributeDescriptor): @@ -48924,7 +49005,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Int64u(ClusterAttributeDescriptor): @@ -48940,7 +49021,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Int8s(ClusterAttributeDescriptor): @@ -48956,7 +49037,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=int) - value: 'int' = 0 + value: int = 0 @dataclass class Int16s(ClusterAttributeDescriptor): @@ -48972,7 +49053,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=int) - value: 'int' = 0 + value: int = 0 @dataclass class Int24s(ClusterAttributeDescriptor): @@ -48988,7 +49069,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=int) - value: 'int' = 0 + value: int = 0 @dataclass class Int32s(ClusterAttributeDescriptor): @@ -49004,7 +49085,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=int) - value: 'int' = 0 + value: int = 0 @dataclass class Int40s(ClusterAttributeDescriptor): @@ -49020,7 +49101,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=int) - value: 'int' = 0 + value: int = 0 @dataclass class Int48s(ClusterAttributeDescriptor): @@ -49036,7 +49117,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=int) - value: 'int' = 0 + value: int = 0 @dataclass class Int56s(ClusterAttributeDescriptor): @@ -49052,7 +49133,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=int) - value: 'int' = 0 + value: int = 0 @dataclass class Int64s(ClusterAttributeDescriptor): @@ -49068,7 +49149,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=int) - value: 'int' = 0 + value: int = 0 @dataclass class Enum8(ClusterAttributeDescriptor): @@ -49084,7 +49165,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class Enum16(ClusterAttributeDescriptor): @@ -49100,7 +49181,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class FloatSingle(ClusterAttributeDescriptor): @@ -49116,7 +49197,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=float32) - value: 'float32' = 0.0 + value: float32 = 0.0 @dataclass class FloatDouble(ClusterAttributeDescriptor): @@ -49132,7 +49213,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=float) - value: 'float' = 0.0 + value: float = 0.0 @dataclass class OctetString(ClusterAttributeDescriptor): @@ -49148,7 +49229,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bytes) - value: 'bytes' = b"" + value: bytes = b"" @dataclass class ListInt8u(ClusterAttributeDescriptor): @@ -49164,7 +49245,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class ListOctetString(ClusterAttributeDescriptor): @@ -49180,7 +49261,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[bytes]) - value: 'typing.List[bytes]' = field(default_factory=lambda: []) + value: typing.List[bytes] = field(default_factory=lambda: []) @dataclass class ListStructOctetString(ClusterAttributeDescriptor): @@ -49196,7 +49277,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[UnitTesting.Structs.TestListStructOctet]) - value: 'typing.List[UnitTesting.Structs.TestListStructOctet]' = field(default_factory=lambda: []) + value: typing.List[UnitTesting.Structs.TestListStructOctet] = field(default_factory=lambda: []) @dataclass class LongOctetString(ClusterAttributeDescriptor): @@ -49212,7 +49293,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bytes) - value: 'bytes' = b"" + value: bytes = b"" @dataclass class CharString(ClusterAttributeDescriptor): @@ -49228,7 +49309,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=str) - value: 'str' = "" + value: str = "" @dataclass class LongCharString(ClusterAttributeDescriptor): @@ -49244,7 +49325,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=str) - value: 'str' = "" + value: str = "" @dataclass class EpochUs(ClusterAttributeDescriptor): @@ -49260,7 +49341,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class EpochS(ClusterAttributeDescriptor): @@ -49276,7 +49357,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class VendorId(ClusterAttributeDescriptor): @@ -49292,7 +49373,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ListNullablesAndOptionalsStruct(ClusterAttributeDescriptor): @@ -49308,7 +49389,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[UnitTesting.Structs.NullablesAndOptionalsStruct]) - value: 'typing.List[UnitTesting.Structs.NullablesAndOptionalsStruct]' = field(default_factory=lambda: []) + value: typing.List[UnitTesting.Structs.NullablesAndOptionalsStruct] = field(default_factory=lambda: []) @dataclass class EnumAttr(ClusterAttributeDescriptor): @@ -49324,7 +49405,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=UnitTesting.Enums.SimpleEnum) - value: 'UnitTesting.Enums.SimpleEnum' = 0 + value: UnitTesting.Enums.SimpleEnum = 0 @dataclass class StructAttr(ClusterAttributeDescriptor): @@ -49340,7 +49421,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=UnitTesting.Structs.SimpleStruct) - value: 'UnitTesting.Structs.SimpleStruct' = field(default_factory=lambda: UnitTesting.Structs.SimpleStruct()) + value: UnitTesting.Structs.SimpleStruct = field(default_factory=lambda: UnitTesting.Structs.SimpleStruct()) @dataclass class RangeRestrictedInt8u(ClusterAttributeDescriptor): @@ -49356,7 +49437,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class RangeRestrictedInt8s(ClusterAttributeDescriptor): @@ -49372,7 +49453,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=int) - value: 'int' = 0 + value: int = 0 @dataclass class RangeRestrictedInt16u(ClusterAttributeDescriptor): @@ -49388,7 +49469,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class RangeRestrictedInt16s(ClusterAttributeDescriptor): @@ -49404,7 +49485,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=int) - value: 'int' = 0 + value: int = 0 @dataclass class ListLongOctetString(ClusterAttributeDescriptor): @@ -49420,7 +49501,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[bytes]) - value: 'typing.List[bytes]' = field(default_factory=lambda: []) + value: typing.List[bytes] = field(default_factory=lambda: []) @dataclass class ListFabricScoped(ClusterAttributeDescriptor): @@ -49436,7 +49517,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[UnitTesting.Structs.TestFabricScoped]) - value: 'typing.List[UnitTesting.Structs.TestFabricScoped]' = field(default_factory=lambda: []) + value: typing.List[UnitTesting.Structs.TestFabricScoped] = field(default_factory=lambda: []) @dataclass class TimedWriteBoolean(ClusterAttributeDescriptor): @@ -49456,7 +49537,7 @@ def must_use_timed_write(cls) -> bool: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class GeneralErrorBoolean(ClusterAttributeDescriptor): @@ -49472,7 +49553,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class ClusterErrorBoolean(ClusterAttributeDescriptor): @@ -49488,7 +49569,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class GlobalEnum(ClusterAttributeDescriptor): @@ -49504,7 +49585,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=Globals.Enums.TestGlobalEnum) - value: 'Globals.Enums.TestGlobalEnum' = 0 + value: Globals.Enums.TestGlobalEnum = 0 @dataclass class GlobalStruct(ClusterAttributeDescriptor): @@ -49520,7 +49601,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=Globals.Structs.TestGlobalStruct) - value: 'Globals.Structs.TestGlobalStruct' = field(default_factory=lambda: Globals.Structs.TestGlobalStruct()) + value: Globals.Structs.TestGlobalStruct = field(default_factory=lambda: Globals.Structs.TestGlobalStruct()) @dataclass class Unsupported(ClusterAttributeDescriptor): @@ -49536,7 +49617,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'typing.Optional[bool]' = None + value: typing.Optional[bool] = None @dataclass class ReadFailureCode(ClusterAttributeDescriptor): @@ -49552,7 +49633,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class FailureInt32U(ClusterAttributeDescriptor): @@ -49568,7 +49649,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class NullableBoolean(ClusterAttributeDescriptor): @@ -49584,7 +49665,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, bool]) - value: 'typing.Union[Nullable, bool]' = NullValue + value: typing.Union[Nullable, bool] = NullValue @dataclass class NullableBitmap8(ClusterAttributeDescriptor): @@ -49600,7 +49681,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class NullableBitmap16(ClusterAttributeDescriptor): @@ -49616,7 +49697,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class NullableBitmap32(ClusterAttributeDescriptor): @@ -49632,7 +49713,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class NullableBitmap64(ClusterAttributeDescriptor): @@ -49648,7 +49729,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class NullableInt8u(ClusterAttributeDescriptor): @@ -49664,7 +49745,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class NullableInt16u(ClusterAttributeDescriptor): @@ -49680,7 +49761,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class NullableInt24u(ClusterAttributeDescriptor): @@ -49696,7 +49777,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class NullableInt32u(ClusterAttributeDescriptor): @@ -49712,7 +49793,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class NullableInt40u(ClusterAttributeDescriptor): @@ -49728,7 +49809,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class NullableInt48u(ClusterAttributeDescriptor): @@ -49744,7 +49825,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class NullableInt56u(ClusterAttributeDescriptor): @@ -49760,7 +49841,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class NullableInt64u(ClusterAttributeDescriptor): @@ -49776,7 +49857,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class NullableInt8s(ClusterAttributeDescriptor): @@ -49792,7 +49873,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class NullableInt16s(ClusterAttributeDescriptor): @@ -49808,7 +49889,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class NullableInt24s(ClusterAttributeDescriptor): @@ -49824,7 +49905,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class NullableInt32s(ClusterAttributeDescriptor): @@ -49840,7 +49921,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class NullableInt40s(ClusterAttributeDescriptor): @@ -49856,7 +49937,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class NullableInt48s(ClusterAttributeDescriptor): @@ -49872,7 +49953,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class NullableInt56s(ClusterAttributeDescriptor): @@ -49888,7 +49969,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class NullableInt64s(ClusterAttributeDescriptor): @@ -49904,7 +49985,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class NullableEnum8(ClusterAttributeDescriptor): @@ -49920,7 +50001,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class NullableEnum16(ClusterAttributeDescriptor): @@ -49936,7 +50017,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class NullableFloatSingle(ClusterAttributeDescriptor): @@ -49952,7 +50033,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, float32]) - value: 'typing.Union[Nullable, float32]' = NullValue + value: typing.Union[Nullable, float32] = NullValue @dataclass class NullableFloatDouble(ClusterAttributeDescriptor): @@ -49968,7 +50049,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, float]) - value: 'typing.Union[Nullable, float]' = NullValue + value: typing.Union[Nullable, float] = NullValue @dataclass class NullableOctetString(ClusterAttributeDescriptor): @@ -49984,7 +50065,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, bytes]) - value: 'typing.Union[Nullable, bytes]' = NullValue + value: typing.Union[Nullable, bytes] = NullValue @dataclass class NullableCharString(ClusterAttributeDescriptor): @@ -50000,7 +50081,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, str]) - value: 'typing.Union[Nullable, str]' = NullValue + value: typing.Union[Nullable, str] = NullValue @dataclass class NullableEnumAttr(ClusterAttributeDescriptor): @@ -50016,7 +50097,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, UnitTesting.Enums.SimpleEnum]) - value: 'typing.Union[Nullable, UnitTesting.Enums.SimpleEnum]' = NullValue + value: typing.Union[Nullable, UnitTesting.Enums.SimpleEnum] = NullValue @dataclass class NullableStruct(ClusterAttributeDescriptor): @@ -50032,7 +50113,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, UnitTesting.Structs.SimpleStruct]) - value: 'typing.Union[Nullable, UnitTesting.Structs.SimpleStruct]' = NullValue + value: typing.Union[Nullable, UnitTesting.Structs.SimpleStruct] = NullValue @dataclass class NullableRangeRestrictedInt8u(ClusterAttributeDescriptor): @@ -50048,7 +50129,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class NullableRangeRestrictedInt8s(ClusterAttributeDescriptor): @@ -50064,7 +50145,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class NullableRangeRestrictedInt16u(ClusterAttributeDescriptor): @@ -50080,7 +50161,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) - value: 'typing.Union[Nullable, uint]' = NullValue + value: typing.Union[Nullable, uint] = NullValue @dataclass class NullableRangeRestrictedInt16s(ClusterAttributeDescriptor): @@ -50096,7 +50177,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, int]) - value: 'typing.Union[Nullable, int]' = NullValue + value: typing.Union[Nullable, int] = NullValue @dataclass class WriteOnlyInt8u(ClusterAttributeDescriptor): @@ -50112,7 +50193,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[uint]' = None + value: typing.Optional[uint] = None @dataclass class NullableGlobalEnum(ClusterAttributeDescriptor): @@ -50128,7 +50209,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, Globals.Enums.TestGlobalEnum]) - value: 'typing.Union[Nullable, Globals.Enums.TestGlobalEnum]' = NullValue + value: typing.Union[Nullable, Globals.Enums.TestGlobalEnum] = NullValue @dataclass class NullableGlobalStruct(ClusterAttributeDescriptor): @@ -50144,7 +50225,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, Globals.Structs.TestGlobalStruct]) - value: 'typing.Union[Nullable, Globals.Structs.TestGlobalStruct]' = NullValue + value: typing.Union[Nullable, Globals.Structs.TestGlobalStruct] = NullValue @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -50160,7 +50241,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -50176,23 +50257,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0xFFF1FC05 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -50208,7 +50273,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -50224,7 +50289,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -50240,7 +50305,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class MeiInt8u(ClusterAttributeDescriptor): @@ -50256,7 +50321,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -50281,12 +50346,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg6", Tag=6, Type=typing.List[UnitTesting.Enums.SimpleEnum]), ]) - arg1: 'uint' = 0 - arg2: 'UnitTesting.Enums.SimpleEnum' = 0 - arg3: 'bool' = False - arg4: 'UnitTesting.Structs.SimpleStruct' = field(default_factory=lambda: UnitTesting.Structs.SimpleStruct()) - arg5: 'typing.List[UnitTesting.Structs.SimpleStruct]' = field(default_factory=lambda: []) - arg6: 'typing.List[UnitTesting.Enums.SimpleEnum]' = field(default_factory=lambda: []) + arg1: uint = 0 + arg2: UnitTesting.Enums.SimpleEnum = 0 + arg3: bool = False + arg4: UnitTesting.Structs.SimpleStruct = field(default_factory=lambda: UnitTesting.Structs.SimpleStruct()) + arg5: typing.List[UnitTesting.Structs.SimpleStruct] = field(default_factory=lambda: []) + arg6: typing.List[UnitTesting.Enums.SimpleEnum] = field(default_factory=lambda: []) @dataclass class TestFabricScopedEvent(ClusterEvent): @@ -50305,7 +50370,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) - fabricIndex: 'uint' = 0 + fabricIndex: uint = 0 @dataclass class TestDifferentVendorMeiEvent(ClusterEvent): @@ -50324,7 +50389,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg1", Tag=1, Type=uint), ]) - arg1: 'uint' = 0 + arg1: uint = 0 @dataclass @@ -50337,18 +50402,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Enums: class FaultType(MatterIntEnum): @@ -50361,7 +50424,7 @@ class FaultType(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 5, + kUnknownEnumValue = 5 class Commands: @dataclass @@ -50369,7 +50432,7 @@ class FailAtFault(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC06 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -50382,18 +50445,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="takeMutex", Tag=4, Type=bool), ]) - type: 'FaultInjection.Enums.FaultType' = 0 - id: 'uint' = 0 - numCallsToSkip: 'uint' = 0 - numCallsToFail: 'uint' = 0 - takeMutex: 'bool' = False + type: FaultInjection.Enums.FaultType = 0 + id: uint = 0 + numCallsToSkip: uint = 0 + numCallsToFail: uint = 0 + takeMutex: bool = False @dataclass class FailRandomlyAtFault(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC06 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -50404,9 +50467,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="percentage", Tag=2, Type=uint), ]) - type: 'FaultInjection.Enums.FaultType' = 0 - id: 'uint' = 0 - percentage: 'uint' = 0 + type: FaultInjection.Enums.FaultType = 0 + id: uint = 0 + percentage: uint = 0 class Attributes: @dataclass @@ -50423,7 +50486,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -50439,23 +50502,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0xFFF1FC06 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -50471,7 +50518,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -50487,7 +50534,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -50503,7 +50550,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass @@ -50517,19 +50564,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="flipFlop", Tag=0x00000000, Type=bool), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - flipFlop: 'bool' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None + flipFlop: bool = False + generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) + acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) + attributeList: typing.List[uint] = field(default_factory=lambda: []) + featureMap: uint = 0 + clusterRevision: uint = 0 class Commands: @dataclass @@ -50537,7 +50582,7 @@ class Ping(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC20 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -50550,7 +50595,7 @@ class AddArgumentsResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0xFFF1FC20 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -50559,7 +50604,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="returnValue", Tag=0, Type=uint), ]) - returnValue: 'uint' = 0 + returnValue: uint = 0 @dataclass class AddArguments(ClusterCommand): @@ -50576,8 +50621,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="arg2", Tag=1, Type=uint), ]) - arg1: 'uint' = 0 - arg2: 'uint' = 0 + arg1: uint = 0 + arg2: uint = 0 class Attributes: @dataclass @@ -50594,7 +50639,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=bool) - value: 'bool' = False + value: bool = False @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -50610,7 +50655,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AcceptedCommandList(ClusterAttributeDescriptor): @@ -50626,23 +50671,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0xFFF1FC20 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class AttributeList(ClusterAttributeDescriptor): @@ -50658,7 +50687,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=typing.List[uint]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: typing.List[uint] = field(default_factory=lambda: []) @dataclass class FeatureMap(ClusterAttributeDescriptor): @@ -50674,7 +50703,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 @dataclass class ClusterRevision(ClusterAttributeDescriptor): @@ -50690,7 +50719,7 @@ def attribute_id(cls) -> int: def attribute_type(cls) -> ClusterObjectFieldDescriptor: return ClusterObjectFieldDescriptor(Type=uint) - value: 'uint' = 0 + value: uint = 0 class Events: @dataclass @@ -50711,6 +50740,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) - count: 'uint' = 0 - fabricIndex: 'uint' = 0 + count: uint = 0 + fabricIndex: uint = 0 diff --git a/src/controller/python/chip/clusters/attribute.cpp b/src/controller/python/chip/clusters/attribute.cpp index 421284a0ae..a57da5d6d8 100644 --- a/src/controller/python/chip/clusters/attribute.cpp +++ b/src/controller/python/chip/clusters/attribute.cpp @@ -453,12 +453,20 @@ PyChipError pychip_WriteClient_WriteGroupAttributes(size_t groupIdSizeT, chip::C return ToPyChipError(err); } -void pychip_ReadClient_Abort(ReadClient * apReadClient, ReadClientCallback * apCallback) +void pychip_ReadClient_ShutdownSubscription(ReadClient * apReadClient) { - VerifyOrDie(apReadClient != nullptr); - VerifyOrDie(apCallback != nullptr); + // If apReadClient is nullptr, it means that its life cycle has ended (such as an error happend), and nothing needs to be done. + VerifyOrReturn(apReadClient != nullptr); + // If it is not SubscriptionType, this function should not be executed. + VerifyOrDie(apReadClient->IsSubscriptionType()); - delete apCallback; + Optional subscriptionId = apReadClient->GetSubscriptionId(); + VerifyOrDie(subscriptionId.HasValue()); + + FabricIndex fabricIndex = apReadClient->GetFabricIndex(); + NodeId nodeId = apReadClient->GetPeerNodeId(); + + InteractionModelEngine::GetInstance()->ShutdownSubscription(ScopedNodeId(nodeId, fabricIndex), subscriptionId.Value()); } void pychip_ReadClient_OverrideLivenessTimeout(ReadClient * pReadClient, uint32_t livenessTimeoutMs) @@ -497,10 +505,10 @@ void pychip_ReadClient_GetSubscriptionTimeoutMs(ReadClient * pReadClient, uint32 } } -PyChipError pychip_ReadClient_Read(void * appContext, ReadClient ** pReadClient, ReadClientCallback ** pCallback, - DeviceProxy * device, uint8_t * readParamsBuf, void ** attributePathsFromPython, - size_t numAttributePaths, void ** dataversionFiltersFromPython, size_t numDataversionFilters, - void ** eventPathsFromPython, size_t numEventPaths, uint64_t * eventNumberFilter) +PyChipError pychip_ReadClient_Read(void * appContext, ReadClient ** pReadClient, DeviceProxy * device, uint8_t * readParamsBuf, + void ** attributePathsFromPython, size_t numAttributePaths, void ** dataversionFiltersFromPython, + size_t numDataversionFilters, void ** eventPathsFromPython, size_t numEventPaths, + uint64_t * eventNumberFilter) { CHIP_ERROR err = CHIP_NO_ERROR; PyReadAttributeParams pyParams = {}; @@ -612,7 +620,6 @@ PyChipError pychip_ReadClient_Read(void * appContext, ReadClient ** pReadClient, } *pReadClient = readClient.get(); - *pCallback = callback.get(); callback->AdoptReadClient(std::move(readClient)); diff --git a/src/controller/python/templates/partials/enum_def.zapt b/src/controller/python/templates/partials/enum_def.zapt index d8063739e1..01fbc62e6e 100644 --- a/src/controller/python/templates/partials/enum_def.zapt +++ b/src/controller/python/templates/partials/enum_def.zapt @@ -8,7 +8,7 @@ # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = {{first_unused_enum_value mode="first_unused"}}, + kUnknownEnumValue = {{first_unused_enum_value mode="first_unused"}} {{else}} # kUnknownEnumValue intentionally not defined. This enum never goes # through DataModel::Decode, likely because it is a part of a derived diff --git a/src/controller/python/templates/python-cluster-Objects-py.zapt b/src/controller/python/templates/python-cluster-Objects-py.zapt index 3cb973d86d..381d266668 100644 --- a/src/controller/python/templates/python-cluster-Objects-py.zapt +++ b/src/controller/python/templates/python-cluster-Objects-py.zapt @@ -6,6 +6,7 @@ # Users are not expected to import this file, instead, users can use import chip.clusters, # which will import all symbols from this file and can get a readable, pretty naming like # clusters.OnOff.commands.OnCommand +from __future__ import annotations import typing from dataclasses import dataclass, field @@ -76,9 +77,9 @@ class {{asUpperCamelCase name}}(Cluster): {{#zcl_attributes_server}} {{#if entryType}} - {{ asLowerCamelCase label }}: '{{zapTypeToPythonClusterObjectType entryType ns=(asUpperCamelCase parent.name)}}' = None + {{ asLowerCamelCase label }}: {{zapTypeToPythonClusterObjectType entryType ns=(asUpperCamelCase parent.name)}} = {{getPythonFieldDefault entryType ns=(asUpperCamelCase parent.name)}} {{else}} - {{ asLowerCamelCase label }}: '{{zapTypeToPythonClusterObjectType type ns=(asUpperCamelCase parent.name)}}' = None + {{ asLowerCamelCase label }}: {{zapTypeToPythonClusterObjectType type ns=(asUpperCamelCase parent.name)}} = {{getPythonFieldDefault type ns=(asUpperCamelCase parent.name)}} {{/if}} {{/zcl_attributes_server}} @@ -121,7 +122,7 @@ class {{asUpperCamelCase name}}(Cluster): {{~#if responseName}} response_type: typing.ClassVar[str] = '{{asUpperCamelCase responseName}}' {{else}} - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[typing.Optional[str]] = None {{/if}} @ChipUtility.classproperty @@ -142,7 +143,7 @@ class {{asUpperCamelCase name}}(Cluster): {{#first}} {{/first}} - {{ asLowerCamelCase label }}: '{{zapTypeToPythonClusterObjectType type ns=(asUpperCamelCase parent.parent.name)}}' = {{getPythonFieldDefault type ns=(asUpperCamelCase parent.parent.name)}} + {{ asLowerCamelCase label }}: {{zapTypeToPythonClusterObjectType type ns=(asUpperCamelCase parent.parent.name)}} = {{getPythonFieldDefault type ns=(asUpperCamelCase parent.parent.name)}} {{/zcl_command_arguments}} {{/zcl_commands}} @@ -175,9 +176,9 @@ class {{asUpperCamelCase name}}(Cluster): {{/if}} {{#if entryType}} - value: '{{zapTypeToPythonClusterObjectType entryType ns=(asUpperCamelCase parent.name)}}' = {{getPythonFieldDefault entryType ns=(asUpperCamelCase parent.name)}} + value: {{zapTypeToPythonClusterObjectType entryType ns=(asUpperCamelCase parent.name)}} = {{getPythonFieldDefault entryType ns=(asUpperCamelCase parent.name)}} {{else}} - value: '{{zapTypeToPythonClusterObjectType type ns=(asUpperCamelCase parent.name)}}' = {{getPythonFieldDefault type ns=(asUpperCamelCase parent.name)}} + value: {{zapTypeToPythonClusterObjectType type ns=(asUpperCamelCase parent.name)}} = {{getPythonFieldDefault type ns=(asUpperCamelCase parent.name)}} {{/if}} {{/zcl_attributes_server}} @@ -207,7 +208,7 @@ class {{asUpperCamelCase name}}(Cluster): {{#first}} {{/first}} - {{ asLowerCamelCase name }}: '{{zapTypeToPythonClusterObjectType type ns=(asUpperCamelCase parent.parent.name)}}' = {{getPythonFieldDefault type ns=(asUpperCamelCase parent.parent.name)}} + {{ asLowerCamelCase name }}: {{zapTypeToPythonClusterObjectType type ns=(asUpperCamelCase parent.parent.name)}} = {{getPythonFieldDefault type ns=(asUpperCamelCase parent.parent.name)}} {{/zcl_event_fields}} {{/zcl_events}} diff --git a/src/controller/python/test/test_scripts/mobile-device-test.py b/src/controller/python/test/test_scripts/mobile-device-test.py index 5515fa1ba0..cb032bc3ac 100755 --- a/src/controller/python/test/test_scripts/mobile-device-test.py +++ b/src/controller/python/test/test_scripts/mobile-device-test.py @@ -33,7 +33,7 @@ # --disable-test ClusterObjectTests.TestTimedRequestTimeout # --trace-to json:${TRACE_TEST_JSON}.json # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto -# factoryreset: true +# factory-reset: true # quiet: true # === END CI TEST ARGUMENTS === diff --git a/src/controller/python/test/unit_tests/test_cluster_objects.py b/src/controller/python/test/unit_tests/test_cluster_objects.py index 13b12db185..beca5ff398 100644 --- a/src/controller/python/test/unit_tests/test_cluster_objects.py +++ b/src/controller/python/test/unit_tests/test_cluster_objects.py @@ -193,6 +193,14 @@ class IntAttribute(ClusterObjects.ClusterAttributeDescriptor): def attribute_type(cls) -> ClusterObjects.ClusterObjectFieldDescriptor: return ClusterObjects.ClusterObjectFieldDescriptor(Type=int) + @chip.ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000000 + + @chip.ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + def test_basic_encode(self): res = _encode_attribute_and_then_decode_to_native( 42, TestAttributeDescriptor.IntAttribute) @@ -208,6 +216,14 @@ class StructAttribute(ClusterObjects.ClusterAttributeDescriptor): def attribute_type(cls) -> ClusterObjects.ClusterObjectFieldDescriptor: return ClusterObjects.ClusterObjectFieldDescriptor(Type=TestClusterObjects.C) + @chip.ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000000 + + @chip.ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + def test_struct_encode(self): res = _encode_attribute_and_then_decode_to_native( TestClusterObjects.C(X=42, Y=24), TestAttributeDescriptor.StructAttribute) @@ -223,6 +239,14 @@ class ArrayAttribute(ClusterObjects.ClusterAttributeDescriptor): def attribute_type(cls) -> ClusterObjects.ClusterObjectFieldDescriptor: return ClusterObjects.ClusterObjectFieldDescriptor(Type=typing.List[int]) + @chip.ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000000 + + @chip.ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + def test_array_encode(self): res = _encode_attribute_and_then_decode_to_native( [1, 2, 3, 4, 5], TestAttributeDescriptor.ArrayAttribute) diff --git a/src/controller/tests/BUILD.gn b/src/controller/tests/BUILD.gn index a1d7b94330..a7389c59ae 100644 --- a/src/controller/tests/BUILD.gn +++ b/src/controller/tests/BUILD.gn @@ -21,17 +21,27 @@ import("${chip_root}/build/chip/chip_test_suite.gni") chip_test_suite("tests") { output_name = "libControllerTests" - test_sources = [ "TestCommissionableNodeController.cpp" ] - - if (chip_device_platform != "mbed" && chip_device_platform != "efr32" && - chip_device_platform != "esp32") { - test_sources += [ "TestServerCommandDispatch.cpp" ] - test_sources += [ "TestEventChunking.cpp" ] - test_sources += [ "TestEventCaching.cpp" ] - test_sources += [ "TestReadChunking.cpp" ] - test_sources += [ "TestWriteChunking.cpp" ] - test_sources += [ "TestEventNumberCaching.cpp" ] - test_sources += [ "TestCommissioningWindowOpener.cpp" ] + test_sources = [] + + # Not supported on efr32. + if (chip_device_platform != "efr32") { + test_sources += [ "TestCommissionableNodeController.cpp" ] + } + + if (chip_device_platform != "mbed" && chip_device_platform != "esp32") { + test_sources += [ + "TestEventCaching.cpp", + "TestEventChunking.cpp", + "TestEventNumberCaching.cpp", + "TestReadChunking.cpp", + "TestServerCommandDispatch.cpp", + "TestWriteChunking.cpp", + ] + + # Not supported on efr32. + if (chip_device_platform != "efr32") { + test_sources += [ "TestCommissioningWindowOpener.cpp" ] + } } cflags = [ "-Wconversion" ] diff --git a/src/controller/tests/TestReadChunking.cpp b/src/controller/tests/TestReadChunking.cpp index 4f2251b857..989d910052 100644 --- a/src/controller/tests/TestReadChunking.cpp +++ b/src/controller/tests/TestReadChunking.cpp @@ -576,7 +576,7 @@ TEST_F(TestReadChunking, TestListChunking) { TestReadCallback readCallback; - ChipLogDetail(DataManagement, "Running iteration %d\n", packetSize); + ChipLogDetail(DataManagement, "Running iteration %d\n", static_cast(packetSize)); gIterationCount = packetSize; diff --git a/src/controller/tests/TestWriteChunking.cpp b/src/controller/tests/TestWriteChunking.cpp index 5bb7ef9521..4efc098186 100644 --- a/src/controller/tests/TestWriteChunking.cpp +++ b/src/controller/tests/TestWriteChunking.cpp @@ -231,7 +231,7 @@ TEST_F(TestWriteChunking, TestListChunking) CHIP_ERROR err = CHIP_NO_ERROR; TestWriteCallback writeCallback; - ChipLogDetail(DataManagement, "Running iteration %d\n", i); + ChipLogDetail(DataManagement, "Running iteration %d\n", static_cast(i)); gIterationCount = i; diff --git a/src/controller/tests/data_model/BUILD.gn b/src/controller/tests/data_model/BUILD.gn index 9bf2eac939..ca0f8a30af 100644 --- a/src/controller/tests/data_model/BUILD.gn +++ b/src/controller/tests/data_model/BUILD.gn @@ -29,13 +29,15 @@ chip_test_suite("data_model") { ] test_sources = [] - if (chip_device_platform != "mbed" && chip_device_platform != "efr32" && - chip_device_platform != "esp32" && chip_device_platform != "fake") { + if (chip_device_platform != "mbed" && chip_device_platform != "esp32" && + chip_device_platform != "fake") { test_sources += [ "TestCommands.cpp", - "TestRead.cpp", "TestWrite.cpp", ] + if (chip_device_platform != "efr32") { + test_sources += [ "TestRead.cpp" ] + } } public_deps = [ diff --git a/src/controller/tests/data_model/TestRead.cpp b/src/controller/tests/data_model/TestRead.cpp index 6724e0d589..136fbc243d 100644 --- a/src/controller/tests/data_model/TestRead.cpp +++ b/src/controller/tests/data_model/TestRead.cpp @@ -118,6 +118,9 @@ class TestRead : public chip::Test::AppContext, public app::ReadHandler::Applica void SetUp() override { chip::Test::AppContext::SetUp(); + // Register app callback, so we can test it as well to ensure we get the right + // number of SubscriptionEstablishment/Termination callbacks. + InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(this); mOldProvider = InteractionModelEngine::GetInstance()->SetDataModelProvider(&CustomDataModel::Instance()); chip::Test::SetMockNodeConfig(TestMockNodeConfig()); } @@ -127,6 +130,7 @@ class TestRead : public chip::Test::AppContext, public app::ReadHandler::Applica { chip::Test::ResetMockNodeConfig(); InteractionModelEngine::GetInstance()->SetDataModelProvider(mOldProvider); + InteractionModelEngine::GetInstance()->UnregisterReadHandlerAppCallback(); chip::Test::AppContext::TearDown(); } @@ -270,11 +274,6 @@ TEST_F(TestRead, TestReadSubscribeAttributeResponseWithVersionOnlyCache) chip::app::ClusterStateCache cache(delegate, Optional::Missing(), false /*cachedData*/); chip::app::ReadPrepareParams readPrepareParams(GetSessionBobToAlice()); - // - // Test the application callback as well to ensure we get the right number of SubscriptionEstablishment/Termination - // callbacks. - // - app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(this); // read of E2C2A* and E3C2A2. Expect cache E2C2 version { @@ -352,11 +351,6 @@ TEST_F(TestRead, TestReadSubscribeAttributeResponseWithCache) chip::app::ReadPrepareParams readPrepareParams(GetSessionBobToAlice()); readPrepareParams.mMinIntervalFloorSeconds = 0; readPrepareParams.mMaxIntervalCeilingSeconds = 4; - // - // Test the application callback as well to ensure we get the right number of SubscriptionEstablishment/Termination - // callbacks. - // - app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(this); [[maybe_unused]] int testId = 0; @@ -1691,12 +1685,6 @@ TEST_F(TestRead, TestReadHandler_MultipleSubscriptions) numSubscriptionEstablishedCalls++; }; - // - // Test the application callback as well to ensure we get the right number of SubscriptionEstablishment/Termination - // callbacks. - // - app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(this); - // // Try to issue parallel subscriptions that will exceed the value for app::InteractionModelEngine::kReadHandlerPoolSize. // If heap allocation is correctly setup, this should result in it successfully servicing more than the number @@ -1727,7 +1715,6 @@ TEST_F(TestRead, TestReadHandler_MultipleSubscriptions) EXPECT_EQ(GetExchangeManager().GetNumActiveExchanges(), 0u); SetMRPMode(chip::Test::MessagingContext::MRPMode::kDefault); - app::InteractionModelEngine::GetInstance()->UnregisterReadHandlerAppCallback(); } TEST_F(TestRead, TestReadHandler_SubscriptionAppRejection) @@ -1756,12 +1743,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionAppRejection) numSubscriptionEstablishedCalls++; }; - // - // Test the application callback as well to ensure we get the right number of SubscriptionEstablishment/Termination - // callbacks. - // - app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(this); - // // Test the application rejecting subscriptions. // @@ -1788,7 +1769,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionAppRejection) EXPECT_EQ(GetExchangeManager().GetNumActiveExchanges(), 0u); - app::InteractionModelEngine::GetInstance()->UnregisterReadHandlerAppCallback(); mEmitSubscriptionError = false; } @@ -1831,17 +1811,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionReportingIntervalsTest1) numSubscriptionEstablishedCalls++; }; - // - // Test the application callback as well to ensure we get the right number of SubscriptionEstablishment/Termination - // callbacks. - // - app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(this); - - // - // Test the server-side application altering the subscription intervals. - // - mAlterSubscriptionIntervals = false; - EXPECT_EQ(Controller::SubscribeAttribute( &GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, 5, 5, onSubscriptionEstablishedCb, nullptr, true), @@ -1863,9 +1832,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionReportingIntervalsTest1) EXPECT_EQ(mNumActiveSubscriptions, 0); EXPECT_EQ(GetExchangeManager().GetNumActiveExchanges(), 0u); - - app::InteractionModelEngine::GetInstance()->UnregisterReadHandlerAppCallback(); - mAlterSubscriptionIntervals = false; } // Subscriber sends the request with particular max-interval value: @@ -1906,17 +1872,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionReportingIntervalsTest2) numSubscriptionEstablishedCalls++; }; - // - // Test the application callback as well to ensure we get the right number of SubscriptionEstablishment/Termination - // callbacks. - // - app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(this); - - // - // Test the server-side application altering the subscription intervals. - // - mAlterSubscriptionIntervals = false; - EXPECT_EQ(Controller::SubscribeAttribute( &GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, 0, 10, onSubscriptionEstablishedCb, nullptr, true), @@ -1938,9 +1893,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionReportingIntervalsTest2) EXPECT_EQ(mNumActiveSubscriptions, 0); EXPECT_EQ(GetExchangeManager().GetNumActiveExchanges(), 0u); - - app::InteractionModelEngine::GetInstance()->UnregisterReadHandlerAppCallback(); - mAlterSubscriptionIntervals = false; } // Subscriber sends the request with particular max-interval value: @@ -1981,12 +1933,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionReportingIntervalsTest3) numSubscriptionEstablishedCalls++; }; - // - // Test the application callback as well to ensure we get the right number of SubscriptionEstablishment/Termination - // callbacks. - // - app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(this); - // // Test the server-side application altering the subscription intervals. // @@ -2013,9 +1959,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionReportingIntervalsTest3) EXPECT_EQ(mNumActiveSubscriptions, 0); EXPECT_EQ(GetExchangeManager().GetNumActiveExchanges(), 0u); - - app::InteractionModelEngine::GetInstance()->UnregisterReadHandlerAppCallback(); - mAlterSubscriptionIntervals = false; } #endif // CHIP_CONFIG_ENABLE_ICD_SERVER @@ -2049,12 +1992,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionReportingIntervalsTest4) numSubscriptionEstablishedCalls++; }; - // - // Test the application callback as well to ensure we get the right number of SubscriptionEstablishment/Termination - // callbacks. - // - app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(this); - // // Test the server-side application altering the subscription intervals. // @@ -2080,9 +2017,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionReportingIntervalsTest4) EXPECT_EQ(mNumActiveSubscriptions, 0); EXPECT_EQ(GetExchangeManager().GetNumActiveExchanges(), 0u); - - app::InteractionModelEngine::GetInstance()->UnregisterReadHandlerAppCallback(); - mAlterSubscriptionIntervals = false; } #if CHIP_CONFIG_ENABLE_ICD_SERVER != 1 @@ -2125,17 +2059,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionReportingIntervalsTest5) numSubscriptionEstablishedCalls++; }; - // - // Test the application callback as well to ensure we get the right number of SubscriptionEstablishment/Termination - // callbacks. - // - app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(this); - - // - // Test the server-side application altering the subscription intervals. - // - mAlterSubscriptionIntervals = false; - EXPECT_EQ(Controller::SubscribeAttribute( &GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, 0, 4000, onSubscriptionEstablishedCb, nullptr, true), @@ -2157,9 +2080,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionReportingIntervalsTest5) EXPECT_EQ(mNumActiveSubscriptions, 0); EXPECT_EQ(GetExchangeManager().GetNumActiveExchanges(), 0u); - - app::InteractionModelEngine::GetInstance()->UnregisterReadHandlerAppCallback(); - mAlterSubscriptionIntervals = false; } // Subscriber sends the request with particular max-interval value: @@ -2200,12 +2120,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionReportingIntervalsTest6) numSubscriptionEstablishedCalls++; }; - // - // Test the application callback as well to ensure we get the right number of SubscriptionEstablishment/Termination - // callbacks. - // - app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(this); - // // Test the server-side application altering the subscription intervals. // @@ -2232,9 +2146,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionReportingIntervalsTest6) EXPECT_EQ(mNumActiveSubscriptions, 0); EXPECT_EQ(GetExchangeManager().GetNumActiveExchanges(), 0u); - - app::InteractionModelEngine::GetInstance()->UnregisterReadHandlerAppCallback(); - mAlterSubscriptionIntervals = false; } // Subscriber sends the request with particular max-interval value: @@ -2274,11 +2185,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionReportingIntervalsTest7) numSubscriptionEstablishedCalls++; }; - // - // Test the application callback as well to ensure we get the right number of SubscriptionEstablishment/Termination - // callbacks. - // - app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(this); // // Test the server-side application altering the subscription intervals. @@ -2306,9 +2212,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionReportingIntervalsTest7) EXPECT_EQ(mNumActiveSubscriptions, 0); EXPECT_EQ(GetExchangeManager().GetNumActiveExchanges(), 0u); - - app::InteractionModelEngine::GetInstance()->UnregisterReadHandlerAppCallback(); - mAlterSubscriptionIntervals = false; } #endif // CHIP_CONFIG_ENABLE_ICD_SERVER @@ -2341,11 +2244,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionReportingIntervalsTest8) chip::SubscriptionId aSubscriptionId) { numSubscriptionEstablishedCalls++; }; - // - // Test the application callback as well to ensure we get the right number of SubscriptionEstablishment/Termination - // callbacks. - // - app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(this); // // Test the server-side application altering the subscription intervals. @@ -2372,9 +2270,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionReportingIntervalsTest8) EXPECT_EQ(mNumActiveSubscriptions, 0); EXPECT_EQ(GetExchangeManager().GetNumActiveExchanges(), 0u); - - app::InteractionModelEngine::GetInstance()->UnregisterReadHandlerAppCallback(); - mAlterSubscriptionIntervals = false; } // Subscriber sends the request with particular max-interval value: @@ -2405,17 +2300,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionReportingIntervalsTest9) numSubscriptionEstablishedCalls++; }; - // - // Test the application callback as well to ensure we get the right number of SubscriptionEstablishment/Termination - // callbacks. - // - app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(this); - - // - // Test the server-side application altering the subscription intervals. - // - mAlterSubscriptionIntervals = false; - EXPECT_EQ(Controller::SubscribeAttribute( &GetExchangeManager(), sessionHandle, kTestEndpointId, onSuccessCb, onFailureCb, 5, 4, onSubscriptionEstablishedCb, nullptr, true), @@ -2434,9 +2318,6 @@ TEST_F(TestRead, TestReadHandler_SubscriptionReportingIntervalsTest9) EXPECT_EQ(mNumActiveSubscriptions, 0); EXPECT_EQ(GetExchangeManager().GetNumActiveExchanges(), 0u); - - app::InteractionModelEngine::GetInstance()->UnregisterReadHandlerAppCallback(); - mAlterSubscriptionIntervals = false; } /** @@ -3291,8 +3172,6 @@ TEST_F(TestRead, TestReadHandler_KillOverQuotaSubscriptions) app::InteractionModelEngine::kMinSupportedSubscriptionsPerFabric * GetFabricTable().FabricCount(); const auto kExpectedParallelPaths = kExpectedParallelSubs * app::InteractionModelEngine::kMinSupportedPathsPerSubscription; - app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(this); - // Here, we set up two background perpetual read requests to simulate parallel Read + Subscriptions. // We don't care about the data read, we only care about the existence of such read transactions. TestReadCallback readCallback; @@ -3502,8 +3381,6 @@ TEST_F(TestRead, TestReadHandler_KillOldestSubscriptions) app::InteractionModelEngine::kMinSupportedSubscriptionsPerFabric * GetFabricTable().FabricCount(); const auto kExpectedParallelPaths = kExpectedParallelSubs * app::InteractionModelEngine::kMinSupportedPathsPerSubscription; - app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(this); - TestReadCallback readCallback; std::vector> readClients; @@ -3621,8 +3498,6 @@ TEST_F(TestRead, TestReadHandler_ParallelReads) auto sessionHandle = GetSessionBobToAlice(); - app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(this); - auto TestCase = [&](const TestReadHandler_ParallelReads_TestCase_Parameters & params, std::function body) { TestReadHandler_ParallelReads_TestCase(this, params, body); }; diff --git a/src/credentials/CHIPCert.cpp b/src/credentials/CHIPCert.cpp index 5bad0ab750..034b287397 100644 --- a/src/credentials/CHIPCert.cpp +++ b/src/credentials/CHIPCert.cpp @@ -989,7 +989,7 @@ CHIP_ERROR ChipDN::DecodeFromASN1(ASN1Reader & reader) // Only one AttributeTypeAndValue allowed per RDN. err = reader.Next(); - ReturnErrorCodeIf(err == CHIP_NO_ERROR, ASN1_ERROR_UNSUPPORTED_ENCODING); + VerifyOrReturnError(err != CHIP_NO_ERROR, ASN1_ERROR_UNSUPPORTED_ENCODING); VerifyOrReturnError(err == ASN1_END, err); } ASN1_EXIT_SET; @@ -1245,7 +1245,7 @@ CHIP_ERROR ExtractNodeIdFabricIdFromOpCert(const ChipCertificateData & opcert, N { // Since we assume the cert is pre-validated, we are going to assume that // its subject in fact has both a node id and a fabric id. - ReturnErrorCodeIf(outNodeId == nullptr || outFabricId == nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(outNodeId != nullptr && outFabricId != nullptr, CHIP_ERROR_INVALID_ARGUMENT); NodeId nodeId = 0; FabricId fabricId = kUndefinedFabricId; bool foundNodeId = false; @@ -1341,7 +1341,7 @@ CHIP_ERROR ExtractCATsFromOpCert(const ChipCertificateData & opcert, CATValues & // This error should never happen in practice because valid NOC cannot have more // than kMaxSubjectCATAttributeCount CATs in its subject. The check that it is // valid NOC was done above. - ReturnErrorCodeIf(catCount == cats.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(catCount != cats.size(), CHIP_ERROR_BUFFER_TOO_SMALL); VerifyOrReturnError(CanCastTo(rdn.mChipVal), CHIP_ERROR_INVALID_ARGUMENT); cats.values[catCount++] = static_cast(rdn.mChipVal); } diff --git a/src/credentials/CHIPCertToX509.cpp b/src/credentials/CHIPCertToX509.cpp index 9e0549d13f..b5447780ce 100644 --- a/src/credentials/CHIPCertToX509.cpp +++ b/src/credentials/CHIPCertToX509.cpp @@ -453,7 +453,7 @@ static CHIP_ERROR DecodeConvertECDSASignature(TLVReader & reader, ASN1Writer & w ReturnErrorOnFailure(DecodeECDSASignature(reader, certData)); // Converting the signature is a bit of work, so explicitly check if we have a null writer - ReturnErrorCodeIf(writer.IsNullWriter(), CHIP_NO_ERROR); + VerifyOrReturnError(!writer.IsNullWriter(), CHIP_NO_ERROR); // signatureValue BIT STRING // Per RFC3279, the ECDSA signature value is encoded in DER encapsulated in the signatureValue BIT STRING. diff --git a/src/credentials/FabricTable.cpp b/src/credentials/FabricTable.cpp index 8ed838243d..1c4001cefe 100644 --- a/src/credentials/FabricTable.cpp +++ b/src/credentials/FabricTable.cpp @@ -436,7 +436,7 @@ CHIP_ERROR FabricTable::VerifyCredentials(const ByteSpan & noc, const ByteSpan & err = ExtractFabricIdFromCert(certificates.GetCertSet()[1], &icacFabricId); if (err == CHIP_NO_ERROR) { - ReturnErrorCodeIf(icacFabricId != outFabricId, CHIP_ERROR_FABRIC_MISMATCH_ON_ICA); + VerifyOrReturnError(icacFabricId == outFabricId, CHIP_ERROR_FABRIC_MISMATCH_ON_ICA); } // FabricId is optional field in ICAC and "not found" code is not treated as error. else if (err != CHIP_ERROR_NOT_FOUND) @@ -449,7 +449,7 @@ CHIP_ERROR FabricTable::VerifyCredentials(const ByteSpan & noc, const ByteSpan & err = ExtractFabricIdFromCert(certificates.GetCertSet()[0], &rcacFabricId); if (err == CHIP_NO_ERROR) { - ReturnErrorCodeIf(rcacFabricId != outFabricId, CHIP_ERROR_WRONG_CERT_DN); + VerifyOrReturnError(rcacFabricId == outFabricId, CHIP_ERROR_WRONG_CERT_DN); } // FabricId is optional field in RCAC and "not found" code is not treated as error. else if (err != CHIP_ERROR_NOT_FOUND) @@ -660,7 +660,7 @@ CHIP_ERROR FabricTable::FetchRootPubkey(FabricIndex fabricIndex, Crypto::P256Pub { MATTER_TRACE_SCOPE("FetchRootPubkey", "Fabric"); const FabricInfo * fabricInfo = FindFabricWithIndex(fabricIndex); - ReturnErrorCodeIf(fabricInfo == nullptr, CHIP_ERROR_INVALID_FABRIC_INDEX); + VerifyOrReturnError(fabricInfo != nullptr, CHIP_ERROR_INVALID_FABRIC_INDEX); return fabricInfo->FetchRootPubkey(outPublicKey); } @@ -861,9 +861,9 @@ FabricTable::AddOrUpdateInner(FabricIndex fabricIndex, bool isAddition, Crypto:: Platform::ScopedMemoryBuffer icacBuf; Platform::ScopedMemoryBuffer rcacBuf; - ReturnErrorCodeIf(!nocBuf.Alloc(kMaxCHIPCertLength), CHIP_ERROR_NO_MEMORY); - ReturnErrorCodeIf(!icacBuf.Alloc(kMaxCHIPCertLength), CHIP_ERROR_NO_MEMORY); - ReturnErrorCodeIf(!rcacBuf.Alloc(kMaxCHIPCertLength), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(nocBuf.Alloc(kMaxCHIPCertLength), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(icacBuf.Alloc(kMaxCHIPCertLength), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(rcacBuf.Alloc(kMaxCHIPCertLength), CHIP_ERROR_NO_MEMORY); MutableByteSpan nocSpan{ nocBuf.Get(), kMaxCHIPCertLength }; MutableByteSpan icacSpan{ icacBuf.Get(), kMaxCHIPCertLength }; @@ -1590,7 +1590,7 @@ CHIP_ERROR FabricTable::AllocatePendingOperationalKey(Optional fabr if (fabricIndex.HasValue()) { // Check we not are trying to do an update but also change the root: forbidden - ReturnErrorCodeIf(mStateFlags.Has(StateFlags::kIsTrustedRootPending), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(!mStateFlags.Has(StateFlags::kIsTrustedRootPending), CHIP_ERROR_INCORRECT_STATE); // Fabric update case (e.g. UpdateNOC): we already know the fabric index fabricIndexToUse = fabricIndex.Value(); @@ -1621,8 +1621,8 @@ CHIP_ERROR FabricTable::AddNewPendingTrustedRootCert(const ByteSpan & rcac) VerifyOrReturnError(mOpCertStore != nullptr, CHIP_ERROR_INCORRECT_STATE); // We should not already have pending NOC chain elements when we get here - ReturnErrorCodeIf( - mStateFlags.HasAny(StateFlags::kIsTrustedRootPending, StateFlags::kIsUpdatePending, StateFlags::kIsAddPending), + VerifyOrReturnError( + !mStateFlags.HasAny(StateFlags::kIsTrustedRootPending, StateFlags::kIsUpdatePending, StateFlags::kIsAddPending), CHIP_ERROR_INCORRECT_STATE); EnsureNextAvailableFabricIndexUpdated(); @@ -1738,7 +1738,7 @@ CHIP_ERROR FabricTable::AddNewPendingFabricCommon(const ByteSpan & noc, const By { FabricIndex collidingFabricIndex = kUndefinedFabricIndex; ReturnErrorOnFailure(FindExistingFabricByNocChaining(fabricIndexToUse, noc, collidingFabricIndex)); - ReturnErrorCodeIf(collidingFabricIndex != kUndefinedFabricIndex, CHIP_ERROR_FABRIC_EXISTS); + VerifyOrReturnError(collidingFabricIndex == kUndefinedFabricIndex, CHIP_ERROR_FABRIC_EXISTS); } // We don't have a collision, handle the temp insert of NOC/ICAC @@ -1790,7 +1790,7 @@ CHIP_ERROR FabricTable::UpdatePendingFabricCommon(FabricIndex fabricIndex, const // Make sure we are updating at least an existing FabricIndex const auto * fabricInfo = FindFabricWithIndex(fabricIndex); - ReturnErrorCodeIf(fabricInfo == nullptr, CHIP_ERROR_INVALID_FABRIC_INDEX); + VerifyOrReturnError(fabricInfo != nullptr, CHIP_ERROR_INVALID_FABRIC_INDEX); // Check for an existing fabric matching RCAC and FabricID. We must find a correct // existing fabric that chains to same root. We assume the stored root is correct. @@ -1798,7 +1798,7 @@ CHIP_ERROR FabricTable::UpdatePendingFabricCommon(FabricIndex fabricIndex, const { FabricIndex collidingFabricIndex = kUndefinedFabricIndex; ReturnErrorOnFailure(FindExistingFabricByNocChaining(fabricIndex, noc, collidingFabricIndex)); - ReturnErrorCodeIf(collidingFabricIndex != fabricIndex, CHIP_ERROR_INVALID_FABRIC_INDEX); + VerifyOrReturnError(collidingFabricIndex == fabricIndex, CHIP_ERROR_INVALID_FABRIC_INDEX); } // Handle the temp insert of NOC/ICAC @@ -2110,7 +2110,7 @@ CHIP_ERROR FabricTable::SetFabricLabel(FabricIndex fabricIndex, const CharSpan & VerifyOrReturnError(mStorage != nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(IsValidFabricIndex(fabricIndex), CHIP_ERROR_INVALID_FABRIC_INDEX); - ReturnErrorCodeIf(fabricLabel.size() > kFabricLabelMaxLengthInBytes, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(fabricLabel.size() <= kFabricLabelMaxLengthInBytes, CHIP_ERROR_INVALID_ARGUMENT); FabricInfo * fabricInfo = GetMutableFabricByIndex(fabricIndex); bool fabricIsInitialized = (fabricInfo != nullptr) && fabricInfo->IsInitialized(); diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index 9515ffb888..2bf8af51af 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -96,7 +96,7 @@ class DLL_EXPORT FabricInfo CompressedFabricId GetCompressedFabricId() const { return mCompressedFabricId; } CHIP_ERROR GetCompressedFabricIdBytes(MutableByteSpan & compressedFabricId) const { - ReturnErrorCodeIf(compressedFabricId.size() != sizeof(uint64_t), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(compressedFabricId.size() == sizeof(uint64_t), CHIP_ERROR_INVALID_ARGUMENT); Encoding::BigEndian::Put64(compressedFabricId.data(), GetCompressedFabricId()); return CHIP_NO_ERROR; } diff --git a/src/credentials/PersistentStorageOpCertStore.cpp b/src/credentials/PersistentStorageOpCertStore.cpp index a2c0eb8bfb..bda1e06d9a 100644 --- a/src/credentials/PersistentStorageOpCertStore.cpp +++ b/src/credentials/PersistentStorageOpCertStore.cpp @@ -210,17 +210,17 @@ bool PersistentStorageOpCertStore::HasCertificateForFabric(FabricIndex fabricInd CHIP_ERROR PersistentStorageOpCertStore::AddNewTrustedRootCertForFabric(FabricIndex fabricIndex, const ByteSpan & rcac) { - ReturnErrorCodeIf(mStorage == nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(!IsValidFabricIndex(fabricIndex), CHIP_ERROR_INVALID_FABRIC_INDEX); - ReturnErrorCodeIf(rcac.empty() || (rcac.size() > Credentials::kMaxCHIPCertLength), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(mStorage != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(IsValidFabricIndex(fabricIndex), CHIP_ERROR_INVALID_FABRIC_INDEX); + VerifyOrReturnError(!rcac.empty() && (rcac.size() <= Credentials::kMaxCHIPCertLength), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(mStateFlags.HasAny(StateFlags::kUpdateOpCertsCalled, StateFlags::kAddNewTrustedRootCalled, - StateFlags::kAddNewOpCertsCalled), - CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(StorageHasCertificate(mStorage, fabricIndex, CertChainElement::kRcac), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(!mStateFlags.HasAny(StateFlags::kUpdateOpCertsCalled, StateFlags::kAddNewTrustedRootCalled, + StateFlags::kAddNewOpCertsCalled), + CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(!StorageHasCertificate(mStorage, fabricIndex, CertChainElement::kRcac), CHIP_ERROR_INCORRECT_STATE); Platform::ScopedMemoryBufferWithSize rcacBuf; - ReturnErrorCodeIf(!rcacBuf.Alloc(rcac.size()), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(rcacBuf.Alloc(rcac.size()), CHIP_ERROR_NO_MEMORY); memcpy(rcacBuf.Get(), rcac.data(), rcac.size()); mPendingRcac = std::move(rcacBuf); @@ -234,33 +234,33 @@ CHIP_ERROR PersistentStorageOpCertStore::AddNewTrustedRootCertForFabric(FabricIn CHIP_ERROR PersistentStorageOpCertStore::AddNewOpCertsForFabric(FabricIndex fabricIndex, const ByteSpan & noc, const ByteSpan & icac) { - ReturnErrorCodeIf(mStorage == nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(!IsValidFabricIndex(fabricIndex), CHIP_ERROR_INVALID_FABRIC_INDEX); - ReturnErrorCodeIf(noc.empty() || (noc.size() > Credentials::kMaxCHIPCertLength), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(icac.size() > Credentials::kMaxCHIPCertLength, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(mStorage != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(IsValidFabricIndex(fabricIndex), CHIP_ERROR_INVALID_FABRIC_INDEX); + VerifyOrReturnError(!noc.empty() && (noc.size() <= Credentials::kMaxCHIPCertLength), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(icac.size() <= Credentials::kMaxCHIPCertLength, CHIP_ERROR_INVALID_ARGUMENT); // Can't have called UpdateOpCertsForFabric first, or called with pending certs - ReturnErrorCodeIf(mStateFlags.HasAny(StateFlags::kUpdateOpCertsCalled, StateFlags::kAddNewOpCertsCalled), - CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(!mStateFlags.HasAny(StateFlags::kUpdateOpCertsCalled, StateFlags::kAddNewOpCertsCalled), + CHIP_ERROR_INCORRECT_STATE); // Need to have trusted roots installed to make the chain valid - ReturnErrorCodeIf(!mStateFlags.Has(StateFlags::kAddNewTrustedRootCalled), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mStateFlags.Has(StateFlags::kAddNewTrustedRootCalled), CHIP_ERROR_INCORRECT_STATE); // fabricIndex must match the current pending fabric - ReturnErrorCodeIf(fabricIndex != mPendingFabricIndex, CHIP_ERROR_INVALID_FABRIC_INDEX); + VerifyOrReturnError(fabricIndex == mPendingFabricIndex, CHIP_ERROR_INVALID_FABRIC_INDEX); // Can't have persisted NOC/ICAC for same fabric if adding - ReturnErrorCodeIf(StorageHasCertificate(mStorage, fabricIndex, CertChainElement::kNoc), CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(StorageHasCertificate(mStorage, fabricIndex, CertChainElement::kIcac), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(!StorageHasCertificate(mStorage, fabricIndex, CertChainElement::kNoc), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(!StorageHasCertificate(mStorage, fabricIndex, CertChainElement::kIcac), CHIP_ERROR_INCORRECT_STATE); Platform::ScopedMemoryBufferWithSize nocBuf; - ReturnErrorCodeIf(!nocBuf.Alloc(noc.size()), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(nocBuf.Alloc(noc.size()), CHIP_ERROR_NO_MEMORY); memcpy(nocBuf.Get(), noc.data(), noc.size()); Platform::ScopedMemoryBufferWithSize icacBuf; if (icac.size() > 0) { - ReturnErrorCodeIf(!icacBuf.Alloc(icac.size()), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(icacBuf.Alloc(icac.size()), CHIP_ERROR_NO_MEMORY); memcpy(icacBuf.Get(), icac.data(), icac.size()); } @@ -275,35 +275,35 @@ CHIP_ERROR PersistentStorageOpCertStore::AddNewOpCertsForFabric(FabricIndex fabr CHIP_ERROR PersistentStorageOpCertStore::UpdateOpCertsForFabric(FabricIndex fabricIndex, const ByteSpan & noc, const ByteSpan & icac) { - ReturnErrorCodeIf(mStorage == nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(!IsValidFabricIndex(fabricIndex), CHIP_ERROR_INVALID_FABRIC_INDEX); - ReturnErrorCodeIf(noc.empty() || (noc.size() > Credentials::kMaxCHIPCertLength), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(icac.size() > Credentials::kMaxCHIPCertLength, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(mStorage != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(IsValidFabricIndex(fabricIndex), CHIP_ERROR_INVALID_FABRIC_INDEX); + VerifyOrReturnError(!noc.empty() && (noc.size() <= Credentials::kMaxCHIPCertLength), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(icac.size() <= Credentials::kMaxCHIPCertLength, CHIP_ERROR_INVALID_ARGUMENT); // Can't have called AddNewOpCertsForFabric first, and should never get here after AddNewTrustedRootCertForFabric. - ReturnErrorCodeIf(mStateFlags.HasAny(StateFlags::kAddNewOpCertsCalled, StateFlags::kAddNewTrustedRootCalled), - CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(!mStateFlags.HasAny(StateFlags::kAddNewOpCertsCalled, StateFlags::kAddNewTrustedRootCalled), + CHIP_ERROR_INCORRECT_STATE); // Can't have already pending NOC from UpdateOpCerts not yet committed - ReturnErrorCodeIf(mStateFlags.Has(StateFlags::kUpdateOpCertsCalled), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(!mStateFlags.Has(StateFlags::kUpdateOpCertsCalled), CHIP_ERROR_INCORRECT_STATE); // Need to have trusted roots installed to make the chain valid - ReturnErrorCodeIf(!StorageHasCertificate(mStorage, fabricIndex, CertChainElement::kRcac), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(StorageHasCertificate(mStorage, fabricIndex, CertChainElement::kRcac), CHIP_ERROR_INCORRECT_STATE); // Must have persisted NOC for same fabric if updating - ReturnErrorCodeIf(!StorageHasCertificate(mStorage, fabricIndex, CertChainElement::kNoc), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(StorageHasCertificate(mStorage, fabricIndex, CertChainElement::kNoc), CHIP_ERROR_INCORRECT_STATE); // Don't check for ICAC, we may not have had one before, but assume that if NOC is there, a // previous chain was at least partially there Platform::ScopedMemoryBufferWithSize nocBuf; - ReturnErrorCodeIf(!nocBuf.Alloc(noc.size()), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(nocBuf.Alloc(noc.size()), CHIP_ERROR_NO_MEMORY); memcpy(nocBuf.Get(), noc.data(), noc.size()); Platform::ScopedMemoryBufferWithSize icacBuf; if (icac.size() > 0) { - ReturnErrorCodeIf(!icacBuf.Alloc(icac.size()), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(icacBuf.Alloc(icac.size()), CHIP_ERROR_NO_MEMORY); memcpy(icacBuf.Get(), icac.data(), icac.size()); } @@ -329,8 +329,8 @@ CHIP_ERROR PersistentStorageOpCertStore::CommitOpCertsForFabric(FabricIndex fabr { // Neither of these conditions should have occurred based on other interlocks, but since // committing certificates is a dangerous operation, we absolutely validate our assumptions. - ReturnErrorCodeIf(mStateFlags.Has(StateFlags::kUpdateOpCertsCalled), CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(!mStateFlags.Has(StateFlags::kAddNewTrustedRootCalled), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(!mStateFlags.Has(StateFlags::kUpdateOpCertsCalled), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mStateFlags.Has(StateFlags::kAddNewTrustedRootCalled), CHIP_ERROR_INCORRECT_STATE); } // TODO: Handle transaction marking to revert partial certs at next boot if we get interrupted by reboot. @@ -405,7 +405,7 @@ CHIP_ERROR PersistentStorageOpCertStore::RemoveOpCertsForFabric(FabricIndex fabr VerifyOrReturnError(IsValidFabricIndex(fabricIndex), CHIP_ERROR_INVALID_FABRIC_INDEX); // If there was *no* state, pending or persisted, we have an error - ReturnErrorCodeIf(!HasAnyCertificateForFabric(fabricIndex), CHIP_ERROR_INVALID_FABRIC_INDEX); + VerifyOrReturnError(HasAnyCertificateForFabric(fabricIndex), CHIP_ERROR_INVALID_FABRIC_INDEX); // Clear any pending state RevertPendingOpCerts(); diff --git a/src/credentials/TestOnlyLocalCertificateAuthority.h b/src/credentials/TestOnlyLocalCertificateAuthority.h index fb731f9fc9..719b6495a0 100644 --- a/src/credentials/TestOnlyLocalCertificateAuthority.h +++ b/src/credentials/TestOnlyLocalCertificateAuthority.h @@ -161,9 +161,9 @@ class TestOnlyLocalCertificateAuthority if (mIncludeIcac) { Platform::ScopedMemoryBufferWithSize icacDerBuf; - ReturnErrorCodeIf(!icacDerBuf.Alloc(Credentials::kMaxDERCertLength), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(icacDerBuf.Alloc(Credentials::kMaxDERCertLength), CHIP_ERROR_NO_MEMORY); Platform::ScopedMemoryBufferWithSize icacChipBuf; - ReturnErrorCodeIf(!icacChipBuf.Alloc(Credentials::kMaxCHIPCertLength), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(icacChipBuf.Alloc(Credentials::kMaxCHIPCertLength), CHIP_ERROR_NO_MEMORY); ReturnErrorOnFailure(icac_dn.AddAttribute_MatterFabricId(fabricId)); ReturnErrorOnFailure(icac_dn.AddAttribute_MatterICACId(1234)); @@ -176,7 +176,7 @@ class TestOnlyLocalCertificateAuthority MutableByteSpan icacChipSpan{ icacChipBuf.Get(), icacChipBuf.AllocatedSize() }; ReturnErrorOnFailure(Credentials::ConvertX509CertToChipCert(icacDerSpan, icacChipSpan)); - ReturnErrorCodeIf(!mLastIcac.Alloc(icacChipSpan.size()), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(mLastIcac.Alloc(icacChipSpan.size()), CHIP_ERROR_NO_MEMORY); memcpy(mLastIcac.Get(), icacChipSpan.data(), icacChipSpan.size()); @@ -187,9 +187,9 @@ class TestOnlyLocalCertificateAuthority // Generate NOC always, either issued from ICAC if present or from RCAC { Platform::ScopedMemoryBufferWithSize nocDerBuf; - ReturnErrorCodeIf(!nocDerBuf.Alloc(Credentials::kMaxDERCertLength), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(nocDerBuf.Alloc(Credentials::kMaxDERCertLength), CHIP_ERROR_NO_MEMORY); Platform::ScopedMemoryBufferWithSize nocChipBuf; - ReturnErrorCodeIf(!nocChipBuf.Alloc(Credentials::kMaxCHIPCertLength), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(nocChipBuf.Alloc(Credentials::kMaxCHIPCertLength), CHIP_ERROR_NO_MEMORY); ReturnErrorOnFailure(noc_dn.AddAttribute_MatterFabricId(fabricId)); ReturnErrorOnFailure(noc_dn.AddAttribute_MatterNodeId(nodeId)); @@ -202,7 +202,7 @@ class TestOnlyLocalCertificateAuthority MutableByteSpan nocChipSpan{ nocChipBuf.Get(), nocChipBuf.AllocatedSize() }; ReturnErrorOnFailure(Credentials::ConvertX509CertToChipCert(nocDerSpan, nocChipSpan)); - ReturnErrorCodeIf(!mLastNoc.Alloc(nocChipSpan.size()), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(mLastNoc.Alloc(nocChipSpan.size()), CHIP_ERROR_NO_MEMORY); memcpy(mLastNoc.Get(), nocChipSpan.data(), nocChipSpan.size()); } diff --git a/src/credentials/attestation_verifier/DefaultDeviceAttestationVerifier.cpp b/src/credentials/attestation_verifier/DefaultDeviceAttestationVerifier.cpp index 14759d850f..f9cf68e6cf 100644 --- a/src/credentials/attestation_verifier/DefaultDeviceAttestationVerifier.cpp +++ b/src/credentials/attestation_verifier/DefaultDeviceAttestationVerifier.cpp @@ -627,9 +627,9 @@ bool CsaCdKeysTrustStore::IsCdTestKey(const ByteSpan & kid) const CHIP_ERROR CsaCdKeysTrustStore::AddTrustedKey(const ByteSpan & kid, const Crypto::P256PublicKey & pubKey) { - ReturnErrorCodeIf(kid.size() > SingleKeyEntry::kMaxKidSize, CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(kid.empty(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(mNumTrustedKeys == kMaxNumTrustedKeys, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(kid.size() <= SingleKeyEntry::kMaxKidSize, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(!kid.empty(), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(mNumTrustedKeys != kMaxNumTrustedKeys, CHIP_ERROR_NO_MEMORY); auto & entry = mTrustedKeys[mNumTrustedKeys]; diff --git a/src/credentials/tests/BUILD.gn b/src/credentials/tests/BUILD.gn index 46e1f72434..e83749a4ec 100644 --- a/src/credentials/tests/BUILD.gn +++ b/src/credentials/tests/BUILD.gn @@ -43,7 +43,6 @@ static_library("cert_test_vectors") { chip_test_suite("tests") { output_name = "libCredentialsTest" - output_dir = "${root_out_dir}/lib" test_sources = [ "TestCertificationDeclaration.cpp", diff --git a/src/crypto/CHIPCryptoPAL.cpp b/src/crypto/CHIPCryptoPAL.cpp index fa84d786b8..2caecbcb15 100644 --- a/src/crypto/CHIPCryptoPAL.cpp +++ b/src/crypto/CHIPCryptoPAL.cpp @@ -75,7 +75,7 @@ CHIP_ERROR ReadDerUnsignedIntegerIntoRaw(Reader & reader, MutableByteSpan raw_in // Check for pseudo-zero to mark unsigned value // This means we have too large an integer (should be at most 1 byte too large), it's invalid - ReturnErrorCodeIf(integer_len > (raw_integer_out.size() + 1), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(integer_len <= (raw_integer_out.size() + 1), CHIP_ERROR_INVALID_ARGUMENT); if (integer_len == (raw_integer_out.size() + 1u)) { @@ -603,10 +603,10 @@ CHIP_ERROR Spake2pVerifier::ComputeWS(uint32_t pbkdf2IterCount, const ByteSpan & uint8_t littleEndianSetupPINCode[sizeof(uint32_t)]; Encoding::LittleEndian::Put32(littleEndianSetupPINCode, setupPin); - ReturnErrorCodeIf(salt.size() < kSpake2p_Min_PBKDF_Salt_Length || salt.size() > kSpake2p_Max_PBKDF_Salt_Length, - CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(pbkdf2IterCount < kSpake2p_Min_PBKDF_Iterations || pbkdf2IterCount > kSpake2p_Max_PBKDF_Iterations, - CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(salt.size() >= kSpake2p_Min_PBKDF_Salt_Length && salt.size() <= kSpake2p_Max_PBKDF_Salt_Length, + CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(pbkdf2IterCount >= kSpake2p_Min_PBKDF_Iterations && pbkdf2IterCount <= kSpake2p_Max_PBKDF_Iterations, + CHIP_ERROR_INVALID_ARGUMENT); return pbkdf2.pbkdf2_sha256(littleEndianSetupPINCode, sizeof(littleEndianSetupPINCode), salt.data(), salt.size(), pbkdf2IterCount, ws_len, ws); @@ -925,8 +925,8 @@ CHIP_ERROR DeriveGroupOperationalCredentials(const ByteSpan & epoch_key, const B CHIP_ERROR ExtractVIDPIDFromAttributeString(DNAttrType attrType, const ByteSpan & attr, AttestationCertVidPid & vidpidFromMatterAttr, AttestationCertVidPid & vidpidFromCNAttr) { - ReturnErrorCodeIf(attrType == DNAttrType::kUnspecified, CHIP_NO_ERROR); - ReturnErrorCodeIf(attr.empty(), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(attrType != DNAttrType::kUnspecified, CHIP_NO_ERROR); + VerifyOrReturnError(!attr.empty(), CHIP_ERROR_INVALID_ARGUMENT); if (attrType == DNAttrType::kMatterVID || attrType == DNAttrType::kMatterPID) { @@ -939,13 +939,13 @@ CHIP_ERROR ExtractVIDPIDFromAttributeString(DNAttrType attrType, const ByteSpan if (attrType == DNAttrType::kMatterVID) { // Not more than one VID attribute can be present. - ReturnErrorCodeIf(vidpidFromMatterAttr.mVendorId.HasValue(), CHIP_ERROR_WRONG_CERT_DN); + VerifyOrReturnError(!vidpidFromMatterAttr.mVendorId.HasValue(), CHIP_ERROR_WRONG_CERT_DN); vidpidFromMatterAttr.mVendorId.SetValue(static_cast(matterAttr)); } else { // Not more than one PID attribute can be present. - ReturnErrorCodeIf(vidpidFromMatterAttr.mProductId.HasValue(), CHIP_ERROR_WRONG_CERT_DN); + VerifyOrReturnError(!vidpidFromMatterAttr.mProductId.HasValue(), CHIP_ERROR_WRONG_CERT_DN); vidpidFromMatterAttr.mProductId.SetValue(matterAttr); } } diff --git a/src/crypto/CHIPCryptoPALOpenSSL.cpp b/src/crypto/CHIPCryptoPALOpenSSL.cpp index 6b4b17daf0..c1182ac8eb 100644 --- a/src/crypto/CHIPCryptoPALOpenSSL.cpp +++ b/src/crypto/CHIPCryptoPALOpenSSL.cpp @@ -2297,11 +2297,11 @@ CHIP_ERROR ReplaceCertIfResignedCertFound(const ByteSpan & referenceCertificate, MutableByteSpan referenceSKID(referenceSKIDBuf); MutableByteSpan candidateSKID(candidateSKIDBuf); - ReturnErrorCodeIf(referenceCertificate.empty(), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(!referenceCertificate.empty(), CHIP_ERROR_INVALID_ARGUMENT); outCertificate = referenceCertificate; - ReturnErrorCodeIf(candidateCertificates == nullptr || candidateCertificatesCount == 0, CHIP_NO_ERROR); + VerifyOrReturnError(candidateCertificates != nullptr && candidateCertificatesCount != 0, CHIP_NO_ERROR); ReturnErrorOnFailure(ExtractSKIDFromX509Cert(referenceCertificate, referenceSKID)); diff --git a/src/crypto/CHIPCryptoPALPSA.cpp b/src/crypto/CHIPCryptoPALPSA.cpp index 99b947c18f..ba34669a51 100644 --- a/src/crypto/CHIPCryptoPALPSA.cpp +++ b/src/crypto/CHIPCryptoPALPSA.cpp @@ -472,7 +472,7 @@ CHIP_ERROR PBKDF2_sha256::pbkdf2_sha256(const uint8_t * pass, size_t pass_length for (uint32_t blockNo = 1; key_length != 0; ++blockNo) { - uint8_t in[chip::max(kMacLength, kSpake2p_Max_PBKDF_Salt_Length + 4)]; + uint8_t in[std::max(kMacLength, kSpake2p_Max_PBKDF_Salt_Length + 4)]; size_t inLength = salt_length + 4; uint8_t out[kMacLength]; size_t outLength; @@ -495,7 +495,7 @@ CHIP_ERROR PBKDF2_sha256::pbkdf2_sha256(const uint8_t * pass, size_t pass_length inLength = outLength; } - const size_t usedKeyLength = chip::min(key_length, kMacLength); + const size_t usedKeyLength = std::min(key_length, kMacLength); memcpy(key, result, usedKeyLength); key += usedKeyLength; key_length -= usedKeyLength; diff --git a/src/crypto/CHIPCryptoPALmbedTLSCert.cpp b/src/crypto/CHIPCryptoPALmbedTLSCert.cpp index 11eab02519..00053ee5b7 100644 --- a/src/crypto/CHIPCryptoPALmbedTLSCert.cpp +++ b/src/crypto/CHIPCryptoPALmbedTLSCert.cpp @@ -982,7 +982,7 @@ CHIP_ERROR ExtractRawDNFromX509Cert(bool extractSubject, const ByteSpan & certif size_t len = 0; mbedtls_x509_crt mbedCertificate; - ReturnErrorCodeIf(certificate.empty(), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(!certificate.empty(), CHIP_ERROR_INVALID_ARGUMENT); mbedtls_x509_crt_init(&mbedCertificate); result = mbedtls_x509_crt_parse(&mbedCertificate, Uint8::to_const_uchar(certificate.data()), certificate.size()); @@ -1038,7 +1038,7 @@ CHIP_ERROR ReplaceCertIfResignedCertFound(const ByteSpan & referenceCertificate, outCertificate = referenceCertificate; - ReturnErrorCodeIf(candidateCertificates == nullptr || candidateCertificatesCount == 0, CHIP_NO_ERROR); + VerifyOrReturnError(candidateCertificates != nullptr && candidateCertificatesCount != 0, CHIP_NO_ERROR); ReturnErrorOnFailure(ExtractSubjectFromX509Cert(referenceCertificate, referenceSubject)); ReturnErrorOnFailure(ExtractSKIDFromX509Cert(referenceCertificate, referenceSKID)); diff --git a/src/crypto/PSAOperationalKeystore.cpp b/src/crypto/PSAOperationalKeystore.cpp index 09e00bc9b5..b0d0e133e4 100644 --- a/src/crypto/PSAOperationalKeystore.cpp +++ b/src/crypto/PSAOperationalKeystore.cpp @@ -88,7 +88,7 @@ CHIP_ERROR PSAOperationalKeystore::PersistentP256Keypair::Destroy() { psa_status_t status = psa_destroy_key(GetKeyId()); - ReturnErrorCodeIf(status == PSA_ERROR_INVALID_HANDLE, CHIP_ERROR_INVALID_FABRIC_INDEX); + VerifyOrReturnError(status != PSA_ERROR_INVALID_HANDLE, CHIP_ERROR_INVALID_FABRIC_INDEX); VerifyOrReturnError(status == PSA_SUCCESS, CHIP_ERROR_INTERNAL); return CHIP_NO_ERROR; diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.mm b/src/darwin/Framework/CHIP/MTRBaseDevice.mm index 5975872589..2f75038eda 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.mm +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.mm @@ -232,6 +232,11 @@ - (void)onDone @end +@interface MTRBaseDevice () +// Will return nil if our controller is not in fact a concrete controller. +@property (nullable, nonatomic, strong, readonly) MTRDeviceController_Concrete * concreteController; +@end + @implementation MTRBaseDevice - (instancetype)initWithPASEDevice:(chip::DeviceProxy *)device controller:(MTRDeviceController *)controller @@ -261,9 +266,24 @@ + (MTRBaseDevice *)deviceWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceCont return [controller baseDeviceForNodeID:nodeID]; } +- (nullable MTRDeviceController_Concrete *)concreteController +{ + auto * controller = self.deviceController; + if ([controller isKindOfClass:MTRDeviceController_Concrete.class]) { + return static_cast(controller); + } + + return nil; +} + - (MTRTransportType)sessionTransportType { - return [self.deviceController sessionTransportTypeForDevice:self]; + auto * concreteController = self.concreteController; + if (concreteController == nil) { + MTR_LOG_ERROR("Unable to determine session transport type for MTRBaseDevice created with an XPC controller"); + return MTRTransportTypeUndefined; + } + return [concreteController sessionTransportTypeForDevice:self]; } - (void)invalidateCASESession @@ -272,7 +292,14 @@ - (void)invalidateCASESession return; } - [self.deviceController invalidateCASESessionForNode:self.nodeID]; + auto * concreteController = self.concreteController; + if (concreteController == nil) { + // Nothing we can do here. + MTR_LOG_ERROR("Unable invalidate CASE session for MTRBaseDevice created with an XPC controller"); + return; + } + + [concreteController invalidateCASESessionForNode:@(self.nodeID)]; } namespace { @@ -311,121 +338,131 @@ - (void)subscribeWithQueue:(dispatch_queue_t)queue return; } + auto * concreteController = self.concreteController; + if (concreteController == nil) { + // No subscriptions (or really any MTRBaseDevice use) with XPC controllers. + MTR_LOG_ERROR("Unable to create subscription for MTRBaseDevice created with an XPC controller"); + dispatch_async(queue, ^{ + errorHandler([MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]); + }); + return; + } + // Copy params before going async. params = [params copy]; - [self.deviceController getSessionForNode:self.nodeID - completion:^(ExchangeManager * _Nullable exchangeManager, const Optional & session, - NSError * _Nullable error, NSNumber * _Nullable retryDelay) { - if (error != nil) { - dispatch_async(queue, ^{ - errorHandler(error); - }); - return; - } - - // Wildcard endpoint, cluster, attribute, event. - auto attributePath = std::make_unique(); - auto eventPath = std::make_unique(); - eventPath->mIsUrgentEvent = params.reportEventsUrgently; - ReadPrepareParams readParams(session.Value()); - [params toReadPrepareParams:readParams]; - readParams.mpAttributePathParamsList = attributePath.get(); - readParams.mAttributePathParamsListSize = 1; - readParams.mpEventPathParamsList = eventPath.get(); - readParams.mEventPathParamsListSize = 1; - - std::unique_ptr clusterStateCache; - ReadClient::Callback * callbackForReadClient = nullptr; - OnDoneHandler onDoneHandler = nil; - - if (clusterStateCacheContainer) { - __weak MTRClusterStateCacheContainer * weakPtr = clusterStateCacheContainer; - onDoneHandler = ^{ - // This, like all manipulation of cppClusterStateCache, needs to run on the Matter - // queue. - MTRClusterStateCacheContainer * container = weakPtr; - if (container) { - container.cppClusterStateCache = nullptr; - container.baseDevice = nil; - } - }; - } - - auto callback = std::make_unique( - ^(NSArray * value) { - dispatch_async(queue, ^{ - if (attributeReportHandler != nil) { - attributeReportHandler(value); - } - }); - }, - ^(NSArray * value) { - dispatch_async(queue, ^{ - if (eventReportHandler != nil) { - eventReportHandler(value); - } - }); - }, - ^(NSError * error) { - dispatch_async(queue, ^{ - errorHandler(error); - }); - }, - ^(NSError * error, NSNumber * resubscriptionDelay) { - dispatch_async(queue, ^{ - if (resubscriptionScheduled != nil) { - resubscriptionScheduled(error, resubscriptionDelay); - } - }); - }, - ^(void) { - dispatch_async(queue, ^{ - if (subscriptionEstablished != nil) { - subscriptionEstablished(); - } - }); - }, - onDoneHandler); - - if (clusterStateCacheContainer) { - clusterStateCache = std::make_unique(*callback.get()); - callbackForReadClient = &clusterStateCache->GetBufferedCallback(); - } else { - callbackForReadClient = &callback->GetBufferedCallback(); - } - - auto readClient = std::make_unique(InteractionModelEngine::GetInstance(), - exchangeManager, *callbackForReadClient, ReadClient::InteractionType::Subscribe); - - CHIP_ERROR err; - if (!params.resubscribeAutomatically) { - err = readClient->SendRequest(readParams); - } else { - // SendAutoResubscribeRequest cleans up the params, even on failure. - attributePath.release(); - eventPath.release(); - err = readClient->SendAutoResubscribeRequest(std::move(readParams)); - } - - if (err != CHIP_NO_ERROR) { - dispatch_async(queue, ^{ - errorHandler([MTRError errorForCHIPErrorCode:err]); - }); - - return; - } - - if (clusterStateCacheContainer) { - clusterStateCacheContainer.cppClusterStateCache = clusterStateCache.get(); - // ClusterStateCache will be deleted when OnDone is called. - callback->AdoptClusterStateCache(std::move(clusterStateCache)); - clusterStateCacheContainer.baseDevice = self; - } - // Callback and ReadClient will be deleted when OnDone is called. - callback->AdoptReadClient(std::move(readClient)); - callback.release(); - }]; + [concreteController getSessionForNode:self.nodeID + completion:^(ExchangeManager * _Nullable exchangeManager, const Optional & session, + NSError * _Nullable error, NSNumber * _Nullable retryDelay) { + if (error != nil) { + dispatch_async(queue, ^{ + errorHandler(error); + }); + return; + } + + // Wildcard endpoint, cluster, attribute, event. + auto attributePath = std::make_unique(); + auto eventPath = std::make_unique(); + eventPath->mIsUrgentEvent = params.reportEventsUrgently; + ReadPrepareParams readParams(session.Value()); + [params toReadPrepareParams:readParams]; + readParams.mpAttributePathParamsList = attributePath.get(); + readParams.mAttributePathParamsListSize = 1; + readParams.mpEventPathParamsList = eventPath.get(); + readParams.mEventPathParamsListSize = 1; + + std::unique_ptr clusterStateCache; + ReadClient::Callback * callbackForReadClient = nullptr; + OnDoneHandler onDoneHandler = nil; + + if (clusterStateCacheContainer) { + __weak MTRClusterStateCacheContainer * weakPtr = clusterStateCacheContainer; + onDoneHandler = ^{ + // This, like all manipulation of cppClusterStateCache, needs to run on the Matter + // queue. + MTRClusterStateCacheContainer * container = weakPtr; + if (container) { + container.cppClusterStateCache = nullptr; + container.baseDevice = nil; + } + }; + } + + auto callback = std::make_unique( + ^(NSArray * value) { + dispatch_async(queue, ^{ + if (attributeReportHandler != nil) { + attributeReportHandler(value); + } + }); + }, + ^(NSArray * value) { + dispatch_async(queue, ^{ + if (eventReportHandler != nil) { + eventReportHandler(value); + } + }); + }, + ^(NSError * error) { + dispatch_async(queue, ^{ + errorHandler(error); + }); + }, + ^(NSError * error, NSNumber * resubscriptionDelay) { + dispatch_async(queue, ^{ + if (resubscriptionScheduled != nil) { + resubscriptionScheduled(error, resubscriptionDelay); + } + }); + }, + ^(void) { + dispatch_async(queue, ^{ + if (subscriptionEstablished != nil) { + subscriptionEstablished(); + } + }); + }, + onDoneHandler); + + if (clusterStateCacheContainer) { + clusterStateCache = std::make_unique(*callback.get()); + callbackForReadClient = &clusterStateCache->GetBufferedCallback(); + } else { + callbackForReadClient = &callback->GetBufferedCallback(); + } + + auto readClient = std::make_unique(InteractionModelEngine::GetInstance(), + exchangeManager, *callbackForReadClient, ReadClient::InteractionType::Subscribe); + + CHIP_ERROR err; + if (!params.resubscribeAutomatically) { + err = readClient->SendRequest(readParams); + } else { + // SendAutoResubscribeRequest cleans up the params, even on failure. + attributePath.release(); + eventPath.release(); + err = readClient->SendAutoResubscribeRequest(std::move(readParams)); + } + + if (err != CHIP_NO_ERROR) { + dispatch_async(queue, ^{ + errorHandler([MTRError errorForCHIPErrorCode:err]); + }); + + return; + } + + if (clusterStateCacheContainer) { + clusterStateCacheContainer.cppClusterStateCache = clusterStateCache.get(); + // ClusterStateCache will be deleted when OnDone is called. + callback->AdoptClusterStateCache(std::move(clusterStateCache)); + clusterStateCacheContainer.baseDevice = self; + } + // Callback and ReadClient will be deleted when OnDone is called. + callback->AdoptReadClient(std::move(readClient)); + callback.release(); + }]; } static NSDictionary * _MakeDataValueDictionary(NSString * type, id _Nullable value, NSNumber * _Nullable dataVersion) @@ -576,7 +613,9 @@ - (void)subscribeWithQueue:(dispatch_queue_t)queue } } -static CHIP_ERROR MTREncodeTLVFromDataValueDictionaryInternal(id object, chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) +// writer is allowed to be null to just validate the incoming object without +// actually encoding. +static CHIP_ERROR MTREncodeTLVFromDataValueDictionaryInternal(id object, chip::TLV::TLVWriter * writer, chip::TLV::Tag tag) { if (![object isKindOfClass:[NSDictionary class]]) { MTR_LOG_ERROR("Error: Unsupported object to encode: %@", [object class]); @@ -594,60 +633,62 @@ static CHIP_ERROR MTREncodeTLVFromDataValueDictionaryInternal(id object, chip::T MTR_LOG_ERROR("Error: Object to encode has corrupt signed integer type: %@", [value class]); return CHIP_ERROR_INVALID_ARGUMENT; } - return writer.Put(tag, [value longLongValue]); + return writer ? writer->Put(tag, [value longLongValue]) : CHIP_NO_ERROR; } if ([typeName isEqualToString:MTRUnsignedIntegerValueType]) { if (![value isKindOfClass:[NSNumber class]]) { MTR_LOG_ERROR("Error: Object to encode has corrupt unsigned integer type: %@", [value class]); return CHIP_ERROR_INVALID_ARGUMENT; } - return writer.Put(tag, [value unsignedLongLongValue]); + return writer ? writer->Put(tag, [value unsignedLongLongValue]) : CHIP_NO_ERROR; } if ([typeName isEqualToString:MTRBooleanValueType]) { if (![value isKindOfClass:[NSNumber class]]) { MTR_LOG_ERROR("Error: Object to encode has corrupt boolean type: %@", [value class]); return CHIP_ERROR_INVALID_ARGUMENT; } - return writer.Put(tag, static_cast([value boolValue])); + return writer ? writer->Put(tag, static_cast([value boolValue])) : CHIP_NO_ERROR; } if ([typeName isEqualToString:MTRFloatValueType]) { if (![value isKindOfClass:[NSNumber class]]) { MTR_LOG_ERROR("Error: Object to encode has corrupt float type: %@", [value class]); return CHIP_ERROR_INVALID_ARGUMENT; } - return writer.Put(tag, [value floatValue]); + return writer ? writer->Put(tag, [value floatValue]) : CHIP_NO_ERROR; } if ([typeName isEqualToString:MTRDoubleValueType]) { if (![value isKindOfClass:[NSNumber class]]) { MTR_LOG_ERROR("Error: Object to encode has corrupt double type: %@", [value class]); return CHIP_ERROR_INVALID_ARGUMENT; } - return writer.Put(tag, [value doubleValue]); + return writer ? writer->Put(tag, [value doubleValue]) : CHIP_NO_ERROR; } if ([typeName isEqualToString:MTRNullValueType]) { - return writer.PutNull(tag); + return writer ? writer->PutNull(tag) : CHIP_NO_ERROR; } if ([typeName isEqualToString:MTRUTF8StringValueType]) { if (![value isKindOfClass:[NSString class]]) { MTR_LOG_ERROR("Error: Object to encode has corrupt UTF8 string type: %@", [value class]); return CHIP_ERROR_INVALID_ARGUMENT; } - return writer.PutString(tag, AsCharSpan(value)); + return writer ? writer->PutString(tag, AsCharSpan(value)) : CHIP_NO_ERROR; } if ([typeName isEqualToString:MTROctetStringValueType]) { if (![value isKindOfClass:[NSData class]]) { MTR_LOG_ERROR("Error: Object to encode has corrupt octet string type: %@", [value class]); return CHIP_ERROR_INVALID_ARGUMENT; } - return writer.Put(tag, AsByteSpan(value)); + return writer ? writer->Put(tag, AsByteSpan(value)) : CHIP_NO_ERROR; } if ([typeName isEqualToString:MTRStructureValueType]) { if (![value isKindOfClass:[NSArray class]]) { MTR_LOG_ERROR("Error: Object to encode has corrupt structure type: %@", [value class]); return CHIP_ERROR_INVALID_ARGUMENT; } - TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + TLV::TLVType outer = TLV::kTLVType_NotSpecified; + if (writer) { + ReturnErrorOnFailure(writer->StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + } for (id element in value) { if (![element isKindOfClass:[NSDictionary class]]) { MTR_LOG_ERROR("Error: Structure element to encode has corrupt type: %@", [element class]); @@ -676,7 +717,9 @@ static CHIP_ERROR MTREncodeTLVFromDataValueDictionaryInternal(id object, chip::T ReturnErrorOnFailure( MTREncodeTLVFromDataValueDictionaryInternal(elementValue, writer, tag)); } - ReturnErrorOnFailure(writer.EndContainer(outer)); + if (writer) { + ReturnErrorOnFailure(writer->EndContainer(outer)); + } return CHIP_NO_ERROR; } if ([typeName isEqualToString:MTRArrayValueType]) { @@ -684,8 +727,10 @@ static CHIP_ERROR MTREncodeTLVFromDataValueDictionaryInternal(id object, chip::T MTR_LOG_ERROR("Error: Object to encode has corrupt array type: %@", [value class]); return CHIP_ERROR_INVALID_ARGUMENT; } - TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Array, outer)); + TLV::TLVType outer = TLV::kTLVType_NotSpecified; + if (writer) { + ReturnErrorOnFailure(writer->StartContainer(tag, chip::TLV::kTLVType_Array, outer)); + } for (id element in value) { if (![element isKindOfClass:[NSDictionary class]]) { MTR_LOG_ERROR("Error: Array element to encode has corrupt type: %@", [element class]); @@ -698,14 +743,16 @@ static CHIP_ERROR MTREncodeTLVFromDataValueDictionaryInternal(id object, chip::T } ReturnErrorOnFailure(MTREncodeTLVFromDataValueDictionaryInternal(elementValue, writer, chip::TLV::AnonymousTag())); } - ReturnErrorOnFailure(writer.EndContainer(outer)); + if (writer) { + ReturnErrorOnFailure(writer->EndContainer(outer)); + } return CHIP_NO_ERROR; } MTR_LOG_ERROR("Error: Unsupported type to encode: %@", typeName); return CHIP_ERROR_INVALID_ARGUMENT; } -static CHIP_ERROR MTREncodeTLVFromDataValueDictionary(id object, chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) +static CHIP_ERROR MTREncodeTLVFromDataValueDictionary(id object, chip::TLV::TLVWriter * writer, chip::TLV::Tag tag) { CHIP_ERROR err = MTREncodeTLVFromDataValueDictionaryInternal(object, writer, tag); if (err != CHIP_NO_ERROR) { @@ -724,7 +771,7 @@ static CHIP_ERROR MTREncodeTLVFromDataValueDictionary(id object, chip::TLV::TLVW TLV::TLVWriter writer; writer.Init(buffer); - CHIP_ERROR err = MTREncodeTLVFromDataValueDictionary(value, writer, TLV::AnonymousTag()); + CHIP_ERROR err = MTREncodeTLVFromDataValueDictionary(value, &writer, TLV::AnonymousTag()); if (err != CHIP_NO_ERROR) { if (error) { *error = [MTRError errorForCHIPErrorCode:err]; @@ -735,6 +782,11 @@ static CHIP_ERROR MTREncodeTLVFromDataValueDictionary(id object, chip::TLV::TLVW return AsData(ByteSpan(buffer, writer.GetLengthWritten())); } +BOOL MTRDataValueDictionaryIsWellFormed(MTRDeviceDataValueDictionary value) +{ + return MTREncodeTLVFromDataValueDictionary(value, nullptr, TLV::AnonymousTag()) == CHIP_NO_ERROR; +} + // Callback type to pass data value as an NSObject typedef void (*MTRDataValueDictionaryCallback)(void * context, id value); @@ -761,7 +813,7 @@ CHIP_ERROR Decode(chip::TLV::TLVReader & data) CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const { - return MTREncodeTLVFromDataValueDictionary(decodedObj, writer, tag); + return MTREncodeTLVFromDataValueDictionary(decodedObj, &writer, tag); } static constexpr bool kIsFabricScoped = false; @@ -1616,6 +1668,16 @@ - (void)subscribeToAttributePaths:(NSArray * _Nullabl return; } + auto * concreteController = self.concreteController; + if (concreteController == nil) { + // No subscriptions (or really any MTRBaseDevice use) with XPC controllers. + MTR_LOG_ERROR("Unable to create subscription for MTRBaseDevice created with an XPC controller"); + dispatch_async(queue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]); + }); + return; + } + // Copy params before going async. NSArray * attributes = nil; if (attributePaths != nil) { @@ -1629,7 +1691,7 @@ - (void)subscribeToAttributePaths:(NSArray * _Nullabl params = (params == nil) ? nil : [params copy]; - [self.deviceController + [concreteController getSessionForNode:self.nodeID completion:^(ExchangeManager * _Nullable exchangeManager, const Optional & session, NSError * _Nullable error, NSNumber * _Nullable retryDelay) { @@ -1847,7 +1909,7 @@ NSTimeInterval MTRTimeIntervalForEventTimestampValue(uint64_t timeValue) uint64_t eventTimestampValueSeconds = timeValue / chip::kMillisecondsPerSecond; uint64_t eventTimestampValueRemainderMilliseconds = timeValue % chip::kMillisecondsPerSecond; NSTimeInterval eventTimestampValueRemainder - = NSTimeInterval(eventTimestampValueRemainderMilliseconds) / chip::kMillisecondsPerSecond; + = NSTimeInterval(eventTimestampValueRemainderMilliseconds) / static_cast(chip::kMillisecondsPerSecond); NSTimeInterval eventTimestampValue = eventTimestampValueSeconds + eventTimestampValueRemainder; return eventTimestampValue; @@ -1890,6 +1952,16 @@ - (void)_openCommissioningWindowWithSetupPasscode:(nullable NSNumber *)setupPass return; } + auto * concreteController = self.concreteController; + if (concreteController == nil) { + MTR_LOG_ERROR("Can't open a commissioning window via MTRBaseDevice created with an XPC controller"); + dispatch_async(queue, ^{ + MATTER_LOG_METRIC_END(kMetricOpenPairingWindow, CHIP_ERROR_INCORRECT_STATE); + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]); + }); + return; + } + unsigned long long durationVal = [duration unsignedLongLongValue]; if (!CanCastTo(durationVal)) { MTR_LOG_ERROR("Error: Duration %llu is too large.", durationVal); @@ -1925,7 +1997,7 @@ - (void)_openCommissioningWindowWithSetupPasscode:(nullable NSNumber *)setupPass passcode.Emplace(static_cast(passcodeVal)); } - [self.deviceController + [concreteController asyncGetCommissionerOnMatterQueue:^(Controller::DeviceCommissioner * commissioner) { auto resultCallback = ^(CHIP_ERROR status, const SetupPayload & payload) { if (status != CHIP_NO_ERROR) { @@ -2155,7 +2227,7 @@ + (NSDictionary *)eventReportForHeader:(const chip::app::EventHeader &)header an // Commands never need chained buffers, since they cannot be chunked. writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - CHIP_ERROR errorCode = MTREncodeTLVFromDataValueDictionary(data, writer, TLV::AnonymousTag()); + CHIP_ERROR errorCode = MTREncodeTLVFromDataValueDictionary(data, &writer, TLV::AnonymousTag()); if (errorCode != CHIP_NO_ERROR) { LogStringAndReturnError(@"Unable to encode data-value to TLV", errorCode, error); return System::PacketBufferHandle(); @@ -2175,11 +2247,20 @@ - (void)downloadLogOfType:(MTRDiagnosticLogType)type queue:(dispatch_queue_t)queue completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion { - [_deviceController downloadLogFromNodeWithID:@(_nodeID) - type:type - timeout:timeout - queue:queue - completion:completion]; + auto * concreteController = self.concreteController; + if (concreteController == nil) { + MTR_LOG_ERROR("Can't download logs via MTRBaseDevice created with an XPC controller"); + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]); + }); + return; + } + + [concreteController downloadLogFromNodeWithID:@(_nodeID) + type:type + timeout:timeout + queue:queue + completion:completion]; } - (NSString *)description @@ -2302,6 +2383,45 @@ - (void)deregisterReportHandlersWithClientQueue:(dispatch_queue_t)queue completi @end +static NSString * FormatPossiblyWildcardEndpoint(NSNumber * _Nullable possiblyWildcardEndpoint) +{ + if (possiblyWildcardEndpoint == nil) { + return @"wildcard"; + } + + return [NSString stringWithFormat:@"%u", possiblyWildcardEndpoint.unsignedShortValue]; +} + +static NSString * FormatPossiblyWildcardCluster(NSNumber * _Nullable possiblyWildcardCluster) +{ + if (possiblyWildcardCluster == nil) { + return @"wildcard"; + } + + return [NSString stringWithFormat:@"0x%llx (%llu, %@)", + possiblyWildcardCluster.unsignedLongLongValue, + possiblyWildcardCluster.unsignedLongLongValue, + MTRClusterNameForID(static_cast(possiblyWildcardCluster.unsignedLongLongValue))]; +} + +static NSString * FormatPossiblyWildcardClusterElement(NSNumber * _Nullable possiblyWildcardCluster, NSNumber * _Nullable possiblyWildcardElement, NSString * (^nameGetter)(MTRClusterIDType clusterID, NSNumber * elementID)) +{ + if (possiblyWildcardElement == nil) { + return @"wildcard"; + } + + if (possiblyWildcardCluster == nil) { + // We can't get a useful name for this, so just return the numeric + // value. + return [NSString stringWithFormat:@"0x%llx (%llu)", possiblyWildcardElement.unsignedLongLongValue, possiblyWildcardElement.unsignedLongLongValue]; + } + + return [NSString stringWithFormat:@"0x%llx (%llu, %@)", + possiblyWildcardElement.unsignedLongLongValue, + possiblyWildcardElement.unsignedLongLongValue, + nameGetter(static_cast(possiblyWildcardCluster.unsignedLongLongValue), possiblyWildcardElement)]; +} + @implementation MTRAttributeRequestPath - (instancetype)initWithEndpointID:(NSNumber * _Nullable)endpointID clusterID:(NSNumber * _Nullable)clusterID @@ -2315,9 +2435,12 @@ - (instancetype)initWithEndpointID:(NSNumber * _Nullable)endpointID - (NSString *)description { - return [NSString stringWithFormat:@"", - _endpoint.unsignedShortValue, _cluster.unsignedLongLongValue, _cluster.unsignedLongLongValue, - _attribute.unsignedLongLongValue, _attribute.unsignedLongLongValue]; + NSString * endpointStr = FormatPossiblyWildcardEndpoint(_endpoint); + NSString * clusterStr = FormatPossiblyWildcardCluster(_cluster); + NSString * attributeStr = FormatPossiblyWildcardClusterElement(_cluster, _attribute, ^(MTRClusterIDType clusterID, NSNumber * attributeID) { + return MTRAttributeNameForID(clusterID, static_cast(attributeID.unsignedLongLongValue)); + }); + return [NSString stringWithFormat:@"", endpointStr, clusterStr, attributeStr]; } + (MTRAttributeRequestPath *)requestPathWithEndpointID:(NSNumber * _Nullable)endpointID @@ -2439,9 +2562,12 @@ - (instancetype)initWithEndpointID:(NSNumber * _Nullable)endpointID - (NSString *)description { - return [NSString stringWithFormat:@"", - _endpoint.unsignedShortValue, _cluster.unsignedLongLongValue, _cluster.unsignedLongLongValue, - _event.unsignedLongLongValue, _event.unsignedLongLongValue]; + NSString * endpointStr = FormatPossiblyWildcardEndpoint(_endpoint); + NSString * clusterStr = FormatPossiblyWildcardCluster(_cluster); + NSString * eventStr = FormatPossiblyWildcardClusterElement(_cluster, _event, ^(MTRClusterIDType clusterID, NSNumber * eventID) { + return MTREventNameForID(clusterID, static_cast(eventID.unsignedLongLongValue)); + }); + return [NSString stringWithFormat:@"", endpointStr, clusterStr, eventStr]; } + (MTREventRequestPath *)requestPathWithEndpointID:(NSNumber * _Nullable)endpointID @@ -2561,8 +2687,9 @@ - (instancetype)initWithPath:(const ConcreteClusterPath &)path - (NSString *)description { - return [NSString stringWithFormat:@"", _endpoint.unsignedShortValue, - _cluster.unsignedLongLongValue, _cluster.unsignedLongLongValue]; + return [NSString stringWithFormat:@"", _endpoint.unsignedShortValue, + _cluster.unsignedLongLongValue, _cluster.unsignedLongLongValue, + MTRClusterNameForID(static_cast(_cluster.unsignedLongLongValue))]; } + (MTRClusterPath *)clusterPathWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID @@ -2646,9 +2773,11 @@ - (instancetype)initWithPath:(const ConcreteDataAttributePath &)path - (NSString *)description { - return [NSString stringWithFormat:@"", - self.endpoint.unsignedShortValue, self.cluster.unsignedLongLongValue, self.cluster.unsignedLongLongValue, - _attribute.unsignedLongLongValue, _attribute.unsignedLongLongValue]; + return [NSString stringWithFormat:@"", + self.endpoint.unsignedShortValue, + self.cluster.unsignedLongLongValue, self.cluster.unsignedLongLongValue, MTRClusterNameForID(static_cast(self.cluster.unsignedLongLongValue)), + _attribute.unsignedLongLongValue, _attribute.unsignedLongLongValue, + MTRAttributeNameForID(static_cast(self.cluster.unsignedLongLongValue), static_cast(_attribute.unsignedLongLongValue))]; } + (MTRAttributePath *)attributePathWithEndpointID:(NSNumber *)endpointID @@ -2743,8 +2872,11 @@ - (instancetype)initWithPath:(const ConcreteEventPath &)path - (NSString *)description { return - [NSString stringWithFormat:@"", self.endpoint.unsignedShortValue, - self.cluster.unsignedLongLongValue, self.cluster.unsignedLongLongValue, _event.unsignedLongLongValue, _event.unsignedLongLongValue]; + [NSString stringWithFormat:@"", + self.endpoint.unsignedShortValue, + self.cluster.unsignedLongLongValue, self.cluster.unsignedLongLongValue, MTRClusterNameForID(static_cast(self.cluster.unsignedLongLongValue)), + _event.unsignedLongLongValue, _event.unsignedLongLongValue, + MTREventNameForID(static_cast(self.cluster.unsignedLongLongValue), static_cast(_event.unsignedLongLongValue))]; } + (MTREventPath *)eventPathWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID eventID:(NSNumber *)eventID @@ -2965,7 +3097,7 @@ static bool EncodeDataValueToTLV(System::PacketBufferHandle & buffer, Platform:: System::PacketBufferTLVWriter writer; writer.Init(std::move(buffer), /* useChainedBuffers = */ true); - CHIP_ERROR errorCode = MTREncodeTLVFromDataValueDictionary(data, writer, TLV::AnonymousTag()); + CHIP_ERROR errorCode = MTREncodeTLVFromDataValueDictionary(data, &writer, TLV::AnonymousTag()); if (errorCode != CHIP_NO_ERROR) { LogStringAndReturnError(@"Unable to encode data-value to TLV", errorCode, error); return false; diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h b/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h index 1482d80634..075ee99da2 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h +++ b/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h @@ -18,6 +18,8 @@ #import "MTRBaseDevice.h" #import +#import "MTRDeviceDataValueDictionary.h" + #include #include #include @@ -257,6 +259,6 @@ NSDictionary * _Nullable MTRDecodeDataValueDictionaryFromCHIPTLV // TLV Data with an anonymous tag. This method assumes the encoding of the // value fits in a single UDP MTU; for lists this method might need to be used // on each list item separately. -NSData * _Nullable MTREncodeTLVFromDataValueDictionary(NSDictionary * value, NSError * __autoreleasing * error); +NSData * _Nullable MTREncodeTLVFromDataValueDictionary(MTRDeviceDataValueDictionary value, NSError * __autoreleasing * error); NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRCallbackBridgeBase.h b/src/darwin/Framework/CHIP/MTRCallbackBridgeBase.h index 6631e2d132..d9c98157c2 100644 --- a/src/darwin/Framework/CHIP/MTRCallbackBridgeBase.h +++ b/src/darwin/Framework/CHIP/MTRCallbackBridgeBase.h @@ -81,6 +81,9 @@ class MTRCallbackBridgeBase { { LogRequestStart(); + // TODO: Figure out whether we can usefully get an MTRDeviceController_Concrete in here, so + // we can move getSessionForCommissioneeDevice off of MTRDeviceController_Internal. Ideally + // without bloating this inline method too much. [device.deviceController getSessionForCommissioneeDevice:device.nodeID completion:^(chip::Messaging::ExchangeManager * exchangeManager, const chip::Optional & session, NSError * _Nullable error, NSNumber * _Nullable retryDelay) { @@ -92,6 +95,8 @@ class MTRCallbackBridgeBase { { LogRequestStart(); + // TODO: Figure out whether we can usefully get an MTRDeviceController_Concrete in here, so + // we can move getSessionForNode off of MTRDeviceController_Internal. [controller getSessionForNode:nodeID completion:^(chip::Messaging::ExchangeManager * _Nullable exchangeManager, const chip::Optional & session, NSError * _Nullable error, NSNumber * _Nullable retryDelay) { diff --git a/src/darwin/Framework/CHIP/MTRCertificateInfo.h b/src/darwin/Framework/CHIP/MTRCertificateInfo.h index 20e907466c..88b64730f1 100644 --- a/src/darwin/Framework/CHIP/MTRCertificateInfo.h +++ b/src/darwin/Framework/CHIP/MTRCertificateInfo.h @@ -55,15 +55,20 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * Matter root certificates are self-signed, i.e. the issuer and the subject are * the same. */ -@property (readonly) MTRDistinguishedNameInfo * issuer; +@property (readonly, retain) MTRDistinguishedNameInfo * issuer; /** * The Distinguished Name of the entity represented by the certificate. */ -@property (readonly) MTRDistinguishedNameInfo * subject; +@property (readonly, retain) MTRDistinguishedNameInfo * subject; -@property (readonly) NSDate * notBefore; -@property (readonly) NSDate * notAfter; +@property (readonly, retain) NSDate * notBefore; +@property (readonly, retain) NSDate * notAfter; + +/** + * Public key data for this certificate + */ +@property (nullable, readonly, retain) NSData * publicKeyData MTR_NEWLY_AVAILABLE; @end diff --git a/src/darwin/Framework/CHIP/MTRCertificateInfo.mm b/src/darwin/Framework/CHIP/MTRCertificateInfo.mm index f3aacb9dd5..43c4117231 100644 --- a/src/darwin/Framework/CHIP/MTRCertificateInfo.mm +++ b/src/darwin/Framework/CHIP/MTRCertificateInfo.mm @@ -21,9 +21,15 @@ #include +#import "NSDataSpanConversion.h" + +#include +#include + NS_ASSUME_NONNULL_BEGIN using namespace chip; +using namespace chip::Crypto; using namespace chip::Credentials; using namespace chip::ASN1; @@ -65,6 +71,18 @@ - (NSDate *)notBefore return MatterEpochSecondsAsDate(_data.mNotBeforeTime); } +- (nullable NSData *)publicKeyData +{ + P256PublicKeySpan publicKeySpan; + CHIP_ERROR err = ExtractPublicKeyFromChipCert(AsByteSpan(_bytes), publicKeySpan); + + if (err != CHIP_NO_ERROR) { + return nil; + } + + return AsData(publicKeySpan); +} + - (NSDate *)notAfter { // "no expiry" is encoded as kNullCertTime (see ChipEpochToASN1Time) diff --git a/src/darwin/Framework/CHIP/MTRConversion.h b/src/darwin/Framework/CHIP/MTRConversion.h index b0cf1afea4..e576b4f53e 100644 --- a/src/darwin/Framework/CHIP/MTRConversion.h +++ b/src/darwin/Framework/CHIP/MTRConversion.h @@ -38,7 +38,8 @@ AsNumber(chip::Optional optional) inline NSDate * MatterEpochSecondsAsDate(uint32_t matterEpochSeconds) { - return [NSDate dateWithTimeIntervalSince1970:(chip::kChipEpochSecondsSinceUnixEpoch + (NSTimeInterval) matterEpochSeconds)]; + const auto interval = static_cast(chip::kChipEpochSecondsSinceUnixEpoch) + static_cast(matterEpochSeconds); + return [NSDate dateWithTimeIntervalSince1970:(NSTimeInterval) interval]; } template diff --git a/src/darwin/Framework/CHIP/MTRConversion.mm b/src/darwin/Framework/CHIP/MTRConversion.mm index 5e657b9330..3b0b734431 100644 --- a/src/darwin/Framework/CHIP/MTRConversion.mm +++ b/src/darwin/Framework/CHIP/MTRConversion.mm @@ -92,7 +92,7 @@ bool DateToMatterEpochMilliseconds(NSDate * date, uint64_t & matterEpochMillisec bool DateToMatterEpochMicroseconds(NSDate * date, uint64_t & matterEpochMicroseconds) { - uint64_t timeSinceUnixEpoch = static_cast(date.timeIntervalSince1970 * chip::kMicrosecondsPerSecond); + uint64_t timeSinceUnixEpoch = static_cast(date.timeIntervalSince1970 * static_cast(chip::kMicrosecondsPerSecond)); if (timeSinceUnixEpoch < chip::kChipEpochUsSinceUnixEpoch) { // This is a pre-Matter-epoch time, and cannot be represented as an epoch time value. return false; diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index a584bd68e0..8e37998057 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -18,21 +18,16 @@ #import #import -#import "MTRAsyncWorkQueue.h" -#import "MTRAttributeSpecifiedCheck.h" #import "MTRBaseClusters.h" #import "MTRBaseDevice_Internal.h" #import "MTRCluster.h" #import "MTRClusterConstants.h" -#import "MTRCommandTimedCheck.h" #import "MTRConversion.h" #import "MTRDefines_Internal.h" -#import "MTRDeviceConnectivityMonitor.h" -#import "MTRDeviceControllerOverXPC.h" #import "MTRDeviceController_Internal.h" +#import "MTRDeviceDataValueDictionary.h" #import "MTRDevice_Internal.h" #import "MTRError_Internal.h" -#import "MTREventTLVValueDecoder_Internal.h" #import "MTRLogging_Internal.h" #import "MTRMetricKeys.h" #import "MTRMetricsCollector.h" @@ -43,18 +38,6 @@ #import "lib/core/CHIPError.h" -#import - -typedef void (^MTRDeviceAttributeReportHandler)(NSArray * _Nonnull); - -NSString * const MTRPreviousDataKey = @"previousData"; -NSString * const MTRDataVersionKey = @"dataVersion"; - -#define kSecondsToWaitBeforeMarkingUnreachableAfterSettingUpSubscription 10 - -// Disabling pending crashes -#define ENABLE_CONNECTIVITY_MONITORING 0 - @implementation MTRDeviceDelegateInfo - (instancetype)initWithDelegate:(id)delegate queue:(dispatch_queue_t)queue interestedPathsForAttributes:(NSArray * _Nullable)interestedPathsForAttributes interestedPathsForEvents:(NSArray * _Nullable)interestedPathsForEvents { @@ -96,127 +79,8 @@ - (BOOL)callDelegateSynchronouslyWithBlock:(void (^)(id))bloc #endif @end -/* BEGIN DRAGONS: Note methods here cannot be renamed, and are used by private callers, do not rename, remove or modify behavior here */ - -@interface NSObject (MatterPrivateForInternalDragonsDoNotFeed) -- (void)_deviceInternalStateChanged:(MTRDevice *)device; -@end - -/* END DRAGONS */ - -using namespace chip; -using namespace chip::app; -using namespace chip::Protocols::InteractionModel; -using namespace chip::Tracing::DarwinFramework; - #pragma mark - MTRDevice -@implementation MTRDeviceClusterData { - NSMutableDictionary * _attributes; -} - -- (void)storeValue:(MTRDeviceDataValueDictionary _Nullable)value forAttribute:(NSNumber *)attribute -{ - _attributes[attribute] = value; -} - -- (void)removeValueForAttribute:(NSNumber *)attribute -{ - [_attributes removeObjectForKey:attribute]; -} - -- (NSDictionary *)attributes -{ - return _attributes; -} - -+ (BOOL)supportsSecureCoding -{ - return YES; -} - -- (NSString *)description -{ - return [NSString stringWithFormat:@"", _dataVersion, static_cast(_attributes.count)]; -} - -- (nullable instancetype)init -{ - return [self initWithDataVersion:nil attributes:nil]; -} - -// Attributes dictionary is: attributeID => data-value dictionary -- (nullable instancetype)initWithDataVersion:(NSNumber * _Nullable)dataVersion attributes:(NSDictionary * _Nullable)attributes -{ - self = [super init]; - if (self == nil) { - return nil; - } - - _dataVersion = [dataVersion copy]; - _attributes = [NSMutableDictionary dictionaryWithCapacity:attributes.count]; - [_attributes addEntriesFromDictionary:attributes]; - - return self; -} - -- (nullable instancetype)initWithCoder:(NSCoder *)decoder -{ - self = [super init]; - if (self == nil) { - return nil; - } - - _dataVersion = [decoder decodeObjectOfClass:[NSNumber class] forKey:sDataVersionKey]; - if (_dataVersion != nil && ![_dataVersion isKindOfClass:[NSNumber class]]) { - MTR_LOG_ERROR("MTRDeviceClusterData got %@ for data version, not NSNumber.", _dataVersion); - return nil; - } - - static NSSet * const sAttributeValueClasses = [NSSet setWithObjects:[NSDictionary class], [NSArray class], [NSData class], [NSString class], [NSNumber class], nil]; - _attributes = [decoder decodeObjectOfClasses:sAttributeValueClasses forKey:sAttributesKey]; - if (_attributes != nil && ![_attributes isKindOfClass:[NSDictionary class]]) { - MTR_LOG_ERROR("MTRDeviceClusterData got %@ for attributes, not NSDictionary.", _attributes); - return nil; - } - - return self; -} - -- (void)encodeWithCoder:(NSCoder *)coder -{ - [coder encodeObject:self.dataVersion forKey:sDataVersionKey]; - [coder encodeObject:self.attributes forKey:sAttributesKey]; -} - -- (id)copyWithZone:(NSZone *)zone -{ - return [[MTRDeviceClusterData alloc] initWithDataVersion:_dataVersion attributes:_attributes]; -} - -- (BOOL)isEqualToClusterData:(MTRDeviceClusterData *)otherClusterData -{ - return MTREqualObjects(_dataVersion, otherClusterData.dataVersion) - && MTREqualObjects(_attributes, otherClusterData.attributes); -} - -- (BOOL)isEqual:(id)object -{ - if ([object class] != [self class]) { - return NO; - } - - return [self isEqualToClusterData:object]; -} - -@end - -@interface MTRDevice () - -@property (nonatomic) chip::FabricIndex fabricIndex; - -@end - // Declaring selector so compiler won't complain about testing and calling it in _handleReportEnd #ifdef DEBUG @protocol MTRDeviceUnitTestDelegate @@ -233,54 +97,7 @@ - (BOOL)unitTestSuppressTimeBasedReachabilityChanges:(MTRDevice *)device; @end #endif -@implementation MTRDevice { - // _deviceCachePrimed is true if we have the data that comes from an initial - // subscription priming report (whether it came from storage or from our - // subscription). - BOOL _deviceCachePrimed; - - // _persistedClusterData stores data that we have already persisted (when we have - // cluster data persistence enabled). Nil when we have no persistence enabled. - NSCache * _Nullable _persistedClusterData; - // _clusterDataToPersist stores data that needs to be persisted. If we - // don't have persistence enabled, this is our only data store. Nil if we - // currently have nothing that could need persisting. - NSMutableDictionary * _Nullable _clusterDataToPersist; - // _persistedClusters stores the set of "valid" keys into _persistedClusterData. - // These are keys that could have values in _persistedClusterData even if they don't - // right now (because they have been evicted). - NSMutableSet * _persistedClusters; - - // Storage behavior configuration and variables to keep track of the logic - // _clusterDataPersistenceFirstScheduledTime is used to track the start time of the delay between - // report and persistence. - // _mostRecentReportTimes is a list of the most recent report timestamps used for calculating - // the running average time between reports. - // _deviceReportingExcessivelyStartTime tracks when a device starts reporting excessively. - // _reportToPersistenceDelayCurrentMultiplier is the current multiplier that is calculated when a - // report comes in. - MTRDeviceStorageBehaviorConfiguration * _storageBehaviorConfiguration; - NSDate * _Nullable _clusterDataPersistenceFirstScheduledTime; - NSMutableArray * _mostRecentReportTimes; - NSDate * _Nullable _deviceReportingExcessivelyStartTime; - double _reportToPersistenceDelayCurrentMultiplier; - - // System time change observer reference - id _systemTimeChangeObserverToken; - - // Protects mutable state used by our description getter. This is a separate lock from "lock" - // so that we don't need to worry about getting our description while holding "lock" (e.g due to - // logging self). This lock _must_ be held narrowly, with no other lock acquisitions allowed - // while it's held, to avoid deadlock. - os_unfair_lock _descriptionLock; - - // State used by our description getter: access to these must be protected by descriptionLock. - NSNumber * _Nullable _vid; // nil if unknown - NSNumber * _Nullable _pid; // nil if unknown - // _allNetworkFeatures is a bitwise or of the feature maps of all network commissioning clusters - // present on the device, or nil if there aren't any. - NSNumber * _Nullable _allNetworkFeatures; -} +@implementation MTRDevice - (instancetype)initForSubclassesWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller { @@ -306,8 +123,6 @@ - (instancetype)initWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceControlle - (void)dealloc { - [[NSNotificationCenter defaultCenter] removeObserver:_systemTimeChangeObserverToken]; - // TODO: retain cycle and clean up https://github.com/project-chip/connectedhomeip/issues/34267 MTR_LOG("MTRDevice dealloc: %p", self); } @@ -328,42 +143,6 @@ + (MTRDevice *)deviceWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceControll return [controller deviceForNodeID:nodeID]; } -- (NSMutableArray *)arrayOfNumbersFromAttributeValue:(MTRDeviceDataValueDictionary)dataDictionary -{ - if (![MTRArrayValueType isEqual:dataDictionary[MTRTypeKey]]) { - return nil; - } - - id value = dataDictionary[MTRValueKey]; - if (![value isKindOfClass:NSArray.class]) { - return nil; - } - - NSArray * valueArray = value; - __auto_type outputArray = [NSMutableArray arrayWithCapacity:valueArray.count]; - - for (id item in valueArray) { - if (![item isKindOfClass:NSDictionary.class]) { - return nil; - } - - NSDictionary * itemDictionary = item; - id data = itemDictionary[MTRDataKey]; - if (![data isKindOfClass:NSDictionary.class]) { - return nil; - } - - NSDictionary * dataDictionary = data; - id dataType = dataDictionary[MTRTypeKey]; - id dataValue = dataDictionary[MTRValueKey]; - if (![dataType isKindOfClass:NSString.class] || ![dataValue isKindOfClass:NSNumber.class]) { - return nil; - } - [outputArray addObject:dataValue]; - } - return outputArray; -} - #pragma mark Delegate handling - (void)setDelegate:(id)delegate queue:(dispatch_queue_t)queue @@ -529,449 +308,7 @@ - (void)_callFirstDelegateSynchronouslyWithBlock:(void (^)(id } #endif -- (BOOL)deviceUsesThread -{ - std::lock_guard lock(_lock); - return [self _deviceUsesThread]; -} - -// This method is used for signaling whether to use the subscription pool. This functions as -// a heuristic for whether to throttle subscriptions to the device via a pool of subscriptions. -// If products appear that have both Thread and Wifi enabled but are primarily on wifi, this -// method will need to be updated to reflect that. -- (BOOL)_deviceUsesThread -{ - os_unfair_lock_assert_owner(&self->_lock); - #ifdef DEBUG - // Note: This is a hack to allow our unit tests to test the subscription pooling behavior we have implemented for thread, so we mock devices to be a thread device - __block BOOL pretendThreadEnabled = NO; - [self _callFirstDelegateSynchronouslyWithBlock:^(id testDelegate) { - if ([testDelegate respondsToSelector:@selector(unitTestPretendThreadEnabled:)]) { - pretendThreadEnabled = [testDelegate unitTestPretendThreadEnabled:self]; - } - }]; - if (pretendThreadEnabled) { - return YES; - } -#endif - - MTRClusterPath * networkCommissioningClusterPath = [MTRClusterPath clusterPathWithEndpointID:@(kRootEndpointId) clusterID:@(MTRClusterIDTypeNetworkCommissioningID)]; - MTRDeviceClusterData * networkCommissioningClusterData = [self _clusterDataForPath:networkCommissioningClusterPath]; - NSNumber * networkCommissioningClusterFeatureMapValueNumber = networkCommissioningClusterData.attributes[@(MTRClusterGlobalAttributeFeatureMapID)][MTRValueKey]; - - if (networkCommissioningClusterFeatureMapValueNumber == nil) - return NO; - if (![networkCommissioningClusterFeatureMapValueNumber isKindOfClass:[NSNumber class]]) { - MTR_LOG_ERROR("%@ Unexpected NetworkCommissioning FeatureMap value %@", self, networkCommissioningClusterFeatureMapValueNumber); - return NO; - } - - uint32_t networkCommissioningClusterFeatureMapValue = static_cast(networkCommissioningClusterFeatureMapValueNumber.unsignedLongValue); - - return (networkCommissioningClusterFeatureMapValue & MTRNetworkCommissioningFeatureThreadNetworkInterface) != 0 ? YES : NO; -} - -- (NSDictionary *)_clusterDataToPersistSnapshot -{ - os_unfair_lock_assert_owner(&self->_lock); - NSMutableDictionary * clusterDataToReturn = [NSMutableDictionary dictionary]; - for (MTRClusterPath * clusterPath in _clusterDataToPersist) { - clusterDataToReturn[clusterPath] = [_clusterDataToPersist[clusterPath] copy]; - } - - return clusterDataToReturn; -} - -- (NSTimeInterval)_reportToPersistenceDelayTimeAfterMutiplier -{ - return _storageBehaviorConfiguration.reportToPersistenceDelayTime * _reportToPersistenceDelayCurrentMultiplier; -} - -- (NSTimeInterval)_reportToPersistenceDelayTimeMaxAfterMutiplier -{ - return _storageBehaviorConfiguration.reportToPersistenceDelayTimeMax * _reportToPersistenceDelayCurrentMultiplier; -} - -- (BOOL)_dataStoreExists -{ - os_unfair_lock_assert_owner(&self->_lock); - return _persistedClusterData != nil; -} - -- (void)_persistClusterData -{ - os_unfair_lock_assert_owner(&self->_lock); - - // Sanity check - if (![self _dataStoreExists]) { - MTR_LOG_ERROR("%@ storage behavior: no data store in _persistClusterData!", self); - return; - } - - // Nothing to persist - if (!_clusterDataToPersist.count) { - return; - } - - MTR_LOG("%@ Storing cluster information (data version and attributes) count: %lu", self, static_cast(_clusterDataToPersist.count)); - // We're going to hand out these MTRDeviceClusterData objects to our - // storage implementation, which will try to read them later. Make sure - // we snapshot the state here instead of handing out live copies. - NSDictionary * clusterData = [self _clusterDataToPersistSnapshot]; - [_deviceController.controllerDataStore storeClusterData:clusterData forNodeID:_nodeID]; - for (MTRClusterPath * clusterPath in _clusterDataToPersist) { - [_persistedClusterData setObject:_clusterDataToPersist[clusterPath] forKey:clusterPath]; - [_persistedClusters addObject:clusterPath]; - } - - // TODO: There is one edge case not handled well here: if the - // storeClusterData call above fails somehow, and then the data gets - // evicted from _persistedClusterData, we could end up in a situation - // where when we page things in from storage we have stale values and - // hence effectively lose the delta that we failed to persist. - // - // The only way to handle this would be to detect it when it happens, - // then re-subscribe at that point, which would cause the relevant data - // to be sent to us via the priming read. - _clusterDataToPersist = nil; - -#ifdef DEBUG - [self _callDelegatesWithBlock:^(id testDelegate) { - if ([testDelegate respondsToSelector:@selector(unitTestClusterDataPersisted:)]) { - [testDelegate unitTestClusterDataPersisted:self]; - } - }]; -#endif -} - -- (BOOL)_deviceIsReportingExcessively -{ - os_unfair_lock_assert_owner(&self->_lock); - - if (!_deviceReportingExcessivelyStartTime) { - return NO; - } - - NSTimeInterval intervalSinceDeviceReportingExcessively = -[_deviceReportingExcessivelyStartTime timeIntervalSinceNow]; - BOOL deviceIsReportingExcessively = intervalSinceDeviceReportingExcessively > _storageBehaviorConfiguration.deviceReportingExcessivelyIntervalThreshold; - if (deviceIsReportingExcessively) { - MTR_LOG("%@ storage behavior: device has been reporting excessively for %.3lf seconds", self, intervalSinceDeviceReportingExcessively); - } - return deviceIsReportingExcessively; -} - -- (void)_persistClusterDataAsNeeded -{ - std::lock_guard lock(_lock); - - // Nothing to persist - if (!_clusterDataToPersist.count) { - return; - } - - // This is run with a dispatch_after, and need to check again if this device is reporting excessively - if ([self _deviceIsReportingExcessively]) { - return; - } - - NSDate * lastReportTime = [_mostRecentReportTimes lastObject]; - NSTimeInterval intervalSinceLastReport = -[lastReportTime timeIntervalSinceNow]; - if (intervalSinceLastReport < [self _reportToPersistenceDelayTimeAfterMutiplier]) { - // A report came in after this call was scheduled - - if (!_clusterDataPersistenceFirstScheduledTime) { - MTR_LOG_ERROR("%@ storage behavior: expects _clusterDataPersistenceFirstScheduledTime if _clusterDataToPersist exists", self); - return; - } - - NSTimeInterval intervalSinceFirstScheduledPersistence = -[_clusterDataPersistenceFirstScheduledTime timeIntervalSinceNow]; - if (intervalSinceFirstScheduledPersistence < [self _reportToPersistenceDelayTimeMaxAfterMutiplier]) { - MTR_LOG("%@ storage behavior: not persisting: intervalSinceLastReport %lf intervalSinceFirstScheduledPersistence %lf", self, intervalSinceLastReport, intervalSinceFirstScheduledPersistence); - // The max delay is also not reached - do not persist yet - return; - } - } - - // At this point, there is data to persist, and either _reportToPersistenceDelayTime was - // reached, or _reportToPersistenceDelayTimeMax was reached. Time to persist: - [self _persistClusterData]; - - _clusterDataPersistenceFirstScheduledTime = nil; -} - -- (void)_scheduleClusterDataPersistence -{ - os_unfair_lock_assert_owner(&self->_lock); - - // No persisted data / lack of controller data store - if (![self _dataStoreExists]) { - MTR_LOG_DEBUG("%@ storage behavior: no data store", self); - return; - } - - // Nothing to persist - if (!_clusterDataToPersist.count) { - MTR_LOG_DEBUG("%@ storage behavior: nothing to persist", self); - return; - } - - // If there is no storage behavior configuration, make a default one - if (!_storageBehaviorConfiguration) { - _storageBehaviorConfiguration = [[MTRDeviceStorageBehaviorConfiguration alloc] init]; - [_storageBehaviorConfiguration checkValuesAndResetToDefaultIfNecessary]; - } - - // Directly store if the storage behavior optimization is disabled - if (_storageBehaviorConfiguration.disableStorageBehaviorOptimization) { - [self _persistClusterData]; - return; - } - - // If we have nothing stored at all yet, store directly, so we move into a - // primed state. - if (!_deviceCachePrimed) { - [self _persistClusterData]; - return; - } - - // Ensure there is an array to keep the most recent report times - if (!_mostRecentReportTimes) { - _mostRecentReportTimes = [NSMutableArray array]; - } - - // Mark when first report comes in to know when _reportToPersistenceDelayTimeMax is hit - if (!_clusterDataPersistenceFirstScheduledTime) { - _clusterDataPersistenceFirstScheduledTime = [NSDate now]; - } - - // Make sure there is space in the array, and note report time - while (_mostRecentReportTimes.count >= _storageBehaviorConfiguration.recentReportTimesMaxCount) { - [_mostRecentReportTimes removeObjectAtIndex:0]; - } - [_mostRecentReportTimes addObject:[NSDate now]]; - - // Calculate running average and update multiplier - need at least 2 items to calculate intervals - if (_mostRecentReportTimes.count > 2) { - NSTimeInterval cumulativeIntervals = 0; - for (int i = 1; i < _mostRecentReportTimes.count; i++) { - NSDate * lastDate = [_mostRecentReportTimes objectAtIndex:i - 1]; - NSDate * currentDate = [_mostRecentReportTimes objectAtIndex:i]; - NSTimeInterval intervalSinceLastReport = [currentDate timeIntervalSinceDate:lastDate]; - // Check to guard against clock change - if (intervalSinceLastReport > 0) { - cumulativeIntervals += intervalSinceLastReport; - } - } - NSTimeInterval averageTimeBetweenReports = cumulativeIntervals / (_mostRecentReportTimes.count - 1); - - if (averageTimeBetweenReports < _storageBehaviorConfiguration.timeBetweenReportsTooShortThreshold) { - // Multiplier goes from 1 to _reportToPersistenceDelayMaxMultiplier uniformly, as - // averageTimeBetweenReports go from timeBetweenReportsTooShortThreshold to - // timeBetweenReportsTooShortMinThreshold - - double intervalAmountBelowThreshold = _storageBehaviorConfiguration.timeBetweenReportsTooShortThreshold - averageTimeBetweenReports; - double intervalAmountBetweenThresholdAndMinThreshold = _storageBehaviorConfiguration.timeBetweenReportsTooShortThreshold - _storageBehaviorConfiguration.timeBetweenReportsTooShortMinThreshold; - double proportionTowardMinThreshold = intervalAmountBelowThreshold / intervalAmountBetweenThresholdAndMinThreshold; - if (proportionTowardMinThreshold > 1) { - // Clamp to 100% - proportionTowardMinThreshold = 1; - } - - // Set current multiplier to [1, MaxMultiplier] - _reportToPersistenceDelayCurrentMultiplier = 1 + (proportionTowardMinThreshold * (_storageBehaviorConfiguration.reportToPersistenceDelayMaxMultiplier - 1)); - MTR_LOG("%@ storage behavior: device reporting frequently - setting delay multiplier to %lf", self, _reportToPersistenceDelayCurrentMultiplier); - } else { - _reportToPersistenceDelayCurrentMultiplier = 1; - } - - // Also note when the running average first dips below the min threshold - if (averageTimeBetweenReports < _storageBehaviorConfiguration.timeBetweenReportsTooShortMinThreshold) { - if (!_deviceReportingExcessivelyStartTime) { - _deviceReportingExcessivelyStartTime = [NSDate now]; - MTR_LOG_DEBUG("%@ storage behavior: device is reporting excessively @%@", self, _deviceReportingExcessivelyStartTime); - } - } else { - _deviceReportingExcessivelyStartTime = nil; - } - } - - // Do not schedule persistence if device is reporting excessively - if ([self _deviceIsReportingExcessively]) { - return; - } - - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) ([self _reportToPersistenceDelayTimeAfterMutiplier] * NSEC_PER_SEC)), self.queue, ^{ - [self _persistClusterDataAsNeeded]; - }); -} - -// Used to clear the storage behavior state when needed (system time change, or when new -// configuration is set. -// -// Also flushes unwritten cluster data to storage, if data store exists. -- (void)_resetStorageBehaviorState -{ - os_unfair_lock_assert_owner(&self->_lock); - - _clusterDataPersistenceFirstScheduledTime = nil; - _mostRecentReportTimes = nil; - _deviceReportingExcessivelyStartTime = nil; - _reportToPersistenceDelayCurrentMultiplier = 1; - - // Sanity check that there is a data - if ([self _dataStoreExists]) { - [self _persistClusterData]; - } -} - -- (void)setStorageBehaviorConfiguration:(MTRDeviceStorageBehaviorConfiguration *)storageBehaviorConfiguration -{ - MTR_LOG("%@ storage behavior: setStorageBehaviorConfiguration %@", self, storageBehaviorConfiguration); - std::lock_guard lock(_lock); - _storageBehaviorConfiguration = storageBehaviorConfiguration; - // Make sure the values are sane - [_storageBehaviorConfiguration checkValuesAndResetToDefaultIfNecessary]; - [self _resetStorageBehaviorState]; -} - -#ifdef DEBUG -- (void)unitTestInjectEventReport:(NSArray *> *)eventReport -{ - NSAssert(NO, @"Unit test injection of reports needs to be handled by subclasses"); -} - -- (void)unitTestInjectAttributeReport:(NSArray *> *)attributeReport fromSubscription:(BOOL)isFromSubscription -{ - NSAssert(NO, @"Unit test injection of reports needs to be handled by subclasses"); -} -#endif - -#ifdef DEBUG -- (void)unitTestClearClusterData -{ - std::lock_guard lock(_lock); - NSAssert([self _dataStoreExists], @"Test is not going to test what it thinks is testing!"); - [_persistedClusterData removeAllObjects]; -} -#endif - -- (void)_reconcilePersistedClustersWithStorage -{ - os_unfair_lock_assert_owner(&self->_lock); - - NSMutableSet * clusterPathsToRemove = [NSMutableSet set]; - for (MTRClusterPath * clusterPath in _persistedClusters) { - MTRDeviceClusterData * data = [_deviceController.controllerDataStore getStoredClusterDataForNodeID:_nodeID endpointID:clusterPath.endpoint clusterID:clusterPath.cluster]; - if (!data) { - [clusterPathsToRemove addObject:clusterPath]; - } - } - - MTR_LOG_ERROR("%@ Storage missing %lu / %lu clusters - reconciling in-memory records", self, static_cast(clusterPathsToRemove.count), static_cast(_persistedClusters.count)); - [_persistedClusters minusSet:clusterPathsToRemove]; -} - -- (nullable MTRDeviceClusterData *)_clusterDataForPath:(MTRClusterPath *)clusterPath -{ - os_unfair_lock_assert_owner(&self->_lock); - - if (_clusterDataToPersist != nil) { - // Use the "dirty" values, if we have them. - MTRDeviceClusterData * data = _clusterDataToPersist[clusterPath]; - if (data != nil) { - return data; - } - } - - if ([self _dataStoreExists]) { - MTRDeviceClusterData * data = [_persistedClusterData objectForKey:clusterPath]; - if (data != nil) { - return data; - } - } - - if (![_persistedClusters containsObject:clusterPath]) { - // We are not expected to have this cluster, so no point in paging it in - // loading it from storage. - return nil; - } - - NSAssert(_deviceController.controllerDataStore != nil, - @"How can _persistedClusters have an entry if we have no persistence?"); - NSAssert(_persistedClusterData != nil, - @"How can _persistedClusterData not exist if we have persisted clusters?"); - - // Page in the stored value for the data. - MTRDeviceClusterData * data = [_deviceController.controllerDataStore getStoredClusterDataForNodeID:_nodeID endpointID:clusterPath.endpoint clusterID:clusterPath.cluster]; - MTR_LOG("%@ cluster path %@ cache miss - load from storage success %@", self, clusterPath, MTR_YES_NO(data)); - if (data != nil) { - [_persistedClusterData setObject:data forKey:clusterPath]; - } else { - // If clusterPath is in _persistedClusters and the data store returns nil for it, then the in-memory cache is now not dependable, and subscription should be reset and reestablished to reload cache from device - - // First make sure _persistedClusters is consistent with storage, so repeated calls don't immediately re-trigger this - [self _reconcilePersistedClustersWithStorage]; - } - - return data; -} - -- (NSSet *)_knownClusters -{ - os_unfair_lock_assert_owner(&self->_lock); - - // We might have some clusters that have not been persisted at all yet, and - // some that have been persisted but are still present in - // _clusterDataToPersist because they have been modified since then. - NSMutableSet * clusterPaths = [_persistedClusters mutableCopy]; - if (_clusterDataToPersist != nil) { - [clusterPaths unionSet:[NSSet setWithArray:[_clusterDataToPersist allKeys]]]; - } - return clusterPaths; -} - -- (NSDictionary *)_getCachedDataVersions -{ - NSMutableDictionary * dataVersions = [NSMutableDictionary dictionary]; - std::lock_guard lock(_lock); - - for (MTRClusterPath * path in [self _knownClusters]) { - dataVersions[path] = [self _clusterDataForPath:path].dataVersion; - } - - MTR_LOG_DEBUG("%@ _getCachedDataVersions dataVersions count: %lu", self, static_cast(dataVersions.count)); - - return dataVersions; -} - -- (MTRDeviceDataValueDictionary _Nullable)_cachedAttributeValueForPath:(MTRAttributePath *)path -{ - os_unfair_lock_assert_owner(&self->_lock); - - // We need an actual MTRClusterPath, not a subsclass, to do _clusterDataForPath. - auto * clusterPath = [MTRClusterPath clusterPathWithEndpointID:path.endpoint clusterID:path.cluster]; - - MTRDeviceClusterData * clusterData = [self _clusterDataForPath:clusterPath]; - if (clusterData == nil) { - return nil; - } - - return clusterData.attributes[path.attribute]; -} - -#ifdef DEBUG -- (void)unitTestResetSubscription -{ -} -#endif - -#ifdef DEBUG -- (NSUInteger)unitTestAttributesReportedSinceLastCheck -{ - return 0; -} - - (NSUInteger)unitTestNonnullDelegateCount { std::lock_guard lock(self->_lock); @@ -1182,225 +519,196 @@ - (void)downloadLogOfType:(MTRDiagnosticLogType)type }); } -#pragma mark - Cache management - -// Utility to return data value dictionary without data version -- (NSDictionary *)_dataValueWithoutDataVersion:(NSDictionary *)attributeValue +- (nullable NSNumber *)estimatedSubscriptionLatency { - // Sanity check for nil - return the same input to fail gracefully - if (!attributeValue || !attributeValue[MTRTypeKey]) { - return attributeValue; - } - - if (attributeValue[MTRValueKey]) { - return @{ MTRTypeKey : attributeValue[MTRTypeKey], MTRValueKey : attributeValue[MTRValueKey] }; - } else { - return @{ MTRTypeKey : attributeValue[MTRTypeKey] }; - } + MTR_ABSTRACT_METHOD(); + return nil; } +#pragma mark - Cache management + - (NSArray *> *)getAllAttributesReport { MTR_ABSTRACT_METHOD(); return nil; } -#ifdef DEBUG -- (NSUInteger)unitTestAttributeCount +- (BOOL)deviceCachePrimed { - std::lock_guard lock(_lock); - NSUInteger count = 0; - for (MTRClusterPath * path in [self _knownClusters]) { - count += [self _clusterDataForPath:path].attributes.count; - } - return count; + MTR_ABSTRACT_METHOD(); + return NO; } -#endif - -- (void)setPersistedClusterData:(NSDictionary *)clusterData -{ - MTR_LOG("%@ setPersistedClusterData count: %lu", self, static_cast(clusterData.count)); - if (!clusterData.count) { - return; - } - std::lock_guard lock(_lock); - - NSAssert([self _dataStoreExists], @"Why is controller setting persisted data when we shouldn't have it?"); - - for (MTRClusterPath * clusterPath in clusterData) { - // The caller has mutable references to MTRDeviceClusterData and - // MTRClusterPath, but that should be OK, since we control all the - // callers. If that stops being OK, we'll need to copy the key and - // value here. - [_persistedClusters addObject:clusterPath]; - [_persistedClusterData setObject:clusterData[clusterPath] forKey:clusterPath]; - } - - [self _updateAttributeDependentDescriptionData]; - - // We have some stored data. Since we don't store data until the end of the - // initial priming report, our device cache must be primed. - _deviceCachePrimed = YES; -} +#pragma mark - Suspend/resume management -- (void)_setLastInitialSubscribeLatency:(id)latency +- (void)controllerSuspended { - os_unfair_lock_assert_owner(&self->_lock); - - if (![latency isKindOfClass:NSNumber.class]) { - // Unexpected value of some sort; just ignore it. - return; - } - - _estimatedSubscriptionLatency = latency; + // Nothing to do for now. } -- (void)setPersistedDeviceData:(NSDictionary *)data +- (void)controllerResumed { - MTR_LOG_DEBUG("%@ setPersistedDeviceData: %@", self, data); + // Nothing to do for now. +} - std::lock_guard lock(_lock); +#pragma mark - Value comparisons - // For now the only data we care about is our initial subscribe latency. - id initialSubscribeLatency = data[sLastInitialSubscribeLatencyKey]; - if (initialSubscribeLatency != nil) { - [self _setLastInitialSubscribeLatency:initialSubscribeLatency]; +- (BOOL)_attributeDataValue:(MTRDeviceDataValueDictionary)one isEqualToDataValue:(MTRDeviceDataValueDictionary)theOther +{ + // Sanity check for nil cases + if (!one && !theOther) { + MTR_LOG_ERROR("%@ attribute data-value comparison does not expect comparing two nil dictionaries", self); + return YES; } + if (!one || !theOther) { + // Comparing against nil is expected, and should return NO quietly + return NO; + } + + // Attribute data-value dictionaries are equal if type and value are equal, and specifically, this should return true if values are both nil + return [one[MTRTypeKey] isEqual:theOther[MTRTypeKey]] && ((one[MTRValueKey] == theOther[MTRValueKey]) || [one[MTRValueKey] isEqual:theOther[MTRValueKey]]); } -#ifdef DEBUG -- (MTRDeviceClusterData *)unitTestGetClusterDataForPath:(MTRClusterPath *)path +// _attributeDataValue:satisfiesExpectedDataValue: checks whether the newly +// received attribute data value satisfies the expectation we have. +// +// For now, a value is considered to satisfy the expectation if it's equal to +// the expected value, though we allow the fields of structs to be in a +// different order than expected: while in theory the spec does require a +// specific ordering for struct fields, in practice we should not force certain +// API consumers to deal with knowing what that ordering is. +// +// Things to consider for future: +// +// 1) Should a value that has _extra_ fields in a struct compared to the expected +// value be considered as satisfying the expectation? Arguably, yes. +// +// 2) Should lists actually enforce order (as now), or should they allow +// reordering entries? +// +// 3) For fabric-scoped lists, should we have a way to check for just "our +// fabric's" entries? +- (BOOL)_attributeDataValue:(MTRDeviceDataValueDictionary)observed satisfiesValueExpectation:(MTRDeviceDataValueDictionary)expected { - std::lock_guard lock(_lock); + // Sanity check for nil cases (which really should not happen!) + if (!observed && !expected) { + MTR_LOG_ERROR("%@ observed to expected attribute data-value comparison does not expect comparing two nil dictionaries", self); + return YES; + } - return [[self _clusterDataForPath:path] copy]; -} + if (!observed || !expected) { + // Again, not expected here. But clearly the expectation is not really + // satisfied, in some sense. + MTR_LOG_ERROR("@ observed to expected attribute data-value comparison does not expect a nil %s", observed ? "expected" : "observed"); + return NO; + } -- (NSSet *)unitTestGetPersistedClusters -{ - std::lock_guard lock(_lock); + if (![observed[MTRTypeKey] isEqual:expected[MTRTypeKey]]) { + // Different types, does not satisfy expectation. + return NO; + } - return [_persistedClusters copy]; -} + if ([MTRArrayValueType isEqual:expected[MTRTypeKey]]) { + // For array-values, check that sizes are same and entries satisfy expectations. + if (![observed[MTRValueKey] isKindOfClass:NSArray.class] || ![expected[MTRValueKey] isKindOfClass:NSArray.class]) { + // Malformed data, just claim expectation is not satisfied. + MTR_LOG_ERROR("%@ at least one of observed and expected value is not an NSArrray: %@, %@", self, observed, expected); + return NO; + } -- (BOOL)unitTestClusterHasBeenPersisted:(MTRClusterPath *)path -{ - std::lock_guard lock(_lock); + NSArray *> * observedArray = observed[MTRValueKey]; + NSArray *> * expectedArray = expected[MTRValueKey]; - return [_persistedClusters containsObject:path]; -} -#endif + if (observedArray.count != expectedArray.count) { + return NO; + } -- (BOOL)deviceCachePrimed -{ - std::lock_guard lock(_lock); - return _deviceCachePrimed; -} + for (NSUInteger i = 0; i < observedArray.count; ++i) { + NSDictionary * observedEntry = observedArray[i]; + NSDictionary * expectedEntry = expectedArray[i]; -#pragma mark Log Help + if (![observedEntry isKindOfClass:NSDictionary.class] || ![expectedEntry isKindOfClass:NSDictionary.class]) { + MTR_LOG_ERROR("%@ expected or observed array-value contains entries that are not NSDictionary: %@, %@", self, observedEntry, expectedEntry); + return NO; + } -- (nullable NSNumber *)_informationalNumberAtAttributePath:(MTRAttributePath *)attributePath -{ - auto * cachedData = [self _cachedAttributeValueForPath:attributePath]; + if (![self _attributeDataValue:observedEntry[MTRDataKey] satisfiesValueExpectation:expectedEntry[MTRDataKey]]) { + return NO; + } + } - if (cachedData == nil) { - return nil; + return YES; } - auto * attrReport = [[MTRAttributeReport alloc] initWithResponseValue:@{ - MTRAttributePathKey : attributePath, - MTRDataKey : cachedData, + if (![MTRStructureValueType isEqual:expected[MTRTypeKey]]) { + // For everything except arrays and structs, expectation is satisfied + // exactly when the values are equal. + return [self _attributeDataValue:observed isEqualToDataValue:expected]; } - error:nil]; - - return attrReport.value; -} -- (nullable NSNumber *)_informationalVendorID -{ - auto * vendorIDPath = [MTRAttributePath attributePathWithEndpointID:@(kRootEndpointId) - clusterID:@(MTRClusterIDTypeBasicInformationID) - attributeID:@(MTRClusterBasicAttributeVendorIDID)]; - - return [self _informationalNumberAtAttributePath:vendorIDPath]; -} + // Now we have two structure-values. Make sure they have the same number of fields + // in them. + if (![observed[MTRValueKey] isKindOfClass:NSArray.class] || ![expected[MTRValueKey] isKindOfClass:NSArray.class]) { + // Malformed data, just claim not equivalent. + MTR_LOG_ERROR("%@ at least one of observed and expected value is not an NSArrray: %@, %@", self, observed, expected); + return NO; + } -- (nullable NSNumber *)_informationalProductID -{ - auto * productIDPath = [MTRAttributePath attributePathWithEndpointID:@(kRootEndpointId) - clusterID:@(MTRClusterIDTypeBasicInformationID) - attributeID:@(MTRClusterBasicAttributeProductIDID)]; + NSArray *> * observedArray = observed[MTRValueKey]; + NSArray *> * expectedArray = expected[MTRValueKey]; - return [self _informationalNumberAtAttributePath:productIDPath]; -} + if (observedArray.count != expectedArray.count) { + return NO; + } -#pragma mark - Description handling + for (NSDictionary * expectedField in expectedArray) { + if (![expectedField[MTRContextTagKey] isKindOfClass:NSNumber.class] || ![expectedField[MTRDataKey] isKindOfClass:NSDictionary.class]) { + MTR_LOG_ERROR("%@ expected structure-value contains invalid field %@", self, expectedField); + return NO; + } -- (void)_updateAttributeDependentDescriptionData -{ - os_unfair_lock_assert_owner(&_lock); + NSNumber * expectedContextTag = expectedField[MTRContextTagKey]; - NSNumber * _Nullable vid = [self _informationalVendorID]; - NSNumber * _Nullable pid = [self _informationalProductID]; - NSNumber * _Nullable networkFeatures = [self _networkFeatures]; + // Make sure it's present in the other array. In practice, these are + // pretty small arrays, so the O(N^2) behavior here is ok. + BOOL found = NO; + for (NSDictionary * observedField in observedArray) { + if (![observedField[MTRContextTagKey] isKindOfClass:NSNumber.class] || ![observedField[MTRDataKey] isKindOfClass:NSDictionary.class]) { + MTR_LOG_ERROR("%@ observed structure-value contains invalid field %@", self, observedField); + return NO; + } - std::lock_guard lock(_descriptionLock); - _vid = vid; - _pid = pid; - _allNetworkFeatures = networkFeatures; -} + NSNumber * observedContextTag = observedField[MTRContextTagKey]; + if ([expectedContextTag isEqual:observedContextTag]) { + found = YES; -- (NSArray *)_endpointList -{ - os_unfair_lock_assert_owner(&_lock); - - auto * partsListPath = [MTRAttributePath attributePathWithEndpointID:@(kRootEndpointId) - clusterID:@(MTRClusterIDTypeDescriptorID) - attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributePartsListID)]; - auto * partsList = [self _cachedAttributeValueForPath:partsListPath]; - NSMutableArray * endpointsOnDevice = [self arrayOfNumbersFromAttributeValue:partsList]; - if (!endpointsOnDevice) { - endpointsOnDevice = [[NSMutableArray alloc] init]; - } - // Add Root node! - [endpointsOnDevice addObject:@(0)]; - return endpointsOnDevice; -} + // Compare the data. + if (![self _attributeDataValue:observedField[MTRDataKey] satisfiesValueExpectation:expectedField[MTRDataKey]]) { + return NO; + } -- (NSNumber * _Nullable)_networkFeatures -{ - NSNumber * _Nullable result = nil; - auto * endpoints = [self _endpointList]; - for (NSNumber * endpoint in endpoints) { - auto * featureMapPath = [MTRAttributePath attributePathWithEndpointID:endpoint - clusterID:@(MTRClusterIDTypeNetworkCommissioningID) - attributeID:@(MTRAttributeIDTypeGlobalAttributeFeatureMapID)]; - auto * featureMap = [self _informationalNumberAtAttributePath:featureMapPath]; - if (featureMap == nil) { - // No network commissioning cluster on this endpoint, or no known - // FeatureMap attribute value for it yet. - continue; + // Found a match for the context tag, stop looking. + break; + } } - if (result == nil) { - result = featureMap; - } else { - result = @(featureMap.unsignedLongLongValue | result.unsignedLongLongValue); + if (!found) { + // Context tag present in expected but not observed. + return NO; } } - return result; -} - -- (void)controllerSuspended -{ - // Nothing to do for now. -} - -- (void)controllerResumed -{ - // Nothing to do for now. + // All entries in the first field array matched entries in the second field + // array. Since the lengths are equal, the two arrays must match, as long + // as all the context tags listed are distinct. If someone produces invalid + // TLV with the same context tag set in it multiple times, this method could + // claim two structure-values are equivalent when the first has two fields + // with context tag N and the second has a field with context tag N and + // another field with context tag M. That should be ok, in practice, but if + // we discover it's not we will need a better algorithm here. It's not + // clear what "equivalent" should mean for such malformed TLV, expecially if + // the same context tag maps to different values in one of the structs. + return YES; } @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceClusterData.h b/src/darwin/Framework/CHIP/MTRDeviceClusterData.h new file mode 100644 index 0000000000..d34ada90e9 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDeviceClusterData.h @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2024 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 + +#import "MTRDefines_Internal.h" +#import "MTRDeviceDataValueDictionary.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + * Information about a cluster: data version and known attribute values. + */ +MTR_TESTABLE +@interface MTRDeviceClusterData : NSObject +@property (nonatomic, nullable) NSNumber * dataVersion; +@property (nonatomic, readonly) NSDictionary * attributes; // attributeID => data-value dictionary + +- (void)storeValue:(MTRDeviceDataValueDictionary _Nullable)value forAttribute:(NSNumber *)attribute; +- (void)removeValueForAttribute:(NSNumber *)attribute; + +- (nullable instancetype)initWithDataVersion:(NSNumber * _Nullable)dataVersion attributes:(NSDictionary * _Nullable)attributes; +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceClusterData.mm b/src/darwin/Framework/CHIP/MTRDeviceClusterData.mm new file mode 100644 index 0000000000..fb3d8b38ae --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDeviceClusterData.mm @@ -0,0 +1,122 @@ +/** + * Copyright (c) 2024 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 "MTRDeviceClusterData.h" +#import "MTRLogging_Internal.h" +#import "MTRUtilities.h" + +static NSString * const sDataVersionKey = @"dataVersion"; +static NSString * const sAttributesKey = @"attributes"; + +@implementation MTRDeviceClusterData { + NSMutableDictionary * _attributes; +} + +- (void)storeValue:(MTRDeviceDataValueDictionary _Nullable)value forAttribute:(NSNumber *)attribute +{ + _attributes[attribute] = value; +} + +- (void)removeValueForAttribute:(NSNumber *)attribute +{ + [_attributes removeObjectForKey:attribute]; +} + +- (NSDictionary *)attributes +{ + return _attributes; +} + ++ (BOOL)supportsSecureCoding +{ + return YES; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"", _dataVersion, static_cast(_attributes.count)]; +} + +- (nullable instancetype)init +{ + return [self initWithDataVersion:nil attributes:nil]; +} + +// Attributes dictionary is: attributeID => data-value dictionary +- (nullable instancetype)initWithDataVersion:(NSNumber * _Nullable)dataVersion attributes:(NSDictionary * _Nullable)attributes +{ + self = [super init]; + if (self == nil) { + return nil; + } + + _dataVersion = [dataVersion copy]; + _attributes = [NSMutableDictionary dictionaryWithCapacity:attributes.count]; + [_attributes addEntriesFromDictionary:attributes]; + + return self; +} + +- (nullable instancetype)initWithCoder:(NSCoder *)decoder +{ + self = [super init]; + if (self == nil) { + return nil; + } + + _dataVersion = [decoder decodeObjectOfClass:[NSNumber class] forKey:sDataVersionKey]; + if (_dataVersion != nil && ![_dataVersion isKindOfClass:[NSNumber class]]) { + MTR_LOG_ERROR("MTRDeviceClusterData got %@ for data version, not NSNumber.", _dataVersion); + return nil; + } + + static NSSet * const sAttributeValueClasses = [NSSet setWithObjects:[NSDictionary class], [NSArray class], [NSData class], [NSString class], [NSNumber class], nil]; + _attributes = [decoder decodeObjectOfClasses:sAttributeValueClasses forKey:sAttributesKey]; + if (_attributes != nil && ![_attributes isKindOfClass:[NSDictionary class]]) { + MTR_LOG_ERROR("MTRDeviceClusterData got %@ for attributes, not NSDictionary.", _attributes); + return nil; + } + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder +{ + [coder encodeObject:self.dataVersion forKey:sDataVersionKey]; + [coder encodeObject:self.attributes forKey:sAttributesKey]; +} + +- (id)copyWithZone:(NSZone *)zone +{ + return [[MTRDeviceClusterData alloc] initWithDataVersion:_dataVersion attributes:_attributes]; +} + +- (BOOL)isEqualToClusterData:(MTRDeviceClusterData *)otherClusterData +{ + return MTREqualObjects(_dataVersion, otherClusterData.dataVersion) + && MTREqualObjects(_attributes, otherClusterData.attributes); +} + +- (BOOL)isEqual:(id)object +{ + if ([object class] != [self class]) { + return NO; + } + + return [self isEqualToClusterData:object]; +} + +@end diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index a1872c3020..5695ef23c7 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -43,7 +43,6 @@ #import "MTRLogging_Internal.h" #import "MTRMetricKeys.h" #import "MTRMetricsCollector.h" -#import "MTROperationalCredentialsDelegate.h" #import "MTRP256KeypairBridge.h" #import "MTRPersistentStorageDelegateBridge.h" #import "MTRServerEndpoint_Internal.h" @@ -120,11 +119,9 @@ - (instancetype)initWithDelegate:(id)delegate queue @end @implementation MTRDeviceController { - chip::Controller::DeviceCommissioner * _cppCommissioner; chip::Credentials::PartialDACVerifier * _partialDACVerifier; chip::Credentials::DefaultDACVerifier * _defaultDACVerifier; MTRDeviceControllerDelegateBridge * _deviceControllerDelegateBridge; - MTROperationalCredentialsDelegate * _operationalCredentialsDelegate; MTRDeviceAttestationDelegateBridge * _deviceAttestationDelegateBridge; os_unfair_lock _underlyingDeviceMapLock; MTRCommissionableBrowser * _commissionableBrowser; @@ -208,7 +205,8 @@ - (NSString *)description - (BOOL)isRunning { - return _cppCommissioner != nullptr; + MTR_ABSTRACT_METHOD(); + return NO; } #pragma mark - Suspend/resume support @@ -315,19 +313,13 @@ - (void)_controllerResumed - (void)shutdown { - // Subclass hook; nothing to do. + [self _clearDeviceControllerDelegates]; } -- (NSNumber *)controllerNodeID +- (nullable NSNumber *)controllerNodeID { - auto block = ^NSNumber * { return @(self->_cppCommissioner->GetNodeId()); }; - - NSNumber * nodeID = [self syncRunOnWorkQueueWithReturnValue:block error:nil]; - if (!nodeID) { - MTR_LOG_ERROR("%@ A controller has no node id if it has not been started", self); - } - - return nodeID; + MTR_ABSTRACT_METHOD(); + return nil; } - (BOOL)setupCommissioningSessionWithPayload:(MTRSetupPayload *)payload @@ -449,18 +441,6 @@ - (void)removeDevice:(MTRDevice *)device } } -#ifdef DEBUG -- (NSDictionary *)unitTestGetDeviceAttributeCounts -{ - std::lock_guard lock(*self.deviceMapLock); - NSMutableDictionary * deviceAttributeCounts = [NSMutableDictionary dictionary]; - for (NSNumber * nodeID in _nodeIDToDeviceMap) { - deviceAttributeCounts[nodeID] = @([[_nodeIDToDeviceMap objectForKey:nodeID] unitTestAttributeCount]); - } - return deviceAttributeCounts; -} -#endif - - (BOOL)setOperationalCertificateIssuer:(nullable id)operationalCertificateIssuer queue:(nullable dispatch_queue_t)queue { @@ -567,56 +547,9 @@ - (void)getSessionForCommissioneeDevice:(chip::NodeId)deviceID completion:(MTRIn completion(nullptr, chip::NullOptional, [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); } -- (MTRTransportType)sessionTransportTypeForDevice:(MTRBaseDevice *)device -{ - VerifyOrReturnValue([self checkIsRunning], MTRTransportTypeUndefined); - - __block MTRTransportType result = MTRTransportTypeUndefined; - dispatch_sync(_chipWorkQueue, ^{ - VerifyOrReturn([self checkIsRunning]); - - if (device.isPASEDevice) { - chip::CommissioneeDeviceProxy * deviceProxy; - VerifyOrReturn(CHIP_NO_ERROR == self->_cppCommissioner->GetDeviceBeingCommissioned(device.nodeID, &deviceProxy)); - result = MTRMakeTransportType(deviceProxy->GetDeviceTransportType()); - } else { - auto scopedNodeID = self->_cppCommissioner->GetPeerScopedId(device.nodeID); - auto sessionHandle = self->_cppCommissioner->SessionMgr()->FindSecureSessionForNode(scopedNodeID); - VerifyOrReturn(sessionHandle.HasValue()); - result = MTRMakeTransportType(sessionHandle.Value()->AsSecureSession()->GetPeerAddress().GetTransportType()); - } - }); - return result; -} - -- (void)asyncGetCommissionerOnMatterQueue:(void (^)(chip::Controller::DeviceCommissioner *))block - errorHandler:(nullable MTRDeviceErrorHandler)errorHandler -{ - { - NSError * error; - if (![self checkIsRunning:&error]) { - if (errorHandler != nil) { - errorHandler(error); - } - return; - } - } - - dispatch_async(_chipWorkQueue, ^{ - NSError * error; - if (![self checkIsRunning:&error]) { - if (errorHandler != nil) { - errorHandler(error); - } - return; - } - - block(self->_cppCommissioner); - }); -} - - (void)asyncDispatchToMatterQueue:(dispatch_block_t)block errorHandler:(nullable MTRDeviceErrorHandler)errorHandler { + // TODO: Figure out how to get callsites to have an MTRDeviceController_Concrete. MTR_ABSTRACT_METHOD(); errorHandler([MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]); } @@ -666,68 +599,6 @@ - (nullable NSNumber *)compressedFabricID return storedValue.has_value() ? @(storedValue.value()) : nil; } -- (void)invalidateCASESessionForNode:(chip::NodeId)nodeID; -{ - auto block = ^{ - auto sessionMgr = self->_cppCommissioner->SessionMgr(); - VerifyOrDie(sessionMgr != nullptr); - - sessionMgr->MarkSessionsAsDefunct( - self->_cppCommissioner->GetPeerScopedId(nodeID), chip::MakeOptional(chip::Transport::SecureSession::Type::kCASE)); - }; - - [self syncRunOnWorkQueue:block error:nil]; -} - -- (void)downloadLogFromNodeWithID:(NSNumber *)nodeID - type:(MTRDiagnosticLogType)type - timeout:(NSTimeInterval)timeout - queue:(dispatch_queue_t)queue - completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion -{ - MTR_ABSTRACT_METHOD(); - dispatch_async(queue, ^{ - completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]); - }); -} - -- (NSArray *)accessGrantsForClusterPath:(MTRClusterPath *)clusterPath -{ - assertChipStackLockedByCurrentThread(); - - for (MTRServerEndpoint * endpoint in _serverEndpoints) { - if ([clusterPath.endpoint isEqual:endpoint.endpointID]) { - return [endpoint matterAccessGrantsForCluster:clusterPath.cluster]; - } - } - - // Nothing matched, no grants. - return @[]; -} - -- (nullable NSNumber *)neededReadPrivilegeForClusterID:(NSNumber *)clusterID attributeID:(NSNumber *)attributeID -{ - assertChipStackLockedByCurrentThread(); - - for (MTRServerEndpoint * endpoint in _serverEndpoints) { - for (MTRServerCluster * cluster in endpoint.serverClusters) { - if (![cluster.clusterID isEqual:clusterID]) { - continue; - } - - for (MTRServerAttribute * attr in cluster.attributes) { - if (![attr.attributeID isEqual:attributeID]) { - continue; - } - - return @(attr.requiredReadPrivilege); - } - } - } - - return nil; -} - #ifdef DEBUG + (void)forceLocalhostAdvertisingOnly { @@ -800,6 +671,14 @@ - (void)removeDeviceControllerDelegate:(id)delegate } } +- (void)_clearDeviceControllerDelegates +{ + @synchronized(self) { + _strongDelegateForSetDelegateAPI = nil; + [_delegates removeAllObjects]; + } +} + // Iterates the delegates, and remove delegate info objects if the delegate object has dealloc'ed // Returns number of delegates called - (NSUInteger)_iterateDelegateInfoWithBlock:(void (^_Nullable)(MTRDeviceControllerDelegateInfo * delegateInfo))block diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h index 826fd1821f..508092b40f 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h @@ -18,7 +18,9 @@ #import #import #import -#import + +#import "MTRDeviceClusterData.h" +#import "MTRDevice_Internal.h" #include diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index 23643d6a52..9de51431bf 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -70,17 +70,6 @@ using namespace chip::Controller; using namespace chip::Tracing::DarwinFramework; -static bool sExitHandlerRegistered = false; -static void ShutdownOnExit() -{ - // Depending on the structure of the software, this code might execute *after* the main autorelease pool has exited. - // Therefore, it needs to be enclosed in its own autorelease pool. - @autoreleasepool { - MTR_LOG("ShutdownOnExit invoked on exit"); - [[MTRDeviceControllerFactory sharedInstance] stopControllerFactory]; - } -} - @interface MTRDeviceControllerFactoryParams () // Flag to keep track of whether our .storage is real consumer-provided storage @@ -89,6 +78,18 @@ @interface MTRDeviceControllerFactoryParams () @end +class MTRApplicationCallback : public app::ReadHandler::ApplicationCallback { + CHIP_ERROR OnSubscriptionRequested(app::ReadHandler & readHandler, Transport::SecureSession & secureSession) override + { + uint16_t requestedMinInterval = 0; + uint16_t requestedMaxInterval = 0; + readHandler.GetReportingIntervals(requestedMinInterval, requestedMaxInterval); + + uint16_t maximumMaxInterval = std::max(kSubscriptionMaxIntervalPublisherLimit, requestedMaxInterval); + return readHandler.SetMaxReportingInterval(maximumMaxInterval); + } +}; + MTR_DIRECT_MEMBERS @interface MTRDeviceControllerFactory () - (void)preWarmCommissioningSessionDone; @@ -101,6 +102,7 @@ @implementation MTRDeviceControllerFactory { Credentials::IgnoreCertificateValidityPeriodPolicy _certificateValidityPolicy; Crypto::RawKeySessionKeystore _sessionKeystore; + MTRApplicationCallback _applicationCallback; // We use TestPersistentStorageDelegate just to get an in-memory store to back // our group data provider impl. We initialize this store correctly on every // controller startup, so don't need to actually persist it. @@ -250,6 +252,8 @@ - (void)cleanupStartupObjects // Make sure the deinit order here is the reverse of the init order in // startControllerFactory: + app::InteractionModelEngine::GetInstance()->UnregisterReadHandlerAppCallback(); + _certificationDeclarationCertificates = nil; _productAttestationAuthorityCertificates = nil; @@ -338,6 +342,7 @@ - (BOOL)_startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParam error:(NSError * __autoreleasing *)error { [self _assertCurrentQueueIsNotMatterQueue]; + [self _maybeLogBacktrace:@"Controller Factory Start"]; __block CHIP_ERROR err = CHIP_ERROR_INTERNAL; dispatch_sync(_chipWorkQueue, ^{ @@ -377,6 +382,8 @@ - (BOOL)_startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParam _productAttestationAuthorityCertificates = [startupParams.productAttestationAuthorityCertificates copy]; _certificationDeclarationCertificates = [startupParams.certificationDeclarationCertificates copy]; + app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(&_applicationCallback); + { chip::Controller::FactoryInitParams params; if (startupParams.port != nil) { @@ -394,17 +401,6 @@ - (BOOL)_startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParam SuccessOrExit(err = _controllerFactory->Init(params)); } - // This needs to happen after DeviceControllerFactory::Init, - // because that creates (lazily, by calling functions with - // static variables in them) some static-lifetime objects. - if (!sExitHandlerRegistered) { - if (atexit(ShutdownOnExit) != 0) { - char error[128]; - strerror_r(errno, error, sizeof(error)); - MTR_LOG_ERROR("Warning: Failed to register atexit handler: %s", error); - } - sExitHandlerRegistered = true; - } HeapObjectPoolExitHandling::IgnoreLeaksOnExit(); // Make sure we don't leave a system state running while we have no @@ -440,9 +436,10 @@ - (BOOL)_startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParam - (void)stopControllerFactory { [self _assertCurrentQueueIsNotMatterQueue]; + [self _maybeLogBacktrace:@"Controller Factory Stop"]; - while ([_controllers count] != 0) { - [_controllers[0] shutdown]; + for (MTRDeviceController * controller in [_controllers copy]) { + [controller shutdown]; } dispatch_sync(_chipWorkQueue, ^{ @@ -1267,6 +1264,13 @@ - (FabricTable * _Nullable)fabricTable return systemState->Fabrics(); } +- (void)_maybeLogBacktrace:(NSString *)message +{ + @autoreleasepool { + MTR_LOG("[%@]: %@", message, [NSThread callStackSymbols]); + } +} + @end @interface MTRDummyStorage : NSObject diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.h b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.h index e0820d57e0..0cfb25f494 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.h @@ -17,6 +17,8 @@ #import +#import +#import #import #import #import @@ -131,6 +133,60 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)operationalInstanceAdded:(NSNumber *)nodeID; +/** + * Get the access grants that apply for the given cluster path. + */ +- (NSArray *)accessGrantsForClusterPath:(MTRClusterPath *)clusterPath; + +/** + * Get the privilege level needed to read the given attribute. There's no + * endpoint provided because the expectation is that this information is the + * same for all cluster instances. + * + * Returns nil if we have no such attribute defined on any endpoint, otherwise + * one of MTRAccessControlEntry* constants wrapped in NSNumber. + * + * Only called on the Matter queue. + */ +- (nullable NSNumber *)neededReadPrivilegeForClusterID:(NSNumber *)clusterID attributeID:(NSNumber *)attributeID; + +/** + * Try to asynchronously dispatch the given block on the Matter queue. If the + * controller is not running either at call time or when the block would be + * about to run, the provided error handler will be called with an error. Note + * that this means the error handler might be called on an arbitrary queue, and + * might be called before this function returns or after it returns. + * + * The DeviceCommissioner pointer passed to the callback should only be used + * synchronously during the callback invocation. + * + * If the error handler is nil, failure to run the block will be silent. + */ +- (void)asyncGetCommissionerOnMatterQueue:(void (^)(chip::Controller::DeviceCommissioner *))block + errorHandler:(nullable MTRDeviceErrorHandler)errorHandler; + +/** + * Returns the transport used by the current session with the given device, + * or `MTRTransportTypeUndefined` if no session is currently active. + */ +- (MTRTransportType)sessionTransportTypeForDevice:(MTRBaseDevice *)device; + +/** + * Invalidate the CASE session for the given node ID. This is a temporary thing + * just to support MTRBaseDevice's invalidateCASESession. Must not be called on + * the Matter event queue. + */ +- (void)invalidateCASESessionForNode:(NSNumber *)nodeID; + +/** + * Download log of the desired type from the device. + */ +- (void)downloadLogFromNodeWithID:(NSNumber *)nodeID + type:(MTRDiagnosticLogType)type + timeout:(NSTimeInterval)timeout + queue:(dispatch_queue_t)queue + completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion; + @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm index cb86c5d2db..1a164e50b1 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm @@ -141,6 +141,7 @@ @implementation MTRDeviceController_Concrete { @synthesize commissionableBrowser = _commissionableBrowser; @synthesize concurrentSubscriptionPool = _concurrentSubscriptionPool; @synthesize storageBehaviorConfiguration = _storageBehaviorConfiguration; +@synthesize controllerNodeID = _controllerNodeID; - (nullable instancetype)initWithParameters:(MTRDeviceControllerAbstractParameters *)parameters error:(NSError * __autoreleasing *)error @@ -417,6 +418,7 @@ - (void)shutdown return; } [self finalShutdown]; + [super shutdown]; } - (void)finalShutdown @@ -729,6 +731,7 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams self->_storedFabricIndex = fabricIdx; self->_storedCompressedFabricID = _cppCommissioner->GetCompressedFabricId(); + self->_controllerNodeID = @(_cppCommissioner->GetNodeId()); chip::Crypto::P256PublicKey rootPublicKey; if (_cppCommissioner->GetRootPublicKey(rootPublicKey) == CHIP_NO_ERROR) { @@ -793,18 +796,6 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams return YES; } -- (NSNumber *)controllerNodeID -{ - auto block = ^NSNumber * { return @(self->_cppCommissioner->GetNodeId()); }; - - NSNumber * nodeID = [self syncRunOnWorkQueueWithReturnValue:block error:nil]; - if (!nodeID) { - MTR_LOG_ERROR("%@ A controller has no node id if it has not been started", self); - } - - return nodeID; -} - static inline void emitMetricForSetupPayload(MTRSetupPayload * payload) { MATTER_LOG_METRIC(kMetricDeviceVendorID, [payload.vendorID unsignedIntValue]); @@ -1158,7 +1149,7 @@ - (MTRDevice *)_setupDeviceForNodeID:(NSNumber *)nodeID prefetchedClusterData:(N { os_unfair_lock_assert_owner(self.deviceMapLock); - MTRDevice * deviceToReturn = [[MTRDevice_Concrete alloc] initWithNodeID:nodeID controller:self]; + MTRDevice_Concrete * deviceToReturn = [[MTRDevice_Concrete alloc] initWithNodeID:nodeID controller:self]; // If we're not running, don't add the device to our map. That would // create a cycle that nothing would break. Just return the device, // which will be in exactly the state it would be in if it were created @@ -1199,7 +1190,16 @@ - (MTRDevice *)_setupDeviceForNodeID:(NSNumber *)nodeID prefetchedClusterData:(N std::lock_guard lock(*self.deviceMapLock); NSMutableDictionary * deviceAttributeCounts = [NSMutableDictionary dictionary]; for (NSNumber * nodeID in self.nodeIDToDeviceMap) { - deviceAttributeCounts[nodeID] = @([[self.nodeIDToDeviceMap objectForKey:nodeID] unitTestAttributeCount]); + MTRDevice * device = [self.nodeIDToDeviceMap objectForKey:nodeID]; + + // TODO: Can we not just assume this isKindOfClass test is true? Would be + // really nice if we had compile-time checking for this somehow... + if (![device isKindOfClass:MTRDevice_Concrete.class]) { + continue; + } + + auto * concreteDevice = static_cast(device); + deviceAttributeCounts[nodeID] = @([concreteDevice unitTestAttributeCount]); } return deviceAttributeCounts; } @@ -1231,30 +1231,6 @@ - (BOOL)setOperationalCertificateIssuer:(nullable id(device); + // In the case that this device is known to use thread, queue this with subscription attempts as well, to // help with throttling Thread traffic. - if ([device deviceUsesThread]) { + if ([concreteDevice deviceUsesThread]) { MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)]; [workItem setReadyHandler:^(id _Nonnull context, NSInteger retryCount, MTRAsyncWorkCompletionBlock _Nonnull workItemCompletion) { MTRInternalDeviceConnectionCallback completionWrapper = ^(chip::Messaging::ExchangeManager * _Nullable exchangeManager, @@ -1620,14 +1606,14 @@ - (CHIP_ERROR)isRunningOnFabric:(chip::FabricTable *)fabricTable return CHIP_NO_ERROR; } -- (void)invalidateCASESessionForNode:(chip::NodeId)nodeID; +- (void)invalidateCASESessionForNode:(NSNumber *)nodeID; { auto block = ^{ auto sessionMgr = self->_cppCommissioner->SessionMgr(); VerifyOrDie(sessionMgr != nullptr); sessionMgr->MarkSessionsAsDefunct( - self->_cppCommissioner->GetPeerScopedId(nodeID), chip::MakeOptional(chip::Transport::SecureSession::Type::kCASE)); + self->_cppCommissioner->GetPeerScopedId(nodeID.unsignedLongLongValue), chip::MakeOptional(chip::Transport::SecureSession::Type::kCASE)); }; [self syncRunOnWorkQueue:block error:nil]; @@ -1713,15 +1699,6 @@ - (nullable NSNumber *)neededReadPrivilegeForClusterID:(NSNumber *)clusterID att return nil; } -#ifdef DEBUG -+ (void)forceLocalhostAdvertisingOnly -{ - auto interfaceIndex = chip::Inet::InterfaceId::PlatformType(kDNSServiceInterfaceIndexLocalOnly); - auto interfaceId = chip::Inet::InterfaceId(interfaceIndex); - chip::app::DnssdServer::Instance().SetInterfaceId(interfaceId); -} -#endif // DEBUG - @end /** @@ -1736,11 +1713,6 @@ - (instancetype)initWithIssuer:(id)nocChainIssuer; @implementation MTRDeviceController_Concrete (Deprecated) -- (NSNumber *)controllerNodeId -{ - return self.controllerNodeID; -} - - (nullable NSData *)fetchAttestationChallengeForDeviceId:(uint64_t)deviceId { return [self attestationChallengeForDeviceID:@(deviceId)]; @@ -1986,11 +1958,6 @@ - (nullable NSString *)openPairingWindowWithPIN:(uint64_t)deviceID return [self syncRunOnWorkQueueWithReturnValue:block error:error]; } -- (nullable NSData *)computePaseVerifier:(uint32_t)setupPincode iterations:(uint32_t)iterations salt:(NSData *)salt -{ - return [MTRDeviceController computePASEVerifierForSetupPasscode:@(setupPincode) iterations:@(iterations) salt:salt error:nil]; -} - - (void)setPairingDelegate:(id)delegate queue:(dispatch_queue_t)queue { auto * delegateShim = [[MTRDevicePairingDelegateShim alloc] initWithDelegate:delegate]; diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h index 958e7914b1..c26518d532 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h @@ -20,7 +20,6 @@ */ #import -#import #import // for MTRClusterPath #import "MTRDeviceConnectionBridge.h" // For MTRInternalDeviceConnectionCallback @@ -32,6 +31,7 @@ #import #import "MTRBaseDevice.h" +#import "MTRDeviceClusterData.h" #import "MTRDeviceController.h" #import "MTRDeviceControllerDataStore.h" #import "MTRDeviceControllerDelegate.h" @@ -155,34 +155,6 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)getSessionForCommissioneeDevice:(chip::NodeId)deviceID completion:(MTRInternalDeviceConnectionCallback)completion; -/** - * Returns the transport used by the current session with the given device, - * or `MTRTransportTypeUndefined` if no session is currently active. - */ -- (MTRTransportType)sessionTransportTypeForDevice:(MTRBaseDevice *)device; - -/** - * Invalidate the CASE session for the given node ID. This is a temporary thing - * just to support MTRBaseDevice's invalidateCASESession. Must not be called on - * the Matter event queue. - */ -- (void)invalidateCASESessionForNode:(chip::NodeId)nodeID; - -/** - * Try to asynchronously dispatch the given block on the Matter queue. If the - * controller is not running either at call time or when the block would be - * about to run, the provided error handler will be called with an error. Note - * that this means the error handler might be called on an arbitrary queue, and - * might be called before this function returns or after it returns. - * - * The DeviceCommissioner pointer passed to the callback should only be used - * synchronously during the callback invocation. - * - * If the error handler is nil, failure to run the block will be silent. - */ -- (void)asyncGetCommissionerOnMatterQueue:(void (^)(chip::Controller::DeviceCommissioner *))block - errorHandler:(nullable MTRDeviceErrorHandler)errorHandler; - /** * Try to asynchronously dispatch the given block on the Matter queue. If the * controller is not running either at call time or when the block would be @@ -201,32 +173,6 @@ NS_ASSUME_NONNULL_BEGIN */ - (MTRBaseDevice *)baseDeviceForNodeID:(NSNumber *)nodeID; -/** - * Download log of the desired type from the device. - */ -- (void)downloadLogFromNodeWithID:(NSNumber *)nodeID - type:(MTRDiagnosticLogType)type - timeout:(NSTimeInterval)timeout - queue:(dispatch_queue_t)queue - completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion; - -/** - * Get the access grants that apply for the given cluster path. - */ -- (NSArray *)accessGrantsForClusterPath:(MTRClusterPath *)clusterPath; - -/** - * Get the privilege level needed to read the given attribute. There's no - * endpoint provided because the expectation is that this information is the - * same for all cluster instances. - * - * Returns nil if we have no such attribute defined on any endpoint, otherwise - * one of MTRAccessControlEntry* constants wrapped in NSNumber. - * - * Only called on the Matter queue. - */ -- (nullable NSNumber *)neededReadPrivilegeForClusterID:(NSNumber *)clusterID attributeID:(NSNumber *)attributeID; - #pragma mark - Device-specific data and SDK access // DeviceController will act as a central repository for this opaque dictionary that MTRDevice manages - (MTRDevice *)deviceForNodeID:(NSNumber *)nodeID; @@ -265,8 +211,6 @@ static NSString * const kDeviceControllerErrorKeyAllocation = @"Generating new o static NSString * const kDeviceControllerErrorCSRValidation = @"Extracting public key from CSR failed"; static NSString * const kDeviceControllerErrorGetCommissionee = @"Failure obtaining device being commissioned"; static NSString * const kDeviceControllerErrorGetAttestationChallenge = @"Failure getting attestation challenge"; -static NSString * const kDeviceControllerErrorSpake2pVerifierGenerationFailed = @"PASE verifier generation failed"; -static NSString * const kDeviceControllerErrorSpake2pVerifierSerializationFailed = @"PASE verifier serialization failed"; static NSString * const kDeviceControllerErrorCDCertStoreInit = @"Init failure while initializing Certificate Declaration Signing Keys store"; NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_XPC.mm b/src/darwin/Framework/CHIP/MTRDeviceController_XPC.mm index 45c675121e..7e88870aa7 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_XPC.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController_XPC.mm @@ -40,46 +40,53 @@ @interface MTRDeviceController_XPC () @end +NSString * const MTRDeviceControllerRegistrationControllerContextKey = @"MTRDeviceControllerRegistrationControllerContext"; +NSString * const MTRDeviceControllerRegistrationNodeIDsKey = @"MTRDeviceControllerRegistrationNodeIDs"; +NSString * const MTRDeviceControllerRegistrationNodeIDKey = @"MTRDeviceControllerRegistrationNodeID"; + // #define MTR_HAVE_MACH_SERVICE_NAME_CONSTRUCTOR @implementation MTRDeviceController_XPC -#pragma mark - Device Node ID Commands +#pragma mark - Node ID Management -- (void)_registerNodeID:(NSNumber *)nodeID +MTR_DEVICECONTROLLER_SIMPLE_REMOTE_XPC_COMMAND(updateControllerConfiguration + : (NSDictionary *) controllerState, updateControllerConfiguration + : (NSDictionary *) controllerState) + +- (void)_updateRegistrationInfo { - @try { - [[self.xpcConnection remoteObjectProxyWithErrorHandler:^(NSError * _Nonnull error) { - MTR_LOG_ERROR("Register node error: %@ nodeID: %@", error, nodeID); - }] deviceController:self.uniqueIdentifier registerNodeID:nodeID]; - } @catch (NSException * exception) { - MTR_LOG_ERROR("Exception registering nodeID: %@", exception); + NSMutableDictionary * registrationInfo = [NSMutableDictionary dictionary]; + + NSMutableDictionary * controllerContext = [NSMutableDictionary dictionary]; + NSMutableArray * nodeIDs = [NSMutableArray array]; + + for (NSNumber * nodeID in [self.nodeIDToDeviceMap keyEnumerator]) { + NSMutableDictionary * nodeDictionary = [NSMutableDictionary dictionary]; + MTR_REQUIRED_ATTRIBUTE(MTRDeviceControllerRegistrationNodeIDKey, nodeID, nodeDictionary) + + [nodeIDs addObject:nodeDictionary]; } + MTR_REQUIRED_ATTRIBUTE(MTRDeviceControllerRegistrationNodeIDsKey, nodeIDs, registrationInfo) + MTR_REQUIRED_ATTRIBUTE(MTRDeviceControllerRegistrationControllerContextKey, controllerContext, registrationInfo) + + [self updateControllerConfiguration:registrationInfo]; +} + +- (void)_registerNodeID:(NSNumber *)nodeID +{ + [self _updateRegistrationInfo]; } - (void)_unregisterNodeID:(NSNumber *)nodeID { - @try { - [[self.xpcConnection remoteObjectProxyWithErrorHandler:^(NSError * _Nonnull error) { - MTR_LOG_ERROR("Unregister node error: %@ nodeID: %@", error, nodeID); - }] deviceController:self.uniqueIdentifier unregisterNodeID:nodeID]; - } @catch (NSException * exception) { - MTR_LOG_ERROR("Exception registering nodeID: %@", exception); - } + [self _updateRegistrationInfo]; } -- (void)_checkinWithContext:(NSDictionary *)context +- (void)removeDevice:(MTRDevice *)device { - @try { - if (!context) - context = [NSDictionary dictionary]; - - [[self.xpcConnection remoteObjectProxyWithErrorHandler:^(NSError * _Nonnull error) { - MTR_LOG_ERROR("Checkin error: %@", error); - }] deviceController:self.uniqueIdentifier checkInWithContext:context]; - } @catch (NSException * exception) { - MTR_LOG_ERROR("Exception registering nodeID: %@", exception); - } + [super removeDevice:device]; + [self _updateRegistrationInfo]; } #pragma mark - XPC @@ -241,18 +248,10 @@ - (BOOL)_setupXPCConnection MTR_LOG("%@ Activating new XPC connection", self); [self.xpcConnection activate]; - [self _checkinWithContext:[NSDictionary dictionary]]; - // FIXME: Trying to kick all the MTRDevices attached to this controller to re-establish connections // This state needs to be stored properly and re-established at connnection time - MTR_LOG("%@ Starting existing NodeID Registration", self); - for (NSNumber * nodeID in [self.nodeIDToDeviceMap keyEnumerator]) { - MTR_LOG("%@ => Registering nodeID: %@", self, nodeID); - [self _registerNodeID:nodeID]; - } - - MTR_LOG("%@ Done existing NodeID Registration", self); + [self _updateRegistrationInfo]; self.xpcConnectedOrConnecting = YES; } else { MTR_LOG_ERROR("%@ Failed to set up XPC Connection", self); @@ -340,7 +339,7 @@ - (MTRDevice *)_setupDeviceForNodeID:(NSNumber *)nodeID prefetchedClusterData:(N [self.nodeIDToDeviceMap setObject:deviceToReturn forKey:nodeID]; MTR_LOG("%s: returning XPC device for node id %@", __PRETTY_FUNCTION__, nodeID); - [self _registerNodeID:nodeID]; + [self _updateRegistrationInfo]; return deviceToReturn; } diff --git a/config/ios/SystemProjectConfig.h b/src/darwin/Framework/CHIP/MTRDeviceDataValueDictionary.h similarity index 70% rename from config/ios/SystemProjectConfig.h rename to src/darwin/Framework/CHIP/MTRDeviceDataValueDictionary.h index 06d9baaee5..53a6b2e6f9 100644 --- a/config/ios/SystemProjectConfig.h +++ b/src/darwin/Framework/CHIP/MTRDeviceDataValueDictionary.h @@ -1,6 +1,5 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors +/** + * Copyright (c) 2024 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. @@ -15,12 +14,13 @@ * limitations under the License. */ +#import + +NS_ASSUME_NONNULL_BEGIN + /** - * @file - * chip::System project configuration for standalone builds on iOS - * + * A data-value as defined in MTRBaseDevice.h. */ -#ifndef SYSTEMPROJECTCONFIG_H -#define SYSTEMPROJECTCONFIG_H +typedef NSDictionary * MTRDeviceDataValueDictionary; -#endif /* SYSTEMPROJECTCONFIG_H */ +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceType.h b/src/darwin/Framework/CHIP/MTRDeviceType.h new file mode 100644 index 0000000000..aded23e7af --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDeviceType.h @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2024 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 + +#import + +#import + +NS_ASSUME_NONNULL_BEGIN + +MTR_NEWLY_AVAILABLE +@interface MTRDeviceType : NSObject + +/** + * Returns an MTRDeviceType for the given ID, if the ID is known. Returns nil + * for unknown IDs. + */ ++ (nullable MTRDeviceType *)deviceTypeForID:(NSNumber *)deviceTypeID; + +/** + * The identifier of the device type (32-bit unsigned integer). + */ +@property (nonatomic, readonly, copy) NSNumber * id; + +/** + * Returns the name of the device type. + */ +@property (nonatomic, readonly, retain) NSString * name; + +/** + * Returns whether this is a utility device type. + */ +@property (nonatomic, readonly, assign) BOOL isUtility; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceType.mm b/src/darwin/Framework/CHIP/MTRDeviceType.mm new file mode 100644 index 0000000000..394640d2d7 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDeviceType.mm @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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 + +#import "MTRDeviceTypeMetadata.h" +#import "MTRLogging_Internal.h" + +#include + +using namespace chip; + +@implementation MTRDeviceType + +- (nullable instancetype)initWithDeviceTypeID:(NSNumber *)id name:(NSString *)name isUtility:(BOOL)isUtility +{ + if (!(self = [super init])) { + return nil; + } + + _id = id; + _name = name; + _isUtility = isUtility; + return self; +} + ++ (nullable MTRDeviceType *)deviceTypeForID:(NSNumber *)deviceTypeID +{ + if (!CanCastTo(deviceTypeID.unsignedLongLongValue)) { + MTR_LOG_ERROR("Invalid device type ID: 0x%llx", deviceTypeID.unsignedLongLongValue); + return nil; + } + + auto * deviceTypeData = MTRDeviceTypeDataForID(static_cast(deviceTypeID.unsignedLongLongValue)); + if (!deviceTypeData) { + return nil; + } + + return [[MTRDeviceType alloc] + initWithDeviceTypeID:deviceTypeID + name:[NSString stringWithUTF8String:deviceTypeData->name] + isUtility:(deviceTypeData->deviceClass != MTRDeviceTypeClass::Simple)]; +} + +@end diff --git a/src/darwin/Framework/CHIP/MTRDeviceTypeMetadata.h b/src/darwin/Framework/CHIP/MTRDeviceTypeMetadata.h index d60f6232a7..2597f60ec4 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceTypeMetadata.h +++ b/src/darwin/Framework/CHIP/MTRDeviceTypeMetadata.h @@ -21,4 +21,23 @@ #include -BOOL MTRIsKnownUtilityDeviceType(chip::DeviceTypeId aDeviceTypeId); +NS_ASSUME_NONNULL_BEGIN + +enum class MTRDeviceTypeClass +{ + Utility, + Simple, + Node, // Might not be a real class, but we have it for Root Node for now. +}; + +struct MTRDeviceTypeData +{ + chip::DeviceTypeId id; + MTRDeviceTypeClass deviceClass; + const char * name; +}; + +// Returns null for unknown device types. +const MTRDeviceTypeData * _Nullable MTRDeviceTypeDataForID(chip::DeviceTypeId aDeviceTypeId); + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDevice_Concrete.h b/src/darwin/Framework/CHIP/MTRDevice_Concrete.h index 70dac9a362..f2596b8ca4 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Concrete.h +++ b/src/darwin/Framework/CHIP/MTRDevice_Concrete.h @@ -18,6 +18,7 @@ #import #import +#import "MTRDeviceClusterData.h" #import "MTRDeviceController_Concrete.h" NS_ASSUME_NONNULL_BEGIN @@ -31,6 +32,23 @@ NS_ASSUME_NONNULL_BEGIN // false-positives, for example due to compressed fabric id collisions. - (void)nodeMayBeAdvertisingOperational; +// Method to insert persisted cluster data +// Contains data version information and attribute values. +- (void)setPersistedClusterData:(NSDictionary *)clusterData; + +// Method to insert persisted data that pertains to the whole device. +- (void)setPersistedDeviceData:(NSDictionary *)data; + +// Returns whether this MTRDevice_Concrete uses Thread for communication +- (BOOL)deviceUsesThread; + +// For use from MTRDeviceController_Concrete when setting up a device instance. +- (void)setStorageBehaviorConfiguration:(MTRDeviceStorageBehaviorConfiguration *)storageBehaviorConfiguration; + +#ifdef DEBUG +- (NSUInteger)unitTestAttributeCount; +#endif + @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm index 5d6e47c8d9..2423e4e876 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm +++ b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm @@ -31,6 +31,7 @@ #import "MTRDeviceConnectivityMonitor.h" #import "MTRDeviceControllerOverXPC.h" #import "MTRDeviceController_Internal.h" +#import "MTRDeviceDataValueDictionary.h" #import "MTRDevice_Concrete.h" #import "MTRDevice_Internal.h" #import "MTRError_Internal.h" @@ -55,6 +56,12 @@ #import #import +static NSString * const sLastInitialSubscribeLatencyKey = @"lastInitialSubscribeLatency"; + +// Not static, because these are public API. +NSString * const MTRPreviousDataKey = @"previousData"; +NSString * const MTRDataVersionKey = @"dataVersion"; + // allow readwrite access to superclass properties @interface MTRDevice_Concrete () @@ -208,7 +215,6 @@ @interface MTRDevice_Concrete () // whatever lock protects the time sync bits. @property (nonatomic, readonly) os_unfair_lock timeSyncLock; -@property (nonatomic) chip::FabricIndex fabricIndex; @property (nonatomic) NSMutableArray *> * unreportedEvents; @property (nonatomic) BOOL receivingReport; @property (nonatomic) BOOL receivingPrimingReport; @@ -367,7 +373,6 @@ - (instancetype)initWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceControlle if (self = [super initForSubclassesWithNodeID:nodeID controller:controller]) { _timeSyncLock = OS_UNFAIR_LOCK_INIT; _descriptionLock = OS_UNFAIR_LOCK_INIT; - _fabricIndex = controller.fabricIndex; _queue = dispatch_queue_create("org.csa-iot.matter.framework.device.workqueue", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); _expectedValueCache = [NSMutableDictionary dictionary]; @@ -389,6 +394,8 @@ - (instancetype)initWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceControlle mtr_weakify(self); _systemTimeChangeObserverToken = [[NSNotificationCenter defaultCenter] addObserverForName:NSSystemClockDidChangeNotification object:nil queue:nil usingBlock:^(NSNotification * _Nonnull notification) { mtr_strongify(self); + VerifyOrReturn(self); + std::lock_guard lock(self->_lock); [self _resetStorageBehaviorState]; }]; @@ -757,7 +764,11 @@ - (void)_ensureSubscriptionForExistingDelegates:(NSString *)reason } if ([self _deviceUsesThread]) { MTR_LOG(" => %@ - device is a thread device, scheduling in pool", self); + mtr_weakify(self); [self _scheduleSubscriptionPoolWork:^{ + mtr_strongify(self); + VerifyOrReturn(self); + [self->_deviceController asyncDispatchToMatterQueue:^{ std::lock_guard lock(self->_lock); [self _setupSubscriptionWithReason:[NSString stringWithFormat:@"%@ and scheduled subscription is happening", reason]]; @@ -770,8 +781,6 @@ - (void)_ensureSubscriptionForExistingDelegates:(NSString *)reason } errorHandler:nil]; } } - - [self _notifyDelegateOfPrivateInternalPropertiesChanges]; } - (void)invalidate @@ -1165,10 +1174,19 @@ - (void)_scheduleSubscriptionPoolWork:(dispatch_block_t)workBlock inNanoseconds: return; } + mtr_weakify(self); dispatch_block_t workBlockToQueue = ^{ + mtr_strongify(self); + // This block may be delayed by a specified number of nanoseconds, potentially running after the device is deallocated. + // If so, MTRAsyncWorkItem::initWithQueue will assert on a nil queue, which will cause a crash. + VerifyOrReturn(self); + // In the case where a resubscription triggering event happened and already established, running the work block should result in a no-op MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.queue]; [workItem setReadyHandler:^(id _Nonnull context, NSInteger retryCount, MTRAsyncWorkCompletionBlock _Nonnull completion) { + mtr_strongify(self); + VerifyOrReturn(self); + MTR_LOG("%@ - work item is ready to attempt pooled subscription", self); os_unfair_lock_lock(&self->_lock); #ifdef DEBUG @@ -1236,7 +1254,6 @@ - (void)_handleResubscriptionNeededWithDelayOnDeviceQueue:(NSNumber *)resubscrip std::lock_guard lock(_descriptionLock); _lastSubscriptionFailureTimeForDescription = _lastSubscriptionFailureTime; } - [self _notifyDelegateOfPrivateInternalPropertiesChanges]; BOOL deviceUsesThread = [self _deviceUsesThread]; // If a previous resubscription failed, remove the item from the subscription pool. @@ -1246,7 +1263,11 @@ - (void)_handleResubscriptionNeededWithDelayOnDeviceQueue:(NSNumber *)resubscrip // Use the existing _triggerResubscribeWithReason mechanism, which does the right checks when // this block is run -- if other triggering events had happened, this would become a no-op. + mtr_weakify(self); auto resubscriptionBlock = ^{ + mtr_strongify(self); + VerifyOrReturn(self); + [self->_deviceController asyncDispatchToMatterQueue:^{ [self _triggerResubscribeWithReason:@"ResubscriptionNeeded timer fired" nodeLikelyReachable:NO]; } errorHandler:^(NSError * _Nonnull error) { @@ -1312,7 +1333,6 @@ - (void)_doHandleSubscriptionReset:(NSNumber * _Nullable)retryDelay std::lock_guard lock(_descriptionLock); _lastSubscriptionFailureTimeForDescription = _lastSubscriptionFailureTime; } - [self _notifyDelegateOfPrivateInternalPropertiesChanges]; // if there is no delegate then also do not retry if (![self _delegateExists]) { @@ -1357,7 +1377,11 @@ - (void)_doHandleSubscriptionReset:(NSNumber * _Nullable)retryDelay // Call _reattemptSubscriptionNowIfNeededWithReason when timer fires - if subscription is // in a better state at that time this will be a no-op. + mtr_weakify(self); auto resubscriptionBlock = ^{ + mtr_strongify(self); + VerifyOrReturn(self); + [self->_deviceController asyncDispatchToMatterQueue:^{ std::lock_guard lock(self->_lock); [self _reattemptSubscriptionNowIfNeededWithReason:@"got subscription reset"]; @@ -1685,8 +1709,6 @@ - (void)_scheduleClusterDataPersistence } } - [self _notifyDelegateOfPrivateInternalPropertiesChanges]; - // Do not schedule persistence if device is reporting excessively if ([self _deviceIsReportingExcessively]) { return; @@ -1752,6 +1774,7 @@ - (void)_handleReportEnd [delegate deviceConfigurationChanged:self]; } }]; + [self _notifyDelegateOfPrivateInternalPropertiesChanges]; _deviceConfigurationChanged = NO; } @@ -1766,6 +1789,7 @@ - (void)_handleReportEnd // all the data for the device now. _deviceCachePrimed = YES; [self _callDelegateDeviceCachePrimed]; + [self _notifyDelegateOfPrivateInternalPropertiesChanges]; } // For unit testing only @@ -1776,8 +1800,6 @@ - (void)_handleReportEnd } }]; #endif - - [self _notifyDelegateOfPrivateInternalPropertiesChanges]; } - (BOOL)_interestedPaths:(NSArray * _Nullable)interestedPaths includesAttributePath:(MTRAttributePath *)attributePath @@ -2377,9 +2399,9 @@ - (void)_setupSubscriptionWithReason:(NSString *)reason mtr_weakify(self); dispatch_after(dispatch_time(DISPATCH_TIME_NOW, static_cast(kSecondsToWaitBeforeMarkingUnreachableAfterSettingUpSubscription) * static_cast(NSEC_PER_SEC)), self.queue, ^{ mtr_strongify(self); - if (self != nil) { - [self _markDeviceAsUnreachableIfNeverSubscribed]; - } + VerifyOrReturn(self); + + [self _markDeviceAsUnreachableIfNeverSubscribed]; }); } @@ -2395,8 +2417,10 @@ - (void)_setupSubscriptionWithReason:(NSString *)reason NSNumber * _Nullable retryDelay) { if (error != nil) { MTR_LOG_ERROR("%@ getSessionForNode error %@", self, error); - [self _handleSubscriptionError:error]; - [self _handleSubscriptionReset:retryDelay]; + [self->_deviceController asyncDispatchToMatterQueue:^{ + [self _handleSubscriptionError:error]; + [self _handleSubscriptionReset:retryDelay]; + } errorHandler:nil]; return; } @@ -2845,7 +2869,10 @@ static BOOL AttributeHasChangesOmittedQuality(MTRAttributePath * attributePath) } }]; }]; - [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"read %@ 0x%llx 0x%llx", endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue]; + [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"read %@ 0x%llx (%@) 0x%llx (%@)", + endpointID, + clusterID.unsignedLongLongValue, MTRClusterNameForID(static_cast(clusterID.unsignedLongLongValue)), + attributeID.unsignedLongLongValue, MTRAttributeNameForID(static_cast(clusterID.unsignedLongLongValue), static_cast(attributeID.unsignedLongLongValue))]; } else { [self _readThroughSkipped]; } @@ -2975,7 +3002,11 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID completion(MTRAsyncWorkComplete); }]; }]; - [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"write %@ 0x%llx 0x%llx: %@", endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue, value]; + [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"write %@ 0x%llx (%@) 0x%llx (%@): %@", + endpointID, + clusterID.unsignedLongLongValue, MTRClusterNameForID(static_cast(clusterID.unsignedLongLongValue)), + attributeID.unsignedLongLongValue, MTRAttributeNameForID(static_cast(clusterID.unsignedLongLongValue), static_cast(attributeID.unsignedLongLongValue)), + value]; } - (NSArray *> *)readAttributePaths:(NSArray *)attributePaths @@ -3122,7 +3153,11 @@ - (void)_invokeCommandWithEndpointID:(NSNumber *)endpointID workDone(values, error); }]; }]; - [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"invoke %@ 0x%llx 0x%llx: %@", endpointID, clusterID.unsignedLongLongValue, commandID.unsignedLongLongValue, commandFields]; + [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"invoke %@ 0x%llx (%@) 0x%llx (%@): %@", + endpointID, + clusterID.unsignedLongLongValue, MTRClusterNameForID(static_cast(clusterID.unsignedLongLongValue)), + commandID.unsignedLongLongValue, MTRRequestCommandNameForID(static_cast(clusterID.unsignedLongLongValue), static_cast(commandID.unsignedLongLongValue)), + commandFields]; } - (void)openCommissioningWindowWithSetupPasscode:(NSNumber *)setupPasscode @@ -3220,6 +3255,8 @@ - (void)_checkExpiredExpectedValues mtr_weakify(self); dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) (waitTime * NSEC_PER_SEC)), self.queue, ^{ mtr_strongify(self); + VerifyOrReturn(self); + [self _performScheduledExpirationCheck]; }); } @@ -3270,22 +3307,6 @@ - (void)_performScheduledExpirationCheck return nil; } -- (BOOL)_attributeDataValue:(NSDictionary *)one isEqualToDataValue:(NSDictionary *)theOther -{ - // Sanity check for nil cases - if (!one && !theOther) { - MTR_LOG_ERROR("%@ attribute data-value comparison does not expect comparing two nil dictionaries", self); - return YES; - } - if (!one || !theOther) { - // Comparing against nil is expected, and should return NO quietly - return NO; - } - - // Attribute data-value dictionaries are equal if type and value are equal, and specifically, this should return true if values are both nil - return [one[MTRTypeKey] isEqual:theOther[MTRTypeKey]] && ((one[MTRValueKey] == theOther[MTRValueKey]) || [one[MTRValueKey] isEqual:theOther[MTRValueKey]]); -} - // Utility to return data value dictionary without data version - (NSDictionary *)_dataValueWithoutDataVersion:(NSDictionary *)attributeValue { @@ -3501,9 +3522,9 @@ - (NSArray *)_getAttributesToReportWithReportedValues:(NSArray * attributeResponseValue in reportedAttributeValues) { MTRAttributePath * attributePath = attributeResponseValue[MTRAttributePathKey]; - NSDictionary * attributeDataValue = attributeResponseValue[MTRDataKey]; - NSError * attributeError = attributeResponseValue[MTRErrorKey]; - NSDictionary * previousValue; + MTRDeviceDataValueDictionary _Nullable attributeDataValue = attributeResponseValue[MTRDataKey]; + NSError * _Nullable attributeError = attributeResponseValue[MTRErrorKey]; + MTRDeviceDataValueDictionary _Nullable previousValue; // sanity check either data value or error must exist if (!attributeDataValue && !attributeError) { diff --git a/src/darwin/Framework/CHIP/MTRDevice_Internal.h b/src/darwin/Framework/CHIP/MTRDevice_Internal.h index 2cdcd66976..4414b3c613 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDevice_Internal.h @@ -22,14 +22,13 @@ #import "MTRAsyncWorkQueue.h" #import "MTRDefines_Internal.h" +#import "MTRDeviceDataValueDictionary.h" #import "MTRDeviceStorageBehaviorConfiguration_Internal.h" NS_ASSUME_NONNULL_BEGIN @class MTRAsyncWorkQueue; -typedef NSDictionary * MTRDeviceDataValueDictionary; - typedef void (^MTRDevicePerformAsyncBlock)(MTRBaseDevice * baseDevice); typedef NS_ENUM(NSUInteger, MTRInternalDeviceState) { @@ -52,20 +51,6 @@ typedef NS_ENUM(NSUInteger, MTRInternalDeviceState) { MTRInternalDeviceStateLaterSubscriptionEstablished = 4, }; -/** - * Information about a cluster: data version and known attribute values. - */ -MTR_TESTABLE -@interface MTRDeviceClusterData : NSObject -@property (nonatomic, nullable) NSNumber * dataVersion; -@property (nonatomic, readonly) NSDictionary * attributes; // attributeID => data-value dictionary - -- (void)storeValue:(MTRDeviceDataValueDictionary _Nullable)value forAttribute:(NSNumber *)attribute; -- (void)removeValueForAttribute:(NSNumber *)attribute; - -- (nullable instancetype)initWithDataVersion:(NSNumber * _Nullable)dataVersion attributes:(NSDictionary * _Nullable)attributes; -@end - // Consider moving utility classes to their own file #pragma mark - Utility Classes @@ -157,22 +142,6 @@ MTR_DIRECT_MEMBERS @property (nonatomic) dispatch_queue_t queue; @property (nonatomic, readonly) MTRAsyncWorkQueue * asyncWorkQueue; -// Method to insert persisted cluster data -// Contains data version information and attribute values. -- (void)setPersistedClusterData:(NSDictionary *)clusterData; - -// Method to insert persisted data that pertains to the whole device. -- (void)setPersistedDeviceData:(NSDictionary *)data; - -#ifdef DEBUG -- (NSUInteger)unitTestAttributeCount; -#endif - -- (void)setStorageBehaviorConfiguration:(MTRDeviceStorageBehaviorConfiguration *)storageBehaviorConfiguration; - -// Returns whether this MTRDevice uses Thread for communication -- (BOOL)deviceUsesThread; - #pragma mark - MTRDevice functionality to deal with delegates. // Returns YES if any non-null delegates were found @@ -196,6 +165,10 @@ MTR_DIRECT_MEMBERS - (void)controllerSuspended; - (void)controllerResumed; +// Methods for comparing attribute data values. +- (BOOL)_attributeDataValue:(MTRDeviceDataValueDictionary)one isEqualToDataValue:(MTRDeviceDataValueDictionary)theOther; +- (BOOL)_attributeDataValue:(MTRDeviceDataValueDictionary)observed satisfiesValueExpectation:(MTRDeviceDataValueDictionary)expected; + @end #pragma mark - MTRDevice internal state monitoring @@ -203,16 +176,18 @@ MTR_DIRECT_MEMBERS - (void)devicePrivateInternalStateChanged:(MTRDevice *)device internalState:(NSDictionary *)state; @end +// Returns whether a data-value dictionary is well-formed (in the sense that all +// the types of the objects inside are as expected, so it's actually a valid +// representation of some TLV). Implemented in MTRBaseDevice.mm because that's +// where the pieces needed to implement it are, but declared here so our tests +// can see it. +MTR_EXTERN MTR_TESTABLE BOOL MTRDataValueDictionaryIsWellFormed(MTRDeviceDataValueDictionary value); + #pragma mark - Constants static NSString * const kDefaultSubscriptionPoolSizeOverrideKey = @"subscriptionPoolSizeOverride"; static NSString * const kTestStorageUserDefaultEnabledKey = @"enableTestStorage"; -// ex-MTRDeviceClusterData constants -static NSString * const sDataVersionKey = @"dataVersion"; -static NSString * const sAttributesKey = @"attributes"; -static NSString * const sLastInitialSubscribeLatencyKey = @"lastInitialSubscribeLatency"; - // Declared inside platform, but noting here for reference // static NSString * const kSRPTimeoutInMsecsUserDefaultKey = @"SRPTimeoutInMSecsOverride"; diff --git a/src/darwin/Framework/CHIP/MTRDevice_XPC.mm b/src/darwin/Framework/CHIP/MTRDevice_XPC.mm index d7a4574f91..7782509fb7 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_XPC.mm +++ b/src/darwin/Framework/CHIP/MTRDevice_XPC.mm @@ -41,6 +41,7 @@ #import "MTRDeviceControllerStartupParams_Internal.h" #import "MTRDeviceController_Concrete.h" #import "MTRDeviceController_XPC.h" +#import "MTRDeviceDataValueDictionary.h" #import "MTRDevice_Concrete.h" #import "MTRDevice_Internal.h" #import "MTRDevice_XPC_Internal.h" @@ -49,7 +50,6 @@ #import "MTRLogging_Internal.h" #import "MTRMetricKeys.h" #import "MTRMetricsCollector.h" -#import "MTROperationalCredentialsDelegate.h" #import "MTRP256KeypairBridge.h" #import "MTRPersistentStorageDelegateBridge.h" #import "MTRServerEndpoint_Internal.h" @@ -251,7 +251,8 @@ - (void)_invokeCommandWithEndpointID:(NSNumber *)endpointID @try { [[xpcConnection remoteObjectProxyWithErrorHandler:^(NSError * _Nonnull error) { - MTR_LOG_ERROR("Error: %@", error); + MTR_LOG_ERROR("Invoke error: %@", error); + completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); }] deviceController:[[self deviceController] uniqueIdentifier] nodeID:[self nodeID] invokeCommandWithEndpointID:endpointID @@ -263,8 +264,42 @@ - (void)_invokeCommandWithEndpointID:(NSNumber *)endpointID timedInvokeTimeout:timeout serverSideProcessingTimeout:serverSideProcessingTimeout completion:completion]; + } @catch (NSException * exception) { + MTR_LOG_ERROR("Exception sending XPC message: %@", exception); + completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); + } +} + +- (void)downloadLogOfType:(MTRDiagnosticLogType)type + timeout:(NSTimeInterval)timeout + queue:(dispatch_queue_t)queue + completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion +{ + NSXPCConnection * xpcConnection = [(MTRDeviceController_XPC *) [self deviceController] xpcConnection]; + + @try { + [[xpcConnection remoteObjectProxyWithErrorHandler:^(NSError * _Nonnull error) { + MTR_LOG_ERROR("Error: %@", error); + dispatch_async(queue, ^{ + completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); + }); + }] deviceController:[[self deviceController] uniqueIdentifier] + nodeID:[self nodeID] + downloadLogOfType:type + timeout:timeout + completion:^(NSURL * _Nullable url, NSError * _Nullable error) { + dispatch_async(queue, ^{ + completion(url, error); + if (url) { + [[NSFileManager defaultManager] removeItemAtPath:url.path error:nil]; + } + }); + }]; } @catch (NSException * exception) { MTR_LOG_ERROR("Exception sending XPC messsage: %@", exception); + dispatch_async(queue, ^{ + completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); + }); } } diff --git a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h index 63499f024b..928c80ba85 100644 --- a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h +++ b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h @@ -20,7 +20,7 @@ #import #import -#import "MTRDeviceController.h" +#import "MTRDeviceController_Concrete.h" #import "MTRError_Internal.h" #import "MTRKeypair.h" #import "MTROperationalCertificateIssuer.h" @@ -38,7 +38,7 @@ class MTROperationalCredentialsDelegate : public chip::Controller::OperationalCr public: using ChipP256KeypairPtr = chip::Crypto::P256Keypair *; - MTROperationalCredentialsDelegate(MTRDeviceController * deviceController); + MTROperationalCredentialsDelegate(MTRDeviceController_Concrete * deviceController); ~MTROperationalCredentialsDelegate() {} CHIP_ERROR Init(ChipP256KeypairPtr nocSigner, NSData * ipk, NSData * rootCert, NSData * _Nullable icaCert); @@ -147,7 +147,7 @@ class MTROperationalCredentialsDelegate : public chip::Controller::OperationalCr NSData * _Nullable mRootCert; NSData * _Nullable mIntermediateCert; - MTRDeviceController * __weak mWeakController; + MTRDeviceController_Concrete * __weak mWeakController; chip::Controller::DeviceCommissioner * _Nullable mCppCommissioner = nullptr; id _Nullable mOperationalCertificateIssuer; dispatch_queue_t _Nullable mOperationalCertificateIssuerQueue; diff --git a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm index fa280c81e6..673e4df12b 100644 --- a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm +++ b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm @@ -42,7 +42,7 @@ using namespace Credentials; using namespace Crypto; -MTROperationalCredentialsDelegate::MTROperationalCredentialsDelegate(MTRDeviceController * deviceController) +MTROperationalCredentialsDelegate::MTROperationalCredentialsDelegate(MTRDeviceController_Concrete * deviceController) : mWeakController(deviceController) { } @@ -129,7 +129,7 @@ VerifyOrReturnError(mCppCommissioner != nullptr, CHIP_ERROR_INCORRECT_STATE); - MTRDeviceController * strongController = mWeakController; + MTRDeviceController_Concrete * strongController = mWeakController; VerifyOrReturnError(strongController != nil, CHIP_ERROR_INCORRECT_STATE); mOnNOCCompletionCallback = onCompletion; @@ -168,14 +168,14 @@ certificationDeclaration:AsData(certificationDeclarationSpan) firmwareInfo:firmwareInfo]; - MTRDeviceController * __weak weakController = mWeakController; + MTRDeviceController_Concrete * __weak weakController = mWeakController; dispatch_async(mOperationalCertificateIssuerQueue, ^{ [mOperationalCertificateIssuer issueOperationalCertificateForRequest:csrInfo attestationInfo:attestationInfo controller:strongController completion:^(MTROperationalCertificateChain * _Nullable chain, NSError * _Nullable error) { - MTRDeviceController * strongController = weakController; + MTRDeviceController_Concrete * strongController = weakController; if (strongController == nil || !strongController.isRunning) { // No longer safe to touch "this" return; diff --git a/src/darwin/Framework/CHIP/MTRSetupPayload.mm b/src/darwin/Framework/CHIP/MTRSetupPayload.mm index 98d9f2b342..c4694884ea 100644 --- a/src/darwin/Framework/CHIP/MTRSetupPayload.mm +++ b/src/darwin/Framework/CHIP/MTRSetupPayload.mm @@ -607,7 +607,7 @@ + (NSUInteger)generateRandomPIN return setupPIN; } - // We got pretty unlikely with our random number generation. Just try + // We got pretty unlucky with our random number generation. Just try // again. The chance that this loop does not terminate in a reasonable // amount of time is astronomically low, assuming arc4random_uniform is not // broken. diff --git a/src/darwin/Framework/CHIP/Matter.h b/src/darwin/Framework/CHIP/Matter.h index 109f4a20a9..9f57e4fb4e 100644 --- a/src/darwin/Framework/CHIP/Matter.h +++ b/src/darwin/Framework/CHIP/Matter.h @@ -48,6 +48,7 @@ #import #import #import +#import #import #import #import diff --git a/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h b/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h index b404056c96..9ecec60ae5 100644 --- a/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h +++ b/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h @@ -18,6 +18,10 @@ NS_ASSUME_NONNULL_BEGIN +MTR_EXTERN NSString * const MTRDeviceControllerRegistrationNodeIDsKey MTR_NEWLY_AVAILABLE; +MTR_EXTERN NSString * const MTRDeviceControllerRegistrationNodeIDKey MTR_NEWLY_AVAILABLE; +MTR_EXTERN NSString * const MTRDeviceControllerRegistrationControllerContextKey MTR_NEWLY_AVAILABLE; + MTR_NEWLY_AVAILABLE @protocol MTRXPCServerProtocol_MTRDevice @@ -37,11 +41,19 @@ MTR_NEWLY_AVAILABLE - (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID openCommissioningWindowWithSetupPasscode:(NSNumber *)setupPasscode discriminator:(NSNumber *)discriminator duration:(NSNumber *)duration completion:(MTRDeviceOpenCommissioningWindowHandler)completion; - (oneway void)downloadLogOfType:(MTRDiagnosticLogType)type nodeID:(NSNumber *)nodeID timeout:(NSTimeInterval)timeout completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion; + +@optional +/* Note: The consumer of the completion block should move the file that the url points to or open it for reading before the + * completion handler returns. Otherwise, the file will be deleted, and the data will be lost. + */ +- (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID downloadLogOfType:(MTRDiagnosticLogType)type timeout:(NSTimeInterval)timeout completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion; + @end MTR_NEWLY_AVAILABLE @protocol MTRXPCServerProtocol_MTRDeviceController +@optional - (oneway void)deviceController:(NSUUID *)controller getIsRunningWithReply:(void (^)(BOOL response))reply; - (oneway void)deviceController:(NSUUID *)controller getUniqueIdentifierWithReply:(void (^)(NSUUID *))reply; - (oneway void)deviceController:(NSUUID *)controller controllerNodeIDWithReply:(void (^)(NSNumber * nodeID))reply; @@ -66,7 +78,9 @@ MTR_NEWLY_AVAILABLE MTR_NEWLY_AVAILABLE @protocol MTRXPCServerProtocol +@optional - (oneway void)deviceController:(NSUUID *)controller checkInWithContext:(NSDictionary *)context; +- (oneway void)deviceController:(NSUUID *)controller updateControllerConfiguration:(NSDictionary *)controllerState; @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/templates/MTRClusterConstants.zapt b/src/darwin/Framework/CHIP/templates/MTRClusterConstants.zapt index c615754804..606732b12a 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusterConstants.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusterConstants.zapt @@ -225,3 +225,15 @@ MTREventIDTypeCluster{{>cluster}}Event{{>event}}ID {{availability (asUpperCamelC {{> eventIDs clusterName=label}} {{/zcl_clusters}} }; + +#pragma mark - Device Type IDs + +typedef NS_ENUM(uint32_t, MTRDeviceTypeIDType) { + {{#zcl_device_types}} + {{! Only include standard device types for now. The template syntax does not get hex numbers, apparently. + ZAP seems to have no is_number_less_than helper, so do is_number_greater_than with the arguments reversed. }} + {{#if (is_number_greater_than 65536 code)}} + MTRDeviceTypeIDType{{asUpperCamelCase caption preserveAcronyms=true}}ID {{availability "" deviceType=(asUpperCamelCase caption preserveAcronyms=true)}} = {{asHex code 8}}, + {{/if}} + {{/zcl_device_types}} +} MTR_NEWLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/templates/MTRClusterNames-src.zapt b/src/darwin/Framework/CHIP/templates/MTRClusterNames-src.zapt index 59281604dc..3ec7fe0b8a 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusterNames-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusterNames-src.zapt @@ -23,7 +23,7 @@ NSString * MTRClusterNameForID(MTRClusterIDType clusterID) {{/zcl_clusters}} default: - result = [NSString stringWithFormat:@"", clusterID]; + result = [NSString stringWithFormat:@"", clusterID]; break; } @@ -72,7 +72,7 @@ NSString * MTRAttributeNameForID(MTRClusterIDType clusterID, MTRAttributeIDType {{#if (isSupported (asUpperCamelCase label preserveAcronyms=true) isForIds=true)}} default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -80,7 +80,7 @@ NSString * MTRAttributeNameForID(MTRClusterIDType clusterID, MTRAttributeIDType {{/zcl_clusters}} default: - result = [NSString stringWithFormat:@"", clusterID]; + result = [NSString stringWithFormat:@"", clusterID]; break; } @@ -119,7 +119,7 @@ NSString * MTRAttributeNameForID(MTRClusterIDType clusterID, MTRAttributeIDType {{> commandIDs clusterName=label}} default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -127,7 +127,7 @@ NSString * MTRAttributeNameForID(MTRClusterIDType clusterID, MTRAttributeIDType {{/zcl_clusters}} default: - result = [NSString stringWithFormat:@"", clusterID]; + result = [NSString stringWithFormat:@"", clusterID]; break; } @@ -183,7 +183,7 @@ NSString * MTREventNameForID(MTRClusterIDType clusterID, MTREventIDType eventID) {{#if (isSupported (asUpperCamelCase label preserveAcronyms=true) isForIds=true)}} default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -191,7 +191,7 @@ NSString * MTREventNameForID(MTRClusterIDType clusterID, MTREventIDType eventID) {{/zcl_clusters}} default: - result = [NSString stringWithFormat:@"", clusterID]; + result = [NSString stringWithFormat:@"", clusterID]; break; } diff --git a/src/darwin/Framework/CHIP/templates/MTRDeviceTypeMetadata-src.zapt b/src/darwin/Framework/CHIP/templates/MTRDeviceTypeMetadata-src.zapt index c3e594930d..16322f398e 100644 --- a/src/darwin/Framework/CHIP/templates/MTRDeviceTypeMetadata-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRDeviceTypeMetadata-src.zapt @@ -5,25 +5,11 @@ using namespace chip; namespace { -enum class DeviceTypeClass { - Utility, - Simple, - Node, // Might not be a real class, but we have it for Root Node for now. - // If new classes get added, plase audit MTRIsKnownUtilityDeviceType below. -}; - -struct DeviceTypeData { - DeviceTypeId id; - DeviceTypeClass deviceClass; - const char * name; -}; -constexpr DeviceTypeData knownDeviceTypes[] = { +constexpr MTRDeviceTypeData knownDeviceTypes[] = { {{#zcl_device_types}} {{#if class}} - {{! For now work around the "Dynamic Utility" thing on Aggregator by just - taking the last word. }} - { {{asHex code 8}}, DeviceTypeClass::{{asLastWord class}}, "{{caption}}" }, + { {{asHex code 8}}, MTRDeviceTypeClass::{{class}}, "{{caption}}" }, {{/if}} {{/zcl_device_types}} }; @@ -36,12 +22,12 @@ static_assert(ExtractVendorFromMEI({{asHex code 8}}) != 0, "Must have class defi } // anonymous namespace -BOOL MTRIsKnownUtilityDeviceType(DeviceTypeId aDeviceTypeId) +const MTRDeviceTypeData * _Nullable MTRDeviceTypeDataForID(chip::DeviceTypeId aDeviceTypeId) { for (auto & deviceType : knownDeviceTypes) { if (deviceType.id == aDeviceTypeId) { - return deviceType.deviceClass != DeviceTypeClass::Simple; + return &deviceType; } } - return NO; + return nullptr; } diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 3f65e9facf..c8beeca677 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -9742,6 +9742,73 @@ - UpdateDirection - UpdateTime - UpdateStartHue + device types: + - AirQualitySensor + - AirPurifier + - Aggregator + - BasicVideoPlayer + - BridgedNode + - CastingVideoClient + - CastingVideoPlayer + - ColorDimmerSwitch + - ColorTemperatureLight + - ContactSensor + - ContentApp + - ControlBridge + - CookSurface + - Cooktop + - DeviceEnergyManagement + - DimmableLight + - DimmablePlugInUnit + - DimmerSwitch + - Dishwasher + - DoorLock + - DoorLockController + - ElectricalSensor + - EVSE + - ExtendedColorLight + - ExtractorHood + - Fan + - FlowSensor + - GenericSwitch + - HeatingCoolingUnit + - HumiditySensor + - LaundryDryer + - LaundryWasher + - LightSensor + - MicrowaveOven + - ModeSelect + - NetworkInfrastructureManager + - OccupancySensor + - OnOffLight + - OnOffLightSwitch + - OnOffPlugInUnit + - OnOffSensor + - OTAProvider + - OTARequestor + - Oven + - PressureSensor + - PowerSource + - Pump + - PumpController + - RainSensor + - Refrigerator + - RoboticVacuumCleaner + - RoomAirConditioner + - RootNode + - SecondaryNetworkInterface + - SmokeCOAlarm + - Speaker + - TemperatureControlledCabinet + - TemperatureSensor + - Thermostat + - ThreadBorderRouter + - VideoRemoteControl + - WaterFreezeDetector + - WaterLeakDetector + - WaterValve + - WindowCovering + - WindowCoveringController provisional: clusters: # Targeting 1.4 @@ -9753,6 +9820,12 @@ - WaterHeaterManagement - WaterHeaterMode - WiFiNetworkManagement + # Targeting Camera enablement + - CameraAVStreamManagement + - Chime + - WebRTCTransportProvider + - WebRTCTransportRequestor + - ZoneManagement attributes: AccessControl: # Targeting 1.4 @@ -9767,6 +9840,7 @@ - TCMinRequiredVersion - TCAcknowledgements - TCAcknowledgementsRequired + - TCUpdateDeadline OccupancySensing: # Targeting 1.4 - HoldTime @@ -9855,6 +9929,8 @@ - LandmarkTag - PositionTag - RelativePositionTag + # Targeting Camera enablement + - ThreeLevelAutoEnum enum values: ApplicationLauncher: StatusEnum: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index a2878cf511..43e0528c25 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -39,9 +39,6 @@ static BOOL AttributeIsSpecifiedInIdentifyCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -69,9 +66,6 @@ static BOOL AttributeIsSpecifiedInGroupsCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -111,9 +105,6 @@ static BOOL AttributeIsSpecifiedInOnOffCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -180,9 +171,6 @@ static BOOL AttributeIsSpecifiedInLevelControlCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -207,9 +195,6 @@ static BOOL AttributeIsSpecifiedInPulseWidthModulationCluster(AttributeId aAttri case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -249,9 +234,6 @@ static BOOL AttributeIsSpecifiedInDescriptorCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -279,9 +261,6 @@ static BOOL AttributeIsSpecifiedInBindingCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -327,9 +306,6 @@ static BOOL AttributeIsSpecifiedInAccessControlCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -363,9 +339,6 @@ static BOOL AttributeIsSpecifiedInActionsCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -459,9 +432,6 @@ static BOOL AttributeIsSpecifiedInBasicInformationCluster(AttributeId aAttribute case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -486,9 +456,6 @@ static BOOL AttributeIsSpecifiedInOTASoftwareUpdateProviderCluster(AttributeId a case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -525,9 +492,6 @@ static BOOL AttributeIsSpecifiedInOTASoftwareUpdateRequestorCluster(AttributeId case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -558,9 +522,6 @@ static BOOL AttributeIsSpecifiedInLocalizationConfigurationCluster(AttributeId a case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -594,9 +555,6 @@ static BOOL AttributeIsSpecifiedInTimeFormatLocalizationCluster(AttributeId aAtt case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -624,9 +582,6 @@ static BOOL AttributeIsSpecifiedInUnitLocalizationCluster(AttributeId aAttribute case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -654,9 +609,6 @@ static BOOL AttributeIsSpecifiedInPowerSourceConfigurationCluster(AttributeId aA case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -777,9 +729,6 @@ static BOOL AttributeIsSpecifiedInPowerSourceCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -825,13 +774,13 @@ static BOOL AttributeIsSpecifiedInGeneralCommissioningCluster(AttributeId aAttri case Attributes::TCAcknowledgementsRequired::Id: { return YES; } - case Attributes::GeneratedCommandList::Id: { + case Attributes::TCUpdateDeadline::Id: { return YES; } - case Attributes::AcceptedCommandList::Id: { + case Attributes::GeneratedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { + case Attributes::AcceptedCommandList::Id: { return YES; } case Attributes::AttributeList::Id: { @@ -891,9 +840,6 @@ static BOOL AttributeIsSpecifiedInNetworkCommissioningCluster(AttributeId aAttri case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -918,9 +864,6 @@ static BOOL AttributeIsSpecifiedInDiagnosticLogsCluster(AttributeId aAttributeId case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -972,9 +915,6 @@ static BOOL AttributeIsSpecifiedInGeneralDiagnosticsCluster(AttributeId aAttribu case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1011,9 +951,6 @@ static BOOL AttributeIsSpecifiedInSoftwareDiagnosticsCluster(AttributeId aAttrib case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1227,9 +1164,6 @@ static BOOL AttributeIsSpecifiedInThreadNetworkDiagnosticsCluster(AttributeId aA case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1293,9 +1227,6 @@ static BOOL AttributeIsSpecifiedInWiFiNetworkDiagnosticsCluster(AttributeId aAtt case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1347,9 +1278,6 @@ static BOOL AttributeIsSpecifiedInEthernetNetworkDiagnosticsCluster(AttributeId case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1413,9 +1341,6 @@ static BOOL AttributeIsSpecifiedInTimeSynchronizationCluster(AttributeId aAttrib case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1491,9 +1416,6 @@ static BOOL AttributeIsSpecifiedInBridgedDeviceBasicInformationCluster(Attribute case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1527,9 +1449,6 @@ static BOOL AttributeIsSpecifiedInSwitchCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1563,9 +1482,6 @@ static BOOL AttributeIsSpecifiedInAdministratorCommissioningCluster(AttributeId case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1608,9 +1524,6 @@ static BOOL AttributeIsSpecifiedInOperationalCredentialsCluster(AttributeId aAtt case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1647,9 +1560,6 @@ static BOOL AttributeIsSpecifiedInGroupKeyManagementCluster(AttributeId aAttribu case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1677,9 +1587,6 @@ static BOOL AttributeIsSpecifiedInFixedLabelCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1707,9 +1614,6 @@ static BOOL AttributeIsSpecifiedInUserLabelCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1737,9 +1641,6 @@ static BOOL AttributeIsSpecifiedInBooleanStateCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1794,9 +1695,6 @@ static BOOL AttributeIsSpecifiedInICDManagementCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1830,9 +1728,6 @@ static BOOL AttributeIsSpecifiedInTimerCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1875,9 +1770,6 @@ static BOOL AttributeIsSpecifiedInOvenCavityOperationalStateCluster(AttributeId case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1914,9 +1806,6 @@ static BOOL AttributeIsSpecifiedInOvenModeCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1947,9 +1836,6 @@ static BOOL AttributeIsSpecifiedInLaundryDryerControlsCluster(AttributeId aAttri case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -1992,9 +1878,6 @@ static BOOL AttributeIsSpecifiedInModeSelectCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2031,9 +1914,6 @@ static BOOL AttributeIsSpecifiedInLaundryWasherModeCluster(AttributeId aAttribut case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2070,9 +1950,6 @@ static BOOL AttributeIsSpecifiedInRefrigeratorAndTemperatureControlledCabinetMod case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2109,9 +1986,6 @@ static BOOL AttributeIsSpecifiedInLaundryWasherControlsCluster(AttributeId aAttr case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2142,9 +2016,6 @@ static BOOL AttributeIsSpecifiedInRVCRunModeCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2175,9 +2046,6 @@ static BOOL AttributeIsSpecifiedInRVCCleanModeCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2220,9 +2088,6 @@ static BOOL AttributeIsSpecifiedInTemperatureControlCluster(AttributeId aAttribu case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2256,9 +2121,6 @@ static BOOL AttributeIsSpecifiedInRefrigeratorAlarmCluster(AttributeId aAttribut case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2295,9 +2157,6 @@ static BOOL AttributeIsSpecifiedInDishwasherModeCluster(AttributeId aAttributeId case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2325,9 +2184,6 @@ static BOOL AttributeIsSpecifiedInAirQualityCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2391,9 +2247,6 @@ static BOOL AttributeIsSpecifiedInSmokeCOAlarmCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2430,9 +2283,6 @@ static BOOL AttributeIsSpecifiedInDishwasherAlarmCluster(AttributeId aAttributeI case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2463,9 +2313,6 @@ static BOOL AttributeIsSpecifiedInMicrowaveOvenModeCluster(AttributeId aAttribut case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2517,9 +2364,6 @@ static BOOL AttributeIsSpecifiedInMicrowaveOvenControlCluster(AttributeId aAttri case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2562,9 +2406,6 @@ static BOOL AttributeIsSpecifiedInOperationalStateCluster(AttributeId aAttribute case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2607,9 +2448,6 @@ static BOOL AttributeIsSpecifiedInRVCOperationalStateCluster(AttributeId aAttrib case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2643,9 +2481,6 @@ static BOOL AttributeIsSpecifiedInScenesManagementCluster(AttributeId aAttribute case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2688,9 +2523,6 @@ static BOOL AttributeIsSpecifiedInHEPAFilterMonitoringCluster(AttributeId aAttri case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2733,9 +2565,6 @@ static BOOL AttributeIsSpecifiedInActivatedCarbonFilterMonitoringCluster(Attribu case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2784,9 +2613,6 @@ static BOOL AttributeIsSpecifiedInBooleanStateConfigurationCluster(AttributeId a case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2844,9 +2670,6 @@ static BOOL AttributeIsSpecifiedInValveConfigurationAndControlCluster(AttributeI case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2928,9 +2751,6 @@ static BOOL AttributeIsSpecifiedInElectricalPowerMeasurementCluster(AttributeId case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -2973,9 +2793,6 @@ static BOOL AttributeIsSpecifiedInElectricalEnergyMeasurementCluster(AttributeId case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3018,9 +2835,6 @@ static BOOL AttributeIsSpecifiedInWaterHeaterManagementCluster(AttributeId aAttr case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3069,9 +2883,6 @@ static BOOL AttributeIsSpecifiedInDemandResponseLoadControlCluster(AttributeId a case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3102,9 +2913,6 @@ static BOOL AttributeIsSpecifiedInMessagesCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3153,9 +2961,6 @@ static BOOL AttributeIsSpecifiedInDeviceEnergyManagementCluster(AttributeId aAtt case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3249,9 +3054,6 @@ static BOOL AttributeIsSpecifiedInEnergyEVSECluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3291,9 +3093,6 @@ static BOOL AttributeIsSpecifiedInEnergyPreferenceCluster(AttributeId aAttribute case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3324,9 +3123,6 @@ static BOOL AttributeIsSpecifiedInPowerTopologyCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3351,21 +3147,12 @@ static BOOL AttributeIsSpecifiedInEnergyEVSEModeCluster(AttributeId aAttributeId case Attributes::CurrentMode::Id: { return YES; } - case Attributes::StartUpMode::Id: { - return YES; - } - case Attributes::OnMode::Id: { - return YES; - } case Attributes::GeneratedCommandList::Id: { return YES; } case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3390,21 +3177,12 @@ static BOOL AttributeIsSpecifiedInWaterHeaterModeCluster(AttributeId aAttributeI case Attributes::CurrentMode::Id: { return YES; } - case Attributes::StartUpMode::Id: { - return YES; - } - case Attributes::OnMode::Id: { - return YES; - } case Attributes::GeneratedCommandList::Id: { return YES; } case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3429,21 +3207,12 @@ static BOOL AttributeIsSpecifiedInDeviceEnergyManagementModeCluster(AttributeId case Attributes::CurrentMode::Id: { return YES; } - case Attributes::StartUpMode::Id: { - return YES; - } - case Attributes::OnMode::Id: { - return YES; - } case Attributes::GeneratedCommandList::Id: { return YES; } case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3603,9 +3372,6 @@ static BOOL AttributeIsSpecifiedInDoorLockCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3696,9 +3462,6 @@ static BOOL AttributeIsSpecifiedInWindowCoveringCluster(AttributeId aAttributeId case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3741,9 +3504,6 @@ static BOOL AttributeIsSpecifiedInServiceAreaCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -3837,9 +3597,6 @@ static BOOL AttributeIsSpecifiedInPumpConfigurationAndControlCluster(AttributeId case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4044,9 +3801,6 @@ static BOOL AttributeIsSpecifiedInThermostatCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4107,9 +3861,6 @@ static BOOL AttributeIsSpecifiedInFanControlCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4143,9 +3894,6 @@ static BOOL AttributeIsSpecifiedInThermostatUserInterfaceConfigurationCluster(At case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4326,9 +4074,6 @@ static BOOL AttributeIsSpecifiedInColorControlCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4395,9 +4140,6 @@ static BOOL AttributeIsSpecifiedInBallastConfigurationCluster(AttributeId aAttri case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4437,9 +4179,6 @@ static BOOL AttributeIsSpecifiedInIlluminanceMeasurementCluster(AttributeId aAtt case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4476,9 +4215,6 @@ static BOOL AttributeIsSpecifiedInTemperatureMeasurementCluster(AttributeId aAtt case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4530,9 +4266,6 @@ static BOOL AttributeIsSpecifiedInPressureMeasurementCluster(AttributeId aAttrib case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4569,9 +4302,6 @@ static BOOL AttributeIsSpecifiedInFlowMeasurementCluster(AttributeId aAttributeI case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4608,9 +4338,6 @@ static BOOL AttributeIsSpecifiedInRelativeHumidityMeasurementCluster(AttributeId case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4677,9 +4404,6 @@ static BOOL AttributeIsSpecifiedInOccupancySensingCluster(AttributeId aAttribute case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4737,9 +4461,6 @@ static BOOL AttributeIsSpecifiedInCarbonMonoxideConcentrationMeasurementCluster( case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4797,9 +4518,6 @@ static BOOL AttributeIsSpecifiedInCarbonDioxideConcentrationMeasurementCluster(A case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4857,9 +4575,6 @@ static BOOL AttributeIsSpecifiedInNitrogenDioxideConcentrationMeasurementCluster case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4917,9 +4632,6 @@ static BOOL AttributeIsSpecifiedInOzoneConcentrationMeasurementCluster(Attribute case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -4977,9 +4689,6 @@ static BOOL AttributeIsSpecifiedInPM25ConcentrationMeasurementCluster(AttributeI case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5037,9 +4746,6 @@ static BOOL AttributeIsSpecifiedInFormaldehydeConcentrationMeasurementCluster(At case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5097,9 +4803,6 @@ static BOOL AttributeIsSpecifiedInPM1ConcentrationMeasurementCluster(AttributeId case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5157,9 +4860,6 @@ static BOOL AttributeIsSpecifiedInPM10ConcentrationMeasurementCluster(AttributeI case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5217,9 +4917,6 @@ static BOOL AttributeIsSpecifiedInTotalVolatileOrganicCompoundsConcentrationMeas case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5277,9 +4974,6 @@ static BOOL AttributeIsSpecifiedInRadonConcentrationMeasurementCluster(Attribute case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5310,9 +5004,6 @@ static BOOL AttributeIsSpecifiedInWiFiNetworkManagementCluster(AttributeId aAttr case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5355,9 +5046,6 @@ static BOOL AttributeIsSpecifiedInThreadBorderRouterManagementCluster(AttributeI case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5391,9 +5079,6 @@ static BOOL AttributeIsSpecifiedInThreadNetworkDirectoryCluster(AttributeId aAtt case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5424,9 +5109,6 @@ static BOOL AttributeIsSpecifiedInWakeOnLANCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5460,9 +5142,6 @@ static BOOL AttributeIsSpecifiedInChannelCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5493,9 +5172,6 @@ static BOOL AttributeIsSpecifiedInTargetNavigatorCluster(AttributeId aAttributeI case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5553,9 +5229,6 @@ static BOOL AttributeIsSpecifiedInMediaPlaybackCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5586,9 +5259,6 @@ static BOOL AttributeIsSpecifiedInMediaInputCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5613,9 +5283,6 @@ static BOOL AttributeIsSpecifiedInLowPowerCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5640,9 +5307,6 @@ static BOOL AttributeIsSpecifiedInKeypadInputCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5673,9 +5337,6 @@ static BOOL AttributeIsSpecifiedInContentLauncherCluster(AttributeId aAttributeI case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5706,9 +5367,6 @@ static BOOL AttributeIsSpecifiedInAudioOutputCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5739,9 +5397,6 @@ static BOOL AttributeIsSpecifiedInApplicationLauncherCluster(AttributeId aAttrib case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5790,9 +5445,6 @@ static BOOL AttributeIsSpecifiedInApplicationBasicCluster(AttributeId aAttribute case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5817,9 +5469,6 @@ static BOOL AttributeIsSpecifiedInAccountLoginCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5868,9 +5517,6 @@ static BOOL AttributeIsSpecifiedInContentControlCluster(AttributeId aAttributeId case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5895,7 +5541,205 @@ static BOOL AttributeIsSpecifiedInContentAppObserverCluster(AttributeId aAttribu case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} +static BOOL AttributeIsSpecifiedInZoneManagementCluster(AttributeId aAttributeId) +{ + using namespace Clusters::ZoneManagement; + switch (aAttributeId) { + case Attributes::SupportedZoneSources::Id: { + return YES; + } + case Attributes::Zones::Id: { + return YES; + } + case Attributes::TimeControl::Id: { + return YES; + } + case Attributes::Sensitivity::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { + return YES; + } + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} +static BOOL AttributeIsSpecifiedInCameraAVStreamManagementCluster(AttributeId aAttributeId) +{ + using namespace Clusters::CameraAvStreamManagement; + switch (aAttributeId) { + case Attributes::MaxConcurrentVideoEncoders::Id: { + return YES; + } + case Attributes::MaxEncodedPixelRate::Id: { + return YES; + } + case Attributes::VideoSensorParams::Id: { + return YES; + } + case Attributes::NightVisionCapable::Id: { + return YES; + } + case Attributes::MinViewport::Id: { + return YES; + } + case Attributes::RateDistortionTradeOffPoints::Id: { + return YES; + } + case Attributes::MaxContentBufferSize::Id: { + return YES; + } + case Attributes::MicrophoneCapabilities::Id: { + return YES; + } + case Attributes::SpeakerCapabilities::Id: { + return YES; + } + case Attributes::TwoWayTalkSupport::Id: { + return YES; + } + case Attributes::SupportedSnapshotParams::Id: { + return YES; + } + case Attributes::MaxNetworkBandwidth::Id: { + return YES; + } + case Attributes::CurrentFrameRate::Id: { + return YES; + } + case Attributes::HDRModeEnabled::Id: { + return YES; + } + case Attributes::CurrentVideoCodecs::Id: { + return YES; + } + case Attributes::CurrentSnapshotConfig::Id: { + return YES; + } + case Attributes::FabricsUsingCamera::Id: { + return YES; + } + case Attributes::AllocatedVideoStreams::Id: { + return YES; + } + case Attributes::AllocatedAudioStreams::Id: { + return YES; + } + case Attributes::AllocatedSnapshotStreams::Id: { + return YES; + } + case Attributes::RankedVideoStreamPrioritiesList::Id: { + return YES; + } + case Attributes::SoftRecordingPrivacyModeEnabled::Id: { + return YES; + } + case Attributes::SoftLivestreamPrivacyModeEnabled::Id: { + return YES; + } + case Attributes::HardPrivacyModeOn::Id: { + return YES; + } + case Attributes::NightVision::Id: { + return YES; + } + case Attributes::NightVisionIllum::Id: { + return YES; + } + case Attributes::AWBEnabled::Id: { + return YES; + } + case Attributes::AutoShutterSpeedEnabled::Id: { + return YES; + } + case Attributes::AutoISOEnabled::Id: { + return YES; + } + case Attributes::Viewport::Id: { + return YES; + } + case Attributes::SpeakerMuted::Id: { + return YES; + } + case Attributes::SpeakerVolumeLevel::Id: { + return YES; + } + case Attributes::SpeakerMaxLevel::Id: { + return YES; + } + case Attributes::SpeakerMinLevel::Id: { + return YES; + } + case Attributes::MicrophoneMuted::Id: { + return YES; + } + case Attributes::MicrophoneVolumeLevel::Id: { + return YES; + } + case Attributes::MicrophoneMaxLevel::Id: { + return YES; + } + case Attributes::MicrophoneMinLevel::Id: { + return YES; + } + case Attributes::MicrophoneAGCEnabled::Id: { + return YES; + } + case Attributes::ImageRotation::Id: { + return YES; + } + case Attributes::ImageFlipHorizontal::Id: { + return YES; + } + case Attributes::ImageFlipVertical::Id: { + return YES; + } + case Attributes::LocalVideoRecordingEnabled::Id: { + return YES; + } + case Attributes::LocalSnapshotRecordingEnabled::Id: { + return YES; + } + case Attributes::StatusLightEnabled::Id: { + return YES; + } + case Attributes::StatusLightBrightness::Id: { + return YES; + } + case Attributes::DepthSensorStatus::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { return YES; } case Attributes::AttributeList::Id: { @@ -5925,7 +5769,31 @@ static BOOL AttributeIsSpecifiedInWebRTCTransportProviderCluster(AttributeId aAt case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} +static BOOL AttributeIsSpecifiedInWebRTCTransportRequestorCluster(AttributeId aAttributeId) +{ + using namespace Clusters::WebRTCTransportRequestor; + switch (aAttributeId) { + case Attributes::CurrentSessions::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { return YES; } case Attributes::AttributeList::Id: { @@ -5961,9 +5829,6 @@ static BOOL AttributeIsSpecifiedInChimeCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -5994,9 +5859,6 @@ static BOOL AttributeIsSpecifiedInEcosystemInformationCluster(AttributeId aAttri case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -6024,9 +5886,6 @@ static BOOL AttributeIsSpecifiedInCommissionerControlCluster(AttributeId aAttrib case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -6315,9 +6174,6 @@ static BOOL AttributeIsSpecifiedInUnitTestingCluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -6348,9 +6204,6 @@ static BOOL AttributeIsSpecifiedInSampleMEICluster(AttributeId aAttributeId) case Attributes::AcceptedCommandList::Id: { return YES; } - case Attributes::EventList::Id: { - return YES; - } case Attributes::AttributeList::Id: { return YES; } @@ -6711,9 +6564,18 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId) case Clusters::ContentAppObserver::Id: { return AttributeIsSpecifiedInContentAppObserverCluster(aAttributeId); } + case Clusters::ZoneManagement::Id: { + return AttributeIsSpecifiedInZoneManagementCluster(aAttributeId); + } + case Clusters::CameraAvStreamManagement::Id: { + return AttributeIsSpecifiedInCameraAVStreamManagementCluster(aAttributeId); + } case Clusters::WebRTCTransportProvider::Id: { return AttributeIsSpecifiedInWebRTCTransportProviderCluster(aAttributeId); } + case Clusters::WebRTCTransportRequestor::Id: { + return AttributeIsSpecifiedInWebRTCTransportRequestorCluster(aAttributeId); + } case Clusters::Chime::Id: { return AttributeIsSpecifiedInChimeCluster(aAttributeId); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index ae28957899..16f882fe47 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -88,32 +88,6 @@ static id _Nullable DecodeGlobalAttributeValue(AttributeId aAttributeId, TLV::TL } return value; } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -2282,6 +2256,17 @@ static id _Nullable DecodeAttributeValueForGeneralCommissioningCluster(Attribute value = [NSNumber numberWithBool:cppValue]; return value; } + case Attributes::TCUpdateDeadline::Id: { + using TypeInfo = Attributes::TCUpdateDeadline::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } default: { break; } @@ -9788,36 +9773,6 @@ static id _Nullable DecodeAttributeValueForEnergyEVSEModeCluster(AttributeId aAt value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } default: { break; } @@ -9896,36 +9851,6 @@ static id _Nullable DecodeAttributeValueForWaterHeaterModeCluster(AttributeId aA value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } default: { break; } @@ -10004,36 +9929,6 @@ static id _Nullable DecodeAttributeValueForDeviceEnergyManagementModeCluster(Att value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } default: { break; } @@ -16899,12 +16794,12 @@ static id _Nullable DecodeAttributeValueForContentAppObserverCluster(AttributeId *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForWebRTCTransportProviderCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +static id _Nullable DecodeAttributeValueForZoneManagementCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::WebRTCTransportProvider; + using namespace Clusters::ZoneManagement; switch (aAttributeId) { - case Attributes::CurrentSessions::Id: { - using TypeInfo = Attributes::CurrentSessions::TypeInfo; + case Attributes::SupportedZoneSources::Id: { + using TypeInfo = Attributes::SupportedZoneSources::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16916,23 +16811,8 @@ static id _Nullable DecodeAttributeValueForWebRTCTransportProviderCluster(Attrib auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRWebRTCTransportProviderClusterWebRTCSessionStruct * newElement_0; - newElement_0 = [MTRWebRTCTransportProviderClusterWebRTCSessionStruct new]; - newElement_0.id = [NSNumber numberWithUnsignedShort:entry_0.id]; - newElement_0.peerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.peerNodeID]; - newElement_0.peerFabricIndex = [NSNumber numberWithUnsignedChar:entry_0.peerFabricIndex]; - newElement_0.streamType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.streamType)]; - if (entry_0.videoStreamID.IsNull()) { - newElement_0.videoStreamID = nil; - } else { - newElement_0.videoStreamID = [NSNumber numberWithUnsignedShort:entry_0.videoStreamID.Value()]; - } - if (entry_0.audioStreamID.IsNull()) { - newElement_0.audioStreamID = nil; - } else { - newElement_0.audioStreamID = [NSNumber numberWithUnsignedShort:entry_0.audioStreamID.Value()]; - } - newElement_0.metadataOptions = [NSNumber numberWithUnsignedChar:entry_0.metadataOptions.Raw()]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -16944,20 +16824,8 @@ static id _Nullable DecodeAttributeValueForWebRTCTransportProviderCluster(Attrib } return value; } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForChimeCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::Chime; - switch (aAttributeId) { - case Attributes::InstalledChimeSounds::Id: { - using TypeInfo = Attributes::InstalledChimeSounds::TypeInfo; + case Attributes::Zones::Id: { + using TypeInfo = Attributes::Zones::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16969,15 +16837,11 @@ static id _Nullable DecodeAttributeValueForChimeCluster(AttributeId aAttributeId auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRChimeClusterChimeSoundStruct * newElement_0; - newElement_0 = [MTRChimeClusterChimeSoundStruct new]; - newElement_0.chimeID = [NSNumber numberWithUnsignedChar:entry_0.chimeID]; - newElement_0.name = AsString(entry_0.name); - if (newElement_0.name == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } + MTRZoneManagementClusterZoneInformationStruct * newElement_0; + newElement_0 = [MTRZoneManagementClusterZoneInformationStruct new]; + newElement_0.zoneID = [NSNumber numberWithUnsignedShort:entry_0.zoneID]; + newElement_0.zoneType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.zoneType)]; + newElement_0.zoneSource = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.zoneSource)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -16989,26 +16853,45 @@ static id _Nullable DecodeAttributeValueForChimeCluster(AttributeId aAttributeId } return value; } - case Attributes::ActiveChimeID::Id: { - using TypeInfo = Attributes::ActiveChimeID::TypeInfo; + case Attributes::TimeControl::Id: { + using TypeInfo = Attributes::TimeControl::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRZoneManagementClusterZoneTriggeringTimeControlStruct * newElement_0; + newElement_0 = [MTRZoneManagementClusterZoneTriggeringTimeControlStruct new]; + newElement_0.initialDuration = [NSNumber numberWithUnsignedShort:entry_0.initialDuration]; + newElement_0.augmentationDuration = [NSNumber numberWithUnsignedShort:entry_0.augmentationDuration]; + newElement_0.maxDuration = [NSNumber numberWithUnsignedInt:entry_0.maxDuration]; + newElement_0.blindDuration = [NSNumber numberWithUnsignedShort:entry_0.blindDuration]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::Enabled::Id: { - using TypeInfo = Attributes::Enabled::TypeInfo; + case Attributes::Sensitivity::Id: { + using TypeInfo = Attributes::Sensitivity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } default: { @@ -17019,12 +16902,74 @@ static id _Nullable DecodeAttributeValueForChimeCluster(AttributeId aAttributeId *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForEcosystemInformationCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +static id _Nullable DecodeAttributeValueForCameraAVStreamManagementCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::EcosystemInformation; + using namespace Clusters::CameraAvStreamManagement; switch (aAttributeId) { - case Attributes::DeviceDirectory::Id: { - using TypeInfo = Attributes::DeviceDirectory::TypeInfo; + case Attributes::MaxConcurrentVideoEncoders::Id: { + using TypeInfo = Attributes::MaxConcurrentVideoEncoders::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::MaxEncodedPixelRate::Id: { + using TypeInfo = Attributes::MaxEncodedPixelRate::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::VideoSensorParams::Id: { + using TypeInfo = Attributes::VideoSensorParams::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + MTRCameraAVStreamManagementClusterVideoSensorParamsStruct * _Nonnull value; + value = [MTRCameraAVStreamManagementClusterVideoSensorParamsStruct new]; + value.sensorWidth = [NSNumber numberWithUnsignedShort:cppValue.sensorWidth]; + value.sensorHeight = [NSNumber numberWithUnsignedShort:cppValue.sensorHeight]; + value.hdrCapable = [NSNumber numberWithBool:cppValue.HDRCapable]; + value.maxFPS = [NSNumber numberWithUnsignedShort:cppValue.maxFPS]; + value.maxHDRFPS = [NSNumber numberWithUnsignedShort:cppValue.maxHDRFPS]; + return value; + } + case Attributes::NightVisionCapable::Id: { + using TypeInfo = Attributes::NightVisionCapable::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::MinViewport::Id: { + using TypeInfo = Attributes::MinViewport::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nonnull value; + value = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + value.width = [NSNumber numberWithUnsignedShort:cppValue.width]; + value.height = [NSNumber numberWithUnsignedShort:cppValue.height]; + return value; + } + case Attributes::RateDistortionTradeOffPoints::Id: { + using TypeInfo = Attributes::RateDistortionTradeOffPoints::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17036,25 +16981,955 @@ static id _Nullable DecodeAttributeValueForEcosystemInformationCluster(Attribute auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTREcosystemInformationClusterEcosystemDeviceStruct * newElement_0; - newElement_0 = [MTREcosystemInformationClusterEcosystemDeviceStruct new]; - if (entry_0.deviceName.HasValue()) { - newElement_0.deviceName = AsString(entry_0.deviceName.Value()); - if (newElement_0.deviceName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - } else { - newElement_0.deviceName = nil; - } - if (entry_0.deviceNameLastEdit.HasValue()) { - newElement_0.deviceNameLastEdit = [NSNumber numberWithUnsignedLongLong:entry_0.deviceNameLastEdit.Value()]; - } else { - newElement_0.deviceNameLastEdit = nil; - } - newElement_0.bridgedEndpoint = [NSNumber numberWithUnsignedShort:entry_0.bridgedEndpoint]; - newElement_0.originalEndpoint = [NSNumber numberWithUnsignedShort:entry_0.originalEndpoint]; + MTRCameraAVStreamManagementClusterRateDistortionTradeOffPointsStruct * newElement_0; + newElement_0 = [MTRCameraAVStreamManagementClusterRateDistortionTradeOffPointsStruct new]; + newElement_0.codec = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.codec)]; + newElement_0.resolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + newElement_0.resolution.width = [NSNumber numberWithUnsignedShort:entry_0.resolution.width]; + newElement_0.resolution.height = [NSNumber numberWithUnsignedShort:entry_0.resolution.height]; + newElement_0.minBitRate = [NSNumber numberWithUnsignedInt:entry_0.minBitRate]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::MaxContentBufferSize::Id: { + using TypeInfo = Attributes::MaxContentBufferSize::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::MicrophoneCapabilities::Id: { + using TypeInfo = Attributes::MicrophoneCapabilities::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct * _Nonnull value; + value = [MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct new]; + value.maxNumberOfChannels = [NSNumber numberWithUnsignedChar:cppValue.maxNumberOfChannels]; + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = cppValue.supportedCodecs.begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + NSNumber * newElement_1; + newElement_1 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1)]; + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value.supportedCodecs = array_1; + } + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = cppValue.supportedSampleRates.begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + NSNumber * newElement_1; + newElement_1 = [NSNumber numberWithUnsignedInt:entry_1]; + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value.supportedSampleRates = array_1; + } + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = cppValue.supportedBitDepths.begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + NSNumber * newElement_1; + newElement_1 = [NSNumber numberWithUnsignedChar:entry_1]; + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value.supportedBitDepths = array_1; + } + return value; + } + case Attributes::SpeakerCapabilities::Id: { + using TypeInfo = Attributes::SpeakerCapabilities::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct * _Nonnull value; + value = [MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct new]; + value.maxNumberOfChannels = [NSNumber numberWithUnsignedChar:cppValue.maxNumberOfChannels]; + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = cppValue.supportedCodecs.begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + NSNumber * newElement_1; + newElement_1 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1)]; + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value.supportedCodecs = array_1; + } + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = cppValue.supportedSampleRates.begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + NSNumber * newElement_1; + newElement_1 = [NSNumber numberWithUnsignedInt:entry_1]; + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value.supportedSampleRates = array_1; + } + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = cppValue.supportedBitDepths.begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + NSNumber * newElement_1; + newElement_1 = [NSNumber numberWithUnsignedChar:entry_1]; + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value.supportedBitDepths = array_1; + } + return value; + } + case Attributes::TwoWayTalkSupport::Id: { + using TypeInfo = Attributes::TwoWayTalkSupport::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::SupportedSnapshotParams::Id: { + using TypeInfo = Attributes::SupportedSnapshotParams::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRCameraAVStreamManagementClusterSnapshotParamsStruct * newElement_0; + newElement_0 = [MTRCameraAVStreamManagementClusterSnapshotParamsStruct new]; + newElement_0.resolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + newElement_0.resolution.width = [NSNumber numberWithUnsignedShort:entry_0.resolution.width]; + newElement_0.resolution.height = [NSNumber numberWithUnsignedShort:entry_0.resolution.height]; + newElement_0.maxFrameRate = [NSNumber numberWithUnsignedShort:entry_0.maxFrameRate]; + newElement_0.imageCodec = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.imageCodec)]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::MaxNetworkBandwidth::Id: { + using TypeInfo = Attributes::MaxNetworkBandwidth::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::CurrentFrameRate::Id: { + using TypeInfo = Attributes::CurrentFrameRate::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::HDRModeEnabled::Id: { + using TypeInfo = Attributes::HDRModeEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::CurrentVideoCodecs::Id: { + using TypeInfo = Attributes::CurrentVideoCodecs::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::CurrentSnapshotConfig::Id: { + using TypeInfo = Attributes::CurrentSnapshotConfig::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + MTRCameraAVStreamManagementClusterSnapshotParamsStruct * _Nonnull value; + value = [MTRCameraAVStreamManagementClusterSnapshotParamsStruct new]; + value.resolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + value.resolution.width = [NSNumber numberWithUnsignedShort:cppValue.resolution.width]; + value.resolution.height = [NSNumber numberWithUnsignedShort:cppValue.resolution.height]; + value.maxFrameRate = [NSNumber numberWithUnsignedShort:cppValue.maxFrameRate]; + value.imageCodec = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.imageCodec)]; + return value; + } + case Attributes::FabricsUsingCamera::Id: { + using TypeInfo = Attributes::FabricsUsingCamera::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AllocatedVideoStreams::Id: { + using TypeInfo = Attributes::AllocatedVideoStreams::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRCameraAVStreamManagementClusterVideoStreamStruct * newElement_0; + newElement_0 = [MTRCameraAVStreamManagementClusterVideoStreamStruct new]; + newElement_0.videoStreamID = [NSNumber numberWithUnsignedShort:entry_0.videoStreamID]; + newElement_0.streamType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.streamType)]; + newElement_0.videoCodec = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.videoCodec)]; + newElement_0.minFrameRate = [NSNumber numberWithUnsignedShort:entry_0.minFrameRate]; + newElement_0.maxFrameRate = [NSNumber numberWithUnsignedShort:entry_0.maxFrameRate]; + newElement_0.minResolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + newElement_0.minResolution.width = [NSNumber numberWithUnsignedShort:entry_0.minResolution.width]; + newElement_0.minResolution.height = [NSNumber numberWithUnsignedShort:entry_0.minResolution.height]; + newElement_0.maxResolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + newElement_0.maxResolution.width = [NSNumber numberWithUnsignedShort:entry_0.maxResolution.width]; + newElement_0.maxResolution.height = [NSNumber numberWithUnsignedShort:entry_0.maxResolution.height]; + newElement_0.minBitRate = [NSNumber numberWithUnsignedInt:entry_0.minBitRate]; + newElement_0.maxBitRate = [NSNumber numberWithUnsignedInt:entry_0.maxBitRate]; + newElement_0.minFragmentLen = [NSNumber numberWithUnsignedShort:entry_0.minFragmentLen]; + newElement_0.maxFragmentLen = [NSNumber numberWithUnsignedShort:entry_0.maxFragmentLen]; + if (entry_0.watermarkEnabled.HasValue()) { + newElement_0.watermarkEnabled = [NSNumber numberWithBool:entry_0.watermarkEnabled.Value()]; + } else { + newElement_0.watermarkEnabled = nil; + } + if (entry_0.OSDEnabled.HasValue()) { + newElement_0.osdEnabled = [NSNumber numberWithBool:entry_0.OSDEnabled.Value()]; + } else { + newElement_0.osdEnabled = nil; + } + newElement_0.referenceCount = [NSNumber numberWithUnsignedChar:entry_0.referenceCount]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AllocatedAudioStreams::Id: { + using TypeInfo = Attributes::AllocatedAudioStreams::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRCameraAVStreamManagementClusterAudioStreamStruct * newElement_0; + newElement_0 = [MTRCameraAVStreamManagementClusterAudioStreamStruct new]; + newElement_0.audioStreamID = [NSNumber numberWithUnsignedShort:entry_0.audioStreamID]; + newElement_0.streamType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.streamType)]; + newElement_0.audioCodec = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.audioCodec)]; + newElement_0.channelCount = [NSNumber numberWithUnsignedChar:entry_0.channelCount]; + newElement_0.sampleRate = [NSNumber numberWithUnsignedInt:entry_0.sampleRate]; + newElement_0.bitRate = [NSNumber numberWithUnsignedInt:entry_0.bitRate]; + newElement_0.bitDepth = [NSNumber numberWithUnsignedChar:entry_0.bitDepth]; + newElement_0.referenceCount = [NSNumber numberWithUnsignedChar:entry_0.referenceCount]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AllocatedSnapshotStreams::Id: { + using TypeInfo = Attributes::AllocatedSnapshotStreams::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRCameraAVStreamManagementClusterSnapshotStreamStruct * newElement_0; + newElement_0 = [MTRCameraAVStreamManagementClusterSnapshotStreamStruct new]; + newElement_0.snapshotStreamID = [NSNumber numberWithUnsignedShort:entry_0.snapshotStreamID]; + newElement_0.imageCodec = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.imageCodec)]; + newElement_0.frameRate = [NSNumber numberWithUnsignedShort:entry_0.frameRate]; + newElement_0.bitRate = [NSNumber numberWithUnsignedInt:entry_0.bitRate]; + newElement_0.minResolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + newElement_0.minResolution.width = [NSNumber numberWithUnsignedShort:entry_0.minResolution.width]; + newElement_0.minResolution.height = [NSNumber numberWithUnsignedShort:entry_0.minResolution.height]; + newElement_0.maxResolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + newElement_0.maxResolution.width = [NSNumber numberWithUnsignedShort:entry_0.maxResolution.width]; + newElement_0.maxResolution.height = [NSNumber numberWithUnsignedShort:entry_0.maxResolution.height]; + newElement_0.quality = [NSNumber numberWithUnsignedChar:entry_0.quality]; + newElement_0.referenceCount = [NSNumber numberWithUnsignedChar:entry_0.referenceCount]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::RankedVideoStreamPrioritiesList::Id: { + using TypeInfo = Attributes::RankedVideoStreamPrioritiesList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::SoftRecordingPrivacyModeEnabled::Id: { + using TypeInfo = Attributes::SoftRecordingPrivacyModeEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::SoftLivestreamPrivacyModeEnabled::Id: { + using TypeInfo = Attributes::SoftLivestreamPrivacyModeEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::HardPrivacyModeOn::Id: { + using TypeInfo = Attributes::HardPrivacyModeOn::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::NightVision::Id: { + using TypeInfo = Attributes::NightVision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::NightVisionIllum::Id: { + using TypeInfo = Attributes::NightVisionIllum::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::AWBEnabled::Id: { + using TypeInfo = Attributes::AWBEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::AutoShutterSpeedEnabled::Id: { + using TypeInfo = Attributes::AutoShutterSpeedEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::AutoISOEnabled::Id: { + using TypeInfo = Attributes::AutoISOEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::Viewport::Id: { + using TypeInfo = Attributes::Viewport::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + MTRCameraAVStreamManagementClusterViewportStruct * _Nonnull value; + value = [MTRCameraAVStreamManagementClusterViewportStruct new]; + value.x1 = [NSNumber numberWithUnsignedShort:cppValue.x1]; + value.y1 = [NSNumber numberWithUnsignedShort:cppValue.y1]; + value.x2 = [NSNumber numberWithUnsignedShort:cppValue.x2]; + value.y2 = [NSNumber numberWithUnsignedShort:cppValue.y2]; + return value; + } + case Attributes::SpeakerMuted::Id: { + using TypeInfo = Attributes::SpeakerMuted::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::SpeakerVolumeLevel::Id: { + using TypeInfo = Attributes::SpeakerVolumeLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::SpeakerMaxLevel::Id: { + using TypeInfo = Attributes::SpeakerMaxLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::SpeakerMinLevel::Id: { + using TypeInfo = Attributes::SpeakerMinLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::MicrophoneMuted::Id: { + using TypeInfo = Attributes::MicrophoneMuted::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::MicrophoneVolumeLevel::Id: { + using TypeInfo = Attributes::MicrophoneVolumeLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::MicrophoneMaxLevel::Id: { + using TypeInfo = Attributes::MicrophoneMaxLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::MicrophoneMinLevel::Id: { + using TypeInfo = Attributes::MicrophoneMinLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::MicrophoneAGCEnabled::Id: { + using TypeInfo = Attributes::MicrophoneAGCEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::ImageRotation::Id: { + using TypeInfo = Attributes::ImageRotation::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::ImageFlipHorizontal::Id: { + using TypeInfo = Attributes::ImageFlipHorizontal::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::ImageFlipVertical::Id: { + using TypeInfo = Attributes::ImageFlipVertical::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::LocalVideoRecordingEnabled::Id: { + using TypeInfo = Attributes::LocalVideoRecordingEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::LocalSnapshotRecordingEnabled::Id: { + using TypeInfo = Attributes::LocalSnapshotRecordingEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::StatusLightEnabled::Id: { + using TypeInfo = Attributes::StatusLightEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::StatusLightBrightness::Id: { + using TypeInfo = Attributes::StatusLightBrightness::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::DepthSensorStatus::Id: { + using TypeInfo = Attributes::DepthSensorStatus::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForWebRTCTransportProviderCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::WebRTCTransportProvider; + switch (aAttributeId) { + case Attributes::CurrentSessions::Id: { + using TypeInfo = Attributes::CurrentSessions::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRWebRTCTransportProviderClusterWebRTCSessionStruct * newElement_0; + newElement_0 = [MTRWebRTCTransportProviderClusterWebRTCSessionStruct new]; + newElement_0.id = [NSNumber numberWithUnsignedShort:entry_0.id]; + newElement_0.peerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.peerNodeID]; + newElement_0.peerFabricIndex = [NSNumber numberWithUnsignedChar:entry_0.peerFabricIndex]; + newElement_0.streamType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.streamType)]; + if (entry_0.videoStreamID.IsNull()) { + newElement_0.videoStreamID = nil; + } else { + newElement_0.videoStreamID = [NSNumber numberWithUnsignedShort:entry_0.videoStreamID.Value()]; + } + if (entry_0.audioStreamID.IsNull()) { + newElement_0.audioStreamID = nil; + } else { + newElement_0.audioStreamID = [NSNumber numberWithUnsignedShort:entry_0.audioStreamID.Value()]; + } + newElement_0.metadataOptions = [NSNumber numberWithUnsignedChar:entry_0.metadataOptions.Raw()]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForWebRTCTransportRequestorCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::WebRTCTransportRequestor; + switch (aAttributeId) { + case Attributes::CurrentSessions::Id: { + using TypeInfo = Attributes::CurrentSessions::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRWebRTCTransportRequestorClusterWebRTCSessionStruct * newElement_0; + newElement_0 = [MTRWebRTCTransportRequestorClusterWebRTCSessionStruct new]; + newElement_0.id = [NSNumber numberWithUnsignedShort:entry_0.id]; + newElement_0.peerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.peerNodeID]; + newElement_0.peerFabricIndex = [NSNumber numberWithUnsignedChar:entry_0.peerFabricIndex]; + newElement_0.streamType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.streamType)]; + if (entry_0.videoStreamID.IsNull()) { + newElement_0.videoStreamID = nil; + } else { + newElement_0.videoStreamID = [NSNumber numberWithUnsignedShort:entry_0.videoStreamID.Value()]; + } + if (entry_0.audioStreamID.IsNull()) { + newElement_0.audioStreamID = nil; + } else { + newElement_0.audioStreamID = [NSNumber numberWithUnsignedShort:entry_0.audioStreamID.Value()]; + } + newElement_0.metadataOptions = [NSNumber numberWithUnsignedChar:entry_0.metadataOptions.Raw()]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForChimeCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::Chime; + switch (aAttributeId) { + case Attributes::InstalledChimeSounds::Id: { + using TypeInfo = Attributes::InstalledChimeSounds::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRChimeClusterChimeSoundStruct * newElement_0; + newElement_0 = [MTRChimeClusterChimeSoundStruct new]; + newElement_0.chimeID = [NSNumber numberWithUnsignedChar:entry_0.chimeID]; + newElement_0.name = AsString(entry_0.name); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::ActiveChimeID::Id: { + using TypeInfo = Attributes::ActiveChimeID::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::Enabled::Id: { + using TypeInfo = Attributes::Enabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForEcosystemInformationCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::EcosystemInformation; + switch (aAttributeId) { + case Attributes::DeviceDirectory::Id: { + using TypeInfo = Attributes::DeviceDirectory::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTREcosystemInformationClusterEcosystemDeviceStruct * newElement_0; + newElement_0 = [MTREcosystemInformationClusterEcosystemDeviceStruct new]; + if (entry_0.deviceName.HasValue()) { + newElement_0.deviceName = AsString(entry_0.deviceName.Value()); + if (newElement_0.deviceName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + newElement_0.deviceName = nil; + } + if (entry_0.deviceNameLastEdit.HasValue()) { + newElement_0.deviceNameLastEdit = [NSNumber numberWithUnsignedLongLong:entry_0.deviceNameLastEdit.Value()]; + } else { + newElement_0.deviceNameLastEdit = nil; + } + newElement_0.bridgedEndpoint = [NSNumber numberWithUnsignedShort:entry_0.bridgedEndpoint]; + newElement_0.originalEndpoint = [NSNumber numberWithUnsignedShort:entry_0.originalEndpoint]; { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; auto iter_2 = entry_0.deviceTypes.begin(); @@ -19128,9 +20003,18 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T case Clusters::ContentAppObserver::Id: { return DecodeAttributeValueForContentAppObserverCluster(aPath.mAttributeId, aReader, aError); } + case Clusters::ZoneManagement::Id: { + return DecodeAttributeValueForZoneManagementCluster(aPath.mAttributeId, aReader, aError); + } + case Clusters::CameraAvStreamManagement::Id: { + return DecodeAttributeValueForCameraAVStreamManagementCluster(aPath.mAttributeId, aReader, aError); + } case Clusters::WebRTCTransportProvider::Id: { return DecodeAttributeValueForWebRTCTransportProviderCluster(aPath.mAttributeId, aReader, aError); } + case Clusters::WebRTCTransportRequestor::Id: { + return DecodeAttributeValueForWebRTCTransportRequestorCluster(aPath.mAttributeId, aReader, aError); + } case Clusters::Chime::Id: { return DecodeAttributeValueForChimeCluster(aPath.mAttributeId, aReader, aError); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 36c879b528..9c1755c541 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -69,12 +69,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -175,12 +169,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -317,12 +305,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -532,12 +514,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -593,12 +569,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -684,12 +654,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -753,12 +717,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -870,12 +828,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -1022,12 +974,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -1229,12 +1175,6 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -1309,12 +1249,6 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -1403,12 +1337,6 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -1481,12 +1409,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -1567,12 +1489,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -1639,12 +1555,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -1706,12 +1616,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -1959,12 +1863,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -2091,6 +1989,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeTCAcknowledgementsRequiredWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeTCUpdateDeadlineWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeTCUpdateDeadlineWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeTCUpdateDeadlineWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -2103,12 +2007,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -2277,12 +2175,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -2345,12 +2237,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -2481,12 +2367,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -2575,12 +2455,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -3023,12 +2897,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -3171,12 +3039,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -3295,12 +3157,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -3465,12 +3321,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -3640,12 +3490,6 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -3721,12 +3565,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -3821,12 +3659,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -3967,12 +3799,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -4081,12 +3907,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -4149,12 +3969,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -4218,12 +4032,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -4285,12 +4093,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -4425,12 +4227,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -4531,12 +4327,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -4661,12 +4451,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -4758,12 +4542,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -4834,12 +4612,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -4942,12 +4714,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -5039,12 +4805,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -5136,12 +4896,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -5225,12 +4979,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -5306,12 +5054,6 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -5387,12 +5129,6 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -5493,12 +5229,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -5572,12 +5302,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -5669,12 +5393,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -5736,12 +5454,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -5886,12 +5598,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -5984,12 +5690,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -6057,12 +5757,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -6187,12 +5881,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -6317,12 +6005,6 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -6439,12 +6121,6 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -6567,12 +6243,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -6675,12 +6345,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -6783,12 +6447,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -6907,12 +6565,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -7055,12 +6707,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -7230,12 +6876,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -7327,12 +6967,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -7439,12 +7073,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -7585,12 +7213,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -7671,12 +7293,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -7769,7 +7385,7 @@ MTR_PROVISIONALLY_AVAILABLE /** * Command CancelRequest * - * Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command + * Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command. */ - (void)cancelRequestWithParams:(MTRDeviceEnergyManagementClusterCancelRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)cancelRequestWithCompletion:(MTRStatusCompletion)completion @@ -7835,12 +7451,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -7895,13 +7505,13 @@ MTR_PROVISIONALLY_AVAILABLE /** * Command EnableCharging * - * This command allows a client to enable the EVSE to charge an EV, + * This command allows a client to enable the EVSE to charge an EV, and to provide or update the maximum and minimum charge current. */ - (void)enableChargingWithParams:(MTREnergyEVSEClusterEnableChargingParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; /** * Command EnableDischarging * - * Upon receipt, this SHALL allow a client to enable the discharge of an EV, + * Upon receipt, this SHALL allow a client to enable the discharge of an EV, and to provide or update the maximum discharge current. */ - (void)enableDischargingWithParams:(MTREnergyEVSEClusterEnableDischargingParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; /** @@ -8091,12 +7701,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -8186,12 +7790,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -8259,12 +7857,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -8312,7 +7904,6 @@ MTR_PROVISIONALLY_AVAILABLE * Command ChangeToMode * * This command is used to change device modes. - On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ - (void)changeToModeWithParams:(MTREnergyEVSEModeClusterChangeToModeParams *)params completion:(void (^)(MTREnergyEVSEModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; @@ -8328,22 +7919,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -8356,12 +7931,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -8409,7 +7978,6 @@ MTR_PROVISIONALLY_AVAILABLE * Command ChangeToMode * * This command is used to change device modes. - On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ - (void)changeToModeWithParams:(MTRWaterHeaterModeClusterChangeToModeParams *)params completion:(void (^)(MTRWaterHeaterModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; @@ -8425,22 +7993,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -8453,12 +8005,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -8506,7 +8052,6 @@ MTR_PROVISIONALLY_AVAILABLE * Command ChangeToMode * * This command is used to change device modes. - On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ - (void)changeToModeWithParams:(MTRDeviceEnergyManagementModeClusterChangeToModeParams *)params completion:(void (^)(MTRDeviceEnergyManagementModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; @@ -8522,22 +8067,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -8550,12 +8079,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -9052,12 +8575,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -9296,12 +8813,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -9406,12 +8917,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -9613,12 +9118,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -10137,12 +9636,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -10291,12 +9784,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -10376,12 +9863,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -10890,12 +10371,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -11055,12 +10530,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -11146,12 +10615,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -11231,12 +10694,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -11346,12 +10803,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -11431,12 +10882,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -11516,12 +10961,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -11681,12 +11120,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -11808,12 +11241,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -11935,12 +11362,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -12062,12 +11483,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -12189,12 +11604,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -12316,12 +11725,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -12443,12 +11846,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -12570,12 +11967,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -12697,12 +12088,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -12824,12 +12209,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -12951,12 +12330,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -13033,12 +12406,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -13159,12 +12526,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -13259,12 +12620,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -13332,12 +12687,6 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -13450,12 +12799,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -13530,12 +12873,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -13760,12 +13097,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -13862,12 +13193,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -13932,12 +13257,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14000,12 +13319,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14088,12 +13401,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14174,12 +13481,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14274,12 +13575,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14383,12 +13678,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14465,12 +13754,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14647,12 +13930,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14715,12 +13992,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14757,49 +14028,67 @@ MTR_PROVISIONALLY_AVAILABLE @end /** - * Cluster WebRTC Transport Provider + * Cluster Zone Management * - * The WebRTC transport provider cluster provides a way for stream providers (e.g. Cameras) to stream or receive their data through WebRTC. + * This cluster provides an interface to manage regions of interest, or Zones, which can be either manufacturer or user defined. */ MTR_PROVISIONALLY_AVAILABLE -@interface MTRBaseClusterWebRTCTransportProvider : MTRGenericBaseCluster +@interface MTRBaseClusterZoneManagement : MTRGenericBaseCluster /** - * Command SolicitOffer - * - * Requests that the Provider initiates a new session with the Offer / Answer flow in a way that allows for options to be passed and work with devices needing the standby flow. - */ -- (void)solicitOfferWithParams:(MTRWebRTCTransportProviderClusterSolicitOfferParams *)params completion:(void (^)(MTRWebRTCTransportProviderClusterSolicitOfferResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -/** - * Command ProvideOffer + * Command CreateTwoDCartesianZone * - * This command allows an SDP Offer to be set and start a new session. + * This command SHALL create and store a TwoD Cartesian Zone. */ -- (void)provideOfferWithParams:(MTRWebRTCTransportProviderClusterProvideOfferParams *)params completion:(void (^)(MTRWebRTCTransportProviderClusterProvideOfferResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)createTwoDCartesianZoneWithParams:(MTRZoneManagementClusterCreateTwoDCartesianZoneParams *)params completion:(void (^)(MTRZoneManagementClusterCreateTwoDCartesianZoneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; /** - * Command ProvideAnswer + * Command UpdateTwoDCartesianZone * - * This command SHALL be initiated from a Node in response to an Offer that was previously received from a remote peer. + * The UpdateTwoDCartesianZone SHALL update a stored TwoD Cartesian Zone. */ -- (void)provideAnswerWithParams:(MTRWebRTCTransportProviderClusterProvideAnswerParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)updateTwoDCartesianZoneWithParams:(MTRZoneManagementClusterUpdateTwoDCartesianZoneParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; /** - * Command ProvideICECandidate + * Command GetTwoDCartesianZone * - * This command allows for https://www.rfc-editor.org/rfc/rfc8839#section-4.2.1.2 nominated after the initial Offer / Answer exchange to be added to a session during the gathering phase. + * The GetTwoDCartesianZone SHALL return the TwoD Cartesian Zone for the passed in ZoneID. */ -- (void)provideICECandidateWithParams:(MTRWebRTCTransportProviderClusterProvideICECandidateParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)getTwoDCartesianZoneWithParams:(MTRZoneManagementClusterGetTwoDCartesianZoneParams * _Nullable)params completion:(void (^)(MTRZoneManagementClusterGetTwoDCartesianZoneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)getTwoDCartesianZoneWithCompletion:(void (^)(MTRZoneManagementClusterGetTwoDCartesianZoneResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; /** - * Command EndSession + * Command RemoveZone * - * This command instructs the stream provider to end the WebRTC session. + * This command SHALL remove the Zone mapped to the passed in ZoneID. */ -- (void)endSessionWithParams:(MTRWebRTCTransportProviderClusterEndSessionParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)removeZoneWithParams:(MTRZoneManagementClusterRemoveZoneParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeCurrentSessionsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeCurrentSessionsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeCurrentSessionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSupportedZoneSourcesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSupportedZoneSourcesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSupportedZoneSourcesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeZonesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeZonesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeZonesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeTimeControlWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeTimeControlWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeTimeControlWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeTimeControlWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeTimeControlWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSensitivityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSensitivityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSensitivityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSensitivityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSensitivityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params @@ -14813,12 +14102,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -14842,7 +14125,7 @@ MTR_PROVISIONALLY_AVAILABLE @end -@interface MTRBaseClusterWebRTCTransportProvider (Availability) +@interface MTRBaseClusterZoneManagement (Availability) /** * For all instance methods (reads, writes, commands) that take a completion, @@ -14855,61 +14138,695 @@ MTR_PROVISIONALLY_AVAILABLE @end /** - * Cluster Chime + * Cluster Camera AV Stream Management * - * This cluster provides facilities to configure and play Chime sounds, such as those used in a doorbell. + * The Camera AV Stream Management cluster is used to allow clients to manage, control, and configure various audio, video, and snapshot streams on a camera. */ MTR_PROVISIONALLY_AVAILABLE -@interface MTRBaseClusterChime : MTRGenericBaseCluster +@interface MTRBaseClusterCameraAVStreamManagement : MTRGenericBaseCluster /** - * Command PlayChimeSound + * Command AudioStreamAllocate * + * This command SHALL allocate an audio stream on the camera and return an allocated audio stream identifier. + */ +- (void)audioStreamAllocateWithParams:(MTRCameraAVStreamManagementClusterAudioStreamAllocateParams *)params completion:(void (^)(MTRCameraAVStreamManagementClusterAudioStreamAllocateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command AudioStreamDeallocate * + * This command SHALL deallocate an audio stream on the camera, corresponding to the given audio stream identifier. */ -- (void)playChimeSoundWithParams:(MTRChimeClusterPlayChimeSoundParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)playChimeSoundWithCompletion:(MTRStatusCompletion)completion - MTR_PROVISIONALLY_AVAILABLE; +- (void)audioStreamDeallocateWithParams:(MTRCameraAVStreamManagementClusterAudioStreamDeallocateParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command VideoStreamAllocate + * + * This command SHALL allocate a video stream on the camera and return an allocated video stream identifier. + */ +- (void)videoStreamAllocateWithParams:(MTRCameraAVStreamManagementClusterVideoStreamAllocateParams *)params completion:(void (^)(MTRCameraAVStreamManagementClusterVideoStreamAllocateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command VideoStreamModify + * + * This command SHALL be used to modify the resolution of a stream specified by the VideoStreamID. + */ +- (void)videoStreamModifyWithParams:(MTRCameraAVStreamManagementClusterVideoStreamModifyParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command VideoStreamDeallocate + * + * This command SHALL deallocate a video stream on the camera, corresponding to the given video stream identifier. + */ +- (void)videoStreamDeallocateWithParams:(MTRCameraAVStreamManagementClusterVideoStreamDeallocateParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command SnapshotStreamAllocate + * + * This command SHALL allocate a snapshot stream on the device and return an allocated snapshot stream identifier. + */ +- (void)snapshotStreamAllocateWithParams:(MTRCameraAVStreamManagementClusterSnapshotStreamAllocateParams *)params completion:(void (^)(MTRCameraAVStreamManagementClusterSnapshotStreamAllocateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command SnapshotStreamDeallocate + * + * This command SHALL deallocate an snapshot stream on the camera, corresponding to the given snapshot stream identifier. + */ +- (void)snapshotStreamDeallocateWithParams:(MTRCameraAVStreamManagementClusterSnapshotStreamDeallocateParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command SetStreamPriorities + * + * This command SHALL set the relative priorities of the various stream types on the camera. + */ +- (void)setStreamPrioritiesWithParams:(MTRCameraAVStreamManagementClusterSetStreamPrioritiesParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command CaptureSnapshot + * + * This command SHALL return a Snapshot from the camera. + */ +- (void)captureSnapshotWithParams:(MTRCameraAVStreamManagementClusterCaptureSnapshotParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command SetViewport + * + * This command sets the viewport in all video streams. + */ +- (void)setViewportWithParams:(MTRCameraAVStreamManagementClusterSetViewportParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command SetImageRotation + * + * The data fields for this command SHALL be as follows: + */ +- (void)setImageRotationWithParams:(MTRCameraAVStreamManagementClusterSetImageRotationParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command SetImageFlipHorizontal + * + * The data fields for this command SHALL be as follows: + */ +- (void)setImageFlipHorizontalWithParams:(MTRCameraAVStreamManagementClusterSetImageFlipHorizontalParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command SetImageFlipVertical + * + * The data fields for this command SHALL be as follows: + */ +- (void)setImageFlipVerticalWithParams:(MTRCameraAVStreamManagementClusterSetImageFlipVerticalParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeInstalledChimeSoundsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeInstalledChimeSoundsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeInstalledChimeSoundsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeMaxConcurrentVideoEncodersWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMaxConcurrentVideoEncodersWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMaxConcurrentVideoEncodersWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeActiveChimeIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeActiveChimeIDWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeActiveChimeIDWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeActiveChimeIDWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeActiveChimeIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeMaxEncodedPixelRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMaxEncodedPixelRateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMaxEncodedPixelRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEnabledWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeVideoSensorParamsWithCompletion:(void (^)(MTRCameraAVStreamManagementClusterVideoSensorParamsStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeVideoSensorParamsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRCameraAVStreamManagementClusterVideoSensorParamsStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeVideoSensorParamsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCameraAVStreamManagementClusterVideoSensorParamsStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeNightVisionCapableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNightVisionCapableWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNightVisionCapableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params +- (void)readAttributeMinViewportWithCompletion:(void (^)(MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMinViewportWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMinViewportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeRateDistortionTradeOffPointsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeRateDistortionTradeOffPointsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeRateDistortionTradeOffPointsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeMaxContentBufferSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMaxContentBufferSizeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMaxContentBufferSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeMicrophoneCapabilitiesWithCompletion:(void (^)(MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMicrophoneCapabilitiesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMicrophoneCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSpeakerCapabilitiesWithCompletion:(void (^)(MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSpeakerCapabilitiesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSpeakerCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeTwoWayTalkSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeTwoWayTalkSupportWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeTwoWayTalkSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSupportedSnapshotParamsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSupportedSnapshotParamsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSupportedSnapshotParamsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeMaxNetworkBandwidthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMaxNetworkBandwidthWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMaxNetworkBandwidthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeCurrentFrameRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeCurrentFrameRateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeCurrentFrameRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeHDRModeEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeHDRModeEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeHDRModeEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeHDRModeEnabledWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeHDRModeEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeCurrentVideoCodecsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeCurrentVideoCodecsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeCurrentVideoCodecsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeCurrentSnapshotConfigWithCompletion:(void (^)(MTRCameraAVStreamManagementClusterSnapshotParamsStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeCurrentSnapshotConfigWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRCameraAVStreamManagementClusterSnapshotParamsStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeCurrentSnapshotConfigWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCameraAVStreamManagementClusterSnapshotParamsStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFabricsUsingCameraWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFabricsUsingCameraWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFabricsUsingCameraWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAllocatedVideoStreamsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAllocatedVideoStreamsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAllocatedVideoStreamsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAllocatedAudioStreamsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAllocatedAudioStreamsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAllocatedAudioStreamsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAllocatedSnapshotStreamsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAllocatedSnapshotStreamsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAllocatedSnapshotStreamsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeRankedVideoStreamPrioritiesListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeRankedVideoStreamPrioritiesListWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeRankedVideoStreamPrioritiesListWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeRankedVideoStreamPrioritiesListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeRankedVideoStreamPrioritiesListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSoftRecordingPrivacyModeEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSoftRecordingPrivacyModeEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSoftRecordingPrivacyModeEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSoftRecordingPrivacyModeEnabledWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSoftRecordingPrivacyModeEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSoftLivestreamPrivacyModeEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSoftLivestreamPrivacyModeEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSoftLivestreamPrivacyModeEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSoftLivestreamPrivacyModeEnabledWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSoftLivestreamPrivacyModeEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeHardPrivacyModeOnWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeHardPrivacyModeOnWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeHardPrivacyModeOnWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeNightVisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeNightVisionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeNightVisionWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNightVisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNightVisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeNightVisionIllumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeNightVisionIllumWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeNightVisionIllumWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNightVisionIllumWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNightVisionIllumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAWBEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeAWBEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeAWBEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAWBEnabledWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAWBEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAutoShutterSpeedEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeAutoShutterSpeedEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeAutoShutterSpeedEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAutoShutterSpeedEnabledWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAutoShutterSpeedEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAutoISOEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeAutoISOEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeAutoISOEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAutoISOEnabledWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAutoISOEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeViewportWithCompletion:(void (^)(MTRCameraAVStreamManagementClusterViewportStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeViewportWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRCameraAVStreamManagementClusterViewportStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeViewportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCameraAVStreamManagementClusterViewportStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSpeakerMutedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSpeakerMutedWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSpeakerMutedWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSpeakerMutedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSpeakerMutedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSpeakerVolumeLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSpeakerVolumeLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSpeakerVolumeLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSpeakerVolumeLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSpeakerVolumeLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSpeakerMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSpeakerMaxLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSpeakerMaxLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSpeakerMaxLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSpeakerMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSpeakerMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSpeakerMinLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSpeakerMinLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSpeakerMinLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSpeakerMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeMicrophoneMutedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneMutedWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneMutedWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMicrophoneMutedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMicrophoneMutedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeMicrophoneVolumeLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneVolumeLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneVolumeLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMicrophoneVolumeLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMicrophoneVolumeLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeMicrophoneMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneMaxLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneMaxLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMicrophoneMaxLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMicrophoneMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeMicrophoneMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneMinLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneMinLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMicrophoneMinLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMicrophoneMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeMicrophoneAGCEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneAGCEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneAGCEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMicrophoneAGCEnabledWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMicrophoneAGCEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeImageRotationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeImageRotationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeImageRotationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeImageFlipHorizontalWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeImageFlipHorizontalWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeImageFlipHorizontalWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeImageFlipVerticalWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeImageFlipVerticalWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeImageFlipVerticalWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeLocalVideoRecordingEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeLocalVideoRecordingEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeLocalVideoRecordingEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeLocalVideoRecordingEnabledWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeLocalVideoRecordingEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeLocalSnapshotRecordingEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeLocalSnapshotRecordingEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeLocalSnapshotRecordingEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeLocalSnapshotRecordingEnabledWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeLocalSnapshotRecordingEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeStatusLightEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeStatusLightEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeStatusLightEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeStatusLightEnabledWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeStatusLightEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeStatusLightBrightnessWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeStatusLightBrightnessWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeStatusLightBrightnessWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeStatusLightBrightnessWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeStatusLightBrightnessWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeDepthSensorStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDepthSensorStatusWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDepthSensorStatusWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeDepthSensorStatusWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeDepthSensorStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterCameraAVStreamManagement (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster WebRTC Transport Provider + * + * The WebRTC transport provider cluster provides a way for stream providers (e.g. Cameras) to stream or receive their data through WebRTC. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterWebRTCTransportProvider : MTRGenericBaseCluster + +/** + * Command SolicitOffer + * + * Requests that the Provider initiates a new session with the Offer / Answer flow in a way that allows for options to be passed and work with devices needing the standby flow. + */ +- (void)solicitOfferWithParams:(MTRWebRTCTransportProviderClusterSolicitOfferParams *)params completion:(void (^)(MTRWebRTCTransportProviderClusterSolicitOfferResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command ProvideOffer + * + * This command allows an SDP Offer to be set and start a new session. + */ +- (void)provideOfferWithParams:(MTRWebRTCTransportProviderClusterProvideOfferParams *)params completion:(void (^)(MTRWebRTCTransportProviderClusterProvideOfferResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command ProvideAnswer + * + * This command SHALL be initiated from a Node in response to an Offer that was previously received from a remote peer. + */ +- (void)provideAnswerWithParams:(MTRWebRTCTransportProviderClusterProvideAnswerParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command ProvideICECandidate + * + * This command allows for https://www.rfc-editor.org/rfc/rfc8839#section-4.2.1.2 nominated after the initial Offer / Answer exchange to be added to a session during the gathering phase. + */ +- (void)provideICECandidateWithParams:(MTRWebRTCTransportProviderClusterProvideICECandidateParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command EndSession + * + * This command instructs the stream provider to end the WebRTC session. + */ +- (void)endSessionWithParams:(MTRWebRTCTransportProviderClusterEndSessionParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeCurrentSessionsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeCurrentSessionsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeCurrentSessionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterWebRTCTransportProvider (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster WebRTC Transport Requestor + * + * The WebRTC transport requestor cluster provides a way for stream consumers (e.g. Matter Stream Viewer) to establish a WebRTC connection with a stream provider. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterWebRTCTransportRequestor : MTRGenericBaseCluster + +/** + * Command Offer + * + * This command provides the stream requestor with WebRTC session details. It is sent following the receipt of a SolicitOffer command or a re-Offer initiated by the Provider. + */ +- (void)offerWithParams:(MTRWebRTCTransportRequestorClusterOfferParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command Answer + * + * This command provides the stream requestor with the WebRTC session details (i.e. Session ID and SDP answer). It is the next command in the Offer/Answer flow to the ProvideOffer command. + */ +- (void)answerWithParams:(MTRWebRTCTransportRequestorClusterAnswerParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command ICECandidate + * + * This command provides an ICE candidate to the stream requestor in a WebRTC session. + */ +- (void)ICECandidateWithParams:(MTRWebRTCTransportRequestorClusterICECandidateParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command End + * + * This command notifies the stream requestor that the provider has ended the WebRTC session. + */ +- (void)endWithParams:(MTRWebRTCTransportRequestorClusterEndParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeCurrentSessionsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeCurrentSessionsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeCurrentSessionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterWebRTCTransportRequestor (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Chime + * + * This cluster provides facilities to configure and play Chime sounds, such as those used in a doorbell. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterChime : MTRGenericBaseCluster + +/** + * Command PlayChimeSound + * + * + */ +- (void)playChimeSoundWithParams:(MTRChimeClusterPlayChimeSoundParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)playChimeSoundWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeInstalledChimeSoundsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeInstalledChimeSoundsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeInstalledChimeSoundsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeActiveChimeIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeActiveChimeIDWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeActiveChimeIDWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeActiveChimeIDWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeActiveChimeIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEnabledWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -14978,12 +14895,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -15058,12 +14969,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -16025,12 +15930,6 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -16117,12 +16016,6 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -18280,6 +18173,7 @@ typedef NS_ENUM(uint16_t, MTREnergyEVSEModeModeTag) { MTREnergyEVSEModeModeTagManual MTR_PROVISIONALLY_AVAILABLE = 0x4000, MTREnergyEVSEModeModeTagTimeOfUse MTR_PROVISIONALLY_AVAILABLE = 0x4001, MTREnergyEVSEModeModeTagSolarCharging MTR_PROVISIONALLY_AVAILABLE = 0x4002, + MTREnergyEVSEModeModeTagV2X MTR_PROVISIONALLY_AVAILABLE = 0x4003, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTREnergyEVSEModeFeature) { @@ -20272,6 +20166,86 @@ typedef NS_ENUM(uint8_t, MTRContentAppObserverStatus) { MTRContentAppObserverStatusUnexpectedData MTR_PROVISIONALLY_AVAILABLE = 0x01, } MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRZoneManagementStatusCode) { + MTRZoneManagementStatusCodeZoneNotFound MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRZoneManagementStatusCodeZoneInUse MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRZoneManagementZoneEventStoppedReason) { + MTRZoneManagementZoneEventStoppedReasonActionStopped MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRZoneManagementZoneEventStoppedReasonTimeout MTR_PROVISIONALLY_AVAILABLE = 0x01, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRZoneManagementZoneEventTriggeredReason) { + MTRZoneManagementZoneEventTriggeredReasonMotion MTR_PROVISIONALLY_AVAILABLE = 0x00, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRZoneManagementZoneSource) { + MTRZoneManagementZoneSourceMfg MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRZoneManagementZoneSourceUser MTR_PROVISIONALLY_AVAILABLE = 0x01, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRZoneManagementZoneType) { + MTRZoneManagementZoneTypeTwoDCARTZone MTR_PROVISIONALLY_AVAILABLE = 0x00, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRZoneManagementZoneUse) { + MTRZoneManagementZoneUseMotion MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRZoneManagementZoneUsePrivacy MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRZoneManagementZoneUseFocus MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint32_t, MTRZoneManagementFeature) { + MTRZoneManagementFeatureTwoDimensionalCartesianZone MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRCameraAVStreamManagementAudioCodec) { + MTRCameraAVStreamManagementAudioCodecOPUS MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRCameraAVStreamManagementAudioCodecAACLC MTR_PROVISIONALLY_AVAILABLE = 0x01, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRCameraAVStreamManagementImageCodec) { + MTRCameraAVStreamManagementImageCodecJPEG MTR_PROVISIONALLY_AVAILABLE = 0x00, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRCameraAVStreamManagementStreamType) { + MTRCameraAVStreamManagementStreamTypeInternal MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRCameraAVStreamManagementStreamTypeRecording MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRCameraAVStreamManagementStreamTypeAnalysis MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRCameraAVStreamManagementStreamTypeLiveView MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRCameraAVStreamManagementTriStateAuto) { + MTRCameraAVStreamManagementTriStateAutoOff MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRCameraAVStreamManagementTriStateAutoOn MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRCameraAVStreamManagementTriStateAutoAuto MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRCameraAVStreamManagementTwoWayTalkSupportType) { + MTRCameraAVStreamManagementTwoWayTalkSupportTypeNotSupported MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRCameraAVStreamManagementTwoWayTalkSupportTypeHalfDuplex MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRCameraAVStreamManagementTwoWayTalkSupportTypeFullDuplex MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRCameraAVStreamManagementVideoCodec) { + MTRCameraAVStreamManagementVideoCodecH264 MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRCameraAVStreamManagementVideoCodecHEVC MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRCameraAVStreamManagementVideoCodecVVC MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRCameraAVStreamManagementVideoCodecAV1 MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint32_t, MTRCameraAVStreamManagementFeature) { + MTRCameraAVStreamManagementFeaturePrivacy MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRCameraAVStreamManagementFeatureAudio MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRCameraAVStreamManagementFeatureSpeaker MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRCameraAVStreamManagementFeatureImageControl MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRCameraAVStreamManagementFeatureVideo MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRCameraAVStreamManagementFeatureSnapshot MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTRCameraAVStreamManagementFeatureWatermark MTR_PROVISIONALLY_AVAILABLE = 0x40, + MTRCameraAVStreamManagementFeatureOnScreenDisplay MTR_PROVISIONALLY_AVAILABLE = 0x80, + MTRCameraAVStreamManagementFeatureLocalStorage MTR_PROVISIONALLY_AVAILABLE = 0x100, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRWebRTCTransportProviderStreamType) { MTRWebRTCTransportProviderStreamTypeInternal MTR_PROVISIONALLY_AVAILABLE = 0x00, MTRWebRTCTransportProviderStreamTypeRecording MTR_PROVISIONALLY_AVAILABLE = 0x01, @@ -20298,6 +20272,32 @@ typedef NS_OPTIONS(uint8_t, MTRWebRTCTransportProviderWebRTCMetadataOptions) { MTRWebRTCTransportProviderWebRTCMetadataOptionsDataTLV MTR_PROVISIONALLY_AVAILABLE = 0x1, } MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRWebRTCTransportRequestorStreamType) { + MTRWebRTCTransportRequestorStreamTypeInternal MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRWebRTCTransportRequestorStreamTypeRecording MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRWebRTCTransportRequestorStreamTypeAnalysis MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRWebRTCTransportRequestorStreamTypeLiveView MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRWebRTCTransportRequestorWebRTCEndReason) { + MTRWebRTCTransportRequestorWebRTCEndReasonIceFailed MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRWebRTCTransportRequestorWebRTCEndReasonIceTimeout MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRWebRTCTransportRequestorWebRTCEndReasonUserHangup MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRWebRTCTransportRequestorWebRTCEndReasonUserBusy MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRWebRTCTransportRequestorWebRTCEndReasonReplaced MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRWebRTCTransportRequestorWebRTCEndReasonNoUserMedia MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRWebRTCTransportRequestorWebRTCEndReasonInviteTimeout MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRWebRTCTransportRequestorWebRTCEndReasonAnsweredElsewhere MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRWebRTCTransportRequestorWebRTCEndReasonOutOfResources MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRWebRTCTransportRequestorWebRTCEndReasonMediaTimeout MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRWebRTCTransportRequestorWebRTCEndReasonLowPower MTR_PROVISIONALLY_AVAILABLE = 0x0A, + MTRWebRTCTransportRequestorWebRTCEndReasonUnknownReason MTR_PROVISIONALLY_AVAILABLE = 0x0B, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint8_t, MTRWebRTCTransportRequestorWebRTCMetadataOptions) { + MTRWebRTCTransportRequestorWebRTCMetadataOptionsDataTLV MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_OPTIONS(uint32_t, MTRCommissionerControlSupportedDeviceCategoryBitmap) { MTRCommissionerControlSupportedDeviceCategoryBitmapFabricSynchronization MTR_PROVISIONALLY_AVAILABLE = 0x1, } MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 5bee560bd0..3c347c4472 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -283,42 +283,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Identify::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Identify::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Identify::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; @@ -963,42 +927,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Groups::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Groups::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Groups::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; @@ -1881,42 +1809,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OnOff::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OnOff::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OnOff::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; @@ -3475,42 +3367,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; @@ -4473,42 +4329,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PulseWidthModulation::Attributes::AttributeList::TypeInfo; @@ -4873,42 +4693,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; @@ -5520,42 +5304,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Binding::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Binding::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Binding::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; @@ -6418,42 +6166,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; @@ -7412,42 +7124,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Actions::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Actions::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Actions::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; @@ -8925,42 +8601,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BasicInformation::Attributes::AttributeList::TypeInfo; @@ -10141,42 +9781,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; @@ -10792,42 +10396,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; @@ -11455,42 +11023,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; @@ -12103,42 +11635,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; @@ -12694,42 +12190,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; @@ -13179,42 +12639,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; @@ -14772,42 +14196,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; @@ -16644,6 +16032,42 @@ + (void)readAttributeTCAcknowledgementsRequiredWithClusterStateCache:(MTRCluster completion:completion]; } +- (void)readAttributeTCUpdateDeadlineWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralCommissioning::Attributes::TCUpdateDeadline::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeTCUpdateDeadlineWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = GeneralCommissioning::Attributes::TCUpdateDeadline::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeTCUpdateDeadlineWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralCommissioning::Attributes::TCUpdateDeadline::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; @@ -16716,42 +16140,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; @@ -17931,42 +17319,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; @@ -18699,42 +18051,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; @@ -19515,42 +18831,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; @@ -20415,42 +19695,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; @@ -23268,42 +22512,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; @@ -26386,42 +25594,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; @@ -27610,42 +26782,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; @@ -28930,42 +28066,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; @@ -29815,42 +28915,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; @@ -30865,42 +29929,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Switch::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Switch::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Switch::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; @@ -31570,42 +30598,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; @@ -32510,42 +31502,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; @@ -33484,42 +32440,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; @@ -34101,42 +33021,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; @@ -34628,42 +33512,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; @@ -35113,42 +33961,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; @@ -35987,42 +34799,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; @@ -36416,42 +35192,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Timer::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Timer::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Timer::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Timer::Attributes::AttributeList::TypeInfo; @@ -36965,42 +35705,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OvenCavityOperationalState::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OvenCavityOperationalState::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OvenCavityOperationalState::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenCavityOperationalState::Attributes::AttributeList::TypeInfo; @@ -37420,42 +36124,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; @@ -37745,42 +36413,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LaundryDryerControls::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LaundryDryerControls::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LaundryDryerControls::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryDryerControls::Attributes::AttributeList::TypeInfo; @@ -38272,42 +36904,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; @@ -39145,42 +37741,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; @@ -39600,42 +38160,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; @@ -40025,42 +38549,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; @@ -40342,42 +38830,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; @@ -40659,42 +39111,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; @@ -41124,42 +39540,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; @@ -41452,42 +39832,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; @@ -41907,42 +40251,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; @@ -42163,42 +40471,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; @@ -42908,42 +41180,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; @@ -43321,42 +41557,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; @@ -43613,42 +41813,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenMode::Attributes::AttributeList::TypeInfo; @@ -44210,42 +42374,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = MicrowaveOvenControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = MicrowaveOvenControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = MicrowaveOvenControl::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MicrowaveOvenControl::Attributes::AttributeList::TypeInfo; @@ -44759,42 +42887,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; @@ -45280,42 +43372,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; @@ -45801,42 +43857,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ScenesManagement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ScenesManagement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ScenesManagement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ScenesManagement::Attributes::AttributeList::TypeInfo; @@ -46299,42 +44319,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = HepaFilterMonitoring::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = HepaFilterMonitoring::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = HepaFilterMonitoring::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = HepaFilterMonitoring::Attributes::AttributeList::TypeInfo; @@ -46797,42 +44781,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AttributeList::TypeInfo; @@ -47382,42 +45330,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BooleanStateConfiguration::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BooleanStateConfiguration::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BooleanStateConfiguration::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BooleanStateConfiguration::Attributes::AttributeList::TypeInfo; @@ -48116,42 +46028,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ValveConfigurationAndControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ValveConfigurationAndControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ValveConfigurationAndControl::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ValveConfigurationAndControl::Attributes::AttributeList::TypeInfo; @@ -49020,42 +46896,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalPowerMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ElectricalPowerMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalPowerMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalPowerMeasurement::Attributes::AttributeList::TypeInfo; @@ -49456,42 +47296,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalEnergyMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ElectricalEnergyMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalEnergyMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ElectricalEnergyMeasurement::Attributes::AttributeList::TypeInfo; @@ -49945,42 +47749,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterManagement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WaterHeaterManagement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterManagement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WaterHeaterManagement::Attributes::AttributeList::TypeInfo; @@ -50634,42 +48402,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DemandResponseLoadControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DemandResponseLoadControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DemandResponseLoadControl::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DemandResponseLoadControl::Attributes::AttributeList::TypeInfo; @@ -50975,42 +48707,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Messages::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Messages::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Messages::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Messages::Attributes::AttributeList::TypeInfo; @@ -51688,42 +49384,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DeviceEnergyManagement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DeviceEnergyManagement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DeviceEnergyManagement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagement::Attributes::AttributeList::TypeInfo; @@ -53031,42 +50691,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EnergyEvse::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = EnergyEvse::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EnergyEvse::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvse::Attributes::AttributeList::TypeInfo; @@ -53487,42 +51111,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EnergyPreference::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = EnergyPreference::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EnergyPreference::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyPreference::Attributes::AttributeList::TypeInfo; @@ -53779,42 +51367,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PowerTopology::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PowerTopology::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PowerTopology::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PowerTopology::Attributes::AttributeList::TypeInfo; @@ -54024,144 +51576,6 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EnergyEvseMode::Attributes::StartUpMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = EnergyEvseMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = EnergyEvseMode::Attributes::StartUpMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EnergyEvseMode::Attributes::StartUpMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EnergyEvseMode::Attributes::OnMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = EnergyEvseMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = EnergyEvseMode::Attributes::OnMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EnergyEvseMode::Attributes::OnMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvseMode::Attributes::GeneratedCommandList::TypeInfo; @@ -54234,42 +51648,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EnergyEvseMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = EnergyEvseMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EnergyEvseMode::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EnergyEvseMode::Attributes::AttributeList::TypeInfo; @@ -54479,144 +51857,6 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterMode::Attributes::StartUpMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = WaterHeaterMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WaterHeaterMode::Attributes::StartUpMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterMode::Attributes::StartUpMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterMode::Attributes::OnMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = WaterHeaterMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WaterHeaterMode::Attributes::OnMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterMode::Attributes::OnMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WaterHeaterMode::Attributes::GeneratedCommandList::TypeInfo; @@ -54689,42 +51929,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WaterHeaterMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterMode::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WaterHeaterMode::Attributes::AttributeList::TypeInfo; @@ -54934,144 +52138,6 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DeviceEnergyManagementMode::Attributes::StartUpMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DeviceEnergyManagementMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DeviceEnergyManagementMode::Attributes::StartUpMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DeviceEnergyManagementMode::Attributes::StartUpMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DeviceEnergyManagementMode::Attributes::OnMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DeviceEnergyManagementMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DeviceEnergyManagementMode::Attributes::OnMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DeviceEnergyManagementMode::Attributes::OnMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagementMode::Attributes::GeneratedCommandList::TypeInfo; @@ -55144,42 +52210,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DeviceEnergyManagementMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DeviceEnergyManagementMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DeviceEnergyManagementMode::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DeviceEnergyManagementMode::Attributes::AttributeList::TypeInfo; @@ -58039,42 +55069,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; @@ -60959,42 +57953,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; @@ -62456,42 +59414,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ServiceArea::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ServiceArea::Attributes::AttributeList::TypeInfo; @@ -63626,42 +60548,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; @@ -68159,42 +65045,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; @@ -71187,42 +68037,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; @@ -72218,42 +69032,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; @@ -75466,42 +72244,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; @@ -78701,42 +75443,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; @@ -79857,42 +76563,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; @@ -80582,42 +77252,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; @@ -81452,42 +78086,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; @@ -82317,42 +78915,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; @@ -83007,42 +79569,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; @@ -84337,42 +80863,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; @@ -85631,42 +82121,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; @@ -86247,42 +82701,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; @@ -86863,42 +83281,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; @@ -87479,42 +83861,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OzoneConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OzoneConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OzoneConcentrationMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = OzoneConcentrationMeasurement::Attributes::AttributeList::TypeInfo; @@ -88095,42 +84441,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; @@ -88711,42 +85021,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AttributeList::TypeInfo; @@ -89327,42 +85601,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; @@ -89943,42 +86181,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; @@ -90559,42 +86761,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::TypeInfo; @@ -91175,42 +87341,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RadonConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = RadonConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RadonConcentrationMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = RadonConcentrationMeasurement::Attributes::AttributeList::TypeInfo; @@ -91496,42 +87626,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WiFiNetworkManagement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WiFiNetworkManagement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WiFiNetworkManagement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WiFiNetworkManagement::Attributes::AttributeList::TypeInfo; @@ -92037,42 +88131,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThreadBorderRouterManagement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ThreadBorderRouterManagement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThreadBorderRouterManagement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadBorderRouterManagement::Attributes::AttributeList::TypeInfo; @@ -92477,42 +88535,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThreadNetworkDirectory::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ThreadNetworkDirectory::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThreadNetworkDirectory::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ThreadNetworkDirectory::Attributes::AttributeList::TypeInfo; @@ -92769,42 +88791,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; @@ -93470,42 +89456,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Channel::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Channel::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Channel::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; @@ -94097,42 +90047,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; @@ -95351,42 +91265,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; @@ -96300,42 +92178,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; @@ -96834,42 +92676,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LowPower::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LowPower::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LowPower::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; @@ -97275,42 +93081,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; @@ -97839,42 +93609,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; @@ -98461,42 +94195,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; @@ -99143,42 +94841,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; @@ -99940,42 +95602,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; @@ -100712,42 +96338,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; @@ -101694,42 +97284,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ContentControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ContentControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ContentControl::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = ContentControl::Attributes::AttributeList::TypeInfo; @@ -101939,9 +97493,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::EventList::TypeInfo; + using TypeInfo = ContentAppObserver::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101950,11 +97504,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentAppObserver::Attributes::EventList::TypeInfo; + using TypeInfo = ContentAppObserver::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101964,9 +97518,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::EventList::TypeInfo; + using TypeInfo = ContentAppObserver::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -101975,9 +97529,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::AttributeList::TypeInfo; + using TypeInfo = ContentAppObserver::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101986,11 +97540,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentAppObserver::Attributes::AttributeList::TypeInfo; + using TypeInfo = ContentAppObserver::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102000,9 +97554,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::AttributeList::TypeInfo; + using TypeInfo = ContentAppObserver::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -102011,9 +97565,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ContentAppObserver::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102022,11 +97576,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentAppObserver::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ContentAppObserver::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102036,9 +97590,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ContentAppObserver::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -102047,9 +97601,114 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterZoneManagement + +- (void)createTwoDCartesianZoneWithParams:(MTRZoneManagementClusterCreateTwoDCartesianZoneParams *)params completion:(void (^)(MTRZoneManagementClusterCreateTwoDCartesianZoneResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::ClusterRevision::TypeInfo; + if (params == nil) { + params = [[MTRZoneManagementClusterCreateTwoDCartesianZoneParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ZoneManagement::Commands::CreateTwoDCartesianZone::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRZoneManagementClusterCreateTwoDCartesianZoneResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)updateTwoDCartesianZoneWithParams:(MTRZoneManagementClusterUpdateTwoDCartesianZoneParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRZoneManagementClusterUpdateTwoDCartesianZoneParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ZoneManagement::Commands::UpdateTwoDCartesianZone::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)getTwoDCartesianZoneWithCompletion:(void (^)(MTRZoneManagementClusterGetTwoDCartesianZoneResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self getTwoDCartesianZoneWithParams:nil completion:completion]; +} +- (void)getTwoDCartesianZoneWithParams:(MTRZoneManagementClusterGetTwoDCartesianZoneParams * _Nullable)params completion:(void (^)(MTRZoneManagementClusterGetTwoDCartesianZoneResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRZoneManagementClusterGetTwoDCartesianZoneParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ZoneManagement::Commands::GetTwoDCartesianZone::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRZoneManagementClusterGetTwoDCartesianZoneResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)removeZoneWithParams:(MTRZoneManagementClusterRemoveZoneParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRZoneManagementClusterRemoveZoneParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ZoneManagement::Commands::RemoveZone::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeSupportedZoneSourcesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ZoneManagement::Attributes::SupportedZoneSources::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102058,11 +97717,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedZoneSourcesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentAppObserver::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ZoneManagement::Attributes::SupportedZoneSources::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102072,9 +97731,3231 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedZoneSourcesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ZoneManagement::Attributes::SupportedZoneSources::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeZonesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ZoneManagement::Attributes::Zones::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeZonesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ZoneManagement::Attributes::Zones::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeZonesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ZoneManagement::Attributes::Zones::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeTimeControlWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ZoneManagement::Attributes::TimeControl::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeTimeControlWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeTimeControlWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeTimeControlWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ZoneManagement::Attributes::TimeControl::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if ( ! [value[i_0] isKindOfClass: [MTRZoneManagementClusterZoneTriggeringTimeControlStruct class]] ) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRZoneManagementClusterZoneTriggeringTimeControlStruct *)value[i_0]; + listHolder_0->mList[i_0].initialDuration = element_0.initialDuration.unsignedShortValue; + listHolder_0->mList[i_0].augmentationDuration = element_0.augmentationDuration.unsignedShortValue; + listHolder_0->mList[i_0].maxDuration = element_0.maxDuration.unsignedIntValue; + listHolder_0->mList[i_0].blindDuration = element_0.blindDuration.unsignedShortValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeTimeControlWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ZoneManagement::Attributes::TimeControl::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeTimeControlWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ZoneManagement::Attributes::TimeControl::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSensitivityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ZoneManagement::Attributes::Sensitivity::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeSensitivityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeSensitivityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeSensitivityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ZoneManagement::Attributes::Sensitivity::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeSensitivityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ZoneManagement::Attributes::Sensitivity::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSensitivityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ZoneManagement::Attributes::Sensitivity::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ZoneManagement::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ZoneManagement::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ZoneManagement::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ZoneManagement::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ZoneManagement::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ZoneManagement::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ZoneManagement::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ZoneManagement::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ZoneManagement::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ZoneManagement::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ZoneManagement::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ZoneManagement::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ZoneManagement::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ZoneManagement::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ZoneManagement::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterCameraAVStreamManagement + +- (void)audioStreamAllocateWithParams:(MTRCameraAVStreamManagementClusterAudioStreamAllocateParams *)params completion:(void (^)(MTRCameraAVStreamManagementClusterAudioStreamAllocateResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterAudioStreamAllocateParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::AudioStreamAllocate::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRCameraAVStreamManagementClusterAudioStreamAllocateResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)audioStreamDeallocateWithParams:(MTRCameraAVStreamManagementClusterAudioStreamDeallocateParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterAudioStreamDeallocateParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::AudioStreamDeallocate::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)videoStreamAllocateWithParams:(MTRCameraAVStreamManagementClusterVideoStreamAllocateParams *)params completion:(void (^)(MTRCameraAVStreamManagementClusterVideoStreamAllocateResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterVideoStreamAllocateParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::VideoStreamAllocate::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRCameraAVStreamManagementClusterVideoStreamAllocateResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)videoStreamModifyWithParams:(MTRCameraAVStreamManagementClusterVideoStreamModifyParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterVideoStreamModifyParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::VideoStreamModify::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)videoStreamDeallocateWithParams:(MTRCameraAVStreamManagementClusterVideoStreamDeallocateParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterVideoStreamDeallocateParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::VideoStreamDeallocate::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)snapshotStreamAllocateWithParams:(MTRCameraAVStreamManagementClusterSnapshotStreamAllocateParams *)params completion:(void (^)(MTRCameraAVStreamManagementClusterSnapshotStreamAllocateResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterSnapshotStreamAllocateParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::SnapshotStreamAllocate::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRCameraAVStreamManagementClusterSnapshotStreamAllocateResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)snapshotStreamDeallocateWithParams:(MTRCameraAVStreamManagementClusterSnapshotStreamDeallocateParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterSnapshotStreamDeallocateParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::SnapshotStreamDeallocate::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setStreamPrioritiesWithParams:(MTRCameraAVStreamManagementClusterSetStreamPrioritiesParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterSetStreamPrioritiesParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::SetStreamPriorities::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)captureSnapshotWithParams:(MTRCameraAVStreamManagementClusterCaptureSnapshotParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterCaptureSnapshotParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::CaptureSnapshot::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setViewportWithParams:(MTRCameraAVStreamManagementClusterSetViewportParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterSetViewportParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::SetViewport::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setImageRotationWithParams:(MTRCameraAVStreamManagementClusterSetImageRotationParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterSetImageRotationParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::SetImageRotation::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setImageFlipHorizontalWithParams:(MTRCameraAVStreamManagementClusterSetImageFlipHorizontalParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterSetImageFlipHorizontalParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::SetImageFlipHorizontal::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setImageFlipVerticalWithParams:(MTRCameraAVStreamManagementClusterSetImageFlipVerticalParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterSetImageFlipVerticalParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::SetImageFlipVertical::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeMaxConcurrentVideoEncodersWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MaxConcurrentVideoEncoders::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMaxConcurrentVideoEncodersWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MaxConcurrentVideoEncoders::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMaxConcurrentVideoEncodersWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MaxConcurrentVideoEncoders::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMaxEncodedPixelRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MaxEncodedPixelRate::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMaxEncodedPixelRateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MaxEncodedPixelRate::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMaxEncodedPixelRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MaxEncodedPixelRate::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeVideoSensorParamsWithCompletion:(void (^)(MTRCameraAVStreamManagementClusterVideoSensorParamsStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::VideoSensorParams::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeVideoSensorParamsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRCameraAVStreamManagementClusterVideoSensorParamsStruct * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::VideoSensorParams::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeVideoSensorParamsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCameraAVStreamManagementClusterVideoSensorParamsStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::VideoSensorParams::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNightVisionCapableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::NightVisionCapable::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNightVisionCapableWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::NightVisionCapable::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNightVisionCapableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::NightVisionCapable::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMinViewportWithCompletion:(void (^)(MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MinViewport::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMinViewportWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MinViewport::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMinViewportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MinViewport::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRateDistortionTradeOffPointsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::RateDistortionTradeOffPoints::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRateDistortionTradeOffPointsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::RateDistortionTradeOffPoints::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRateDistortionTradeOffPointsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::RateDistortionTradeOffPoints::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMaxContentBufferSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MaxContentBufferSize::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMaxContentBufferSizeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MaxContentBufferSize::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMaxContentBufferSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MaxContentBufferSize::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMicrophoneCapabilitiesWithCompletion:(void (^)(MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneCapabilities::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMicrophoneCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneCapabilities::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMicrophoneCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneCapabilities::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSpeakerCapabilitiesWithCompletion:(void (^)(MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SpeakerCapabilities::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSpeakerCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SpeakerCapabilities::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSpeakerCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SpeakerCapabilities::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeTwoWayTalkSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::TwoWayTalkSupport::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeTwoWayTalkSupportWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::TwoWayTalkSupport::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeTwoWayTalkSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::TwoWayTalkSupport::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSupportedSnapshotParamsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SupportedSnapshotParams::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSupportedSnapshotParamsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SupportedSnapshotParams::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSupportedSnapshotParamsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SupportedSnapshotParams::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMaxNetworkBandwidthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MaxNetworkBandwidth::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMaxNetworkBandwidthWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MaxNetworkBandwidth::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMaxNetworkBandwidthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MaxNetworkBandwidth::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeCurrentFrameRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::CurrentFrameRate::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeCurrentFrameRateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::CurrentFrameRate::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeCurrentFrameRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::CurrentFrameRate::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeHDRModeEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::HDRModeEnabled::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeHDRModeEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeHDRModeEnabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeHDRModeEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::HDRModeEnabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeHDRModeEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::HDRModeEnabled::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeHDRModeEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::HDRModeEnabled::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeCurrentVideoCodecsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::CurrentVideoCodecs::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeCurrentVideoCodecsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::CurrentVideoCodecs::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeCurrentVideoCodecsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::CurrentVideoCodecs::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeCurrentSnapshotConfigWithCompletion:(void (^)(MTRCameraAVStreamManagementClusterSnapshotParamsStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::CurrentSnapshotConfig::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeCurrentSnapshotConfigWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRCameraAVStreamManagementClusterSnapshotParamsStruct * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::CurrentSnapshotConfig::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeCurrentSnapshotConfigWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCameraAVStreamManagementClusterSnapshotParamsStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::CurrentSnapshotConfig::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFabricsUsingCameraWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::FabricsUsingCamera::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFabricsUsingCameraWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::FabricsUsingCamera::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFabricsUsingCameraWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::FabricsUsingCamera::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAllocatedVideoStreamsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AllocatedVideoStreams::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAllocatedVideoStreamsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AllocatedVideoStreams::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAllocatedVideoStreamsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AllocatedVideoStreams::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAllocatedAudioStreamsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AllocatedAudioStreams::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAllocatedAudioStreamsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AllocatedAudioStreams::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAllocatedAudioStreamsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AllocatedAudioStreams::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAllocatedSnapshotStreamsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AllocatedSnapshotStreams::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAllocatedSnapshotStreamsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AllocatedSnapshotStreams::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAllocatedSnapshotStreamsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AllocatedSnapshotStreams::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRankedVideoStreamPrioritiesListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::RankedVideoStreamPrioritiesList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeRankedVideoStreamPrioritiesListWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeRankedVideoStreamPrioritiesListWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRankedVideoStreamPrioritiesListWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::RankedVideoStreamPrioritiesList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if ( ! [value[i_0] isKindOfClass: [NSNumber class]] ) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *)value[i_0]; + listHolder_0->mList[i_0] = static_castmList[i_0])>>(element_0.unsignedCharValue); + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeRankedVideoStreamPrioritiesListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::RankedVideoStreamPrioritiesList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRankedVideoStreamPrioritiesListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::RankedVideoStreamPrioritiesList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSoftRecordingPrivacyModeEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SoftRecordingPrivacyModeEnabled::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeSoftRecordingPrivacyModeEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeSoftRecordingPrivacyModeEnabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeSoftRecordingPrivacyModeEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::SoftRecordingPrivacyModeEnabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeSoftRecordingPrivacyModeEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SoftRecordingPrivacyModeEnabled::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSoftRecordingPrivacyModeEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SoftRecordingPrivacyModeEnabled::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSoftLivestreamPrivacyModeEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SoftLivestreamPrivacyModeEnabled::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeSoftLivestreamPrivacyModeEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeSoftLivestreamPrivacyModeEnabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeSoftLivestreamPrivacyModeEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::SoftLivestreamPrivacyModeEnabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeSoftLivestreamPrivacyModeEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SoftLivestreamPrivacyModeEnabled::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSoftLivestreamPrivacyModeEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SoftLivestreamPrivacyModeEnabled::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeHardPrivacyModeOnWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::HardPrivacyModeOn::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeHardPrivacyModeOnWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::HardPrivacyModeOn::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeHardPrivacyModeOnWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::HardPrivacyModeOn::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNightVisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::NightVision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeNightVisionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeNightVisionWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeNightVisionWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::NightVision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeNightVisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::NightVision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNightVisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::NightVision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNightVisionIllumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::NightVisionIllum::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeNightVisionIllumWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeNightVisionIllumWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeNightVisionIllumWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::NightVisionIllum::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeNightVisionIllumWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::NightVisionIllum::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNightVisionIllumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::NightVisionIllum::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAWBEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AWBEnabled::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeAWBEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeAWBEnabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeAWBEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::AWBEnabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeAWBEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AWBEnabled::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAWBEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AWBEnabled::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAutoShutterSpeedEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AutoShutterSpeedEnabled::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeAutoShutterSpeedEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeAutoShutterSpeedEnabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeAutoShutterSpeedEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::AutoShutterSpeedEnabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeAutoShutterSpeedEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AutoShutterSpeedEnabled::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAutoShutterSpeedEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AutoShutterSpeedEnabled::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAutoISOEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AutoISOEnabled::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeAutoISOEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeAutoISOEnabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeAutoISOEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::AutoISOEnabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeAutoISOEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AutoISOEnabled::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAutoISOEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AutoISOEnabled::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeViewportWithCompletion:(void (^)(MTRCameraAVStreamManagementClusterViewportStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::Viewport::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeViewportWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRCameraAVStreamManagementClusterViewportStruct * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::Viewport::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeViewportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCameraAVStreamManagementClusterViewportStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::Viewport::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSpeakerMutedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SpeakerMuted::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeSpeakerMutedWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeSpeakerMutedWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeSpeakerMutedWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::SpeakerMuted::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeSpeakerMutedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SpeakerMuted::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSpeakerMutedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SpeakerMuted::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSpeakerVolumeLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SpeakerVolumeLevel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeSpeakerVolumeLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeSpeakerVolumeLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeSpeakerVolumeLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::SpeakerVolumeLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeSpeakerVolumeLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SpeakerVolumeLevel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSpeakerVolumeLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SpeakerVolumeLevel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSpeakerMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SpeakerMaxLevel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeSpeakerMaxLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeSpeakerMaxLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeSpeakerMaxLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::SpeakerMaxLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeSpeakerMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SpeakerMaxLevel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSpeakerMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SpeakerMaxLevel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSpeakerMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SpeakerMinLevel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeSpeakerMinLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeSpeakerMinLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeSpeakerMinLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::SpeakerMinLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeSpeakerMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SpeakerMinLevel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSpeakerMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::SpeakerMinLevel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMicrophoneMutedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneMuted::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeMicrophoneMutedWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeMicrophoneMutedWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMicrophoneMutedWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneMuted::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeMicrophoneMutedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneMuted::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMicrophoneMutedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneMuted::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMicrophoneVolumeLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneVolumeLevel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeMicrophoneVolumeLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeMicrophoneVolumeLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMicrophoneVolumeLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneVolumeLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeMicrophoneVolumeLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneVolumeLevel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMicrophoneVolumeLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneVolumeLevel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMicrophoneMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneMaxLevel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeMicrophoneMaxLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeMicrophoneMaxLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMicrophoneMaxLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneMaxLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeMicrophoneMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneMaxLevel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMicrophoneMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneMaxLevel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMicrophoneMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneMinLevel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeMicrophoneMinLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeMicrophoneMinLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMicrophoneMinLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneMinLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeMicrophoneMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneMinLevel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMicrophoneMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneMinLevel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMicrophoneAGCEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneAGCEnabled::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeMicrophoneAGCEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeMicrophoneAGCEnabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMicrophoneAGCEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneAGCEnabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeMicrophoneAGCEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneAGCEnabled::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMicrophoneAGCEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::MicrophoneAGCEnabled::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeImageRotationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::ImageRotation::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeImageRotationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::ImageRotation::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeImageRotationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::ImageRotation::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeImageFlipHorizontalWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::ImageFlipHorizontal::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeImageFlipHorizontalWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::ImageFlipHorizontal::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeImageFlipHorizontalWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::ImageFlipHorizontal::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeImageFlipVerticalWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::ImageFlipVertical::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeImageFlipVerticalWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::ImageFlipVertical::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeImageFlipVerticalWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::ImageFlipVertical::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeLocalVideoRecordingEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::LocalVideoRecordingEnabled::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeLocalVideoRecordingEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeLocalVideoRecordingEnabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLocalVideoRecordingEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::LocalVideoRecordingEnabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeLocalVideoRecordingEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::LocalVideoRecordingEnabled::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeLocalVideoRecordingEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::LocalVideoRecordingEnabled::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeLocalSnapshotRecordingEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::LocalSnapshotRecordingEnabled::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeLocalSnapshotRecordingEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeLocalSnapshotRecordingEnabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLocalSnapshotRecordingEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::LocalSnapshotRecordingEnabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeLocalSnapshotRecordingEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::LocalSnapshotRecordingEnabled::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeLocalSnapshotRecordingEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::LocalSnapshotRecordingEnabled::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeStatusLightEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::StatusLightEnabled::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeStatusLightEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeStatusLightEnabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeStatusLightEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::StatusLightEnabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeStatusLightEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::StatusLightEnabled::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeStatusLightEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::StatusLightEnabled::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeStatusLightBrightnessWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::StatusLightBrightness::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeStatusLightBrightnessWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeStatusLightBrightnessWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeStatusLightBrightnessWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::StatusLightBrightness::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeStatusLightBrightnessWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::StatusLightBrightness::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeStatusLightBrightnessWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::StatusLightBrightness::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDepthSensorStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::DepthSensorStatus::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeDepthSensorStatusWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeDepthSensorStatusWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeDepthSensorStatusWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = CameraAvStreamManagement::Attributes::DepthSensorStatus::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeDepthSensorStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::DepthSensorStatus::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDepthSensorStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::DepthSensorStatus::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CameraAvStreamManagement::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CameraAvStreamManagement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -102316,9 +101197,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WebRTCTransportProvider::Attributes::EventList::TypeInfo; + using TypeInfo = WebRTCTransportProvider::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102327,11 +101208,256 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WebRTCTransportProvider::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = WebRTCTransportProvider::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = WebRTCTransportProvider::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WebRTCTransportProvider::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = WebRTCTransportProvider::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = WebRTCTransportProvider::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WebRTCTransportProvider::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = WebRTCTransportProvider::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterWebRTCTransportRequestor + +- (void)offerWithParams:(MTRWebRTCTransportRequestorClusterOfferParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRWebRTCTransportRequestorClusterOfferParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = WebRTCTransportRequestor::Commands::Offer::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)answerWithParams:(MTRWebRTCTransportRequestorClusterAnswerParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRWebRTCTransportRequestorClusterAnswerParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = WebRTCTransportRequestor::Commands::Answer::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)ICECandidateWithParams:(MTRWebRTCTransportRequestorClusterICECandidateParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRWebRTCTransportRequestorClusterICECandidateParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = WebRTCTransportRequestor::Commands::ICECandidate::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)endWithParams:(MTRWebRTCTransportRequestorClusterEndParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRWebRTCTransportRequestorClusterEndParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = WebRTCTransportRequestor::Commands::End::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeCurrentSessionsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = WebRTCTransportRequestor::Attributes::CurrentSessions::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeCurrentSessionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WebRTCTransportRequestor::Attributes::CurrentSessions::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeCurrentSessionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = WebRTCTransportRequestor::Attributes::CurrentSessions::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WebRTCTransportProvider::Attributes::EventList::TypeInfo; + using TypeInfo = WebRTCTransportRequestor::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WebRTCTransportRequestor::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102341,9 +101467,45 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WebRTCTransportProvider::Attributes::EventList::TypeInfo; + using TypeInfo = WebRTCTransportRequestor::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = WebRTCTransportRequestor::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WebRTCTransportRequestor::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = WebRTCTransportRequestor::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -102354,7 +101516,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WebRTCTransportProvider::Attributes::AttributeList::TypeInfo; + using TypeInfo = WebRTCTransportRequestor::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102367,7 +101529,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WebRTCTransportProvider::Attributes::AttributeList::TypeInfo; + using TypeInfo = WebRTCTransportRequestor::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102379,7 +101541,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WebRTCTransportProvider::Attributes::AttributeList::TypeInfo; + using TypeInfo = WebRTCTransportRequestor::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -102390,7 +101552,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WebRTCTransportProvider::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WebRTCTransportRequestor::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102403,7 +101565,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WebRTCTransportProvider::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WebRTCTransportRequestor::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102415,7 +101577,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WebRTCTransportProvider::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WebRTCTransportRequestor::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -102426,7 +101588,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WebRTCTransportProvider::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WebRTCTransportRequestor::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102439,7 +101601,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WebRTCTransportProvider::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WebRTCTransportRequestor::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102451,7 +101613,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WebRTCTransportProvider::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WebRTCTransportRequestor::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -102729,42 +101891,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Chime::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Chime::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Chime::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Chime::Attributes::AttributeList::TypeInfo; @@ -103021,42 +102147,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EcosystemInformation::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = EcosystemInformation::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EcosystemInformation::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EcosystemInformation::Attributes::AttributeList::TypeInfo; @@ -103326,42 +102416,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = CommissionerControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = CommissionerControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = CommissionerControl::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = CommissionerControl::Attributes::AttributeList::TypeInfo; @@ -110441,42 +109495,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = UnitTesting::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = UnitTesting::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = UnitTesting::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::AttributeList::TypeInfo; @@ -114747,42 +113765,6 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = SampleMei::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = SampleMei::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = SampleMei::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = SampleMei::Attributes::AttributeList::TypeInfo; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 97e0c30e92..c44b789060 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -197,7 +197,10 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeAccountLoginID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000050E, MTRClusterIDTypeContentControlID MTR_PROVISIONALLY_AVAILABLE = 0x0000050F, MTRClusterIDTypeContentAppObserverID MTR_PROVISIONALLY_AVAILABLE = 0x00000510, + MTRClusterIDTypeZoneManagementID MTR_PROVISIONALLY_AVAILABLE = 0x00000550, + MTRClusterIDTypeCameraAVStreamManagementID MTR_PROVISIONALLY_AVAILABLE = 0x00000551, MTRClusterIDTypeWebRTCTransportProviderID MTR_PROVISIONALLY_AVAILABLE = 0x00000553, + MTRClusterIDTypeWebRTCTransportRequestorID MTR_PROVISIONALLY_AVAILABLE = 0x00000554, MTRClusterIDTypeChimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000556, MTRClusterIDTypeEcosystemInformationID MTR_PROVISIONALLY_AVAILABLE = 0x00000750, MTRClusterIDTypeCommissionerControlID MTR_PROVISIONALLY_AVAILABLE = 0x00000751, @@ -237,7 +240,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Global attributes MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000FFF8, MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000FFF9, - MTRAttributeIDTypeGlobalAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = 0x0000FFFA, MTRAttributeIDTypeGlobalAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000FFFB, MTRAttributeIDTypeGlobalAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000FFFC, MTRAttributeIDTypeGlobalAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000FFFD, @@ -270,7 +272,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterIdentifyAttributeIdentifyTypeID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, MTRAttributeIDTypeClusterIdentifyAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterIdentifyAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterIdentifyAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterIdentifyAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterIdentifyAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterIdentifyAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -299,7 +300,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterGroupsAttributeNameSupportID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, MTRAttributeIDTypeClusterGroupsAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterGroupsAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterGroupsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterGroupsAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterGroupsAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterGroupsAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -344,7 +344,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterOnOffAttributeStartUpOnOffID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004003, MTRAttributeIDTypeClusterOnOffAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterOnOffAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOnOffAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOnOffAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterOnOffAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterOnOffAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -425,7 +424,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterLevelControlAttributeStartUpCurrentLevelID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004000, MTRAttributeIDTypeClusterLevelControlAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterLevelControlAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterLevelControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterLevelControlAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterLevelControlAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterLevelControlAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -450,7 +448,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster PulseWidthModulation attributes MTRAttributeIDTypeClusterPulseWidthModulationAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterPulseWidthModulationAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPulseWidthModulationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterPulseWidthModulationAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterPulseWidthModulationAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterPulseWidthModulationAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -495,7 +492,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterDescriptorAttributeTagListID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, MTRAttributeIDTypeClusterDescriptorAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterDescriptorAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterDescriptorAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterDescriptorAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterDescriptorAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterDescriptorAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -524,7 +520,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBindingAttributeBindingID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, MTRAttributeIDTypeClusterBindingAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterBindingAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBindingAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBindingAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterBindingAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterBindingAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -571,7 +566,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterAccessControlAttributeARLID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, MTRAttributeIDTypeClusterAccessControlAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterAccessControlAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterAccessControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterAccessControlAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterAccessControlAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterAccessControlAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -608,7 +602,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterActionsAttributeSetupURLID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, MTRAttributeIDTypeClusterActionsAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterActionsAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterActionsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterActionsAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterActionsAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterActionsAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -716,7 +709,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBasicInformationAttributeMaxPathsPerInvokeID MTR_PROVISIONALLY_AVAILABLE = 0x00000016, MTRAttributeIDTypeClusterBasicInformationAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterBasicInformationAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBasicInformationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBasicInformationAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterBasicInformationAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterBasicInformationAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -741,7 +733,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster OTASoftwareUpdateProvider attributes MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -782,7 +773,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeUpdateStateProgressID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -815,7 +805,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterLocalizationConfigurationAttributeSupportedLocalesID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, MTRAttributeIDTypeClusterLocalizationConfigurationAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterLocalizationConfigurationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterLocalizationConfigurationAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterLocalizationConfigurationAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -852,7 +841,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeSupportedCalendarTypesID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -881,7 +869,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterUnitLocalizationAttributeTemperatureUnitID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, MTRAttributeIDTypeClusterUnitLocalizationAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterUnitLocalizationAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterUnitLocalizationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterUnitLocalizationAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterUnitLocalizationAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterUnitLocalizationAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -910,7 +897,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeSourcesID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -1060,7 +1046,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPowerSourceAttributeEndpointListID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x0000001F, MTRAttributeIDTypeClusterPowerSourceAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterPowerSourceAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPowerSourceAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterPowerSourceAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterPowerSourceAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterPowerSourceAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -1107,9 +1092,9 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterGeneralCommissioningAttributeTCMinRequiredVersionID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, MTRAttributeIDTypeClusterGeneralCommissioningAttributeTCAcknowledgementsID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, MTRAttributeIDTypeClusterGeneralCommissioningAttributeTCAcknowledgementsRequiredID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, + MTRAttributeIDTypeClusterGeneralCommissioningAttributeTCUpdateDeadlineID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, MTRAttributeIDTypeClusterGeneralCommissioningAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterGeneralCommissioningAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterGeneralCommissioningAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterGeneralCommissioningAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterGeneralCommissioningAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterGeneralCommissioningAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -1169,7 +1154,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterNetworkCommissioningAttributeThreadVersionID MTR_PROVISIONALLY_AVAILABLE = 0x0000000A, MTRAttributeIDTypeClusterNetworkCommissioningAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterNetworkCommissioningAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterNetworkCommissioningAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterNetworkCommissioningAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterNetworkCommissioningAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterNetworkCommissioningAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -1194,7 +1178,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster DiagnosticLogs attributes MTRAttributeIDTypeClusterDiagnosticLogsAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterDiagnosticLogsAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterDiagnosticLogsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterDiagnosticLogsAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterDiagnosticLogsAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterDiagnosticLogsAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -1255,7 +1238,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeTestEventTriggersEnabledID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000008, MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -1296,7 +1278,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeCurrentHeapHighWatermarkID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -1573,7 +1554,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeActiveNetworkFaultsListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000003E, MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -1650,7 +1630,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeOverrunCountID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000C, MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -1711,7 +1690,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeTimeSinceResetID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000008, MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -1783,7 +1761,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTimeSynchronizationAttributeSupportsDNSResolveID MTR_PROVISIONALLY_AVAILABLE = 0x0000000C, MTRAttributeIDTypeClusterTimeSynchronizationAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterTimeSynchronizationAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTimeSynchronizationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterTimeSynchronizationAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterTimeSynchronizationAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterTimeSynchronizationAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -1870,7 +1847,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductAppearanceID MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00000014, MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -1907,7 +1883,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterSwitchAttributeMultiPressMaxID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, MTRAttributeIDTypeClusterSwitchAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterSwitchAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterSwitchAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterSwitchAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterSwitchAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterSwitchAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -1944,7 +1919,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAdminVendorIdID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, MTRAttributeIDTypeClusterAdministratorCommissioningAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterAdministratorCommissioningAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterAdministratorCommissioningAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterAdministratorCommissioningAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -1993,7 +1967,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterOperationalCredentialsAttributeCurrentFabricIndexID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000005, MTRAttributeIDTypeClusterOperationalCredentialsAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterOperationalCredentialsAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOperationalCredentialsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOperationalCredentialsAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterOperationalCredentialsAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterOperationalCredentialsAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2034,7 +2007,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterGroupKeyManagementAttributeMaxGroupKeysPerFabricID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, MTRAttributeIDTypeClusterGroupKeyManagementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterGroupKeyManagementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterGroupKeyManagementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterGroupKeyManagementAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterGroupKeyManagementAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterGroupKeyManagementAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2063,7 +2035,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterFixedLabelAttributeLabelListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, MTRAttributeIDTypeClusterFixedLabelAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterFixedLabelAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterFixedLabelAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterFixedLabelAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterFixedLabelAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterFixedLabelAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2092,7 +2063,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterUserLabelAttributeLabelListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, MTRAttributeIDTypeClusterUserLabelAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterUserLabelAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterUserLabelAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterUserLabelAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterUserLabelAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterUserLabelAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2121,7 +2091,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBooleanStateAttributeStateValueID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, MTRAttributeIDTypeClusterBooleanStateAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterBooleanStateAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBooleanStateAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBooleanStateAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterBooleanStateAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterBooleanStateAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2139,7 +2108,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterICDManagementAttributeMaximumCheckInBackOffID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, MTRAttributeIDTypeClusterICDManagementAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterICDManagementAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterICDManagementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterICDManagementAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterICDManagementAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterICDManagementAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2150,7 +2118,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTimerAttributeTimerStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, MTRAttributeIDTypeClusterTimerAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterTimerAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTimerAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterTimerAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterTimerAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterTimerAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2164,7 +2131,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeOperationalErrorID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2176,7 +2142,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterOvenModeAttributeOnModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterOvenModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterOvenModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOvenModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOvenModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterOvenModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterOvenModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2186,7 +2151,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterLaundryDryerControlsAttributeSelectedDrynessLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRAttributeIDTypeClusterLaundryDryerControlsAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterLaundryDryerControlsAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterLaundryDryerControlsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterLaundryDryerControlsAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterLaundryDryerControlsAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterLaundryDryerControlsAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2235,7 +2199,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterModeSelectAttributeOnModeID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000005, MTRAttributeIDTypeClusterModeSelectAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterModeSelectAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterModeSelectAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterModeSelectAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterModeSelectAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterModeSelectAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2247,7 +2210,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterLaundryWasherModeAttributeOnModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterLaundryWasherModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterLaundryWasherModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterLaundryWasherModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterLaundryWasherModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterLaundryWasherModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterLaundryWasherModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2259,7 +2221,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeOnModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2271,7 +2232,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterLaundryWasherControlsAttributeSupportedRinsesID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterLaundryWasherControlsAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterLaundryWasherControlsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterLaundryWasherControlsAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterLaundryWasherControlsAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2281,7 +2241,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterRVCRunModeAttributeCurrentModeID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000001, MTRAttributeIDTypeClusterRVCRunModeAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterRVCRunModeAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterRVCRunModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterRVCRunModeAttributeAttributeListID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterRVCRunModeAttributeFeatureMapID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterRVCRunModeAttributeClusterRevisionID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2291,7 +2250,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterRVCCleanModeAttributeCurrentModeID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000001, MTRAttributeIDTypeClusterRVCCleanModeAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterRVCCleanModeAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterRVCCleanModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterRVCCleanModeAttributeAttributeListID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterRVCCleanModeAttributeFeatureMapID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterRVCCleanModeAttributeClusterRevisionID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2305,7 +2263,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTemperatureControlAttributeSupportedTemperatureLevelsID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, MTRAttributeIDTypeClusterTemperatureControlAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterTemperatureControlAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTemperatureControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterTemperatureControlAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterTemperatureControlAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterTemperatureControlAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2316,7 +2273,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeSupportedID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2328,7 +2284,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterDishwasherModeAttributeOnModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterDishwasherModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterDishwasherModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterDishwasherModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterDishwasherModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterDishwasherModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterDishwasherModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2337,7 +2292,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterAirQualityAttributeAirQualityID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00000000, MTRAttributeIDTypeClusterAirQualityAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterAirQualityAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterAirQualityAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterAirQualityAttributeAttributeListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterAirQualityAttributeFeatureMapID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterAirQualityAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2358,7 +2312,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterSmokeCOAlarmAttributeExpiryDateID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000000C, MTRAttributeIDTypeClusterSmokeCOAlarmAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAttributeListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterSmokeCOAlarmAttributeFeatureMapID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterSmokeCOAlarmAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2370,7 +2323,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterDishwasherAlarmAttributeSupportedID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterDishwasherAlarmAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterDishwasherAlarmAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterDishwasherAlarmAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterDishwasherAlarmAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterDishwasherAlarmAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterDishwasherAlarmAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2380,7 +2332,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeCurrentModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2397,7 +2348,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeWattRatingID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2411,7 +2361,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterOperationalStateAttributeOperationalErrorID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000005, MTRAttributeIDTypeClusterOperationalStateAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterOperationalStateAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOperationalStateAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOperationalStateAttributeAttributeListID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterOperationalStateAttributeFeatureMapID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterOperationalStateAttributeClusterRevisionID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2425,7 +2374,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalErrorID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00000005, MTRAttributeIDTypeClusterRVCOperationalStateAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterRVCOperationalStateAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterRVCOperationalStateAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterRVCOperationalStateAttributeAttributeListID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterRVCOperationalStateAttributeFeatureMapID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterRVCOperationalStateAttributeClusterRevisionID MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2436,7 +2384,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterScenesManagementAttributeFabricSceneInfoID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, MTRAttributeIDTypeClusterScenesManagementAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterScenesManagementAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterScenesManagementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterScenesManagementAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterScenesManagementAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterScenesManagementAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2450,7 +2397,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeReplacementProductListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00000005, MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeAttributeListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeFeatureMapID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2464,7 +2410,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeReplacementProductListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00000005, MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeAttributeListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeFeatureMapID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2480,7 +2425,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeSensorFaultID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00000007, MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAttributeListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeFeatureMapID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2499,7 +2443,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeLevelStepID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000000A, MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAttributeListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeFeatureMapID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2526,7 +2469,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterElectricalPowerMeasurementAttributeNeutralCurrentID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00000012, MTRAttributeIDTypeClusterElectricalPowerMeasurementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterElectricalPowerMeasurementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterElectricalPowerMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterElectricalPowerMeasurementAttributeAttributeListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterElectricalPowerMeasurementAttributeFeatureMapID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterElectricalPowerMeasurementAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2540,7 +2482,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeCumulativeEnergyResetID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00000005, MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeAttributeListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeFeatureMapID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2554,7 +2495,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterWaterHeaterManagementAttributeBoostStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, MTRAttributeIDTypeClusterWaterHeaterManagementAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterWaterHeaterManagementAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterWaterHeaterManagementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterWaterHeaterManagementAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterWaterHeaterManagementAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterWaterHeaterManagementAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2570,7 +2510,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeDefaultRandomDurationID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2580,7 +2519,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterMessagesAttributeActiveMessageIDsID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRAttributeIDTypeClusterMessagesAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterMessagesAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterMessagesAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterMessagesAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterMessagesAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterMessagesAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2596,7 +2534,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeOptOutStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2627,7 +2564,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterEnergyEVSEAttributeSessionEnergyDischargedID MTR_PROVISIONALLY_AVAILABLE = 0x00000043, MTRAttributeIDTypeClusterEnergyEVSEAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterEnergyEVSEAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterEnergyEVSEAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterEnergyEVSEAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterEnergyEVSEAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterEnergyEVSEAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2640,7 +2576,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterEnergyPreferenceAttributeCurrentLowPowerModeSensitivityID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, MTRAttributeIDTypeClusterEnergyPreferenceAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterEnergyPreferenceAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterEnergyPreferenceAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterEnergyPreferenceAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterEnergyPreferenceAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterEnergyPreferenceAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2650,7 +2585,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPowerTopologyAttributeActiveEndpointsID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRAttributeIDTypeClusterPowerTopologyAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterPowerTopologyAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPowerTopologyAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterPowerTopologyAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterPowerTopologyAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterPowerTopologyAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2658,11 +2592,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster EnergyEVSEMode attributes MTRAttributeIDTypeClusterEnergyEVSEModeAttributeSupportedModesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTRAttributeIDTypeClusterEnergyEVSEModeAttributeCurrentModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterEnergyEVSEModeAttributeStartUpModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterEnergyEVSEModeAttributeOnModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterEnergyEVSEModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterEnergyEVSEModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterEnergyEVSEModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterEnergyEVSEModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterEnergyEVSEModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterEnergyEVSEModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2670,11 +2601,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster WaterHeaterMode attributes MTRAttributeIDTypeClusterWaterHeaterModeAttributeSupportedModesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTRAttributeIDTypeClusterWaterHeaterModeAttributeCurrentModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterWaterHeaterModeAttributeStartUpModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterWaterHeaterModeAttributeOnModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterWaterHeaterModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterWaterHeaterModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterWaterHeaterModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterWaterHeaterModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterWaterHeaterModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterWaterHeaterModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2682,11 +2610,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster DeviceEnergyManagementMode attributes MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeSupportedModesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeCurrentModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeStartUpModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeOnModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2864,7 +2789,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterDoorLockAttributeNumberOfAliroEndpointKeysSupportedID MTR_PROVISIONALLY_AVAILABLE = 0x00000088, MTRAttributeIDTypeClusterDoorLockAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterDoorLockAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterDoorLockAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterDoorLockAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterDoorLockAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterDoorLockAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2977,7 +2901,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterWindowCoveringAttributeSafetyStatusID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001A, MTRAttributeIDTypeClusterWindowCoveringAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterWindowCoveringAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterWindowCoveringAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterWindowCoveringAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterWindowCoveringAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterWindowCoveringAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -2991,7 +2914,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterServiceAreaAttributeProgressID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, MTRAttributeIDTypeClusterServiceAreaAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterServiceAreaAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterServiceAreaAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterServiceAreaAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterServiceAreaAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterServiceAreaAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -3108,7 +3030,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeControlModeID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000021, MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -3340,7 +3261,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterThermostatAttributeSetpointHoldExpiryTimestampID MTR_PROVISIONALLY_AVAILABLE = 0x00000052, MTRAttributeIDTypeClusterThermostatAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterThermostatAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterThermostatAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterThermostatAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterThermostatAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterThermostatAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -3410,7 +3330,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterFanControlAttributeAirflowDirectionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000000B, MTRAttributeIDTypeClusterFanControlAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterFanControlAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterFanControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterFanControlAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterFanControlAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterFanControlAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -3447,7 +3366,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeScheduleProgrammingVisibilityID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -3680,7 +3598,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterColorControlAttributeStartUpColorTemperatureMiredsID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004010, MTRAttributeIDTypeClusterColorControlAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterColorControlAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterColorControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterColorControlAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterColorControlAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterColorControlAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -3761,7 +3678,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBallastConfigurationAttributeLampBurnHoursTripPointID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000035, MTRAttributeIDTypeClusterBallastConfigurationAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterBallastConfigurationAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBallastConfigurationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBallastConfigurationAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterBallastConfigurationAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterBallastConfigurationAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -3806,7 +3722,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeLightSensorTypeID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000004, MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -3847,7 +3762,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTemperatureMeasurementAttributeToleranceID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, MTRAttributeIDTypeClusterTemperatureMeasurementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTemperatureMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterTemperatureMeasurementAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterTemperatureMeasurementAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -3908,7 +3822,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPressureMeasurementAttributeScaleID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000014, MTRAttributeIDTypeClusterPressureMeasurementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterPressureMeasurementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPressureMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterPressureMeasurementAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterPressureMeasurementAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterPressureMeasurementAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -3949,7 +3862,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterFlowMeasurementAttributeToleranceID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, MTRAttributeIDTypeClusterFlowMeasurementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterFlowMeasurementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterFlowMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterFlowMeasurementAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterFlowMeasurementAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterFlowMeasurementAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -3990,7 +3902,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeToleranceID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4065,7 +3976,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterOccupancySensingAttributePhysicalContactUnoccupiedToOccupiedThresholdID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000032, MTRAttributeIDTypeClusterOccupancySensingAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterOccupancySensingAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOccupancySensingAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOccupancySensingAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterOccupancySensingAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterOccupancySensingAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4084,7 +3994,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeLevelValueID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000000A, MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAttributeListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeFeatureMapID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4103,7 +4012,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeLevelValueID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000000A, MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAttributeListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeFeatureMapID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4122,7 +4030,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeLevelValueID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000000A, MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAttributeListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeFeatureMapID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4141,7 +4048,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeLevelValueID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000000A, MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAttributeListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeFeatureMapID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4160,7 +4066,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeLevelValueID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000000A, MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAttributeListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeFeatureMapID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4179,7 +4084,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeLevelValueID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000000A, MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAttributeListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeFeatureMapID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4198,7 +4102,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeLevelValueID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000000A, MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAttributeListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeFeatureMapID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4217,7 +4120,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeLevelValueID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000000A, MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAttributeListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeFeatureMapID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4236,7 +4138,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeLevelValueID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000000A, MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAttributeListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeFeatureMapID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4255,7 +4156,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeLevelValueID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0000000A, MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAttributeListID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeFeatureMapID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeClusterRevisionID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4265,7 +4165,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterWiFiNetworkManagementAttributePassphraseSurrogateID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRAttributeIDTypeClusterWiFiNetworkManagementAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterWiFiNetworkManagementAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterWiFiNetworkManagementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterWiFiNetworkManagementAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterWiFiNetworkManagementAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterWiFiNetworkManagementAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4279,7 +4178,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributePendingDatasetTimestampID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4290,7 +4188,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterThreadNetworkDirectoryAttributeThreadNetworkTableSizeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, MTRAttributeIDTypeClusterThreadNetworkDirectoryAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterThreadNetworkDirectoryAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterThreadNetworkDirectoryAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterThreadNetworkDirectoryAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterThreadNetworkDirectoryAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterThreadNetworkDirectoryAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4320,7 +4217,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterWakeOnLANAttributeLinkLocalAddressID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRAttributeIDTypeClusterWakeOnLANAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterWakeOnLANAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterWakeOnLANAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterWakeOnLANAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterWakeOnLANAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterWakeOnLANAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4357,7 +4253,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterChannelAttributeCurrentChannelID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, MTRAttributeIDTypeClusterChannelAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterChannelAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterChannelAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterChannelAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterChannelAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterChannelAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4390,7 +4285,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTargetNavigatorAttributeCurrentTargetID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, MTRAttributeIDTypeClusterTargetNavigatorAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterTargetNavigatorAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterTargetNavigatorAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterTargetNavigatorAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterTargetNavigatorAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterTargetNavigatorAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4447,7 +4341,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterMediaPlaybackAttributeAvailableTextTracksID MTR_PROVISIONALLY_AVAILABLE = 0x0000000A, MTRAttributeIDTypeClusterMediaPlaybackAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterMediaPlaybackAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterMediaPlaybackAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterMediaPlaybackAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterMediaPlaybackAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterMediaPlaybackAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4480,7 +4373,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterMediaInputAttributeCurrentInputID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, MTRAttributeIDTypeClusterMediaInputAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterMediaInputAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterMediaInputAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterMediaInputAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterMediaInputAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterMediaInputAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4505,7 +4397,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster LowPower attributes MTRAttributeIDTypeClusterLowPowerAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterLowPowerAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterLowPowerAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterLowPowerAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterLowPowerAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterLowPowerAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4530,7 +4421,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster KeypadInput attributes MTRAttributeIDTypeClusterKeypadInputAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterKeypadInputAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterKeypadInputAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterKeypadInputAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterKeypadInputAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterKeypadInputAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4563,7 +4453,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterContentLauncherAttributeSupportedStreamingProtocolsID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, MTRAttributeIDTypeClusterContentLauncherAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterContentLauncherAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterContentLauncherAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterContentLauncherAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterContentLauncherAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterContentLauncherAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4596,7 +4485,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterAudioOutputAttributeCurrentOutputID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, MTRAttributeIDTypeClusterAudioOutputAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterAudioOutputAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterAudioOutputAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterAudioOutputAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterAudioOutputAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterAudioOutputAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4629,7 +4517,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterApplicationLauncherAttributeCurrentAppID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, MTRAttributeIDTypeClusterApplicationLauncherAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterApplicationLauncherAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterApplicationLauncherAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterApplicationLauncherAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterApplicationLauncherAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterApplicationLauncherAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4686,7 +4573,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterApplicationBasicAttributeAllowedVendorListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000007, MTRAttributeIDTypeClusterApplicationBasicAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterApplicationBasicAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterApplicationBasicAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterApplicationBasicAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterApplicationBasicAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterApplicationBasicAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4711,7 +4597,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster AccountLogin attributes MTRAttributeIDTypeClusterAccountLoginAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterAccountLoginAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterAccountLoginAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterAccountLoginAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterAccountLoginAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterAccountLoginAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4727,7 +4612,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterContentControlAttributeBlockUnratedID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, MTRAttributeIDTypeClusterContentControlAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterContentControlAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterContentControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterContentControlAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterContentControlAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterContentControlAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4735,27 +4619,97 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster ContentAppObserver attributes MTRAttributeIDTypeClusterContentAppObserverAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterContentAppObserverAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterContentAppObserverAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterContentAppObserverAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterContentAppObserverAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterContentAppObserverAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster ZoneManagement attributes + MTRAttributeIDTypeClusterZoneManagementAttributeSupportedZoneSourcesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterZoneManagementAttributeZonesID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterZoneManagementAttributeTimeControlID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterZoneManagementAttributeSensitivityID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterZoneManagementAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterZoneManagementAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterZoneManagementAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterZoneManagementAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterZoneManagementAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + + // Cluster CameraAVStreamManagement attributes + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMaxConcurrentVideoEncodersID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMaxEncodedPixelRateID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeVideoSensorParamsID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeNightVisionCapableID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMinViewportID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeRateDistortionTradeOffPointsID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMaxContentBufferSizeID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneCapabilitiesID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerCapabilitiesID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeTwoWayTalkSupportID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSupportedSnapshotParamsID MTR_PROVISIONALLY_AVAILABLE = 0x0000000A, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMaxNetworkBandwidthID MTR_PROVISIONALLY_AVAILABLE = 0x0000000B, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeCurrentFrameRateID MTR_PROVISIONALLY_AVAILABLE = 0x0000000C, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeHDRModeEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x0000000D, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeCurrentVideoCodecsID MTR_PROVISIONALLY_AVAILABLE = 0x0000000E, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeCurrentSnapshotConfigID MTR_PROVISIONALLY_AVAILABLE = 0x0000000F, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeFabricsUsingCameraID MTR_PROVISIONALLY_AVAILABLE = 0x00000010, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAllocatedVideoStreamsID MTR_PROVISIONALLY_AVAILABLE = 0x00000011, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAllocatedAudioStreamsID MTR_PROVISIONALLY_AVAILABLE = 0x00000012, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAllocatedSnapshotStreamsID MTR_PROVISIONALLY_AVAILABLE = 0x00000013, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeRankedVideoStreamPrioritiesListID MTR_PROVISIONALLY_AVAILABLE = 0x00000014, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSoftRecordingPrivacyModeEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x00000015, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSoftLivestreamPrivacyModeEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x00000016, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeHardPrivacyModeOnID MTR_PROVISIONALLY_AVAILABLE = 0x00000017, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeNightVisionID MTR_PROVISIONALLY_AVAILABLE = 0x00000018, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeNightVisionIllumID MTR_PROVISIONALLY_AVAILABLE = 0x00000019, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAWBEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x0000001A, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAutoShutterSpeedEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x0000001B, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAutoISOEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x0000001C, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeViewportID MTR_PROVISIONALLY_AVAILABLE = 0x0000001D, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerMutedID MTR_PROVISIONALLY_AVAILABLE = 0x0000001E, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerVolumeLevelID MTR_PROVISIONALLY_AVAILABLE = 0x0000001F, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerMaxLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000020, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerMinLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000021, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneMutedID MTR_PROVISIONALLY_AVAILABLE = 0x00000022, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneVolumeLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000023, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneMaxLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000024, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneMinLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000025, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneAGCEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x00000026, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeImageRotationID MTR_PROVISIONALLY_AVAILABLE = 0x00000027, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeImageFlipHorizontalID MTR_PROVISIONALLY_AVAILABLE = 0x00000028, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeImageFlipVerticalID MTR_PROVISIONALLY_AVAILABLE = 0x00000029, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeLocalVideoRecordingEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x0000002A, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeLocalSnapshotRecordingEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x0000002B, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeStatusLightEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x0000002C, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeStatusLightBrightnessID MTR_PROVISIONALLY_AVAILABLE = 0x0000002D, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeDepthSensorStatusID MTR_PROVISIONALLY_AVAILABLE = 0x0000002E, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster WebRTCTransportProvider attributes MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeCurrentSessionsID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster WebRTCTransportRequestor attributes + MTRAttributeIDTypeClusterWebRTCTransportRequestorAttributeCurrentSessionsID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterWebRTCTransportRequestorAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterWebRTCTransportRequestorAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterWebRTCTransportRequestorAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterWebRTCTransportRequestorAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterWebRTCTransportRequestorAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster Chime attributes MTRAttributeIDTypeClusterChimeAttributeInstalledChimeSoundsID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTRAttributeIDTypeClusterChimeAttributeActiveChimeIDID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRAttributeIDTypeClusterChimeAttributeEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, MTRAttributeIDTypeClusterChimeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterChimeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterChimeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterChimeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterChimeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterChimeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4765,7 +4719,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterEcosystemInformationAttributeLocationDirectoryID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRAttributeIDTypeClusterEcosystemInformationAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterEcosystemInformationAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterEcosystemInformationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterEcosystemInformationAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterEcosystemInformationAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterEcosystemInformationAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -4774,7 +4727,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterCommissionerControlAttributeSupportedDeviceCategoriesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTRAttributeIDTypeClusterCommissionerControlAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterCommissionerControlAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterCommissionerControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterCommissionerControlAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterCommissionerControlAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterCommissionerControlAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -5133,7 +5085,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterUnitTestingAttributeNullableGlobalStructID MTR_PROVISIONALLY_AVAILABLE = 0x00004034, MTRAttributeIDTypeClusterUnitTestingAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterUnitTestingAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterUnitTestingAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterUnitTestingAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterUnitTestingAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterUnitTestingAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -5143,7 +5094,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterSampleMEIAttributeFlipFlopID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTRAttributeIDTypeClusterSampleMEIAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterSampleMEIAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterSampleMEIAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterSampleMEIAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterSampleMEIAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterSampleMEIAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, @@ -6953,6 +6903,33 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterContentAppObserverCommandContentAppMessageID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTRCommandIDTypeClusterContentAppObserverCommandContentAppMessageResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + // Cluster ZoneManagement commands + MTRCommandIDTypeClusterZoneManagementCommandCreateTwoDCartesianZoneID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterZoneManagementCommandCreateTwoDCartesianZoneResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterZoneManagementCommandUpdateTwoDCartesianZoneID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRCommandIDTypeClusterZoneManagementCommandGetTwoDCartesianZoneID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRCommandIDTypeClusterZoneManagementCommandGetTwoDCartesianZoneResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRCommandIDTypeClusterZoneManagementCommandRemoveZoneID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + + // Cluster CameraAVStreamManagement commands + MTRCommandIDTypeClusterCameraAVStreamManagementCommandAudioStreamAllocateID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterCameraAVStreamManagementCommandAudioStreamAllocateResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterCameraAVStreamManagementCommandAudioStreamDeallocateID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRCommandIDTypeClusterCameraAVStreamManagementCommandVideoStreamAllocateID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRCommandIDTypeClusterCameraAVStreamManagementCommandVideoStreamAllocateResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRCommandIDTypeClusterCameraAVStreamManagementCommandVideoStreamModifyID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRCommandIDTypeClusterCameraAVStreamManagementCommandVideoStreamDeallocateID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRCommandIDTypeClusterCameraAVStreamManagementCommandSnapshotStreamAllocateID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, + MTRCommandIDTypeClusterCameraAVStreamManagementCommandSnapshotStreamAllocateResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, + MTRCommandIDTypeClusterCameraAVStreamManagementCommandSnapshotStreamDeallocateID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, + MTRCommandIDTypeClusterCameraAVStreamManagementCommandSetStreamPrioritiesID MTR_PROVISIONALLY_AVAILABLE = 0x0000000A, + MTRCommandIDTypeClusterCameraAVStreamManagementCommandCaptureSnapshotID MTR_PROVISIONALLY_AVAILABLE = 0x0000000B, + MTRCommandIDTypeClusterCameraAVStreamManagementCommandCaptureSnapshotResponseID MTR_PROVISIONALLY_AVAILABLE = 0x0000000C, + MTRCommandIDTypeClusterCameraAVStreamManagementCommandSetViewportID MTR_PROVISIONALLY_AVAILABLE = 0x0000000D, + MTRCommandIDTypeClusterCameraAVStreamManagementCommandSetImageRotationID MTR_PROVISIONALLY_AVAILABLE = 0x0000000E, + MTRCommandIDTypeClusterCameraAVStreamManagementCommandSetImageFlipHorizontalID MTR_PROVISIONALLY_AVAILABLE = 0x0000000F, + MTRCommandIDTypeClusterCameraAVStreamManagementCommandSetImageFlipVerticalID MTR_PROVISIONALLY_AVAILABLE = 0x00000010, + // Cluster WebRTCTransportProvider commands MTRCommandIDTypeClusterWebRTCTransportProviderCommandSolicitOfferID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRCommandIDTypeClusterWebRTCTransportProviderCommandSolicitOfferResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, @@ -6962,6 +6939,12 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterWebRTCTransportProviderCommandProvideICECandidateID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, MTRCommandIDTypeClusterWebRTCTransportProviderCommandEndSessionID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, + // Cluster WebRTCTransportRequestor commands + MTRCommandIDTypeClusterWebRTCTransportRequestorCommandOfferID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterWebRTCTransportRequestorCommandAnswerID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRCommandIDTypeClusterWebRTCTransportRequestorCommandICECandidateID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRCommandIDTypeClusterWebRTCTransportRequestorCommandEndID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + // Cluster Chime commands MTRCommandIDTypeClusterChimeCommandPlayChimeSoundID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -7546,6 +7529,15 @@ typedef NS_ENUM(uint32_t, MTREventIDType) { // Cluster ContentControl events MTREventIDTypeClusterContentControlEventRemainingScreenTimeExpiredID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + // Cluster ZoneManagement events + MTREventIDTypeClusterZoneManagementEventZoneTriggeredID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTREventIDTypeClusterZoneManagementEventZoneStoppedID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + + // Cluster CameraAVStreamManagement events + MTREventIDTypeClusterCameraAVStreamManagementEventVideoStreamChangedID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTREventIDTypeClusterCameraAVStreamManagementEventAudioStreamChangedID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTREventIDTypeClusterCameraAVStreamManagementEventSnapshotStreamChangedID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + // Cluster CommissionerControl events MTREventIDTypeClusterCommissionerControlEventCommissioningRequestResultID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -7566,3 +7558,78 @@ typedef NS_ENUM(uint32_t, MTREventIDType) { MTREventIDTypeClusterSampleMEIEventPingCountEventID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, }; + +#pragma mark - Device Type IDs + +typedef NS_ENUM(uint32_t, MTRDeviceTypeIDType) { + MTRDeviceTypeIDTypeDoorLockID MTR_NEWLY_AVAILABLE = 0x0000000A, + MTRDeviceTypeIDTypeDoorLockControllerID MTR_NEWLY_AVAILABLE = 0x0000000B, + MTRDeviceTypeIDTypeAggregatorID MTR_NEWLY_AVAILABLE = 0x0000000E, + MTRDeviceTypeIDTypeGenericSwitchID MTR_NEWLY_AVAILABLE = 0x0000000F, + MTRDeviceTypeIDTypePowerSourceID MTR_NEWLY_AVAILABLE = 0x00000011, + MTRDeviceTypeIDTypeOTARequestorID MTR_NEWLY_AVAILABLE = 0x00000012, + MTRDeviceTypeIDTypeBridgedNodeID MTR_NEWLY_AVAILABLE = 0x00000013, + MTRDeviceTypeIDTypeOTAProviderID MTR_NEWLY_AVAILABLE = 0x00000014, + MTRDeviceTypeIDTypeContactSensorID MTR_NEWLY_AVAILABLE = 0x00000015, + MTRDeviceTypeIDTypeRootNodeID MTR_NEWLY_AVAILABLE = 0x00000016, + MTRDeviceTypeIDTypeSolarPowerID MTR_PROVISIONALLY_AVAILABLE = 0x00000017, + MTRDeviceTypeIDTypeBatteryStorageID MTR_PROVISIONALLY_AVAILABLE = 0x00000018, + MTRDeviceTypeIDTypeSecondaryNetworkInterfaceID MTR_NEWLY_AVAILABLE = 0x00000019, + MTRDeviceTypeIDTypeSpeakerID MTR_NEWLY_AVAILABLE = 0x00000022, + MTRDeviceTypeIDTypeCastingVideoPlayerID MTR_NEWLY_AVAILABLE = 0x00000023, + MTRDeviceTypeIDTypeContentAppID MTR_NEWLY_AVAILABLE = 0x00000024, + MTRDeviceTypeIDTypeModeSelectID MTR_NEWLY_AVAILABLE = 0x00000027, + MTRDeviceTypeIDTypeBasicVideoPlayerID MTR_NEWLY_AVAILABLE = 0x00000028, + MTRDeviceTypeIDTypeCastingVideoClientID MTR_NEWLY_AVAILABLE = 0x00000029, + MTRDeviceTypeIDTypeVideoRemoteControlID MTR_NEWLY_AVAILABLE = 0x0000002A, + MTRDeviceTypeIDTypeFanID MTR_NEWLY_AVAILABLE = 0x0000002B, + MTRDeviceTypeIDTypeAirQualitySensorID MTR_NEWLY_AVAILABLE = 0x0000002C, + MTRDeviceTypeIDTypeAirPurifierID MTR_NEWLY_AVAILABLE = 0x0000002D, + MTRDeviceTypeIDTypeWaterFreezeDetectorID MTR_NEWLY_AVAILABLE = 0x00000041, + MTRDeviceTypeIDTypeWaterValveID MTR_NEWLY_AVAILABLE = 0x00000042, + MTRDeviceTypeIDTypeWaterLeakDetectorID MTR_NEWLY_AVAILABLE = 0x00000043, + MTRDeviceTypeIDTypeRainSensorID MTR_NEWLY_AVAILABLE = 0x00000044, + MTRDeviceTypeIDTypeRefrigeratorID MTR_NEWLY_AVAILABLE = 0x00000070, + MTRDeviceTypeIDTypeTemperatureControlledCabinetID MTR_NEWLY_AVAILABLE = 0x00000071, + MTRDeviceTypeIDTypeRoomAirConditionerID MTR_NEWLY_AVAILABLE = 0x00000072, + MTRDeviceTypeIDTypeLaundryWasherID MTR_NEWLY_AVAILABLE = 0x00000073, + MTRDeviceTypeIDTypeRoboticVacuumCleanerID MTR_NEWLY_AVAILABLE = 0x00000074, + MTRDeviceTypeIDTypeDishwasherID MTR_NEWLY_AVAILABLE = 0x00000075, + MTRDeviceTypeIDTypeSmokeCOAlarmID MTR_NEWLY_AVAILABLE = 0x00000076, + MTRDeviceTypeIDTypeCookSurfaceID MTR_NEWLY_AVAILABLE = 0x00000077, + MTRDeviceTypeIDTypeCooktopID MTR_NEWLY_AVAILABLE = 0x00000078, + MTRDeviceTypeIDTypeMicrowaveOvenID MTR_NEWLY_AVAILABLE = 0x00000079, + MTRDeviceTypeIDTypeExtractorHoodID MTR_NEWLY_AVAILABLE = 0x0000007A, + MTRDeviceTypeIDTypeOvenID MTR_NEWLY_AVAILABLE = 0x0000007B, + MTRDeviceTypeIDTypeLaundryDryerID MTR_NEWLY_AVAILABLE = 0x0000007C, + MTRDeviceTypeIDTypeNetworkInfrastructureManagerID MTR_NEWLY_AVAILABLE = 0x00000090, + MTRDeviceTypeIDTypeThreadBorderRouterID MTR_NEWLY_AVAILABLE = 0x00000091, + MTRDeviceTypeIDTypeOnOffLightID MTR_NEWLY_AVAILABLE = 0x00000100, + MTRDeviceTypeIDTypeDimmableLightID MTR_NEWLY_AVAILABLE = 0x00000101, + MTRDeviceTypeIDTypeOnOffLightSwitchID MTR_NEWLY_AVAILABLE = 0x00000103, + MTRDeviceTypeIDTypeDimmerSwitchID MTR_NEWLY_AVAILABLE = 0x00000104, + MTRDeviceTypeIDTypeColorDimmerSwitchID MTR_NEWLY_AVAILABLE = 0x00000105, + MTRDeviceTypeIDTypeLightSensorID MTR_NEWLY_AVAILABLE = 0x00000106, + MTRDeviceTypeIDTypeOccupancySensorID MTR_NEWLY_AVAILABLE = 0x00000107, + MTRDeviceTypeIDTypeOnOffPlugInUnitID MTR_NEWLY_AVAILABLE = 0x0000010A, + MTRDeviceTypeIDTypeDimmablePlugInUnitID MTR_NEWLY_AVAILABLE = 0x0000010B, + MTRDeviceTypeIDTypeColorTemperatureLightID MTR_NEWLY_AVAILABLE = 0x0000010C, + MTRDeviceTypeIDTypeExtendedColorLightID MTR_NEWLY_AVAILABLE = 0x0000010D, + MTRDeviceTypeIDTypeWindowCoveringID MTR_NEWLY_AVAILABLE = 0x00000202, + MTRDeviceTypeIDTypeWindowCoveringControllerID MTR_NEWLY_AVAILABLE = 0x00000203, + MTRDeviceTypeIDTypeHeatingCoolingUnitID MTR_NEWLY_AVAILABLE = 0x00000300, + MTRDeviceTypeIDTypeThermostatID MTR_NEWLY_AVAILABLE = 0x00000301, + MTRDeviceTypeIDTypeTemperatureSensorID MTR_NEWLY_AVAILABLE = 0x00000302, + MTRDeviceTypeIDTypePumpID MTR_NEWLY_AVAILABLE = 0x00000303, + MTRDeviceTypeIDTypePumpControllerID MTR_NEWLY_AVAILABLE = 0x00000304, + MTRDeviceTypeIDTypePressureSensorID MTR_NEWLY_AVAILABLE = 0x00000305, + MTRDeviceTypeIDTypeFlowSensorID MTR_NEWLY_AVAILABLE = 0x00000306, + MTRDeviceTypeIDTypeHumiditySensorID MTR_NEWLY_AVAILABLE = 0x00000307, + MTRDeviceTypeIDTypeHeatPumpID MTR_PROVISIONALLY_AVAILABLE = 0x00000309, + MTRDeviceTypeIDTypeEVSEID MTR_NEWLY_AVAILABLE = 0x0000050C, + MTRDeviceTypeIDTypeDeviceEnergyManagementID MTR_NEWLY_AVAILABLE = 0x0000050D, + MTRDeviceTypeIDTypeWaterHeaterID MTR_PROVISIONALLY_AVAILABLE = 0x0000050F, + MTRDeviceTypeIDTypeElectricalSensorID MTR_NEWLY_AVAILABLE = 0x00000510, + MTRDeviceTypeIDTypeControlBridgeID MTR_NEWLY_AVAILABLE = 0x00000840, + MTRDeviceTypeIDTypeOnOffSensorID MTR_NEWLY_AVAILABLE = 0x00000850, +} MTR_NEWLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm index 46791f9c12..ef41bc6487 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm @@ -369,9 +369,18 @@ case MTRClusterIDTypeContentAppObserverID: result = @"ContentAppObserver"; break; + case MTRClusterIDTypeZoneManagementID: + result = @"ZoneManagement"; + break; + case MTRClusterIDTypeCameraAVStreamManagementID: + result = @"CameraAVStreamManagement"; + break; case MTRClusterIDTypeWebRTCTransportProviderID: result = @"WebRTCTransportProvider"; break; + case MTRClusterIDTypeWebRTCTransportRequestorID: + result = @"WebRTCTransportRequestor"; + break; case MTRClusterIDTypeChimeID: result = @"Chime"; break; @@ -389,7 +398,7 @@ break; default: - result = [NSString stringWithFormat:@"", clusterID]; + result = [NSString stringWithFormat:@"", clusterID]; break; } @@ -425,10 +434,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterIdentifyAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterIdentifyAttributeAttributeListID: result = @"AttributeList"; break; @@ -442,7 +447,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -464,10 +469,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterGroupsAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterGroupsAttributeAttributeListID: result = @"AttributeList"; break; @@ -481,7 +482,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -519,10 +520,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterOnOffAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterOnOffAttributeAttributeListID: result = @"AttributeList"; break; @@ -536,7 +533,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -610,10 +607,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterLevelControlAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterLevelControlAttributeAttributeListID: result = @"AttributeList"; break; @@ -627,7 +620,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -645,10 +638,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterPulseWidthModulationAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterPulseWidthModulationAttributeAttributeListID: result = @"AttributeList"; break; @@ -662,7 +651,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -700,10 +689,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterDescriptorAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterDescriptorAttributeAttributeListID: result = @"AttributeList"; break; @@ -717,7 +702,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -739,10 +724,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterBindingAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterBindingAttributeAttributeListID: result = @"AttributeList"; break; @@ -756,7 +737,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -802,10 +783,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterAccessControlAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterAccessControlAttributeAttributeListID: result = @"AttributeList"; break; @@ -819,7 +796,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -849,10 +826,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterActionsAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterActionsAttributeAttributeListID: result = @"AttributeList"; break; @@ -866,7 +839,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -976,10 +949,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterBasicInformationAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterBasicInformationAttributeAttributeListID: result = @"AttributeList"; break; @@ -993,7 +962,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -1011,10 +980,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAttributeListID: result = @"AttributeList"; break; @@ -1028,7 +993,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -1062,10 +1027,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAttributeListID: result = @"AttributeList"; break; @@ -1079,7 +1040,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -1105,10 +1066,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterLocalizationConfigurationAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAttributeListID: result = @"AttributeList"; break; @@ -1122,7 +1079,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -1152,10 +1109,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAttributeListID: result = @"AttributeList"; break; @@ -1169,7 +1122,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -1191,10 +1144,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterUnitLocalizationAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterUnitLocalizationAttributeAttributeListID: result = @"AttributeList"; break; @@ -1208,7 +1157,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -1230,10 +1179,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAttributeListID: result = @"AttributeList"; break; @@ -1247,7 +1192,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -1393,10 +1338,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterPowerSourceAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterPowerSourceAttributeAttributeListID: result = @"AttributeList"; break; @@ -1410,7 +1351,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -1456,6 +1397,10 @@ result = @"TCAcknowledgementsRequired"; break; + case MTRAttributeIDTypeClusterGeneralCommissioningAttributeTCUpdateDeadlineID: + result = @"TCUpdateDeadline"; + break; + case MTRAttributeIDTypeClusterGeneralCommissioningAttributeGeneratedCommandListID: result = @"GeneratedCommandList"; break; @@ -1464,10 +1409,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterGeneralCommissioningAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterGeneralCommissioningAttributeAttributeListID: result = @"AttributeList"; break; @@ -1481,7 +1422,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -1543,10 +1484,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterNetworkCommissioningAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterNetworkCommissioningAttributeAttributeListID: result = @"AttributeList"; break; @@ -1560,7 +1497,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -1578,10 +1515,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterDiagnosticLogsAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterDiagnosticLogsAttributeAttributeListID: result = @"AttributeList"; break; @@ -1595,7 +1528,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -1649,10 +1582,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAttributeListID: result = @"AttributeList"; break; @@ -1666,7 +1595,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -1700,10 +1629,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAttributeListID: result = @"AttributeList"; break; @@ -1717,7 +1642,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -1987,10 +1912,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAttributeListID: result = @"AttributeList"; break; @@ -2004,7 +1925,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -2074,10 +1995,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAttributeListID: result = @"AttributeList"; break; @@ -2091,7 +2008,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -2145,10 +2062,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAttributeListID: result = @"AttributeList"; break; @@ -2162,7 +2075,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -2232,10 +2145,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterTimeSynchronizationAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterTimeSynchronizationAttributeAttributeListID: result = @"AttributeList"; break; @@ -2249,7 +2158,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -2335,10 +2244,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAttributeListID: result = @"AttributeList"; break; @@ -2352,7 +2257,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -2382,10 +2287,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterSwitchAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterSwitchAttributeAttributeListID: result = @"AttributeList"; break; @@ -2399,7 +2300,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -2429,10 +2330,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterAdministratorCommissioningAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAttributeListID: result = @"AttributeList"; break; @@ -2446,7 +2343,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -2488,10 +2385,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterOperationalCredentialsAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterOperationalCredentialsAttributeAttributeListID: result = @"AttributeList"; break; @@ -2505,7 +2398,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -2539,10 +2432,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterGroupKeyManagementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterGroupKeyManagementAttributeAttributeListID: result = @"AttributeList"; break; @@ -2556,7 +2445,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -2578,10 +2467,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterFixedLabelAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterFixedLabelAttributeAttributeListID: result = @"AttributeList"; break; @@ -2595,7 +2480,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -2617,10 +2502,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterUserLabelAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterUserLabelAttributeAttributeListID: result = @"AttributeList"; break; @@ -2634,7 +2515,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -2656,10 +2537,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterBooleanStateAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterBooleanStateAttributeAttributeListID: result = @"AttributeList"; break; @@ -2673,7 +2550,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -2731,10 +2608,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterICDManagementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterICDManagementAttributeAttributeListID: result = @"AttributeList"; break; @@ -2748,7 +2621,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -2778,10 +2651,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterTimerAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterTimerAttributeAttributeListID: result = @"AttributeList"; break; @@ -2795,7 +2664,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -2837,10 +2706,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAttributeListID: result = @"AttributeList"; break; @@ -2854,7 +2719,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -2888,10 +2753,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterOvenModeAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterOvenModeAttributeAttributeListID: result = @"AttributeList"; break; @@ -2905,7 +2766,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -2931,10 +2792,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterLaundryDryerControlsAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterLaundryDryerControlsAttributeAttributeListID: result = @"AttributeList"; break; @@ -2948,7 +2805,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -2990,10 +2847,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterModeSelectAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterModeSelectAttributeAttributeListID: result = @"AttributeList"; break; @@ -3007,7 +2860,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -3041,10 +2894,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterLaundryWasherModeAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterLaundryWasherModeAttributeAttributeListID: result = @"AttributeList"; break; @@ -3058,7 +2907,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -3092,10 +2941,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAttributeListID: result = @"AttributeList"; break; @@ -3109,7 +2954,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -3143,10 +2988,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterLaundryWasherControlsAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAttributeListID: result = @"AttributeList"; break; @@ -3160,7 +3001,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -3186,10 +3027,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterRVCRunModeAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterRVCRunModeAttributeAttributeListID: result = @"AttributeList"; break; @@ -3203,7 +3040,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -3229,10 +3066,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterRVCCleanModeAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterRVCCleanModeAttributeAttributeListID: result = @"AttributeList"; break; @@ -3246,7 +3079,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -3288,10 +3121,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterTemperatureControlAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterTemperatureControlAttributeAttributeListID: result = @"AttributeList"; break; @@ -3305,7 +3134,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -3335,10 +3164,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAttributeListID: result = @"AttributeList"; break; @@ -3352,7 +3177,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -3386,10 +3211,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterDishwasherModeAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterDishwasherModeAttributeAttributeListID: result = @"AttributeList"; break; @@ -3403,7 +3224,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -3425,10 +3246,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterAirQualityAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterAirQualityAttributeAttributeListID: result = @"AttributeList"; break; @@ -3442,7 +3259,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -3512,10 +3329,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAttributeListID: result = @"AttributeList"; break; @@ -3529,7 +3342,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -3563,10 +3376,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterDishwasherAlarmAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterDishwasherAlarmAttributeAttributeListID: result = @"AttributeList"; break; @@ -3580,7 +3389,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -3606,10 +3415,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAttributeListID: result = @"AttributeList"; break; @@ -3623,7 +3428,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -3677,10 +3482,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAttributeListID: result = @"AttributeList"; break; @@ -3694,7 +3495,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -3736,10 +3537,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterOperationalStateAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterOperationalStateAttributeAttributeListID: result = @"AttributeList"; break; @@ -3753,7 +3550,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -3795,10 +3592,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterRVCOperationalStateAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterRVCOperationalStateAttributeAttributeListID: result = @"AttributeList"; break; @@ -3812,7 +3605,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -3842,10 +3635,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterScenesManagementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterScenesManagementAttributeAttributeListID: result = @"AttributeList"; break; @@ -3859,7 +3648,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -3901,10 +3690,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeAttributeListID: result = @"AttributeList"; break; @@ -3918,7 +3703,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -3960,10 +3745,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeAttributeListID: result = @"AttributeList"; break; @@ -3977,7 +3758,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -4027,10 +3808,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAttributeListID: result = @"AttributeList"; break; @@ -4044,7 +3821,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -4106,10 +3883,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAttributeListID: result = @"AttributeList"; break; @@ -4123,7 +3896,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -4217,10 +3990,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterElectricalPowerMeasurementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterElectricalPowerMeasurementAttributeAttributeListID: result = @"AttributeList"; break; @@ -4234,7 +4003,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -4276,10 +4045,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeAttributeListID: result = @"AttributeList"; break; @@ -4293,7 +4058,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -4335,10 +4100,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterWaterHeaterManagementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterWaterHeaterManagementAttributeAttributeListID: result = @"AttributeList"; break; @@ -4352,7 +4113,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -4402,10 +4163,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeAttributeListID: result = @"AttributeList"; break; @@ -4419,7 +4176,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -4445,10 +4202,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterMessagesAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterMessagesAttributeAttributeListID: result = @"AttributeList"; break; @@ -4462,7 +4215,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -4512,10 +4265,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAttributeListID: result = @"AttributeList"; break; @@ -4529,7 +4278,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -4639,10 +4388,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterEnergyEVSEAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterEnergyEVSEAttributeAttributeListID: result = @"AttributeList"; break; @@ -4656,7 +4401,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -4694,10 +4439,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterEnergyPreferenceAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterEnergyPreferenceAttributeAttributeListID: result = @"AttributeList"; break; @@ -4711,7 +4452,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -4737,10 +4478,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterPowerTopologyAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterPowerTopologyAttributeAttributeListID: result = @"AttributeList"; break; @@ -4754,7 +4491,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -4772,14 +4509,6 @@ result = @"CurrentMode"; break; - case MTRAttributeIDTypeClusterEnergyEVSEModeAttributeStartUpModeID: - result = @"StartUpMode"; - break; - - case MTRAttributeIDTypeClusterEnergyEVSEModeAttributeOnModeID: - result = @"OnMode"; - break; - case MTRAttributeIDTypeClusterEnergyEVSEModeAttributeGeneratedCommandListID: result = @"GeneratedCommandList"; break; @@ -4788,10 +4517,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterEnergyEVSEModeAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterEnergyEVSEModeAttributeAttributeListID: result = @"AttributeList"; break; @@ -4805,7 +4530,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -4823,14 +4548,6 @@ result = @"CurrentMode"; break; - case MTRAttributeIDTypeClusterWaterHeaterModeAttributeStartUpModeID: - result = @"StartUpMode"; - break; - - case MTRAttributeIDTypeClusterWaterHeaterModeAttributeOnModeID: - result = @"OnMode"; - break; - case MTRAttributeIDTypeClusterWaterHeaterModeAttributeGeneratedCommandListID: result = @"GeneratedCommandList"; break; @@ -4839,10 +4556,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterWaterHeaterModeAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterWaterHeaterModeAttributeAttributeListID: result = @"AttributeList"; break; @@ -4856,7 +4569,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -4874,14 +4587,6 @@ result = @"CurrentMode"; break; - case MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeStartUpModeID: - result = @"StartUpMode"; - break; - - case MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeOnModeID: - result = @"OnMode"; - break; - case MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeGeneratedCommandListID: result = @"GeneratedCommandList"; break; @@ -4890,10 +4595,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeAttributeListID: result = @"AttributeList"; break; @@ -4907,7 +4608,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -5105,10 +4806,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterDoorLockAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterDoorLockAttributeAttributeListID: result = @"AttributeList"; break; @@ -5122,7 +4819,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -5228,10 +4925,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterWindowCoveringAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterWindowCoveringAttributeAttributeListID: result = @"AttributeList"; break; @@ -5245,7 +4938,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -5287,10 +4980,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterServiceAreaAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterServiceAreaAttributeAttributeListID: result = @"AttributeList"; break; @@ -5304,7 +4993,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -5414,10 +5103,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAttributeListID: result = @"AttributeList"; break; @@ -5431,7 +5116,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -5689,10 +5374,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterThermostatAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterThermostatAttributeAttributeListID: result = @"AttributeList"; break; @@ -5706,7 +5387,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -5772,10 +5453,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterFanControlAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterFanControlAttributeAttributeListID: result = @"AttributeList"; break; @@ -5789,7 +5466,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -5819,10 +5496,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAttributeListID: result = @"AttributeList"; break; @@ -5836,7 +5509,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -6062,10 +5735,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterColorControlAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterColorControlAttributeAttributeListID: result = @"AttributeList"; break; @@ -6079,7 +5748,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -6153,10 +5822,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterBallastConfigurationAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterBallastConfigurationAttributeAttributeListID: result = @"AttributeList"; break; @@ -6170,7 +5835,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -6208,10 +5873,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAttributeListID: result = @"AttributeList"; break; @@ -6225,7 +5886,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -6259,10 +5920,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterTemperatureMeasurementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAttributeListID: result = @"AttributeList"; break; @@ -6276,7 +5933,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -6330,10 +5987,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterPressureMeasurementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterPressureMeasurementAttributeAttributeListID: result = @"AttributeList"; break; @@ -6347,7 +6000,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -6381,10 +6034,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterFlowMeasurementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterFlowMeasurementAttributeAttributeListID: result = @"AttributeList"; break; @@ -6398,7 +6047,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -6432,10 +6081,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAttributeListID: result = @"AttributeList"; break; @@ -6449,7 +6094,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -6523,10 +6168,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterOccupancySensingAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterOccupancySensingAttributeAttributeListID: result = @"AttributeList"; break; @@ -6540,7 +6181,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -6602,10 +6243,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAttributeListID: result = @"AttributeList"; break; @@ -6619,7 +6256,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -6681,10 +6318,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAttributeListID: result = @"AttributeList"; break; @@ -6698,7 +6331,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -6760,10 +6393,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAttributeListID: result = @"AttributeList"; break; @@ -6777,7 +6406,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -6839,10 +6468,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAttributeListID: result = @"AttributeList"; break; @@ -6856,7 +6481,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -6918,10 +6543,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAttributeListID: result = @"AttributeList"; break; @@ -6935,7 +6556,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -6997,10 +6618,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAttributeListID: result = @"AttributeList"; break; @@ -7014,7 +6631,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -7076,10 +6693,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAttributeListID: result = @"AttributeList"; break; @@ -7093,7 +6706,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -7155,10 +6768,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAttributeListID: result = @"AttributeList"; break; @@ -7172,7 +6781,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -7234,10 +6843,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAttributeListID: result = @"AttributeList"; break; @@ -7251,7 +6856,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -7313,10 +6918,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAttributeListID: result = @"AttributeList"; break; @@ -7330,7 +6931,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -7356,10 +6957,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterWiFiNetworkManagementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterWiFiNetworkManagementAttributeAttributeListID: result = @"AttributeList"; break; @@ -7373,7 +6970,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -7415,10 +7012,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeAttributeListID: result = @"AttributeList"; break; @@ -7432,7 +7025,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -7462,10 +7055,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterThreadNetworkDirectoryAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterThreadNetworkDirectoryAttributeAttributeListID: result = @"AttributeList"; break; @@ -7479,7 +7068,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -7505,10 +7094,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterWakeOnLANAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterWakeOnLANAttributeAttributeListID: result = @"AttributeList"; break; @@ -7522,7 +7107,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -7552,10 +7137,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterChannelAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterChannelAttributeAttributeListID: result = @"AttributeList"; break; @@ -7569,7 +7150,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -7595,10 +7176,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterTargetNavigatorAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterTargetNavigatorAttributeAttributeListID: result = @"AttributeList"; break; @@ -7612,7 +7189,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -7674,10 +7251,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterMediaPlaybackAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterMediaPlaybackAttributeAttributeListID: result = @"AttributeList"; break; @@ -7691,7 +7264,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -7717,10 +7290,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterMediaInputAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterMediaInputAttributeAttributeListID: result = @"AttributeList"; break; @@ -7734,7 +7303,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -7752,10 +7321,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterLowPowerAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterLowPowerAttributeAttributeListID: result = @"AttributeList"; break; @@ -7769,7 +7334,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -7787,10 +7352,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterKeypadInputAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterKeypadInputAttributeAttributeListID: result = @"AttributeList"; break; @@ -7804,7 +7365,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -7830,10 +7391,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterContentLauncherAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterContentLauncherAttributeAttributeListID: result = @"AttributeList"; break; @@ -7847,7 +7404,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -7873,10 +7430,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterAudioOutputAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterAudioOutputAttributeAttributeListID: result = @"AttributeList"; break; @@ -7890,7 +7443,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -7916,10 +7469,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterApplicationLauncherAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterApplicationLauncherAttributeAttributeListID: result = @"AttributeList"; break; @@ -7933,7 +7482,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -7983,10 +7532,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterApplicationBasicAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterApplicationBasicAttributeAttributeListID: result = @"AttributeList"; break; @@ -8000,7 +7545,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -8018,10 +7563,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterAccountLoginAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterAccountLoginAttributeAttributeListID: result = @"AttributeList"; break; @@ -8035,7 +7576,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -8085,10 +7626,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterContentControlAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterContentControlAttributeAttributeListID: result = @"AttributeList"; break; @@ -8102,7 +7639,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -8120,10 +7657,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterContentAppObserverAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterContentAppObserverAttributeAttributeListID: result = @"AttributeList"; break; @@ -8137,30 +7670,292 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; - case MTRClusterIDTypeWebRTCTransportProviderID: + case MTRClusterIDTypeZoneManagementID: switch (attributeID) { - // Cluster WebRTCTransportProvider attributes - case MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeCurrentSessionsID: - result = @"CurrentSessions"; + // Cluster ZoneManagement attributes + case MTRAttributeIDTypeClusterZoneManagementAttributeSupportedZoneSourcesID: + result = @"SupportedZoneSources"; break; - case MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeGeneratedCommandListID: + case MTRAttributeIDTypeClusterZoneManagementAttributeZonesID: + result = @"Zones"; + break; + + case MTRAttributeIDTypeClusterZoneManagementAttributeTimeControlID: + result = @"TimeControl"; + break; + + case MTRAttributeIDTypeClusterZoneManagementAttributeSensitivityID: + result = @"Sensitivity"; + break; + + case MTRAttributeIDTypeClusterZoneManagementAttributeGeneratedCommandListID: result = @"GeneratedCommandList"; break; - case MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeAcceptedCommandListID: + case MTRAttributeIDTypeClusterZoneManagementAttributeAcceptedCommandListID: result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeEventListID: - result = @"EventList"; + case MTRAttributeIDTypeClusterZoneManagementAttributeAttributeListID: + result = @"AttributeList"; + break; + + case MTRAttributeIDTypeClusterZoneManagementAttributeFeatureMapID: + result = @"FeatureMap"; + break; + + case MTRAttributeIDTypeClusterZoneManagementAttributeClusterRevisionID: + result = @"ClusterRevision"; + break; + + default: + result = [NSString stringWithFormat:@"", attributeID]; + break; + } + break; + + case MTRClusterIDTypeCameraAVStreamManagementID: + + switch (attributeID) { + + // Cluster CameraAVStreamManagement attributes + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMaxConcurrentVideoEncodersID: + result = @"MaxConcurrentVideoEncoders"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMaxEncodedPixelRateID: + result = @"MaxEncodedPixelRate"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeVideoSensorParamsID: + result = @"VideoSensorParams"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeNightVisionCapableID: + result = @"NightVisionCapable"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMinViewportID: + result = @"MinViewport"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeRateDistortionTradeOffPointsID: + result = @"RateDistortionTradeOffPoints"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMaxContentBufferSizeID: + result = @"MaxContentBufferSize"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneCapabilitiesID: + result = @"MicrophoneCapabilities"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerCapabilitiesID: + result = @"SpeakerCapabilities"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeTwoWayTalkSupportID: + result = @"TwoWayTalkSupport"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSupportedSnapshotParamsID: + result = @"SupportedSnapshotParams"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMaxNetworkBandwidthID: + result = @"MaxNetworkBandwidth"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeCurrentFrameRateID: + result = @"CurrentFrameRate"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeHDRModeEnabledID: + result = @"HDRModeEnabled"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeCurrentVideoCodecsID: + result = @"CurrentVideoCodecs"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeCurrentSnapshotConfigID: + result = @"CurrentSnapshotConfig"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeFabricsUsingCameraID: + result = @"FabricsUsingCamera"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAllocatedVideoStreamsID: + result = @"AllocatedVideoStreams"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAllocatedAudioStreamsID: + result = @"AllocatedAudioStreams"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAllocatedSnapshotStreamsID: + result = @"AllocatedSnapshotStreams"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeRankedVideoStreamPrioritiesListID: + result = @"RankedVideoStreamPrioritiesList"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSoftRecordingPrivacyModeEnabledID: + result = @"SoftRecordingPrivacyModeEnabled"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSoftLivestreamPrivacyModeEnabledID: + result = @"SoftLivestreamPrivacyModeEnabled"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeHardPrivacyModeOnID: + result = @"HardPrivacyModeOn"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeNightVisionID: + result = @"NightVision"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeNightVisionIllumID: + result = @"NightVisionIllum"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAWBEnabledID: + result = @"AWBEnabled"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAutoShutterSpeedEnabledID: + result = @"AutoShutterSpeedEnabled"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAutoISOEnabledID: + result = @"AutoISOEnabled"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeViewportID: + result = @"Viewport"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerMutedID: + result = @"SpeakerMuted"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerVolumeLevelID: + result = @"SpeakerVolumeLevel"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerMaxLevelID: + result = @"SpeakerMaxLevel"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerMinLevelID: + result = @"SpeakerMinLevel"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneMutedID: + result = @"MicrophoneMuted"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneVolumeLevelID: + result = @"MicrophoneVolumeLevel"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneMaxLevelID: + result = @"MicrophoneMaxLevel"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneMinLevelID: + result = @"MicrophoneMinLevel"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneAGCEnabledID: + result = @"MicrophoneAGCEnabled"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeImageRotationID: + result = @"ImageRotation"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeImageFlipHorizontalID: + result = @"ImageFlipHorizontal"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeImageFlipVerticalID: + result = @"ImageFlipVertical"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeLocalVideoRecordingEnabledID: + result = @"LocalVideoRecordingEnabled"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeLocalSnapshotRecordingEnabledID: + result = @"LocalSnapshotRecordingEnabled"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeStatusLightEnabledID: + result = @"StatusLightEnabled"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeStatusLightBrightnessID: + result = @"StatusLightBrightness"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeDepthSensorStatusID: + result = @"DepthSensorStatus"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeGeneratedCommandListID: + result = @"GeneratedCommandList"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAcceptedCommandListID: + result = @"AcceptedCommandList"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAttributeListID: + result = @"AttributeList"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeFeatureMapID: + result = @"FeatureMap"; + break; + + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeClusterRevisionID: + result = @"ClusterRevision"; + break; + + default: + result = [NSString stringWithFormat:@"", attributeID]; + break; + } + break; + + case MTRClusterIDTypeWebRTCTransportProviderID: + + switch (attributeID) { + + // Cluster WebRTCTransportProvider attributes + case MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeCurrentSessionsID: + result = @"CurrentSessions"; + break; + + case MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeGeneratedCommandListID: + result = @"GeneratedCommandList"; + break; + + case MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeAcceptedCommandListID: + result = @"AcceptedCommandList"; break; case MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeAttributeListID: @@ -8176,7 +7971,42 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; + break; + } + break; + + case MTRClusterIDTypeWebRTCTransportRequestorID: + + switch (attributeID) { + + // Cluster WebRTCTransportRequestor attributes + case MTRAttributeIDTypeClusterWebRTCTransportRequestorAttributeCurrentSessionsID: + result = @"CurrentSessions"; + break; + + case MTRAttributeIDTypeClusterWebRTCTransportRequestorAttributeGeneratedCommandListID: + result = @"GeneratedCommandList"; + break; + + case MTRAttributeIDTypeClusterWebRTCTransportRequestorAttributeAcceptedCommandListID: + result = @"AcceptedCommandList"; + break; + + case MTRAttributeIDTypeClusterWebRTCTransportRequestorAttributeAttributeListID: + result = @"AttributeList"; + break; + + case MTRAttributeIDTypeClusterWebRTCTransportRequestorAttributeFeatureMapID: + result = @"FeatureMap"; + break; + + case MTRAttributeIDTypeClusterWebRTCTransportRequestorAttributeClusterRevisionID: + result = @"ClusterRevision"; + break; + + default: + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -8206,10 +8036,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterChimeAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterChimeAttributeAttributeListID: result = @"AttributeList"; break; @@ -8223,7 +8049,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -8249,10 +8075,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterEcosystemInformationAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterEcosystemInformationAttributeAttributeListID: result = @"AttributeList"; break; @@ -8266,7 +8088,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -8288,10 +8110,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterCommissionerControlAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterCommissionerControlAttributeAttributeListID: result = @"AttributeList"; break; @@ -8305,7 +8123,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -8675,10 +8493,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterUnitTestingAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterUnitTestingAttributeAttributeListID: result = @"AttributeList"; break; @@ -8696,7 +8510,7 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; @@ -8718,10 +8532,6 @@ result = @"AcceptedCommandList"; break; - case MTRAttributeIDTypeClusterSampleMEIAttributeEventListID: - result = @"EventList"; - break; - case MTRAttributeIDTypeClusterSampleMEIAttributeAttributeListID: result = @"AttributeList"; break; @@ -8735,13 +8545,13 @@ break; default: - result = [NSString stringWithFormat:@"", attributeID]; + result = [NSString stringWithFormat:@"", attributeID]; break; } break; default: - result = [NSString stringWithFormat:@"", clusterID]; + result = [NSString stringWithFormat:@"", clusterID]; break; } @@ -8769,7 +8579,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -8803,7 +8613,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -8837,7 +8647,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -8883,7 +8693,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -8893,7 +8703,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -8903,7 +8713,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -8913,7 +8723,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -8927,7 +8737,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -8985,7 +8795,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -8995,7 +8805,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9017,7 +8827,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9031,7 +8841,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9041,7 +8851,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9051,7 +8861,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9061,7 +8871,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9071,7 +8881,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9081,7 +8891,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9107,7 +8917,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9145,7 +8955,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9159,7 +8969,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9181,7 +8991,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9195,7 +9005,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9209,7 +9019,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9223,7 +9033,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9237,7 +9047,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9267,7 +9077,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9281,7 +9091,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9291,7 +9101,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9313,7 +9123,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9355,7 +9165,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9381,7 +9191,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9391,7 +9201,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9401,7 +9211,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9411,7 +9221,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9433,7 +9243,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9459,7 +9269,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9485,7 +9295,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9499,7 +9309,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9509,7 +9319,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9523,7 +9333,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9537,7 +9347,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9551,7 +9361,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9561,7 +9371,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9575,7 +9385,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9589,7 +9399,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9603,7 +9413,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9613,7 +9423,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9627,7 +9437,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9637,7 +9447,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9651,7 +9461,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9669,7 +9479,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9679,7 +9489,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9697,7 +9507,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9723,7 +9533,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9745,7 +9555,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9787,7 +9597,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9801,7 +9611,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9815,7 +9625,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9833,7 +9643,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9851,7 +9661,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9861,7 +9671,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9871,7 +9681,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9889,7 +9699,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9919,7 +9729,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9937,7 +9747,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -9979,7 +9789,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10017,7 +9827,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10027,7 +9837,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10037,7 +9847,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10051,7 +9861,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10065,7 +9875,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10079,7 +9889,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10173,7 +9983,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10211,7 +10021,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10229,7 +10039,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10239,7 +10049,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10277,7 +10087,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10291,7 +10101,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10301,7 +10111,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10387,7 +10197,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10397,7 +10207,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10407,7 +10217,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10417,7 +10227,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10427,7 +10237,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10437,7 +10247,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10447,7 +10257,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10457,7 +10267,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10467,7 +10277,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10477,7 +10287,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10487,7 +10297,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10497,7 +10307,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10507,7 +10317,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10517,7 +10327,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10527,7 +10337,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10537,7 +10347,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10547,7 +10357,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10557,7 +10367,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10571,7 +10381,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10597,7 +10407,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10619,7 +10429,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10629,7 +10439,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10663,7 +10473,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10677,7 +10487,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10743,7 +10553,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10769,7 +10579,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10783,7 +10593,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10797,7 +10607,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10815,7 +10625,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10833,7 +10643,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10855,7 +10665,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10865,7 +10675,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10887,7 +10697,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10937,7 +10747,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10951,7 +10761,95 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; + break; + } + break; + + case MTRClusterIDTypeZoneManagementID: + + switch (commandID) { + + case MTRCommandIDTypeClusterZoneManagementCommandCreateTwoDCartesianZoneID: + result = @"CreateTwoDCartesianZone"; + break; + + case MTRCommandIDTypeClusterZoneManagementCommandUpdateTwoDCartesianZoneID: + result = @"UpdateTwoDCartesianZone"; + break; + + case MTRCommandIDTypeClusterZoneManagementCommandGetTwoDCartesianZoneID: + result = @"GetTwoDCartesianZone"; + break; + + case MTRCommandIDTypeClusterZoneManagementCommandRemoveZoneID: + result = @"RemoveZone"; + break; + + default: + result = [NSString stringWithFormat:@"", commandID]; + break; + } + break; + + case MTRClusterIDTypeCameraAVStreamManagementID: + + switch (commandID) { + + case MTRCommandIDTypeClusterCameraAVStreamManagementCommandAudioStreamAllocateID: + result = @"AudioStreamAllocate"; + break; + + case MTRCommandIDTypeClusterCameraAVStreamManagementCommandAudioStreamDeallocateID: + result = @"AudioStreamDeallocate"; + break; + + case MTRCommandIDTypeClusterCameraAVStreamManagementCommandVideoStreamAllocateID: + result = @"VideoStreamAllocate"; + break; + + case MTRCommandIDTypeClusterCameraAVStreamManagementCommandVideoStreamModifyID: + result = @"VideoStreamModify"; + break; + + case MTRCommandIDTypeClusterCameraAVStreamManagementCommandVideoStreamDeallocateID: + result = @"VideoStreamDeallocate"; + break; + + case MTRCommandIDTypeClusterCameraAVStreamManagementCommandSnapshotStreamAllocateID: + result = @"SnapshotStreamAllocate"; + break; + + case MTRCommandIDTypeClusterCameraAVStreamManagementCommandSnapshotStreamDeallocateID: + result = @"SnapshotStreamDeallocate"; + break; + + case MTRCommandIDTypeClusterCameraAVStreamManagementCommandSetStreamPrioritiesID: + result = @"SetStreamPriorities"; + break; + + case MTRCommandIDTypeClusterCameraAVStreamManagementCommandCaptureSnapshotID: + result = @"CaptureSnapshot"; + break; + + case MTRCommandIDTypeClusterCameraAVStreamManagementCommandSetViewportID: + result = @"SetViewport"; + break; + + case MTRCommandIDTypeClusterCameraAVStreamManagementCommandSetImageRotationID: + result = @"SetImageRotation"; + break; + + case MTRCommandIDTypeClusterCameraAVStreamManagementCommandSetImageFlipHorizontalID: + result = @"SetImageFlipHorizontal"; + break; + + case MTRCommandIDTypeClusterCameraAVStreamManagementCommandSetImageFlipVerticalID: + result = @"SetImageFlipVertical"; + break; + + default: + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10981,7 +10879,33 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; + break; + } + break; + + case MTRClusterIDTypeWebRTCTransportRequestorID: + + switch (commandID) { + + case MTRCommandIDTypeClusterWebRTCTransportRequestorCommandOfferID: + result = @"Offer"; + break; + + case MTRCommandIDTypeClusterWebRTCTransportRequestorCommandAnswerID: + result = @"Answer"; + break; + + case MTRCommandIDTypeClusterWebRTCTransportRequestorCommandICECandidateID: + result = @"ICECandidate"; + break; + + case MTRCommandIDTypeClusterWebRTCTransportRequestorCommandEndID: + result = @"End"; + break; + + default: + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -10995,7 +10919,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11005,7 +10929,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11023,7 +10947,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11141,7 +11065,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11159,13 +11083,13 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; default: - result = [NSString stringWithFormat:@"", clusterID]; + result = [NSString stringWithFormat:@"", clusterID]; break; } @@ -11183,7 +11107,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11209,7 +11133,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11219,7 +11143,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11229,7 +11153,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11239,7 +11163,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11249,7 +11173,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11259,7 +11183,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11273,7 +11197,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11283,7 +11207,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11293,7 +11217,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11311,7 +11235,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11321,7 +11245,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11331,7 +11255,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11341,7 +11265,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11351,7 +11275,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11361,7 +11285,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11371,7 +11295,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11397,7 +11321,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11423,7 +11347,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11437,7 +11361,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11455,7 +11379,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11465,7 +11389,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11475,7 +11399,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11485,7 +11409,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11495,7 +11419,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11509,7 +11433,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11519,7 +11443,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11529,7 +11453,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11539,7 +11463,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11565,7 +11489,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11583,7 +11507,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11593,7 +11517,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11603,7 +11527,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11613,7 +11537,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11631,7 +11555,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11641,7 +11565,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11655,7 +11579,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11669,7 +11593,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11679,7 +11603,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11689,7 +11613,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11703,7 +11627,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11717,7 +11641,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11727,7 +11651,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11741,7 +11665,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11755,7 +11679,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11765,7 +11689,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11775,7 +11699,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11789,7 +11713,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11799,7 +11723,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11809,7 +11733,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11819,7 +11743,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11829,7 +11753,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11839,7 +11763,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11853,7 +11777,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11867,7 +11791,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11905,7 +11829,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11915,7 +11839,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11925,7 +11849,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11935,7 +11859,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11945,7 +11869,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11955,7 +11879,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11965,7 +11889,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11975,7 +11899,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11985,7 +11909,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -11995,7 +11919,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12005,7 +11929,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12019,7 +11943,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12029,7 +11953,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12039,7 +11963,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12053,7 +11977,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12067,7 +11991,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12081,7 +12005,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12115,7 +12039,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12125,7 +12049,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12143,7 +12067,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12153,7 +12077,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12171,7 +12095,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12181,7 +12105,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12191,7 +12115,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12201,7 +12125,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12211,7 +12135,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12221,7 +12145,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12231,7 +12155,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12241,7 +12165,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12251,7 +12175,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12261,7 +12185,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12271,7 +12195,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12281,7 +12205,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12291,7 +12215,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12301,7 +12225,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12311,7 +12235,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12321,7 +12245,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12331,7 +12255,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12341,7 +12265,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12351,7 +12275,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12361,7 +12285,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12371,7 +12295,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12385,7 +12309,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12399,7 +12323,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12413,7 +12337,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12423,7 +12347,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12441,7 +12365,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12455,7 +12379,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12469,7 +12393,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12479,7 +12403,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12489,7 +12413,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12503,7 +12427,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12517,7 +12441,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12527,7 +12451,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12541,7 +12465,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12551,7 +12475,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12565,7 +12489,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12579,7 +12503,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12593,7 +12517,51 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; + break; + } + break; + + case MTRClusterIDTypeZoneManagementID: + + switch (commandID) { + + case MTRCommandIDTypeClusterZoneManagementCommandCreateTwoDCartesianZoneResponseID: + result = @"CreateTwoDCartesianZoneResponse"; + break; + + case MTRCommandIDTypeClusterZoneManagementCommandGetTwoDCartesianZoneResponseID: + result = @"GetTwoDCartesianZoneResponse"; + break; + + default: + result = [NSString stringWithFormat:@"", commandID]; + break; + } + break; + + case MTRClusterIDTypeCameraAVStreamManagementID: + + switch (commandID) { + + case MTRCommandIDTypeClusterCameraAVStreamManagementCommandAudioStreamAllocateResponseID: + result = @"AudioStreamAllocateResponse"; + break; + + case MTRCommandIDTypeClusterCameraAVStreamManagementCommandVideoStreamAllocateResponseID: + result = @"VideoStreamAllocateResponse"; + break; + + case MTRCommandIDTypeClusterCameraAVStreamManagementCommandSnapshotStreamAllocateResponseID: + result = @"SnapshotStreamAllocateResponse"; + break; + + case MTRCommandIDTypeClusterCameraAVStreamManagementCommandCaptureSnapshotResponseID: + result = @"CaptureSnapshotResponse"; + break; + + default: + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12611,7 +12579,17 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; + break; + } + break; + + case MTRClusterIDTypeWebRTCTransportRequestorID: + + switch (commandID) { + + default: + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12621,7 +12599,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12631,7 +12609,7 @@ switch (commandID) { default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12645,7 +12623,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12719,7 +12697,7 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; @@ -12733,13 +12711,13 @@ break; default: - result = [NSString stringWithFormat:@"", commandID]; + result = [NSString stringWithFormat:@"", commandID]; break; } break; default: - result = [NSString stringWithFormat:@"", clusterID]; + result = [NSString stringWithFormat:@"", clusterID]; break; } @@ -12759,7 +12737,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -12769,7 +12747,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -12779,7 +12757,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -12789,7 +12767,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -12799,7 +12777,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -12809,7 +12787,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -12819,7 +12797,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -12842,7 +12820,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -12861,7 +12839,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -12888,7 +12866,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -12898,7 +12876,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -12921,7 +12899,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -12931,7 +12909,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -12941,7 +12919,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -12951,7 +12929,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -12961,7 +12939,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -12984,7 +12962,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -12994,7 +12972,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13004,7 +12982,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13014,7 +12992,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13041,7 +13019,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13056,7 +13034,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13075,7 +13053,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13098,7 +13076,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13108,7 +13086,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13139,7 +13117,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13170,7 +13148,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13209,7 +13187,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13219,7 +13197,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13229,7 +13207,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13239,7 +13217,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13249,7 +13227,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13259,7 +13237,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13274,7 +13252,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13284,7 +13262,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13294,7 +13272,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13313,7 +13291,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13323,7 +13301,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13333,7 +13311,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13343,7 +13321,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13353,7 +13331,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13363,7 +13341,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13373,7 +13351,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13383,7 +13361,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13393,7 +13371,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13403,7 +13381,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13418,7 +13396,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13428,7 +13406,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13438,7 +13416,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13493,7 +13471,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13508,7 +13486,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13518,7 +13496,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13528,7 +13506,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13547,7 +13525,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13566,7 +13544,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13576,7 +13554,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13586,7 +13564,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13596,7 +13574,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13615,7 +13593,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13634,7 +13612,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13649,7 +13627,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13668,7 +13646,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13687,7 +13665,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13702,7 +13680,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13725,7 +13703,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13752,7 +13730,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13787,7 +13765,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13797,7 +13775,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13807,7 +13785,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13817,7 +13795,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13827,7 +13805,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13837,7 +13815,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13868,7 +13846,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13878,7 +13856,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13888,7 +13866,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13967,7 +13945,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13977,7 +13955,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13987,7 +13965,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -13997,7 +13975,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14007,7 +13985,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14017,7 +13995,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14027,7 +14005,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14037,7 +14015,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14047,7 +14025,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14057,7 +14035,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14067,7 +14045,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14082,7 +14060,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14092,7 +14070,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14102,7 +14080,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14112,7 +14090,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14122,7 +14100,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14132,7 +14110,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14142,7 +14120,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14152,7 +14130,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14162,7 +14140,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14172,7 +14150,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14182,7 +14160,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14192,7 +14170,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14202,7 +14180,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14212,7 +14190,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14222,7 +14200,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14232,7 +14210,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14247,7 +14225,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14262,7 +14240,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14272,7 +14250,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14282,7 +14260,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14292,7 +14270,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14302,7 +14280,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14312,7 +14290,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14322,7 +14300,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14332,7 +14310,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14347,7 +14325,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14362,7 +14340,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14372,7 +14350,49 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeZoneManagementID: + + switch (eventID) { + + // Cluster ZoneManagement events + case MTREventIDTypeClusterZoneManagementEventZoneTriggeredID: + result = @"ZoneTriggered"; + break; + + case MTREventIDTypeClusterZoneManagementEventZoneStoppedID: + result = @"ZoneStopped"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeCameraAVStreamManagementID: + + switch (eventID) { + + // Cluster CameraAVStreamManagement events + case MTREventIDTypeClusterCameraAVStreamManagementEventVideoStreamChangedID: + result = @"VideoStreamChanged"; + break; + + case MTREventIDTypeClusterCameraAVStreamManagementEventAudioStreamChangedID: + result = @"AudioStreamChanged"; + break; + + case MTREventIDTypeClusterCameraAVStreamManagementEventSnapshotStreamChangedID: + result = @"SnapshotStreamChanged"; + break; + + default: + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14382,7 +14402,17 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; + break; + } + break; + + case MTRClusterIDTypeWebRTCTransportRequestorID: + + switch (eventID) { + + default: + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14392,7 +14422,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14402,7 +14432,7 @@ switch (eventID) { default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14417,7 +14447,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14440,7 +14470,7 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; @@ -14455,13 +14485,13 @@ break; default: - result = [NSString stringWithFormat:@"", eventID]; + result = [NSString stringWithFormat:@"", eventID]; break; } break; default: - result = [NSString stringWithFormat:@"", clusterID]; + result = [NSString stringWithFormat:@"", clusterID]; break; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 43a909b7e4..111cab13f8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -43,8 +43,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -90,8 +88,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -157,8 +153,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -245,8 +239,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -281,8 +273,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -327,8 +317,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -367,8 +355,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -426,8 +412,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -481,8 +465,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -571,8 +553,6 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -611,8 +591,6 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -659,8 +637,6 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -704,8 +680,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -753,8 +727,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -796,8 +768,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -834,8 +804,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -934,8 +902,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -993,12 +959,12 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeTCAcknowledgementsRequiredWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeTCUpdateDeadlineWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1067,8 +1033,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1105,8 +1069,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1165,8 +1127,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1213,8 +1173,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1379,8 +1337,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1445,8 +1401,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1503,8 +1457,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1571,8 +1523,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -1648,8 +1598,6 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1692,8 +1640,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1740,8 +1686,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1797,8 +1741,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1850,8 +1792,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1889,8 +1829,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1929,8 +1867,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1967,8 +1903,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2027,8 +1961,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2076,8 +2008,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2137,8 +2067,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2187,8 +2115,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2230,8 +2156,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2284,8 +2208,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2334,8 +2256,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2384,8 +2304,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2432,8 +2350,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2474,8 +2390,6 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); @@ -2516,8 +2430,6 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); @@ -2568,8 +2480,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2610,8 +2520,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2660,8 +2568,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2698,8 +2604,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); @@ -2766,8 +2670,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); @@ -2813,8 +2715,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2853,8 +2753,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2912,8 +2810,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2973,8 +2869,6 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); @@ -3031,8 +2925,6 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); @@ -3082,8 +2974,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -3136,8 +3026,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); @@ -3190,8 +3078,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); @@ -3247,8 +3133,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); @@ -3316,8 +3200,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); @@ -3390,8 +3272,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); @@ -3438,8 +3318,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); @@ -3491,8 +3369,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -3555,8 +3431,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -3598,8 +3472,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -3665,8 +3537,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -3769,8 +3639,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -3819,8 +3687,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -3859,8 +3725,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -3897,20 +3761,10 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -3947,20 +3801,10 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -3997,20 +3841,10 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -4201,8 +4035,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4297,8 +4129,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4348,8 +4178,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -4438,8 +4266,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4662,8 +4488,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4738,8 +4562,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4786,8 +4608,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4972,8 +4792,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5056,8 +4874,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5102,8 +4918,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5146,8 +4960,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5200,8 +5012,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5244,8 +5054,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5288,8 +5096,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5372,8 +5178,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5430,8 +5234,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); @@ -5488,8 +5290,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); @@ -5546,8 +5346,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); @@ -5604,8 +5402,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); @@ -5662,8 +5458,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); @@ -5720,8 +5514,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); @@ -5778,8 +5570,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); @@ -5836,8 +5626,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); @@ -5894,8 +5682,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); @@ -5952,8 +5738,6 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); @@ -5996,8 +5780,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -6053,8 +5835,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -6101,8 +5881,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -6141,8 +5919,6 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -6192,8 +5968,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6234,8 +6008,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6325,8 +6097,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6374,8 +6144,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6414,8 +6182,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6452,8 +6218,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6497,8 +6261,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6540,8 +6302,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6592,8 +6352,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6644,8 +6402,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6686,8 +6442,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6761,8 +6515,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -6799,8 +6551,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -6824,6 +6574,247 @@ MTR_PROVISIONALLY_AVAILABLE @end +/** + * Cluster Zone Management + * This cluster provides an interface to manage regions of interest, or Zones, which can be either manufacturer or user defined. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterZoneManagement : MTRGenericCluster + +- (void)createTwoDCartesianZoneWithParams:(MTRZoneManagementClusterCreateTwoDCartesianZoneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRZoneManagementClusterCreateTwoDCartesianZoneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)updateTwoDCartesianZoneWithParams:(MTRZoneManagementClusterUpdateTwoDCartesianZoneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)getTwoDCartesianZoneWithParams:(MTRZoneManagementClusterGetTwoDCartesianZoneParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRZoneManagementClusterGetTwoDCartesianZoneResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)getTwoDCartesianZoneWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRZoneManagementClusterGetTwoDCartesianZoneResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)removeZoneWithParams:(MTRZoneManagementClusterRemoveZoneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSupportedZoneSourcesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeZonesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeTimeControlWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeTimeControlWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeTimeControlWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSensitivityWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSensitivityWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSensitivityWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterZoneManagement (Availability) + +/** + * For all instance methods that take a completion (i.e. command invocations), + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Camera AV Stream Management + * The Camera AV Stream Management cluster is used to allow clients to manage, control, and configure various audio, video, and snapshot streams on a camera. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterCameraAVStreamManagement : MTRGenericCluster + +- (void)audioStreamAllocateWithParams:(MTRCameraAVStreamManagementClusterAudioStreamAllocateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRCameraAVStreamManagementClusterAudioStreamAllocateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)audioStreamDeallocateWithParams:(MTRCameraAVStreamManagementClusterAudioStreamDeallocateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)videoStreamAllocateWithParams:(MTRCameraAVStreamManagementClusterVideoStreamAllocateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRCameraAVStreamManagementClusterVideoStreamAllocateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)videoStreamModifyWithParams:(MTRCameraAVStreamManagementClusterVideoStreamModifyParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)videoStreamDeallocateWithParams:(MTRCameraAVStreamManagementClusterVideoStreamDeallocateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)snapshotStreamAllocateWithParams:(MTRCameraAVStreamManagementClusterSnapshotStreamAllocateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRCameraAVStreamManagementClusterSnapshotStreamAllocateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)snapshotStreamDeallocateWithParams:(MTRCameraAVStreamManagementClusterSnapshotStreamDeallocateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)setStreamPrioritiesWithParams:(MTRCameraAVStreamManagementClusterSetStreamPrioritiesParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)captureSnapshotWithParams:(MTRCameraAVStreamManagementClusterCaptureSnapshotParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)setViewportWithParams:(MTRCameraAVStreamManagementClusterSetViewportParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)setImageRotationWithParams:(MTRCameraAVStreamManagementClusterSetImageRotationParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)setImageFlipHorizontalWithParams:(MTRCameraAVStreamManagementClusterSetImageFlipHorizontalParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)setImageFlipVerticalWithParams:(MTRCameraAVStreamManagementClusterSetImageFlipVerticalParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeMaxConcurrentVideoEncodersWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeMaxEncodedPixelRateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeVideoSensorParamsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeNightVisionCapableWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeMinViewportWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeRateDistortionTradeOffPointsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeMaxContentBufferSizeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeMicrophoneCapabilitiesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSpeakerCapabilitiesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeTwoWayTalkSupportWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSupportedSnapshotParamsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeMaxNetworkBandwidthWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeCurrentFrameRateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeHDRModeEnabledWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeHDRModeEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeHDRModeEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeCurrentVideoCodecsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeCurrentSnapshotConfigWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFabricsUsingCameraWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAllocatedVideoStreamsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAllocatedAudioStreamsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAllocatedSnapshotStreamsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeRankedVideoStreamPrioritiesListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeRankedVideoStreamPrioritiesListWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeRankedVideoStreamPrioritiesListWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSoftRecordingPrivacyModeEnabledWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSoftRecordingPrivacyModeEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSoftRecordingPrivacyModeEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSoftLivestreamPrivacyModeEnabledWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSoftLivestreamPrivacyModeEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSoftLivestreamPrivacyModeEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeHardPrivacyModeOnWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeNightVisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeNightVisionWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeNightVisionWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeNightVisionIllumWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeNightVisionIllumWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeNightVisionIllumWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAWBEnabledWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeAWBEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeAWBEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAutoShutterSpeedEnabledWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeAutoShutterSpeedEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeAutoShutterSpeedEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAutoISOEnabledWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeAutoISOEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeAutoISOEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeViewportWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSpeakerMutedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSpeakerMutedWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSpeakerMutedWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSpeakerVolumeLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSpeakerVolumeLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSpeakerVolumeLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSpeakerMaxLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSpeakerMaxLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSpeakerMaxLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSpeakerMinLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSpeakerMinLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSpeakerMinLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeMicrophoneMutedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneMutedWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneMutedWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeMicrophoneVolumeLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneVolumeLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneVolumeLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeMicrophoneMaxLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneMaxLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneMaxLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeMicrophoneMinLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneMinLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneMinLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeMicrophoneAGCEnabledWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneAGCEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMicrophoneAGCEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeImageRotationWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeImageFlipHorizontalWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeImageFlipVerticalWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeLocalVideoRecordingEnabledWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeLocalVideoRecordingEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeLocalVideoRecordingEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeLocalSnapshotRecordingEnabledWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeLocalSnapshotRecordingEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeLocalSnapshotRecordingEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeStatusLightEnabledWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeStatusLightEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeStatusLightEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeStatusLightBrightnessWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeStatusLightBrightnessWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeStatusLightBrightnessWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeDepthSensorStatusWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDepthSensorStatusWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDepthSensorStatusWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterCameraAVStreamManagement (Availability) + +/** + * For all instance methods that take a completion (i.e. command invocations), + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + /** * Cluster WebRTC Transport Provider * The WebRTC transport provider cluster provides a way for stream providers (e.g. Cameras) to stream or receive their data through WebRTC. @@ -6843,8 +6834,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -6868,6 +6857,47 @@ MTR_PROVISIONALLY_AVAILABLE @end +/** + * Cluster WebRTC Transport Requestor + * The WebRTC transport requestor cluster provides a way for stream consumers (e.g. Matter Stream Viewer) to establish a WebRTC connection with a stream provider. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterWebRTCTransportRequestor : MTRGenericCluster + +- (void)offerWithParams:(MTRWebRTCTransportRequestorClusterOfferParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)answerWithParams:(MTRWebRTCTransportRequestorClusterAnswerParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)ICECandidateWithParams:(MTRWebRTCTransportRequestorClusterICECandidateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)endWithParams:(MTRWebRTCTransportRequestorClusterEndParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeCurrentSessionsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterWebRTCTransportRequestor (Availability) + +/** + * For all instance methods that take a completion (i.e. command invocations), + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + /** * Cluster Chime * This cluster provides facilities to configure and play Chime sounds, such as those used in a doorbell. @@ -6893,8 +6923,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -6933,8 +6961,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -6974,8 +7000,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -7404,8 +7428,6 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -7453,8 +7475,6 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 5864634bb6..b473aed702 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -128,11 +128,6 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIdentifyID) attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeAttributeListID) params:params]; @@ -352,11 +347,6 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupsID) attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeAttributeListID) params:params]; @@ -677,11 +667,6 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffID) attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeAttributeListID) params:params]; @@ -1156,11 +1141,6 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLevelControlID) attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeAttributeListID) params:params]; @@ -1244,11 +1224,6 @@ @implementation MTRClusterPulseWidthModulation return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePulseWidthModulationID) attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeAttributeListID) params:params]; @@ -1303,11 +1278,6 @@ @implementation MTRClusterDescriptor return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeAttributeListID) params:params]; @@ -1366,11 +1336,6 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBindingID) attributeID:@(MTRAttributeIDTypeClusterBindingAttributeAttributeListID) params:params]; @@ -1493,11 +1458,6 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccessControlID) attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeAttributeListID) params:params]; @@ -1887,11 +1847,6 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActionsID) attributeID:@(MTRAttributeIDTypeClusterActionsAttributeAttributeListID) params:params]; @@ -2169,11 +2124,6 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeAttributeListID) params:params]; @@ -2304,11 +2254,6 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAttributeListID) params:params]; @@ -2428,11 +2373,6 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAttributeListID) params:params]; @@ -2511,11 +2451,6 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAttributeListID) params:params]; @@ -2591,11 +2526,6 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAttributeListID) params:params]; @@ -2650,11 +2580,6 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitLocalizationID) attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeAttributeListID) params:params]; @@ -2698,11 +2623,6 @@ @implementation MTRClusterPowerSourceConfiguration return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAttributeListID) params:params]; @@ -2901,11 +2821,6 @@ @implementation MTRClusterPowerSource return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerSourceID) attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeAttributeListID) params:params]; @@ -3102,6 +3017,11 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeTCAcknowledgementsRequiredID) params:params]; } +- (NSDictionary * _Nullable)readAttributeTCUpdateDeadlineWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeTCUpdateDeadlineID) params:params]; +} + - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeGeneratedCommandListID) params:params]; @@ -3112,11 +3032,6 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralCommissioningID) attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeAttributeListID) params:params]; @@ -3442,11 +3357,6 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNetworkCommissioningID) attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeAttributeListID) params:params]; @@ -3560,11 +3470,6 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDiagnosticLogsID) attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeAttributeListID) params:params]; @@ -3741,11 +3646,6 @@ - (void)payloadTestRequestWithParams:(MTRGeneralDiagnosticsClusterPayloadTestReq return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAttributeListID) params:params]; @@ -3844,11 +3744,6 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAttributeListID) params:params]; @@ -4242,11 +4137,6 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAttributeListID) params:params]; @@ -4398,11 +4288,6 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAttributeListID) params:params]; @@ -4534,11 +4419,6 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAttributeListID) params:params]; @@ -4786,11 +4666,6 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimeSynchronizationID) attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeAttributeListID) params:params]; @@ -4943,11 +4818,6 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAttributeListID) params:params]; @@ -5003,11 +4873,6 @@ @implementation MTRClusterSwitch return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSwitchID) attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeAttributeListID) params:params]; @@ -5155,11 +5020,6 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAttributeListID) params:params]; @@ -5463,11 +5323,6 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalCredentialsID) attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeAttributeListID) params:params]; @@ -5710,11 +5565,6 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeGroupKeyManagementID) attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeAttributeListID) params:params]; @@ -5784,11 +5634,6 @@ @implementation MTRClusterFixedLabel return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFixedLabelID) attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeAttributeListID) params:params]; @@ -5843,11 +5688,6 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUserLabelID) attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeAttributeListID) params:params]; @@ -5891,11 +5731,6 @@ @implementation MTRClusterBooleanState return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeAttributeListID) params:params]; @@ -6065,11 +5900,6 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeICDManagementID) attributeID:@(MTRAttributeIDTypeClusterICDManagementAttributeAttributeListID) params:params]; @@ -6226,11 +6056,6 @@ - (void)reduceTimeWithParams:(MTRTimerClusterReduceTimeParams *)params expectedV return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTimerID) attributeID:@(MTRAttributeIDTypeClusterTimerAttributeAttributeListID) params:params]; @@ -6414,11 +6239,6 @@ - (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nu return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenCavityOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOvenCavityOperationalStateAttributeAttributeListID) params:params]; @@ -6517,11 +6337,6 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeAttributeListID) params:params]; @@ -6572,11 +6387,6 @@ - (void)writeAttributeSelectedDrynessLevelWithValue:(NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryDryerControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryDryerControlsAttributeAttributeListID) params:params]; @@ -6685,11 +6495,6 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeModeSelectID) attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeAttributeListID) params:params]; @@ -6802,11 +6607,6 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherModeID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherModeAttributeAttributeListID) params:params]; @@ -6905,11 +6705,6 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAndTemperatureControlledCabinetModeID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAndTemperatureControlledCabinetModeAttributeAttributeListID) params:params]; @@ -6981,11 +6776,6 @@ - (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)da return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLaundryWasherControlsID) attributeID:@(MTRAttributeIDTypeClusterLaundryWasherControlsAttributeAttributeListID) params:params]; @@ -7052,11 +6842,6 @@ - (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCRunModeID) attributeID:@(MTRAttributeIDTypeClusterRVCRunModeAttributeAttributeListID) params:params]; @@ -7123,11 +6908,6 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCCleanModeID) attributeID:@(MTRAttributeIDTypeClusterRVCCleanModeAttributeAttributeListID) params:params]; @@ -7218,11 +6998,6 @@ - (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperaturePara return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureControlID) attributeID:@(MTRAttributeIDTypeClusterTemperatureControlAttributeAttributeListID) params:params]; @@ -7267,11 +7042,6 @@ @implementation MTRClusterRefrigeratorAlarm return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRefrigeratorAlarmID) attributeID:@(MTRAttributeIDTypeClusterRefrigeratorAlarmAttributeAttributeListID) params:params]; @@ -7370,11 +7140,6 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherModeID) attributeID:@(MTRAttributeIDTypeClusterDishwasherModeAttributeAttributeListID) params:params]; @@ -7409,11 +7174,6 @@ @implementation MTRClusterAirQuality return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAirQualityID) attributeID:@(MTRAttributeIDTypeClusterAirQualityAttributeAttributeListID) params:params]; @@ -7550,11 +7310,6 @@ - (void)writeAttributeSmokeSensitivityLevelWithValue:(NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSmokeCOAlarmID) attributeID:@(MTRAttributeIDTypeClusterSmokeCOAlarmAttributeAttributeListID) params:params]; @@ -7658,11 +7413,6 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDishwasherAlarmID) attributeID:@(MTRAttributeIDTypeClusterDishwasherAlarmAttributeAttributeListID) params:params]; @@ -7702,11 +7452,6 @@ @implementation MTRClusterMicrowaveOvenMode return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenModeID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeAttributeListID) params:params]; @@ -7839,11 +7584,6 @@ - (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams * return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAttributeListID) params:params]; @@ -8027,11 +7767,6 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAttributeListID) params:params]; @@ -8184,11 +7919,6 @@ - (void)goHomeWithParams:(MTRRVCOperationalStateClusterGoHomeParams * _Nullable) return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeAttributeListID) params:params]; @@ -8449,11 +8179,6 @@ - (void)copySceneWithParams:(MTRScenesManagementClusterCopySceneParams *)params return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeAttributeListID) params:params]; @@ -8555,11 +8280,6 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeHEPAFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterHEPAFilterMonitoringAttributeAttributeListID) params:params]; @@ -8661,11 +8381,6 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeActivatedCarbonFilterMonitoringID) attributeID:@(MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeAttributeListID) params:params]; @@ -8800,11 +8515,6 @@ - (void)writeAttributeCurrentSensitivityLevelWithValue:(NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBooleanStateConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanStateConfigurationAttributeAttributeListID) params:params]; @@ -8973,11 +8683,6 @@ - (void)writeAttributeDefaultOpenLevelWithValue:(NSDictionary *) return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAttributeListID) params:params]; @@ -9102,11 +8807,6 @@ @implementation MTRClusterElectricalPowerMeasurement return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalPowerMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalPowerMeasurementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalPowerMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalPowerMeasurementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalPowerMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalPowerMeasurementAttributeAttributeListID) params:params]; @@ -9166,11 +8866,6 @@ @implementation MTRClusterElectricalEnergyMeasurement return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalEnergyMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalEnergyMeasurementAttributeAttributeListID) params:params]; @@ -9288,11 +8983,6 @@ - (void)cancelBoostWithParams:(MTRWaterHeaterManagementClusterCancelBoostParams return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWaterHeaterManagementID) attributeID:@(MTRAttributeIDTypeClusterWaterHeaterManagementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWaterHeaterManagementID) attributeID:@(MTRAttributeIDTypeClusterWaterHeaterManagementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWaterHeaterManagementID) attributeID:@(MTRAttributeIDTypeClusterWaterHeaterManagementAttributeAttributeListID) params:params]; @@ -9523,11 +9213,6 @@ - (void)writeAttributeDefaultRandomDurationWithValue:(NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeAttributeListID) params:params]; @@ -9621,11 +9306,6 @@ - (void)cancelMessagesRequestWithParams:(MTRMessagesClusterCancelMessagesRequest return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMessagesID) attributeID:@(MTRAttributeIDTypeClusterMessagesAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMessagesID) attributeID:@(MTRAttributeIDTypeClusterMessagesAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMessagesID) attributeID:@(MTRAttributeIDTypeClusterMessagesAttributeAttributeListID) params:params]; @@ -9923,11 +9603,6 @@ - (void)cancelRequestWithParams:(MTRDeviceEnergyManagementClusterCancelRequestPa return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementAttributeAttributeListID) params:params]; @@ -10331,11 +10006,6 @@ - (void)writeAttributeApproximateEVEfficiencyWithValue:(NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeAttributeListID) params:params]; @@ -10412,11 +10082,6 @@ - (void)writeAttributeCurrentLowPowerModeSensitivityWithValue:(NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyPreferenceID) attributeID:@(MTRAttributeIDTypeClusterEnergyPreferenceAttributeAttributeListID) params:params]; @@ -10456,11 +10121,6 @@ @implementation MTRClusterPowerTopology return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerTopologyID) attributeID:@(MTRAttributeIDTypeClusterPowerTopologyAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerTopologyID) attributeID:@(MTRAttributeIDTypeClusterPowerTopologyAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePowerTopologyID) attributeID:@(MTRAttributeIDTypeClusterPowerTopologyAttributeAttributeListID) params:params]; @@ -10517,38 +10177,6 @@ - (void)changeToModeWithParams:(MTREnergyEVSEModeClusterChangeToModeParams *)par return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeCurrentModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeStartUpModeID) params:params]; -} - -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeOnModeID) params:params]; -} - -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeOnModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeGeneratedCommandListID) params:params]; @@ -10559,11 +10187,6 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEnergyEVSEModeID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEModeAttributeAttributeListID) params:params]; @@ -10620,56 +10243,19 @@ - (void)changeToModeWithParams:(MTRWaterHeaterModeClusterChangeToModeParams *)pa return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWaterHeaterModeID) attributeID:@(MTRAttributeIDTypeClusterWaterHeaterModeAttributeCurrentModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWaterHeaterModeID) attributeID:@(MTRAttributeIDTypeClusterWaterHeaterModeAttributeStartUpModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWaterHeaterModeID) attributeID:@(MTRAttributeIDTypeClusterWaterHeaterModeAttributeGeneratedCommandListID) params:params]; } -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWaterHeaterModeID) attributeID:@(MTRAttributeIDTypeClusterWaterHeaterModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWaterHeaterModeID) attributeID:@(MTRAttributeIDTypeClusterWaterHeaterModeAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWaterHeaterModeID) attributeID:@(MTRAttributeIDTypeClusterWaterHeaterModeAttributeOnModeID) params:params]; -} - -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeOnModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWaterHeaterModeID) attributeID:@(MTRAttributeIDTypeClusterWaterHeaterModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWaterHeaterModeID) attributeID:@(MTRAttributeIDTypeClusterWaterHeaterModeAttributeGeneratedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWaterHeaterModeID) attributeID:@(MTRAttributeIDTypeClusterWaterHeaterModeAttributeAcceptedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWaterHeaterModeID) attributeID:@(MTRAttributeIDTypeClusterWaterHeaterModeAttributeEventListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWaterHeaterModeID) attributeID:@(MTRAttributeIDTypeClusterWaterHeaterModeAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWaterHeaterModeID) attributeID:@(MTRAttributeIDTypeClusterWaterHeaterModeAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params @@ -10723,38 +10309,6 @@ - (void)changeToModeWithParams:(MTRDeviceEnergyManagementModeClusterChangeToMode return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeCurrentModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeStartUpModeID) params:params]; -} - -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeStartUpModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeOnModeID) params:params]; -} - -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeOnModeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeGeneratedCommandListID) params:params]; @@ -10765,11 +10319,6 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDeviceEnergyManagementModeID) attributeID:@(MTRAttributeIDTypeClusterDeviceEnergyManagementModeAttributeAttributeListID) params:params]; @@ -11835,11 +11384,6 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeDoorLockID) attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeAttributeListID) params:params]; @@ -12308,11 +11852,6 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWindowCoveringID) attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeAttributeListID) params:params]; @@ -12482,11 +12021,6 @@ - (void)skipAreaWithParams:(MTRServiceAreaClusterSkipAreaParams *)params expecte return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeAttributeListID) params:params]; @@ -12675,11 +12209,6 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAttributeListID) params:params]; @@ -13530,11 +13059,6 @@ - (void)writeAttributeSchedulesWithValue:(NSDictionary *)dataVal return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeAttributeListID) params:params]; @@ -13764,11 +13288,6 @@ - (void)writeAttributeAirflowDirectionWithValue:(NSDictionary *) return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFanControlID) attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeAttributeListID) params:params]; @@ -13855,11 +13374,6 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAttributeListID) params:params]; @@ -14814,11 +14328,6 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeColorControlID) attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeAttributeListID) params:params]; @@ -15132,11 +14641,6 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBallastConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeAttributeListID) params:params]; @@ -15212,11 +14716,6 @@ @implementation MTRClusterIlluminanceMeasurement return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAttributeListID) params:params]; @@ -15275,11 +14774,6 @@ @implementation MTRClusterTemperatureMeasurement return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAttributeListID) params:params]; @@ -15363,11 +14857,6 @@ @implementation MTRClusterPressureMeasurement return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePressureMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeAttributeListID) params:params]; @@ -15426,11 +14915,6 @@ @implementation MTRClusterFlowMeasurement return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFlowMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeAttributeListID) params:params]; @@ -15489,11 +14973,6 @@ @implementation MTRClusterRelativeHumidityMeasurement return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAttributeListID) params:params]; @@ -15712,11 +15191,6 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOccupancySensingID) attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeAttributeListID) params:params]; @@ -15846,11 +15320,6 @@ @implementation MTRClusterCarbonMonoxideConcentrationMeasurement return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonMonoxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonMonoxideConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -15935,11 +15404,6 @@ @implementation MTRClusterCarbonDioxideConcentrationMeasurement return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCarbonDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterCarbonDioxideConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -16024,11 +15488,6 @@ @implementation MTRClusterNitrogenDioxideConcentrationMeasurement return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeNitrogenDioxideConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterNitrogenDioxideConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -16113,11 +15572,6 @@ @implementation MTRClusterOzoneConcentrationMeasurement return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOzoneConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterOzoneConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -16202,11 +15656,6 @@ @implementation MTRClusterPM25ConcentrationMeasurement return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM25ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM25ConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -16291,11 +15740,6 @@ @implementation MTRClusterFormaldehydeConcentrationMeasurement return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeFormaldehydeConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterFormaldehydeConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -16380,11 +15824,6 @@ @implementation MTRClusterPM1ConcentrationMeasurement return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM1ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM1ConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -16469,11 +15908,6 @@ @implementation MTRClusterPM10ConcentrationMeasurement return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePM10ConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterPM10ConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -16558,11 +15992,6 @@ @implementation MTRClusterTotalVolatileOrganicCompoundsConcentrationMeasurement return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTotalVolatileOrganicCompoundsConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -16647,11 +16076,6 @@ @implementation MTRClusterRadonConcentrationMeasurement return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeRadonConcentrationMeasurementID) attributeID:@(MTRAttributeIDTypeClusterRadonConcentrationMeasurementAttributeAttributeListID) params:params]; @@ -16722,11 +16146,6 @@ - (void)networkPassphraseRequestWithParams:(MTRWiFiNetworkManagementClusterNetwo return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkManagementID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkManagementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkManagementID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkManagementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWiFiNetworkManagementID) attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkManagementAttributeAttributeListID) params:params]; @@ -16902,11 +16321,6 @@ - (void)setPendingDatasetRequestWithParams:(MTRThreadBorderRouterManagementClust return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadBorderRouterManagementID) attributeID:@(MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadBorderRouterManagementID) attributeID:@(MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadBorderRouterManagementID) attributeID:@(MTRAttributeIDTypeClusterThreadBorderRouterManagementAttributeAttributeListID) params:params]; @@ -17049,11 +16463,6 @@ - (void)writeAttributePreferredExtendedPanIDWithValue:(NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDirectoryID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDirectoryAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeThreadNetworkDirectoryID) attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDirectoryAttributeAttributeListID) params:params]; @@ -17093,11 +16502,6 @@ @implementation MTRClusterWakeOnLAN return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWakeOnLANID) attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeAttributeListID) params:params]; @@ -17319,11 +16723,6 @@ - (void)cancelRecordProgramWithParams:(MTRChannelClusterCancelRecordProgramParam return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChannelID) attributeID:@(MTRAttributeIDTypeClusterChannelAttributeAttributeListID) params:params]; @@ -17417,11 +16816,6 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTargetNavigatorID) attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeAttributeListID) params:params]; @@ -17937,11 +17331,6 @@ - (void)deactivateTextTrackWithParams:(MTRMediaPlaybackClusterDeactivateTextTrac return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaPlaybackID) attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeAttributeListID) params:params]; @@ -18226,11 +17615,6 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params ex return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMediaInputID) attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeAttributeListID) params:params]; @@ -18328,11 +17712,6 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params expect return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeLowPowerID) attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeAttributeListID) params:params]; @@ -18407,11 +17786,6 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params expectedV return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeKeypadInputID) attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeAttributeListID) params:params]; @@ -18533,11 +17907,6 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentLauncherID) attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeAttributeListID) params:params]; @@ -18656,11 +18025,6 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAudioOutputID) attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeAttributeListID) params:params]; @@ -18823,11 +18187,6 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationLauncherID) attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeAttributeListID) params:params]; @@ -18930,11 +18289,6 @@ @implementation MTRClusterApplicationBasic return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeApplicationBasicID) attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeAttributeListID) params:params]; @@ -19067,11 +18421,6 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeAccountLoginID) attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeAttributeListID) params:params]; @@ -19466,11 +18815,6 @@ - (void)setScheduledContentRatingThresholdWithParams:(MTRContentControlClusterSe return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentControlID) attributeID:@(MTRAttributeIDTypeClusterContentControlAttributeAttributeListID) params:params]; @@ -19527,11 +18871,6 @@ - (void)contentAppMessageWithParams:(MTRContentAppObserverClusterContentAppMessa return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeContentAppObserverID) attributeID:@(MTRAttributeIDTypeClusterContentAppObserverAttributeAttributeListID) params:params]; @@ -19549,12 +18888,12 @@ - (void)contentAppMessageWithParams:(MTRContentAppObserverClusterContentAppMessa @end -@implementation MTRClusterWebRTCTransportProvider +@implementation MTRClusterZoneManagement -- (void)solicitOfferWithParams:(MTRWebRTCTransportProviderClusterSolicitOfferParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRWebRTCTransportProviderClusterSolicitOfferResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)createTwoDCartesianZoneWithParams:(MTRZoneManagementClusterCreateTwoDCartesianZoneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRZoneManagementClusterCreateTwoDCartesianZoneResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRWebRTCTransportProviderClusterSolicitOfferParams + params = [[MTRZoneManagementClusterCreateTwoDCartesianZoneParams alloc] init]; } @@ -19564,7 +18903,7 @@ - (void)solicitOfferWithParams:(MTRWebRTCTransportProviderClusterSolicitOfferPar auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = WebRTCTransportProvider::Commands::SolicitOffer::Type; + using RequestType = ZoneManagement::Commands::CreateTwoDCartesianZone::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -19573,25 +18912,25 @@ - (void)solicitOfferWithParams:(MTRWebRTCTransportProviderClusterSolicitOfferPar expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRWebRTCTransportProviderClusterSolicitOfferResponseParams.class + responseClass:MTRZoneManagementClusterCreateTwoDCartesianZoneResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)provideOfferWithParams:(MTRWebRTCTransportProviderClusterProvideOfferParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRWebRTCTransportProviderClusterProvideOfferResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)updateTwoDCartesianZoneWithParams:(MTRZoneManagementClusterUpdateTwoDCartesianZoneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRWebRTCTransportProviderClusterProvideOfferParams + params = [[MTRZoneManagementClusterUpdateTwoDCartesianZoneParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = WebRTCTransportProvider::Commands::ProvideOffer::Type; + using RequestType = ZoneManagement::Commands::UpdateTwoDCartesianZone::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -19600,25 +18939,29 @@ - (void)provideOfferWithParams:(MTRWebRTCTransportProviderClusterProvideOfferPar expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRWebRTCTransportProviderClusterProvideOfferResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)provideAnswerWithParams:(MTRWebRTCTransportProviderClusterProvideAnswerParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)getTwoDCartesianZoneWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRZoneManagementClusterGetTwoDCartesianZoneResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self getTwoDCartesianZoneWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)getTwoDCartesianZoneWithParams:(MTRZoneManagementClusterGetTwoDCartesianZoneParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRZoneManagementClusterGetTwoDCartesianZoneResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRWebRTCTransportProviderClusterProvideAnswerParams + params = [[MTRZoneManagementClusterGetTwoDCartesianZoneParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = WebRTCTransportProvider::Commands::ProvideAnswer::Type; + using RequestType = ZoneManagement::Commands::GetTwoDCartesianZone::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -19627,15 +18970,15 @@ - (void)provideAnswerWithParams:(MTRWebRTCTransportProviderClusterProvideAnswerP expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRZoneManagementClusterGetTwoDCartesianZoneResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)provideICECandidateWithParams:(MTRWebRTCTransportProviderClusterProvideICECandidateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)removeZoneWithParams:(MTRZoneManagementClusterRemoveZoneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRWebRTCTransportProviderClusterProvideICECandidateParams + params = [[MTRZoneManagementClusterRemoveZoneParams alloc] init]; } @@ -19645,7 +18988,7 @@ - (void)provideICECandidateWithParams:(MTRWebRTCTransportProviderClusterProvideI auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = WebRTCTransportProvider::Commands::ProvideICECandidate::Type; + using RequestType = ZoneManagement::Commands::RemoveZone::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -19659,73 +19002,1257 @@ - (void)provideICECandidateWithParams:(MTRWebRTCTransportProviderClusterProvideI completion:responseHandler]; } -- (void)endSessionWithParams:(MTRWebRTCTransportProviderClusterEndSessionParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (NSDictionary * _Nullable)readAttributeSupportedZoneSourcesWithParams:(MTRReadParams * _Nullable)params { - if (params == nil) { - params = [[MTRWebRTCTransportProviderClusterEndSessionParams - alloc] init]; - } + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeZoneManagementID) attributeID:@(MTRAttributeIDTypeClusterZoneManagementAttributeSupportedZoneSourcesID) params:params]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (NSDictionary * _Nullable)readAttributeZonesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeZoneManagementID) attributeID:@(MTRAttributeIDTypeClusterZoneManagementAttributeZonesID) params:params]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (NSDictionary * _Nullable)readAttributeTimeControlWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeZoneManagementID) attributeID:@(MTRAttributeIDTypeClusterZoneManagementAttributeTimeControlID) params:params]; +} - using RequestType = WebRTCTransportProvider::Commands::EndSession::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; +- (void)writeAttributeTimeControlWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeTimeControlWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeTimeControlWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeZoneManagementID) attributeID:@(MTRAttributeIDTypeClusterZoneManagementAttributeTimeControlID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary * _Nullable)readAttributeCurrentSessionsWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSensitivityWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWebRTCTransportProviderID) attributeID:@(MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeCurrentSessionsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeZoneManagementID) attributeID:@(MTRAttributeIDTypeClusterZoneManagementAttributeSensitivityID) params:params]; } -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (void)writeAttributeSensitivityWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWebRTCTransportProviderID) attributeID:@(MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeGeneratedCommandListID) params:params]; + [self writeAttributeSensitivityWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeSensitivityWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeZoneManagementID) attributeID:@(MTRAttributeIDTypeClusterZoneManagementAttributeSensitivityID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWebRTCTransportProviderID) attributeID:@(MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeZoneManagementID) attributeID:@(MTRAttributeIDTypeClusterZoneManagementAttributeGeneratedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWebRTCTransportProviderID) attributeID:@(MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeZoneManagementID) attributeID:@(MTRAttributeIDTypeClusterZoneManagementAttributeAcceptedCommandListID) params:params]; } - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWebRTCTransportProviderID) attributeID:@(MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeZoneManagementID) attributeID:@(MTRAttributeIDTypeClusterZoneManagementAttributeAttributeListID) params:params]; } - (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWebRTCTransportProviderID) attributeID:@(MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeZoneManagementID) attributeID:@(MTRAttributeIDTypeClusterZoneManagementAttributeFeatureMapID) params:params]; } - (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWebRTCTransportProviderID) attributeID:@(MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeZoneManagementID) attributeID:@(MTRAttributeIDTypeClusterZoneManagementAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterChime +@implementation MTRClusterCameraAVStreamManagement -- (void)playChimeSoundWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)audioStreamAllocateWithParams:(MTRCameraAVStreamManagementClusterAudioStreamAllocateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRCameraAVStreamManagementClusterAudioStreamAllocateResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterAudioStreamAllocateParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::AudioStreamAllocate::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRCameraAVStreamManagementClusterAudioStreamAllocateResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)audioStreamDeallocateWithParams:(MTRCameraAVStreamManagementClusterAudioStreamDeallocateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterAudioStreamDeallocateParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::AudioStreamDeallocate::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)videoStreamAllocateWithParams:(MTRCameraAVStreamManagementClusterVideoStreamAllocateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRCameraAVStreamManagementClusterVideoStreamAllocateResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterVideoStreamAllocateParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::VideoStreamAllocate::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRCameraAVStreamManagementClusterVideoStreamAllocateResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)videoStreamModifyWithParams:(MTRCameraAVStreamManagementClusterVideoStreamModifyParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterVideoStreamModifyParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::VideoStreamModify::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)videoStreamDeallocateWithParams:(MTRCameraAVStreamManagementClusterVideoStreamDeallocateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterVideoStreamDeallocateParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::VideoStreamDeallocate::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)snapshotStreamAllocateWithParams:(MTRCameraAVStreamManagementClusterSnapshotStreamAllocateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRCameraAVStreamManagementClusterSnapshotStreamAllocateResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterSnapshotStreamAllocateParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::SnapshotStreamAllocate::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRCameraAVStreamManagementClusterSnapshotStreamAllocateResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)snapshotStreamDeallocateWithParams:(MTRCameraAVStreamManagementClusterSnapshotStreamDeallocateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterSnapshotStreamDeallocateParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::SnapshotStreamDeallocate::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)setStreamPrioritiesWithParams:(MTRCameraAVStreamManagementClusterSetStreamPrioritiesParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterSetStreamPrioritiesParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::SetStreamPriorities::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)captureSnapshotWithParams:(MTRCameraAVStreamManagementClusterCaptureSnapshotParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterCaptureSnapshotParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::CaptureSnapshot::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)setViewportWithParams:(MTRCameraAVStreamManagementClusterSetViewportParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterSetViewportParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::SetViewport::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)setImageRotationWithParams:(MTRCameraAVStreamManagementClusterSetImageRotationParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterSetImageRotationParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::SetImageRotation::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)setImageFlipHorizontalWithParams:(MTRCameraAVStreamManagementClusterSetImageFlipHorizontalParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterSetImageFlipHorizontalParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::SetImageFlipHorizontal::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)setImageFlipVerticalWithParams:(MTRCameraAVStreamManagementClusterSetImageFlipVerticalParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRCameraAVStreamManagementClusterSetImageFlipVerticalParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CameraAvStreamManagement::Commands::SetImageFlipVertical::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (NSDictionary * _Nullable)readAttributeMaxConcurrentVideoEncodersWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMaxConcurrentVideoEncodersID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMaxEncodedPixelRateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMaxEncodedPixelRateID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeVideoSensorParamsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeVideoSensorParamsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeNightVisionCapableWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeNightVisionCapableID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMinViewportWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMinViewportID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRateDistortionTradeOffPointsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeRateDistortionTradeOffPointsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMaxContentBufferSizeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMaxContentBufferSizeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMicrophoneCapabilitiesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneCapabilitiesID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeSpeakerCapabilitiesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerCapabilitiesID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeTwoWayTalkSupportWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeTwoWayTalkSupportID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeSupportedSnapshotParamsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSupportedSnapshotParamsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMaxNetworkBandwidthWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMaxNetworkBandwidthID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentFrameRateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeCurrentFrameRateID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeHDRModeEnabledWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeHDRModeEnabledID) params:params]; +} + +- (void)writeAttributeHDRModeEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeHDRModeEnabledWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeHDRModeEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeHDRModeEnabledID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentVideoCodecsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeCurrentVideoCodecsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentSnapshotConfigWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeCurrentSnapshotConfigID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFabricsUsingCameraWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeFabricsUsingCameraID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAllocatedVideoStreamsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAllocatedVideoStreamsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAllocatedAudioStreamsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAllocatedAudioStreamsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAllocatedSnapshotStreamsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAllocatedSnapshotStreamsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRankedVideoStreamPrioritiesListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeRankedVideoStreamPrioritiesListID) params:params]; +} + +- (void)writeAttributeRankedVideoStreamPrioritiesListWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeRankedVideoStreamPrioritiesListWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeRankedVideoStreamPrioritiesListWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeRankedVideoStreamPrioritiesListID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeSoftRecordingPrivacyModeEnabledWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSoftRecordingPrivacyModeEnabledID) params:params]; +} + +- (void)writeAttributeSoftRecordingPrivacyModeEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeSoftRecordingPrivacyModeEnabledWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeSoftRecordingPrivacyModeEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSoftRecordingPrivacyModeEnabledID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeSoftLivestreamPrivacyModeEnabledWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSoftLivestreamPrivacyModeEnabledID) params:params]; +} + +- (void)writeAttributeSoftLivestreamPrivacyModeEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeSoftLivestreamPrivacyModeEnabledWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeSoftLivestreamPrivacyModeEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSoftLivestreamPrivacyModeEnabledID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeHardPrivacyModeOnWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeHardPrivacyModeOnID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeNightVisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeNightVisionID) params:params]; +} + +- (void)writeAttributeNightVisionWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeNightVisionWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeNightVisionWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeNightVisionID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeNightVisionIllumWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeNightVisionIllumID) params:params]; +} + +- (void)writeAttributeNightVisionIllumWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeNightVisionIllumWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeNightVisionIllumWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeNightVisionIllumID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeAWBEnabledWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAWBEnabledID) params:params]; +} + +- (void)writeAttributeAWBEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeAWBEnabledWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeAWBEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAWBEnabledID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeAutoShutterSpeedEnabledWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAutoShutterSpeedEnabledID) params:params]; +} + +- (void)writeAttributeAutoShutterSpeedEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeAutoShutterSpeedEnabledWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeAutoShutterSpeedEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAutoShutterSpeedEnabledID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeAutoISOEnabledWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAutoISOEnabledID) params:params]; +} + +- (void)writeAttributeAutoISOEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeAutoISOEnabledWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeAutoISOEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAutoISOEnabledID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeViewportWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeViewportID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeSpeakerMutedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerMutedID) params:params]; +} + +- (void)writeAttributeSpeakerMutedWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeSpeakerMutedWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeSpeakerMutedWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerMutedID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeSpeakerVolumeLevelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerVolumeLevelID) params:params]; +} + +- (void)writeAttributeSpeakerVolumeLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeSpeakerVolumeLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeSpeakerVolumeLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerVolumeLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeSpeakerMaxLevelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerMaxLevelID) params:params]; +} + +- (void)writeAttributeSpeakerMaxLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeSpeakerMaxLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeSpeakerMaxLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerMaxLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeSpeakerMinLevelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerMinLevelID) params:params]; +} + +- (void)writeAttributeSpeakerMinLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeSpeakerMinLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeSpeakerMinLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerMinLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeMicrophoneMutedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneMutedID) params:params]; +} + +- (void)writeAttributeMicrophoneMutedWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeMicrophoneMutedWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeMicrophoneMutedWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneMutedID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeMicrophoneVolumeLevelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneVolumeLevelID) params:params]; +} + +- (void)writeAttributeMicrophoneVolumeLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeMicrophoneVolumeLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeMicrophoneVolumeLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneVolumeLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeMicrophoneMaxLevelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneMaxLevelID) params:params]; +} + +- (void)writeAttributeMicrophoneMaxLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeMicrophoneMaxLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeMicrophoneMaxLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneMaxLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeMicrophoneMinLevelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneMinLevelID) params:params]; +} + +- (void)writeAttributeMicrophoneMinLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeMicrophoneMinLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeMicrophoneMinLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneMinLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeMicrophoneAGCEnabledWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneAGCEnabledID) params:params]; +} + +- (void)writeAttributeMicrophoneAGCEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeMicrophoneAGCEnabledWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeMicrophoneAGCEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneAGCEnabledID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeImageRotationWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeImageRotationID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeImageFlipHorizontalWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeImageFlipHorizontalID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeImageFlipVerticalWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeImageFlipVerticalID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeLocalVideoRecordingEnabledWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeLocalVideoRecordingEnabledID) params:params]; +} + +- (void)writeAttributeLocalVideoRecordingEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeLocalVideoRecordingEnabledWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeLocalVideoRecordingEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeLocalVideoRecordingEnabledID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeLocalSnapshotRecordingEnabledWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeLocalSnapshotRecordingEnabledID) params:params]; +} + +- (void)writeAttributeLocalSnapshotRecordingEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeLocalSnapshotRecordingEnabledWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeLocalSnapshotRecordingEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeLocalSnapshotRecordingEnabledID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeStatusLightEnabledWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeStatusLightEnabledID) params:params]; +} + +- (void)writeAttributeStatusLightEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeStatusLightEnabledWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeStatusLightEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeStatusLightEnabledID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeStatusLightBrightnessWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeStatusLightBrightnessID) params:params]; +} + +- (void)writeAttributeStatusLightBrightnessWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeStatusLightBrightnessWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeStatusLightBrightnessWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeStatusLightBrightnessID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeDepthSensorStatusWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeDepthSensorStatusID) params:params]; +} + +- (void)writeAttributeDepthSensorStatusWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeDepthSensorStatusWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeDepthSensorStatusWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeDepthSensorStatusID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterWebRTCTransportProvider + +- (void)solicitOfferWithParams:(MTRWebRTCTransportProviderClusterSolicitOfferParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRWebRTCTransportProviderClusterSolicitOfferResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRWebRTCTransportProviderClusterSolicitOfferParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = WebRTCTransportProvider::Commands::SolicitOffer::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRWebRTCTransportProviderClusterSolicitOfferResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)provideOfferWithParams:(MTRWebRTCTransportProviderClusterProvideOfferParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRWebRTCTransportProviderClusterProvideOfferResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRWebRTCTransportProviderClusterProvideOfferParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = WebRTCTransportProvider::Commands::ProvideOffer::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRWebRTCTransportProviderClusterProvideOfferResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)provideAnswerWithParams:(MTRWebRTCTransportProviderClusterProvideAnswerParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRWebRTCTransportProviderClusterProvideAnswerParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = WebRTCTransportProvider::Commands::ProvideAnswer::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)provideICECandidateWithParams:(MTRWebRTCTransportProviderClusterProvideICECandidateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRWebRTCTransportProviderClusterProvideICECandidateParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = WebRTCTransportProvider::Commands::ProvideICECandidate::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)endSessionWithParams:(MTRWebRTCTransportProviderClusterEndSessionParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRWebRTCTransportProviderClusterEndSessionParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = WebRTCTransportProvider::Commands::EndSession::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentSessionsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWebRTCTransportProviderID) attributeID:@(MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeCurrentSessionsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWebRTCTransportProviderID) attributeID:@(MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWebRTCTransportProviderID) attributeID:@(MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWebRTCTransportProviderID) attributeID:@(MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWebRTCTransportProviderID) attributeID:@(MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWebRTCTransportProviderID) attributeID:@(MTRAttributeIDTypeClusterWebRTCTransportProviderAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterWebRTCTransportRequestor + +- (void)offerWithParams:(MTRWebRTCTransportRequestorClusterOfferParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRWebRTCTransportRequestorClusterOfferParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = WebRTCTransportRequestor::Commands::Offer::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)answerWithParams:(MTRWebRTCTransportRequestorClusterAnswerParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRWebRTCTransportRequestorClusterAnswerParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = WebRTCTransportRequestor::Commands::Answer::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)ICECandidateWithParams:(MTRWebRTCTransportRequestorClusterICECandidateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRWebRTCTransportRequestorClusterICECandidateParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = WebRTCTransportRequestor::Commands::ICECandidate::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)endWithParams:(MTRWebRTCTransportRequestorClusterEndParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRWebRTCTransportRequestorClusterEndParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = WebRTCTransportRequestor::Commands::End::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentSessionsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWebRTCTransportRequestorID) attributeID:@(MTRAttributeIDTypeClusterWebRTCTransportRequestorAttributeCurrentSessionsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWebRTCTransportRequestorID) attributeID:@(MTRAttributeIDTypeClusterWebRTCTransportRequestorAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWebRTCTransportRequestorID) attributeID:@(MTRAttributeIDTypeClusterWebRTCTransportRequestorAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWebRTCTransportRequestorID) attributeID:@(MTRAttributeIDTypeClusterWebRTCTransportRequestorAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWebRTCTransportRequestorID) attributeID:@(MTRAttributeIDTypeClusterWebRTCTransportRequestorAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeWebRTCTransportRequestorID) attributeID:@(MTRAttributeIDTypeClusterWebRTCTransportRequestorAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterChime + +- (void)playChimeSoundWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { [self playChimeSoundWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } @@ -19803,11 +20330,6 @@ - (void)writeAttributeEnabledWithValue:(NSDictionary *)dataValue return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChimeID) attributeID:@(MTRAttributeIDTypeClusterChimeAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChimeID) attributeID:@(MTRAttributeIDTypeClusterChimeAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChimeID) attributeID:@(MTRAttributeIDTypeClusterChimeAttributeAttributeListID) params:params]; @@ -19847,11 +20369,6 @@ @implementation MTRClusterEcosystemInformation return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEcosystemInformationID) attributeID:@(MTRAttributeIDTypeClusterEcosystemInformationAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEcosystemInformationID) attributeID:@(MTRAttributeIDTypeClusterEcosystemInformationAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEcosystemInformationID) attributeID:@(MTRAttributeIDTypeClusterEcosystemInformationAttributeAttributeListID) params:params]; @@ -19940,11 +20457,6 @@ - (void)commissionNodeWithParams:(MTRCommissionerControlClusterCommissionNodePar return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommissionerControlID) attributeID:@(MTRAttributeIDTypeClusterCommissionerControlAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommissionerControlID) attributeID:@(MTRAttributeIDTypeClusterCommissionerControlAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommissionerControlID) attributeID:@(MTRAttributeIDTypeClusterCommissionerControlAttributeAttributeListID) params:params]; @@ -22145,11 +22657,6 @@ - (void)writeAttributeNullableGlobalStructWithValue:(NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeAttributeListID) params:params]; @@ -22469,11 +22976,6 @@ - (void)writeAttributeFlipFlopWithValue:(NSDictionary *)dataValu return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSampleMEIID) attributeID:@(MTRAttributeIDTypeClusterSampleMEIAttributeAcceptedCommandListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSampleMEIID) attributeID:@(MTRAttributeIDTypeClusterSampleMEIAttributeEventListID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeSampleMEIID) attributeID:@(MTRAttributeIDTypeClusterSampleMEIAttributeAttributeListID) params:params]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 2aeb25d7a6..6a5580c95b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -10835,6 +10835,686 @@ MTR_PROVISIONALLY_AVAILABLE error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRZoneManagementClusterCreateTwoDCartesianZoneParams : NSObject + +@property (nonatomic, copy) MTRZoneManagementClusterTwoDCartesianZoneStruct * _Nonnull zone MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRZoneManagementClusterCreateTwoDCartesianZoneResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull zoneID MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRZoneManagementClusterCreateTwoDCartesianZoneResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRZoneManagementClusterUpdateTwoDCartesianZoneParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull zoneID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) MTRZoneManagementClusterTwoDCartesianZoneStruct * _Nonnull zone MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRZoneManagementClusterGetTwoDCartesianZoneParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nullable zoneID MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRZoneManagementClusterGetTwoDCartesianZoneResponseParams : NSObject + +@property (nonatomic, copy) NSArray * _Nonnull zones MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRZoneManagementClusterGetTwoDCartesianZoneResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRZoneManagementClusterRemoveZoneParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull zoneID MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterAudioStreamAllocateParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull streamType MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull audioCodec MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull channelCount MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull sampleRate MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull bitRate MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull bitDepth MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterAudioStreamAllocateResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull audioStreamID MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRCameraAVStreamManagementClusterAudioStreamAllocateResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterAudioStreamDeallocateParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull audioStreamID MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterVideoStreamAllocateParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull streamType MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull videoCodec MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull minFrameRate MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull maxFrameRate MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nonnull minResolution MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nonnull maxResolution MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull minBitRate MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull maxBitRate MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull minFragmentLen MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull maxFragmentLen MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nullable watermarkEnabled MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nullable osdEnabled MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterVideoStreamAllocateResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull videoStreamID MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRCameraAVStreamManagementClusterVideoStreamAllocateResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterVideoStreamModifyParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull videoStreamID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nullable resolution MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nullable watermarkEnabled MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nullable osdEnabled MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterVideoStreamDeallocateParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull videoStreamID MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterSnapshotStreamAllocateParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull imageCodec MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull frameRate MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull bitRate MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nonnull minResolution MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nonnull maxResolution MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull quality MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterSnapshotStreamAllocateResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull snapshotStreamID MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRCameraAVStreamManagementClusterSnapshotStreamAllocateResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterSnapshotStreamDeallocateParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull snapshotStreamID MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterSetStreamPrioritiesParams : NSObject + +@property (nonatomic, copy) NSArray * _Nonnull streamPriorities MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterCaptureSnapshotParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull snapshotStreamID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nonnull requestedResolution MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterCaptureSnapshotResponseParams : NSObject + +@property (nonatomic, copy) NSData * _Nonnull data MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull imageCodec MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nonnull resolution MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRCameraAVStreamManagementClusterCaptureSnapshotResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterSetViewportParams : NSObject + +@property (nonatomic, copy) MTRCameraAVStreamManagementClusterViewportStruct * _Nonnull viewport MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterSetImageRotationParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull angle MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterSetImageFlipHorizontalParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull enabled MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterSetImageFlipVerticalParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull enabled MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + MTR_PROVISIONALLY_AVAILABLE @interface MTRWebRTCTransportProviderClusterSolicitOfferParams : NSObject @@ -11063,6 +11743,138 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRWebRTCTransportRequestorClusterOfferParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull webRTCSessionID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSString * _Nonnull sdp MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSArray * _Nullable iceServers MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSString * _Nullable iceTransportPolicy MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRWebRTCTransportRequestorClusterAnswerParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull webRTCSessionID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSString * _Nonnull sdp MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRWebRTCTransportRequestorClusterICECandidateParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull webRTCSessionID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSString * _Nonnull iceCandidate MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRWebRTCTransportRequestorClusterEndParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull webRTCSessionID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull reason MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + MTR_PROVISIONALLY_AVAILABLE @interface MTRChimeClusterPlayChimeSoundParams : NSObject /** diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index a922f58315..2010627d89 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -31337,6 +31337,2148 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ContentA @end +@implementation MTRZoneManagementClusterCreateTwoDCartesianZoneParams +- (instancetype)init +{ + if (self = [super init]) { + + _zone = [MTRZoneManagementClusterTwoDCartesianZoneStruct new]; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRZoneManagementClusterCreateTwoDCartesianZoneParams alloc] init]; + + other.zone = self.zone; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: zone:%@; >", NSStringFromClass([self class]), _zone]; + return descriptionString; +} + +@end + +@implementation MTRZoneManagementClusterCreateTwoDCartesianZoneParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ZoneManagement::Commands::CreateTwoDCartesianZone::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.zone.name = AsCharSpan(self.zone.name); + encodableStruct.zone.use = static_cast>(self.zone.use.unsignedCharValue); + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (self.zone.vertices.count != 0) { + auto * listHolder_1 = new ListHolder(self.zone.vertices.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < self.zone.vertices.count; ++i_1) { + if (![self.zone.vertices[i_1] isKindOfClass:[MTRZoneManagementClusterTwoDCartesianVertexStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_1 = (MTRZoneManagementClusterTwoDCartesianVertexStruct *) self.zone.vertices[i_1]; + listHolder_1->mList[i_1].x = element_1.x.unsignedShortValue; + listHolder_1->mList[i_1].y = element_1.y.unsignedShortValue; + } + encodableStruct.zone.vertices = ListType_1(listHolder_1->mList, self.zone.vertices.count); + } else { + encodableStruct.zone.vertices = ListType_1(); + } + } + if (self.zone.color != nil) { + auto & definedValue_1 = encodableStruct.zone.color.Emplace(); + definedValue_1 = AsCharSpan(self.zone.color); + } + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRZoneManagementClusterCreateTwoDCartesianZoneResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _zoneID = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRZoneManagementClusterCreateTwoDCartesianZoneResponseParams alloc] init]; + + other.zoneID = self.zoneID; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: zoneID:%@; >", NSStringFromClass([self class]), _zoneID]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::ZoneManagement::Commands::CreateTwoDCartesianZoneResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRZoneManagementClusterCreateTwoDCartesianZoneResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ZoneManagement::Commands::CreateTwoDCartesianZoneResponse::DecodableType &)decodableStruct +{ + { + self.zoneID = [NSNumber numberWithUnsignedShort:decodableStruct.zoneID]; + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTRZoneManagementClusterUpdateTwoDCartesianZoneParams +- (instancetype)init +{ + if (self = [super init]) { + + _zoneID = @(0); + + _zone = [MTRZoneManagementClusterTwoDCartesianZoneStruct new]; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRZoneManagementClusterUpdateTwoDCartesianZoneParams alloc] init]; + + other.zoneID = self.zoneID; + other.zone = self.zone; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: zoneID:%@; zone:%@; >", NSStringFromClass([self class]), _zoneID, _zone]; + return descriptionString; +} + +@end + +@implementation MTRZoneManagementClusterUpdateTwoDCartesianZoneParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ZoneManagement::Commands::UpdateTwoDCartesianZone::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.zoneID = self.zoneID.unsignedShortValue; + } + { + encodableStruct.zone.name = AsCharSpan(self.zone.name); + encodableStruct.zone.use = static_cast>(self.zone.use.unsignedCharValue); + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (self.zone.vertices.count != 0) { + auto * listHolder_1 = new ListHolder(self.zone.vertices.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < self.zone.vertices.count; ++i_1) { + if (![self.zone.vertices[i_1] isKindOfClass:[MTRZoneManagementClusterTwoDCartesianVertexStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_1 = (MTRZoneManagementClusterTwoDCartesianVertexStruct *) self.zone.vertices[i_1]; + listHolder_1->mList[i_1].x = element_1.x.unsignedShortValue; + listHolder_1->mList[i_1].y = element_1.y.unsignedShortValue; + } + encodableStruct.zone.vertices = ListType_1(listHolder_1->mList, self.zone.vertices.count); + } else { + encodableStruct.zone.vertices = ListType_1(); + } + } + if (self.zone.color != nil) { + auto & definedValue_1 = encodableStruct.zone.color.Emplace(); + definedValue_1 = AsCharSpan(self.zone.color); + } + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRZoneManagementClusterGetTwoDCartesianZoneParams +- (instancetype)init +{ + if (self = [super init]) { + + _zoneID = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRZoneManagementClusterGetTwoDCartesianZoneParams alloc] init]; + + other.zoneID = self.zoneID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: zoneID:%@; >", NSStringFromClass([self class]), _zoneID]; + return descriptionString; +} + +@end + +@implementation MTRZoneManagementClusterGetTwoDCartesianZoneParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ZoneManagement::Commands::GetTwoDCartesianZone::Type encodableStruct; + ListFreer listFreer; + { + if (self.zoneID != nil) { + auto & definedValue_0 = encodableStruct.zoneID.Emplace(); + if (self.zoneID == nil) { + definedValue_0.SetNull(); + } else { + auto & nonNullValue_1 = definedValue_0.SetNonNull(); + nonNullValue_1 = self.zoneID.unsignedShortValue; + } + } + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRZoneManagementClusterGetTwoDCartesianZoneResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _zones = [NSArray array]; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRZoneManagementClusterGetTwoDCartesianZoneResponseParams alloc] init]; + + other.zones = self.zones; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: zones:%@; >", NSStringFromClass([self class]), _zones]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::ZoneManagement::Commands::GetTwoDCartesianZoneResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRZoneManagementClusterGetTwoDCartesianZoneResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ZoneManagement::Commands::GetTwoDCartesianZoneResponse::DecodableType &)decodableStruct +{ + { + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = decodableStruct.zones.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRZoneManagementClusterTwoDCartesianZoneStruct * newElement_0; + newElement_0 = [MTRZoneManagementClusterTwoDCartesianZoneStruct new]; + newElement_0.name = AsString(entry_0.name); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + newElement_0.use = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.use)]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.vertices.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + MTRZoneManagementClusterTwoDCartesianVertexStruct * newElement_2; + newElement_2 = [MTRZoneManagementClusterTwoDCartesianVertexStruct new]; + newElement_2.x = [NSNumber numberWithUnsignedShort:entry_2.x]; + newElement_2.y = [NSNumber numberWithUnsignedShort:entry_2.y]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + newElement_0.vertices = array_2; + } + if (entry_0.color.HasValue()) { + newElement_0.color = AsString(entry_0.color.Value()); + if (newElement_0.color == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + newElement_0.color = nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + self.zones = array_0; + } + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTRZoneManagementClusterRemoveZoneParams +- (instancetype)init +{ + if (self = [super init]) { + + _zoneID = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRZoneManagementClusterRemoveZoneParams alloc] init]; + + other.zoneID = self.zoneID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: zoneID:%@; >", NSStringFromClass([self class]), _zoneID]; + return descriptionString; +} + +@end + +@implementation MTRZoneManagementClusterRemoveZoneParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ZoneManagement::Commands::RemoveZone::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.zoneID = self.zoneID.unsignedShortValue; + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRCameraAVStreamManagementClusterAudioStreamAllocateParams +- (instancetype)init +{ + if (self = [super init]) { + + _streamType = @(0); + + _audioCodec = @(0); + + _channelCount = @(0); + + _sampleRate = @(0); + + _bitRate = @(0); + + _bitDepth = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRCameraAVStreamManagementClusterAudioStreamAllocateParams alloc] init]; + + other.streamType = self.streamType; + other.audioCodec = self.audioCodec; + other.channelCount = self.channelCount; + other.sampleRate = self.sampleRate; + other.bitRate = self.bitRate; + other.bitDepth = self.bitDepth; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: streamType:%@; audioCodec:%@; channelCount:%@; sampleRate:%@; bitRate:%@; bitDepth:%@; >", NSStringFromClass([self class]), _streamType, _audioCodec, _channelCount, _sampleRate, _bitRate, _bitDepth]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterAudioStreamAllocateParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::CameraAvStreamManagement::Commands::AudioStreamAllocate::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.streamType = static_cast>(self.streamType.unsignedCharValue); + } + { + encodableStruct.audioCodec = static_cast>(self.audioCodec.unsignedCharValue); + } + { + encodableStruct.channelCount = self.channelCount.unsignedCharValue; + } + { + encodableStruct.sampleRate = self.sampleRate.unsignedIntValue; + } + { + encodableStruct.bitRate = self.bitRate.unsignedIntValue; + } + { + encodableStruct.bitDepth = self.bitDepth.unsignedCharValue; + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRCameraAVStreamManagementClusterAudioStreamAllocateResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _audioStreamID = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRCameraAVStreamManagementClusterAudioStreamAllocateResponseParams alloc] init]; + + other.audioStreamID = self.audioStreamID; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: audioStreamID:%@; >", NSStringFromClass([self class]), _audioStreamID]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::CameraAvStreamManagement::Commands::AudioStreamAllocateResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterAudioStreamAllocateResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::CameraAvStreamManagement::Commands::AudioStreamAllocateResponse::DecodableType &)decodableStruct +{ + { + self.audioStreamID = [NSNumber numberWithUnsignedShort:decodableStruct.audioStreamID]; + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterAudioStreamDeallocateParams +- (instancetype)init +{ + if (self = [super init]) { + + _audioStreamID = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRCameraAVStreamManagementClusterAudioStreamDeallocateParams alloc] init]; + + other.audioStreamID = self.audioStreamID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: audioStreamID:%@; >", NSStringFromClass([self class]), _audioStreamID]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterAudioStreamDeallocateParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::CameraAvStreamManagement::Commands::AudioStreamDeallocate::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.audioStreamID = self.audioStreamID.unsignedShortValue; + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRCameraAVStreamManagementClusterVideoStreamAllocateParams +- (instancetype)init +{ + if (self = [super init]) { + + _streamType = @(0); + + _videoCodec = @(0); + + _minFrameRate = @(0); + + _maxFrameRate = @(0); + + _minResolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + + _maxResolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + + _minBitRate = @(0); + + _maxBitRate = @(0); + + _minFragmentLen = @(0); + + _maxFragmentLen = @(0); + + _watermarkEnabled = nil; + + _osdEnabled = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRCameraAVStreamManagementClusterVideoStreamAllocateParams alloc] init]; + + other.streamType = self.streamType; + other.videoCodec = self.videoCodec; + other.minFrameRate = self.minFrameRate; + other.maxFrameRate = self.maxFrameRate; + other.minResolution = self.minResolution; + other.maxResolution = self.maxResolution; + other.minBitRate = self.minBitRate; + other.maxBitRate = self.maxBitRate; + other.minFragmentLen = self.minFragmentLen; + other.maxFragmentLen = self.maxFragmentLen; + other.watermarkEnabled = self.watermarkEnabled; + other.osdEnabled = self.osdEnabled; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: streamType:%@; videoCodec:%@; minFrameRate:%@; maxFrameRate:%@; minResolution:%@; maxResolution:%@; minBitRate:%@; maxBitRate:%@; minFragmentLen:%@; maxFragmentLen:%@; watermarkEnabled:%@; osdEnabled:%@; >", NSStringFromClass([self class]), _streamType, _videoCodec, _minFrameRate, _maxFrameRate, _minResolution, _maxResolution, _minBitRate, _maxBitRate, _minFragmentLen, _maxFragmentLen, _watermarkEnabled, _osdEnabled]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterVideoStreamAllocateParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::CameraAvStreamManagement::Commands::VideoStreamAllocate::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.streamType = static_cast>(self.streamType.unsignedCharValue); + } + { + encodableStruct.videoCodec = static_cast>(self.videoCodec.unsignedCharValue); + } + { + encodableStruct.minFrameRate = self.minFrameRate.unsignedShortValue; + } + { + encodableStruct.maxFrameRate = self.maxFrameRate.unsignedShortValue; + } + { + encodableStruct.minResolution.width = self.minResolution.width.unsignedShortValue; + encodableStruct.minResolution.height = self.minResolution.height.unsignedShortValue; + } + { + encodableStruct.maxResolution.width = self.maxResolution.width.unsignedShortValue; + encodableStruct.maxResolution.height = self.maxResolution.height.unsignedShortValue; + } + { + encodableStruct.minBitRate = self.minBitRate.unsignedIntValue; + } + { + encodableStruct.maxBitRate = self.maxBitRate.unsignedIntValue; + } + { + encodableStruct.minFragmentLen = self.minFragmentLen.unsignedShortValue; + } + { + encodableStruct.maxFragmentLen = self.maxFragmentLen.unsignedShortValue; + } + { + if (self.watermarkEnabled != nil) { + auto & definedValue_0 = encodableStruct.watermarkEnabled.Emplace(); + definedValue_0 = self.watermarkEnabled.boolValue; + } + } + { + if (self.osdEnabled != nil) { + auto & definedValue_0 = encodableStruct.OSDEnabled.Emplace(); + definedValue_0 = self.osdEnabled.boolValue; + } + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRCameraAVStreamManagementClusterVideoStreamAllocateResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _videoStreamID = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRCameraAVStreamManagementClusterVideoStreamAllocateResponseParams alloc] init]; + + other.videoStreamID = self.videoStreamID; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: videoStreamID:%@; >", NSStringFromClass([self class]), _videoStreamID]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::CameraAvStreamManagement::Commands::VideoStreamAllocateResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterVideoStreamAllocateResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::CameraAvStreamManagement::Commands::VideoStreamAllocateResponse::DecodableType &)decodableStruct +{ + { + self.videoStreamID = [NSNumber numberWithUnsignedShort:decodableStruct.videoStreamID]; + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterVideoStreamModifyParams +- (instancetype)init +{ + if (self = [super init]) { + + _videoStreamID = @(0); + + _resolution = nil; + + _watermarkEnabled = nil; + + _osdEnabled = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRCameraAVStreamManagementClusterVideoStreamModifyParams alloc] init]; + + other.videoStreamID = self.videoStreamID; + other.resolution = self.resolution; + other.watermarkEnabled = self.watermarkEnabled; + other.osdEnabled = self.osdEnabled; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: videoStreamID:%@; resolution:%@; watermarkEnabled:%@; osdEnabled:%@; >", NSStringFromClass([self class]), _videoStreamID, _resolution, _watermarkEnabled, _osdEnabled]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterVideoStreamModifyParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::CameraAvStreamManagement::Commands::VideoStreamModify::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.videoStreamID = self.videoStreamID.unsignedShortValue; + } + { + if (self.resolution != nil) { + auto & definedValue_0 = encodableStruct.resolution.Emplace(); + definedValue_0.width = self.resolution.width.unsignedShortValue; + definedValue_0.height = self.resolution.height.unsignedShortValue; + } + } + { + if (self.watermarkEnabled != nil) { + auto & definedValue_0 = encodableStruct.watermarkEnabled.Emplace(); + definedValue_0 = self.watermarkEnabled.boolValue; + } + } + { + if (self.osdEnabled != nil) { + auto & definedValue_0 = encodableStruct.OSDEnabled.Emplace(); + definedValue_0 = self.osdEnabled.boolValue; + } + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRCameraAVStreamManagementClusterVideoStreamDeallocateParams +- (instancetype)init +{ + if (self = [super init]) { + + _videoStreamID = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRCameraAVStreamManagementClusterVideoStreamDeallocateParams alloc] init]; + + other.videoStreamID = self.videoStreamID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: videoStreamID:%@; >", NSStringFromClass([self class]), _videoStreamID]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterVideoStreamDeallocateParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::CameraAvStreamManagement::Commands::VideoStreamDeallocate::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.videoStreamID = self.videoStreamID.unsignedShortValue; + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRCameraAVStreamManagementClusterSnapshotStreamAllocateParams +- (instancetype)init +{ + if (self = [super init]) { + + _imageCodec = @(0); + + _frameRate = @(0); + + _bitRate = @(0); + + _minResolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + + _maxResolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + + _quality = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRCameraAVStreamManagementClusterSnapshotStreamAllocateParams alloc] init]; + + other.imageCodec = self.imageCodec; + other.frameRate = self.frameRate; + other.bitRate = self.bitRate; + other.minResolution = self.minResolution; + other.maxResolution = self.maxResolution; + other.quality = self.quality; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: imageCodec:%@; frameRate:%@; bitRate:%@; minResolution:%@; maxResolution:%@; quality:%@; >", NSStringFromClass([self class]), _imageCodec, _frameRate, _bitRate, _minResolution, _maxResolution, _quality]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterSnapshotStreamAllocateParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::CameraAvStreamManagement::Commands::SnapshotStreamAllocate::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.imageCodec = static_cast>(self.imageCodec.unsignedCharValue); + } + { + encodableStruct.frameRate = self.frameRate.unsignedShortValue; + } + { + encodableStruct.bitRate = self.bitRate.unsignedIntValue; + } + { + encodableStruct.minResolution.width = self.minResolution.width.unsignedShortValue; + encodableStruct.minResolution.height = self.minResolution.height.unsignedShortValue; + } + { + encodableStruct.maxResolution.width = self.maxResolution.width.unsignedShortValue; + encodableStruct.maxResolution.height = self.maxResolution.height.unsignedShortValue; + } + { + encodableStruct.quality = self.quality.unsignedCharValue; + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRCameraAVStreamManagementClusterSnapshotStreamAllocateResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _snapshotStreamID = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRCameraAVStreamManagementClusterSnapshotStreamAllocateResponseParams alloc] init]; + + other.snapshotStreamID = self.snapshotStreamID; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: snapshotStreamID:%@; >", NSStringFromClass([self class]), _snapshotStreamID]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::CameraAvStreamManagement::Commands::SnapshotStreamAllocateResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterSnapshotStreamAllocateResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::CameraAvStreamManagement::Commands::SnapshotStreamAllocateResponse::DecodableType &)decodableStruct +{ + { + self.snapshotStreamID = [NSNumber numberWithUnsignedShort:decodableStruct.snapshotStreamID]; + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterSnapshotStreamDeallocateParams +- (instancetype)init +{ + if (self = [super init]) { + + _snapshotStreamID = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRCameraAVStreamManagementClusterSnapshotStreamDeallocateParams alloc] init]; + + other.snapshotStreamID = self.snapshotStreamID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: snapshotStreamID:%@; >", NSStringFromClass([self class]), _snapshotStreamID]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterSnapshotStreamDeallocateParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::CameraAvStreamManagement::Commands::SnapshotStreamDeallocate::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.snapshotStreamID = self.snapshotStreamID.unsignedShortValue; + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRCameraAVStreamManagementClusterSetStreamPrioritiesParams +- (instancetype)init +{ + if (self = [super init]) { + + _streamPriorities = [NSArray array]; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRCameraAVStreamManagementClusterSetStreamPrioritiesParams alloc] init]; + + other.streamPriorities = self.streamPriorities; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: streamPriorities:%@; >", NSStringFromClass([self class]), _streamPriorities]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterSetStreamPrioritiesParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::CameraAvStreamManagement::Commands::SetStreamPriorities::Type encodableStruct; + ListFreer listFreer; + { + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.streamPriorities.count != 0) { + auto * listHolder_0 = new ListHolder(self.streamPriorities.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < self.streamPriorities.count; ++i_0) { + if (![self.streamPriorities[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) self.streamPriorities[i_0]; + listHolder_0->mList[i_0] = static_castmList[i_0])>>(element_0.unsignedCharValue); + } + encodableStruct.streamPriorities = ListType_0(listHolder_0->mList, self.streamPriorities.count); + } else { + encodableStruct.streamPriorities = ListType_0(); + } + } + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRCameraAVStreamManagementClusterCaptureSnapshotParams +- (instancetype)init +{ + if (self = [super init]) { + + _snapshotStreamID = @(0); + + _requestedResolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRCameraAVStreamManagementClusterCaptureSnapshotParams alloc] init]; + + other.snapshotStreamID = self.snapshotStreamID; + other.requestedResolution = self.requestedResolution; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: snapshotStreamID:%@; requestedResolution:%@; >", NSStringFromClass([self class]), _snapshotStreamID, _requestedResolution]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterCaptureSnapshotParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::CameraAvStreamManagement::Commands::CaptureSnapshot::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.snapshotStreamID = self.snapshotStreamID.unsignedShortValue; + } + { + encodableStruct.requestedResolution.width = self.requestedResolution.width.unsignedShortValue; + encodableStruct.requestedResolution.height = self.requestedResolution.height.unsignedShortValue; + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRCameraAVStreamManagementClusterCaptureSnapshotResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _data = [NSData data]; + + _imageCodec = @(0); + + _resolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRCameraAVStreamManagementClusterCaptureSnapshotResponseParams alloc] init]; + + other.data = self.data; + other.imageCodec = self.imageCodec; + other.resolution = self.resolution; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: data:%@; imageCodec:%@; resolution:%@; >", NSStringFromClass([self class]), [_data base64EncodedStringWithOptions:0], _imageCodec, _resolution]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::CameraAvStreamManagement::Commands::CaptureSnapshotResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterCaptureSnapshotResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::CameraAvStreamManagement::Commands::CaptureSnapshotResponse::DecodableType &)decodableStruct +{ + { + self.data = AsData(decodableStruct.data); + } + { + self.imageCodec = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.imageCodec)]; + } + { + self.resolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + self.resolution.width = [NSNumber numberWithUnsignedShort:decodableStruct.resolution.width]; + self.resolution.height = [NSNumber numberWithUnsignedShort:decodableStruct.resolution.height]; + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterSetViewportParams +- (instancetype)init +{ + if (self = [super init]) { + + _viewport = [MTRCameraAVStreamManagementClusterViewportStruct new]; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRCameraAVStreamManagementClusterSetViewportParams alloc] init]; + + other.viewport = self.viewport; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: viewport:%@; >", NSStringFromClass([self class]), _viewport]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterSetViewportParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::CameraAvStreamManagement::Commands::SetViewport::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.viewport.x1 = self.viewport.x1.unsignedShortValue; + encodableStruct.viewport.y1 = self.viewport.y1.unsignedShortValue; + encodableStruct.viewport.x2 = self.viewport.x2.unsignedShortValue; + encodableStruct.viewport.y2 = self.viewport.y2.unsignedShortValue; + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRCameraAVStreamManagementClusterSetImageRotationParams +- (instancetype)init +{ + if (self = [super init]) { + + _angle = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRCameraAVStreamManagementClusterSetImageRotationParams alloc] init]; + + other.angle = self.angle; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: angle:%@; >", NSStringFromClass([self class]), _angle]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterSetImageRotationParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::CameraAvStreamManagement::Commands::SetImageRotation::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.angle = self.angle.unsignedShortValue; + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRCameraAVStreamManagementClusterSetImageFlipHorizontalParams +- (instancetype)init +{ + if (self = [super init]) { + + _enabled = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRCameraAVStreamManagementClusterSetImageFlipHorizontalParams alloc] init]; + + other.enabled = self.enabled; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: enabled:%@; >", NSStringFromClass([self class]), _enabled]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterSetImageFlipHorizontalParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::CameraAvStreamManagement::Commands::SetImageFlipHorizontal::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.enabled = self.enabled.boolValue; + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRCameraAVStreamManagementClusterSetImageFlipVerticalParams +- (instancetype)init +{ + if (self = [super init]) { + + _enabled = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRCameraAVStreamManagementClusterSetImageFlipVerticalParams alloc] init]; + + other.enabled = self.enabled; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: enabled:%@; >", NSStringFromClass([self class]), _enabled]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterSetImageFlipVerticalParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::CameraAvStreamManagement::Commands::SetImageFlipVertical::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.enabled = self.enabled.boolValue; + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + @implementation MTRWebRTCTransportProviderClusterSolicitOfferParams - (instancetype)init { @@ -31361,8 +33503,315 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWebRTCTransportProviderClusterSolicitOfferParams alloc] init]; + auto other = [[MTRWebRTCTransportProviderClusterSolicitOfferParams alloc] init]; + + other.streamType = self.streamType; + other.videoStreamID = self.videoStreamID; + other.audioStreamID = self.audioStreamID; + other.iceServers = self.iceServers; + other.iceTransportPolicy = self.iceTransportPolicy; + other.metadataOptions = self.metadataOptions; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: streamType:%@; videoStreamID:%@; audioStreamID:%@; iceServers:%@; iceTransportPolicy:%@; metadataOptions:%@; >", NSStringFromClass([self class]), _streamType, _videoStreamID, _audioStreamID, _iceServers, _iceTransportPolicy, _metadataOptions]; + return descriptionString; +} + +@end + +@implementation MTRWebRTCTransportProviderClusterSolicitOfferParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::WebRTCTransportProvider::Commands::SolicitOffer::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.streamType = static_cast>(self.streamType.unsignedCharValue); + } + { + if (self.videoStreamID != nil) { + auto & definedValue_0 = encodableStruct.videoStreamID.Emplace(); + if (self.videoStreamID == nil) { + definedValue_0.SetNull(); + } else { + auto & nonNullValue_1 = definedValue_0.SetNonNull(); + nonNullValue_1 = self.videoStreamID.unsignedShortValue; + } + } + } + { + if (self.audioStreamID != nil) { + auto & definedValue_0 = encodableStruct.audioStreamID.Emplace(); + if (self.audioStreamID == nil) { + definedValue_0.SetNull(); + } else { + auto & nonNullValue_1 = definedValue_0.SetNonNull(); + nonNullValue_1 = self.audioStreamID.unsignedShortValue; + } + } + } + { + if (self.iceServers != nil) { + auto & definedValue_0 = encodableStruct.ICEServers.Emplace(); + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (self.iceServers.count != 0) { + auto * listHolder_1 = new ListHolder(self.iceServers.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < self.iceServers.count; ++i_1) { + if (![self.iceServers[i_1] isKindOfClass:[MTRWebRTCTransportProviderClusterICEServerStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_1 = (MTRWebRTCTransportProviderClusterICEServerStruct *) self.iceServers[i_1]; + { + using ListType_3 = std::remove_reference_tmList[i_1].urls)>; + using ListMemberType_3 = ListMemberTypeGetter::Type; + if (element_1.urls.count != 0) { + auto * listHolder_3 = new ListHolder(element_1.urls.count); + if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_3); + for (size_t i_3 = 0; i_3 < element_1.urls.count; ++i_3) { + if (![element_1.urls[i_3] isKindOfClass:[NSString class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_3 = (NSString *) element_1.urls[i_3]; + listHolder_3->mList[i_3] = AsCharSpan(element_3); + } + listHolder_1->mList[i_1].urls = ListType_3(listHolder_3->mList, element_1.urls.count); + } else { + listHolder_1->mList[i_1].urls = ListType_3(); + } + } + if (element_1.username != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].username.Emplace(); + definedValue_3 = AsCharSpan(element_1.username); + } + if (element_1.credential != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].credential.Emplace(); + definedValue_3 = AsCharSpan(element_1.credential); + } + if (element_1.caid != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].caid.Emplace(); + definedValue_3 = element_1.caid.unsignedShortValue; + } + } + definedValue_0 = ListType_1(listHolder_1->mList, self.iceServers.count); + } else { + definedValue_0 = ListType_1(); + } + } + } + } + { + if (self.iceTransportPolicy != nil) { + auto & definedValue_0 = encodableStruct.ICETransportPolicy.Emplace(); + definedValue_0 = AsCharSpan(self.iceTransportPolicy); + } + } + { + if (self.metadataOptions != nil) { + auto & definedValue_0 = encodableStruct.metadataOptions.Emplace(); + definedValue_0 = static_cast>(self.metadataOptions.unsignedCharValue); + } + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRWebRTCTransportProviderClusterSolicitOfferResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _webRTCSessionID = @(0); + + _deferredOffer = @(0); + + _videoStreamID = nil; + + _audioStreamID = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRWebRTCTransportProviderClusterSolicitOfferResponseParams alloc] init]; + + other.webRTCSessionID = self.webRTCSessionID; + other.deferredOffer = self.deferredOffer; + other.videoStreamID = self.videoStreamID; + other.audioStreamID = self.audioStreamID; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: webRTCSessionID:%@; deferredOffer:%@; videoStreamID:%@; audioStreamID:%@; >", NSStringFromClass([self class]), _webRTCSessionID, _deferredOffer, _videoStreamID, _audioStreamID]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::WebRTCTransportProvider::Commands::SolicitOfferResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRWebRTCTransportProviderClusterSolicitOfferResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::WebRTCTransportProvider::Commands::SolicitOfferResponse::DecodableType &)decodableStruct +{ + { + self.webRTCSessionID = [NSNumber numberWithUnsignedShort:decodableStruct.webRTCSessionID]; + } + { + self.deferredOffer = [NSNumber numberWithBool:decodableStruct.deferredOffer]; + } + { + if (decodableStruct.videoStreamID.HasValue()) { + if (decodableStruct.videoStreamID.Value().IsNull()) { + self.videoStreamID = nil; + } else { + self.videoStreamID = [NSNumber numberWithUnsignedShort:decodableStruct.videoStreamID.Value().Value()]; + } + } else { + self.videoStreamID = nil; + } + } + { + if (decodableStruct.audioStreamID.HasValue()) { + if (decodableStruct.audioStreamID.Value().IsNull()) { + self.audioStreamID = nil; + } else { + self.audioStreamID = [NSNumber numberWithUnsignedShort:decodableStruct.audioStreamID.Value().Value()]; + } + } else { + self.audioStreamID = nil; + } + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTRWebRTCTransportProviderClusterProvideOfferParams +- (instancetype)init +{ + if (self = [super init]) { + + _webRTCSessionID = nil; + + _sdp = @""; + + _streamType = @(0); + + _videoStreamID = nil; + + _audioStreamID = nil; + + _iceServers = nil; + + _iceTransportPolicy = nil; + + _metadataOptions = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRWebRTCTransportProviderClusterProvideOfferParams alloc] init]; + other.webRTCSessionID = self.webRTCSessionID; + other.sdp = self.sdp; other.streamType = self.streamType; other.videoStreamID = self.videoStreamID; other.audioStreamID = self.audioStreamID; @@ -31377,18 +33826,29 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: streamType:%@; videoStreamID:%@; audioStreamID:%@; iceServers:%@; iceTransportPolicy:%@; metadataOptions:%@; >", NSStringFromClass([self class]), _streamType, _videoStreamID, _audioStreamID, _iceServers, _iceTransportPolicy, _metadataOptions]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: webRTCSessionID:%@; sdp:%@; streamType:%@; videoStreamID:%@; audioStreamID:%@; iceServers:%@; iceTransportPolicy:%@; metadataOptions:%@; >", NSStringFromClass([self class]), _webRTCSessionID, _sdp, _streamType, _videoStreamID, _audioStreamID, _iceServers, _iceTransportPolicy, _metadataOptions]; return descriptionString; } @end -@implementation MTRWebRTCTransportProviderClusterSolicitOfferParams (InternalMethods) +@implementation MTRWebRTCTransportProviderClusterProvideOfferParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::WebRTCTransportProvider::Commands::SolicitOffer::Type encodableStruct; + chip::app::Clusters::WebRTCTransportProvider::Commands::ProvideOffer::Type encodableStruct; ListFreer listFreer; + { + if (self.webRTCSessionID == nil) { + encodableStruct.webRTCSessionID.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.webRTCSessionID.SetNonNull(); + nonNullValue_0 = self.webRTCSessionID.unsignedShortValue; + } + } + { + encodableStruct.sdp = AsCharSpan(self.sdp); + } { encodableStruct.streamType = static_cast>(self.streamType.unsignedCharValue); } @@ -31525,28 +33985,25 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRWebRTCTransportProviderClusterSolicitOfferResponseParams +@implementation MTRWebRTCTransportProviderClusterProvideOfferResponseParams - (instancetype)init { if (self = [super init]) { _webRTCSessionID = @(0); - _deferredOffer = @(0); - - _videoStreamID = nil; + _videoStreamID = @(0); - _audioStreamID = nil; + _audioStreamID = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWebRTCTransportProviderClusterSolicitOfferResponseParams alloc] init]; + auto other = [[MTRWebRTCTransportProviderClusterProvideOfferResponseParams alloc] init]; other.webRTCSessionID = self.webRTCSessionID; - other.deferredOffer = self.deferredOffer; other.videoStreamID = self.videoStreamID; other.audioStreamID = self.audioStreamID; @@ -31555,7 +34012,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: webRTCSessionID:%@; deferredOffer:%@; videoStreamID:%@; audioStreamID:%@; >", NSStringFromClass([self class]), _webRTCSessionID, _deferredOffer, _videoStreamID, _audioStreamID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: webRTCSessionID:%@; videoStreamID:%@; audioStreamID:%@; >", NSStringFromClass([self class]), _webRTCSessionID, _videoStreamID, _audioStreamID]; return descriptionString; } @@ -31566,7 +34023,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::WebRTCTransportProvider::Commands::SolicitOfferResponse::DecodableType; + using DecodableType = chip::app::Clusters::WebRTCTransportProvider::Commands::ProvideOfferResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -31575,89 +34032,317 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRWebRTCTransportProviderClusterProvideOfferResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::WebRTCTransportProvider::Commands::ProvideOfferResponse::DecodableType &)decodableStruct +{ + { + self.webRTCSessionID = [NSNumber numberWithUnsignedShort:decodableStruct.webRTCSessionID]; + } + { + self.videoStreamID = [NSNumber numberWithUnsignedShort:decodableStruct.videoStreamID]; + } + { + self.audioStreamID = [NSNumber numberWithUnsignedShort:decodableStruct.audioStreamID]; + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTRWebRTCTransportProviderClusterProvideAnswerParams +- (instancetype)init +{ + if (self = [super init]) { + + _webRTCSessionID = @(0); + + _sdp = @""; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRWebRTCTransportProviderClusterProvideAnswerParams alloc] init]; + + other.webRTCSessionID = self.webRTCSessionID; + other.sdp = self.sdp; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: webRTCSessionID:%@; sdp:%@; >", NSStringFromClass([self class]), _webRTCSessionID, _sdp]; + return descriptionString; +} + +@end + +@implementation MTRWebRTCTransportProviderClusterProvideAnswerParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::WebRTCTransportProvider::Commands::ProvideAnswer::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.webRTCSessionID = self.webRTCSessionID.unsignedShortValue; + } + { + encodableStruct.sdp = AsCharSpan(self.sdp); + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRWebRTCTransportProviderClusterProvideICECandidateParams +- (instancetype)init +{ + if (self = [super init]) { + + _webRTCSessionID = @(0); + + _iceCandidate = @""; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRWebRTCTransportProviderClusterProvideICECandidateParams alloc] init]; + + other.webRTCSessionID = self.webRTCSessionID; + other.iceCandidate = self.iceCandidate; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: webRTCSessionID:%@; iceCandidate:%@; >", NSStringFromClass([self class]), _webRTCSessionID, _iceCandidate]; + return descriptionString; +} + +@end + +@implementation MTRWebRTCTransportProviderClusterProvideICECandidateParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::WebRTCTransportProvider::Commands::ProvideICECandidate::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.webRTCSessionID = self.webRTCSessionID.unsignedShortValue; + } + { + encodableStruct.ICECandidate = AsCharSpan(self.iceCandidate); + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRWebRTCTransportProviderClusterEndSessionParams +- (instancetype)init +{ + if (self = [super init]) { + + _webRTCSessionID = @(0); + + _reason = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRWebRTCTransportProviderClusterEndSessionParams alloc] init]; + + other.webRTCSessionID = self.webRTCSessionID; + other.reason = self.reason; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } + return other; +} - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: webRTCSessionID:%@; reason:%@; >", NSStringFromClass([self class]), _webRTCSessionID, _reason]; + return descriptionString; } @end -@implementation MTRWebRTCTransportProviderClusterSolicitOfferResponseParams (InternalMethods) +@implementation MTRWebRTCTransportProviderClusterEndSessionParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::WebRTCTransportProvider::Commands::SolicitOfferResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { + chip::app::Clusters::WebRTCTransportProvider::Commands::EndSession::Type encodableStruct; + ListFreer listFreer; { - self.webRTCSessionID = [NSNumber numberWithUnsignedShort:decodableStruct.webRTCSessionID]; + encodableStruct.webRTCSessionID = self.webRTCSessionID.unsignedShortValue; } { - self.deferredOffer = [NSNumber numberWithBool:decodableStruct.deferredOffer]; + encodableStruct.reason = static_cast>(self.reason.unsignedCharValue); } - { - if (decodableStruct.videoStreamID.HasValue()) { - if (decodableStruct.videoStreamID.Value().IsNull()) { - self.videoStreamID = nil; - } else { - self.videoStreamID = [NSNumber numberWithUnsignedShort:decodableStruct.videoStreamID.Value().Value()]; - } - } else { - self.videoStreamID = nil; + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; } + return nil; } - { - if (decodableStruct.audioStreamID.HasValue()) { - if (decodableStruct.audioStreamID.Value().IsNull()) { - self.audioStreamID = nil; - } else { - self.audioStreamID = [NSNumber numberWithUnsignedShort:decodableStruct.audioStreamID.Value().Value()]; - } - } else { - self.audioStreamID = nil; + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } - return CHIP_NO_ERROR; + return decodedObj; } - @end -@implementation MTRWebRTCTransportProviderClusterProvideOfferParams +@implementation MTRWebRTCTransportRequestorClusterOfferParams - (instancetype)init { if (self = [super init]) { - _webRTCSessionID = nil; + _webRTCSessionID = @(0); _sdp = @""; - _streamType = @(0); - - _videoStreamID = nil; - - _audioStreamID = nil; - _iceServers = nil; _iceTransportPolicy = nil; - - _metadataOptions = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -31666,16 +34351,12 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWebRTCTransportProviderClusterProvideOfferParams alloc] init]; + auto other = [[MTRWebRTCTransportRequestorClusterOfferParams alloc] init]; other.webRTCSessionID = self.webRTCSessionID; other.sdp = self.sdp; - other.streamType = self.streamType; - other.videoStreamID = self.videoStreamID; - other.audioStreamID = self.audioStreamID; other.iceServers = self.iceServers; other.iceTransportPolicy = self.iceTransportPolicy; - other.metadataOptions = self.metadataOptions; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -31684,54 +34365,24 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: webRTCSessionID:%@; sdp:%@; streamType:%@; videoStreamID:%@; audioStreamID:%@; iceServers:%@; iceTransportPolicy:%@; metadataOptions:%@; >", NSStringFromClass([self class]), _webRTCSessionID, _sdp, _streamType, _videoStreamID, _audioStreamID, _iceServers, _iceTransportPolicy, _metadataOptions]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: webRTCSessionID:%@; sdp:%@; iceServers:%@; iceTransportPolicy:%@; >", NSStringFromClass([self class]), _webRTCSessionID, _sdp, _iceServers, _iceTransportPolicy]; return descriptionString; } @end -@implementation MTRWebRTCTransportProviderClusterProvideOfferParams (InternalMethods) +@implementation MTRWebRTCTransportRequestorClusterOfferParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::WebRTCTransportProvider::Commands::ProvideOffer::Type encodableStruct; + chip::app::Clusters::WebRTCTransportRequestor::Commands::Offer::Type encodableStruct; ListFreer listFreer; { - if (self.webRTCSessionID == nil) { - encodableStruct.webRTCSessionID.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.webRTCSessionID.SetNonNull(); - nonNullValue_0 = self.webRTCSessionID.unsignedShortValue; - } + encodableStruct.webRTCSessionID = self.webRTCSessionID.unsignedShortValue; } { encodableStruct.sdp = AsCharSpan(self.sdp); } - { - encodableStruct.streamType = static_cast>(self.streamType.unsignedCharValue); - } - { - if (self.videoStreamID != nil) { - auto & definedValue_0 = encodableStruct.videoStreamID.Emplace(); - if (self.videoStreamID == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = self.videoStreamID.unsignedShortValue; - } - } - } - { - if (self.audioStreamID != nil) { - auto & definedValue_0 = encodableStruct.audioStreamID.Emplace(); - if (self.audioStreamID == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = self.audioStreamID.unsignedShortValue; - } - } - } { if (self.iceServers != nil) { auto & definedValue_0 = encodableStruct.ICEServers.Emplace(); @@ -31745,11 +34396,11 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } listFreer.add(listHolder_1); for (size_t i_1 = 0; i_1 < self.iceServers.count; ++i_1) { - if (![self.iceServers[i_1] isKindOfClass:[MTRWebRTCTransportProviderClusterICEServerStruct class]]) { + if (![self.iceServers[i_1] isKindOfClass:[MTRWebRTCTransportRequestorClusterICEServerStruct class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_1 = (MTRWebRTCTransportProviderClusterICEServerStruct *) self.iceServers[i_1]; + auto element_1 = (MTRWebRTCTransportRequestorClusterICEServerStruct *) self.iceServers[i_1]; { using ListType_3 = std::remove_reference_tmList[i_1].urls)>; using ListMemberType_3 = ListMemberTypeGetter::Type; @@ -31798,12 +34449,6 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader definedValue_0 = AsCharSpan(self.iceTransportPolicy); } } - { - if (self.metadataOptions != nil) { - auto & definedValue_0 = encodableStruct.metadataOptions.Emplace(); - definedValue_0 = static_cast>(self.metadataOptions.unsignedCharValue); - } - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -31843,98 +34488,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRWebRTCTransportProviderClusterProvideOfferResponseParams -- (instancetype)init -{ - if (self = [super init]) { - - _webRTCSessionID = @(0); - - _videoStreamID = @(0); - - _audioStreamID = @(0); - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRWebRTCTransportProviderClusterProvideOfferResponseParams alloc] init]; - - other.webRTCSessionID = self.webRTCSessionID; - other.videoStreamID = self.videoStreamID; - other.audioStreamID = self.audioStreamID; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: webRTCSessionID:%@; videoStreamID:%@; audioStreamID:%@; >", NSStringFromClass([self class]), _webRTCSessionID, _videoStreamID, _audioStreamID]; - return descriptionString; -} - -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::WebRTCTransportProvider::Commands::ProvideOfferResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } - - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} - -@end - -@implementation MTRWebRTCTransportProviderClusterProvideOfferResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::WebRTCTransportProvider::Commands::ProvideOfferResponse::DecodableType &)decodableStruct -{ - { - self.webRTCSessionID = [NSNumber numberWithUnsignedShort:decodableStruct.webRTCSessionID]; - } - { - self.videoStreamID = [NSNumber numberWithUnsignedShort:decodableStruct.videoStreamID]; - } - { - self.audioStreamID = [NSNumber numberWithUnsignedShort:decodableStruct.audioStreamID]; - } - return CHIP_NO_ERROR; -} - -@end - -@implementation MTRWebRTCTransportProviderClusterProvideAnswerParams +@implementation MTRWebRTCTransportRequestorClusterAnswerParams - (instancetype)init { if (self = [super init]) { @@ -31950,7 +34504,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWebRTCTransportProviderClusterProvideAnswerParams alloc] init]; + auto other = [[MTRWebRTCTransportRequestorClusterAnswerParams alloc] init]; other.webRTCSessionID = self.webRTCSessionID; other.sdp = self.sdp; @@ -31968,11 +34522,11 @@ - (NSString *)description @end -@implementation MTRWebRTCTransportProviderClusterProvideAnswerParams (InternalMethods) +@implementation MTRWebRTCTransportRequestorClusterAnswerParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::WebRTCTransportProvider::Commands::ProvideAnswer::Type encodableStruct; + chip::app::Clusters::WebRTCTransportRequestor::Commands::Answer::Type encodableStruct; ListFreer listFreer; { encodableStruct.webRTCSessionID = self.webRTCSessionID.unsignedShortValue; @@ -32019,7 +34573,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRWebRTCTransportProviderClusterProvideICECandidateParams +@implementation MTRWebRTCTransportRequestorClusterICECandidateParams - (instancetype)init { if (self = [super init]) { @@ -32035,7 +34589,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWebRTCTransportProviderClusterProvideICECandidateParams alloc] init]; + auto other = [[MTRWebRTCTransportRequestorClusterICECandidateParams alloc] init]; other.webRTCSessionID = self.webRTCSessionID; other.iceCandidate = self.iceCandidate; @@ -32053,11 +34607,11 @@ - (NSString *)description @end -@implementation MTRWebRTCTransportProviderClusterProvideICECandidateParams (InternalMethods) +@implementation MTRWebRTCTransportRequestorClusterICECandidateParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::WebRTCTransportProvider::Commands::ProvideICECandidate::Type encodableStruct; + chip::app::Clusters::WebRTCTransportRequestor::Commands::ICECandidate::Type encodableStruct; ListFreer listFreer; { encodableStruct.webRTCSessionID = self.webRTCSessionID.unsignedShortValue; @@ -32104,7 +34658,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRWebRTCTransportProviderClusterEndSessionParams +@implementation MTRWebRTCTransportRequestorClusterEndParams - (instancetype)init { if (self = [super init]) { @@ -32120,7 +34674,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWebRTCTransportProviderClusterEndSessionParams alloc] init]; + auto other = [[MTRWebRTCTransportRequestorClusterEndParams alloc] init]; other.webRTCSessionID = self.webRTCSessionID; other.reason = self.reason; @@ -32138,11 +34692,11 @@ - (NSString *)description @end -@implementation MTRWebRTCTransportProviderClusterEndSessionParams (InternalMethods) +@implementation MTRWebRTCTransportRequestorClusterEndParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::WebRTCTransportProvider::Commands::EndSession::Type encodableStruct; + chip::app::Clusters::WebRTCTransportRequestor::Commands::End::Type encodableStruct; ListFreer listFreer; { encodableStruct.webRTCSessionID = self.webRTCSessionID.unsignedShortValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index 144ee696af..70d8a461c6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -2032,6 +2032,144 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface MTRZoneManagementClusterCreateTwoDCartesianZoneParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRZoneManagementClusterCreateTwoDCartesianZoneResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ZoneManagement::Commands::CreateTwoDCartesianZoneResponse::DecodableType &)decodableStruct; + +@end + +@interface MTRZoneManagementClusterUpdateTwoDCartesianZoneParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRZoneManagementClusterGetTwoDCartesianZoneParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRZoneManagementClusterGetTwoDCartesianZoneResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ZoneManagement::Commands::GetTwoDCartesianZoneResponse::DecodableType &)decodableStruct; + +@end + +@interface MTRZoneManagementClusterRemoveZoneParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRCameraAVStreamManagementClusterAudioStreamAllocateParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRCameraAVStreamManagementClusterAudioStreamAllocateResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::CameraAvStreamManagement::Commands::AudioStreamAllocateResponse::DecodableType &)decodableStruct; + +@end + +@interface MTRCameraAVStreamManagementClusterAudioStreamDeallocateParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRCameraAVStreamManagementClusterVideoStreamAllocateParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRCameraAVStreamManagementClusterVideoStreamAllocateResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::CameraAvStreamManagement::Commands::VideoStreamAllocateResponse::DecodableType &)decodableStruct; + +@end + +@interface MTRCameraAVStreamManagementClusterVideoStreamModifyParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRCameraAVStreamManagementClusterVideoStreamDeallocateParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRCameraAVStreamManagementClusterSnapshotStreamAllocateParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRCameraAVStreamManagementClusterSnapshotStreamAllocateResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::CameraAvStreamManagement::Commands::SnapshotStreamAllocateResponse::DecodableType &)decodableStruct; + +@end + +@interface MTRCameraAVStreamManagementClusterSnapshotStreamDeallocateParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRCameraAVStreamManagementClusterSetStreamPrioritiesParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRCameraAVStreamManagementClusterCaptureSnapshotParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRCameraAVStreamManagementClusterCaptureSnapshotResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::CameraAvStreamManagement::Commands::CaptureSnapshotResponse::DecodableType &)decodableStruct; + +@end + +@interface MTRCameraAVStreamManagementClusterSetViewportParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRCameraAVStreamManagementClusterSetImageRotationParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRCameraAVStreamManagementClusterSetImageFlipHorizontalParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRCameraAVStreamManagementClusterSetImageFlipVerticalParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + @interface MTRWebRTCTransportProviderClusterSolicitOfferParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @@ -2074,6 +2212,30 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface MTRWebRTCTransportRequestorClusterOfferParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRWebRTCTransportRequestorClusterAnswerParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRWebRTCTransportRequestorClusterICECandidateParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRWebRTCTransportRequestorClusterEndParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + @interface MTRChimeClusterPlayChimeSoundParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm index 91f69fd4e1..f45fd6f3cc 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm @@ -1124,6 +1124,24 @@ static BOOL CommandNeedsTimedInvokeInContentAppObserverCluster(AttributeId aAttr } } } +static BOOL CommandNeedsTimedInvokeInZoneManagementCluster(AttributeId aAttributeId) +{ + using namespace Clusters::ZoneManagement; + switch (aAttributeId) { + default: { + return NO; + } + } +} +static BOOL CommandNeedsTimedInvokeInCameraAVStreamManagementCluster(AttributeId aAttributeId) +{ + using namespace Clusters::CameraAvStreamManagement; + switch (aAttributeId) { + default: { + return NO; + } + } +} static BOOL CommandNeedsTimedInvokeInWebRTCTransportProviderCluster(AttributeId aAttributeId) { using namespace Clusters::WebRTCTransportProvider; @@ -1133,6 +1151,15 @@ static BOOL CommandNeedsTimedInvokeInWebRTCTransportProviderCluster(AttributeId } } } +static BOOL CommandNeedsTimedInvokeInWebRTCTransportRequestorCluster(AttributeId aAttributeId) +{ + using namespace Clusters::WebRTCTransportRequestor; + switch (aAttributeId) { + default: { + return NO; + } + } +} static BOOL CommandNeedsTimedInvokeInChimeCluster(AttributeId aAttributeId) { using namespace Clusters::Chime; @@ -1530,9 +1557,18 @@ BOOL MTRCommandNeedsTimedInvoke(NSNumber * _Nonnull aClusterID, NSNumber * _Nonn case Clusters::ContentAppObserver::Id: { return CommandNeedsTimedInvokeInContentAppObserverCluster(commandID); } + case Clusters::ZoneManagement::Id: { + return CommandNeedsTimedInvokeInZoneManagementCluster(commandID); + } + case Clusters::CameraAvStreamManagement::Id: { + return CommandNeedsTimedInvokeInCameraAVStreamManagementCluster(commandID); + } case Clusters::WebRTCTransportProvider::Id: { return CommandNeedsTimedInvokeInWebRTCTransportProviderCluster(commandID); } + case Clusters::WebRTCTransportRequestor::Id: { + return CommandNeedsTimedInvokeInWebRTCTransportRequestorCluster(commandID); + } case Clusters::Chime::Id: { return CommandNeedsTimedInvokeInChimeCluster(commandID); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm index 7bab05ab23..fc9d8c7d93 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm @@ -20,98 +20,91 @@ using namespace chip; namespace { -enum class DeviceTypeClass { - Utility, - Simple, - Node, // Might not be a real class, but we have it for Root Node for now. - // If new classes get added, plase audit MTRIsKnownUtilityDeviceType below. -}; - -struct DeviceTypeData { - DeviceTypeId id; - DeviceTypeClass deviceClass; - const char * name; -}; -constexpr DeviceTypeData knownDeviceTypes[] = { - { 0x0000000A, DeviceTypeClass::Simple, "Matter Door Lock" }, - { 0x0000000B, DeviceTypeClass::Simple, "Matter Door Lock Controller" }, - { 0x0000000E, DeviceTypeClass::Utility, "Matter Aggregator" }, - { 0x0000000F, DeviceTypeClass::Simple, "Matter Generic Switch" }, - { 0x00000011, DeviceTypeClass::Utility, "Matter Power Source" }, - { 0x00000012, DeviceTypeClass::Utility, "Matter OTA Requestor" }, - { 0x00000013, DeviceTypeClass::Utility, "Matter Bridged Device" }, - { 0x00000014, DeviceTypeClass::Utility, "Matter OTA Provider" }, - { 0x00000015, DeviceTypeClass::Simple, "Matter Contact Sensor" }, - { 0x00000016, DeviceTypeClass::Node, "Matter Root Node" }, - { 0x00000019, DeviceTypeClass::Utility, "Matter Secondary Network Interface Device Type" }, - { 0x00000022, DeviceTypeClass::Simple, "Matter Speaker" }, - { 0x00000023, DeviceTypeClass::Simple, "Matter Casting Video Player" }, - { 0x00000024, DeviceTypeClass::Simple, "Matter Content App" }, - { 0x00000027, DeviceTypeClass::Simple, "Matter Mode Select" }, - { 0x00000028, DeviceTypeClass::Simple, "Matter Basic Video Player" }, - { 0x00000029, DeviceTypeClass::Simple, "Matter Casting Video Client" }, - { 0x0000002A, DeviceTypeClass::Simple, "Matter Video Remote Control" }, - { 0x0000002B, DeviceTypeClass::Simple, "Matter Fan" }, - { 0x0000002C, DeviceTypeClass::Simple, "Matter Air Quality Sensor" }, - { 0x0000002D, DeviceTypeClass::Simple, "Matter Air Purifier" }, - { 0x00000041, DeviceTypeClass::Simple, "Matter Water Freeze Detector" }, - { 0x00000042, DeviceTypeClass::Simple, "Matter Water Valve" }, - { 0x00000043, DeviceTypeClass::Simple, "Matter Water Leak Detector" }, - { 0x00000044, DeviceTypeClass::Simple, "Matter Rain Sensor" }, - { 0x00000070, DeviceTypeClass::Simple, "Matter Refrigerator" }, - { 0x00000071, DeviceTypeClass::Simple, "Matter Temperature Controlled Cabinet" }, - { 0x00000072, DeviceTypeClass::Simple, "Matter Room Air Conditioner" }, - { 0x00000073, DeviceTypeClass::Simple, "Matter Laundry Washer" }, - { 0x00000074, DeviceTypeClass::Simple, "Matter Robotic Vacuum Cleaner" }, - { 0x00000075, DeviceTypeClass::Simple, "Matter Dishwasher" }, - { 0x00000076, DeviceTypeClass::Simple, "Matter Smoke CO Alarm" }, - { 0x00000077, DeviceTypeClass::Simple, "Matter Cook Surface" }, - { 0x00000078, DeviceTypeClass::Simple, "Matter Cooktop" }, - { 0x00000079, DeviceTypeClass::Simple, "Matter Microwave Oven" }, - { 0x0000007A, DeviceTypeClass::Simple, "Matter Extractor Hood" }, - { 0x0000007B, DeviceTypeClass::Simple, "Matter Oven" }, - { 0x0000007C, DeviceTypeClass::Simple, "Matter Laundry Dryer" }, - { 0x00000090, DeviceTypeClass::Simple, "Matter Network Infrastructure Manager" }, - { 0x00000091, DeviceTypeClass::Simple, "Matter Thread Border Router" }, - { 0x00000100, DeviceTypeClass::Simple, "Matter On/Off Light" }, - { 0x00000101, DeviceTypeClass::Simple, "Matter Dimmable Light" }, - { 0x00000103, DeviceTypeClass::Simple, "Matter On/Off Light Switch" }, - { 0x00000104, DeviceTypeClass::Simple, "Matter Dimmer Switch" }, - { 0x00000105, DeviceTypeClass::Simple, "Matter Color Dimmer Switch" }, - { 0x00000106, DeviceTypeClass::Simple, "Matter Light Sensor" }, - { 0x00000107, DeviceTypeClass::Simple, "Matter Occupancy Sensor" }, - { 0x0000010A, DeviceTypeClass::Simple, "Matter On/Off Plug-in Unit" }, - { 0x0000010B, DeviceTypeClass::Simple, "Matter Dimmable Plug-in Unit" }, - { 0x0000010C, DeviceTypeClass::Simple, "Matter Color Temperature Light" }, - { 0x0000010D, DeviceTypeClass::Simple, "Matter Extended Color Light" }, - { 0x00000202, DeviceTypeClass::Simple, "Matter Window Covering" }, - { 0x00000203, DeviceTypeClass::Simple, "Matter Window Covering Controller" }, - { 0x00000300, DeviceTypeClass::Simple, "Matter Heating/Cooling Unit" }, - { 0x00000301, DeviceTypeClass::Simple, "Matter Thermostat" }, - { 0x00000302, DeviceTypeClass::Simple, "Matter Temperature Sensor" }, - { 0x00000303, DeviceTypeClass::Simple, "Matter Pump" }, - { 0x00000304, DeviceTypeClass::Simple, "Matter Pump Controller" }, - { 0x00000305, DeviceTypeClass::Simple, "Matter Pressure Sensor" }, - { 0x00000306, DeviceTypeClass::Simple, "Matter Flow Sensor" }, - { 0x00000307, DeviceTypeClass::Simple, "Matter Humidity Sensor" }, - { 0x0000050C, DeviceTypeClass::Simple, "Matter EVSE" }, - { 0x00000510, DeviceTypeClass::Utility, "Matter Electrical Sensor" }, - { 0x00000840, DeviceTypeClass::Simple, "Matter Control Bridge" }, - { 0x00000850, DeviceTypeClass::Simple, "Matter On/Off Sensor" }, +constexpr MTRDeviceTypeData knownDeviceTypes[] = { + { 0x0000000A, MTRDeviceTypeClass::Simple, "Door Lock" }, + { 0x0000000B, MTRDeviceTypeClass::Simple, "Door Lock Controller" }, + { 0x0000000E, MTRDeviceTypeClass::Simple, "Aggregator" }, + { 0x0000000F, MTRDeviceTypeClass::Simple, "Generic Switch" }, + { 0x00000011, MTRDeviceTypeClass::Utility, "Power Source" }, + { 0x00000012, MTRDeviceTypeClass::Utility, "OTA Requestor" }, + { 0x00000013, MTRDeviceTypeClass::Utility, "Bridged Node" }, + { 0x00000014, MTRDeviceTypeClass::Utility, "OTA Provider" }, + { 0x00000015, MTRDeviceTypeClass::Simple, "Contact Sensor" }, + { 0x00000016, MTRDeviceTypeClass::Node, "Root Node" }, + { 0x00000017, MTRDeviceTypeClass::Simple, "Solar Power" }, + { 0x00000018, MTRDeviceTypeClass::Simple, "Battery Storage" }, + { 0x00000019, MTRDeviceTypeClass::Utility, "Secondary Network Interface" }, + { 0x00000022, MTRDeviceTypeClass::Simple, "Speaker" }, + { 0x00000023, MTRDeviceTypeClass::Simple, "Casting Video Player" }, + { 0x00000024, MTRDeviceTypeClass::Simple, "Content App" }, + { 0x00000027, MTRDeviceTypeClass::Simple, "Mode Select" }, + { 0x00000028, MTRDeviceTypeClass::Simple, "Basic Video Player" }, + { 0x00000029, MTRDeviceTypeClass::Simple, "Casting Video Client" }, + { 0x0000002A, MTRDeviceTypeClass::Simple, "Video Remote Control" }, + { 0x0000002B, MTRDeviceTypeClass::Simple, "Fan" }, + { 0x0000002C, MTRDeviceTypeClass::Simple, "Air Quality Sensor" }, + { 0x0000002D, MTRDeviceTypeClass::Simple, "Air Purifier" }, + { 0x00000041, MTRDeviceTypeClass::Simple, "Water Freeze Detector" }, + { 0x00000042, MTRDeviceTypeClass::Simple, "Water Valve" }, + { 0x00000043, MTRDeviceTypeClass::Simple, "Water Leak Detector" }, + { 0x00000044, MTRDeviceTypeClass::Simple, "Rain Sensor" }, + { 0x00000070, MTRDeviceTypeClass::Simple, "Refrigerator" }, + { 0x00000071, MTRDeviceTypeClass::Simple, "Temperature Controlled Cabinet" }, + { 0x00000072, MTRDeviceTypeClass::Simple, "Room Air Conditioner" }, + { 0x00000073, MTRDeviceTypeClass::Simple, "Laundry Washer" }, + { 0x00000074, MTRDeviceTypeClass::Simple, "Robotic Vacuum Cleaner" }, + { 0x00000075, MTRDeviceTypeClass::Simple, "Dishwasher" }, + { 0x00000076, MTRDeviceTypeClass::Simple, "Smoke CO Alarm" }, + { 0x00000077, MTRDeviceTypeClass::Simple, "Cook Surface" }, + { 0x00000078, MTRDeviceTypeClass::Simple, "Cooktop" }, + { 0x00000079, MTRDeviceTypeClass::Simple, "Microwave Oven" }, + { 0x0000007A, MTRDeviceTypeClass::Simple, "Extractor Hood" }, + { 0x0000007B, MTRDeviceTypeClass::Simple, "Oven" }, + { 0x0000007C, MTRDeviceTypeClass::Simple, "Laundry Dryer" }, + { 0x00000090, MTRDeviceTypeClass::Simple, "Network Infrastructure Manager" }, + { 0x00000091, MTRDeviceTypeClass::Simple, "Thread Border Router" }, + { 0x00000100, MTRDeviceTypeClass::Simple, "On/Off Light" }, + { 0x00000101, MTRDeviceTypeClass::Simple, "Dimmable Light" }, + { 0x00000103, MTRDeviceTypeClass::Simple, "On/Off Light Switch" }, + { 0x00000104, MTRDeviceTypeClass::Simple, "Dimmer Switch" }, + { 0x00000105, MTRDeviceTypeClass::Simple, "Color Dimmer Switch" }, + { 0x00000106, MTRDeviceTypeClass::Simple, "Light Sensor" }, + { 0x00000107, MTRDeviceTypeClass::Simple, "Occupancy Sensor" }, + { 0x0000010A, MTRDeviceTypeClass::Simple, "On/Off Plug-in Unit" }, + { 0x0000010B, MTRDeviceTypeClass::Simple, "Dimmable Plug-in Unit" }, + { 0x0000010C, MTRDeviceTypeClass::Simple, "Color Temperature Light" }, + { 0x0000010D, MTRDeviceTypeClass::Simple, "Extended Color Light" }, + { 0x00000202, MTRDeviceTypeClass::Simple, "Window Covering" }, + { 0x00000203, MTRDeviceTypeClass::Simple, "Window Covering Controller" }, + { 0x00000300, MTRDeviceTypeClass::Simple, "Heating/Cooling Unit" }, + { 0x00000301, MTRDeviceTypeClass::Simple, "Thermostat" }, + { 0x00000302, MTRDeviceTypeClass::Simple, "Temperature Sensor" }, + { 0x00000303, MTRDeviceTypeClass::Simple, "Pump" }, + { 0x00000304, MTRDeviceTypeClass::Simple, "Pump Controller" }, + { 0x00000305, MTRDeviceTypeClass::Simple, "Pressure Sensor" }, + { 0x00000306, MTRDeviceTypeClass::Simple, "Flow Sensor" }, + { 0x00000307, MTRDeviceTypeClass::Simple, "Humidity Sensor" }, + { 0x00000309, MTRDeviceTypeClass::Simple, "Heat Pump" }, + { 0x0000050C, MTRDeviceTypeClass::Simple, "EVSE" }, + { 0x0000050D, MTRDeviceTypeClass::Simple, "Device Energy Management" }, + { 0x0000050F, MTRDeviceTypeClass::Simple, "Water Heater" }, + { 0x00000510, MTRDeviceTypeClass::Utility, "Electrical Sensor" }, + { 0x00000840, MTRDeviceTypeClass::Simple, "Control Bridge" }, + { 0x00000850, MTRDeviceTypeClass::Simple, "On/Off Sensor" }, }; -static_assert(ExtractVendorFromMEI(0xFFF10001) != 0, "Must have class defined for \"Matter Orphan Clusters\" if it's a standard device type"); -static_assert(ExtractVendorFromMEI(0xFFF10003) != 0, "Must have class defined for \"Matter All-clusters-app Server Example\" if it's a standard device type"); +static_assert(ExtractVendorFromMEI(0xFFF10001) != 0, "Must have class defined for \"Orphan Clusters\" if it's a standard device type"); +static_assert(ExtractVendorFromMEI(0xFFF10003) != 0, "Must have class defined for \"All-clusters-app Server Example\" if it's a standard device type"); } // anonymous namespace -BOOL MTRIsKnownUtilityDeviceType(DeviceTypeId aDeviceTypeId) +const MTRDeviceTypeData * _Nullable MTRDeviceTypeDataForID(chip::DeviceTypeId aDeviceTypeId) { for (auto & deviceType : knownDeviceTypes) { if (deviceType.id == aDeviceTypeId) { - return deviceType.deviceClass != DeviceTypeClass::Simple; + return &deviceType; } } - return NO; + return nullptr; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 5a10da85b1..0a04add54f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -4543,6 +4543,361 @@ static id _Nullable DecodeEventPayloadForContentAppObserverCluster(EventId aEven *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; return nil; } +static id _Nullable DecodeEventPayloadForZoneManagementCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ZoneManagement; + switch (aEventId) { + case Events::ZoneTriggered::Id: { + Events::ZoneTriggered::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRZoneManagementClusterZoneTriggeredEvent new]; + + do { + NSArray * _Nonnull memberValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.zones.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + memberValue = array_0; + } + value.zones = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.reason)]; + value.reason = memberValue; + } while (0); + + return value; + } + case Events::ZoneStopped::Id: { + Events::ZoneStopped::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRZoneManagementClusterZoneStoppedEvent new]; + + do { + NSArray * _Nonnull memberValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.zones.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + memberValue = array_0; + } + value.zones = memberValue; + } while (0); + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.reason)]; + value.reason = memberValue; + } while (0); + + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} +static id _Nullable DecodeEventPayloadForCameraAVStreamManagementCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::CameraAvStreamManagement; + switch (aEventId) { + case Events::VideoStreamChanged::Id: { + Events::VideoStreamChanged::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRCameraAVStreamManagementClusterVideoStreamChangedEvent new]; + + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedShort:cppValue.videoStreamID]; + value.videoStreamID = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.streamType.HasValue()) { + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.streamType.Value())]; + } else { + memberValue = nil; + } + value.streamType = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.videoCodec.HasValue()) { + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.videoCodec.Value())]; + } else { + memberValue = nil; + } + value.videoCodec = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.minFrameRate.HasValue()) { + memberValue = [NSNumber numberWithUnsignedShort:cppValue.minFrameRate.Value()]; + } else { + memberValue = nil; + } + value.minFrameRate = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.maxFrameRate.HasValue()) { + memberValue = [NSNumber numberWithUnsignedShort:cppValue.maxFrameRate.Value()]; + } else { + memberValue = nil; + } + value.maxFrameRate = memberValue; + } while (0); + do { + MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nullable memberValue; + if (cppValue.minResolution.HasValue()) { + memberValue = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + memberValue.width = [NSNumber numberWithUnsignedShort:cppValue.minResolution.Value().width]; + memberValue.height = [NSNumber numberWithUnsignedShort:cppValue.minResolution.Value().height]; + } else { + memberValue = nil; + } + value.minResolution = memberValue; + } while (0); + do { + MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nullable memberValue; + if (cppValue.maxResolution.HasValue()) { + memberValue = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + memberValue.width = [NSNumber numberWithUnsignedShort:cppValue.maxResolution.Value().width]; + memberValue.height = [NSNumber numberWithUnsignedShort:cppValue.maxResolution.Value().height]; + } else { + memberValue = nil; + } + value.maxResolution = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.minBitRate.HasValue()) { + memberValue = [NSNumber numberWithUnsignedInt:cppValue.minBitRate.Value()]; + } else { + memberValue = nil; + } + value.minBitRate = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.maxBitRate.HasValue()) { + memberValue = [NSNumber numberWithUnsignedInt:cppValue.maxBitRate.Value()]; + } else { + memberValue = nil; + } + value.maxBitRate = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.minFragmentLen.HasValue()) { + memberValue = [NSNumber numberWithUnsignedShort:cppValue.minFragmentLen.Value()]; + } else { + memberValue = nil; + } + value.minFragmentLen = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.maxFragmentLen.HasValue()) { + memberValue = [NSNumber numberWithUnsignedShort:cppValue.maxFragmentLen.Value()]; + } else { + memberValue = nil; + } + value.maxFragmentLen = memberValue; + } while (0); + + return value; + } + case Events::AudioStreamChanged::Id: { + Events::AudioStreamChanged::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRCameraAVStreamManagementClusterAudioStreamChangedEvent new]; + + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedShort:cppValue.audioStreamID]; + value.audioStreamID = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.streamType.HasValue()) { + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.streamType.Value())]; + } else { + memberValue = nil; + } + value.streamType = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.audioCodec.HasValue()) { + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.audioCodec.Value())]; + } else { + memberValue = nil; + } + value.audioCodec = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.channelCount.HasValue()) { + memberValue = [NSNumber numberWithUnsignedChar:cppValue.channelCount.Value()]; + } else { + memberValue = nil; + } + value.channelCount = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.sampleRate.HasValue()) { + memberValue = [NSNumber numberWithUnsignedInt:cppValue.sampleRate.Value()]; + } else { + memberValue = nil; + } + value.sampleRate = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.bitRate.HasValue()) { + memberValue = [NSNumber numberWithUnsignedInt:cppValue.bitRate.Value()]; + } else { + memberValue = nil; + } + value.bitRate = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.bitDepth.HasValue()) { + memberValue = [NSNumber numberWithUnsignedChar:cppValue.bitDepth.Value()]; + } else { + memberValue = nil; + } + value.bitDepth = memberValue; + } while (0); + + return value; + } + case Events::SnapshotStreamChanged::Id: { + Events::SnapshotStreamChanged::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRCameraAVStreamManagementClusterSnapshotStreamChangedEvent new]; + + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedShort:cppValue.snapshotStreamID]; + value.snapshotStreamID = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.imageCodec.HasValue()) { + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.imageCodec.Value())]; + } else { + memberValue = nil; + } + value.imageCodec = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.frameRate.HasValue()) { + memberValue = [NSNumber numberWithUnsignedShort:cppValue.frameRate.Value()]; + } else { + memberValue = nil; + } + value.frameRate = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.bitRate.HasValue()) { + memberValue = [NSNumber numberWithUnsignedInt:cppValue.bitRate.Value()]; + } else { + memberValue = nil; + } + value.bitRate = memberValue; + } while (0); + do { + MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nullable memberValue; + if (cppValue.minResolution.HasValue()) { + memberValue = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + memberValue.width = [NSNumber numberWithUnsignedShort:cppValue.minResolution.Value().width]; + memberValue.height = [NSNumber numberWithUnsignedShort:cppValue.minResolution.Value().height]; + } else { + memberValue = nil; + } + value.minResolution = memberValue; + } while (0); + do { + MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nullable memberValue; + if (cppValue.maxResolution.HasValue()) { + memberValue = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + memberValue.width = [NSNumber numberWithUnsignedShort:cppValue.maxResolution.Value().width]; + memberValue.height = [NSNumber numberWithUnsignedShort:cppValue.maxResolution.Value().height]; + } else { + memberValue = nil; + } + value.maxResolution = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.quality.HasValue()) { + memberValue = [NSNumber numberWithUnsignedChar:cppValue.quality.Value()]; + } else { + memberValue = nil; + } + value.quality = memberValue; + } while (0); + + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} static id _Nullable DecodeEventPayloadForWebRTCTransportProviderCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::WebRTCTransportProvider; @@ -4555,6 +4910,18 @@ static id _Nullable DecodeEventPayloadForWebRTCTransportProviderCluster(EventId *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; return nil; } +static id _Nullable DecodeEventPayloadForWebRTCTransportRequestorCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::WebRTCTransportRequestor; + switch (aEventId) { + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} static id _Nullable DecodeEventPayloadForChimeCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::Chime; @@ -5157,9 +5524,18 @@ id _Nullable MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVRead case Clusters::ContentAppObserver::Id: { return DecodeEventPayloadForContentAppObserverCluster(aPath.mEventId, aReader, aError); } + case Clusters::ZoneManagement::Id: { + return DecodeEventPayloadForZoneManagementCluster(aPath.mEventId, aReader, aError); + } + case Clusters::CameraAvStreamManagement::Id: { + return DecodeEventPayloadForCameraAVStreamManagementCluster(aPath.mEventId, aReader, aError); + } case Clusters::WebRTCTransportProvider::Id: { return DecodeEventPayloadForWebRTCTransportProviderCluster(aPath.mEventId, aReader, aError); } + case Clusters::WebRTCTransportRequestor::Id: { + return DecodeEventPayloadForWebRTCTransportRequestorCluster(aPath.mEventId, aReader, aError); + } case Clusters::Chime::Id: { return DecodeEventPayloadForChimeCluster(aPath.mEventId, aReader, aError); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index bb93511dbf..02d36a82d7 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -2117,6 +2117,171 @@ MTR_PROVISIONALLY_AVAILABLE @interface MTRContentControlClusterRemainingScreenTimeExpiredEvent : NSObject @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRZoneManagementClusterTwoDCartesianVertexStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull x MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull y MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRZoneManagementClusterTwoDCartesianZoneStruct : NSObject +@property (nonatomic, copy) NSString * _Nonnull name MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull use MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull vertices MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable color MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRZoneManagementClusterZoneInformationStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull zoneID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull zoneType MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull zoneSource MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRZoneManagementClusterZoneTriggeringTimeControlStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull initialDuration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull augmentationDuration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull maxDuration MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull blindDuration MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRZoneManagementClusterZoneTriggeredEvent : NSObject +@property (nonatomic, copy) NSArray * _Nonnull zones MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull reason MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRZoneManagementClusterZoneStoppedEvent : NSObject +@property (nonatomic, copy) NSArray * _Nonnull zones MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull reason MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterVideoResolutionStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull width MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull height MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterVideoStreamStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull videoStreamID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull streamType MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull videoCodec MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull minFrameRate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull maxFrameRate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nonnull minResolution MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nonnull maxResolution MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull minBitRate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull maxBitRate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull minFragmentLen MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull maxFragmentLen MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable watermarkEnabled MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable osdEnabled MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull referenceCount MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterSnapshotStreamStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull snapshotStreamID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull imageCodec MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull frameRate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull bitRate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nonnull minResolution MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nonnull maxResolution MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull quality MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull referenceCount MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterSnapshotParamsStruct : NSObject +@property (nonatomic, copy) MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nonnull resolution MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull maxFrameRate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull imageCodec MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterRateDistortionTradeOffPointsStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull codec MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nonnull resolution MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull minBitRate MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull maxNumberOfChannels MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull supportedCodecs MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull supportedSampleRates MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull supportedBitDepths MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterAudioStreamStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull audioStreamID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull streamType MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull audioCodec MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull channelCount MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull sampleRate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull bitRate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull bitDepth MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull referenceCount MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterVideoSensorParamsStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull sensorWidth MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull sensorHeight MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull hdrCapable MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull maxFPS MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull maxHDRFPS MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterViewportStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull x1 MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull y1 MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull x2 MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull y2 MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterVideoStreamChangedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull videoStreamID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable streamType MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable videoCodec MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable minFrameRate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable maxFrameRate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nullable minResolution MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nullable maxResolution MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable minBitRate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable maxBitRate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable minFragmentLen MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable maxFragmentLen MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterAudioStreamChangedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull audioStreamID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable streamType MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable audioCodec MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable channelCount MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable sampleRate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable bitRate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable bitDepth MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRCameraAVStreamManagementClusterSnapshotStreamChangedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull snapshotStreamID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable imageCodec MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable frameRate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable bitRate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nullable minResolution MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRCameraAVStreamManagementClusterVideoResolutionStruct * _Nullable maxResolution MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable quality MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_PROVISIONALLY_AVAILABLE @interface MTRWebRTCTransportProviderClusterICEServerStruct : NSObject @property (nonatomic, copy) NSArray * _Nonnull urls MTR_PROVISIONALLY_AVAILABLE; @@ -2136,6 +2301,25 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSNumber * _Nonnull metadataOptions MTR_PROVISIONALLY_AVAILABLE; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRWebRTCTransportRequestorClusterICEServerStruct : NSObject +@property (nonatomic, copy) NSArray * _Nonnull urls MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable username MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable credential MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable caid MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRWebRTCTransportRequestorClusterWebRTCSessionStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull id MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull peerNodeID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull peerFabricIndex MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull streamType MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable videoStreamID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable audioStreamID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull metadataOptions MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_PROVISIONALLY_AVAILABLE @interface MTRChimeClusterChimeSoundStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull chimeID MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 6ba439eb02..e38df78931 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -8768,6 +8768,717 @@ - (NSString *)description @end +@implementation MTRZoneManagementClusterTwoDCartesianVertexStruct +- (instancetype)init +{ + if (self = [super init]) { + + _x = @(0); + + _y = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRZoneManagementClusterTwoDCartesianVertexStruct alloc] init]; + + other.x = self.x; + other.y = self.y; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: x:%@; y:%@; >", NSStringFromClass([self class]), _x, _y]; + return descriptionString; +} + +@end + +@implementation MTRZoneManagementClusterTwoDCartesianZoneStruct +- (instancetype)init +{ + if (self = [super init]) { + + _name = @""; + + _use = @(0); + + _vertices = [NSArray array]; + + _color = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRZoneManagementClusterTwoDCartesianZoneStruct alloc] init]; + + other.name = self.name; + other.use = self.use; + other.vertices = self.vertices; + other.color = self.color; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: name:%@; use:%@; vertices:%@; color:%@; >", NSStringFromClass([self class]), _name, _use, _vertices, _color]; + return descriptionString; +} + +@end + +@implementation MTRZoneManagementClusterZoneInformationStruct +- (instancetype)init +{ + if (self = [super init]) { + + _zoneID = @(0); + + _zoneType = @(0); + + _zoneSource = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRZoneManagementClusterZoneInformationStruct alloc] init]; + + other.zoneID = self.zoneID; + other.zoneType = self.zoneType; + other.zoneSource = self.zoneSource; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: zoneID:%@; zoneType:%@; zoneSource:%@; >", NSStringFromClass([self class]), _zoneID, _zoneType, _zoneSource]; + return descriptionString; +} + +@end + +@implementation MTRZoneManagementClusterZoneTriggeringTimeControlStruct +- (instancetype)init +{ + if (self = [super init]) { + + _initialDuration = @(0); + + _augmentationDuration = @(0); + + _maxDuration = @(0); + + _blindDuration = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRZoneManagementClusterZoneTriggeringTimeControlStruct alloc] init]; + + other.initialDuration = self.initialDuration; + other.augmentationDuration = self.augmentationDuration; + other.maxDuration = self.maxDuration; + other.blindDuration = self.blindDuration; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: initialDuration:%@; augmentationDuration:%@; maxDuration:%@; blindDuration:%@; >", NSStringFromClass([self class]), _initialDuration, _augmentationDuration, _maxDuration, _blindDuration]; + return descriptionString; +} + +@end + +@implementation MTRZoneManagementClusterZoneTriggeredEvent +- (instancetype)init +{ + if (self = [super init]) { + + _zones = [NSArray array]; + + _reason = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRZoneManagementClusterZoneTriggeredEvent alloc] init]; + + other.zones = self.zones; + other.reason = self.reason; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: zones:%@; reason:%@; >", NSStringFromClass([self class]), _zones, _reason]; + return descriptionString; +} + +@end + +@implementation MTRZoneManagementClusterZoneStoppedEvent +- (instancetype)init +{ + if (self = [super init]) { + + _zones = [NSArray array]; + + _reason = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRZoneManagementClusterZoneStoppedEvent alloc] init]; + + other.zones = self.zones; + other.reason = self.reason; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: zones:%@; reason:%@; >", NSStringFromClass([self class]), _zones, _reason]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterVideoResolutionStruct +- (instancetype)init +{ + if (self = [super init]) { + + _width = @(0); + + _height = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRCameraAVStreamManagementClusterVideoResolutionStruct alloc] init]; + + other.width = self.width; + other.height = self.height; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: width:%@; height:%@; >", NSStringFromClass([self class]), _width, _height]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterVideoStreamStruct +- (instancetype)init +{ + if (self = [super init]) { + + _videoStreamID = @(0); + + _streamType = @(0); + + _videoCodec = @(0); + + _minFrameRate = @(0); + + _maxFrameRate = @(0); + + _minResolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + + _maxResolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + + _minBitRate = @(0); + + _maxBitRate = @(0); + + _minFragmentLen = @(0); + + _maxFragmentLen = @(0); + + _watermarkEnabled = nil; + + _osdEnabled = nil; + + _referenceCount = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRCameraAVStreamManagementClusterVideoStreamStruct alloc] init]; + + other.videoStreamID = self.videoStreamID; + other.streamType = self.streamType; + other.videoCodec = self.videoCodec; + other.minFrameRate = self.minFrameRate; + other.maxFrameRate = self.maxFrameRate; + other.minResolution = self.minResolution; + other.maxResolution = self.maxResolution; + other.minBitRate = self.minBitRate; + other.maxBitRate = self.maxBitRate; + other.minFragmentLen = self.minFragmentLen; + other.maxFragmentLen = self.maxFragmentLen; + other.watermarkEnabled = self.watermarkEnabled; + other.osdEnabled = self.osdEnabled; + other.referenceCount = self.referenceCount; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: videoStreamID:%@; streamType:%@; videoCodec:%@; minFrameRate:%@; maxFrameRate:%@; minResolution:%@; maxResolution:%@; minBitRate:%@; maxBitRate:%@; minFragmentLen:%@; maxFragmentLen:%@; watermarkEnabled:%@; osdEnabled:%@; referenceCount:%@; >", NSStringFromClass([self class]), _videoStreamID, _streamType, _videoCodec, _minFrameRate, _maxFrameRate, _minResolution, _maxResolution, _minBitRate, _maxBitRate, _minFragmentLen, _maxFragmentLen, _watermarkEnabled, _osdEnabled, _referenceCount]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterSnapshotStreamStruct +- (instancetype)init +{ + if (self = [super init]) { + + _snapshotStreamID = @(0); + + _imageCodec = @(0); + + _frameRate = @(0); + + _bitRate = @(0); + + _minResolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + + _maxResolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + + _quality = @(0); + + _referenceCount = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRCameraAVStreamManagementClusterSnapshotStreamStruct alloc] init]; + + other.snapshotStreamID = self.snapshotStreamID; + other.imageCodec = self.imageCodec; + other.frameRate = self.frameRate; + other.bitRate = self.bitRate; + other.minResolution = self.minResolution; + other.maxResolution = self.maxResolution; + other.quality = self.quality; + other.referenceCount = self.referenceCount; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: snapshotStreamID:%@; imageCodec:%@; frameRate:%@; bitRate:%@; minResolution:%@; maxResolution:%@; quality:%@; referenceCount:%@; >", NSStringFromClass([self class]), _snapshotStreamID, _imageCodec, _frameRate, _bitRate, _minResolution, _maxResolution, _quality, _referenceCount]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterSnapshotParamsStruct +- (instancetype)init +{ + if (self = [super init]) { + + _resolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + + _maxFrameRate = @(0); + + _imageCodec = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRCameraAVStreamManagementClusterSnapshotParamsStruct alloc] init]; + + other.resolution = self.resolution; + other.maxFrameRate = self.maxFrameRate; + other.imageCodec = self.imageCodec; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: resolution:%@; maxFrameRate:%@; imageCodec:%@; >", NSStringFromClass([self class]), _resolution, _maxFrameRate, _imageCodec]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterRateDistortionTradeOffPointsStruct +- (instancetype)init +{ + if (self = [super init]) { + + _codec = @(0); + + _resolution = [MTRCameraAVStreamManagementClusterVideoResolutionStruct new]; + + _minBitRate = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRCameraAVStreamManagementClusterRateDistortionTradeOffPointsStruct alloc] init]; + + other.codec = self.codec; + other.resolution = self.resolution; + other.minBitRate = self.minBitRate; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: codec:%@; resolution:%@; minBitRate:%@; >", NSStringFromClass([self class]), _codec, _resolution, _minBitRate]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct +- (instancetype)init +{ + if (self = [super init]) { + + _maxNumberOfChannels = @(0); + + _supportedCodecs = [NSArray array]; + + _supportedSampleRates = [NSArray array]; + + _supportedBitDepths = [NSArray array]; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct alloc] init]; + + other.maxNumberOfChannels = self.maxNumberOfChannels; + other.supportedCodecs = self.supportedCodecs; + other.supportedSampleRates = self.supportedSampleRates; + other.supportedBitDepths = self.supportedBitDepths; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: maxNumberOfChannels:%@; supportedCodecs:%@; supportedSampleRates:%@; supportedBitDepths:%@; >", NSStringFromClass([self class]), _maxNumberOfChannels, _supportedCodecs, _supportedSampleRates, _supportedBitDepths]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterAudioStreamStruct +- (instancetype)init +{ + if (self = [super init]) { + + _audioStreamID = @(0); + + _streamType = @(0); + + _audioCodec = @(0); + + _channelCount = @(0); + + _sampleRate = @(0); + + _bitRate = @(0); + + _bitDepth = @(0); + + _referenceCount = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRCameraAVStreamManagementClusterAudioStreamStruct alloc] init]; + + other.audioStreamID = self.audioStreamID; + other.streamType = self.streamType; + other.audioCodec = self.audioCodec; + other.channelCount = self.channelCount; + other.sampleRate = self.sampleRate; + other.bitRate = self.bitRate; + other.bitDepth = self.bitDepth; + other.referenceCount = self.referenceCount; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: audioStreamID:%@; streamType:%@; audioCodec:%@; channelCount:%@; sampleRate:%@; bitRate:%@; bitDepth:%@; referenceCount:%@; >", NSStringFromClass([self class]), _audioStreamID, _streamType, _audioCodec, _channelCount, _sampleRate, _bitRate, _bitDepth, _referenceCount]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterVideoSensorParamsStruct +- (instancetype)init +{ + if (self = [super init]) { + + _sensorWidth = @(0); + + _sensorHeight = @(0); + + _hdrCapable = @(0); + + _maxFPS = @(0); + + _maxHDRFPS = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRCameraAVStreamManagementClusterVideoSensorParamsStruct alloc] init]; + + other.sensorWidth = self.sensorWidth; + other.sensorHeight = self.sensorHeight; + other.hdrCapable = self.hdrCapable; + other.maxFPS = self.maxFPS; + other.maxHDRFPS = self.maxHDRFPS; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: sensorWidth:%@; sensorHeight:%@; hdrCapable:%@; maxFPS:%@; maxHDRFPS:%@; >", NSStringFromClass([self class]), _sensorWidth, _sensorHeight, _hdrCapable, _maxFPS, _maxHDRFPS]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterViewportStruct +- (instancetype)init +{ + if (self = [super init]) { + + _x1 = @(0); + + _y1 = @(0); + + _x2 = @(0); + + _y2 = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRCameraAVStreamManagementClusterViewportStruct alloc] init]; + + other.x1 = self.x1; + other.y1 = self.y1; + other.x2 = self.x2; + other.y2 = self.y2; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: x1:%@; y1:%@; x2:%@; y2:%@; >", NSStringFromClass([self class]), _x1, _y1, _x2, _y2]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterVideoStreamChangedEvent +- (instancetype)init +{ + if (self = [super init]) { + + _videoStreamID = @(0); + + _streamType = nil; + + _videoCodec = nil; + + _minFrameRate = nil; + + _maxFrameRate = nil; + + _minResolution = nil; + + _maxResolution = nil; + + _minBitRate = nil; + + _maxBitRate = nil; + + _minFragmentLen = nil; + + _maxFragmentLen = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRCameraAVStreamManagementClusterVideoStreamChangedEvent alloc] init]; + + other.videoStreamID = self.videoStreamID; + other.streamType = self.streamType; + other.videoCodec = self.videoCodec; + other.minFrameRate = self.minFrameRate; + other.maxFrameRate = self.maxFrameRate; + other.minResolution = self.minResolution; + other.maxResolution = self.maxResolution; + other.minBitRate = self.minBitRate; + other.maxBitRate = self.maxBitRate; + other.minFragmentLen = self.minFragmentLen; + other.maxFragmentLen = self.maxFragmentLen; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: videoStreamID:%@; streamType:%@; videoCodec:%@; minFrameRate:%@; maxFrameRate:%@; minResolution:%@; maxResolution:%@; minBitRate:%@; maxBitRate:%@; minFragmentLen:%@; maxFragmentLen:%@; >", NSStringFromClass([self class]), _videoStreamID, _streamType, _videoCodec, _minFrameRate, _maxFrameRate, _minResolution, _maxResolution, _minBitRate, _maxBitRate, _minFragmentLen, _maxFragmentLen]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterAudioStreamChangedEvent +- (instancetype)init +{ + if (self = [super init]) { + + _audioStreamID = @(0); + + _streamType = nil; + + _audioCodec = nil; + + _channelCount = nil; + + _sampleRate = nil; + + _bitRate = nil; + + _bitDepth = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRCameraAVStreamManagementClusterAudioStreamChangedEvent alloc] init]; + + other.audioStreamID = self.audioStreamID; + other.streamType = self.streamType; + other.audioCodec = self.audioCodec; + other.channelCount = self.channelCount; + other.sampleRate = self.sampleRate; + other.bitRate = self.bitRate; + other.bitDepth = self.bitDepth; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: audioStreamID:%@; streamType:%@; audioCodec:%@; channelCount:%@; sampleRate:%@; bitRate:%@; bitDepth:%@; >", NSStringFromClass([self class]), _audioStreamID, _streamType, _audioCodec, _channelCount, _sampleRate, _bitRate, _bitDepth]; + return descriptionString; +} + +@end + +@implementation MTRCameraAVStreamManagementClusterSnapshotStreamChangedEvent +- (instancetype)init +{ + if (self = [super init]) { + + _snapshotStreamID = @(0); + + _imageCodec = nil; + + _frameRate = nil; + + _bitRate = nil; + + _minResolution = nil; + + _maxResolution = nil; + + _quality = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRCameraAVStreamManagementClusterSnapshotStreamChangedEvent alloc] init]; + + other.snapshotStreamID = self.snapshotStreamID; + other.imageCodec = self.imageCodec; + other.frameRate = self.frameRate; + other.bitRate = self.bitRate; + other.minResolution = self.minResolution; + other.maxResolution = self.maxResolution; + other.quality = self.quality; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: snapshotStreamID:%@; imageCodec:%@; frameRate:%@; bitRate:%@; minResolution:%@; maxResolution:%@; quality:%@; >", NSStringFromClass([self class]), _snapshotStreamID, _imageCodec, _frameRate, _bitRate, _minResolution, _maxResolution, _quality]; + return descriptionString; +} + +@end + @implementation MTRWebRTCTransportProviderClusterICEServerStruct - (instancetype)init { @@ -8849,6 +9560,87 @@ - (NSString *)description @end +@implementation MTRWebRTCTransportRequestorClusterICEServerStruct +- (instancetype)init +{ + if (self = [super init]) { + + _urls = [NSArray array]; + + _username = nil; + + _credential = nil; + + _caid = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRWebRTCTransportRequestorClusterICEServerStruct alloc] init]; + + other.urls = self.urls; + other.username = self.username; + other.credential = self.credential; + other.caid = self.caid; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: urls:%@; username:%@; credential:%@; caid:%@; >", NSStringFromClass([self class]), _urls, _username, _credential, _caid]; + return descriptionString; +} + +@end + +@implementation MTRWebRTCTransportRequestorClusterWebRTCSessionStruct +- (instancetype)init +{ + if (self = [super init]) { + + _id = @(0); + + _peerNodeID = @(0); + + _peerFabricIndex = @(0); + + _streamType = @(0); + + _videoStreamID = nil; + + _audioStreamID = nil; + + _metadataOptions = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRWebRTCTransportRequestorClusterWebRTCSessionStruct alloc] init]; + + other.id = self.id; + other.peerNodeID = self.peerNodeID; + other.peerFabricIndex = self.peerFabricIndex; + other.streamType = self.streamType; + other.videoStreamID = self.videoStreamID; + other.audioStreamID = self.audioStreamID; + other.metadataOptions = self.metadataOptions; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: id:%@; peerNodeID:%@; peerFabricIndex:%@; streamType:%@; videoStreamID:%@; audioStreamID:%@; metadataOptions:%@; >", NSStringFromClass([self class]), _id, _peerNodeID, _peerFabricIndex, _streamType, _videoStreamID, _audioStreamID, _metadataOptions]; + return descriptionString; +} + +@end + @implementation MTRChimeClusterChimeSoundStruct - (instancetype)init { diff --git a/src/darwin/Framework/CHIPTests/MTRCertificateInfoTests.m b/src/darwin/Framework/CHIPTests/MTRCertificateInfoTests.m index bdf52e33d3..29af62d9a6 100644 --- a/src/darwin/Framework/CHIPTests/MTRCertificateInfoTests.m +++ b/src/darwin/Framework/CHIPTests/MTRCertificateInfoTests.m @@ -58,10 +58,22 @@ - (MTRCertificateTLVBytes)exampleRCACertTLV options:0]; } +- (NSData *)exampleRCACertPublicKey +{ + // Needs to match the "Public Key" listed above. + const unsigned char publicKeyBytes[] = "\x04\x61\xE7\x5C\xFE\x03\xEC\x90\x5E\xF4\x53\x77\xE5\xF4\xB5\x1D" + "\xE4\x3D\x55\xF4\xD4\xE7\xEA\x7B\x22\x76\x5E\x59\xCA\x0A\x9B\xDB" + "\x59\x8F\x69\xDB\x12\x8B\xFB\x35\xBF\x03\x1F\xE9\x51\xED\x53\x37" + "\x5D\x35\xB0\x53\x22\xF4\xDF\x7E\xBA\xEC\x02\xAC\x52\xF3\x1B\x9A" + "\xD7"; + return [NSData dataWithBytes:publicKeyBytes length:sizeof(publicKeyBytes) - 1]; +} + - (void)testParseRootCertificateTLV { MTRCertificateInfo * info = [[MTRCertificateInfo alloc] initWithTLVBytes:self.exampleRCACertTLV]; XCTAssertNotNil(info); + XCTAssertEqualObjects(info.publicKeyData, self.exampleRCACertPublicKey); XCTAssertEqual([NSDate.now compare:info.notBefore], NSOrderedDescending); XCTAssertEqual([NSDate.now compare:info.notAfter], NSOrderedAscending); @@ -113,10 +125,22 @@ - (MTRCertificateTLVBytes)exampleNOCertTLV options:0]; } +- (NSData *)exampleNOCertPublicKey +{ + // Needs to match the "Public Key" listed above. + const unsigned char publicKeyBytes[] = "\x04\xFD\x7F\x7A\x19\x37\xE0\x6D\xA4\xC2\xC9\x95\xC5\x5F\x01\x10" + "\xD2\xB0\xFC\x93\x50\x4C\x4A\x2A\xD5\x65\x90\x8B\x42\x7C\xAF\x60" + "\x4A\x1C\x24\xF9\xC1\x75\x61\x4C\x45\xDC\x87\x34\x0F\xB4\x1C\x24" + "\xD2\x40\x11\x3F\x82\x6D\x8B\x2A\x24\x0E\xE4\xA5\x9B\x30\xC6\xA9" + "\x51"; + return [NSData dataWithBytes:publicKeyBytes length:sizeof(publicKeyBytes) - 1]; +} + - (void)testParseOperationalCertificateTLV { MTRCertificateInfo * info = [[MTRCertificateInfo alloc] initWithTLVBytes:self.exampleNOCertTLV]; XCTAssertNotNil(info); + XCTAssertEqualObjects(info.publicKeyData, self.exampleNOCertPublicKey); XCTAssertEqual([NSDate.now compare:info.notBefore], NSOrderedDescending); XCTAssertEqual([NSDate.now compare:info.notAfter], NSOrderedAscending); diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index 8a3188cbeb..3fa4ff4544 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -25,6 +25,7 @@ #import #import "MTRCommandPayloadExtensions_Internal.h" +#import "MTRDeviceClusterData.h" #import "MTRDeviceControllerLocalTestStorage.h" #import "MTRDeviceStorageBehaviorConfiguration.h" #import "MTRDeviceTestDelegate.h" @@ -4466,6 +4467,726 @@ - (void)test039_GetAllAttributesReport } } +- (void)test040_AttributeValueExpectationSatisfaction +{ + __auto_type * device = [MTRDevice deviceWithNodeID:kDeviceId deviceController:sController]; + + __auto_type * testData = @[ + @{ + @"expected" : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(7), + }, + @"observed" : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(7) + }, + // Equal unsigned integer should satisfy expectation. + @"expectedComparison" : @(YES), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(7), + }, + @"observed" : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(9), + }, + // Unequal unsigned integer should not satisfy expectation + @"expectedComparison" : @(NO), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(7), + }, + @"observed" : @ { + MTRTypeKey : MTRSignedIntegerValueType, + MTRValueKey : @(7), + }, + // A signed integer does not satisfy expectation for an unsigned integer. + @"expectedComparison" : @(NO), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRNullValueType, + }, + @"observed" : @ { + MTRTypeKey : MTRNullValueType, + }, + // Null satisfies expectation for null. + @"expectedComparison" : @(YES), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(5), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + } + }, + ], + }, + @"observed" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(5), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(7), + } + }, + ], + }, + // A longer list does not satisfy expectation for a shorter array. + @"expectedComparison" : @(NO), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(5), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(7), + } + }, + ], + }, + @"observed" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(5), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + } + }, + ], + }, + // A shorter list does not satisfy expectation for a longer array. + @"expectedComparison" : @(NO), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(5), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + } + }, + ], + }, + @"observed" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(5), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + } + }, + ], + }, + // An observed array identical to an expected one satisfies the expectation. + @"expectedComparison" : @(YES), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(5), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + } + }, + ], + }, + @"observed" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(5), + } + }, + ], + }, + // An array with entries in a different order does not satisfy the expectation. + @"expectedComparison" : @(NO), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(1), + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + }, + }, + @{ + MTRContextTagKey : @(2), + MTRDataKey : @ { + MTRTypeKey : MTRUTF8StringValueType, + MTRValueKey : @("abc"), + }, + }, + ], + }, + @"observed" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(1), + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + }, + }, + @{ + MTRContextTagKey : @(2), + MTRDataKey : @ { + MTRTypeKey : MTRUTF8StringValueType, + MTRValueKey : @("abc"), + }, + }, + ], + }, + // A struct that has the same fields in the same order satisfiess the + // expectation. + @"expectedComparison" : @(YES), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(1), + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + }, + }, + @{ + MTRContextTagKey : @(2), + MTRDataKey : @ { + MTRTypeKey : MTRUTF8StringValueType, + MTRValueKey : @("abc"), + }, + }, + ], + }, + @"observed" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(1), + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + }, + }, + @{ + MTRContextTagKey : @(2), + MTRDataKey : @ { + MTRTypeKey : MTRUTF8StringValueType, + MTRValueKey : @("abcd"), + }, + }, + ], + }, + // A struct that has different fields in the same order does not + // satisfy the expectation. + @"expectedComparison" : @(NO), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(1), + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + }, + }, + @{ + MTRContextTagKey : @(2), + MTRDataKey : @ { + MTRTypeKey : MTRUTF8StringValueType, + MTRValueKey : @("abc"), + }, + }, + ], + }, + @"observed" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(2), + MTRDataKey : @ { + MTRTypeKey : MTRUTF8StringValueType, + MTRValueKey : @("abc"), + }, + }, + @{ + MTRContextTagKey : @(1), + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + }, + }, + ], + }, + // A struct that has the same fields in a different order satisfies + // the expectation. + @"expectedComparison" : @(YES), + }, + ]; + + for (NSDictionary * test in testData) { + XCTAssertEqual([device _attributeDataValue:test[@"observed"] satisfiesValueExpectation:test[@"expected"]], [test[@"expectedComparison"] boolValue], + "observed: %@, expected: %@", test[@"observed"], test[@"expected"]); + } +} + +- (void)test041_AttributeDataValueValidation +{ + __auto_type * testData = @[ + @{ + @"input" : @ { + MTRTypeKey : MTRSignedIntegerValueType, + MTRValueKey : @(-5), + }, + // -5 is a valid signed integer. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRSignedIntegerValueType, + MTRValueKey : @ {}, + }, + // A dictionary is not a valid signed integer. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(7), + }, + // 7 is a valid unsigned integer. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @("abc"), + }, + // "abc" is not an unsigned integer. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRBooleanValueType, + MTRValueKey : @(YES), + }, + // YES is a boolean. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRBooleanValueType, + MTRValueKey : [NSData data], + }, + // NSData is not a boolean integer. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRFloatValueType, + MTRValueKey : @(8), + }, + // 8 is a valid float. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRFloatValueType, + MTRValueKey : @(8.5), + }, + // 8.5 is a valid float. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRFloatValueType, + MTRValueKey : @[], + }, + // An array is not a float. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRDoubleValueType, + MTRValueKey : @(180), + }, + // 180 is a valid double. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRDoubleValueType, + MTRValueKey : @(9.5), + }, + // 9.5 is a valid double. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRDoubleValueType, + MTRValueKey : [NSDate date], + }, + // A date is not a double. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRNullValueType, + }, + // This is a valid null value. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRUTF8StringValueType, + MTRValueKey : @("def"), + }, + // "def" is a valid string. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRUTF8StringValueType, + MTRValueKey : [NSData data], + }, + // NSData is not a string. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTROctetStringValueType, + MTRValueKey : [NSData data], + }, + // NSData is an octet string. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTROctetStringValueType, + MTRValueKey : @(7), + }, + // 7 is not an octet string. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTROctetStringValueType, + MTRValueKey : @("abc"), + }, + // "abc" is not an octet string. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[], + }, + // This is a valid empty structure. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[], + }, + // This is a valid empty structure. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(7), + MTRDataKey : @ { + MTRTypeKey : MTRNullValueType + }, + }, + ], + }, + // This is a valid structure, one null field. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(1), + MTRDataKey : @ { + MTRTypeKey : MTRNullValueType + }, + }, + @{ + MTRContextTagKey : @(2), + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(9) + }, + }, + ], + }, + // This is a valid structure with two fields. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @(19), + }, + // 19 is not a structure. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRNullValueType + }, + }, + ], + }, + // Field does not have a context tag. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(7), + }, + ], + }, + // Field does not have a value. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(7), + MTRDataKey : @(5), + }, + ], + }, + // Field value is a number, not a data-value + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(7), + MTRDataKey : @[], + }, + ], + }, + // Field value is an array, not a data-value + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(7), + MTRDataKey : @ {}, + }, + ], + }, + // Field value is an invalid data-value + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @("abc"), + MTRDataKey : @ { + MTRTypeKey : MTRNullValueType + }, + }, + ], + }, + // Tag is not a number. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[], + }, + // This is a valid empty array. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRNullValueType + }, + }, + ], + }, + // This is an array with a single null value in it. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(8), + }, + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(10), + }, + }, + ], + }, + // This is an array with two integers in it. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(8), + }, + ], + }, + // This does not have a proper array-value in the array: missing MTRDataKey. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ @(7) ], + }, + // This does not have a proper array-value in the array: not a dictionary. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ @{} ], + }, + // This does not have a proper array-value in the array: empty + // dictionary, so no MTRDataKey. + @"valid" : @(NO), + }, + ]; + + for (NSDictionary * test in testData) { + XCTAssertEqual(MTRDataValueDictionaryIsWellFormed(test[@"input"]), [test[@"valid"] boolValue], + "input: %@", test[@"input"]); + } +} + @end @interface MTRDeviceEncoderTests : XCTestCase diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTypeTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTypeTests.m new file mode 100644 index 0000000000..7a41d42b40 --- /dev/null +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTypeTests.m @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2024 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 + +// system dependencies +#import + +@interface MTRDeviceTypeTests : XCTestCase + +@end + +@implementation MTRDeviceTypeTests + +- (void)testInvalidID +{ + __auto_type * deviceType = [MTRDeviceType deviceTypeForID:@(0x100000000)]; + XCTAssertNil(deviceType); +} + +- (void)testUnknownID +{ + __auto_type * deviceType = [MTRDeviceType deviceTypeForID:@(0xFFF15000)]; + XCTAssertNil(deviceType); +} + +- (void)testKnownNonUtilityID +{ + __auto_type * deviceType = [MTRDeviceType deviceTypeForID:@(MTRDeviceTypeIDTypeMicrowaveOvenID)]; + XCTAssertNotNil(deviceType); + XCTAssertEqualObjects(deviceType.id, @(0x0079)); + XCTAssertEqualObjects(deviceType.name, @"Microwave Oven"); + XCTAssertFalse(deviceType.isUtility); +} + +- (void)testKnownUtilityID +{ + __auto_type * deviceType = [MTRDeviceType deviceTypeForID:@(MTRDeviceTypeIDTypeRootNodeID)]; + XCTAssertNotNil(deviceType); + XCTAssertEqualObjects(deviceType.id, @(0x0016)); + XCTAssertEqualObjects(deviceType.name, @"Root Node"); + XCTAssertTrue(deviceType.isUtility); +} + +- (void)testRootNodeID +{ + __auto_type * deviceType = [MTRDeviceType deviceTypeForID:@(MTRDeviceTypeIDTypePowerSourceID)]; + XCTAssertNotNil(deviceType); + XCTAssertEqualObjects(deviceType.id, @(0x0011)); + XCTAssertEqualObjects(deviceType.name, @"Power Source"); + XCTAssertTrue(deviceType.isUtility); +} + +@end diff --git a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m index 6b193c7b55..721cb09b99 100644 --- a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m +++ b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m @@ -19,7 +19,9 @@ #import #import +#import "MTRDeviceClusterData.h" #import "MTRDeviceControllerLocalTestStorage.h" +#import "MTRDeviceDataValueDictionary.h" #import "MTRDeviceStorageBehaviorConfiguration.h" #import "MTRDeviceTestDelegate.h" #import "MTRDevice_Internal.h" diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h index 22998eb449..b00507d665 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h @@ -18,14 +18,14 @@ #import #import -// For MTRDeviceDataValueDictionary: +#import "MTRDeviceClusterData.h" +#import "MTRDeviceDataValueDictionary.h" #import "MTRDevice_Internal.h" NS_ASSUME_NONNULL_BEGIN #pragma mark - Declarations for internal methods -@class MTRDeviceClusterData; // MTRDeviceControllerDataStore.h includes C++ header, and so we need to declare the methods separately @protocol MTRDeviceControllerDataStoreAttributeStoreMethods - (nullable NSDictionary *)getStoredClusterDataForNodeID:(NSNumber *)nodeID; @@ -49,8 +49,8 @@ NS_ASSUME_NONNULL_BEGIN @end @interface MTRDevice (Test) -- (BOOL)_attributeDataValue:(NSDictionary *)one isEqualToDataValue:(NSDictionary *)theOther; - (NSMutableArray *)arrayOfNumbersFromAttributeValue:(MTRDeviceDataValueDictionary)dataDictionary; +- (void)setStorageBehaviorConfiguration:(MTRDeviceStorageBehaviorConfiguration *)storageBehaviorConfiguration; @end #pragma mark - Declarations for items compiled only for DEBUG configuration @@ -85,6 +85,7 @@ NS_ASSUME_NONNULL_BEGIN - (MTRDeviceClusterData *)unitTestGetClusterDataForPath:(MTRClusterPath *)path; - (NSSet *)unitTestGetPersistedClusters; - (BOOL)unitTestClusterHasBeenPersisted:(MTRClusterPath *)path; +- (NSUInteger)unitTestAttributeCount; @end #endif diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index afc1df1933..a08a406778 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -129,6 +129,12 @@ 3DFCB32C29678C9500332B35 /* MTRConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 3DFCB32B29678C9500332B35 /* MTRConversion.h */; }; 51029DF6293AA6100087AFB0 /* MTROperationalCertificateIssuer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51029DF5293AA6100087AFB0 /* MTROperationalCertificateIssuer.mm */; }; 510470FB2A2F7DF60053EA7E /* MTRBackwardsCompatShims.mm in Sources */ = {isa = PBXBuildFile; fileRef = 510470FA2A2F7DF60053EA7E /* MTRBackwardsCompatShims.mm */; }; + 5109E9B42CB8B5DF0006884B /* MTRDeviceType.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5109E9B32CB8B5DF0006884B /* MTRDeviceType.mm */; }; + 5109E9B52CB8B5DF0006884B /* MTRDeviceType.h in Headers */ = {isa = PBXBuildFile; fileRef = 5109E9B22CB8B5DF0006884B /* MTRDeviceType.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5109E9B72CB8B83D0006884B /* MTRDeviceTypeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5109E9B62CB8B83D0006884B /* MTRDeviceTypeTests.m */; }; + 5109E9BA2CC1F23E0006884B /* MTRDeviceClusterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5109E9B82CC1F23E0006884B /* MTRDeviceClusterData.h */; }; + 5109E9BB2CC1F23E0006884B /* MTRDeviceClusterData.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5109E9B92CC1F23E0006884B /* MTRDeviceClusterData.mm */; }; + 5109E9BD2CC1F25C0006884B /* MTRDeviceDataValueDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 5109E9BC2CC1F25C0006884B /* MTRDeviceDataValueDictionary.h */; }; 510A07492A685D3900A9241C /* Matter.apinotes in Headers */ = {isa = PBXBuildFile; fileRef = 510A07482A685D3900A9241C /* Matter.apinotes */; settings = {ATTRIBUTES = (Public, ); }; }; 510CECA8297F72970064E0B3 /* MTROperationalCertificateIssuerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 510CECA6297F72470064E0B3 /* MTROperationalCertificateIssuerTests.m */; }; 5117DD3829A931AE00FFA1AA /* MTROperationalBrowser.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5117DD3629A931AD00FFA1AA /* MTROperationalBrowser.mm */; }; @@ -329,6 +335,17 @@ B2E0D7B7245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2E0D7AE245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.mm */; }; B2E0D7B8245B0B5C003C5B48 /* MTRSetupPayload.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E0D7AF245B0B5C003C5B48 /* MTRSetupPayload.h */; settings = {ATTRIBUTES = (Public, ); }; }; B2E0D7B9245B0B5C003C5B48 /* MTRSetupPayload.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2E0D7B0245B0B5C003C5B48 /* MTRSetupPayload.mm */; }; + B43B39EA2CB859A5006AA284 /* DumpMemoryGraphCommand.mm in Sources */ = {isa = PBXBuildFile; fileRef = B43B39E62CB859A5006AA284 /* DumpMemoryGraphCommand.mm */; }; + B43B39EB2CB859A5006AA284 /* LeaksTool.mm in Sources */ = {isa = PBXBuildFile; fileRef = B43B39E82CB859A5006AA284 /* LeaksTool.mm */; }; + B43B39EC2CB859A5006AA284 /* DumpMemoryGraphCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B43B39E52CB859A5006AA284 /* DumpMemoryGraphCommand.h */; }; + B43B39ED2CB859A5006AA284 /* Commands.h in Headers */ = {isa = PBXBuildFile; fileRef = B43B39E42CB859A5006AA284 /* Commands.h */; }; + B43B39EE2CB859A5006AA284 /* LeaksTool.h in Headers */ = {isa = PBXBuildFile; fileRef = B43B39E72CB859A5006AA284 /* LeaksTool.h */; }; + B43B39F52CB99090006AA284 /* ControllerStorage.mm in Sources */ = {isa = PBXBuildFile; fileRef = B43B39F22CB99090006AA284 /* ControllerStorage.mm */; }; + B43B39F62CB99090006AA284 /* CertificateIssuer.mm in Sources */ = {isa = PBXBuildFile; fileRef = B43B39F02CB99090006AA284 /* CertificateIssuer.mm */; }; + B43B39F72CB99090006AA284 /* PreferencesStorage.mm in Sources */ = {isa = PBXBuildFile; fileRef = B43B39F42CB99090006AA284 /* PreferencesStorage.mm */; }; + B43B39F82CB99090006AA284 /* CertificateIssuer.h in Headers */ = {isa = PBXBuildFile; fileRef = B43B39EF2CB99090006AA284 /* CertificateIssuer.h */; }; + B43B39F92CB99090006AA284 /* PreferencesStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = B43B39F32CB99090006AA284 /* PreferencesStorage.h */; }; + B43B39FA2CB99090006AA284 /* ControllerStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = B43B39F12CB99090006AA284 /* ControllerStorage.h */; }; B45373AA2A9FE73400807602 /* WebSocketServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B45373A92A9FE73400807602 /* WebSocketServer.cpp */; }; B45373BD2A9FEA9100807602 /* service.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373B22A9FEA9000807602 /* service.c */; settings = {COMPILER_FLAGS = "-Wno-error -Wno-unreachable-code -Wno-conversion -Wno-format-nonliteral"; }; }; B45373BE2A9FEA9100807602 /* network.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373B32A9FEA9000807602 /* network.c */; settings = {COMPILER_FLAGS = "-Wno-error -Wno-unreachable-code -Wno-conversion -Wno-format-nonliteral"; }; }; @@ -373,6 +390,8 @@ B4E262172AA0CF2000DBA5BC /* RemoteDataModelLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = B4E262132AA0C7A300DBA5BC /* RemoteDataModelLogger.h */; }; B4E2621B2AA0D02000DBA5BC /* SleepCommand.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4E262192AA0D01D00DBA5BC /* SleepCommand.mm */; }; B4E2621E2AA0D02D00DBA5BC /* WaitForCommissioneeCommand.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4E2621C2AA0D02A00DBA5BC /* WaitForCommissioneeCommand.mm */; }; + B4F773CA2CB54B61008C6B23 /* LeakChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = B4F773C72CB54B61008C6B23 /* LeakChecker.h */; }; + B4F773CB2CB54B61008C6B23 /* LeakChecker.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4F773C82CB54B61008C6B23 /* LeakChecker.mm */; }; B4FCD56A2B5EDBD300832859 /* MTRDiagnosticLogsType.h in Headers */ = {isa = PBXBuildFile; fileRef = B4FCD5692B5EDBD300832859 /* MTRDiagnosticLogsType.h */; settings = {ATTRIBUTES = (Public, ); }; }; B4FCD5702B603A6300832859 /* Commands.h in Headers */ = {isa = PBXBuildFile; fileRef = B4FCD56D2B603A6300832859 /* Commands.h */; }; B4FCD5712B603A6300832859 /* DownloadLogCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B4FCD56E2B603A6300832859 /* DownloadLogCommand.h */; }; @@ -565,6 +584,12 @@ 3DFCB32B29678C9500332B35 /* MTRConversion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRConversion.h; sourceTree = ""; }; 51029DF5293AA6100087AFB0 /* MTROperationalCertificateIssuer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTROperationalCertificateIssuer.mm; sourceTree = ""; }; 510470FA2A2F7DF60053EA7E /* MTRBackwardsCompatShims.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRBackwardsCompatShims.mm; sourceTree = ""; }; + 5109E9B22CB8B5DF0006884B /* MTRDeviceType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDeviceType.h; sourceTree = ""; }; + 5109E9B32CB8B5DF0006884B /* MTRDeviceType.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceType.mm; sourceTree = ""; }; + 5109E9B62CB8B83D0006884B /* MTRDeviceTypeTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MTRDeviceTypeTests.m; sourceTree = ""; }; + 5109E9B82CC1F23E0006884B /* MTRDeviceClusterData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDeviceClusterData.h; sourceTree = ""; }; + 5109E9B92CC1F23E0006884B /* MTRDeviceClusterData.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceClusterData.mm; sourceTree = ""; }; + 5109E9BC2CC1F25C0006884B /* MTRDeviceDataValueDictionary.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDeviceDataValueDictionary.h; sourceTree = ""; }; 510A07482A685D3900A9241C /* Matter.apinotes */ = {isa = PBXFileReference; lastKnownFileType = text.apinotes; name = Matter.apinotes; path = CHIP/Matter.apinotes; sourceTree = ""; }; 510CECA6297F72470064E0B3 /* MTROperationalCertificateIssuerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTROperationalCertificateIssuerTests.m; sourceTree = ""; }; 5117DD3629A931AD00FFA1AA /* MTROperationalBrowser.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTROperationalBrowser.mm; sourceTree = ""; }; @@ -773,6 +798,17 @@ B2E0D7AE245B0B5C003C5B48 /* MTRQRCodeSetupPayloadParser.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRQRCodeSetupPayloadParser.mm; sourceTree = ""; }; B2E0D7AF245B0B5C003C5B48 /* MTRSetupPayload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRSetupPayload.h; sourceTree = ""; }; B2E0D7B0245B0B5C003C5B48 /* MTRSetupPayload.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRSetupPayload.mm; sourceTree = ""; }; + B43B39E42CB859A5006AA284 /* Commands.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Commands.h; sourceTree = ""; }; + B43B39E52CB859A5006AA284 /* DumpMemoryGraphCommand.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DumpMemoryGraphCommand.h; sourceTree = ""; }; + B43B39E62CB859A5006AA284 /* DumpMemoryGraphCommand.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = DumpMemoryGraphCommand.mm; sourceTree = ""; }; + B43B39E72CB859A5006AA284 /* LeaksTool.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LeaksTool.h; sourceTree = ""; }; + B43B39E82CB859A5006AA284 /* LeaksTool.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = LeaksTool.mm; sourceTree = ""; }; + B43B39EF2CB99090006AA284 /* CertificateIssuer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CertificateIssuer.h; sourceTree = ""; }; + B43B39F02CB99090006AA284 /* CertificateIssuer.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CertificateIssuer.mm; sourceTree = ""; }; + B43B39F12CB99090006AA284 /* ControllerStorage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ControllerStorage.h; sourceTree = ""; }; + B43B39F22CB99090006AA284 /* ControllerStorage.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = ControllerStorage.mm; sourceTree = ""; }; + B43B39F32CB99090006AA284 /* PreferencesStorage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PreferencesStorage.h; sourceTree = ""; }; + B43B39F42CB99090006AA284 /* PreferencesStorage.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = PreferencesStorage.mm; sourceTree = ""; }; B45373A92A9FE73400807602 /* WebSocketServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebSocketServer.cpp; sourceTree = ""; }; B45373B22A9FEA9000807602 /* service.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = service.c; path = "repo/lib/core-net/service.c"; sourceTree = ""; }; B45373B32A9FEA9000807602 /* network.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = network.c; path = "repo/lib/core-net/network.c"; sourceTree = ""; }; @@ -818,6 +854,8 @@ B4E262132AA0C7A300DBA5BC /* RemoteDataModelLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteDataModelLogger.h; sourceTree = ""; }; B4E262192AA0D01D00DBA5BC /* SleepCommand.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SleepCommand.mm; sourceTree = ""; }; B4E2621C2AA0D02A00DBA5BC /* WaitForCommissioneeCommand.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WaitForCommissioneeCommand.mm; sourceTree = ""; }; + B4F773C72CB54B61008C6B23 /* LeakChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LeakChecker.h; sourceTree = ""; }; + B4F773C82CB54B61008C6B23 /* LeakChecker.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LeakChecker.mm; sourceTree = ""; }; B4FCD5692B5EDBD300832859 /* MTRDiagnosticLogsType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDiagnosticLogsType.h; sourceTree = ""; }; B4FCD56D2B603A6300832859 /* Commands.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Commands.h; sourceTree = ""; }; B4FCD56E2B603A6300832859 /* DownloadLogCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownloadLogCommand.h; sourceTree = ""; }; @@ -874,6 +912,7 @@ 037C3CA82991A44B00B7EEE2 /* darwin-framework-tool */ = { isa = PBXGroup; children = ( + B4F773C92CB54B61008C6B23 /* debug */, 039145E02993102B00257B3E /* main.mm */, 03F430A52994100000166449 /* controller */, 039547092992DB02006D42A8 /* editline */, @@ -892,6 +931,7 @@ 037C3D7B2991BD4F00B7EEE2 /* commands */ = { isa = PBXGroup; children = ( + B43B39E92CB859A5006AA284 /* memory */, 5124311D2BA0C09A000BC136 /* configuration */, B4FCD56C2B603A6300832859 /* bdx */, B4E262182AA0CFFE00DBA5BC /* delay */, @@ -971,6 +1011,12 @@ 037C3D9B2991BD4F00B7EEE2 /* common */ = { isa = PBXGroup; children = ( + B43B39EF2CB99090006AA284 /* CertificateIssuer.h */, + B43B39F02CB99090006AA284 /* CertificateIssuer.mm */, + B43B39F12CB99090006AA284 /* ControllerStorage.h */, + B43B39F22CB99090006AA284 /* ControllerStorage.mm */, + B43B39F32CB99090006AA284 /* PreferencesStorage.h */, + B43B39F42CB99090006AA284 /* PreferencesStorage.mm */, B4E262132AA0C7A300DBA5BC /* RemoteDataModelLogger.h */, B4E262122AA0C7A300DBA5BC /* RemoteDataModelLogger.mm */, 037C3D9C2991BD4F00B7EEE2 /* CHIPCommandBridge.mm */, @@ -1343,6 +1389,8 @@ 7534F12628BFF20300390851 /* MTRDeviceAttestationDelegate.mm */, 88EBF8CD27FABDD500686BC1 /* MTRDeviceAttestationDelegateBridge.h */, 88EBF8CC27FABDD500686BC1 /* MTRDeviceAttestationDelegateBridge.mm */, + 5109E9B82CC1F23E0006884B /* MTRDeviceClusterData.h */, + 5109E9B92CC1F23E0006884B /* MTRDeviceClusterData.mm */, 2C5EEEF4268A85C400CAE3D3 /* MTRDeviceConnectionBridge.h */, 2C5EEEF5268A85C400CAE3D3 /* MTRDeviceConnectionBridge.mm */, 75B3269B2BCDB9D600E17C4E /* MTRDeviceConnectivityMonitor.h */, @@ -1377,12 +1425,15 @@ 51565CB32A7AD78D00469F18 /* MTRDeviceControllerStorageDelegate.h */, 5A6FEC9427B5976200F25F42 /* MTRDeviceControllerXPCConnection.h */, 5A6FEC9527B5983000F25F42 /* MTRDeviceControllerXPCConnection.mm */, + 5109E9BC2CC1F25C0006884B /* MTRDeviceDataValueDictionary.h */, 5A6FEC8B27B5609C00F25F42 /* MTRDeviceOverXPC.h */, 5A6FEC9727B5C6AF00F25F42 /* MTRDeviceOverXPC.mm */, 754784632BFE65B70089C372 /* MTRDeviceStorageBehaviorConfiguration.h */, 754784662BFE6B890089C372 /* MTRDeviceStorageBehaviorConfiguration_Internal.h */, 754784642BFE65CB0089C372 /* MTRDeviceStorageBehaviorConfiguration.mm */, 51F522692AE70761000C4050 /* MTRDeviceTypeMetadata.h */, + 5109E9B22CB8B5DF0006884B /* MTRDeviceType.h */, + 5109E9B32CB8B5DF0006884B /* MTRDeviceType.mm */, 5129BCFC26A9EE3300122DDF /* MTRError.h */, B2E0D7AB245B0B5C003C5B48 /* MTRError_Internal.h */, B2E0D7AA245B0B5C003C5B48 /* MTRError.mm */, @@ -1458,6 +1509,7 @@ 51A2F1312A00402A00F03298 /* MTRDataValueParserTests.m */, 5AE6D4E327A99041001F2493 /* MTRDeviceTests.m */, 75B326A12BCF12E900E17C4E /* MTRDeviceConnectivityMonitorTests.m */, + 5109E9B62CB8B83D0006884B /* MTRDeviceTypeTests.m */, 51D9CB0A2BA37DCE0049D6DB /* MTRDSTOffsetTests.m */, 3D0C484A29DA4FA0006D811F /* MTRErrorTests.m */, 5173A47829C0E82300F67F48 /* MTRFabricInfoTests.m */, @@ -1479,6 +1531,18 @@ path = CHIPTests; sourceTree = ""; }; + B43B39E92CB859A5006AA284 /* memory */ = { + isa = PBXGroup; + children = ( + B43B39E42CB859A5006AA284 /* Commands.h */, + B43B39E52CB859A5006AA284 /* DumpMemoryGraphCommand.h */, + B43B39E62CB859A5006AA284 /* DumpMemoryGraphCommand.mm */, + B43B39E72CB859A5006AA284 /* LeaksTool.h */, + B43B39E82CB859A5006AA284 /* LeaksTool.mm */, + ); + path = memory; + sourceTree = ""; + }; B45373AD2A9FE9BF00807602 /* libwebsockets */ = { isa = PBXGroup; children = ( @@ -1543,6 +1607,15 @@ path = delay; sourceTree = ""; }; + B4F773C92CB54B61008C6B23 /* debug */ = { + isa = PBXGroup; + children = ( + B4F773C72CB54B61008C6B23 /* LeakChecker.h */, + B4F773C82CB54B61008C6B23 /* LeakChecker.mm */, + ); + path = debug; + sourceTree = ""; + }; B4FCD56C2B603A6300832859 /* bdx */ = { isa = PBXGroup; children = ( @@ -1594,6 +1667,10 @@ 037C3DAF2991BD4F00B7EEE2 /* DeviceControllerDelegateBridge.h in Headers */, B4FCD5712B603A6300832859 /* DownloadLogCommand.h in Headers */, 037C3DC32991BD5100B7EEE2 /* Commands.h in Headers */, + B4F773CA2CB54B61008C6B23 /* LeakChecker.h in Headers */, + B43B39F82CB99090006AA284 /* CertificateIssuer.h in Headers */, + B43B39F92CB99090006AA284 /* PreferencesStorage.h in Headers */, + B43B39FA2CB99090006AA284 /* ControllerStorage.h in Headers */, 037C3DB82991BD5000B7EEE2 /* ClusterCommandBridge.h in Headers */, 037C3DC82991BD5100B7EEE2 /* CHIPToolKeypair.h in Headers */, 037C3DB52991BD5000B7EEE2 /* WriteAttributeCommandBridge.h in Headers */, @@ -1604,6 +1681,9 @@ 037C3DD12991BD5200B7EEE2 /* Commands.h in Headers */, 037C3DB92991BD5000B7EEE2 /* ReportCommandBridge.h in Headers */, 037C3DBE2991BD5000B7EEE2 /* OTASoftwareUpdateInteractive.h in Headers */, + B43B39EC2CB859A5006AA284 /* DumpMemoryGraphCommand.h in Headers */, + B43B39ED2CB859A5006AA284 /* Commands.h in Headers */, + B43B39EE2CB859A5006AA284 /* LeaksTool.h in Headers */, 037C3DBD2991BD5000B7EEE2 /* OTAProviderDelegate.h in Headers */, B4FCD5702B603A6300832859 /* Commands.h in Headers */, 037C3DB02991BD4F00B7EEE2 /* Commands.h in Headers */, @@ -1627,6 +1707,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 5109E9BD2CC1F25C0006884B /* MTRDeviceDataValueDictionary.h in Headers */, 51D0B1282B617246006E3511 /* MTRServerEndpoint.h in Headers */, 51565CB62A7B0D6600469F18 /* MTRDeviceControllerParameters.h in Headers */, 51565CB42A7AD78D00469F18 /* MTRDeviceControllerStorageDelegate.h in Headers */, @@ -1673,6 +1754,7 @@ 2C222AD0255C620600E446B9 /* MTRBaseDevice.h in Headers */, 7596A84F2877E6A9004DAE0E /* MTRCluster_Internal.h in Headers */, 9B5CCB612C6EE29E009DD99B /* MTRDeviceControllerXPCParameters.h in Headers */, + 5109E9BA2CC1F23E0006884B /* MTRDeviceClusterData.h in Headers */, 991DC0842475F45400C13860 /* MTRDeviceController.h in Headers */, 88FA798D2B7B257100CD4B6F /* MTRMetricsCollector.h in Headers */, 9BFE5D502C6D3075007D4319 /* MTRDeviceController_XPC.h in Headers */, @@ -1739,6 +1821,7 @@ 991DC08B247704DC00C13860 /* MTRLogging_Internal.h in Headers */, 51FE723F2ACDEF3E00437032 /* MTRCommandPayloadExtensions_Internal.h in Headers */, 51D0B12E2B6177FD006E3511 /* MTRAccessGrant.h in Headers */, + 5109E9B52CB8B5DF0006884B /* MTRDeviceType.h in Headers */, 1E4D655029C208DD00BC3478 /* MTRCommissionableBrowserDelegate.h in Headers */, 7596A84828762783004DAE0E /* MTRAsyncCallbackWorkQueue.h in Headers */, 5A7947E527C0129F00434CF2 /* MTRDeviceController+XPC.h in Headers */, @@ -1900,6 +1983,7 @@ 03F430A82994112B00166449 /* editline.c in Sources */, 03F430AA2994113500166449 /* sysunix.c in Sources */, B45373BF2A9FEA9100807602 /* adopt.c in Sources */, + B4F773CB2CB54B61008C6B23 /* LeakChecker.mm in Sources */, B45373D12A9FEB0C00807602 /* alloc.c in Sources */, B45373DD2A9FEB5300807602 /* base64-decode.c in Sources */, B45373D22A9FEB0C00807602 /* buflist.c in Sources */, @@ -1929,6 +2013,11 @@ B45373DF2A9FEB6F00807602 /* system.c in Sources */, B45373FC2A9FEC4F00807602 /* unix-caps.c in Sources */, B45373FE2A9FEC4F00807602 /* unix-fds.c in Sources */, + B43B39F52CB99090006AA284 /* ControllerStorage.mm in Sources */, + B43B39F62CB99090006AA284 /* CertificateIssuer.mm in Sources */, + B43B39F72CB99090006AA284 /* PreferencesStorage.mm in Sources */, + B43B39EA2CB859A5006AA284 /* DumpMemoryGraphCommand.mm in Sources */, + B43B39EB2CB859A5006AA284 /* LeaksTool.mm in Sources */, B45374002A9FEC4F00807602 /* unix-init.c in Sources */, B45373FF2A9FEC4F00807602 /* unix-misc.c in Sources */, E04AC67E2BEEA17F00BA409B /* ember-io-storage.cpp in Sources */, @@ -2042,6 +2131,7 @@ 511913FB28C100EF009235E9 /* MTRBaseSubscriptionCallback.mm in Sources */, 510470FB2A2F7DF60053EA7E /* MTRBackwardsCompatShims.mm in Sources */, 5173A47629C0E2ED00F67F48 /* MTRFabricInfo.mm in Sources */, + 5109E9BB2CC1F23E0006884B /* MTRDeviceClusterData.mm in Sources */, 9B231B052C62EF650030EB37 /* MTRDeviceController_Concrete.mm in Sources */, 5ACDDD7D27CD16D200EFD68A /* MTRClusterStateCacheContainer.mm in Sources */, 75B3269E2BCDB9EA00E17C4E /* MTRDeviceConnectivityMonitor.mm in Sources */, @@ -2049,6 +2139,7 @@ 513DDB8A2761F6F900DAA01A /* MTRAttributeTLVValueDecoder.mm in Sources */, 5117DD3829A931AE00FFA1AA /* MTROperationalBrowser.mm in Sources */, 514C79F02B62ADDA00DD6D7B /* descriptor.cpp in Sources */, + 5109E9B42CB8B5DF0006884B /* MTRDeviceType.mm in Sources */, 3D843757294AD25A0070D20A /* MTRCertificateInfo.mm in Sources */, 5A7947E427C0129600434CF2 /* MTRDeviceController+XPC.mm in Sources */, 5A6FEC9027B563D900F25F42 /* MTRDeviceControllerOverXPC.mm in Sources */, @@ -2116,6 +2207,7 @@ 5142E39829D377F000A206F0 /* MTROTAProviderTests.m in Sources */, 51E0FC102ACBBF230001E197 /* MTRSwiftDeviceTests.swift in Sources */, 3D4733AF2BDF1B80003DC19B /* MTRSetupPayloadTests.m in Sources */, + 5109E9B72CB8B83D0006884B /* MTRDeviceTypeTests.m in Sources */, 51E24E73274E0DAC007CCF6E /* MTRErrorTestUtils.mm in Sources */, 519498322A25581C00B3BABE /* MTRSetupPayloadInitializationTests.m in Sources */, 51A2F1322A00402A00F03298 /* MTRDataValueParserTests.m in Sources */, @@ -2165,7 +2257,6 @@ "$(CHIP_ROOT)/third_party/nlio/repo/include", "$(CHIP_ROOT)/third_party/jsoncpp/repo/include", "$(CHIP_ROOT)/zzz_generated/darwin-framework-tool", - "$(CHIP_ROOT)/config/ios", "$(CHIP_ROOT)/third_party/editline/repo/include", "$(CHIP_ROOT)/src/include", "$(CONFIGURATION_TEMP_DIR)/Matter.build/out/gen/include", @@ -2198,7 +2289,12 @@ "$(CONFIGURATION_TEMP_DIR)/Matter.build/out/obj/src/app/lib", ); OTHER_CFLAGS = "-DLWS_PLAT_UNIX"; + "OTHER_CFLAGS[sdk=iphoneos*]" = ( + "-DLWS_PLAT_UNIX", + "-DLWS_DETECTED_PLAT_IOS", + ); OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; + "OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*]" = "$(OTHER_CFLAGS)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = macosx; @@ -2237,7 +2333,6 @@ "$(CHIP_ROOT)/zzz_generated/app-common", "$(CHIP_ROOT)/third_party/nlio/repo/include", "$(CHIP_ROOT)/third_party/jsoncpp/repo/include", - "$(CHIP_ROOT)/config/ios", "$(CHIP_ROOT)/third_party/editline/repo/include", "$(CHIP_ROOT)/third_party/libwebsockets", "$(CHIP_ROOT)/third_party/libwebsockets/repo/include", @@ -2271,7 +2366,12 @@ "$(CONFIGURATION_TEMP_DIR)/Matter.build/out/obj/src/app/lib", ); OTHER_CFLAGS = "-DLWS_PLAT_UNIX"; + "OTHER_CFLAGS[sdk=iphoneos*]" = ( + "-DLWS_PLAT_UNIX", + "-DLWS_DETECTED_PLAT_IOS", + ); OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; + "OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*]" = "$(OTHER_CFLAGS)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = macosx; @@ -2424,7 +2524,6 @@ SYSTEM_HEADER_SEARCH_PATHS = ( "$(TEMP_DIR)/out/gen/include", "$(CHIP_ROOT)/src/darwin/Framework/CHIP/", - "$(CHIP_ROOT)/config/ios", "$(CHIP_ROOT)/src", "$(CHIP_ROOT)/src/include", "$(CHIP_ROOT)/zzz_generated/", @@ -2596,7 +2695,6 @@ SYSTEM_HEADER_SEARCH_PATHS = ( "$(TEMP_DIR)/out/gen/include", "$(CHIP_ROOT)/src/darwin/Framework/CHIP/", - "$(CHIP_ROOT)/config/ios", "$(CHIP_ROOT)/src", "$(CHIP_ROOT)/src/include", "$(CHIP_ROOT)/zzz_generated/", diff --git a/src/darwin/Framework/chip_xcode_build_connector.sh b/src/darwin/Framework/chip_xcode_build_connector.sh index 5947ae7dd3..0c08ab381b 100755 --- a/src/darwin/Framework/chip_xcode_build_connector.sh +++ b/src/darwin/Framework/chip_xcode_build_connector.sh @@ -103,6 +103,7 @@ done [[ $ENABLE_BITCODE == YES ]] && target_cflags+=("-flto") declare -a args=( + 'import("//config/darwin/args.gni")' 'default_configs_cosmetic=[]' # suppress colorization 'chip_crypto="boringssl"' 'chip_build_controller_dynamic_server=false' @@ -132,7 +133,6 @@ esac [[ $PLATFORM_FAMILY_NAME != macOS ]] && { args+=( 'target_os="ios"' - 'import("//config/ios/args.gni")' ) } diff --git a/src/include/platform/ConnectivityManager.h b/src/include/platform/ConnectivityManager.h index 209d7484b9..cac22ed0da 100644 --- a/src/include/platform/ConnectivityManager.h +++ b/src/include/platform/ConnectivityManager.h @@ -52,6 +52,8 @@ namespace Internal { template class GenericPlatformManagerImpl; template +class GenericPlatformManagerImpl_CMSISOS; +template class GenericPlatformManagerImpl_FreeRTOS; template class GenericPlatformManagerImpl_POSIX; @@ -249,6 +251,8 @@ class ConnectivityManager template friend class Internal::GenericPlatformManagerImpl; template + friend class Internal::GenericPlatformManagerImpl_CMSISOS; + template friend class Internal::GenericPlatformManagerImpl_FreeRTOS; template friend class Internal::GenericPlatformManagerImpl_POSIX; diff --git a/src/include/platform/PlatformManager.h b/src/include/platform/PlatformManager.h index 4ce673ec41..c5fc1f1c08 100644 --- a/src/include/platform/PlatformManager.h +++ b/src/include/platform/PlatformManager.h @@ -53,6 +53,8 @@ class GenericConfigurationManagerImpl; template class GenericPlatformManagerImpl; template +class GenericPlatformManagerImpl_CMSISOS; +template class GenericPlatformManagerImpl_FreeRTOS; template class GenericPlatformManagerImpl_POSIX; @@ -261,6 +263,8 @@ class PlatformManager template friend class Internal::GenericPlatformManagerImpl; template + friend class Internal::GenericPlatformManagerImpl_CMSISOS; + template friend class Internal::GenericPlatformManagerImpl_FreeRTOS; template friend class Internal::GenericPlatformManagerImpl_POSIX; diff --git a/src/include/platform/ThreadStackManager.h b/src/include/platform/ThreadStackManager.h index f9f7aed04e..9498ad894c 100644 --- a/src/include/platform/ThreadStackManager.h +++ b/src/include/platform/ThreadStackManager.h @@ -55,6 +55,8 @@ class GenericPlatformManagerImpl; template class GenericConfigurationManagerImpl; template +class GenericPlatformManagerImpl_CMSISOS; +template class GenericPlatformManagerImpl_FreeRTOS; template class GenericConnectivityManagerImpl_Thread; @@ -168,6 +170,8 @@ class ThreadStackManager template friend class Internal::GenericConfigurationManagerImpl; template + friend class Internal::GenericPlatformManagerImpl_CMSISOS; + template friend class Internal::GenericPlatformManagerImpl_FreeRTOS; template friend class Internal::GenericConnectivityManagerImpl_Thread; diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.ipp b/src/include/platform/internal/GenericConfigurationManagerImpl.ipp index 9b36f34104..d9769576c9 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.ipp +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.ipp @@ -177,7 +177,7 @@ CHIP_ERROR LegacyTemporaryCommissionableDataProvider::GetSpake2pSal if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) { saltB64Len = strlen(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_SALT); - ReturnErrorCodeIf(saltB64Len > sizeof(saltB64), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(saltB64Len <= sizeof(saltB64), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(saltB64, CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_SALT, saltB64Len); err = CHIP_NO_ERROR; } @@ -189,7 +189,7 @@ CHIP_ERROR LegacyTemporaryCommissionableDataProvider::GetSpake2pSal size_t saltLen = chip::Base64Decode32(saltB64, static_cast(saltB64Len), reinterpret_cast(saltB64)); - ReturnErrorCodeIf(saltLen > saltBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(saltLen <= saltBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(saltBuf.data(), saltB64, saltLen); saltBuf.reduce_size(saltLen); @@ -214,7 +214,7 @@ CHIP_ERROR LegacyTemporaryCommissionableDataProvider::GetSpake2pVer if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) { verifierB64Len = strlen(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_VERIFIER); - ReturnErrorCodeIf(verifierB64Len > sizeof(verifierB64), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(verifierB64Len <= sizeof(verifierB64), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(verifierB64, CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_VERIFIER, verifierB64Len); err = CHIP_NO_ERROR; } @@ -226,7 +226,7 @@ CHIP_ERROR LegacyTemporaryCommissionableDataProvider::GetSpake2pVer verifierLen = chip::Base64Decode32(verifierB64, static_cast(verifierB64Len), reinterpret_cast(verifierB64)); - ReturnErrorCodeIf(verifierLen > verifierBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(verifierLen <= verifierBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(verifierBuf.data(), verifierB64, verifierLen); verifierBuf.reduce_size(verifierLen); @@ -351,7 +351,7 @@ CHIP_ERROR GenericConfigurationManagerImpl::GetSecondaryPairingHint template CHIP_ERROR GenericConfigurationManagerImpl::GetSoftwareVersionString(char * buf, size_t bufSize) { - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); return CHIP_NO_ERROR; } @@ -516,8 +516,8 @@ CHIP_ERROR GenericConfigurationManagerImpl::GetUniqueId(char * buf, ReturnErrorOnFailure(err); - ReturnErrorCodeIf(uniqueIdLen >= bufSize, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(buf[uniqueIdLen] != 0, CHIP_ERROR_INVALID_STRING_LENGTH); + VerifyOrReturnError(uniqueIdLen < bufSize, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(buf[uniqueIdLen] == 0, CHIP_ERROR_INVALID_STRING_LENGTH); return err; } @@ -552,8 +552,8 @@ CHIP_ERROR GenericConfigurationManagerImpl::IncrementLifetimeCounte template CHIP_ERROR GenericConfigurationManagerImpl::SetRotatingDeviceIdUniqueId(const ByteSpan & uniqueIdSpan) { - ReturnErrorCodeIf(uniqueIdSpan.size() < kMinRotatingDeviceIDUniqueIDLength, CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(uniqueIdSpan.size() > CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID_LENGTH, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(uniqueIdSpan.size() >= kMinRotatingDeviceIDUniqueIDLength, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(uniqueIdSpan.size() <= CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID_LENGTH, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(mRotatingDeviceIdUniqueId, uniqueIdSpan.data(), uniqueIdSpan.size()); mRotatingDeviceIdUniqueIdLength = uniqueIdSpan.size(); return CHIP_NO_ERROR; @@ -562,7 +562,7 @@ CHIP_ERROR GenericConfigurationManagerImpl::SetRotatingDeviceIdUniq template CHIP_ERROR GenericConfigurationManagerImpl::GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) { - ReturnErrorCodeIf(mRotatingDeviceIdUniqueIdLength > uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mRotatingDeviceIdUniqueIdLength <= uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(uniqueIdSpan.data(), mRotatingDeviceIdUniqueId, mRotatingDeviceIdUniqueIdLength); uniqueIdSpan.reduce_size(mRotatingDeviceIdUniqueIdLength); return CHIP_NO_ERROR; @@ -646,7 +646,7 @@ bool GenericConfigurationManagerImpl::IsCommissionableDeviceNameEna template CHIP_ERROR GenericConfigurationManagerImpl::GetCommissionableDeviceName(char * buf, size_t bufSize) { - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_DEVICE_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_NAME); return CHIP_NO_ERROR; } @@ -654,7 +654,7 @@ CHIP_ERROR GenericConfigurationManagerImpl::GetCommissionableDevice template CHIP_ERROR GenericConfigurationManagerImpl::GetInitialPairingInstruction(char * buf, size_t bufSize) { - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_PAIRING_INITIAL_INSTRUCTION), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_PAIRING_INITIAL_INSTRUCTION), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_PAIRING_INITIAL_INSTRUCTION); return CHIP_NO_ERROR; } @@ -662,7 +662,7 @@ CHIP_ERROR GenericConfigurationManagerImpl::GetInitialPairingInstru template CHIP_ERROR GenericConfigurationManagerImpl::GetSecondaryPairingInstruction(char * buf, size_t bufSize) { - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_PAIRING_SECONDARY_INSTRUCTION), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_PAIRING_SECONDARY_INSTRUCTION), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_PAIRING_SECONDARY_INSTRUCTION); return CHIP_NO_ERROR; } diff --git a/src/include/platform/internal/GenericDeviceInstanceInfoProvider.ipp b/src/include/platform/internal/GenericDeviceInstanceInfoProvider.ipp index 549c3eb360..4febf88385 100644 --- a/src/include/platform/internal/GenericDeviceInstanceInfoProvider.ipp +++ b/src/include/platform/internal/GenericDeviceInstanceInfoProvider.ipp @@ -38,7 +38,7 @@ CHIP_ERROR GenericDeviceInstanceInfoProvider::GetProductId(uint16_t template CHIP_ERROR GenericDeviceInstanceInfoProvider::GetVendorName(char * buf, size_t bufSize) { - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME); return CHIP_NO_ERROR; } @@ -46,7 +46,7 @@ CHIP_ERROR GenericDeviceInstanceInfoProvider::GetVendorName(char * template CHIP_ERROR GenericDeviceInstanceInfoProvider::GetProductName(char * buf, size_t bufSize) { - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME); return CHIP_NO_ERROR; @@ -99,7 +99,7 @@ CHIP_ERROR GenericDeviceInstanceInfoProvider::GetSerialNumber(char #ifdef CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER if (CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER[0] != 0 && err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) { - ReturnErrorCodeIf(sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER) > bufSize, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER) <= bufSize, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(buf, CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER, sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER)); serialNumLen = sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER) - 1; err = CHIP_NO_ERROR; @@ -107,8 +107,8 @@ CHIP_ERROR GenericDeviceInstanceInfoProvider::GetSerialNumber(char #endif // CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER ReturnErrorOnFailure(err); - ReturnErrorCodeIf(serialNumLen >= bufSize, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(buf[serialNumLen] != 0, CHIP_ERROR_INVALID_STRING_LENGTH); + VerifyOrReturnError(serialNumLen < bufSize, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(buf[serialNumLen] == 0, CHIP_ERROR_INVALID_STRING_LENGTH); return err; } @@ -176,7 +176,7 @@ CHIP_ERROR GenericDeviceInstanceInfoProvider::GetHardwareVersion(ui template CHIP_ERROR GenericDeviceInstanceInfoProvider::GetHardwareVersionString(char * buf, size_t bufSize) { - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING); return CHIP_NO_ERROR; } @@ -194,8 +194,8 @@ CHIP_ERROR GenericDeviceInstanceInfoProvider::GetRotatingDeviceIdUn constexpr uint8_t uniqueId[] = CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID; - ReturnErrorCodeIf(sizeof(uniqueId) > uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(sizeof(uniqueId) != ConfigurationManager::kRotatingDeviceIDUniqueIDLength, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(sizeof(uniqueId) <= uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(sizeof(uniqueId) == ConfigurationManager::kRotatingDeviceIDUniqueIDLength, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(uniqueIdSpan.data(), uniqueId, sizeof(uniqueId)); uniqueIdSpan.reduce_size(sizeof(uniqueId)); } diff --git a/src/include/platform/internal/GenericPlatformManagerImpl_CMSISOS.h b/src/include/platform/internal/GenericPlatformManagerImpl_CMSISOS.h new file mode 100644 index 0000000000..e40281527a --- /dev/null +++ b/src/include/platform/internal/GenericPlatformManagerImpl_CMSISOS.h @@ -0,0 +1,182 @@ +/* + * + * Copyright (c) 2021-2024 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 + * Provides an generic implementation of PlatformManager features + * for platform using CMSISOS 2 OS Abstraction APIs. + */ + +#pragma once + +#include +#include + +#include +#include + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +/** + * Provides a generic implementation of PlatformManager features for platforms using CMSISOS 2 OS Abstraction APIs + * + * This template contains implementations of select features from the PlatformManager abstract + * interface that are suitable for use on CMSISOS-based platforms. It is intended to be inherited + * (directly or indirectly) by the PlatformManagerImpl class, which also appears as the template's + * ImplClass parameter. + */ +template +class GenericPlatformManagerImpl_CMSISOS : public GenericPlatformManagerImpl +{ + +protected: + osMutexId_t mChipStackLock = nullptr; + osMessageQueueId_t mChipEventQueue = nullptr; + osThreadId_t mEventLoopTask = nullptr; + bool mChipTimerActive; + +#if defined(CHIP_DEVICE_CONFIG_ENABLE_BG_EVENT_PROCESSING) && CHIP_DEVICE_CONFIG_ENABLE_BG_EVENT_PROCESSING + osMessageQueueId_t mBackgroundEventQueue = nullptr; + osThreadId_t mBackgroundEventLoopTask = nullptr; +#endif + + // ===== Methods that implement the PlatformManager abstract interface. + + CHIP_ERROR _InitChipStack(); + + void _LockChipStack(void); + bool _TryLockChipStack(void); + void _UnlockChipStack(void); + + CHIP_ERROR _PostEvent(const ChipDeviceEvent * event); + void _RunEventLoop(void); + CHIP_ERROR _StartEventLoopTask(void); + CHIP_ERROR _StopEventLoopTask(); + CHIP_ERROR _StartChipTimer(System::Clock::Timeout duration); + void _Shutdown(void); + +#if CHIP_STACK_LOCK_TRACKING_ENABLED + bool _IsChipStackLockedByCurrentThread() const; +#endif + + CHIP_ERROR _PostBackgroundEvent(const ChipDeviceEvent * event); + void _RunBackgroundEventLoop(void); + CHIP_ERROR _StartBackgroundEventLoopTask(void); + CHIP_ERROR _StopBackgroundEventLoopTask(); + + // ===== Methods available to the implementation subclass. + +private: + // ===== Private members for use by this class only. + + inline ImplClass * Impl() { return static_cast(this); } + + static void EventLoopTaskMain(void * pvParameter); + uint32_t SyncNextChipTimerHandling(); + uint32_t mNextTimerBaseTime = 0; + uint32_t mNextTimerDurationTicks = 0; + std::atomic mShouldRunEventLoop; + +#if defined(CHIP_CONFIG_CMSISOS_USE_STATIC_QUEUE) && CHIP_CONFIG_CMSISOS_USE_STATIC_QUEUE + uint8_t mEventQueueBuffer[CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE * sizeof(ChipDeviceEvent)]; + osMessageQueue_t mEventQueueStruct; + const osMessageQueueAttr_t mEventQueueAttr = { .cb_mem = &mEventQueueStruct, + .cb_size = osMessageQueueCbSize, + .mq_mem = mEventQueueBuffer, + .mq_size = sizeof(mEventQueueBuffer) }; + + const osMessageQueueAttr_t * mEventQueueAttrPtr = &mEventQueueAttr; +#else + // Nothing to configure for queues, Just use this to avoid #ifdef in the class implementation + const osMessageQueueAttr_t * mEventQueueAttrPtr = nullptr; +#endif // CHIP_CONFIG_CMSISOS_USE_STATIC_QUEUE + +#if defined(CHIP_CONFIG_CMSISOS_USE_STATIC_TASK) && CHIP_CONFIG_CMSISOS_USE_STATIC_TASK + uint8_t mEventLoopStack[CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE]; + osThread_t mEventLoopTaskControlBlock; +#endif // CHIP_CONFIG_CMSISOS_USE_STATIC_TASK + + const osThreadAttr_t mEventLoopTaskAttr = { + .name = CHIP_DEVICE_CONFIG_CHIP_TASK_NAME, + .attr_bits = osThreadDetached, +#if defined(CHIP_CONFIG_CMSISOS_USE_STATIC_TASK) && CHIP_CONFIG_CMSISOS_USE_STATIC_TASK + .cb_mem = &mEventLoopTaskControlBlock, + .cb_size = osThreadCbSize, + .stack_mem = mEventLoopStack, +#endif // CHIP_CONFIG_CMSISOS_USE_STATIC_TASK + .stack_size = CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE, + .priority = CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY + }; + +#if defined(CHIP_CONFIG_CMSISOS_USE_STATIC_MUTEX) && CHIP_CONFIG_CMSISOS_USE_STATIC_MUTEX + osMutexCbSize uint8_t mMutexControlBlock[osMutexCbSize]; +#endif // CHIP_CONFIG_CMSISOS_USE_STATIC_MUTEX + const osMutexAttr_t mChipStackMutexAttr = { + .name = "", +#if defined(CHIP_CONFIG_CMSISOS_USE_STATIC_MUTEX) && CHIP_CONFIG_CMSISOS_USE_STATIC_MUTEX + .cb_mem = &mMutexControlBlock, + .cb_size = osMutexCbSize, +#endif // CHIP_CONFIG_CMSISOS_USE_STATIC_MUTEX + .attr_bits = osMutexRecursive | osMutexPrioInherit, + }; + +#if defined(CHIP_DEVICE_CONFIG_ENABLE_BG_EVENT_PROCESSING) && CHIP_DEVICE_CONFIG_ENABLE_BG_EVENT_PROCESSING + static void BackgroundEventLoopTaskMain(void * pvParameter); + std::atomic mShouldRunBackgroundEventLoop; + +#if defined(CHIP_CONFIG_CMSISOS_USE_STATIC_QUEUE) && CHIP_CONFIG_CMSISOS_USE_STATIC_QUEUE + uint8_t mBackgroundQueueBuffer[CHIP_DEVICE_CONFIG_BG_MAX_EVENT_QUEUE_SIZE * sizeof(ChipDeviceEvent)]; + osMessageQueue_t mBackgroundQueueStruct; + const osMessageQueueAttr_t mBgQueueAttr = { .cb_mem = &mBackgroundQueueStruct, + .cb_size = osMessageQueueCbSize, + .mq_mem = mBackgroundQueueBuffer, + .mq_size = sizeof(mBackgroundQueueBuffer) }; + + const osMessageQueueAttr_t * mBgQueueAttrPtr = &mBgQueueAttr; +#else + // Nothing to configure for queues, Just use this to avoid #ifdef in the class implementation + const osMessageQueueAttr_t * mBgQueueAttrPtr = nullptr; +#endif // CHIP_CONFIG_CMSISOS_USE_STATIC_QUEUE + +#if defined(CHIP_CONFIG_CMSISOS_USE_STATIC_TASK) && CHIP_CONFIG_CMSISOS_USE_STATIC_TASK + uint8_t mBackgroundEventLoopStack[CHIP_DEVICE_CONFIG_BG_TASK_STACK_SIZE]; + osThread_t mBackgroundEventLoopTaskControlBlock; +#endif // CHIP_CONFIG_CMSISOS_USE_STATIC_TASK + + const osThreadAttr_t mBgEventLoopTaskAttr = { + .name = CHIP_DEVICE_CONFIG_BG_TASK_NAME, + .attr_bits = osThreadDetached, +#if defined(CHIP_CONFIG_CMSISOS_USE_STATIC_TASK) && CHIP_CONFIG_CMSISOS_USE_STATIC_TASK + .cb_mem = &mBackgroundEventLoopTaskControlBlock, + .cb_size = osThreadCbSize, + .stack_mem = mBackgroundEventLoopStack, +#endif // CHIP_CONFIG_CMSISOS_USE_STATIC_TASK + .stack_size = CHIP_DEVICE_CONFIG_BG_TASK_STACK_SIZE, + .priority = CHIP_DEVICE_CONFIG_BG_TASK_PRIORITY + }; +#endif // CHIP_DEVICE_CONFIG_ENABLE_BG_EVENT_PROCESSING +}; + +// Instruct the compiler to instantiate the template only when explicitly told to do so. +extern template class GenericPlatformManagerImpl_CMSISOS; + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip diff --git a/src/include/platform/internal/GenericPlatformManagerImpl_CMSISOS.ipp b/src/include/platform/internal/GenericPlatformManagerImpl_CMSISOS.ipp new file mode 100644 index 0000000000..b75fcbe0c2 --- /dev/null +++ b/src/include/platform/internal/GenericPlatformManagerImpl_CMSISOS.ipp @@ -0,0 +1,375 @@ +/* + * + * Copyright (c) 2021-2024 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 + * Contains non-inline method definitions for the + * GenericPlatformManagerImpl_CMSISOS<> template. + */ + +#ifndef GENERIC_PLATFORM_MANAGER_IMPL_CMSISOS_CPP +#define GENERIC_PLATFORM_MANAGER_IMPL_CMSISOS_CPP + +#include +#include +#include + +#include + +// Include the non-inline definitions for the GenericPlatformManagerImpl<> template, +// from which the GenericPlatformManagerImpl_CMSISOS<> template inherits. +#include + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +template +CHIP_ERROR GenericPlatformManagerImpl_CMSISOS::_InitChipStack(void) +{ + mNextTimerBaseTime = osKernelGetTickCount(); + mNextTimerDurationTicks = 0; + mChipTimerActive = false; + + // We support calling Shutdown followed by InitChipStack, because some tests + // do that. To keep things simple for existing consumers, we do not + // destroy our lock and queue at shutdown, but rather check whether they + // already exist here before trying to create them. + if (mChipStackLock == nullptr) + { + mChipStackLock = osMutexNew(&mChipStackMutexAttr); + VerifyOrReturnError(mChipStackLock != nullptr, CHIP_ERROR_NO_MEMORY, + ChipLogError(DeviceLayer, "Failed to create CHIP stack lock")); + } + + if (mChipEventQueue == nullptr) + { + mChipEventQueue = osMessageQueueNew(CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE, sizeof(ChipDeviceEvent), mEventQueueAttrPtr); + VerifyOrReturnError(mChipEventQueue != nullptr, CHIP_ERROR_NO_MEMORY, + ChipLogError(DeviceLayer, "Failed to allocate CHIP main event queue")); + } + else + { + // Clear out any events that might be stuck in the queue, so we start + // with a clean slate, as if we had just re-created the queue. + osMessageQueueReset(mChipEventQueue); + } + + mShouldRunEventLoop.store(false); + +#if defined(CHIP_DEVICE_CONFIG_ENABLE_BG_EVENT_PROCESSING) && CHIP_DEVICE_CONFIG_ENABLE_BG_EVENT_PROCESSING + if (mBackgroundEventQueue == nullptr) + { + mBackgroundEventQueue = + osMessageQueueNew(CHIP_DEVICE_CONFIG_BG_MAX_EVENT_QUEUE_SIZE, sizeof(ChipDeviceEvent), mBgQueueAttrPtr); + VerifyOrReturnError(mBackgroundEventQueue != nullptr, CHIP_ERROR_NO_MEMORY, + ChipLogError(DeviceLayer, "Failed to allocate CHIP background event queue")); + } + else + { + osMessageQueueReset(mBackgroundEventQueue); + } + + mShouldRunBackgroundEventLoop.store(false); +#endif + + // Call up to the base class _InitChipStack() to perform the bulk of the initialization. + return GenericPlatformManagerImpl::_InitChipStack(); +} + +template +void GenericPlatformManagerImpl_CMSISOS::_LockChipStack(void) +{ + osMutexAcquire(mChipStackLock, osWaitForever); +} + +template +bool GenericPlatformManagerImpl_CMSISOS::_TryLockChipStack(void) +{ + return osMutexAcquire(mChipStackLock, 0) == osOK; +} + +template +void GenericPlatformManagerImpl_CMSISOS::_UnlockChipStack(void) +{ + osMutexRelease(mChipStackLock); +} + +#if CHIP_STACK_LOCK_TRACKING_ENABLED +template +bool GenericPlatformManagerImpl_CMSISOS::_IsChipStackLockedByCurrentThread() const +{ + // If we have not started our event loop yet, return true because in that + // case we can't be racing against the (not yet started) event loop. + // + // Similarly, if mChipStackLock has not been created yet, might as well + // return true. + return (mEventLoopTask == nullptr) || (mChipStackLock == nullptr) || (osMutexGetOwner(mChipStackLock) == osThreadGetId()); +} +#endif // CHIP_STACK_LOCK_TRACKING_ENABLED + +template +CHIP_ERROR GenericPlatformManagerImpl_CMSISOS::_PostEvent(const ChipDeviceEvent * event) +{ + VerifyOrReturnError(mChipEventQueue != nullptr, CHIP_ERROR_UNINITIALIZED); + + osStatus_t status = osMessageQueuePut(mChipEventQueue, event, osPriorityNormal, 1); + if (status != osOK) + { + ChipLogError(DeviceLayer, "Failed to post event to CHIP Platform event queue"); + return CHIP_ERROR(chip::ChipError::Range::kOS, status); + } + return CHIP_NO_ERROR; +} + +template +void GenericPlatformManagerImpl_CMSISOS::_RunEventLoop(void) +{ + // Lock the CHIP stack. + StackLock lock; + + bool oldShouldRunEventLoop = false; + if (!mShouldRunEventLoop.compare_exchange_strong(oldShouldRunEventLoop /* expected */, true /* desired */)) + { + ChipLogError(DeviceLayer, "Error trying to run the event loop while it is already running"); + return; + } + + while (mShouldRunEventLoop.load()) + { + uint32_t waitTimeInTicks; + + // If one or more CHIP timers are active... + if (mChipTimerActive) + { + // Adjust the base time and remaining duration for the next scheduled timer based on the + // amount of time that has elapsed since it was started. + // When the timer's expiration time elapses, Handle the platform Timer + // else wait for a queue event for timer remaining time. + waitTimeInTicks = SyncNextChipTimerHandling(); + if (waitTimeInTicks == 0) + { + // Reset the 'timer active' flag. This will be set to true again by _StartChipTimer() + // if there are further timers beyond the expired one that are still active. + mChipTimerActive = false; + + // Call into the system layer to dispatch the callback functions for all timers + // that have expired. + // TODO We use the same SystemLayer implementation as FreeRTOS, Nothing in it is freeRTOS specific. We should + // it. + CHIP_ERROR err = static_cast(DeviceLayer::SystemLayer()).HandlePlatformTimer(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Error handling CHIP timers: %" CHIP_ERROR_FORMAT, err.Format()); + } + } + } + else + { + // No CHIP timers are active, so we wait indefinitely for an event to arrive on the event + // queue. + waitTimeInTicks = osWaitForever; + } + + // Unlock the CHIP stack, allowing other threads to enter CHIP while + // the event loop thread is sleeping. + StackUnlock unlock; + ChipDeviceEvent event; + osStatus_t eventReceived = osMessageQueueGet(mChipEventQueue, &event, nullptr, waitTimeInTicks); + + // If an event was received, dispatch it and continue until the queue is empty. + while (eventReceived == osOK) + { + StackLock lock; + Impl()->DispatchEvent(&event); + StackUnlock unlock; + eventReceived = osMessageQueueGet(mChipEventQueue, &event, nullptr, 0); + } + } +} + +template +CHIP_ERROR GenericPlatformManagerImpl_CMSISOS::_StartEventLoopTask(void) +{ + mEventLoopTask = osThreadNew(EventLoopTaskMain, this, &mEventLoopTaskAttr); + return (mEventLoopTask != nullptr) ? CHIP_NO_ERROR : CHIP_ERROR_NO_MEMORY; +} + +template +void GenericPlatformManagerImpl_CMSISOS::EventLoopTaskMain(void * pvParameter) +{ + ChipLogDetail(DeviceLayer, "CHIP event task running"); + static_cast *>(pvParameter)->Impl()->RunEventLoop(); +} + +/** + * @brief Calculate the elapsed time of the active chip platform timer since it has been started, + * as set in mNextTimerBaseTime, and adjust its remaining time with the mNextTimerDurationTicks member + * + * @return The next Timer remaining time in ticks + */ +template +uint32_t GenericPlatformManagerImpl_CMSISOS::SyncNextChipTimerHandling() +{ + uint32_t elapsedTime = 0; + uint32_t timerBaseTime = mNextTimerBaseTime; + uint32_t currentTime = osKernelGetTickCount(); + if (currentTime < timerBaseTime) + { + // TickCount has wrapped around + elapsedTime = (UINT32_MAX - timerBaseTime) + currentTime; + } + else + { + elapsedTime = currentTime - timerBaseTime; + } + + if (elapsedTime < mNextTimerDurationTicks) + { + // We didn't timeout yet, adjust the remaining time + mNextTimerDurationTicks -= elapsedTime; + mNextTimerBaseTime = osKernelGetTickCount(); + } + else + { + mNextTimerDurationTicks = 0; + } + return mNextTimerDurationTicks; +} + +template +CHIP_ERROR GenericPlatformManagerImpl_CMSISOS::_PostBackgroundEvent(const ChipDeviceEvent * event) +{ +#if defined(CHIP_DEVICE_CONFIG_ENABLE_BG_EVENT_PROCESSING) && CHIP_DEVICE_CONFIG_ENABLE_BG_EVENT_PROCESSING + VerifyOrReturnError(mBackgroundEventQueue != nullptr, CHIP_ERROR_UNINITIALIZED); + if (!(event->Type == DeviceEventType::kCallWorkFunct || event->Type == DeviceEventType::kNoOp)) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + osStatus_t status = osMessageQueuePut(mBackgroundEventQueue, event, osPriorityNormal, 1); + VerifyOrReturnError(status == osOk, CHIP_ERROR_NO_MEMORY, + ChipLogError(DeviceLayer, "Failed to post event to CHIP background event queue")); + return CHIP_NO_ERROR; +#else + // Use foreground event loop for background events + return _PostEvent(event); +#endif +} + +template +void GenericPlatformManagerImpl_CMSISOS::_RunBackgroundEventLoop(void) +{ +#if defined(CHIP_DEVICE_CONFIG_ENABLE_BG_EVENT_PROCESSING) && CHIP_DEVICE_CONFIG_ENABLE_BG_EVENT_PROCESSING + bool oldShouldRunBackgroundEventLoop = false; + VerifyOrReturn( + mShouldRunBackgroundEventLoop.compare_exchange_strong(oldShouldRunBackgroundEventLoop /* expected */, true /* desired */), + ChipLogError(DeviceLayer, "Error trying to run the background event loop while it is already running")); + + while (mShouldRunBackgroundEventLoop.load()) + { + ChipDeviceEvent event; + osStatus_t eventReceived = osMessageQueueGet(mBackgroundEventQueue, &event, NULL, osWaitForever); + while (eventReceived == osOK) + { + Impl()->DispatchEvent(&event); + eventReceived = osMessageQueueGet(mBackgroundEventQueue, &event, portMAX_DELAY); + } + } +#endif +} + +template +CHIP_ERROR GenericPlatformManagerImpl_CMSISOS::_StartBackgroundEventLoopTask(void) +{ +#if defined(CHIP_DEVICE_CONFIG_ENABLE_BG_EVENT_PROCESSING) && CHIP_DEVICE_CONFIG_ENABLE_BG_EVENT_PROCESSING + mBackgroundEventLoopTask = osThreadNew(BackgroundEventLoopTaskMain, this, &mBgEventLoopTaskAttr); + return (mBackgroundEventLoopTask != NULL) ? CHIP_NO_ERROR : CHIP_ERROR_NO_MEMORY; +#else + // Use foreground event loop for background events + return CHIP_NO_ERROR; +#endif +} + +template +CHIP_ERROR GenericPlatformManagerImpl_CMSISOS::_StopBackgroundEventLoopTask(void) +{ +#if defined(CHIP_DEVICE_CONFIG_ENABLE_BG_EVENT_PROCESSING) && CHIP_DEVICE_CONFIG_ENABLE_BG_EVENT_PROCESSING + bool oldShouldRunBackgroundEventLoop = true; + if (mShouldRunBackgroundEventLoop.compare_exchange_strong(oldShouldRunBackgroundEventLoop /* expected */, false /* desired */)) + { + ChipDeviceEvent noop{ .Type = DeviceEventType::kNoOp }; + osMessageQueuePut(mBackgroundEventQueue, &noop, osPriorityNormal, 0); + } + return CHIP_NO_ERROR; +#else + // Use foreground event loop for background events + return CHIP_NO_ERROR; +#endif +} + +#if defined(CHIP_DEVICE_CONFIG_ENABLE_BG_EVENT_PROCESSING) && CHIP_DEVICE_CONFIG_ENABLE_BG_EVENT_PROCESSING +template +void GenericPlatformManagerImpl_CMSISOS::BackgroundEventLoopTaskMain(void * pvParameter) +{ + ChipLogDetail(DeviceLayer, "CHIP background task running"); + static_cast *>(pvParameter)->Impl()->RunBackgroundEventLoop(); +} +#endif + +template +CHIP_ERROR GenericPlatformManagerImpl_CMSISOS::_StartChipTimer(System::Clock::Timeout delay) +{ + mChipTimerActive = true; + mNextTimerBaseTime = osKernelGetTickCount(); + mNextTimerDurationTicks = (System::Clock::Milliseconds64(delay).count() * osKernelGetTickFreq()) / 1000; + + // If the platform timer is being updated by a thread other than the event loop thread, + // trigger the event loop thread to recalculate its wait time by posting a no-op event + // to the event queue. + if (osThreadGetId() != mEventLoopTask) + { + ChipDeviceEvent noop{ .Type = DeviceEventType::kNoOp }; + ReturnErrorOnFailure(Impl()->PostEvent(&noop)); + } + + return CHIP_NO_ERROR; +} + +template +void GenericPlatformManagerImpl_CMSISOS::_Shutdown(void) +{ + GenericPlatformManagerImpl::_Shutdown(); +} + +template +CHIP_ERROR GenericPlatformManagerImpl_CMSISOS::_StopEventLoopTask(void) +{ + mShouldRunEventLoop.store(false); + return CHIP_NO_ERROR; +} + +// Fully instantiate the generic implementation class in whatever compilation unit includes this file. +// NB: This must come after all templated class members are defined. +template class GenericPlatformManagerImpl_CMSISOS; + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip + +#endif // GENERIC_PLATFORM_MANAGER_IMPL_CMSISOS_CPP diff --git a/src/inet/IPAddress-StringFuncts.cpp b/src/inet/IPAddress-StringFuncts.cpp index 13bbb4e0f8..7022b44a6a 100644 --- a/src/inet/IPAddress-StringFuncts.cpp +++ b/src/inet/IPAddress-StringFuncts.cpp @@ -23,6 +23,7 @@ * */ +#include #include #include #include @@ -57,8 +58,8 @@ char * IPAddress::ToString(char * buf, uint32_t bufSize) const // socklen_t is sometimes signed, sometimes not, so the only safe way to do // this is to promote everything to an unsigned type that's known to be big // enough for everything, then cast back to uint32_t after taking the min. - bufSize = - static_cast(min(static_cast(std::numeric_limits::max()), static_cast(bufSize))); + bufSize = static_cast( + std::min(static_cast(std::numeric_limits::max()), static_cast(bufSize))); #if INET_CONFIG_ENABLE_IPV4 if (IsIPv4()) { diff --git a/src/inet/InetFaultInjection.cpp b/src/inet/InetFaultInjection.cpp index faf0b42176..7b21e06c33 100644 --- a/src/inet/InetFaultInjection.cpp +++ b/src/inet/InetFaultInjection.cpp @@ -23,8 +23,6 @@ #include "InetFaultInjection.h" -#include - namespace chip { namespace Inet { namespace FaultInjection { diff --git a/src/inet/tests/TestInetLayerCommon.cpp b/src/inet/tests/TestInetLayerCommon.cpp index b1f0172bea..6f8545ba39 100644 --- a/src/inet/tests/TestInetLayerCommon.cpp +++ b/src/inet/tests/TestInetLayerCommon.cpp @@ -164,7 +164,7 @@ static PacketBufferHandle MakeDataBuffer(size_t aDesiredLength, size_t aPatternS PacketBufferHandle lBuffer = PacketBufferHandle::New(aDesiredLength); VerifyOrReturnError(!lBuffer.IsNull(), lBuffer); - aDesiredLength = min(lBuffer->MaxDataLength(), aDesiredLength); + aDesiredLength = std::min(lBuffer->MaxDataLength(), aDesiredLength); FillDataBufferPattern(lBuffer->Start(), aDesiredLength, aPatternStartOffset, aFirstValue); diff --git a/src/inet/tests/inet-layer-test-tool.cpp b/src/inet/tests/inet-layer-test-tool.cpp index 0c1158a9ed..ff0eae8941 100644 --- a/src/inet/tests/inet-layer-test-tool.cpp +++ b/src/inet/tests/inet-layer-test-tool.cpp @@ -777,7 +777,7 @@ void DriveSend() if (sTestState.mStats.mTransmit.mActual < sTestState.mStats.mTransmit.mExpected) { const uint32_t lRemaining = (sTestState.mStats.mTransmit.mExpected - sTestState.mStats.mTransmit.mActual); - const uint32_t lSendSize = chip::min(lRemaining, static_cast(gSendSize)); + const uint32_t lSendSize = std::min(lRemaining, static_cast(gSendSize)); // gSendSize is uint16_t, so this cast is safe: the value has to be // in the uint16_t range. diff --git a/src/lib/address_resolve/tool.cpp b/src/lib/address_resolve/tool.cpp index 53d01b4011..042f7c6f89 100644 --- a/src/lib/address_resolve/tool.cpp +++ b/src/lib/address_resolve/tool.cpp @@ -147,7 +147,7 @@ extern "C" void StopSignalHandler(int signal) } // namespace -extern "C" int main(int argc, const char ** argv) +int main(int argc, const char ** argv) { Platform::MemoryInit(); diff --git a/src/lib/asn1/ASN1OID.cpp b/src/lib/asn1/ASN1OID.cpp index 4734a4aa7a..70ac838ccf 100644 --- a/src/lib/asn1/ASN1OID.cpp +++ b/src/lib/asn1/ASN1OID.cpp @@ -107,9 +107,9 @@ const char * GetOIDName(OID oid) CHIP_ERROR ASN1Reader::GetObjectId(OID & oid) { - ReturnErrorCodeIf(Value == nullptr, ASN1_ERROR_INVALID_STATE); - ReturnErrorCodeIf(ValueLen < 1, ASN1_ERROR_INVALID_ENCODING); - ReturnErrorCodeIf(mElemStart + mHeadLen + ValueLen > mContainerEnd, ASN1_ERROR_UNDERRUN); + VerifyOrReturnError(Value != nullptr, ASN1_ERROR_INVALID_STATE); + VerifyOrReturnError(ValueLen >= 1, ASN1_ERROR_INVALID_ENCODING); + VerifyOrReturnError(mElemStart + mHeadLen + ValueLen <= mContainerEnd, ASN1_ERROR_UNDERRUN); VerifyOrReturnError(CanCastTo(ValueLen), ASN1_ERROR_INVALID_ENCODING); oid = ParseObjectID(Value, static_cast(ValueLen)); return CHIP_NO_ERROR; diff --git a/src/lib/asn1/ASN1Reader.cpp b/src/lib/asn1/ASN1Reader.cpp index 6039e1ae08..1a053f307f 100644 --- a/src/lib/asn1/ASN1Reader.cpp +++ b/src/lib/asn1/ASN1Reader.cpp @@ -50,8 +50,8 @@ void ASN1Reader::Init(const uint8_t * buf, size_t len) CHIP_ERROR ASN1Reader::Next() { - ReturnErrorCodeIf(EndOfContents, ASN1_END); - ReturnErrorCodeIf(IndefiniteLen, ASN1_ERROR_UNSUPPORTED_ENCODING); + VerifyOrReturnError(!EndOfContents, ASN1_END); + VerifyOrReturnError(!IndefiniteLen, ASN1_ERROR_UNSUPPORTED_ENCODING); // Note: avoid using addition assignment operator (+=), which may result in integer overflow // in the right hand side of an assignment (mHeadLen + ValueLen). @@ -59,14 +59,14 @@ CHIP_ERROR ASN1Reader::Next() ResetElementState(); - ReturnErrorCodeIf(mElemStart == mContainerEnd, ASN1_END); + VerifyOrReturnError(mElemStart != mContainerEnd, ASN1_END); return DecodeHead(); } CHIP_ERROR ASN1Reader::EnterConstructedType() { - ReturnErrorCodeIf(!Constructed, ASN1_ERROR_INVALID_STATE); + VerifyOrReturnError(Constructed, ASN1_ERROR_INVALID_STATE); return EnterContainer(0); } @@ -78,7 +78,7 @@ CHIP_ERROR ASN1Reader::ExitConstructedType() CHIP_ERROR ASN1Reader::GetConstructedType(const uint8_t *& val, uint32_t & valLen) { - ReturnErrorCodeIf(!Constructed, ASN1_ERROR_INVALID_STATE); + VerifyOrReturnError(Constructed, ASN1_ERROR_INVALID_STATE); val = mElemStart; valLen = mHeadLen + ValueLen; @@ -91,7 +91,7 @@ CHIP_ERROR ASN1Reader::EnterEncapsulatedType() (Tag == kASN1UniversalTag_OctetString || Tag == kASN1UniversalTag_BitString), ASN1_ERROR_INVALID_STATE); - ReturnErrorCodeIf(Constructed, ASN1_ERROR_UNSUPPORTED_ENCODING); + VerifyOrReturnError(!Constructed, ASN1_ERROR_UNSUPPORTED_ENCODING); return EnterContainer((Tag == kASN1UniversalTag_BitString) ? 1 : 0); } @@ -103,7 +103,7 @@ CHIP_ERROR ASN1Reader::ExitEncapsulatedType() CHIP_ERROR ASN1Reader::EnterContainer(uint32_t offset) { - ReturnErrorCodeIf(mNumSavedContexts == kMaxContextDepth, ASN1_ERROR_MAX_DEPTH_EXCEEDED); + VerifyOrReturnError(mNumSavedContexts != kMaxContextDepth, ASN1_ERROR_MAX_DEPTH_EXCEEDED); mSavedContexts[mNumSavedContexts].ElemStart = mElemStart; mSavedContexts[mNumSavedContexts].HeadLen = mHeadLen; @@ -127,11 +127,11 @@ CHIP_ERROR ASN1Reader::EnterContainer(uint32_t offset) CHIP_ERROR ASN1Reader::ExitContainer() { - ReturnErrorCodeIf(mNumSavedContexts == 0, ASN1_ERROR_INVALID_STATE); + VerifyOrReturnError(mNumSavedContexts != 0, ASN1_ERROR_INVALID_STATE); ASN1ParseContext & prevContext = mSavedContexts[--mNumSavedContexts]; - ReturnErrorCodeIf(prevContext.IndefiniteLen, ASN1_ERROR_UNSUPPORTED_ENCODING); + VerifyOrReturnError(!prevContext.IndefiniteLen, ASN1_ERROR_UNSUPPORTED_ENCODING); mElemStart = prevContext.ElemStart + prevContext.HeadLen + prevContext.ValueLen; @@ -152,10 +152,10 @@ CHIP_ERROR ASN1Reader::GetInteger(int64_t & val) uint8_t encodedVal[sizeof(int64_t)] = { 0 }; size_t valPaddingLen = sizeof(int64_t) - ValueLen; - ReturnErrorCodeIf(Value == nullptr, ASN1_ERROR_INVALID_STATE); - ReturnErrorCodeIf(ValueLen < 1, ASN1_ERROR_INVALID_ENCODING); - ReturnErrorCodeIf(ValueLen > sizeof(int64_t), ASN1_ERROR_VALUE_OVERFLOW); - ReturnErrorCodeIf(mElemStart + mHeadLen + ValueLen > mContainerEnd, ASN1_ERROR_UNDERRUN); + VerifyOrReturnError(Value != nullptr, ASN1_ERROR_INVALID_STATE); + VerifyOrReturnError(ValueLen >= 1, ASN1_ERROR_INVALID_ENCODING); + VerifyOrReturnError(ValueLen <= sizeof(int64_t), ASN1_ERROR_VALUE_OVERFLOW); + VerifyOrReturnError(mElemStart + mHeadLen + ValueLen <= mContainerEnd, ASN1_ERROR_UNDERRUN); if ((*Value & 0x80) == 0x80) { @@ -173,9 +173,9 @@ CHIP_ERROR ASN1Reader::GetInteger(int64_t & val) CHIP_ERROR ASN1Reader::GetBoolean(bool & val) { - ReturnErrorCodeIf(Value == nullptr, ASN1_ERROR_INVALID_STATE); - ReturnErrorCodeIf(ValueLen != 1, ASN1_ERROR_INVALID_ENCODING); - ReturnErrorCodeIf(mElemStart + mHeadLen + ValueLen > mContainerEnd, ASN1_ERROR_UNDERRUN); + VerifyOrReturnError(Value != nullptr, ASN1_ERROR_INVALID_STATE); + VerifyOrReturnError(ValueLen == 1, ASN1_ERROR_INVALID_ENCODING); + VerifyOrReturnError(mElemStart + mHeadLen + ValueLen <= mContainerEnd, ASN1_ERROR_UNDERRUN); VerifyOrReturnError(Value[0] == 0 || Value[0] == 0xFF, ASN1_ERROR_INVALID_ENCODING); val = (Value[0] != 0); @@ -186,9 +186,9 @@ CHIP_ERROR ASN1Reader::GetBoolean(bool & val) CHIP_ERROR ASN1Reader::GetUTCTime(ASN1UniversalTime & outTime) { // Supported Encoding: YYMMDDHHMMSSZ - ReturnErrorCodeIf(Value == nullptr, ASN1_ERROR_INVALID_STATE); - ReturnErrorCodeIf(ValueLen < 1, ASN1_ERROR_INVALID_ENCODING); - ReturnErrorCodeIf(mElemStart + mHeadLen + ValueLen > mContainerEnd, ASN1_ERROR_UNDERRUN); + VerifyOrReturnError(Value != nullptr, ASN1_ERROR_INVALID_STATE); + VerifyOrReturnError(ValueLen >= 1, ASN1_ERROR_INVALID_ENCODING); + VerifyOrReturnError(mElemStart + mHeadLen + ValueLen <= mContainerEnd, ASN1_ERROR_UNDERRUN); VerifyOrReturnError(ValueLen == 13 && Value[12] == 'Z', ASN1_ERROR_UNSUPPORTED_ENCODING); return outTime.ImportFrom_ASN1_TIME_string(CharSpan(reinterpret_cast(Value), ValueLen)); @@ -197,9 +197,9 @@ CHIP_ERROR ASN1Reader::GetUTCTime(ASN1UniversalTime & outTime) CHIP_ERROR ASN1Reader::GetGeneralizedTime(ASN1UniversalTime & outTime) { // Supported Encoding: YYYYMMDDHHMMSSZ - ReturnErrorCodeIf(Value == nullptr, ASN1_ERROR_INVALID_STATE); - ReturnErrorCodeIf(ValueLen < 1, ASN1_ERROR_INVALID_ENCODING); - ReturnErrorCodeIf(mElemStart + mHeadLen + ValueLen > mContainerEnd, ASN1_ERROR_UNDERRUN); + VerifyOrReturnError(Value != nullptr, ASN1_ERROR_INVALID_STATE); + VerifyOrReturnError(ValueLen >= 1, ASN1_ERROR_INVALID_ENCODING); + VerifyOrReturnError(mElemStart + mHeadLen + ValueLen <= mContainerEnd, ASN1_ERROR_UNDERRUN); VerifyOrReturnError(ValueLen == 15 && Value[14] == 'Z', ASN1_ERROR_UNSUPPORTED_ENCODING); return outTime.ImportFrom_ASN1_TIME_string(CharSpan(reinterpret_cast(Value), ValueLen)); @@ -219,10 +219,10 @@ static uint8_t ReverseBits(uint8_t v) CHIP_ERROR ASN1Reader::GetBitString(uint32_t & outVal) { // NOTE: only supports DER encoding. - ReturnErrorCodeIf(Value == nullptr, ASN1_ERROR_INVALID_STATE); - ReturnErrorCodeIf(ValueLen < 1, ASN1_ERROR_INVALID_ENCODING); - ReturnErrorCodeIf(ValueLen > 5, ASN1_ERROR_UNSUPPORTED_ENCODING); - ReturnErrorCodeIf(mElemStart + mHeadLen + ValueLen > mContainerEnd, ASN1_ERROR_UNDERRUN); + VerifyOrReturnError(Value != nullptr, ASN1_ERROR_INVALID_STATE); + VerifyOrReturnError(ValueLen >= 1, ASN1_ERROR_INVALID_ENCODING); + VerifyOrReturnError(ValueLen <= 5, ASN1_ERROR_UNSUPPORTED_ENCODING); + VerifyOrReturnError(mElemStart + mHeadLen + ValueLen <= mContainerEnd, ASN1_ERROR_UNDERRUN); if (ValueLen == 1) { @@ -244,7 +244,7 @@ CHIP_ERROR ASN1Reader::GetBitString(uint32_t & outVal) CHIP_ERROR ASN1Reader::DecodeHead() { const uint8_t * p = mElemStart; - ReturnErrorCodeIf(p >= mBufEnd, ASN1_ERROR_UNDERRUN); + VerifyOrReturnError(p < mBufEnd, ASN1_ERROR_UNDERRUN); Class = *p & 0xC0; Constructed = (*p & 0x20) != 0; @@ -254,7 +254,7 @@ CHIP_ERROR ASN1Reader::DecodeHead() VerifyOrReturnError(Tag < 0x1F, ASN1_ERROR_UNSUPPORTED_ENCODING); p++; - ReturnErrorCodeIf(p >= mBufEnd, ASN1_ERROR_UNDERRUN); + VerifyOrReturnError(p < mBufEnd, ASN1_ERROR_UNDERRUN); if ((*p & 0x80) == 0) { @@ -275,8 +275,8 @@ CHIP_ERROR ASN1Reader::DecodeHead() p++; for (; lenLen > 0; lenLen--, p++) { - ReturnErrorCodeIf(p >= mBufEnd, ASN1_ERROR_UNDERRUN); - ReturnErrorCodeIf((ValueLen & 0xFF000000) != 0, ASN1_ERROR_LENGTH_OVERFLOW); + VerifyOrReturnError(p < mBufEnd, ASN1_ERROR_UNDERRUN); + VerifyOrReturnError((ValueLen & 0xFF000000) == 0, ASN1_ERROR_LENGTH_OVERFLOW); ValueLen = (ValueLen << 8) | *p; } IndefiniteLen = false; diff --git a/src/lib/asn1/ASN1Writer.cpp b/src/lib/asn1/ASN1Writer.cpp index f916d138ae..4bdb8eaa04 100644 --- a/src/lib/asn1/ASN1Writer.cpp +++ b/src/lib/asn1/ASN1Writer.cpp @@ -72,7 +72,7 @@ size_t ASN1Writer::GetLengthWritten() const CHIP_ERROR ASN1Writer::PutInteger(int64_t val) { - ReturnErrorCodeIf(IsNullWriter(), CHIP_NO_ERROR); + VerifyOrReturnError(!IsNullWriter(), CHIP_NO_ERROR); uint8_t encodedVal[sizeof(int64_t)]; uint8_t valStart, valLen; @@ -94,7 +94,7 @@ CHIP_ERROR ASN1Writer::PutInteger(int64_t val) CHIP_ERROR ASN1Writer::PutBoolean(bool val) { - ReturnErrorCodeIf(IsNullWriter(), CHIP_NO_ERROR); + VerifyOrReturnError(!IsNullWriter(), CHIP_NO_ERROR); ReturnErrorOnFailure(EncodeHead(kASN1TagClass_Universal, kASN1UniversalTag_Boolean, false, 1)); @@ -170,7 +170,7 @@ static uint8_t HighestBit(uint32_t v) CHIP_ERROR ASN1Writer::PutBitString(uint32_t val) { - ReturnErrorCodeIf(IsNullWriter(), CHIP_NO_ERROR); + VerifyOrReturnError(!IsNullWriter(), CHIP_NO_ERROR); uint8_t len; if (val == 0) @@ -218,7 +218,7 @@ CHIP_ERROR ASN1Writer::PutBitString(uint32_t val) CHIP_ERROR ASN1Writer::PutBitString(uint8_t unusedBitCount, const uint8_t * encodedBits, uint16_t encodedBitsLen) { - ReturnErrorCodeIf(IsNullWriter(), CHIP_NO_ERROR); + VerifyOrReturnError(!IsNullWriter(), CHIP_NO_ERROR); ReturnErrorOnFailure(EncodeHead(kASN1TagClass_Universal, kASN1UniversalTag_BitString, false, encodedBitsLen + 1)); @@ -236,7 +236,7 @@ CHIP_ERROR ASN1Writer::PutBitString(uint8_t unusedBitCount, chip::TLV::TLVReader VerifyOrReturnError(CanCastTo(encodedBits.size() + 1), ASN1_ERROR_LENGTH_OVERFLOW); - ReturnErrorCodeIf(IsNullWriter(), CHIP_NO_ERROR); + VerifyOrReturnError(!IsNullWriter(), CHIP_NO_ERROR); ReturnErrorOnFailure( EncodeHead(kASN1TagClass_Universal, kASN1UniversalTag_BitString, false, static_cast(encodedBits.size() + 1))); @@ -250,7 +250,7 @@ CHIP_ERROR ASN1Writer::PutBitString(uint8_t unusedBitCount, chip::TLV::TLVReader CHIP_ERROR ASN1Writer::PutTime(const ASN1UniversalTime & val) { - ReturnErrorCodeIf(IsNullWriter(), CHIP_NO_ERROR); + VerifyOrReturnError(!IsNullWriter(), CHIP_NO_ERROR); char buf[ASN1UniversalTime::kASN1TimeStringMaxLength]; MutableCharSpan bufSpan(buf); @@ -276,7 +276,7 @@ CHIP_ERROR ASN1Writer::PutNull() CHIP_ERROR ASN1Writer::PutConstructedType(const uint8_t * val, uint16_t valLen) { - ReturnErrorCodeIf(IsNullWriter(), CHIP_NO_ERROR); + VerifyOrReturnError(!IsNullWriter(), CHIP_NO_ERROR); // Make sure we have enough space to write VerifyOrReturnError((mWritePoint + valLen) <= mBufEnd, ASN1_ERROR_OVERFLOW); @@ -298,7 +298,7 @@ CHIP_ERROR ASN1Writer::EndConstructedType() CHIP_ERROR ASN1Writer::StartEncapsulatedType(uint8_t cls, uint8_t tag, bool bitStringEncoding) { - ReturnErrorCodeIf(IsNullWriter(), CHIP_NO_ERROR); + VerifyOrReturnError(!IsNullWriter(), CHIP_NO_ERROR); ReturnErrorOnFailure(EncodeHead(cls, tag, false, kUnknownLength)); @@ -321,7 +321,7 @@ CHIP_ERROR ASN1Writer::EndEncapsulatedType() CHIP_ERROR ASN1Writer::PutValue(uint8_t cls, uint8_t tag, bool isConstructed, const uint8_t * val, uint16_t valLen) { - ReturnErrorCodeIf(IsNullWriter(), CHIP_NO_ERROR); + VerifyOrReturnError(!IsNullWriter(), CHIP_NO_ERROR); ReturnErrorOnFailure(EncodeHead(cls, tag, isConstructed, valLen)); @@ -337,7 +337,7 @@ CHIP_ERROR ASN1Writer::PutValue(uint8_t cls, uint8_t tag, bool isConstructed, ch VerifyOrReturnError(CanCastTo(val.size()), ASN1_ERROR_LENGTH_OVERFLOW); - ReturnErrorCodeIf(IsNullWriter(), CHIP_NO_ERROR); + VerifyOrReturnError(!IsNullWriter(), CHIP_NO_ERROR); ReturnErrorOnFailure(EncodeHead(cls, tag, isConstructed, static_cast(val.size()))); @@ -348,7 +348,7 @@ CHIP_ERROR ASN1Writer::PutValue(uint8_t cls, uint8_t tag, bool isConstructed, ch CHIP_ERROR ASN1Writer::EncodeHead(uint8_t cls, uint8_t tag, bool isConstructed, int32_t len) { - ReturnErrorCodeIf(IsNullWriter(), CHIP_NO_ERROR); + VerifyOrReturnError(!IsNullWriter(), CHIP_NO_ERROR); uint8_t bytesForLen; uint32_t totalLen; @@ -399,7 +399,7 @@ CHIP_ERROR ASN1Writer::EncodeHead(uint8_t cls, uint8_t tag, bool isConstructed, CHIP_ERROR ASN1Writer::WriteDeferredLength() { - ReturnErrorCodeIf(IsNullWriter(), CHIP_NO_ERROR); + VerifyOrReturnError(!IsNullWriter(), CHIP_NO_ERROR); VerifyOrReturnError(mDeferredLengthCount > 0, ASN1_ERROR_INVALID_STATE); diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index 7827f5a8c3..382c63497d 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -1485,11 +1485,12 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; #endif /** - * @brief The maximum number of clusters per scene, defaults to 3 for a typical usecase (onOff + level control + color control - * cluster). Needs to be changed in case a greater number of clusters is chosen. + * @brief The maximum number of clusters per scene, we recommend using 4 for a typical use case (onOff + level control + color + * control cluster + mode selec cluster). Needs to be changed in case a greater number of clusters is chosen. In the event the + * device does not need to support the mode select cluster, the maximum number of clusters per scene should be set to 3. */ #ifndef CHIP_CONFIG_SCENES_MAX_CLUSTERS_PER_SCENE -#define CHIP_CONFIG_SCENES_MAX_CLUSTERS_PER_SCENE 3 +#define CHIP_CONFIG_SCENES_MAX_CLUSTERS_PER_SCENE 4 #endif /** diff --git a/src/lib/core/CHIPSafeCasts.h b/src/lib/core/CHIPSafeCasts.h index 9d189feeb6..872080415d 100644 --- a/src/lib/core/CHIPSafeCasts.h +++ b/src/lib/core/CHIPSafeCasts.h @@ -26,7 +26,6 @@ #pragma once #include -#include #include namespace chip { @@ -42,7 +41,7 @@ namespace Uint8 { */ inline uint8_t * from_uchar(unsigned char * in) { - nlSTATIC_ASSERT_PRINT(CHAR_BIT == 8, "Can't type cast unsigned char array as uint8_t array"); + static_assert(CHAR_BIT == 8, "Can't type cast unsigned char array as uint8_t array"); #ifdef __cplusplus return reinterpret_cast(in); #else @@ -59,7 +58,7 @@ inline uint8_t * from_uchar(unsigned char * in) */ inline const uint8_t * from_const_uchar(const unsigned char * in) { - nlSTATIC_ASSERT_PRINT(CHAR_BIT == 8, "Can't type cast unsigned char array as uint8_t array"); + static_assert(CHAR_BIT == 8, "Can't type cast unsigned char array as uint8_t array"); #ifdef __cplusplus return reinterpret_cast(in); #else @@ -76,7 +75,7 @@ inline const uint8_t * from_const_uchar(const unsigned char * in) */ inline uint8_t * from_char(char * in) { - nlSTATIC_ASSERT_PRINT(CHAR_BIT == 8, "Can't type cast char array as uint8_t array"); + static_assert(CHAR_BIT == 8, "Can't type cast char array as uint8_t array"); #ifdef __cplusplus return reinterpret_cast(in); #else @@ -93,7 +92,7 @@ inline uint8_t * from_char(char * in) */ inline const uint8_t * from_const_char(const char * in) { - nlSTATIC_ASSERT_PRINT(CHAR_BIT == 8, "Can't type cast char array as uint8_t array"); + static_assert(CHAR_BIT == 8, "Can't type cast char array as uint8_t array"); #ifdef __cplusplus return reinterpret_cast(in); #else @@ -110,7 +109,7 @@ inline const uint8_t * from_const_char(const char * in) */ inline unsigned char * to_uchar(uint8_t * in) { - nlSTATIC_ASSERT_PRINT(CHAR_BIT == 8, "Can't type cast uint8_t array to unsigned char array"); + static_assert(CHAR_BIT == 8, "Can't type cast uint8_t array to unsigned char array"); #ifdef __cplusplus return reinterpret_cast(in); #else @@ -127,7 +126,7 @@ inline unsigned char * to_uchar(uint8_t * in) */ inline const unsigned char * to_const_uchar(const uint8_t * in) { - nlSTATIC_ASSERT_PRINT(CHAR_BIT == 8, "Can't type cast uint8_t array to unsigned char array"); + static_assert(CHAR_BIT == 8, "Can't type cast uint8_t array to unsigned char array"); #ifdef __cplusplus return reinterpret_cast(in); #else @@ -144,7 +143,7 @@ inline const unsigned char * to_const_uchar(const uint8_t * in) */ inline char * to_char(uint8_t * in) { - nlSTATIC_ASSERT_PRINT(CHAR_BIT == 8, "Can't type cast uint8_t array to char array"); + static_assert(CHAR_BIT == 8, "Can't type cast uint8_t array to char array"); #ifdef __cplusplus return reinterpret_cast(in); #else @@ -161,7 +160,7 @@ inline char * to_char(uint8_t * in) */ inline const char * to_const_char(const uint8_t * in) { - nlSTATIC_ASSERT_PRINT(CHAR_BIT == 8, "Can't type cast uint8_t array to char array"); + static_assert(CHAR_BIT == 8, "Can't type cast uint8_t array to char array"); #ifdef __cplusplus return reinterpret_cast(in); #else diff --git a/src/lib/core/OTAImageHeader.cpp b/src/lib/core/OTAImageHeader.cpp index 68942d919a..a4f535f50e 100644 --- a/src/lib/core/OTAImageHeader.cpp +++ b/src/lib/core/OTAImageHeader.cpp @@ -102,7 +102,7 @@ CHIP_ERROR OTAImageHeaderParser::AccumulateAndDecode(ByteSpan & buffer, OTAImage void OTAImageHeaderParser::Append(ByteSpan & buffer, uint32_t numBytes) { - numBytes = chip::min(numBytes, static_cast(buffer.size())); + numBytes = std::min(numBytes, static_cast(buffer.size())); memcpy(&mBuffer[mBufferOffset], buffer.data(), numBytes); mBufferOffset += numBytes; buffer = buffer.SubSpan(numBytes); @@ -110,16 +110,16 @@ void OTAImageHeaderParser::Append(ByteSpan & buffer, uint32_t numBytes) CHIP_ERROR OTAImageHeaderParser::DecodeFixed() { - ReturnErrorCodeIf(mBufferOffset < kFixedHeaderSize, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mBufferOffset >= kFixedHeaderSize, CHIP_ERROR_BUFFER_TOO_SMALL); Encoding::LittleEndian::Reader reader(mBuffer.Get(), mBufferOffset); uint32_t fileIdentifier; uint64_t totalSize; ReturnErrorOnFailure(reader.Read32(&fileIdentifier).Read64(&totalSize).Read32(&mHeaderTlvSize).StatusCode()); - ReturnErrorCodeIf(fileIdentifier != kOTAImageFileIdentifier, CHIP_ERROR_INVALID_FILE_IDENTIFIER); + VerifyOrReturnError(fileIdentifier == kOTAImageFileIdentifier, CHIP_ERROR_INVALID_FILE_IDENTIFIER); // Safety check against malicious headers. - ReturnErrorCodeIf(mHeaderTlvSize > kMaxHeaderSize, CHIP_ERROR_NO_MEMORY); - ReturnErrorCodeIf(!mBuffer.Alloc(mHeaderTlvSize), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(mHeaderTlvSize <= kMaxHeaderSize, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(mBuffer.Alloc(mHeaderTlvSize), CHIP_ERROR_NO_MEMORY); mState = State::kTlv; mBufferOffset = 0; @@ -129,7 +129,7 @@ CHIP_ERROR OTAImageHeaderParser::DecodeFixed() CHIP_ERROR OTAImageHeaderParser::DecodeTlv(OTAImageHeader & header) { - ReturnErrorCodeIf(mBufferOffset < mHeaderTlvSize, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mBufferOffset >= mHeaderTlvSize, CHIP_ERROR_BUFFER_TOO_SMALL); TLV::TLVReader tlvReader; tlvReader.Init(mBuffer.Get(), mBufferOffset); @@ -146,7 +146,7 @@ CHIP_ERROR OTAImageHeaderParser::DecodeTlv(OTAImageHeader & header) ReturnErrorOnFailure(tlvReader.Get(header.mSoftwareVersion)); ReturnErrorOnFailure(tlvReader.Next(TLV::ContextTag(Tag::kSoftwareVersionString))); ReturnErrorOnFailure(tlvReader.Get(header.mSoftwareVersionString)); - ReturnErrorCodeIf(header.mSoftwareVersionString.size() > kMaxSoftwareVersionStringSize, CHIP_ERROR_INVALID_STRING_LENGTH); + VerifyOrReturnError(header.mSoftwareVersionString.size() <= kMaxSoftwareVersionStringSize, CHIP_ERROR_INVALID_STRING_LENGTH); ReturnErrorOnFailure(tlvReader.Next(TLV::ContextTag(Tag::kPayloadSize))); ReturnErrorOnFailure(tlvReader.Get(header.mPayloadSize)); ReturnErrorOnFailure(tlvReader.Next()); @@ -166,7 +166,7 @@ CHIP_ERROR OTAImageHeaderParser::DecodeTlv(OTAImageHeader & header) if (tlvReader.GetTag() == TLV::ContextTag(Tag::kReleaseNotesURL)) { ReturnErrorOnFailure(tlvReader.Get(header.mReleaseNotesURL)); - ReturnErrorCodeIf(header.mReleaseNotesURL.size() > kMaxReleaseNotesURLSize, CHIP_ERROR_INVALID_STRING_LENGTH); + VerifyOrReturnError(header.mReleaseNotesURL.size() <= kMaxReleaseNotesURLSize, CHIP_ERROR_INVALID_STRING_LENGTH); ReturnErrorOnFailure(tlvReader.Next()); } diff --git a/src/lib/core/tests/BUILD.gn b/src/lib/core/tests/BUILD.gn index 264de2c8aa..fd00915c59 100644 --- a/src/lib/core/tests/BUILD.gn +++ b/src/lib/core/tests/BUILD.gn @@ -31,14 +31,9 @@ chip_test_suite("tests") { "TestOptional.cpp", "TestReferenceCounted.cpp", "TestTLV.cpp", + "TestTLVVectorWriter.cpp", ] - # requires large amount of heap for multiple unfragmented 10k buffers - # skip for efr32 to allow flash space for other tests - if (chip_device_platform != "efr32") { - test_sources += [ "TestTLVVectorWriter.cpp" ] - } - cflags = [ "-Wconversion" ] public_deps = [ diff --git a/src/lib/core/tests/TestOTAImageHeader.cpp b/src/lib/core/tests/TestOTAImageHeader.cpp index bee9da3978..03bee0dbb7 100644 --- a/src/lib/core/tests/TestOTAImageHeader.cpp +++ b/src/lib/core/tests/TestOTAImageHeader.cpp @@ -167,7 +167,7 @@ TEST_F(TestOTAImageHeader, TestSmallBlocks) for (size_t offset = 0; offset < kImageSize && error == CHIP_ERROR_BUFFER_TOO_SMALL; offset += blockSize) { - ByteSpan block(&kOtaImage[offset], chip::min(kImageSize - offset, blockSize)); + ByteSpan block(&kOtaImage[offset], std::min(kImageSize - offset, blockSize)); error = parser.AccumulateAndDecode(block, header); } diff --git a/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp b/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp index ce46137c9a..de8e842202 100644 --- a/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp +++ b/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp @@ -558,7 +558,7 @@ CHIP_ERROR AdvertiserMinMdns::Advertise(const OperationalAdvertisingParameters & DiscoveryFilter(DiscoveryFilterType::kCompressedFabricId, params.GetPeerId().GetCompressedFabricId())); FullQName compressedFabricIdSubtype = operationalAllocator->AllocateQName( nameBuffer, kSubtypeServiceNamePart, kOperationalServiceName, kOperationalProtocol, kLocalDomain); - ReturnErrorCodeIf(compressedFabricIdSubtype.nameCount == 0, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(compressedFabricIdSubtype.nameCount != 0, CHIP_ERROR_NO_MEMORY); if (!operationalAllocator->AddResponder(compressedFabricIdSubtype, instanceName) .SetReportAdditional(instanceName) @@ -676,7 +676,7 @@ CHIP_ERROR AdvertiserMinMdns::Advertise(const CommissionAdvertisingParameters & MakeServiceSubtype(nameBuffer, sizeof(nameBuffer), DiscoveryFilter(DiscoveryFilterType::kVendorId, *vendorId)); FullQName vendorServiceName = allocator->AllocateQName(nameBuffer, kSubtypeServiceNamePart, serviceType, kCommissionProtocol, kLocalDomain); - ReturnErrorCodeIf(vendorServiceName.nameCount == 0, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(vendorServiceName.nameCount != 0, CHIP_ERROR_NO_MEMORY); if (!allocator->AddResponder(vendorServiceName, instanceName) .SetReportAdditional(instanceName) @@ -693,7 +693,7 @@ CHIP_ERROR AdvertiserMinMdns::Advertise(const CommissionAdvertisingParameters & MakeServiceSubtype(nameBuffer, sizeof(nameBuffer), DiscoveryFilter(DiscoveryFilterType::kDeviceType, *deviceType)); FullQName vendorServiceName = allocator->AllocateQName(nameBuffer, kSubtypeServiceNamePart, serviceType, kCommissionProtocol, kLocalDomain); - ReturnErrorCodeIf(vendorServiceName.nameCount == 0, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(vendorServiceName.nameCount != 0, CHIP_ERROR_NO_MEMORY); if (!allocator->AddResponder(vendorServiceName, instanceName) .SetReportAdditional(instanceName) @@ -713,7 +713,7 @@ CHIP_ERROR AdvertiserMinMdns::Advertise(const CommissionAdvertisingParameters & DiscoveryFilter(DiscoveryFilterType::kShortDiscriminator, params.GetShortDiscriminator())); FullQName shortServiceName = allocator->AllocateQName(nameBuffer, kSubtypeServiceNamePart, serviceType, kCommissionProtocol, kLocalDomain); - ReturnErrorCodeIf(shortServiceName.nameCount == 0, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(shortServiceName.nameCount != 0, CHIP_ERROR_NO_MEMORY); if (!allocator->AddResponder(shortServiceName, instanceName) .SetReportAdditional(instanceName) @@ -730,7 +730,7 @@ CHIP_ERROR AdvertiserMinMdns::Advertise(const CommissionAdvertisingParameters & DiscoveryFilter(DiscoveryFilterType::kLongDiscriminator, params.GetLongDiscriminator())); FullQName longServiceName = allocator->AllocateQName(nameBuffer, kSubtypeServiceNamePart, serviceType, kCommissionProtocol, kLocalDomain); - ReturnErrorCodeIf(longServiceName.nameCount == 0, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(longServiceName.nameCount != 0, CHIP_ERROR_NO_MEMORY); if (!allocator->AddResponder(longServiceName, instanceName) .SetReportAdditional(instanceName) .SetReportInServiceListing(true) @@ -746,7 +746,7 @@ CHIP_ERROR AdvertiserMinMdns::Advertise(const CommissionAdvertisingParameters & MakeServiceSubtype(nameBuffer, sizeof(nameBuffer), DiscoveryFilter(DiscoveryFilterType::kCommissioningMode)); FullQName longServiceName = allocator->AllocateQName(nameBuffer, kSubtypeServiceNamePart, serviceType, kCommissionProtocol, kLocalDomain); - ReturnErrorCodeIf(longServiceName.nameCount == 0, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(longServiceName.nameCount != 0, CHIP_ERROR_NO_MEMORY); if (!allocator->AddResponder(longServiceName, instanceName) .SetReportAdditional(instanceName) .SetReportInServiceListing(true) diff --git a/src/lib/dnssd/Resolver_ImplMinimalMdns.cpp b/src/lib/dnssd/Resolver_ImplMinimalMdns.cpp index 8e913f2add..0a615fef4d 100644 --- a/src/lib/dnssd/Resolver_ImplMinimalMdns.cpp +++ b/src/lib/dnssd/Resolver_ImplMinimalMdns.cpp @@ -590,7 +590,7 @@ CHIP_ERROR MinMdnsResolver::BuildQuery(QueryBuilder & builder, const ActiveResol break; } - ReturnErrorCodeIf(!qname.nameCount, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(qname.nameCount, CHIP_ERROR_NO_MEMORY); mdns::Minimal::Query query(qname); query @@ -665,7 +665,7 @@ CHIP_ERROR MinMdnsResolver::BuildQuery(QueryBuilder & builder, const ActiveResol return CHIP_ERROR_INVALID_ARGUMENT; } - ReturnErrorCodeIf(!builder.Ok(), CHIP_ERROR_INTERNAL); + VerifyOrReturnError(builder.Ok(), CHIP_ERROR_INTERNAL); return CHIP_NO_ERROR; } @@ -681,7 +681,7 @@ CHIP_ERROR MinMdnsResolver::SendAllPendingQueries() } System::PacketBufferHandle buffer = System::PacketBufferHandle::New(kMdnsMaxPacketSize); - ReturnErrorCodeIf(buffer.IsNull(), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(!buffer.IsNull(), CHIP_ERROR_NO_MEMORY); QueryBuilder builder(std::move(buffer)); builder.Header().SetMessageId(0); @@ -770,7 +770,7 @@ CHIP_ERROR MinMdnsResolver::ScheduleRetries() { MATTER_TRACE_SCOPE("Schedule retries", "MinMdnsResolver"); - ReturnErrorCodeIf(mSystemLayer == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mSystemLayer != nullptr, CHIP_ERROR_INCORRECT_STATE); mSystemLayer->CancelTimer(&RetryCallback, this); std::optional delay = mActiveResolves.GetTimeUntilNextExpectedResponse(); diff --git a/src/lib/dnssd/ServiceNaming.cpp b/src/lib/dnssd/ServiceNaming.cpp index 8ec86a1bfb..d463a3ae8e 100644 --- a/src/lib/dnssd/ServiceNaming.cpp +++ b/src/lib/dnssd/ServiceNaming.cpp @@ -30,7 +30,7 @@ namespace Dnssd { CHIP_ERROR MakeInstanceName(char * buffer, size_t bufferLen, const PeerId & peerId) { - ReturnErrorCodeIf(bufferLen <= Operational::kInstanceNameMaxLength, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufferLen > Operational::kInstanceNameMaxLength, CHIP_ERROR_BUFFER_TOO_SMALL); NodeId nodeId = peerId.GetNodeId(); CompressedFabricId fabricId = peerId.GetCompressedFabricId(); @@ -43,8 +43,8 @@ CHIP_ERROR MakeInstanceName(char * buffer, size_t bufferLen, const PeerId & peer CHIP_ERROR ExtractIdFromInstanceName(const char * name, PeerId * peerId) { - ReturnErrorCodeIf(name == nullptr, CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(peerId == nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(name != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(peerId != nullptr, CHIP_ERROR_INVALID_ARGUMENT); // Make sure the string is long enough. static constexpr size_t fabricIdByteLength = 8; @@ -55,24 +55,24 @@ CHIP_ERROR ExtractIdFromInstanceName(const char * name, PeerId * peerId) // Ensure we have at least totalLength chars. size_t len = strnlen(name, totalLength); - ReturnErrorCodeIf(len < totalLength, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(len >= totalLength, CHIP_ERROR_INVALID_ARGUMENT); // Check that we have a proper terminator. - ReturnErrorCodeIf(name[totalLength] != '\0' && name[totalLength] != '.', CHIP_ERROR_WRONG_NODE_ID); + VerifyOrReturnError(name[totalLength] == '\0' || name[totalLength] == '.', CHIP_ERROR_WRONG_NODE_ID); // Check what we have a separator where we expect. - ReturnErrorCodeIf(name[fabricIdStringLength] != '-', CHIP_ERROR_WRONG_NODE_ID); + VerifyOrReturnError(name[fabricIdStringLength] == '-', CHIP_ERROR_WRONG_NODE_ID); - static constexpr size_t bufferSize = max(fabricIdByteLength, nodeIdByteLength); + static constexpr size_t bufferSize = std::max(fabricIdByteLength, nodeIdByteLength); uint8_t buf[bufferSize]; - ReturnErrorCodeIf(Encoding::HexToBytes(name, fabricIdStringLength, buf, bufferSize) == 0, CHIP_ERROR_WRONG_NODE_ID); + VerifyOrReturnError(Encoding::HexToBytes(name, fabricIdStringLength, buf, bufferSize) != 0, CHIP_ERROR_WRONG_NODE_ID); // Buf now stores the fabric id, as big-endian bytes. static_assert(fabricIdByteLength == sizeof(uint64_t), "Wrong number of bytes"); peerId->SetCompressedFabricId(Encoding::BigEndian::Get64(buf)); - ReturnErrorCodeIf(Encoding::HexToBytes(name + fabricIdStringLength + 1, nodeIdStringLength, buf, bufferSize) == 0, - CHIP_ERROR_WRONG_NODE_ID); + VerifyOrReturnError(Encoding::HexToBytes(name + fabricIdStringLength + 1, nodeIdStringLength, buf, bufferSize) != 0, + CHIP_ERROR_WRONG_NODE_ID); // Buf now stores the node id id, as big-endian bytes. static_assert(nodeIdByteLength == sizeof(uint64_t), "Wrong number of bytes"); peerId->SetNodeId(Encoding::BigEndian::Get64(buf)); @@ -82,7 +82,7 @@ CHIP_ERROR ExtractIdFromInstanceName(const char * name, PeerId * peerId) CHIP_ERROR MakeHostName(char * buffer, size_t bufferLen, const chip::ByteSpan & macOrEui64) { - ReturnErrorCodeIf(bufferLen < macOrEui64.size() * 2 + 1, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufferLen >= macOrEui64.size() * 2 + 1, CHIP_ERROR_BUFFER_TOO_SMALL); int idx = 0; for (size_t i = 0; i < macOrEui64.size(); ++i) diff --git a/src/lib/dnssd/minimal_mdns/ResponseSender.cpp b/src/lib/dnssd/minimal_mdns/ResponseSender.cpp index 7aec6142f0..0128824542 100644 --- a/src/lib/dnssd/minimal_mdns/ResponseSender.cpp +++ b/src/lib/dnssd/minimal_mdns/ResponseSender.cpp @@ -200,7 +200,7 @@ CHIP_ERROR ResponseSender::Respond(uint16_t messageId, const QueryData & query, CHIP_ERROR ResponseSender::FlushReply() { - ReturnErrorCodeIf(!mResponseBuilder.HasPacketBuffer(), CHIP_NO_ERROR); // nothing to flush + VerifyOrReturnError(mResponseBuilder.HasPacketBuffer(), CHIP_NO_ERROR); // nothing to flush if (mResponseBuilder.HasResponseRecords()) { @@ -232,7 +232,7 @@ CHIP_ERROR ResponseSender::FlushReply() CHIP_ERROR ResponseSender::PrepareNewReplyPacket() { chip::System::PacketBufferHandle buffer = chip::System::PacketBufferHandle::New(kPacketSizeBytes); - ReturnErrorCodeIf(buffer.IsNull(), CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(!buffer.IsNull(), CHIP_ERROR_NO_MEMORY); mResponseBuilder.Reset(std::move(buffer)); mResponseBuilder.Header().SetMessageId(mSendState.GetMessageId()); diff --git a/src/lib/support/BufferReader.cpp b/src/lib/support/BufferReader.cpp index 02bce8f3fe..cbd13f1ed1 100644 --- a/src/lib/support/BufferReader.cpp +++ b/src/lib/support/BufferReader.cpp @@ -18,12 +18,29 @@ #include "BufferReader.h" #include +#include +#include #include #include namespace chip { namespace Encoding { + +BufferReader & BufferReader::ReadBytes(uint8_t * dest, size_t size) +{ + static_assert(CHAR_BIT == 8, "Our various sizeof checks rely on bytes and octets being the same thing"); + + if (EnsureAvailable(size)) + { + memcpy(dest, mReadPtr, size); + mReadPtr += size; + mAvailable -= size; + } + + return *this; +} + namespace LittleEndian { namespace { @@ -58,37 +75,12 @@ void Reader::RawReadLowLevelBeCareful(T * retval) constexpr size_t data_size = sizeof(T); - if (mAvailable < data_size) - { - mStatus = CHIP_ERROR_BUFFER_TOO_SMALL; - // Ensure that future reads all fail. - mAvailable = 0; - return; - } - - ReadHelper(mReadPtr, retval); - mReadPtr += data_size; - - mAvailable = static_cast(mAvailable - data_size); -} - -Reader & Reader::ReadBytes(uint8_t * dest, size_t size) -{ - static_assert(CHAR_BIT == 8, "Our various sizeof checks rely on bytes and octets being the same thing"); - - if ((size > UINT16_MAX) || (mAvailable < size)) + if (EnsureAvailable(data_size)) { - mStatus = CHIP_ERROR_BUFFER_TOO_SMALL; - // Ensure that future reads all fail. - mAvailable = 0; - return *this; + ReadHelper(mReadPtr, retval); + mReadPtr += data_size; + mAvailable -= data_size; } - - memcpy(dest, mReadPtr, size); - - mReadPtr += size; - mAvailable = static_cast(mAvailable - size); - return *this; } // Explicit Read instantiations for the data types we want to support. @@ -104,5 +96,46 @@ template void Reader::RawReadLowLevelBeCareful(uint32_t *); template void Reader::RawReadLowLevelBeCareful(uint64_t *); } // namespace LittleEndian + +namespace BigEndian { + +Reader & Reader::Read16(uint16_t * dest) +{ + if (!EnsureAvailable(sizeof(uint16_t))) + { + return *this; + } + + static_assert(sizeof(*dest) == 2); + + *dest = static_cast((mReadPtr[0] << 8) + mReadPtr[1]); + mReadPtr += 2; + mAvailable -= 2; + return *this; +} + +Reader & Reader::Read32(uint32_t * dest) +{ + if (!EnsureAvailable(sizeof(uint32_t))) + { + return *this; + } + + static_assert(sizeof(*dest) == 4); + + *dest = 0; + for (unsigned i = 0; i < sizeof(uint32_t); i++) + { + *dest <<= 8; + *dest += mReadPtr[i]; + } + + mReadPtr += sizeof(uint32_t); + mAvailable -= sizeof(uint32_t); + return *this; +} + +} // namespace BigEndian + } // namespace Encoding } // namespace chip diff --git a/src/lib/support/BufferReader.h b/src/lib/support/BufferReader.h index f37667453e..725ca8e23e 100644 --- a/src/lib/support/BufferReader.h +++ b/src/lib/support/BufferReader.h @@ -31,26 +31,11 @@ namespace chip { namespace Encoding { -namespace LittleEndian { -/** - * @class Reader - * - * Simple reader for reading little-endian things out of buffers. - */ -class Reader +class BufferReader { public: - /** - * Create a buffer reader from a given buffer and length. - * - * @param buffer The octet buffer from which to read. The caller must ensure - * (most simply by allocating the reader on the stack) that - * the buffer outlives the reader. If `buffer` is nullptr, - * length is automatically overridden to zero, to avoid accesses. - * @param buf_len The number of octets in the buffer. - */ - Reader(const uint8_t * buffer, size_t buf_len) : mBufStart(buffer), mReadPtr(buffer), mAvailable(buf_len) + BufferReader(const uint8_t * buffer, size_t buf_len) : mBufStart(buffer), mReadPtr(buffer), mAvailable(buf_len) { if (mBufStart == nullptr) { @@ -58,15 +43,6 @@ class Reader } } - /** - * Create a buffer reader from a given byte span. - * - * @param buffer The octet buffer byte span from which to read. The caller must ensure - * that the buffer outlives the reader. The buffer's ByteSpan .data() pointer - * is is nullptr, length is automatically overridden to zero, to avoid accesses. - */ - Reader(const ByteSpan & buffer) : Reader(buffer.data(), buffer.size()) {} - /** * Number of octets we have read so far. */ @@ -95,6 +71,121 @@ class Reader */ bool IsSuccess() const { return StatusCode() == CHIP_NO_ERROR; } + /** + * Read a byte string from the BufferReader + * + * @param [out] dest Where the bytes read + * @param [in] size How many bytes to read + * + * @note The read can put the reader in a failed-status state if there are + * not enough octets available. Callers must either continue to do + * more reads on the return value or check its status to see whether + * the sequence of reads that has been performed succeeded. + */ + CHECK_RETURN_VALUE + BufferReader & ReadBytes(uint8_t * dest, size_t size); + + /** + * Access bytes of size length, useful for in-place processing of strings + * + * data_ptr MUST NOT be null and will contain the data pointer with `len` bytes available + * if this call is successful + * + * If len is greater than the number of available bytes, the object enters in a failed status. + */ + CHECK_RETURN_VALUE + BufferReader & ZeroCopyProcessBytes(size_t len, const uint8_t ** data_ptr) + { + if (len > mAvailable) + { + *data_ptr = nullptr; + mStatus = CHIP_ERROR_BUFFER_TOO_SMALL; + // Ensure that future reads all fail. + mAvailable = 0; + } + else + { + *data_ptr = mReadPtr; + mReadPtr += len; + mAvailable -= len; + } + return *this; + } + + /** + * Advance the Reader forward by the specified number of octets. + * + * @param len The number of octets to skip. + * + * @note If the len argument is greater than the number of available octets + * remaining, the Reader will advance to the end of the buffer + * without entering a failed-status state. + */ + BufferReader & Skip(size_t len) + { + len = std::min(len, mAvailable); + mReadPtr += len; + mAvailable = static_cast(mAvailable - len); + return *this; + } + +protected: + /// Our buffer start. + const uint8_t * const mBufStart; + + /// Our current read point. + const uint8_t * mReadPtr; + + /// The number of octets we can still read starting at mReadPtr. + size_t mAvailable; + + /// Our current status. + CHIP_ERROR mStatus = CHIP_NO_ERROR; + + /// Make sure we have at least the given number of bytes available (does not consume them) + bool EnsureAvailable(size_t size) + { + if (mAvailable < size) + { + mStatus = CHIP_ERROR_BUFFER_TOO_SMALL; + // Ensure that future reads all fail. + mAvailable = 0; + return false; + } + return true; + } +}; + +namespace LittleEndian { + +/** + * @class Reader + * + * Simple reader for reading little-endian things out of buffers. + */ +class Reader : public BufferReader +{ +public: + /** + * Create a buffer reader from a given buffer and length. + * + * @param buffer The octet buffer from which to read. The caller must ensure + * (most simply by allocating the reader on the stack) that + * the buffer outlives the reader. If `buffer` is nullptr, + * length is automatically overridden to zero, to avoid accesses. + * @param buf_len The number of octets in the buffer. + */ + Reader(const uint8_t * buffer, size_t buf_len) : BufferReader(buffer, buf_len) {} + + /** + * Create a buffer reader from a given byte span. + * + * @param buffer The octet buffer byte span from which to read. The caller must ensure + * that the buffer outlives the reader. The buffer's ByteSpan .data() pointer + * is is nullptr, length is automatically overridden to zero, to avoid accesses. + */ + Reader(const ByteSpan & buffer) : Reader(buffer.data(), buffer.size()) {} + /** * Read a bool, assuming single byte storage. * @@ -267,20 +358,6 @@ class Reader return *this; } - /** - * Read a byte string from the BufferReader - * - * @param [out] dest Where the bytes read - * @param [in] size How many bytes to read - * - * @note The read can put the reader in a failed-status state if there are - * not enough octets available. Callers must either continue to do - * more reads on the return value or check its status to see whether - * the sequence of reads that has been performed succeeded. - */ - CHECK_RETURN_VALUE - Reader & ReadBytes(uint8_t * dest, size_t size); - /** * Helper for our various APIs so we don't have to write out various logic * multiple times. This is public so that consumers that want to read into @@ -290,46 +367,80 @@ class Reader */ template void RawReadLowLevelBeCareful(T * retval); +}; + +} // namespace LittleEndian +namespace BigEndian { + +/** + * @class Reader + * + * Simple reader for reading big-endian things out of buffers. + */ +class Reader : public BufferReader +{ +public: /** - * Advance the Reader forward by the specified number of octets. - * - * @param len The number of octets to skip. + * Create a buffer reader from a given buffer and length. * - * @note If the len argument is greater than the number of available octets - * remaining, the Reader will advance to the end of the buffer - * without entering a failed-status state. + * @param buffer The octet buffer from which to read. The caller must ensure + * (most simply by allocating the reader on the stack) that + * the buffer outlives the reader. If `buffer` is nullptr, + * length is automatically overridden to zero, to avoid accesses. + * @param buf_len The number of octets in the buffer. */ - Reader & Skip(size_t len) - { - len = ::chip::min(len, mAvailable); - mReadPtr += len; - mAvailable = static_cast(mAvailable - len); - return *this; - } + Reader(const uint8_t * buffer, size_t buf_len) : BufferReader(buffer, buf_len) {} -private: /** - * Our buffer start. + * Create a buffer reader from a given byte span. + * + * @param buffer The octet buffer byte span from which to read. The caller must ensure + * that the buffer outlives the reader. If the buffer's ByteSpan .data() pointer + * is nullptr, length is automatically overridden to zero, to avoid accesses. */ - const uint8_t * const mBufStart; + Reader(const ByteSpan & buffer) : Reader(buffer.data(), buffer.size()) {} /** - * Our current read point. + * Read a single 8-bit unsigned integer. + * + * @param [out] dest Where the 8-bit integer goes. + * + * @note The read can put the reader in a failed-status state if there are + * not enough octets available. Callers must either continue to do + * more reads on the return value or check its status to see whether + * the sequence of reads that has been performed succeeded. */ - const uint8_t * mReadPtr; + CHECK_RETURN_VALUE + Reader & Read8(uint8_t * dest) + { + (void) ReadBytes(dest, 1); + return *this; + } - /** - * The number of octets we can still read starting at mReadPtr. - */ - size_t mAvailable; + CHECK_RETURN_VALUE + Reader & ReadChar(char * dest) + { + (void) ReadBytes(reinterpret_cast(dest), 1); + return *this; + } - /** - * Our current status. - */ - CHIP_ERROR mStatus = CHIP_NO_ERROR; + CHECK_RETURN_VALUE + Reader & ReadBool(char * dest) + { + (void) ReadBytes(reinterpret_cast(dest), 1); + return *this; + } + + /// NOTE: only a subset of reads are supported here, more can be added if used/needed + CHECK_RETURN_VALUE + Reader & Read16(uint16_t * dest); + + CHECK_RETURN_VALUE + Reader & Read32(uint32_t * dest); }; -} // namespace LittleEndian +} // namespace BigEndian + } // namespace Encoding } // namespace chip diff --git a/src/lib/support/BytesCircularBuffer.cpp b/src/lib/support/BytesCircularBuffer.cpp index b0eba36430..89e89f1770 100644 --- a/src/lib/support/BytesCircularBuffer.cpp +++ b/src/lib/support/BytesCircularBuffer.cpp @@ -20,7 +20,6 @@ #include #include -#include #include #include diff --git a/src/lib/support/CHIPFaultInjection.cpp b/src/lib/support/CHIPFaultInjection.cpp index b7ac95eea1..8b7df7ace9 100644 --- a/src/lib/support/CHIPFaultInjection.cpp +++ b/src/lib/support/CHIPFaultInjection.cpp @@ -22,8 +22,6 @@ */ #include "CHIPFaultInjection.h" -#include - #include namespace chip { diff --git a/src/lib/support/CHIPMem-Simple.cpp b/src/lib/support/CHIPMem-Simple.cpp index 8816afeaed..dbbaa9634d 100644 --- a/src/lib/support/CHIPMem-Simple.cpp +++ b/src/lib/support/CHIPMem-Simple.cpp @@ -55,8 +55,8 @@ class HeapLocked CHIP_ERROR MemoryAllocatorInit(void * buf, size_t bufSize) { - ReturnErrorCodeIf(buf == nullptr, CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(gPrivateHeap != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(buf != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(gPrivateHeap == nullptr, CHIP_ERROR_INCORRECT_STATE); PrivateHeapInit(buf, bufSize); gPrivateHeap = buf; diff --git a/src/lib/support/CodeUtils.h b/src/lib/support/CodeUtils.h index fb659c4793..01cc80bffc 100644 --- a/src/lib/support/CodeUtils.h +++ b/src/lib/support/CodeUtils.h @@ -131,30 +131,6 @@ #include -namespace chip { - -// Generic min() and max() functions -// -template -constexpr inline const _T & min(const _T & a, const _T & b) -{ - if (b < a) - return b; - - return a; -} - -template -constexpr inline const _T & max(const _T & a, const _T & b) -{ - if (a < b) - return b; - - return a; -} - -} // namespace chip - /** * @def ReturnErrorOnFailure(expr) * @@ -337,31 +313,6 @@ constexpr inline const _T & max(const _T & a, const _T & b) } while (false) #endif // CHIP_CONFIG_ERROR_SOURCE -/** - * @def ReturnErrorCodeIf(expr, code) - * - * @brief - * Returns a specified error code if expression evaluates to true - * - * Example usage: - * - * @code - * ReturnErrorCodeIf(state == kInitialized, CHIP_NO_ERROR); - * ReturnErrorCodeIf(state == kInitialized, CHIP_ERROR_INCORRECT_STATE); - * @endcode - * - * @param[in] expr A Boolean expression to be evaluated. - * @param[in] code A value to return if @a expr is false. - */ -#define ReturnErrorCodeIf(expr, code) \ - do \ - { \ - if (expr) \ - { \ - return code; \ - } \ - } while (false) - /** * @def SuccessOrExit(error) * diff --git a/src/lib/support/PersistentStorageMacros.h b/src/lib/support/PersistentStorageMacros.h index 986686d9fa..91e3b61e67 100644 --- a/src/lib/support/PersistentStorageMacros.h +++ b/src/lib/support/PersistentStorageMacros.h @@ -33,10 +33,10 @@ namespace chip { do \ { \ constexpr size_t len = std::extent::value; \ - nlSTATIC_ASSERT_PRINT(len > 0, "keyPrefix length must be known at compile time"); \ + static_assert(len > 0, "keyPrefix length must be known at compile time"); \ /* 2 * sizeof(chip::NodeId) to accommodate 2 character for each byte in Node Id */ \ char key[len + 2 * sizeof(chip::NodeId) + 1]; \ - nlSTATIC_ASSERT_PRINT(sizeof(node) <= sizeof(uint64_t), "Node ID size is greater than expected"); \ + static_assert(sizeof(node) <= sizeof(uint64_t), "Node ID size is greater than expected"); \ /* Be careful about switching to ChipLogFormatX64: it would change the storage keys! */ \ snprintf(key, sizeof(key), "%s%" PRIx64, keyPrefix, node); \ action; \ diff --git a/src/lib/support/SafeString.h b/src/lib/support/SafeString.h index 4d85280804..cf75ba5563 100644 --- a/src/lib/support/SafeString.h +++ b/src/lib/support/SafeString.h @@ -23,9 +23,11 @@ #pragma once -#include +#include #include +#include + namespace chip { /** @@ -48,7 +50,7 @@ template constexpr size_t MaxStringLength(const char (&)[FirstLength], RestOfTypes &&... aArgs) { // Subtract 1 because we are not counting the null-terminator. - return max(FirstLength - 1, MaxStringLength(std::forward(aArgs)...)); + return std::max(FirstLength - 1, MaxStringLength(std::forward(aArgs)...)); } /** diff --git a/src/lib/support/TestPersistentStorageDelegate.h b/src/lib/support/TestPersistentStorageDelegate.h index 7dc1c06008..997448c03d 100644 --- a/src/lib/support/TestPersistentStorageDelegate.h +++ b/src/lib/support/TestPersistentStorageDelegate.h @@ -207,7 +207,7 @@ class TestPersistentStorageDelegate : public PersistentStorageDelegate protected: virtual CHIP_ERROR SyncGetKeyValueInternal(const char * key, void * buffer, uint16_t & size) { - ReturnErrorCodeIf(((buffer == nullptr) && (size != 0)), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError((buffer != nullptr) || (size == 0), CHIP_ERROR_INVALID_ARGUMENT); // Making sure poison keys are not accessed if (mPoisonKeys.find(std::string(key)) != mPoisonKeys.end()) @@ -226,8 +226,8 @@ class TestPersistentStorageDelegate : public PersistentStorageDelegate } uint16_t valueSizeUint16 = static_cast(valueSize); - ReturnErrorCodeIf(size == 0 && valueSizeUint16 == 0, CHIP_NO_ERROR); - ReturnErrorCodeIf(buffer == nullptr, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(size != 0 || valueSizeUint16 != 0, CHIP_NO_ERROR); + VerifyOrReturnError(buffer != nullptr, CHIP_ERROR_BUFFER_TOO_SMALL); uint16_t sizeToCopy = std::min(size, valueSizeUint16); diff --git a/src/lib/support/ZclString.cpp b/src/lib/support/ZclString.cpp index 3482cd4303..3bbdb25179 100644 --- a/src/lib/support/ZclString.cpp +++ b/src/lib/support/ZclString.cpp @@ -34,7 +34,7 @@ CHIP_ERROR MakeZclCharString(MutableByteSpan & buffer, const char * cString) return CHIP_ERROR_INBOUND_MESSAGE_TOO_BIG; } size_t len = strlen(cString); - size_t availableStorage = min(buffer.size() - 1, kBufferMaximumSize); + size_t availableStorage = std::min(buffer.size() - 1, kBufferMaximumSize); if (len > availableStorage) { buffer.data()[0] = 0; diff --git a/src/lib/support/tests/TestBufferReader.cpp b/src/lib/support/tests/TestBufferReader.cpp index 97db9cf097..ee100e1506 100644 --- a/src/lib/support/tests/TestBufferReader.cpp +++ b/src/lib/support/tests/TestBufferReader.cpp @@ -30,21 +30,21 @@ #include using namespace chip; -using namespace chip::Encoding::LittleEndian; +using namespace chip::Encoding; static const uint8_t test_buffer[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 }; -struct TestReader : public Reader +struct LittleEndianTestReader : public LittleEndian::Reader { - TestReader() : Reader(test_buffer, std::extent::value) {} + LittleEndianTestReader() : LittleEndian::Reader(test_buffer, std::extent::value) {} }; -struct TestSpanReader : public Reader +struct LittleEndianTestSpanReader : public LittleEndian::Reader { - TestSpanReader() : Reader(ByteSpan{ test_buffer, std::extent::value }) {} + LittleEndianTestSpanReader() : LittleEndian::Reader(ByteSpan{ test_buffer, std::extent::value }) {} }; -static void TestBufferReader_BasicImpl(Reader & reader) +static void TestBufferReader_BasicImpl(LittleEndian::Reader & reader) { uint8_t first; uint16_t second; @@ -75,21 +75,21 @@ static void TestBufferReader_BasicImpl(Reader & reader) TEST(TestBufferReader, TestBufferReader_Basic) { - TestReader reader; + LittleEndianTestReader reader; TestBufferReader_BasicImpl(reader); } TEST(TestBufferReader, TestBufferReader_BasicSpan) { - TestSpanReader reader; + LittleEndianTestSpanReader reader; TestBufferReader_BasicImpl(reader); } TEST(TestBufferReader, TestBufferReader_Saturation) { - TestReader reader; + LittleEndianTestReader reader; uint64_t temp; // Read some bytes out so we can get to the end of the buffer. CHIP_ERROR err = reader.Read64(&temp).StatusCode(); @@ -113,12 +113,13 @@ TEST(TestBufferReader, TestBufferReader_Saturation) TEST(TestBufferReader, TestBufferReader_Skip) { - TestReader reader; + LittleEndianTestReader reader; uint8_t temp = 0; uint16_t firstSkipLen = 2; // Verify Skip() advances the start pointer the correct amount. - CHIP_ERROR err = reader.Skip(firstSkipLen).Read8(&temp).StatusCode(); + reader.Skip(firstSkipLen); + CHIP_ERROR err = reader.Read8(&temp).StatusCode(); EXPECT_EQ(err, CHIP_NO_ERROR); EXPECT_EQ(temp, test_buffer[firstSkipLen]); EXPECT_EQ(reader.OctetsRead(), (firstSkipLen + 1u)); @@ -175,7 +176,8 @@ TEST(TestBufferReader, TestBufferReader_LittleEndianScalars) uint32_t val1 = 0; uint32_t val2 = 0; - EXPECT_TRUE(reader.Skip(1).Read32(&val1).Read32(&val2).IsSuccess()); + reader.Skip(1); + EXPECT_TRUE(reader.Read32(&val1).Read32(&val2).IsSuccess()); EXPECT_EQ(reader.Remaining(), 1u); EXPECT_EQ(val1, static_cast(0xfffffffeUL)); EXPECT_EQ(val2, static_cast(0xffffffffUL)); @@ -227,7 +229,8 @@ TEST(TestBufferReader, TestBufferReader_LittleEndianScalars) int32_t val1 = 0; int32_t val2 = 0; - EXPECT_TRUE(reader.Skip(1).ReadSigned32(&val1).ReadSigned32(&val2).IsSuccess()); + reader.Skip(1); + EXPECT_TRUE(reader.ReadSigned32(&val1).ReadSigned32(&val2).IsSuccess()); EXPECT_EQ(reader.Remaining(), 1u); EXPECT_EQ(val1, static_cast(-2L)); EXPECT_EQ(val2, static_cast(-1L)); @@ -272,3 +275,23 @@ TEST(TestBufferReader, TestBufferReader_LittleEndianScalars) EXPECT_EQ(val3, '\xff'); } } + +TEST(TestBigEndianBufferReader, GenericTests) +{ + uint8_t test_buf[] = { 0x12, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xBC, 1, 2, 3 }; + + chip::Encoding::BigEndian::Reader reader{ ByteSpan{ test_buf } }; + + uint16_t v1; + uint32_t v2; + uint8_t v3; + + EXPECT_TRUE(reader.Read16(&v1).Read32(&v2).Read8(&v3).IsSuccess()); + EXPECT_EQ(reader.Remaining(), 3u); + EXPECT_EQ(v1, 0x1223u); + EXPECT_EQ(v2, 0x456789ABu); + EXPECT_EQ(v3, 0xBCu); + + // Insufficient buffer after that + EXPECT_FALSE(reader.Read32(&v2).IsSuccess()); +} diff --git a/src/lwip/BUILD.gn b/src/lwip/BUILD.gn index 145bc2dd1d..ca08a8c392 100644 --- a/src/lwip/BUILD.gn +++ b/src/lwip/BUILD.gn @@ -202,6 +202,7 @@ if (current_os == "zephyr" || current_os == "mbed") { if (lwip_platform == "standalone") { public += [ "standalone/arch/sys_arch.h" ] sources += [ "standalone/sys_arch.c" ] + sources += [ "standalone/pbuf_pool_assert.c" ] } else if (lwip_platform == "cyw30739") { } else if (lwip_platform == "mt793x") { } else { @@ -217,8 +218,6 @@ if (current_os == "zephyr" || current_os == "mbed") { public_deps += [ "${ti_simplelink_sdk_build_root}:ti_simplelink_sdk" ] } else if (lwip_platform == "cc32xx") { public_deps += [ "${ti_simplelink_sdk_build_root}:ti_simplelink_sdk" ] - sources += - [ "${chip_root}/third_party/lwip/repo/lwip/src/apps/mdns/mdns.c" ] } else if (lwip_platform == "silabs") { public_deps += [ "${efr32_sdk_build_root}:efr32_sdk" ] diff --git a/src/lwip/cc13xx_26xx/lwipopts.h b/src/lwip/cc13xx_26xx/lwipopts.h index 26a1bb6641..194e81a944 100644 --- a/src/lwip/cc13xx_26xx/lwipopts.h +++ b/src/lwip/cc13xx_26xx/lwipopts.h @@ -72,9 +72,11 @@ #define LWIP_IGMP (0) #define LWIP_DHCP (0) #define LWIP_IPV6_REASS (0) +#define LWIP_IPV6_FRAG 0 #define LWIP_IPV6_DHCP6 0 #define LWIP_IPV6_AUTOCONFIG (0) #define LWIP_IPV6_ROUTER_SUPPORT 0 +#define LWIP_IPV6_FORWARD 0 #define LWIP_ND6_LISTEN_RA 0 #define LWIP_ND6_NUM_NEIGHBORS (1) diff --git a/src/lwip/cc32xx/lwipopts.h b/src/lwip/cc32xx/lwipopts.h index 146ff2bec8..972766336a 100644 --- a/src/lwip/cc32xx/lwipopts.h +++ b/src/lwip/cc32xx/lwipopts.h @@ -78,9 +78,11 @@ #define LWIP_IGMP (1) #define LWIP_DHCP (1) #define LWIP_IPV6_REASS (0) +#define LWIP_IPV6_FRAG 0 #define LWIP_IPV6_DHCP6 0 #define LWIP_IPV6_AUTOCONFIG (0) #define LWIP_IPV6_ROUTER_SUPPORT 0 +#define LWIP_IPV6_FORWARD 0 #define LWIP_ND6_LISTEN_RA 0 #define LWIP_ND6_NUM_NEIGHBORS (0) diff --git a/src/lwip/standalone/arch/cc.h b/src/lwip/standalone/arch/cc.h index 7411079747..4b7aca34f4 100644 --- a/src/lwip/standalone/arch/cc.h +++ b/src/lwip/standalone/arch/cc.h @@ -52,6 +52,10 @@ #ifndef __ARCH_CC_H__ #define __ARCH_CC_H__ +#if CHIP_HAVE_CONFIG_H +#include +#endif + /* Include some files for defining library routines */ #include #include diff --git a/src/lwip/standalone/lwipopts.h b/src/lwip/standalone/lwipopts.h index 84aa44e1c5..c4fab1ec67 100644 --- a/src/lwip/standalone/lwipopts.h +++ b/src/lwip/standalone/lwipopts.h @@ -28,10 +28,6 @@ #ifndef __LWIPOPTS_H__ #define __LWIPOPTS_H__ -#if CHIP_HAVE_CONFIG_H -#include -#endif - #include /** @@ -137,11 +133,12 @@ * PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is * designed to accommodate single full size link-layer frame in one pbuf, including * the link-layer header and any link-layer encapsulation header, and the pbuf - * structure itself. + * structure itself. pbuf struct consists of 2 pointers, 2 u16_t, 4 u8_t. */ #define PBUF_POOL_BUFSIZE \ - LWIP_MEM_ALIGN_SIZE(PAYLOAD_MTU + PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN) + LWIP_MEM_ALIGN_SIZE(sizeof(struct pbuf) + 1) + LWIP_MEM_ALIGN_SIZE(PAYLOAD_MTU + PBUF_LINK_ENCAPSULATION_HLEN + PBUF_LINK_HLEN) + \ + LWIP_MEM_ALIGN_SIZE(2 * __SIZEOF_POINTER__ + (2 * 2) + (4 * 1) + 1) /** * TCP_SND_BUF: TCP sender buffer space (bytes). @@ -414,14 +411,6 @@ extern unsigned char gLwIP_DebugFlags; #endif -/** - * The WICED definition of PBUF_POOL_BUFSIZE includes a number of - * sizeof() instantiations which causes the C preprocessor to - * fail. Disable TCP configuration constant sanity checks to work - * around this. - */ -#define LWIP_DISABLE_TCP_SANITY_CHECKS (1) - /** * LwIP defaults the size of most mailboxes (i.e. message queues) to * zero (0). That generally makes RTOSes such as FreeRTOS very diff --git a/src/lwip/standalone/pbuf_pool_assert.c b/src/lwip/standalone/pbuf_pool_assert.c new file mode 100644 index 0000000000..1e743e25d6 --- /dev/null +++ b/src/lwip/standalone/pbuf_pool_assert.c @@ -0,0 +1,27 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "lwip/pbuf.h" +#include "lwipopts.h" + +/** + * PBUF_POOL_BUFSIZE, defined in lwipopts.h was previously using sizeof, but as it is used in other preprocessor macros in lwip + * code, it failed. Below is to make sure that current calculation aligns with previous. + */ +_Static_assert((LWIP_MEM_ALIGN_SIZE(2 * __SIZEOF_POINTER__ + (2 * 2) + (4 * 1) + 1) == + LWIP_MEM_ALIGN_SIZE(sizeof(struct pbuf) + 1)), + "PBUF_POOL_BUFFSIZE in lwipopts.h needs adjusting."); diff --git a/src/messaging/ExchangeMessageDispatch.cpp b/src/messaging/ExchangeMessageDispatch.cpp index a94f131054..662a2e4d02 100644 --- a/src/messaging/ExchangeMessageDispatch.cpp +++ b/src/messaging/ExchangeMessageDispatch.cpp @@ -38,7 +38,7 @@ CHIP_ERROR ExchangeMessageDispatch::SendMessage(SessionManager * sessionManager, bool isReliableTransmission, Protocols::Id protocol, uint8_t type, System::PacketBufferHandle && message) { - ReturnErrorCodeIf(!MessagePermitted(protocol, type), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(MessagePermitted(protocol, type), CHIP_ERROR_INVALID_ARGUMENT); PayloadHeader payloadHeader; payloadHeader.SetExchangeID(exchangeId).SetMessageType(protocol, type).SetInitiator(isInitiator); diff --git a/src/platform/ASR/ASRFactoryDataProvider.cpp b/src/platform/ASR/ASRFactoryDataProvider.cpp index c1a436168f..204a249773 100755 --- a/src/platform/ASR/ASRFactoryDataProvider.cpp +++ b/src/platform/ASR/ASRFactoryDataProvider.cpp @@ -97,7 +97,7 @@ CHIP_ERROR ASRFactoryDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) #if !CONFIG_ENABLE_ASR_FACTORY_DATA_PROVIDER #if defined(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_SALT) saltB64Len = strlen(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_SALT); - ReturnErrorCodeIf(saltB64Len > sizeof(saltB64), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(saltB64Len <= sizeof(saltB64), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(saltB64, CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_SALT, saltB64Len); #else return CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND; @@ -109,7 +109,7 @@ CHIP_ERROR ASRFactoryDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) ReturnErrorOnFailure(err); size_t saltLen = chip::Base64Decode32(saltB64, saltB64Len, reinterpret_cast(saltB64)); - ReturnErrorCodeIf(saltLen > saltBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(saltLen <= saltBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(saltBuf.data(), saltB64, saltLen); saltBuf.reduce_size(saltLen); @@ -128,7 +128,7 @@ CHIP_ERROR ASRFactoryDataProvider::GetSpake2pVerifier(MutableByteSpan & verifier #if !CONFIG_ENABLE_ASR_FACTORY_DATA_PROVIDER #if defined(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_VERIFIER) verifierB64Len = strlen(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_VERIFIER); - ReturnErrorCodeIf(verifierB64Len > sizeof(verifierB64), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(verifierB64Len <= sizeof(verifierB64), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(verifierB64, CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_VERIFIER, verifierB64Len); #else return CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND; @@ -140,7 +140,7 @@ CHIP_ERROR ASRFactoryDataProvider::GetSpake2pVerifier(MutableByteSpan & verifier ReturnErrorOnFailure(err); verifierLen = chip::Base64Decode32(verifierB64, verifierB64Len, reinterpret_cast(verifierB64)); - ReturnErrorCodeIf(verifierLen > verifierBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(verifierLen <= verifierBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(verifierBuf.data(), verifierB64, verifierLen); verifierBuf.reduce_size(verifierLen); @@ -352,13 +352,13 @@ CHIP_ERROR ASRFactoryDataProvider::SignWithDeviceAttestationKey(const ByteSpan & CHIP_ERROR ASRFactoryDataProvider::GetVendorName(char * buf, size_t bufSize) { #if !CONFIG_ENABLE_ASR_FACTORY_DEVICE_INFO_PROVIDER - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME); #else size_t buffer_len = ConfigurationManager::kMaxVendorNameLength + 1; uint8_t buffer[ConfigurationManager::kMaxVendorNameLength + 1] = { 0 }; ReturnErrorOnFailure(ASRConfig::ReadFactoryConfigValue(ASR_VENDOR_NAME_PARTITION, buffer, buffer_len, buffer_len)); - ReturnErrorCodeIf(bufSize < buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(buf, buffer, buffer_len); buf[buffer_len] = 0; #endif @@ -380,13 +380,13 @@ CHIP_ERROR ASRFactoryDataProvider::GetVendorId(uint16_t & vendorId) CHIP_ERROR ASRFactoryDataProvider::GetProductName(char * buf, size_t bufSize) { #if !CONFIG_ENABLE_ASR_FACTORY_DEVICE_INFO_PROVIDER - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME); #else size_t buffer_len = ConfigurationManager::kMaxProductNameLength + 1; uint8_t buffer[ConfigurationManager::kMaxProductNameLength + 1] = { 0 }; ReturnErrorOnFailure(ASRConfig::ReadFactoryConfigValue(ASR_PRODUCT_NAME_PARTITION, buffer, buffer_len, buffer_len)); - ReturnErrorCodeIf(bufSize < buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(buf, buffer, buffer_len); buf[buffer_len] = 0; #endif @@ -413,7 +413,7 @@ CHIP_ERROR ASRFactoryDataProvider::GetPartNumber(char * buf, size_t bufSize) size_t buffer_len = ConfigurationManager::kMaxPartNumberLength + 1; uint8_t buffer[ConfigurationManager::kMaxPartNumberLength + 1] = { 0 }; ReturnErrorOnFailure(ASRConfig::ReadFactoryConfigValue(ASR_PART_NUMBER_PARTITION, buffer, buffer_len, buffer_len)); - ReturnErrorCodeIf(bufSize < buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(buf, buffer, buffer_len); buf[buffer_len] = 0; #endif @@ -428,7 +428,7 @@ CHIP_ERROR ASRFactoryDataProvider::GetProductURL(char * buf, size_t bufSize) size_t buffer_len = ConfigurationManager::kMaxProductURLLength + 1; uint8_t buffer[ConfigurationManager::kMaxProductURLLength + 1] = { 0 }; ReturnErrorOnFailure(ASRConfig::ReadFactoryConfigValue(ASR_PRODUCT_URL_PARTITION, buffer, buffer_len, buffer_len)); - ReturnErrorCodeIf(bufSize < buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(buf, buffer, buffer_len); buf[buffer_len] = 0; #endif @@ -443,7 +443,7 @@ CHIP_ERROR ASRFactoryDataProvider::GetProductLabel(char * buf, size_t bufSize) size_t buffer_len = ConfigurationManager::kMaxProductLabelLength + 1; uint8_t buffer[ConfigurationManager::kMaxProductLabelLength + 1] = { 0 }; ReturnErrorOnFailure(ASRConfig::ReadFactoryConfigValue(ASR_PRODUCT_LABEL_PARTITION, buffer, buffer_len, buffer_len)); - ReturnErrorCodeIf(bufSize < buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(buf, buffer, buffer_len); buf[buffer_len] = 0; #endif @@ -453,13 +453,13 @@ CHIP_ERROR ASRFactoryDataProvider::GetProductLabel(char * buf, size_t bufSize) CHIP_ERROR ASRFactoryDataProvider::GetSerialNumber(char * buf, size_t bufSize) { #if !CONFIG_ENABLE_ASR_FACTORY_DEVICE_INFO_PROVIDER - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER); #else size_t buffer_len = ConfigurationManager::kMaxSerialNumberLength + 1; uint8_t buffer[ConfigurationManager::kMaxSerialNumberLength + 1] = { 0 }; ReturnErrorOnFailure(ASRConfig::ReadFactoryConfigValue(ASR_SERIAL_NUMBER_PARTITION, buffer, buffer_len, buffer_len)); - ReturnErrorCodeIf(bufSize < buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(buf, buffer, buffer_len); buf[buffer_len] = 0; #endif @@ -522,13 +522,13 @@ CHIP_ERROR ASRFactoryDataProvider::GetHardwareVersion(uint16_t & hardwareVersion CHIP_ERROR ASRFactoryDataProvider::GetHardwareVersionString(char * buf, size_t bufSize) { #if !CONFIG_ENABLE_ASR_FACTORY_DEVICE_INFO_PROVIDER - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING); #else size_t buffer_len = ConfigurationManager::kMaxHardwareVersionStringLength + 1; uint8_t buffer[ConfigurationManager::kMaxHardwareVersionStringLength + 1] = { 0 }; ReturnErrorOnFailure(ASRConfig::ReadFactoryConfigValue(ASR_HARDWARE_VERSION_STR_PARTITION, buffer, buffer_len, buffer_len)); - ReturnErrorCodeIf(bufSize < buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(buf, buffer, buffer_len); buf[buffer_len] = 0; #endif @@ -545,8 +545,8 @@ CHIP_ERROR ASRFactoryDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & #ifdef CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID constexpr uint8_t uniqueId[] = CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID; - ReturnErrorCodeIf(sizeof(uniqueId) > uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(sizeof(uniqueId) != ConfigurationManager::kRotatingDeviceIDUniqueIDLength, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(sizeof(uniqueId) <= uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(sizeof(uniqueId) == ConfigurationManager::kRotatingDeviceIDUniqueIDLength, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(uniqueIdSpan.data(), uniqueId, sizeof(uniqueId)); uniqueIdSpan.reduce_size(sizeof(uniqueId)); return CHIP_NO_ERROR; @@ -555,11 +555,11 @@ CHIP_ERROR ASRFactoryDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & #define ROTATING_UNIQUE_ID_STRING_LEN ConfigurationManager::kRotatingDeviceIDUniqueIDLength * 2 uint8_t buffer[ROTATING_UNIQUE_ID_STRING_LEN] = { 0 }; size_t buffer_len = ROTATING_UNIQUE_ID_STRING_LEN; - ReturnErrorCodeIf(ConfigurationManager::kRotatingDeviceIDUniqueIDLength > uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(ConfigurationManager::kRotatingDeviceIDUniqueIDLength <= uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); ReturnErrorOnFailure(ASRConfig::ReadFactoryConfigValue(ASR_ROTATING_UNIQUE_ID_PARTITION, buffer, buffer_len, buffer_len)); size_t bytesLen = chip::Encoding::HexToBytes(Uint8::to_char(buffer), ROTATING_UNIQUE_ID_STRING_LEN, uniqueIdSpan.data(), uniqueIdSpan.size()); - ReturnErrorCodeIf(bytesLen != ConfigurationManager::kRotatingDeviceIDUniqueIDLength, CHIP_ERROR_INVALID_STRING_LENGTH); + VerifyOrReturnError(bytesLen == ConfigurationManager::kRotatingDeviceIDUniqueIDLength, CHIP_ERROR_INVALID_STRING_LENGTH); uniqueIdSpan.reduce_size(bytesLen); return CHIP_NO_ERROR; #endif // CONFIG_ENABLE_ASR_FACTORY_DEVICE_INFO_PROVIDER diff --git a/src/platform/ASR/ASROTAImageProcessor.cpp b/src/platform/ASR/ASROTAImageProcessor.cpp index d83ba75362..ca853ab5b5 100644 --- a/src/platform/ASR/ASROTAImageProcessor.cpp +++ b/src/platform/ASR/ASROTAImageProcessor.cpp @@ -211,7 +211,7 @@ CHIP_ERROR ASROTAImageProcessor::ProcessHeader(ByteSpan & block) CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(block, header); // Needs more data to decode the header - ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); ReturnErrorOnFailure(error); ChipLogProgress(SoftwareUpdate, "Image Header software version: %ld payload size: %lu", header.mSoftwareVersion, diff --git a/src/platform/ASR/ASRUtils.cpp b/src/platform/ASR/ASRUtils.cpp index f65c6ecb11..5095d22f62 100644 --- a/src/platform/ASR/ASRUtils.cpp +++ b/src/platform/ASR/ASRUtils.cpp @@ -235,7 +235,7 @@ CHIP_ERROR ASRUtils::GetWiFiStationProvision(Internal::DeviceNetworkInfo & netIn netInfo.NetworkId = kWiFiStationNetworkId; netInfo.FieldPresent.NetworkId = true; memcpy(netInfo.WiFiSSID, stationConfig.wifi_ssid, - min(strlen(reinterpret_cast(stationConfig.wifi_ssid)) + 1, sizeof(netInfo.WiFiSSID))); + std::min(strlen(reinterpret_cast(stationConfig.wifi_ssid)) + 1, sizeof(netInfo.WiFiSSID))); // Enforce that netInfo wifiSSID is null terminated netInfo.WiFiSSID[kMaxWiFiSSIDLength] = '\0'; @@ -243,7 +243,7 @@ CHIP_ERROR ASRUtils::GetWiFiStationProvision(Internal::DeviceNetworkInfo & netIn if (includeCredentials) { static_assert(sizeof(netInfo.WiFiKey) < 255, "Our min might not fit in netInfo.WiFiKeyLen"); - netInfo.WiFiKeyLen = static_cast(min(strlen((char *) stationConfig.wifi_key), sizeof(netInfo.WiFiKey))); + netInfo.WiFiKeyLen = static_cast(std::min(strlen((char *) stationConfig.wifi_key), sizeof(netInfo.WiFiKey))); memcpy(netInfo.WiFiKey, stationConfig.wifi_key, netInfo.WiFiKeyLen); } diff --git a/src/platform/Ameba/AmebaOTAImageProcessor.cpp b/src/platform/Ameba/AmebaOTAImageProcessor.cpp index 78c1a8bdd2..f2752a6e0d 100644 --- a/src/platform/Ameba/AmebaOTAImageProcessor.cpp +++ b/src/platform/Ameba/AmebaOTAImageProcessor.cpp @@ -262,7 +262,7 @@ CHIP_ERROR AmebaOTAImageProcessor::ProcessHeader(ByteSpan & block) CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(block, header); // Needs more data to decode the header - ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); ReturnErrorOnFailure(error); mParams.totalFileBytes = header.mPayloadSize; diff --git a/src/platform/Ameba/FactoryDataProvider.cpp b/src/platform/Ameba/FactoryDataProvider.cpp index d41f856690..e7251a6f80 100644 --- a/src/platform/Ameba/FactoryDataProvider.cpp +++ b/src/platform/Ameba/FactoryDataProvider.cpp @@ -174,8 +174,8 @@ CHIP_ERROR FactoryDataProvider::GetCertificationDeclaration(MutableByteSpan & ou if (kReadFromFlash) { - ReturnErrorCodeIf(outBuffer.size() < mFactoryData.dac.cd.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.dac.cd.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(outBuffer.size() >= mFactoryData.dac.cd.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.dac.cd.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(outBuffer.data(), mFactoryData.dac.cd.value, mFactoryData.dac.cd.len); @@ -204,8 +204,8 @@ CHIP_ERROR FactoryDataProvider::GetDeviceAttestationCert(MutableByteSpan & outBu if (kReadFromFlash) { - ReturnErrorCodeIf(outBuffer.size() < mFactoryData.dac.dac_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.dac.dac_cert.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(outBuffer.size() >= mFactoryData.dac.dac_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.dac.dac_cert.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(outBuffer.data(), mFactoryData.dac.dac_cert.value, mFactoryData.dac.dac_cert.len); @@ -226,8 +226,8 @@ CHIP_ERROR FactoryDataProvider::GetProductAttestationIntermediateCert(MutableByt if (kReadFromFlash) { - ReturnErrorCodeIf(outBuffer.size() < mFactoryData.dac.pai_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.dac.pai_cert.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(outBuffer.size() >= mFactoryData.dac.pai_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.dac.pai_cert.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(outBuffer.data(), mFactoryData.dac.pai_cert.value, mFactoryData.dac.pai_cert.len); @@ -254,7 +254,7 @@ CHIP_ERROR FactoryDataProvider::SignWithDeviceAttestationKey(const ByteSpan & me if (kReadFromFlash) { #if CONFIG_ENABLE_AMEBA_CRYPTO - ReturnErrorCodeIf(!mFactoryData.dac.dac_cert.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(mFactoryData.dac.dac_cert.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); // Extract public key from DAC cert. ByteSpan dacCertSpan{ reinterpret_cast(mFactoryData.dac.dac_cert.value), mFactoryData.dac.dac_cert.len }; chip::Crypto::P256PublicKey dacPublicKey; @@ -266,8 +266,8 @@ CHIP_ERROR FactoryDataProvider::SignWithDeviceAttestationKey(const ByteSpan & me err = decoder.GetSign(dacPublicKey.Bytes(), dacPublicKey.Length(), messageToSign.data(), messageToSign.size(), signature.Bytes()); #else - ReturnErrorCodeIf(!mFactoryData.dac.dac_cert.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); - ReturnErrorCodeIf(!mFactoryData.dac.dac_key.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(mFactoryData.dac.dac_cert.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(mFactoryData.dac.dac_key.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); // Extract public key from DAC cert. ByteSpan dacCertSpan{ reinterpret_cast(mFactoryData.dac.dac_cert.value), mFactoryData.dac.dac_cert.len }; chip::Crypto::P256PublicKey dacPublicKey; @@ -325,7 +325,7 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pIterationCount(uint32_t & iterationCou if (kReadFromFlash) { - ReturnErrorCodeIf(mFactoryData.cdata.spake2_it == 0, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(mFactoryData.cdata.spake2_it != 0, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); iterationCount = mFactoryData.cdata.spake2_it; err = CHIP_NO_ERROR; } @@ -351,7 +351,7 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) if (kReadFromFlash) { saltB64Len = mFactoryData.cdata.spake2_salt.len; - ReturnErrorCodeIf(saltB64Len > sizeof(saltB64), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(saltB64Len <= sizeof(saltB64), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(saltB64, mFactoryData.cdata.spake2_salt.value, saltB64Len); err = CHIP_NO_ERROR; } @@ -359,7 +359,7 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) { #if defined(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_SALT) saltB64Len = strlen(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_SALT); - ReturnErrorCodeIf(saltB64Len > sizeof(saltB64), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(saltB64Len <= sizeof(saltB64), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(saltB64, CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_SALT, saltB64Len); err = CHIP_NO_ERROR; #endif // defined(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_SALT) @@ -368,7 +368,7 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) ReturnErrorOnFailure(err); size_t saltLen = chip::Base64Decode32(saltB64, saltB64Len, reinterpret_cast(saltB64)); - ReturnErrorCodeIf(saltLen > saltBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(saltLen <= saltBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(saltBuf.data(), saltB64, saltLen); saltBuf.reduce_size(saltLen); @@ -387,7 +387,7 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pVerifier(MutableByteSpan & verifierBuf if (kReadFromFlash) { verifierB64Len = mFactoryData.cdata.spake2_verifier.len; - ReturnErrorCodeIf(verifierB64Len > sizeof(verifierB64), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(verifierB64Len <= sizeof(verifierB64), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(verifierB64, mFactoryData.cdata.spake2_verifier.value, verifierB64Len); err = CHIP_NO_ERROR; } @@ -395,7 +395,7 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pVerifier(MutableByteSpan & verifierBuf { #if defined(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_VERIFIER) verifierB64Len = strlen(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_VERIFIER); - ReturnErrorCodeIf(verifierB64Len > sizeof(verifierB64), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(verifierB64Len <= sizeof(verifierB64), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(verifierB64, CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_VERIFIER, verifierB64Len); err = CHIP_NO_ERROR; #endif // defined(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_VERIFIER) @@ -403,7 +403,7 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pVerifier(MutableByteSpan & verifierBuf ReturnErrorOnFailure(err); verifierLen = chip::Base64Decode32(verifierB64, verifierB64Len, reinterpret_cast(verifierB64)); - ReturnErrorCodeIf(verifierLen > verifierBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(verifierLen <= verifierBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(verifierBuf.data(), verifierB64, verifierLen); verifierBuf.reduce_size(verifierLen); @@ -416,7 +416,7 @@ CHIP_ERROR FactoryDataProvider::GetSetupPasscode(uint32_t & setupPasscode) if (kReadFromFlash) { - ReturnErrorCodeIf(mFactoryData.cdata.passcode == 0, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(mFactoryData.cdata.passcode != 0, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); setupPasscode = mFactoryData.cdata.passcode; err = CHIP_NO_ERROR; } @@ -442,15 +442,15 @@ CHIP_ERROR FactoryDataProvider::GetVendorName(char * buf, size_t bufSize) if (kReadFromFlash) { - ReturnErrorCodeIf(bufSize < mFactoryData.dii.vendor_name.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.dii.vendor_name.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(bufSize >= mFactoryData.dii.vendor_name.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.dii.vendor_name.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(buf, mFactoryData.dii.vendor_name.value, mFactoryData.dii.vendor_name.len); buf[mFactoryData.dii.vendor_name.len] = 0; err = CHIP_NO_ERROR; } else { - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME); err = CHIP_NO_ERROR; } @@ -482,15 +482,15 @@ CHIP_ERROR FactoryDataProvider::GetProductName(char * buf, size_t bufSize) if (kReadFromFlash) { - ReturnErrorCodeIf(bufSize < mFactoryData.dii.product_name.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.dii.product_name.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(bufSize >= mFactoryData.dii.product_name.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.dii.product_name.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(buf, mFactoryData.dii.product_name.value, mFactoryData.dii.product_name.len); buf[mFactoryData.dii.product_name.len] = 0; err = CHIP_NO_ERROR; } else { - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME); err = CHIP_NO_ERROR; } @@ -539,8 +539,8 @@ CHIP_ERROR FactoryDataProvider::GetSerialNumber(char * buf, size_t bufSize) if (kReadFromFlash) { - ReturnErrorCodeIf(bufSize < mFactoryData.dii.serial_num.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.dii.serial_num.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(bufSize >= mFactoryData.dii.serial_num.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.dii.serial_num.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(buf, mFactoryData.dii.serial_num.value, mFactoryData.dii.serial_num.len); buf[mFactoryData.dii.serial_num.len] = 0; err = CHIP_NO_ERROR; @@ -550,15 +550,15 @@ CHIP_ERROR FactoryDataProvider::GetSerialNumber(char * buf, size_t bufSize) #ifdef CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER if (CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER[0] != 0) { - ReturnErrorCodeIf(sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER) > bufSize, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER) <= bufSize, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(buf, CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER, sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER)); serialNumLen = sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER) - 1; err = CHIP_NO_ERROR; } #endif // CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER - ReturnErrorCodeIf(serialNumLen >= bufSize, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(buf[serialNumLen] != 0, CHIP_ERROR_INVALID_STRING_LENGTH); + VerifyOrReturnError(serialNumLen < bufSize, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(buf[serialNumLen] == 0, CHIP_ERROR_INVALID_STRING_LENGTH); err = CHIP_NO_ERROR; } @@ -635,15 +635,16 @@ CHIP_ERROR FactoryDataProvider::GetHardwareVersionString(char * buf, size_t bufS if (kReadFromFlash) { - ReturnErrorCodeIf(bufSize < mFactoryData.dii.hw_ver_string.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.dii.hw_ver_string.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(bufSize >= mFactoryData.dii.hw_ver_string.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.dii.hw_ver_string.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(buf, mFactoryData.dii.hw_ver_string.value, mFactoryData.dii.hw_ver_string.len); buf[mFactoryData.dii.hw_ver_string.len] = 0; err = CHIP_NO_ERROR; } else { - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING), + CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING); err = CHIP_NO_ERROR; } @@ -657,8 +658,8 @@ CHIP_ERROR FactoryDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & un if (kReadFromFlash) { - ReturnErrorCodeIf(uniqueIdSpan.size() < mFactoryData.dii.rd_id_uid.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.dii.rd_id_uid.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(uniqueIdSpan.size() >= mFactoryData.dii.rd_id_uid.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.dii.rd_id_uid.value, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(uniqueIdSpan.data(), mFactoryData.dii.rd_id_uid.value, mFactoryData.dii.rd_id_uid.len); err = CHIP_NO_ERROR; } @@ -671,8 +672,8 @@ CHIP_ERROR FactoryDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & un "Length of unique ID for rotating device ID is smaller than minimum."); constexpr uint8_t uniqueId[] = CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID; - ReturnErrorCodeIf(sizeof(uniqueId) > uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(sizeof(uniqueId) != ConfigurationManager::kRotatingDeviceIDUniqueIDLength, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(sizeof(uniqueId) <= uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(sizeof(uniqueId) == ConfigurationManager::kRotatingDeviceIDUniqueIDLength, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(uniqueIdSpan.data(), uniqueId, sizeof(uniqueId)); uniqueIdSpan.reduce_size(sizeof(uniqueId)); err = CHIP_NO_ERROR; diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index d379bd0e1f..7f0b7ff87a 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -496,6 +496,8 @@ if (chip_device_platform != "none") { "../include/platform/internal/GenericDeviceInstanceInfoProvider.ipp", "../include/platform/internal/GenericPlatformManagerImpl.h", "../include/platform/internal/GenericPlatformManagerImpl.ipp", + "../include/platform/internal/GenericPlatformManagerImpl_CMSISOS.h", + "../include/platform/internal/GenericPlatformManagerImpl_CMSISOS.ipp", "../include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.h", "../include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.ipp", "../include/platform/internal/GenericPlatformManagerImpl_POSIX.h", diff --git a/src/platform/Beken/OTAImageProcessorImpl.cpp b/src/platform/Beken/OTAImageProcessorImpl.cpp index 770dfc2232..9fd7dda7ca 100644 --- a/src/platform/Beken/OTAImageProcessorImpl.cpp +++ b/src/platform/Beken/OTAImageProcessorImpl.cpp @@ -346,7 +346,7 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & block) CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(block, header); // Needs more data to decode the header - ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); ReturnErrorOnFailure(error); mParams.totalFileBytes = header.mPayloadSize; diff --git a/src/platform/Darwin/CHIPPlatformConfig.h b/src/platform/Darwin/CHIPPlatformConfig.h index d85194aaec..72de356f2d 100644 --- a/src/platform/Darwin/CHIPPlatformConfig.h +++ b/src/platform/Darwin/CHIPPlatformConfig.h @@ -23,6 +23,8 @@ #pragma once +#include + // ==================== General Platform Adaptations ==================== #define CHIP_CONFIG_ABORT() abort() @@ -53,9 +55,16 @@ extern "C" int __cxa_atexit(void (*f)(void *), void * p, void * d); #define CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS 8 #endif // CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS -#ifndef CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS -#define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 8 -#endif // CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS +// +// Default of 8 ECs is not sufficient for some of the unit tests +// that try to validate multiple simultaneous interactions. +// In tests like TestReadHandler_MultipleSubscriptions, we are trying to issue as many read / subscription requests as possible in +// parallel. Since the default config says we support 16 fabrics, and we will have 4 read handlers for each fabric (3 subscriptions +// + 1 reserved for read) that is read transactions in parallel. Since the report handlers are allocated on the heap, we will issue +// 65 requests (the TestReadHandler_MultipleSubscriptions will issue CHIP_IM_MAX_NUM_READ_HANDLER + 1 subscriptions to verify heap +// allocation logic) in total and that is 130 ECs. Round this up to 150 ECs +// +#define CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS 150 #ifndef CHIP_LOG_FILTERING #define CHIP_LOG_FILTERING 1 @@ -66,5 +75,18 @@ extern "C" int __cxa_atexit(void (*f)(void *), void * p, void * d); #endif // CHIP_CONFIG_BDX_MAX_NUM_TRANSFERS #ifndef CHIP_CONFIG_KVS_PATH +#if TARGET_OS_IPHONE +#define CHIP_CONFIG_KVS_PATH "chip.store" +#else #define CHIP_CONFIG_KVS_PATH "/tmp/chip_kvs" +#endif // TARGET_OS_IPHONE #endif // CHIP_CONFIG_KVS_PATH + +#define CHIP_SYSTEM_CONFIG_PACKETBUFFER_POOL_SIZE 0 + +// The session pool size limits how many subscriptions we can have live at +// once. Home supports up to 1000 accessories, and we subscribe to all of them, +// so we need to make sure the pool is big enough for that. +#define CHIP_CONFIG_SECURE_SESSION_POOL_SIZE 1000 + +#define INET_CONFIG_OVERRIDE_SYSTEM_TCP_USER_TIMEOUT 0 diff --git a/src/platform/Darwin/DnssdContexts.cpp b/src/platform/Darwin/DnssdContexts.cpp index e6b590d09e..de8048035f 100644 --- a/src/platform/Darwin/DnssdContexts.cpp +++ b/src/platform/Darwin/DnssdContexts.cpp @@ -722,7 +722,7 @@ void ResolveContext::OnNewInterface(uint32_t interfaceId, const char * fullname, size_t len = *txtRecordIter; ++txtRecordIter; --remainingLen; - len = min(len, remainingLen); + len = std::min(len, remainingLen); chip::Span bytes(txtRecordIter, len); if (txtString.size() > 0) { diff --git a/src/platform/Darwin/KeyValueStoreManagerImpl.mm b/src/platform/Darwin/KeyValueStoreManagerImpl.mm index ffb28435f6..d59610eaf7 100644 --- a/src/platform/Darwin/KeyValueStoreManagerImpl.mm +++ b/src/platform/Darwin/KeyValueStoreManagerImpl.mm @@ -152,13 +152,13 @@ - (instancetype)initWithContext:(nonnull NSManagedObjectContext *)context key:(n return CHIP_NO_ERROR; } - ReturnErrorCodeIf(gContext != nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(fileName == nullptr, CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(fileName[0] == '\0', CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(gContext == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(fileName != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(fileName[0] != '\0', CHIP_ERROR_INVALID_ARGUMENT); NSURL * url = nullptr; NSString * filepath = [NSString stringWithUTF8String:fileName]; - ReturnErrorCodeIf(filepath == nil, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(filepath != nil, CHIP_ERROR_INVALID_ARGUMENT); // relative paths are relative to Documents folder if (![filepath hasPrefix:@"/"]) { @@ -178,12 +178,12 @@ - (instancetype)initWithContext:(nonnull NSManagedObjectContext *)context key:(n } else { url = [NSURL fileURLWithPath:filepath]; } - ReturnErrorCodeIf(url == nullptr, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(url != nullptr, CHIP_ERROR_NO_MEMORY); ChipLogProgress(DeviceLayer, "KVS will be written to: %s", [[url absoluteString] UTF8String]); NSManagedObjectModel * model = CreateManagedObjectModel(); - ReturnErrorCodeIf(model == nullptr, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(model != nullptr, CHIP_ERROR_NO_MEMORY); // setup persistent store coordinator @@ -220,9 +220,9 @@ - (instancetype)initWithContext:(nonnull NSManagedObjectContext *)context key:(n const char * key, void * value, size_t value_size, size_t * read_bytes_size, size_t offset) { @autoreleasepool { - ReturnErrorCodeIf(key == nullptr, CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(offset != 0, CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(gContext == nullptr, CHIP_ERROR_UNINITIALIZED); + VerifyOrReturnError(key != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(offset == 0, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(gContext != nullptr, CHIP_ERROR_UNINITIALIZED); KeyValueItem * item = FindItemForKey([[NSString alloc] initWithUTF8String:key], nil, true); if (!item) { @@ -261,8 +261,8 @@ - (instancetype)initWithContext:(nonnull NSManagedObjectContext *)context key:(n CHIP_ERROR KeyValueStoreManagerImpl::_Delete(const char * key) { @autoreleasepool { - ReturnErrorCodeIf(key == nullptr, CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(gContext == nullptr, CHIP_ERROR_UNINITIALIZED); + VerifyOrReturnError(key != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(gContext != nullptr, CHIP_ERROR_UNINITIALIZED); KeyValueItem * item = FindItemForKey([[NSString alloc] initWithUTF8String:key], nil); if (!item) { @@ -288,13 +288,13 @@ - (instancetype)initWithContext:(nonnull NSManagedObjectContext *)context key:(n CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value, size_t value_size) { @autoreleasepool { - ReturnErrorCodeIf(key == nullptr, CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(gContext == nullptr, CHIP_ERROR_UNINITIALIZED); + VerifyOrReturnError(key != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(gContext != nullptr, CHIP_ERROR_UNINITIALIZED); NSData * data = [[NSData alloc] initWithBytes:value length:value_size]; NSString * itemKey = [[NSString alloc] initWithUTF8String:key]; - ReturnErrorCodeIf(itemKey == nil, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(itemKey != nil, CHIP_ERROR_INVALID_ARGUMENT); KeyValueItem * item = FindItemForKey(itemKey, nil); if (!item) { diff --git a/src/platform/ESP32/BUILD.gn b/src/platform/ESP32/BUILD.gn index 91922dcebb..1ffae2593e 100644 --- a/src/platform/ESP32/BUILD.gn +++ b/src/platform/ESP32/BUILD.gn @@ -205,6 +205,14 @@ static_library("ESP32") { ] } + if (chip_use_factory_data_provider && chip_use_secure_cert_dac_provider) { + # These files have no dependency on chip_use_secure_cert_dac_provider, but if we are reading the commissionable data from the secure cert, we should expect the attestation data to be present there as well. + sources += [ + "ESP32SecureCertDataProvider.cpp", + "ESP32SecureCertDataProvider.h", + ] + } + if (chip_use_esp32_ecdsa_peripheral) { sources += [ "ESP32CHIPCryptoPAL.cpp", diff --git a/src/platform/ESP32/ConfigurationManagerImpl.cpp b/src/platform/ESP32/ConfigurationManagerImpl.cpp index 78446432c5..a12750c6a4 100644 --- a/src/platform/ESP32/ConfigurationManagerImpl.cpp +++ b/src/platform/ESP32/ConfigurationManagerImpl.cpp @@ -238,8 +238,9 @@ CHIP_ERROR ConfigurationManagerImpl::GetSoftwareVersionString(char * buf, size_t appDescription = esp_ota_get_app_description(); #endif - ReturnErrorCodeIf(bufSize < sizeof(appDescription->version), CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(sizeof(appDescription->version) > ConfigurationManager::kMaxSoftwareVersionStringLength, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(bufSize >= sizeof(appDescription->version), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(sizeof(appDescription->version) <= ConfigurationManager::kMaxSoftwareVersionStringLength, + CHIP_ERROR_INTERNAL); strcpy(buf, appDescription->version); return CHIP_NO_ERROR; } diff --git a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp index fc2992f20d..9be535fb61 100644 --- a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp +++ b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp @@ -260,7 +260,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** } else { - ipv6_addr_count = static_cast(min(addr_count, static_cast(kMaxIPv6AddrCount))); + ipv6_addr_count = static_cast(std::min(addr_count, static_cast(kMaxIPv6AddrCount))); } for (uint8_t idx = 0; idx < ipv6_addr_count; ++idx) { diff --git a/src/platform/ESP32/ESP32Config.cpp b/src/platform/ESP32/ESP32Config.cpp index df48f5f295..3fd7d9ea77 100644 --- a/src/platform/ESP32/ESP32Config.cpp +++ b/src/platform/ESP32/ESP32Config.cpp @@ -217,7 +217,7 @@ CHIP_ERROR ESP32Config::ReadConfigValueStr(Key key, char * buf, size_t bufSize, { return CHIP_ERROR_BUFFER_TOO_SMALL; } - ReturnErrorCodeIf(buf[outLen - 1] != 0, CHIP_ERROR_INVALID_STRING_LENGTH); + VerifyOrReturnError(buf[outLen - 1] == 0, CHIP_ERROR_INVALID_STRING_LENGTH); ReturnMappedErrorOnFailure(err); } diff --git a/src/platform/ESP32/ESP32EndpointQueueFilter.h b/src/platform/ESP32/ESP32EndpointQueueFilter.h index aa283d9b7f..cbf3304d97 100644 --- a/src/platform/ESP32/ESP32EndpointQueueFilter.h +++ b/src/platform/ESP32/ESP32EndpointQueueFilter.h @@ -29,8 +29,8 @@ class ESP32EndpointQueueFilter : public EndpointQueueFilter public: CHIP_ERROR SetMdnsHostName(const chip::CharSpan & hostName) { - ReturnErrorCodeIf(hostName.size() != sizeof(mHostNameBuffer), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(!IsValidMdnsHostName(hostName), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(hostName.size() == sizeof(mHostNameBuffer), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(IsValidMdnsHostName(hostName), CHIP_ERROR_INVALID_ARGUMENT); memcpy(mHostNameBuffer, hostName.data(), hostName.size()); return CHIP_NO_ERROR; } diff --git a/src/platform/ESP32/ESP32FactoryDataProvider.cpp b/src/platform/ESP32/ESP32FactoryDataProvider.cpp index ace2a087de..03936c96c7 100644 --- a/src/platform/ESP32/ESP32FactoryDataProvider.cpp +++ b/src/platform/ESP32/ESP32FactoryDataProvider.cpp @@ -66,7 +66,7 @@ CHIP_ERROR ESP32FactoryDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) ReturnErrorOnFailure(err); size_t saltLen = chip::Base64Decode32(saltB64, saltB64Len, reinterpret_cast(saltB64)); - ReturnErrorCodeIf(saltLen > saltBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(saltLen <= saltBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(saltBuf.data(), saltB64, saltLen); saltBuf.reduce_size(saltLen); @@ -88,7 +88,7 @@ CHIP_ERROR ESP32FactoryDataProvider::GetSpake2pVerifier(MutableByteSpan & verifi ReturnErrorOnFailure(err); verifierLen = chip::Base64Decode32(verifierB64, verifierB64Len, reinterpret_cast(verifierB64)); - ReturnErrorCodeIf(verifierLen > verifierBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(verifierLen <= verifierBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(verifierBuf.data(), verifierB64, verifierLen); verifierBuf.reduce_size(verifierLen); @@ -251,7 +251,7 @@ CHIP_ERROR ESP32FactoryDataProvider::GetProductFinish(app::Clusters::BasicInform uint32_t productFinish = 0; err = ESP32Config::ReadConfigValue(ESP32Config::kConfigKey_ProductFinish, productFinish); - ReturnErrorCodeIf(err != CHIP_NO_ERROR, CHIP_ERROR_NOT_IMPLEMENTED); + VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_ERROR_NOT_IMPLEMENTED); *finish = static_cast(productFinish); @@ -264,7 +264,7 @@ CHIP_ERROR ESP32FactoryDataProvider::GetProductPrimaryColor(app::Clusters::Basic uint32_t color = 0; err = ESP32Config::ReadConfigValue(ESP32Config::kConfigKey_ProductColor, color); - ReturnErrorCodeIf(err != CHIP_NO_ERROR, CHIP_ERROR_NOT_IMPLEMENTED); + VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_ERROR_NOT_IMPLEMENTED); *primaryColor = static_cast(color); diff --git a/src/platform/ESP32/ESP32SecureCertDataProvider.cpp b/src/platform/ESP32/ESP32SecureCertDataProvider.cpp new file mode 100644 index 0000000000..e3bb02155b --- /dev/null +++ b/src/platform/ESP32/ESP32SecureCertDataProvider.cpp @@ -0,0 +1,145 @@ +/* + * + * Copyright (c) 2024 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 +#include +#include +#include +#include + +namespace chip { +namespace DeviceLayer { + +namespace { +// Define Matter-specific TLV subtypes for fields in the secure cert partition +enum class MatterTLVSubType : uint8_t +{ + kSetupDiscriminator = 0, + kSpake2pVerifier = 1, + kSpake2pSalt = 2, + kSpake2pIterationCount = 3, + kRotatingDeviceIdUniqueId = 4, +}; + +// Scoped wrapper class for handling TLV data retrieval from secure cert partition +class ScopedTLVInfo +{ +public: + ScopedTLVInfo(MatterTLVSubType subType) : mTLVConfig(GetMatterTLVConfig(subType)) {} + + ~ScopedTLVInfo() { esp_secure_cert_free_tlv_info(&mTLVInfo); } + + CHIP_ERROR GetValue(MutableByteSpan & span) + { + ReturnErrorOnFailure(PopulateTLVInfo()); + VerifyOrReturnError(mTLVInfo.length <= span.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + + memcpy(span.data(), mTLVInfo.data, mTLVInfo.length); + span.reduce_size(mTLVInfo.length); + + return CHIP_NO_ERROR; + } + + CHIP_ERROR GetValue(uint16_t & value) + { + ReturnErrorOnFailure(PopulateTLVInfo()); + VerifyOrReturnError(mTLVInfo.length == sizeof(uint16_t), CHIP_ERROR_INTERNAL, + ChipLogError(DeviceLayer, "secure cert tlv size mismatch")); + + value = Encoding::LittleEndian::Get16(reinterpret_cast(mTLVInfo.data)); + ChipLogDetail(DeviceLayer, "secure cert tlv value:%u", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR GetValue(uint32_t & value) + { + ReturnErrorOnFailure(PopulateTLVInfo()); + VerifyOrReturnError(mTLVInfo.length == sizeof(uint32_t), CHIP_ERROR_INTERNAL, + ChipLogError(DeviceLayer, "secure cert tlv size mismatch")); + + value = Encoding::LittleEndian::Get32(reinterpret_cast(mTLVInfo.data)); + ChipLogDetail(DeviceLayer, "secure cert tlv value:%" PRIu32, value); + return CHIP_NO_ERROR; + } + +private: + esp_secure_cert_tlv_info_t mTLVInfo; + esp_secure_cert_tlv_config_t mTLVConfig; + + esp_secure_cert_tlv_config_t GetMatterTLVConfig(MatterTLVSubType subType) + { + return { .type = ESP_SECURE_CERT_MATTER_TLV_1, .subtype = static_cast(subType) }; + } + + CHIP_ERROR PopulateTLVInfo() + { + esp_err_t err = esp_secure_cert_get_tlv_info(&mTLVConfig, &mTLVInfo); + VerifyOrReturnError(err == ESP_OK, CHIP_ERROR_INTERNAL, + ChipLogError(DeviceLayer, "esp_secure_cert_get_tlv_info failed: type:%u, subtype:%u, err:%d", + mTLVConfig.type, mTLVConfig.subtype, err)); + + ChipLogDetail(DeviceLayer, "secure cert tlv info type:%u subtype:%u length:%" PRIu32 " flags:%u", mTLVInfo.type, + mTLVInfo.subtype, mTLVInfo.length, mTLVInfo.flags); + + return CHIP_NO_ERROR; + } +}; + +} // anonymous namespace + +CHIP_ERROR ESP32SecureCertDataProvider::GetSetupDiscriminator(uint16_t & setupDiscriminator) +{ + ScopedTLVInfo tlvInfo(MatterTLVSubType::kSetupDiscriminator); + return tlvInfo.GetValue(setupDiscriminator); +} + +CHIP_ERROR ESP32SecureCertDataProvider::GetSpake2pIterationCount(uint32_t & iterationCount) +{ + ScopedTLVInfo tlvInfo(MatterTLVSubType::kSpake2pIterationCount); + return tlvInfo.GetValue(iterationCount); +} + +CHIP_ERROR ESP32SecureCertDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) +{ + ScopedTLVInfo tlvInfo(MatterTLVSubType::kSpake2pSalt); + return tlvInfo.GetValue(saltBuf); +} + +CHIP_ERROR ESP32SecureCertDataProvider::GetSpake2pVerifier(MutableByteSpan & verifierBuf, size_t & verifierLen) +{ + ScopedTLVInfo tlvInfo(MatterTLVSubType::kSpake2pVerifier); + ReturnErrorOnFailure(tlvInfo.GetValue(verifierBuf)); + verifierLen = verifierBuf.size(); + return CHIP_NO_ERROR; +} + +CHIP_ERROR ESP32SecureCertDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) +{ +#if CHIP_ENABLE_ROTATING_DEVICE_ID + ScopedTLVInfo tlvInfo(MatterTLVSubType::kRotatingDeviceIdUniqueId); + return tlvInfo.GetValue(uniqueIdSpan); +#else + return CHIP_ERROR_NOT_IMPLEMENTED; +#endif // CHIP_ENABLE_ROTATING_DEVICE_ID +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/ESP32/ESP32SecureCertDataProvider.h b/src/platform/ESP32/ESP32SecureCertDataProvider.h new file mode 100644 index 0000000000..ba17fc15b9 --- /dev/null +++ b/src/platform/ESP32/ESP32SecureCertDataProvider.h @@ -0,0 +1,51 @@ +/* + * + * Copyright (c) 2024 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. + */ + +/* + * ESP32FactoryDataProvider reads the commissionable data and device instance information from the factory partition. + * This implementation extends that behaviour to read the commissionable data from secure cert partition. + * It also extends the behaviour to read the unique id for generating rotating device identifier from the secure cert + * partition. + * + */ + +#pragma once + +#include +#include +#include + +#include + +namespace chip { +namespace DeviceLayer { + +class ESP32SecureCertDataProvider : public ESP32FactoryDataProvider +{ +public: + // CommissionableDataProvider implementation + CHIP_ERROR GetSetupDiscriminator(uint16_t & setupDiscriminator) override; + CHIP_ERROR GetSpake2pIterationCount(uint32_t & iterationCount) override; + CHIP_ERROR GetSpake2pSalt(MutableByteSpan & saltBuf) override; + CHIP_ERROR GetSpake2pVerifier(MutableByteSpan & verifierBuf, size_t & verifierLen) override; + + // GetRotatingDeviceIdUniqueId from GenericDeviceInstanceInfoProvider + CHIP_ERROR GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) override; +}; + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/ESP32/ESP32Utils.cpp b/src/platform/ESP32/ESP32Utils.cpp index ffa45ee722..e66007a0a8 100644 --- a/src/platform/ESP32/ESP32Utils.cpp +++ b/src/platform/ESP32/ESP32Utils.cpp @@ -241,7 +241,7 @@ CHIP_ERROR ESP32Utils::GetWiFiStationProvision(Internal::DeviceNetworkInfo & net netInfo.NetworkId = kWiFiStationNetworkId; netInfo.FieldPresent.NetworkId = true; memcpy(netInfo.WiFiSSID, stationConfig.sta.ssid, - min(strlen(reinterpret_cast(stationConfig.sta.ssid)) + 1, sizeof(netInfo.WiFiSSID))); + std::min(strlen(reinterpret_cast(stationConfig.sta.ssid)) + 1, sizeof(netInfo.WiFiSSID))); // Enforce that netInfo wifiSSID is null terminated netInfo.WiFiSSID[kMaxWiFiSSIDLength] = '\0'; @@ -249,7 +249,7 @@ CHIP_ERROR ESP32Utils::GetWiFiStationProvision(Internal::DeviceNetworkInfo & net if (includeCredentials) { static_assert(sizeof(netInfo.WiFiKey) < 255, "Our min might not fit in netInfo.WiFiKeyLen"); - netInfo.WiFiKeyLen = static_cast(min(strlen((char *) stationConfig.sta.password), sizeof(netInfo.WiFiKey))); + netInfo.WiFiKeyLen = static_cast(std::min(strlen((char *) stationConfig.sta.password), sizeof(netInfo.WiFiKey))); memcpy(netInfo.WiFiKey, stationConfig.sta.password, netInfo.WiFiKeyLen); } @@ -268,7 +268,7 @@ CHIP_ERROR ESP32Utils::SetWiFiStationProvision(const Internal::DeviceNetworkInfo ReturnErrorOnFailure(ESP32Utils::EnableStationMode()); // Enforce that wifiSSID is null terminated before copying it - memcpy(wifiSSID, netInfo.WiFiSSID, min(netInfoSSIDLen + 1, sizeof(wifiSSID))); + memcpy(wifiSSID, netInfo.WiFiSSID, std::min(netInfoSSIDLen + 1, sizeof(wifiSSID))); if (netInfoSSIDLen + 1 < sizeof(wifiSSID)) { wifiSSID[netInfoSSIDLen] = '\0'; @@ -280,8 +280,8 @@ CHIP_ERROR ESP32Utils::SetWiFiStationProvision(const Internal::DeviceNetworkInfo // Initialize an ESP wifi_config_t structure based on the new provision information. memset(&wifiConfig, 0, sizeof(wifiConfig)); - memcpy(wifiConfig.sta.ssid, wifiSSID, min(strlen(wifiSSID) + 1, sizeof(wifiConfig.sta.ssid))); - memcpy(wifiConfig.sta.password, netInfo.WiFiKey, min((size_t) netInfo.WiFiKeyLen, sizeof(wifiConfig.sta.password))); + memcpy(wifiConfig.sta.ssid, wifiSSID, std::min(strlen(wifiSSID) + 1, sizeof(wifiConfig.sta.ssid))); + memcpy(wifiConfig.sta.password, netInfo.WiFiKey, std::min((size_t) netInfo.WiFiKeyLen, sizeof(wifiConfig.sta.password))); wifiConfig.sta.scan_method = WIFI_ALL_CHANNEL_SCAN; wifiConfig.sta.sort_method = WIFI_CONNECT_AP_BY_SIGNAL; diff --git a/src/platform/ESP32/KeyValueStoreManagerImpl.cpp b/src/platform/ESP32/KeyValueStoreManagerImpl.cpp index 3c58716733..96e68a6c2f 100644 --- a/src/platform/ESP32/KeyValueStoreManagerImpl.cpp +++ b/src/platform/ESP32/KeyValueStoreManagerImpl.cpp @@ -49,10 +49,10 @@ namespace { // Returns true if key is hashed, false otherwise. bool HashIfLongKey(const char * key, char * keyHash) { - ReturnErrorCodeIf(strlen(key) < NVS_KEY_NAME_MAX_SIZE, false); + VerifyOrReturnError(strlen(key) >= NVS_KEY_NAME_MAX_SIZE, false); uint8_t hashBuffer[chip::Crypto::kSHA1_Hash_Length]; - ReturnErrorCodeIf(Crypto::Hash_SHA1(Uint8::from_const_char(key), strlen(key), hashBuffer) != CHIP_NO_ERROR, false); + VerifyOrReturnError(Crypto::Hash_SHA1(Uint8::from_const_char(key), strlen(key), hashBuffer) == CHIP_NO_ERROR, false); BitFlags flags(Encoding::HexFlags::kNone); Encoding::BytesToHex(hashBuffer, NVS_KEY_NAME_MAX_SIZE / 2, keyHash, NVS_KEY_NAME_MAX_SIZE, flags); diff --git a/src/platform/ESP32/Logging.cpp b/src/platform/ESP32/Logging.cpp index e8e53aa9e6..9ad98db789 100644 --- a/src/platform/ESP32/Logging.cpp +++ b/src/platform/ESP32/Logging.cpp @@ -25,6 +25,9 @@ void LogV(const char * module, uint8_t category, const char * msg, va_list v) snprintf(tag, sizeof(tag), "chip[%s]", module); tag[sizeof(tag) - 1] = 0; + // We intentionally added the printf statements to ensure we could apply colors to logs redirected to the console. + // The printf statements are not bypassing the log level, rather, they are intentionally designed to print the + // initial and later parts of the log. switch (category) { case kLogCategory_Error: { diff --git a/src/platform/ESP32/NetworkCommissioningDriver.cpp b/src/platform/ESP32/NetworkCommissioningDriver.cpp index 3845287cfd..9b1280f83d 100644 --- a/src/platform/ESP32/NetworkCommissioningDriver.cpp +++ b/src/platform/ESP32/NetworkCommissioningDriver.cpp @@ -143,7 +143,7 @@ CHIP_ERROR ESPWiFiDriver::RevertConfiguration() size_t credentialsLen = 0; CHIP_ERROR error = PersistedStorage::KeyValueStoreMgr().Get(kWiFiSSIDKeyName, network.ssid, sizeof(network.ssid), &ssidLen); - ReturnErrorCodeIf(error == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND, CHIP_NO_ERROR); VerifyOrExit(CanCastTo(ssidLen), error = CHIP_ERROR_INTERNAL); VerifyOrExit(PersistedStorage::KeyValueStoreMgr().Get(kWiFiCredentialsKeyName, network.credentials, sizeof(network.credentials), &credentialsLen) == CHIP_NO_ERROR, diff --git a/src/platform/ESP32/OTAImageProcessorImpl.cpp b/src/platform/ESP32/OTAImageProcessorImpl.cpp index ab27b9c50d..284f21c063 100644 --- a/src/platform/ESP32/OTAImageProcessorImpl.cpp +++ b/src/platform/ESP32/OTAImageProcessorImpl.cpp @@ -573,7 +573,7 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & block) CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(block, header); // Need more data to decode the header - ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); ReturnErrorOnFailure(error); mParams.totalFileBytes = header.mPayloadSize; diff --git a/src/platform/ESP32/bluedroid/ChipDeviceScanner.cpp b/src/platform/ESP32/bluedroid/ChipDeviceScanner.cpp index 81421cf8d5..fc8ac74384 100644 --- a/src/platform/ESP32/bluedroid/ChipDeviceScanner.cpp +++ b/src/platform/ESP32/bluedroid/ChipDeviceScanner.cpp @@ -70,7 +70,7 @@ void ChipDeviceScanner::RemoveDevice() CHIP_ERROR ChipDeviceScanner::StartScan(uint16_t timeout) { - ReturnErrorCodeIf(mIsScanning, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(!mIsScanning, CHIP_ERROR_INCORRECT_STATE); static esp_ble_scan_params_t ble_scan_params = { .scan_type = BLE_SCAN_TYPE_PASSIVE, .own_addr_type = BLE_ADDR_TYPE_RANDOM, @@ -98,7 +98,7 @@ CHIP_ERROR ChipDeviceScanner::StartScan(uint16_t timeout) CHIP_ERROR ChipDeviceScanner::StopScan() { - ReturnErrorCodeIf(!mIsScanning, CHIP_NO_ERROR); + VerifyOrReturnError(mIsScanning, CHIP_NO_ERROR); int rc = esp_ble_gap_stop_scanning(); if (rc != 0) diff --git a/src/platform/ESP32/nimble/ChipDeviceScanner.cpp b/src/platform/ESP32/nimble/ChipDeviceScanner.cpp index 4e01340558..89dbbd91f0 100644 --- a/src/platform/ESP32/nimble/ChipDeviceScanner.cpp +++ b/src/platform/ESP32/nimble/ChipDeviceScanner.cpp @@ -95,7 +95,7 @@ int ChipDeviceScanner::OnBleCentralEvent(struct ble_gap_event * event, void * ar CHIP_ERROR ChipDeviceScanner::StartScan(uint16_t timeout) { - ReturnErrorCodeIf(mIsScanning, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(!mIsScanning, CHIP_ERROR_INCORRECT_STATE); uint8_t ownAddrType; struct ble_gap_disc_params discParams; @@ -135,7 +135,7 @@ CHIP_ERROR ChipDeviceScanner::StartScan(uint16_t timeout) CHIP_ERROR ChipDeviceScanner::StopScan() { - ReturnErrorCodeIf(!mIsScanning, CHIP_NO_ERROR); + VerifyOrReturnError(mIsScanning, CHIP_NO_ERROR); int rc = ble_gap_disc_cancel(); if (rc != 0) diff --git a/src/platform/FreeRTOS/SystemTimeSupport.cpp b/src/platform/FreeRTOS/SystemTimeSupport.cpp index a14c0527b4..12fa8e636d 100644 --- a/src/platform/FreeRTOS/SystemTimeSupport.cpp +++ b/src/platform/FreeRTOS/SystemTimeSupport.cpp @@ -28,6 +28,7 @@ #include #include "FreeRTOS.h" +#include "task.h" namespace chip { namespace System { diff --git a/src/platform/Infineon/CYW30739/FactoryDataProvider.cpp b/src/platform/Infineon/CYW30739/FactoryDataProvider.cpp index 412259bda7..6ed897bfd4 100644 --- a/src/platform/Infineon/CYW30739/FactoryDataProvider.cpp +++ b/src/platform/Infineon/CYW30739/FactoryDataProvider.cpp @@ -204,8 +204,8 @@ CHIP_ERROR FactoryDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & un constexpr uint8_t uniqueId[] = CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID; - ReturnErrorCodeIf(sizeof(uniqueId) > uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(sizeof(uniqueId) != ConfigurationManager::kRotatingDeviceIDUniqueIDLength, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(sizeof(uniqueId) <= uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(sizeof(uniqueId) == ConfigurationManager::kRotatingDeviceIDUniqueIDLength, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(uniqueIdSpan.data(), uniqueId, sizeof(uniqueId)); uniqueIdSpan.reduce_size(sizeof(uniqueId)); } diff --git a/src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.cpp b/src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.cpp index 079acbe906..a77fc2c549 100644 --- a/src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.cpp +++ b/src/platform/Infineon/CYW30739/KeyValueStoreManagerImpl.cpp @@ -195,11 +195,11 @@ KeyValueStoreManagerImpl::KeyConfigIdEntry * KeyValueStoreManagerImpl::AllocateE { Optional freeConfigID; KeyConfigIdEntry * newEntry = FindEntry(key, &freeConfigID); - ReturnErrorCodeIf(newEntry != nullptr, newEntry); - ReturnErrorCodeIf(!freeConfigID.HasValue(), nullptr); + VerifyOrReturnError(newEntry == nullptr, newEntry); + VerifyOrReturnError(freeConfigID.HasValue(), nullptr); newEntry = Platform::New(freeConfigID.Value(), KeyStorage(key)); - ReturnErrorCodeIf(newEntry == nullptr, nullptr); + VerifyOrReturnError(newEntry != nullptr, nullptr); KeyConfigIdEntry * entry = static_cast(slist_tail(&mKeyConfigIdList)); if (entry == nullptr) diff --git a/src/platform/Infineon/CYW30739/OTAImageProcessorImpl.cpp b/src/platform/Infineon/CYW30739/OTAImageProcessorImpl.cpp index 0872952472..02c654d929 100644 --- a/src/platform/Infineon/CYW30739/OTAImageProcessorImpl.cpp +++ b/src/platform/Infineon/CYW30739/OTAImageProcessorImpl.cpp @@ -228,7 +228,7 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & block) CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(block, header); // Needs more data to decode the header - ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); ReturnErrorOnFailure(error); mParams.totalFileBytes = header.mPayloadSize; diff --git a/src/platform/Infineon/PSOC6/ConnectivityManagerImpl.cpp b/src/platform/Infineon/PSOC6/ConnectivityManagerImpl.cpp index a2f7fae9f3..6d0a1907a8 100644 --- a/src/platform/Infineon/PSOC6/ConnectivityManagerImpl.cpp +++ b/src/platform/Infineon/PSOC6/ConnectivityManagerImpl.cpp @@ -229,9 +229,9 @@ CHIP_ERROR ConnectivityManagerImpl::_Init() wifi_config_t wifiConfig; memset(&wifiConfig, 0, sizeof(wifiConfig)); memcpy(wifiConfig.sta.ssid, CHIP_DEVICE_CONFIG_DEFAULT_STA_SSID, - min(strlen(CHIP_DEVICE_CONFIG_DEFAULT_STA_SSID), sizeof(wifiConfig.sta.ssid))); + std::min(strlen(CHIP_DEVICE_CONFIG_DEFAULT_STA_SSID), sizeof(wifiConfig.sta.ssid))); memcpy(wifiConfig.sta.password, CHIP_DEVICE_CONFIG_DEFAULT_STA_PASSWORD, - min(strlen(CHIP_DEVICE_CONFIG_DEFAULT_STA_PASSWORD), sizeof(wifiConfig.sta.password))); + std::min(strlen(CHIP_DEVICE_CONFIG_DEFAULT_STA_PASSWORD), sizeof(wifiConfig.sta.password))); wifiConfig.sta.security = CHIP_DEVICE_CONFIG_DEFAULT_STA_SECURITY; err = Internal::PSOC6Utils::p6_wifi_set_config(WIFI_IF_STA, &wifiConfig); SuccessOrExit(err); diff --git a/src/platform/Infineon/PSOC6/OTAImageProcessorImpl.cpp b/src/platform/Infineon/PSOC6/OTAImageProcessorImpl.cpp index d47434a80d..b6b3dfb9ed 100644 --- a/src/platform/Infineon/PSOC6/OTAImageProcessorImpl.cpp +++ b/src/platform/Infineon/PSOC6/OTAImageProcessorImpl.cpp @@ -68,7 +68,7 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & block) // If we have not received all the bytes of the OTAImageHeader yet, that is OK. // Return CHIP_NO_ERROR and expect that future blocks will contain the rest. - ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); // If there is some error other than "too small", return that so future // processing will be aborted. @@ -107,10 +107,10 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessBlock(ByteSpan & block) bool OTAImageProcessorImpl::IsFirstImageRun() { OTARequestorInterface * requestor = GetRequestorInstance(); - ReturnErrorCodeIf(requestor == nullptr, false); + VerifyOrReturnError(requestor != nullptr, false); uint32_t currentVersion; - ReturnErrorCodeIf(ConfigurationMgr().GetSoftwareVersion(currentVersion) != CHIP_NO_ERROR, false); + VerifyOrReturnError(ConfigurationMgr().GetSoftwareVersion(currentVersion) == CHIP_NO_ERROR, false); ChipLogProgress(SoftwareUpdate, "%ld", currentVersion); ChipLogProgress(SoftwareUpdate, "%ld", requestor->GetTargetVersion()); diff --git a/src/platform/Infineon/PSOC6/PSOC6Utils.cpp b/src/platform/Infineon/PSOC6/PSOC6Utils.cpp index c65a29f6a9..3b1b906aa6 100644 --- a/src/platform/Infineon/PSOC6/PSOC6Utils.cpp +++ b/src/platform/Infineon/PSOC6/PSOC6Utils.cpp @@ -335,7 +335,7 @@ CHIP_ERROR PSOC6Utils::GetWiFiStationProvision(Internal::DeviceNetworkInfo & net netInfo.NetworkId = kWiFiStationNetworkId; netInfo.FieldPresent.NetworkId = true; memcpy(netInfo.WiFiSSID, stationConfig.sta.ssid, - min(strlen(reinterpret_cast(stationConfig.sta.ssid)) + 1, sizeof(netInfo.WiFiSSID))); + std::min(strlen(reinterpret_cast(stationConfig.sta.ssid)) + 1, sizeof(netInfo.WiFiSSID))); // Enforce that netInfo wifiSSID is null terminated netInfo.WiFiSSID[kMaxWiFiSSIDLength] = '\0'; @@ -343,7 +343,7 @@ CHIP_ERROR PSOC6Utils::GetWiFiStationProvision(Internal::DeviceNetworkInfo & net if (includeCredentials) { static_assert(sizeof(netInfo.WiFiKey) < 255, "Our min might not fit in netInfo.WiFiKeyLen"); - netInfo.WiFiKeyLen = static_cast(min(strlen((char *) stationConfig.sta.password), sizeof(netInfo.WiFiKey))); + netInfo.WiFiKeyLen = static_cast(std::min(strlen((char *) stationConfig.sta.password), sizeof(netInfo.WiFiKey))); memcpy(netInfo.WiFiKey, stationConfig.sta.password, netInfo.WiFiKeyLen); } @@ -365,7 +365,7 @@ CHIP_ERROR PSOC6Utils::SetWiFiStationProvision(const Internal::DeviceNetworkInfo SuccessOrExit(err); // Enforce that wifiSSID is null terminated before copying it - memcpy(wifiSSID, netInfo.WiFiSSID, min(netInfoSSIDLen + 1, sizeof(wifiSSID))); + memcpy(wifiSSID, netInfo.WiFiSSID, std::min(netInfoSSIDLen + 1, sizeof(wifiSSID))); if (netInfoSSIDLen + 1 < sizeof(wifiSSID)) { wifiSSID[netInfoSSIDLen] = '\0'; @@ -505,16 +505,16 @@ void PSOC6Utils::populate_wifi_config_t(wifi_config_t * wifi_config, wifi_interf if (interface == WIFI_IF_STA || interface == WIFI_IF_STA_AP) { memset(&wifi_config->sta, 0, sizeof(wifi_config_sta_t)); - memcpy(wifi_config->sta.ssid, ssid, chip::min(strlen((char *) ssid) + 1, sizeof(cy_wcm_ssid_t))); - memcpy(wifi_config->sta.password, password, chip::min(strlen((char *) password) + 1, sizeof(cy_wcm_ssid_t))); + memcpy(wifi_config->sta.ssid, ssid, std::min(strlen((char *) ssid) + 1, sizeof(cy_wcm_ssid_t))); + memcpy(wifi_config->sta.password, password, std::min(strlen((char *) password) + 1, sizeof(cy_wcm_ssid_t))); wifi_config->sta.security = security; } if (interface == WIFI_IF_AP || interface == WIFI_IF_STA_AP) { memset(&wifi_config->ap, 0, sizeof(wifi_config_ap_t)); - memcpy(wifi_config->ap.ssid, ssid, chip::min(strlen((char *) ssid) + 1, sizeof(cy_wcm_ssid_t))); - memcpy(wifi_config->ap.password, password, chip::min(strlen((char *) password) + 1, sizeof(cy_wcm_ssid_t))); + memcpy(wifi_config->ap.ssid, ssid, std::min(strlen((char *) ssid) + 1, sizeof(cy_wcm_ssid_t))); + memcpy(wifi_config->ap.password, password, std::min(strlen((char *) password) + 1, sizeof(cy_wcm_ssid_t))); wifi_config->ap.security = security; } } diff --git a/src/platform/Linux/ConnectivityUtils.cpp b/src/platform/Linux/ConnectivityUtils.cpp index 8084ceca43..1b12bf5edb 100644 --- a/src/platform/Linux/ConnectivityUtils.cpp +++ b/src/platform/Linux/ConnectivityUtils.cpp @@ -272,6 +272,10 @@ InterfaceTypeEnum ConnectivityUtils::GetInterfaceConnectionType(const char * ifn if (ioctl(sock, SIOCETHTOOL, &ifr) != -1) ret = InterfaceTypeEnum::kEthernet; } + else if (strncmp(ifname, "br", 2) == 0) + { + ret = InterfaceTypeEnum::kEthernet; + } close(sock); diff --git a/src/platform/Linux/OTAImageProcessorImpl.cpp b/src/platform/Linux/OTAImageProcessorImpl.cpp index b6fe393e01..207de208ee 100644 --- a/src/platform/Linux/OTAImageProcessorImpl.cpp +++ b/src/platform/Linux/OTAImageProcessorImpl.cpp @@ -226,7 +226,7 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & block) CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(block, header); // Needs more data to decode the header - ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); ReturnErrorOnFailure(error); mParams.totalFileBytes = header.mPayloadSize; diff --git a/src/platform/NuttX/OTAImageProcessorImpl.cpp b/src/platform/NuttX/OTAImageProcessorImpl.cpp index b6fe393e01..207de208ee 100644 --- a/src/platform/NuttX/OTAImageProcessorImpl.cpp +++ b/src/platform/NuttX/OTAImageProcessorImpl.cpp @@ -226,7 +226,7 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & block) CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(block, header); // Needs more data to decode the header - ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); ReturnErrorOnFailure(error); mParams.totalFileBytes = header.mPayloadSize; diff --git a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp index cb0b05a57e..0c1d482f84 100644 --- a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp +++ b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp @@ -95,7 +95,7 @@ CHIP_ERROR GenericThreadDriver::RevertConfiguration() // If no backup could be found, it means that the network configuration has not been modified // since the fail-safe was armed, so return with no error. - ReturnErrorCodeIf(error == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND, CHIP_NO_ERROR); if (!GetEnabled()) { diff --git a/src/platform/OpenThread/GenericThreadBorderRouterDelegate.cpp b/src/platform/OpenThread/GenericThreadBorderRouterDelegate.cpp index b08b0ab473..69676488ad 100644 --- a/src/platform/OpenThread/GenericThreadBorderRouterDelegate.cpp +++ b/src/platform/OpenThread/GenericThreadBorderRouterDelegate.cpp @@ -219,7 +219,7 @@ CHIP_ERROR GenericOpenThreadBorderRouterDelegate::SetPendingDataset(const Thread datasetTlvs.mLength = pendingDataset.AsByteSpan().size(); { ScopedThreadLock threadLock; - ReturnErrorCodeIf(otDatasetSetPendingTlvs(otInst, &datasetTlvs) != OT_ERROR_NONE, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(otDatasetSetPendingTlvs(otInst, &datasetTlvs) == OT_ERROR_NONE, CHIP_ERROR_INTERNAL); } return CHIP_NO_ERROR; } diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp index 6916c096c9..f15e22252d 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp @@ -1798,7 +1798,7 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread::FromOtDnsRespons entryIndex++; } - ReturnErrorCodeIf(alloc.AnyAllocFailed(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(!alloc.AnyAllocFailed(), CHIP_ERROR_BUFFER_TOO_SMALL); mdnsService.mTextEntries = serviceTxtEntries.mTxtEntries; mdnsService.mTextEntrySize = entryIndex; diff --git a/src/platform/OpenThread/OpenThreadDnssdImpl.cpp b/src/platform/OpenThread/OpenThreadDnssdImpl.cpp index f5b0a85f2d..79a8608091 100644 --- a/src/platform/OpenThread/OpenThreadDnssdImpl.cpp +++ b/src/platform/OpenThread/OpenThreadDnssdImpl.cpp @@ -47,7 +47,7 @@ const char * GetProtocolString(DnssdServiceProtocol protocol) CHIP_ERROR OpenThreadDnssdPublishService(const DnssdService * service, DnssdPublishCallback callback, void * context) { #if CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT - ReturnErrorCodeIf(service == nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(service != nullptr, CHIP_ERROR_INVALID_ARGUMENT); if (strcmp(service->mHostName, "") != 0) { ReturnErrorOnFailure(ThreadStackMgr().SetupSrpHost(service->mHostName)); diff --git a/src/platform/Tizen/BLEManagerImpl.cpp b/src/platform/Tizen/BLEManagerImpl.cpp index 046d687c50..8bf2fa63ff 100644 --- a/src/platform/Tizen/BLEManagerImpl.cpp +++ b/src/platform/Tizen/BLEManagerImpl.cpp @@ -507,7 +507,7 @@ void BLEManagerImpl::OnDeviceScanned(const bt_adapter_le_device_scan_result_info /* Initiate Connect */ auto params = std::make_pair(this, scanInfo.remote_address); PlatformMgrImpl().GLibMatterContextInvokeSync( - +[](typeof(params) * aParams) { return aParams->first->ConnectChipThing(aParams->second); }, ¶ms); + +[](decltype(params) * aParams) { return aParams->first->ConnectChipThing(aParams->second); }, ¶ms); } void BLEManagerImpl::OnScanComplete() diff --git a/src/platform/Tizen/ConnectivityManagerImpl.cpp b/src/platform/Tizen/ConnectivityManagerImpl.cpp index 37a15bb954..063765687b 100644 --- a/src/platform/Tizen/ConnectivityManagerImpl.cpp +++ b/src/platform/Tizen/ConnectivityManagerImpl.cpp @@ -115,7 +115,7 @@ ConnectivityManager::WiFiStationMode ConnectivityManagerImpl::_GetWiFiStationMod CHIP_ERROR err = CHIP_NO_ERROR; wifi_manager_device_state_e deviceState = WIFI_MANAGER_DEVICE_STATE_DEACTIVATED; - ReturnErrorCodeIf(mWiFiStationMode == kWiFiStationMode_ApplicationControlled, mWiFiStationMode); + VerifyOrReturnError(mWiFiStationMode != kWiFiStationMode_ApplicationControlled, mWiFiStationMode); err = Internal::WiFiMgr().GetDeviceState(&deviceState); VerifyOrReturnError(err == CHIP_NO_ERROR, mWiFiStationMode); @@ -130,7 +130,7 @@ CHIP_ERROR ConnectivityManagerImpl::_SetWiFiStationMode(ConnectivityManager::WiF CHIP_ERROR err = CHIP_NO_ERROR; wifi_manager_device_state_e deviceState = WIFI_MANAGER_DEVICE_STATE_DEACTIVATED; - ReturnErrorCodeIf(val == kWiFiStationMode_NotSupported, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(val != kWiFiStationMode_NotSupported, CHIP_ERROR_INVALID_ARGUMENT); if (val != kWiFiStationMode_ApplicationControlled) { diff --git a/src/platform/Zephyr/BLEAdvertisingArbiter.cpp b/src/platform/Zephyr/BLEAdvertisingArbiter.cpp index 4356ba9aa1..0fafdba944 100644 --- a/src/platform/Zephyr/BLEAdvertisingArbiter.cpp +++ b/src/platform/Zephyr/BLEAdvertisingArbiter.cpp @@ -56,7 +56,7 @@ CHIP_ERROR RestartAdvertising() { // Note: bt_le_adv_stop() returns success when the advertising was not started ReturnErrorOnFailure(System::MapErrorZephyr(bt_le_adv_stop())); - ReturnErrorCodeIf(sys_slist_is_empty(&sRequests), CHIP_NO_ERROR); + VerifyOrReturnError(!sys_slist_is_empty(&sRequests), CHIP_NO_ERROR); const Request & top = ToRequest(sys_slist_peek_head(&sRequests)); bt_le_adv_param params = BT_LE_ADV_PARAM_INIT(top.options, top.minInterval, top.maxInterval, nullptr); diff --git a/src/platform/Zephyr/KeyValueStoreManagerImpl.cpp b/src/platform/Zephyr/KeyValueStoreManagerImpl.cpp index 03c82341a8..95c004e7f7 100644 --- a/src/platform/Zephyr/KeyValueStoreManagerImpl.cpp +++ b/src/platform/Zephyr/KeyValueStoreManagerImpl.cpp @@ -195,9 +195,9 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Delete(const char * key) char fullKey[SETTINGS_MAX_NAME_LEN + 1]; ReturnErrorOnFailure(MakeFullKey(fullKey, key)); - ReturnErrorCodeIf(Get(key, nullptr, 0) == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND, - CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); - ReturnErrorCodeIf(settings_delete(fullKey) != 0, CHIP_ERROR_PERSISTED_STORAGE_FAILED); + VerifyOrReturnError(Get(key, nullptr, 0) != CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND, + CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(settings_delete(fullKey) == 0, CHIP_ERROR_PERSISTED_STORAGE_FAILED); return CHIP_NO_ERROR; } diff --git a/src/platform/Zephyr/SystemTimeSupport.cpp b/src/platform/Zephyr/SystemTimeSupport.cpp index c9ebdf7da2..fc9485556a 100644 --- a/src/platform/Zephyr/SystemTimeSupport.cpp +++ b/src/platform/Zephyr/SystemTimeSupport.cpp @@ -63,7 +63,7 @@ CHIP_ERROR ClockImpl::GetClock_RealTime(Microseconds64 & aCurTime) { // The real time can be configured by an application if it has access to a reliable time source. // Otherwise, just return an error so that Matter stack can fallback to Last Known UTC Time. - ReturnErrorCodeIf(gBootRealTime == kUnknownRealTime, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(gBootRealTime != kUnknownRealTime, CHIP_ERROR_INCORRECT_STATE); aCurTime = gBootRealTime + GetMonotonicMicroseconds64(); diff --git a/src/platform/android/AndroidConfig.cpp b/src/platform/android/AndroidConfig.cpp index afca2b43f3..e3e7f3a58b 100644 --- a/src/platform/android/AndroidConfig.cpp +++ b/src/platform/android/AndroidConfig.cpp @@ -196,11 +196,11 @@ CHIP_ERROR AndroidConfig::ReadConfigValue(Key key, uint32_t & val) CHIP_ERROR AndroidConfig::ReadConfigValue(Key key, uint64_t & val) { chip::DeviceLayer::StackUnlock unlock; - ReturnErrorCodeIf(!gAndroidConfigObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(gReadConfigValueLongMethod == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(gAndroidConfigObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(gReadConfigValueLongMethod != nullptr, CHIP_ERROR_INCORRECT_STATE); JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - ReturnErrorCodeIf(env == nullptr, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(env != nullptr, CHIP_ERROR_INTERNAL); UtfString space(env, key.Namespace); UtfString name(env, key.Name); @@ -223,11 +223,11 @@ CHIP_ERROR AndroidConfig::ReadConfigValue(Key key, uint64_t & val) CHIP_ERROR AndroidConfig::ReadConfigValueStr(Key key, char * buf, size_t bufSize, size_t & outLen) { chip::DeviceLayer::StackUnlock unlock; - ReturnErrorCodeIf(!gAndroidConfigObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(gReadConfigValueStrMethod == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(gAndroidConfigObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(gReadConfigValueStrMethod != nullptr, CHIP_ERROR_INCORRECT_STATE); JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - ReturnErrorCodeIf(env == nullptr, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(env != nullptr, CHIP_ERROR_INTERNAL); UtfString space(env, key.Namespace); UtfString name(env, key.Name); @@ -253,11 +253,11 @@ CHIP_ERROR AndroidConfig::ReadConfigValueStr(Key key, char * buf, size_t bufSize CHIP_ERROR AndroidConfig::ReadConfigValueBin(Key key, uint8_t * buf, size_t bufSize, size_t & outLen) { chip::DeviceLayer::StackUnlock unlock; - ReturnErrorCodeIf(!gAndroidConfigObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(gReadConfigValueBinMethod == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(gAndroidConfigObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(gReadConfigValueBinMethod != nullptr, CHIP_ERROR_INCORRECT_STATE); JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - ReturnErrorCodeIf(env == nullptr, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(env != nullptr, CHIP_ERROR_INTERNAL); UtfString space(env, key.Namespace); UtfString name(env, key.Name); @@ -280,7 +280,7 @@ CHIP_ERROR AndroidConfig::ReadConfigValueBin(Key key, uint8_t * buf, size_t bufS } outLen = static_cast(env->GetArrayLength(javaValue)); - memcpy(buf, elements, min(outLen, bufSize)); + memcpy(buf, elements, std::min(outLen, bufSize)); env->ReleaseByteArrayElements(javaValue, elements, 0); @@ -300,11 +300,11 @@ CHIP_ERROR AndroidConfig::WriteConfigValue(Key key, uint32_t val) CHIP_ERROR AndroidConfig::WriteConfigValue(Key key, uint64_t val) { chip::DeviceLayer::StackUnlock unlock; - ReturnErrorCodeIf(!gAndroidConfigObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(gWriteConfigValueLongMethod == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(gAndroidConfigObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(gWriteConfigValueLongMethod != nullptr, CHIP_ERROR_INCORRECT_STATE); JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - ReturnErrorCodeIf(env == nullptr, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(env != nullptr, CHIP_ERROR_INTERNAL); UtfString space(env, key.Namespace); UtfString name(env, key.Name); @@ -325,11 +325,11 @@ CHIP_ERROR AndroidConfig::WriteConfigValue(Key key, uint64_t val) CHIP_ERROR AndroidConfig::WriteConfigValueStr(Key key, const char * str) { chip::DeviceLayer::StackUnlock unlock; - ReturnErrorCodeIf(!gAndroidConfigObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(gWriteConfigValueStrMethod == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(gAndroidConfigObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(gWriteConfigValueStrMethod != nullptr, CHIP_ERROR_INCORRECT_STATE); JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - ReturnErrorCodeIf(env == nullptr, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(env != nullptr, CHIP_ERROR_INTERNAL); UtfString space(env, key.Namespace); UtfString name(env, key.Name); @@ -376,12 +376,12 @@ CHIP_ERROR AndroidConfig::WriteConfigValueStr(Key key, const char * str, size_t CHIP_ERROR AndroidConfig::WriteConfigValueBin(Key key, const uint8_t * data, size_t dataLen) { chip::DeviceLayer::StackUnlock unlock; - ReturnErrorCodeIf(!gAndroidConfigObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(gWriteConfigValueBinMethod == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(gAndroidConfigObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(gWriteConfigValueBinMethod != nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(chip::CanCastTo(dataLen), CHIP_ERROR_INVALID_ARGUMENT); JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - ReturnErrorCodeIf(env == nullptr, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(env != nullptr, CHIP_ERROR_INTERNAL); UtfString space(env, key.Namespace); UtfString name(env, key.Name); @@ -403,11 +403,11 @@ CHIP_ERROR AndroidConfig::WriteConfigValueBin(Key key, const uint8_t * data, siz CHIP_ERROR AndroidConfig::ClearConfigValue(Key key) { chip::DeviceLayer::StackUnlock unlock; - ReturnErrorCodeIf(!gAndroidConfigObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(gClearConfigValueMethod == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(gAndroidConfigObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(gClearConfigValueMethod != nullptr, CHIP_ERROR_INCORRECT_STATE); JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - ReturnErrorCodeIf(env == nullptr, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(env != nullptr, CHIP_ERROR_INTERNAL); UtfString space(env, key.Namespace); UtfString name(env, key.Name); @@ -427,11 +427,11 @@ CHIP_ERROR AndroidConfig::ClearConfigValue(Key key) bool AndroidConfig::ConfigValueExists(Key key) { chip::DeviceLayer::StackUnlock unlock; - ReturnErrorCodeIf(!gAndroidConfigObject.HasValidObjectRef(), false); - ReturnErrorCodeIf(gConfigValueExistsMethod == nullptr, false); + VerifyOrReturnError(gAndroidConfigObject.HasValidObjectRef(), false); + VerifyOrReturnError(gConfigValueExistsMethod != nullptr, false); JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - ReturnErrorCodeIf(env == nullptr, false); + VerifyOrReturnError(env != nullptr, false); UtfString space(env, key.Namespace); UtfString name(env, key.Name); diff --git a/src/platform/android/ConfigurationManagerImpl.cpp b/src/platform/android/ConfigurationManagerImpl.cpp index defbb77f89..762e70f607 100644 --- a/src/platform/android/ConfigurationManagerImpl.cpp +++ b/src/platform/android/ConfigurationManagerImpl.cpp @@ -169,7 +169,7 @@ CHIP_ERROR ConfigurationManagerImpl::GetSoftwareVersionString(char * buf, size_t if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) { - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); } @@ -208,7 +208,7 @@ CHIP_ERROR ConfigurationManagerImpl::GetCommissionableDeviceName(char * buf, siz if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) { - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_DEVICE_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_NAME); } diff --git a/src/platform/android/DeviceInstanceInfoProviderImpl.cpp b/src/platform/android/DeviceInstanceInfoProviderImpl.cpp index cd07215c37..3faac5ba05 100644 --- a/src/platform/android/DeviceInstanceInfoProviderImpl.cpp +++ b/src/platform/android/DeviceInstanceInfoProviderImpl.cpp @@ -32,7 +32,8 @@ CHIP_ERROR DeviceInstanceInfoProviderImpl::GetHardwareVersionString(char * buf, hardwareVersionLen); if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) { - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING), + CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING); } @@ -81,7 +82,7 @@ CHIP_ERROR DeviceInstanceInfoProviderImpl::GetProductName(char * buf, size_t buf Internal::AndroidConfig::ReadConfigValueStr(Internal::AndroidConfig::kConfigKey_ProductName, buf, bufSize, productNameSize); if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) { - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME); } return CHIP_NO_ERROR; diff --git a/src/platform/android/DnssdImpl.cpp b/src/platform/android/DnssdImpl.cpp index 290b3497ea..d93ec2c52d 100644 --- a/src/platform/android/DnssdImpl.cpp +++ b/src/platform/android/DnssdImpl.cpp @@ -244,10 +244,10 @@ template CHIP_ERROR extractProtocol(const char * serviceType, char (&outServiceName)[N], DnssdServiceProtocol & outProtocol) { const char * dotPos = strrchr(serviceType, '.'); - ReturnErrorCodeIf(dotPos == nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(dotPos != nullptr, CHIP_ERROR_INVALID_ARGUMENT); size_t lengthWithoutProtocol = static_cast(dotPos - serviceType); - ReturnErrorCodeIf(lengthWithoutProtocol + 1 > N, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(lengthWithoutProtocol + 1 <= N, CHIP_ERROR_INVALID_ARGUMENT); memcpy(outServiceName, serviceType, lengthWithoutProtocol); outServiceName[lengthWithoutProtocol] = '\0'; // Set a null terminator @@ -267,7 +267,7 @@ CHIP_ERROR extractProtocol(const char * serviceType, char (&outServiceName)[N], return CHIP_ERROR_INVALID_ARGUMENT; } - ReturnErrorCodeIf(outProtocol == DnssdServiceProtocol::kDnssdProtocolUnknown, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(outProtocol != DnssdServiceProtocol::kDnssdProtocolUnknown, CHIP_ERROR_INVALID_ARGUMENT); return CHIP_NO_ERROR; } diff --git a/src/platform/android/KeyValueStoreManagerImpl.cpp b/src/platform/android/KeyValueStoreManagerImpl.cpp index 658532f652..9d382150ca 100644 --- a/src/platform/android/KeyValueStoreManagerImpl.cpp +++ b/src/platform/android/KeyValueStoreManagerImpl.cpp @@ -80,11 +80,11 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t size_t offset_bytes) { CHIP_ERROR err = CHIP_NO_ERROR; - ReturnErrorCodeIf(!mKeyValueStoreManagerObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(mGetMethod == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mKeyValueStoreManagerObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mGetMethod != nullptr, CHIP_ERROR_INCORRECT_STATE); JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - ReturnErrorCodeIf(env == nullptr, CHIP_JNI_ERROR_NO_ENV); + VerifyOrReturnError(env != nullptr, CHIP_JNI_ERROR_NO_ENV); chip::UtfString javaKey(env, key); @@ -118,7 +118,7 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t ChipLogError(DeviceLayer, "KeyValueStoreManager base64 decoding failed"); return CHIP_ERROR_INTEGRITY_CHECK_FAILED; } - ReturnErrorCodeIf(offset_bytes != 0 && offset_bytes >= decodedLength, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(offset_bytes == 0 || offset_bytes < decodedLength, CHIP_ERROR_INVALID_ARGUMENT); size_t read_size = std::min(value_size, decodedLength - offset_bytes); if (value_size + offset_bytes < decodedLength) { @@ -140,12 +140,12 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value, size_t value_size) { - ReturnErrorCodeIf(!mKeyValueStoreManagerObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(mSetMethod == nullptr, CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(value_size > kMaxKvsValueBytes, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(mKeyValueStoreManagerObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mSetMethod != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(value_size <= kMaxKvsValueBytes, CHIP_ERROR_INVALID_ARGUMENT); JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - ReturnErrorCodeIf(env == nullptr, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(env != nullptr, CHIP_ERROR_INTERNAL); std::unique_ptr buffer(new char[BASE64_ENCODED_LEN(value_size) + 1]); @@ -170,11 +170,11 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value, CHIP_ERROR KeyValueStoreManagerImpl::_Delete(const char * key) { - ReturnErrorCodeIf(!mKeyValueStoreManagerObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(mDeleteMethod == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mKeyValueStoreManagerObject.HasValidObjectRef(), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mDeleteMethod != nullptr, CHIP_ERROR_INCORRECT_STATE); JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - ReturnErrorCodeIf(env == nullptr, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(env != nullptr, CHIP_ERROR_INTERNAL); UtfString javaKey(env, key); diff --git a/src/platform/cc13xx_26xx/FactoryDataProvider.cpp b/src/platform/cc13xx_26xx/FactoryDataProvider.cpp index 695d7e5f75..4244fd48b2 100644 --- a/src/platform/cc13xx_26xx/FactoryDataProvider.cpp +++ b/src/platform/cc13xx_26xx/FactoryDataProvider.cpp @@ -135,8 +135,8 @@ CHIP_ERROR FactoryDataProvider::GetFirmwareInformation(MutableByteSpan & out_fir } CHIP_ERROR FactoryDataProvider::GetDeviceAttestationCert(MutableByteSpan & outBuffer) { - ReturnErrorCodeIf(outBuffer.size() < mFactoryData.dac_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.dac_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(outBuffer.size() >= mFactoryData.dac_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.dac_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(outBuffer.data(), mFactoryData.dac_cert.data, mFactoryData.dac_cert.len); outBuffer.reduce_size(mFactoryData.dac_cert.len); @@ -145,8 +145,8 @@ CHIP_ERROR FactoryDataProvider::GetDeviceAttestationCert(MutableByteSpan & outBu CHIP_ERROR FactoryDataProvider::GetProductAttestationIntermediateCert(MutableByteSpan & outBuffer) { - ReturnErrorCodeIf(outBuffer.size() < mFactoryData.pai_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.pai_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(outBuffer.size() >= mFactoryData.pai_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.pai_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(outBuffer.data(), mFactoryData.pai_cert.data, mFactoryData.pai_cert.len); outBuffer.reduce_size(mFactoryData.pai_cert.len); @@ -165,7 +165,7 @@ CHIP_ERROR FactoryDataProvider::SignWithDeviceAttestationKey(const ByteSpan & me // Extract public key from DAC cert. uint8_t dacBuf[600] = { 0 }; MutableByteSpan dacCertSpan(dacBuf); - ReturnErrorCodeIf(dacCertSpan.size() < mFactoryData.dac_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(dacCertSpan.size() >= mFactoryData.dac_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(dacCertSpan.data(), mFactoryData.dac_cert.data, mFactoryData.dac_cert.len); dacCertSpan.reduce_size(mFactoryData.dac_cert.len); chip::Crypto::P256PublicKey dacPublicKey; @@ -174,13 +174,13 @@ CHIP_ERROR FactoryDataProvider::SignWithDeviceAttestationKey(const ByteSpan & me uint8_t privKeyBuf[600] = { 0 }; MutableByteSpan privKeySpan(privKeyBuf); - ReturnErrorCodeIf(privKeySpan.size() < mFactoryData.dac_priv_key.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(privKeySpan.size() >= mFactoryData.dac_priv_key.len, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(privKeySpan.data(), mFactoryData.dac_priv_key.data, mFactoryData.dac_priv_key.len); privKeySpan.reduce_size(mFactoryData.dac_priv_key.len); uint8_t pubKeyBuf[600] = { 0 }; MutableByteSpan pubKeySpan(pubKeyBuf); - ReturnErrorCodeIf(pubKeySpan.size() < dacPublicKey.Length(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(pubKeySpan.size() >= dacPublicKey.Length(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(pubKeySpan.data(), dacPublicKey.Bytes(), dacPublicKey.Length()); pubKeySpan.reduce_size(dacPublicKey.Length()); @@ -191,8 +191,8 @@ CHIP_ERROR FactoryDataProvider::SignWithDeviceAttestationKey(const ByteSpan & me } CHIP_ERROR FactoryDataProvider::GetSetupDiscriminator(uint16_t & setupDiscriminator) { - ReturnErrorCodeIf(sizeof(setupDiscriminator) < mFactoryData.discriminator.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.discriminator.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(sizeof(setupDiscriminator) >= mFactoryData.discriminator.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.discriminator.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(&setupDiscriminator, mFactoryData.discriminator.data, mFactoryData.discriminator.len); return CHIP_NO_ERROR; } @@ -202,24 +202,24 @@ CHIP_ERROR FactoryDataProvider::SetSetupDiscriminator(uint16_t setupDiscriminato } CHIP_ERROR FactoryDataProvider::GetSpake2pIterationCount(uint32_t & iterationCount) { - ReturnErrorCodeIf(sizeof(iterationCount) < mFactoryData.spake2p_it.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.spake2p_it.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(sizeof(iterationCount) >= mFactoryData.spake2p_it.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.spake2p_it.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memset(&iterationCount, 0, sizeof(iterationCount)); memcpy(&iterationCount, mFactoryData.spake2p_it.data, mFactoryData.spake2p_it.len); return CHIP_NO_ERROR; } CHIP_ERROR FactoryDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) { - ReturnErrorCodeIf(saltBuf.size() < mFactoryData.spake2p_salt.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.spake2p_salt.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(saltBuf.size() >= mFactoryData.spake2p_salt.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.spake2p_salt.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(saltBuf.data(), mFactoryData.spake2p_salt.data, mFactoryData.spake2p_salt.len); saltBuf.reduce_size(mFactoryData.spake2p_salt.len); return CHIP_NO_ERROR; } CHIP_ERROR FactoryDataProvider::GetSpake2pVerifier(MutableByteSpan & verifierBuf, size_t & verifierLen) { - ReturnErrorCodeIf(verifierBuf.size() < mFactoryData.spake2p_verifier.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.spake2p_verifier.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(verifierBuf.size() >= mFactoryData.spake2p_verifier.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.spake2p_verifier.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(verifierBuf.data(), mFactoryData.spake2p_verifier.data, mFactoryData.spake2p_verifier.len); verifierLen = mFactoryData.spake2p_verifier.len; verifierBuf.reduce_size(verifierLen); @@ -227,8 +227,8 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pVerifier(MutableByteSpan & verifierBuf } CHIP_ERROR FactoryDataProvider::GetSetupPasscode(uint32_t & setupPasscode) { - ReturnErrorCodeIf(sizeof(setupPasscode) < mFactoryData.passcode.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.passcode.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(sizeof(setupPasscode) >= mFactoryData.passcode.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.passcode.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(&setupPasscode, mFactoryData.passcode.data, mFactoryData.passcode.len); return CHIP_NO_ERROR; } @@ -238,23 +238,23 @@ CHIP_ERROR FactoryDataProvider::SetSetupPasscode(uint32_t setupPasscode) } CHIP_ERROR FactoryDataProvider::GetVendorName(char * buf, size_t bufSize) { - ReturnErrorCodeIf(bufSize < mFactoryData.vendor_name.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.vendor_name.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(bufSize >= mFactoryData.vendor_name.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.vendor_name.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(buf, mFactoryData.vendor_name.data, mFactoryData.vendor_name.len); buf[mFactoryData.vendor_name.len] = '\0'; return CHIP_NO_ERROR; } CHIP_ERROR FactoryDataProvider::GetVendorId(uint16_t & vendorId) { - ReturnErrorCodeIf(sizeof(vendorId) < mFactoryData.vendor_id.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.vendor_id.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(sizeof(vendorId) >= mFactoryData.vendor_id.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.vendor_id.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(&vendorId, mFactoryData.vendor_id.data, mFactoryData.vendor_id.len); return CHIP_NO_ERROR; } CHIP_ERROR FactoryDataProvider::GetProductName(char * buf, size_t bufSize) { - ReturnErrorCodeIf(bufSize < mFactoryData.product_name.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.product_name.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(bufSize >= mFactoryData.product_name.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.product_name.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memset(buf, 0, bufSize); memcpy(buf, mFactoryData.product_name.data, mFactoryData.product_name.len); buf[mFactoryData.product_name.len] = '\0'; @@ -262,8 +262,8 @@ CHIP_ERROR FactoryDataProvider::GetProductName(char * buf, size_t bufSize) } CHIP_ERROR FactoryDataProvider::GetProductId(uint16_t & productId) { - ReturnErrorCodeIf(sizeof(productId) < mFactoryData.product_id.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.product_id.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(sizeof(productId) >= mFactoryData.product_id.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.product_id.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(&productId, mFactoryData.product_id.data, mFactoryData.product_id.len); return CHIP_NO_ERROR; } @@ -282,8 +282,8 @@ CHIP_ERROR FactoryDataProvider::GetProductLabel(char * buf, size_t bufSize) CHIP_ERROR FactoryDataProvider::GetSerialNumber(char * buf, size_t bufSize) { - ReturnErrorCodeIf(bufSize < mFactoryData.serial_number.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.serial_number.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(bufSize >= mFactoryData.serial_number.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.serial_number.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memset(buf, 0, bufSize); memcpy(buf, mFactoryData.serial_number.data, mFactoryData.serial_number.len); buf[mFactoryData.serial_number.len] = '\0'; @@ -292,7 +292,7 @@ CHIP_ERROR FactoryDataProvider::GetSerialNumber(char * buf, size_t bufSize) CHIP_ERROR FactoryDataProvider::GetManufacturingDate(uint16_t & year, uint8_t & month, uint8_t & day) { - ReturnErrorCodeIf(!mFactoryData.manufacturing_date.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(mFactoryData.manufacturing_date.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); uint8_t tmp[10] = { 0 }; memcpy(tmp, mFactoryData.manufacturing_date.data, 10); year = ((tmp[0] - 0x30) * 1000) + ((tmp[1] - 0x30) * 100) + ((tmp[2] - 0x30) * 10) + (tmp[3] - 0x30); @@ -303,15 +303,15 @@ CHIP_ERROR FactoryDataProvider::GetManufacturingDate(uint16_t & year, uint8_t & CHIP_ERROR FactoryDataProvider::GetHardwareVersion(uint16_t & hardwareVersion) { - ReturnErrorCodeIf(sizeof(hardwareVersion) < mFactoryData.hw_ver.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.hw_ver.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(sizeof(hardwareVersion) >= mFactoryData.hw_ver.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.hw_ver.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(&hardwareVersion, mFactoryData.hw_ver.data, mFactoryData.hw_ver.len); return CHIP_NO_ERROR; } CHIP_ERROR FactoryDataProvider::GetHardwareVersionString(char * buf, size_t bufSize) { - ReturnErrorCodeIf(bufSize < mFactoryData.hw_ver_str.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.hw_ver_str.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(bufSize >= mFactoryData.hw_ver_str.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.hw_ver_str.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memset(buf, 0, bufSize); memcpy(buf, mFactoryData.hw_ver_str.data, mFactoryData.hw_ver_str.len); buf[mFactoryData.hw_ver_str.len] = '\0'; @@ -321,8 +321,8 @@ CHIP_ERROR FactoryDataProvider::GetHardwareVersionString(char * buf, size_t bufS CHIP_ERROR FactoryDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) { - ReturnErrorCodeIf(uniqueIdSpan.size() < mFactoryData.rd_uniqueid.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.rd_uniqueid.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(uniqueIdSpan.size() >= mFactoryData.rd_uniqueid.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.rd_uniqueid.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(uniqueIdSpan.data(), mFactoryData.rd_uniqueid.data, mFactoryData.rd_uniqueid.len); uniqueIdSpan.reduce_size(mFactoryData.rd_uniqueid.len); diff --git a/src/platform/mt793x/DnssdContexts.cpp b/src/platform/mt793x/DnssdContexts.cpp index c554c01916..5c0e6a0405 100644 --- a/src/platform/mt793x/DnssdContexts.cpp +++ b/src/platform/mt793x/DnssdContexts.cpp @@ -451,7 +451,7 @@ void ResolveContext::OnNewInterface(uint32_t interfaceId, const char * fullname, size_t len = *txtRecordIter; ++txtRecordIter; --remainingLen; - len = min(len, remainingLen); + len = std::min(len, remainingLen); chip::Span bytes(txtRecordIter, len); if (txtString.size() > 0) { diff --git a/src/platform/mt793x/OTAImageProcessorImpl.cpp b/src/platform/mt793x/OTAImageProcessorImpl.cpp index 98685242aa..03a1d87dcc 100644 --- a/src/platform/mt793x/OTAImageProcessorImpl.cpp +++ b/src/platform/mt793x/OTAImageProcessorImpl.cpp @@ -255,7 +255,7 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & block) CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(block, header); // Needs more data to decode the header - ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); ReturnErrorOnFailure(error); ChipLogProgress(SoftwareUpdate, "Image Header software version: %ld payload size: %lu", header.mSoftwareVersion, (long unsigned int) header.mPayloadSize); diff --git a/src/platform/nrfconnect/DeviceInstanceInfoProviderImpl.cpp b/src/platform/nrfconnect/DeviceInstanceInfoProviderImpl.cpp index ed4f2124ed..1d30d5a9d3 100644 --- a/src/platform/nrfconnect/DeviceInstanceInfoProviderImpl.cpp +++ b/src/platform/nrfconnect/DeviceInstanceInfoProviderImpl.cpp @@ -28,13 +28,13 @@ CHIP_ERROR DeviceInstanceInfoProviderImpl::GetRotatingDeviceIdUniqueId(MutableBy static_assert(ConfigurationManager::kRotatingDeviceIDUniqueIDLength >= ConfigurationManager::kMinRotatingDeviceIDUniqueIDLength, "Length of unique ID for rotating device ID is smaller than minimum."); - ReturnErrorCodeIf(ConfigurationManager::kRotatingDeviceIDUniqueIDLength > uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(ConfigurationManager::kRotatingDeviceIDUniqueIDLength <= uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); size_t bytesLen = chip::Encoding::HexToBytes(CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID, ConfigurationManager::kRotatingDeviceIDUniqueIDLength * 2, uniqueIdSpan.data(), uniqueIdSpan.size()); - ReturnErrorCodeIf(bytesLen != ConfigurationManager::kRotatingDeviceIDUniqueIDLength, CHIP_ERROR_INVALID_STRING_LENGTH); + VerifyOrReturnError(bytesLen == ConfigurationManager::kRotatingDeviceIDUniqueIDLength, CHIP_ERROR_INVALID_STRING_LENGTH); uniqueIdSpan.reduce_size(bytesLen); return CHIP_NO_ERROR; diff --git a/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.cpp b/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.cpp index e71e6e392c..2c4b3b4ff9 100644 --- a/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.cpp +++ b/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.cpp @@ -46,7 +46,7 @@ CHIP_ERROR DiagnosticDataProviderImplNrf::GetWiFiBssId(MutableByteSpan & value) { WiFiManager::WiFiInfo info; ReturnErrorOnFailure(WiFiManager::Instance().GetWiFiInfo(info)); - ReturnErrorCodeIf(sizeof(info.mBssId) >= value.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(sizeof(info.mBssId) < value.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(value.data(), info.mBssId, sizeof(info.mBssId)); value.reduce_size(sizeof(info.mBssId)); diff --git a/src/platform/nrfconnect/FactoryDataProvider.cpp b/src/platform/nrfconnect/FactoryDataProvider.cpp index aaa6f4b93e..a93239ac98 100644 --- a/src/platform/nrfconnect/FactoryDataProvider.cpp +++ b/src/platform/nrfconnect/FactoryDataProvider.cpp @@ -40,8 +40,8 @@ CHIP_ERROR LoadKeypairFromRaw(ByteSpan privateKey, ByteSpan publicKey, Crypto::P CHIP_ERROR GetFactoryDataString(const FactoryDataString & str, char * buf, size_t bufSize) { - ReturnErrorCodeIf(bufSize < str.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!str.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(bufSize >= str.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(str.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(buf, str.data, str.len); buf[str.len] = 0; @@ -128,8 +128,8 @@ CHIP_ERROR FactoryDataProvider::GetFirmwareInformation(Mutable template CHIP_ERROR FactoryDataProvider::GetDeviceAttestationCert(MutableByteSpan & outBuffer) { - ReturnErrorCodeIf(outBuffer.size() < mFactoryData.dac_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.dac_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(outBuffer.size() >= mFactoryData.dac_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.dac_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(outBuffer.data(), mFactoryData.dac_cert.data, mFactoryData.dac_cert.len); @@ -141,8 +141,8 @@ CHIP_ERROR FactoryDataProvider::GetDeviceAttestationCert(Mutab template CHIP_ERROR FactoryDataProvider::GetProductAttestationIntermediateCert(MutableByteSpan & outBuffer) { - ReturnErrorCodeIf(outBuffer.size() < mFactoryData.pai_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.pai_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(outBuffer.size() >= mFactoryData.pai_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.pai_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(outBuffer.data(), mFactoryData.pai_cert.data, mFactoryData.pai_cert.len); @@ -234,7 +234,7 @@ CHIP_ERROR FactoryDataProvider::SetSetupDiscriminator(uint16_t template CHIP_ERROR FactoryDataProvider::GetSpake2pIterationCount(uint32_t & iterationCount) { - ReturnErrorCodeIf(mFactoryData.spake2_it == 0, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(mFactoryData.spake2_it != 0, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); iterationCount = mFactoryData.spake2_it; return CHIP_NO_ERROR; } @@ -242,8 +242,8 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pIterationCount(uint3 template CHIP_ERROR FactoryDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) { - ReturnErrorCodeIf(saltBuf.size() < mFactoryData.spake2_salt.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.spake2_salt.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(saltBuf.size() >= mFactoryData.spake2_salt.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.spake2_salt.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(saltBuf.data(), mFactoryData.spake2_salt.data, mFactoryData.spake2_salt.len); @@ -255,8 +255,8 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pSalt(MutableByteSpan template CHIP_ERROR FactoryDataProvider::GetSpake2pVerifier(MutableByteSpan & verifierBuf, size_t & verifierLen) { - ReturnErrorCodeIf(verifierBuf.size() < mFactoryData.spake2_verifier.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.spake2_verifier.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(verifierBuf.size() >= mFactoryData.spake2_verifier.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.spake2_verifier.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(verifierBuf.data(), mFactoryData.spake2_verifier.data, mFactoryData.spake2_verifier.len); @@ -270,7 +270,7 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pVerifier(MutableByte template CHIP_ERROR FactoryDataProvider::GetSetupPasscode(uint32_t & setupPasscode) { - ReturnErrorCodeIf(mFactoryData.passcode == 0, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(mFactoryData.passcode != 0, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); setupPasscode = mFactoryData.passcode; return CHIP_NO_ERROR; } @@ -360,8 +360,8 @@ CHIP_ERROR FactoryDataProvider::GetHardwareVersionString(char template CHIP_ERROR FactoryDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) { - ReturnErrorCodeIf(uniqueIdSpan.size() < mFactoryData.rd_uid.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.rd_uid.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(uniqueIdSpan.size() >= mFactoryData.rd_uid.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.rd_uid.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(uniqueIdSpan.data(), mFactoryData.rd_uid.data, mFactoryData.rd_uid.len); @@ -373,8 +373,8 @@ CHIP_ERROR FactoryDataProvider::GetRotatingDeviceIdUniqueId(Mu template CHIP_ERROR FactoryDataProvider::GetEnableKey(MutableByteSpan & enableKey) { - ReturnErrorCodeIf(!mFactoryData.enable_key.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); - ReturnErrorCodeIf(enableKey.size() < mFactoryData.enable_key.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.enable_key.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(enableKey.size() >= mFactoryData.enable_key.len, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(enableKey.data(), mFactoryData.enable_key.data, mFactoryData.enable_key.len); @@ -386,8 +386,8 @@ CHIP_ERROR FactoryDataProvider::GetEnableKey(MutableByteSpan & template CHIP_ERROR FactoryDataProvider::GetProductFinish(app::Clusters::BasicInformation::ProductFinishEnum * finish) { - ReturnErrorCodeIf(!finish, CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(!mFactoryData.productFinishPresent, CHIP_ERROR_NOT_IMPLEMENTED); + VerifyOrReturnError(finish, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(mFactoryData.productFinishPresent, CHIP_ERROR_NOT_IMPLEMENTED); *finish = static_cast(mFactoryData.product_finish); return CHIP_NO_ERROR; @@ -396,8 +396,8 @@ CHIP_ERROR FactoryDataProvider::GetProductFinish(app::Clusters template CHIP_ERROR FactoryDataProvider::GetProductPrimaryColor(app::Clusters::BasicInformation::ColorEnum * primaryColor) { - ReturnErrorCodeIf(!primaryColor, CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(!mFactoryData.primaryColorPresent, CHIP_ERROR_NOT_IMPLEMENTED); + VerifyOrReturnError(primaryColor, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(mFactoryData.primaryColorPresent, CHIP_ERROR_NOT_IMPLEMENTED); *primaryColor = static_cast(mFactoryData.primary_color); @@ -407,8 +407,8 @@ CHIP_ERROR FactoryDataProvider::GetProductPrimaryColor(app::Cl template CHIP_ERROR FactoryDataProvider::GetUserData(MutableByteSpan & userData) { - ReturnErrorCodeIf(!mFactoryData.user.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); - ReturnErrorCodeIf(userData.size() < mFactoryData.user.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.user.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(userData.size() >= mFactoryData.user.len, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(userData.data(), mFactoryData.user.data, mFactoryData.user.len); @@ -420,12 +420,12 @@ CHIP_ERROR FactoryDataProvider::GetUserData(MutableByteSpan & template CHIP_ERROR FactoryDataProvider::GetUserKey(const char * userKey, void * buf, size_t & len) { - ReturnErrorCodeIf(!mFactoryData.user.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); - ReturnErrorCodeIf(!buf, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.user.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(buf, CHIP_ERROR_BUFFER_TOO_SMALL); bool success = FindUserDataEntry(&mFactoryData, userKey, buf, len, &len); - ReturnErrorCodeIf(!success, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(success, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); return CHIP_NO_ERROR; } diff --git a/src/platform/nrfconnect/OTAImageProcessorImpl.cpp b/src/platform/nrfconnect/OTAImageProcessorImpl.cpp index 357a2aeb8a..f0baf084b0 100644 --- a/src/platform/nrfconnect/OTAImageProcessorImpl.cpp +++ b/src/platform/nrfconnect/OTAImageProcessorImpl.cpp @@ -195,10 +195,10 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessBlock(ByteSpan & aBlock) bool OTAImageProcessorImpl::IsFirstImageRun() { OTARequestorInterface * requestor = GetRequestorInstance(); - ReturnErrorCodeIf(requestor == nullptr, false); + VerifyOrReturnError(requestor != nullptr, false); uint32_t currentVersion; - ReturnErrorCodeIf(ConfigurationMgr().GetSoftwareVersion(currentVersion) != CHIP_NO_ERROR, false); + VerifyOrReturnError(ConfigurationMgr().GetSoftwareVersion(currentVersion) == CHIP_NO_ERROR, false); return requestor->GetCurrentUpdateState() == OTARequestorInterface::OTAUpdateStateEnum::kApplying && requestor->GetTargetVersion() == currentVersion; @@ -218,7 +218,7 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & aBlock) CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(aBlock, header); // Needs more data to decode the header - ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); ReturnErrorOnFailure(error); mParams.totalFileBytes = header.mPayloadSize; diff --git a/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h b/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h index e8d392fb79..c4e77e87b4 100644 --- a/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h +++ b/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h @@ -28,7 +28,11 @@ // ==================== Platform Adaptations ==================== #ifndef CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION +#if CONFIG_CHIP_WIFI || CHIP_DEVICE_CONFIG_ENABLE_WPA +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 1 +#else #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 0 +#endif // CONFIG_CHIP_WIFI || CHIP_DEVICE_CONFIG_ENABLE_WPA #endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION #ifndef CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP diff --git a/src/platform/nxp/common/CHIPNXPPlatformDefaultConfig.h b/src/platform/nxp/common/CHIPNXPPlatformDefaultConfig.h index 0c263fc6ae..c90619bddd 100644 --- a/src/platform/nxp/common/CHIPNXPPlatformDefaultConfig.h +++ b/src/platform/nxp/common/CHIPNXPPlatformDefaultConfig.h @@ -253,3 +253,8 @@ */ #define CHIP_CONFIG_RMP_DEFAULT_MAX_RETRANS 10 #endif + +#ifndef NXP_USE_MML +/* Do not use Memory Manager Light for dynamic memory allocation by default. */ +#define NXP_USE_MML 0 +#endif // NXP_USE_MML diff --git a/src/platform/nxp/common/ConfigurationManagerImpl.cpp b/src/platform/nxp/common/ConfigurationManagerImpl.cpp index 09fb98abac..70912a4d6e 100644 --- a/src/platform/nxp/common/ConfigurationManagerImpl.cpp +++ b/src/platform/nxp/common/ConfigurationManagerImpl.cpp @@ -177,8 +177,8 @@ CHIP_ERROR ConfigurationManagerImpl::GetUniqueId(char * buf, size_t bufSize) ReturnErrorOnFailure(err); - ReturnErrorCodeIf(uniqueIdLen >= bufSize, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(buf[uniqueIdLen] != 0, CHIP_ERROR_INVALID_STRING_LENGTH); + VerifyOrReturnError(uniqueIdLen < bufSize, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(buf[uniqueIdLen] == 0, CHIP_ERROR_INVALID_STRING_LENGTH); return err; } diff --git a/src/platform/nxp/common/DiagnosticDataProviderImpl.cpp b/src/platform/nxp/common/DiagnosticDataProviderImpl.cpp index dd10221748..09d8a7d266 100644 --- a/src/platform/nxp/common/DiagnosticDataProviderImpl.cpp +++ b/src/platform/nxp/common/DiagnosticDataProviderImpl.cpp @@ -42,6 +42,17 @@ extern "C" { } #endif +#if NXP_USE_MML +#include "fsl_component_mem_manager.h" +#define GetFreeHeapSize MEM_GetFreeHeapSize +#define HEAP_SIZE MinimalHeapSize_c +#define GetMinimumEverFreeHeapSize MEM_GetFreeHeapSizeLowWaterMark +#else +#define GetFreeHeapSize xPortGetFreeHeapSize +#define HEAP_SIZE configTOTAL_HEAP_SIZE +#define GetMinimumEverFreeHeapSize xPortGetMinimumEverFreeHeapSize +#endif // NXP_USE_MML + // Not implement into the SDK // extern "C" void xPortResetHeapMinimumEverFreeHeapSize(void); @@ -57,8 +68,8 @@ DiagnosticDataProviderImpl & DiagnosticDataProviderImpl::GetDefaultInstance() CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapFree(uint64_t & currentHeapFree) { size_t freeHeapSize; + freeHeapSize = GetFreeHeapSize(); - freeHeapSize = xPortGetFreeHeapSize(); currentHeapFree = static_cast(freeHeapSize); return CHIP_NO_ERROR; } @@ -68,8 +79,8 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapUsed(uint64_t & currentHeap size_t freeHeapSize; size_t usedHeapSize; - freeHeapSize = xPortGetFreeHeapSize(); - usedHeapSize = configTOTAL_HEAP_SIZE - freeHeapSize; + freeHeapSize = GetFreeHeapSize(); + usedHeapSize = HEAP_SIZE - freeHeapSize; currentHeapUsed = static_cast(usedHeapSize); return CHIP_NO_ERROR; @@ -79,7 +90,8 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapHighWatermark(uint64_t & cu { size_t highWatermarkHeapSize; - highWatermarkHeapSize = configTOTAL_HEAP_SIZE - xPortGetMinimumEverFreeHeapSize(); + highWatermarkHeapSize = HEAP_SIZE - GetMinimumEverFreeHeapSize(); + currentHeapHighWatermark = static_cast(highWatermarkHeapSize); return CHIP_NO_ERROR; } @@ -89,12 +101,16 @@ CHIP_ERROR DiagnosticDataProviderImpl::ResetWatermarks() // If implemented, the server SHALL set the value of the CurrentHeapHighWatermark attribute to the // value of the CurrentHeapUsed. +#if NXP_USE_MML + MEM_ResetFreeHeapSizeLowWaterMark(); + + return CHIP_NO_ERROR; +#else // Not implement into the SDK // xPortResetHeapMinimumEverFreeHeapSize(); - // return CHIP_NO_ERROR; - return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +#endif } CHIP_ERROR DiagnosticDataProviderImpl::GetThreadMetrics(ThreadMetrics ** threadMetricsOut) diff --git a/src/platform/nxp/common/DiagnosticDataProviderImpl.h b/src/platform/nxp/common/DiagnosticDataProviderImpl.h index 5b9fc4c9ae..27b2e35365 100644 --- a/src/platform/nxp/common/DiagnosticDataProviderImpl.h +++ b/src/platform/nxp/common/DiagnosticDataProviderImpl.h @@ -39,6 +39,10 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider static DiagnosticDataProviderImpl & GetDefaultInstance(); // ===== Methods that implement the PlatformManager abstract interface. + +#if NXP_USE_MML + bool SupportsWatermarks() override { return true; } +#endif CHIP_ERROR GetCurrentHeapFree(uint64_t & currentHeapFree) override; CHIP_ERROR GetCurrentHeapUsed(uint64_t & currentHeapUsed) override; CHIP_ERROR GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark) override; diff --git a/src/platform/nxp/common/DnssdImpl.cpp b/src/platform/nxp/common/DnssdImpl.cpp index 4393270178..5b35693534 100644 --- a/src/platform/nxp/common/DnssdImpl.cpp +++ b/src/platform/nxp/common/DnssdImpl.cpp @@ -33,15 +33,25 @@ namespace Dnssd { CHIP_ERROR ChipDnssdInit(DnssdAsyncReturnCallback initCallback, DnssdAsyncReturnCallback errorCallback, void * context) { - NxpChipDnssdInit(initCallback, errorCallback, context); - OpenThreadDnssdInit(initCallback, errorCallback, context); + if (ConnectivityMgr().IsWiFiStationConnected()) + { + ReturnErrorOnFailure(NxpChipDnssdInit(initCallback, errorCallback, context)); + } + else if (ConnectivityMgr().IsThreadProvisioned()) + { + ReturnErrorOnFailure(OpenThreadDnssdInit(initCallback, errorCallback, context)); + } + else + { + initCallback(context, CHIP_ERROR_INCORRECT_STATE); + } return CHIP_NO_ERROR; } void ChipDnssdShutdown() { - NxpChipDnssdShutdown(); + // Empty implementation. Intentionally left blank } CHIP_ERROR ChipDnssdPublishService(const DnssdService * service, DnssdPublishCallback callback, void * context) diff --git a/src/platform/nxp/common/DnssdImplBr.cpp b/src/platform/nxp/common/DnssdImplBr.cpp index 6b84f1f258..5eab86fe19 100644 --- a/src/platform/nxp/common/DnssdImplBr.cpp +++ b/src/platform/nxp/common/DnssdImplBr.cpp @@ -144,23 +144,17 @@ static uint32_t mServiceListFreeIndex; CHIP_ERROR NxpChipDnssdInit(DnssdAsyncReturnCallback initCallback, DnssdAsyncReturnCallback errorCallback, void * context) { - CHIP_ERROR error = CHIP_NO_ERROR; - otInstance * thrInstancePtr = ThreadStackMgrImpl().OTInstance(); - struct netif * extNetif = (ConnectivityManagerImpl().GetExternalInterface()).GetPlatformInterface(); - - // Don't try to do anything until the mDNS server is started - VerifyOrExit(otMdnsIsEnabled(thrInstancePtr), error = CHIP_ERROR_INCORRECT_STATE); + struct netif * extNetif = (ConnectivityManagerImpl().GetExternalInterface()).GetPlatformInterface(); mNetifIndex = netif_get_index(extNetif); + initCallback(context, CHIP_NO_ERROR); -exit: - initCallback(context, error); - return error; + return CHIP_NO_ERROR; } void NxpChipDnssdShutdown() { - otMdnsSetEnabled(ThreadStackMgrImpl().OTInstance(), false, 0); + // Empty implementation. Intentionally left blank } #if USE_MDNS_NEXT_SERVICE_API CHIP_ERROR NxpChipDnssdRemoveServices() @@ -230,7 +224,7 @@ CHIP_ERROR NxpChipDnssdRemoveServices() CHIP_ERROR NxpChipDnssdPublishService(const DnssdService * service, DnssdPublishCallback callback, void * context) { - ReturnErrorCodeIf(service == nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(service != nullptr, CHIP_ERROR_INVALID_ARGUMENT); otInstance * thrInstancePtr = ThreadStackMgrImpl().OTInstance(); uint32_t txtBufferOffset = 0; @@ -640,7 +634,7 @@ CHIP_ERROR FromSrpCacheToMdnsData(const otSrpServerService * service, const otSr entryIndex++; } - ReturnErrorCodeIf(alloc.AnyAllocFailed(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(!alloc.AnyAllocFailed(), CHIP_ERROR_BUFFER_TOO_SMALL); mdnsService.mTextEntries = serviceTxtEntries.mTxtEntries; mdnsService.mTextEntrySize = entryIndex; diff --git a/src/platform/nxp/common/NXPConfigNVS.cpp b/src/platform/nxp/common/NXPConfigNVS.cpp index 4cd997b218..6d0ce459a4 100644 --- a/src/platform/nxp/common/NXPConfigNVS.cpp +++ b/src/platform/nxp/common/NXPConfigNVS.cpp @@ -24,7 +24,7 @@ #include /* Only for flash init, to be move to sdk framework */ -#include "port/nvs_port.h" +#include "nvs_port.h" #if (CHIP_DEVICE_CONFIG_KVS_WEAR_STATS == 1) #include "fwk_nvs_stats.h" #endif /* CHIP_DEVICE_CONFIG_KVS_WEAR_STATS */ @@ -160,11 +160,11 @@ CHIP_ERROR NXPConfig::Init() /* Initialize flash components */ const struct flash_area * fa; - ReturnErrorCodeIf(flash_area_open(SETTINGS_PARTITION, &fa), CHIP_ERROR_PERSISTED_STORAGE_FAILED); - ReturnErrorCodeIf(flash_init(fa->fa_dev), CHIP_ERROR_PERSISTED_STORAGE_FAILED); + VerifyOrReturnError(!flash_area_open(SETTINGS_PARTITION, &fa), CHIP_ERROR_PERSISTED_STORAGE_FAILED); + VerifyOrReturnError(!flash_init(fa->fa_dev), CHIP_ERROR_PERSISTED_STORAGE_FAILED); /* End flash init */ - ReturnErrorCodeIf(settings_subsys_init(), CHIP_ERROR_PERSISTED_STORAGE_FAILED); + VerifyOrReturnError(!settings_subsys_init(), CHIP_ERROR_PERSISTED_STORAGE_FAILED); #if (CHIP_DEVICE_CONFIG_KVS_WEAR_STATS == 1) ReturnErrorOnFailure(InitStorageWearStats()); @@ -183,7 +183,7 @@ CHIP_ERROR NXPConfig::InitStorageWearStats(void) /* Create an empty flash wear profile */ flash_wear_profile = (nvs_storage_wear_profile_t *) calloc(1, flash_wear_profile_size); - ReturnErrorCodeIf(flash_wear_profile == NULL, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(flash_wear_profile != NULL, CHIP_ERROR_NO_MEMORY); /* Try to read the flash wear profile from the User Support diagnostic log key */ CHIP_ERROR err = ReadConfigValueBin((const char *) keyUser, (uint8_t *) flash_wear_profile, flash_wear_profile_size, size); @@ -213,26 +213,26 @@ CHIP_ERROR NXPConfig::InitStorageWearStats(void) CHIP_ERROR NXPConfig::ReadConfigValue(Key key, bool & val) { - ReturnErrorCodeIf(!ValidConfigKey(key), CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id. + VerifyOrReturnError(ValidConfigKey(key), CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id. return ReadSimpleConfigValue(key, val); } CHIP_ERROR NXPConfig::ReadConfigValue(Key key, uint32_t & val) { - ReturnErrorCodeIf(!ValidConfigKey(key), CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id. + VerifyOrReturnError(ValidConfigKey(key), CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id. return ReadSimpleConfigValue(key, val); } CHIP_ERROR NXPConfig::ReadConfigValue(Key key, uint64_t & val) { - ReturnErrorCodeIf(!ValidConfigKey(key), CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id. + VerifyOrReturnError(ValidConfigKey(key), CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id. return ReadSimpleConfigValue(key, val); } CHIP_ERROR NXPConfig::ReadConfigValueStr(Key key, char * buf, size_t bufSize, size_t & outLen) { CHIP_ERROR err = CHIP_NO_ERROR; - ReturnErrorCodeIf(!ValidConfigKey(key), err = CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id. + VerifyOrReturnError(ValidConfigKey(key), err = CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id. // Pretend that the buffer is smaller by 1 to secure space for null-character err = ReadConfigValueImpl(key, buf, bufSize ? bufSize - 1 : 0, outLen); @@ -259,7 +259,7 @@ CHIP_ERROR NXPConfig::ReadConfigValueBin(const char * keyString, uint8_t * buf, // to be able to concat CHIP_DEVICE_STRING_SETTINGS_KEY"/" and keyString, + 1 for end char key_name_len = strlen(keyString) + strlen(CHIP_DEVICE_STRING_SETTINGS_KEY) + 1; - ReturnErrorCodeIf(key_name_len > (SETTINGS_MAX_NAME_LEN + 1), CHIP_ERROR_PERSISTED_STORAGE_FAILED); + VerifyOrReturnError(key_name_len <= (SETTINGS_MAX_NAME_LEN + 1), CHIP_ERROR_PERSISTED_STORAGE_FAILED); sprintf(key_name, CHIP_DEVICE_STRING_SETTINGS_KEY "/%s", keyString); settings_load_subtree_direct(key_name, ConfigValueCallback, &request); @@ -295,7 +295,7 @@ CHIP_ERROR NXPConfig::WriteConfigValueStr(Key key, const char * str) CHIP_ERROR NXPConfig::WriteConfigValueStr(Key key, const char * str, size_t strLen) { - ReturnErrorCodeIf(!ValidConfigKey(key), CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id. + VerifyOrReturnError(ValidConfigKey(key), CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id. return WriteConfigValueImpl(key, str, strLen); } @@ -311,7 +311,7 @@ CHIP_ERROR NXPConfig::WriteConfigValueBin(const char * keyString, const uint8_t // to be able to concat CHIP_DEVICE_STRING_SETTINGS_KEY"/" and keyString, + 1 for end char key_name_len = strlen(keyString) + strlen(CHIP_DEVICE_STRING_SETTINGS_KEY) + 1; - ReturnErrorCodeIf(key_name_len > (SETTINGS_MAX_NAME_LEN + 1), CHIP_ERROR_PERSISTED_STORAGE_FAILED); + VerifyOrReturnError(key_name_len <= (SETTINGS_MAX_NAME_LEN + 1), CHIP_ERROR_PERSISTED_STORAGE_FAILED); sprintf(key_name, CHIP_DEVICE_STRING_SETTINGS_KEY "/%s", keyString); if (settings_save_one(key_name, data, dataLen) != 0) @@ -340,7 +340,7 @@ CHIP_ERROR NXPConfig::ClearConfigValue(const char * keyString) // to be able to concat CHIP_DEVICE_STRING_SETTINGS_KEY"/" and keyString, + 1 for end char key_name_len = strlen(keyString) + strlen(CHIP_DEVICE_STRING_SETTINGS_KEY) + 1; - ReturnErrorCodeIf(key_name_len > (SETTINGS_MAX_NAME_LEN + 1), CHIP_ERROR_PERSISTED_STORAGE_FAILED); + VerifyOrReturnError(key_name_len <= (SETTINGS_MAX_NAME_LEN + 1), CHIP_ERROR_PERSISTED_STORAGE_FAILED); sprintf(key_name, CHIP_DEVICE_STRING_SETTINGS_KEY "/%s", keyString); if (settings_delete(key_name) != 0) diff --git a/src/platform/nxp/common/OTAImageProcessorImpl.cpp b/src/platform/nxp/common/OTAImageProcessorImpl.cpp index a471b57f51..1d8dfa02e6 100644 --- a/src/platform/nxp/common/OTAImageProcessorImpl.cpp +++ b/src/platform/nxp/common/OTAImageProcessorImpl.cpp @@ -229,7 +229,7 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & block) CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(block, header); /* Needs more data to decode the header */ - ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); ReturnErrorOnFailure(error); mParams.totalFileBytes = header.mPayloadSize; diff --git a/src/platform/nxp/common/ble_zephyr/BLEAdvertisingArbiter.cpp b/src/platform/nxp/common/ble_zephyr/BLEAdvertisingArbiter.cpp index e977708fe4..ee6b91da3f 100644 --- a/src/platform/nxp/common/ble_zephyr/BLEAdvertisingArbiter.cpp +++ b/src/platform/nxp/common/ble_zephyr/BLEAdvertisingArbiter.cpp @@ -53,7 +53,7 @@ CHIP_ERROR RestartAdvertising() { // Note: bt_le_adv_stop() returns success when the advertising was not started ReturnErrorOnFailure(MapErrorZephyr(bt_le_adv_stop())); - ReturnErrorCodeIf(sys_slist_is_empty(&sRequests), CHIP_NO_ERROR); + VerifyOrReturnError(!sys_slist_is_empty(&sRequests), CHIP_NO_ERROR); const Request & top = ToRequest(sys_slist_peek_head(&sRequests)); const bt_le_adv_param params = BT_LE_ADV_PARAM_INIT(top.options, top.minInterval, top.maxInterval, nullptr); diff --git a/src/platform/nxp/common/ble_zephyr/BLEAdvertisingArbiter.h b/src/platform/nxp/common/ble_zephyr/BLEAdvertisingArbiter.h index 9c00edbb8e..11a90c7070 100644 --- a/src/platform/nxp/common/ble_zephyr/BLEAdvertisingArbiter.h +++ b/src/platform/nxp/common/ble_zephyr/BLEAdvertisingArbiter.h @@ -20,7 +20,8 @@ #include #include -#include + +#include #include diff --git a/src/platform/nxp/common/crypto/CHIPCryptoPALTinyCrypt.cpp b/src/platform/nxp/common/crypto/CHIPCryptoPALTinyCrypt.cpp index b0ed35595f..9c6334bded 100644 --- a/src/platform/nxp/common/crypto/CHIPCryptoPALTinyCrypt.cpp +++ b/src/platform/nxp/common/crypto/CHIPCryptoPALTinyCrypt.cpp @@ -1965,7 +1965,7 @@ CHIP_ERROR ExtractRawDNFromX509Cert(bool extractSubject, const ByteSpan & certif size_t len = 0; mbedtls_x509_crt mbedCertificate; - ReturnErrorCodeIf(certificate.empty(), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(!certificate.empty(), CHIP_ERROR_INVALID_ARGUMENT); mbedtls_x509_crt_init(&mbedCertificate); result = mbedtls_x509_crt_parse(&mbedCertificate, Uint8::to_const_uchar(certificate.data()), certificate.size()); @@ -2021,7 +2021,7 @@ CHIP_ERROR ReplaceCertIfResignedCertFound(const ByteSpan & referenceCertificate, outCertificate = referenceCertificate; - ReturnErrorCodeIf(candidateCertificates == nullptr || candidateCertificatesCount == 0, CHIP_NO_ERROR); + VerifyOrReturnError(candidateCertificates != nullptr && candidateCertificatesCount != 0, CHIP_NO_ERROR); ReturnErrorOnFailure(ExtractSubjectFromX509Cert(referenceCertificate, referenceSubject)); ReturnErrorOnFailure(ExtractSKIDFromX509Cert(referenceCertificate, referenceSKID)); diff --git a/src/platform/nxp/common/factory_data/FactoryDataProvider.cpp b/src/platform/nxp/common/factory_data/FactoryDataProvider.cpp index b60d7e49c0..43c78a0242 100644 --- a/src/platform/nxp/common/factory_data/FactoryDataProvider.cpp +++ b/src/platform/nxp/common/factory_data/FactoryDataProvider.cpp @@ -125,7 +125,7 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) size_t saltLen = chip::Base64Decode32((char *) saltB64, saltB64Len, reinterpret_cast(saltB64)); - ReturnErrorCodeIf(saltLen > saltBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(saltLen <= saltBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(saltBuf.data(), saltB64, saltLen); saltBuf.reduce_size(saltLen); @@ -142,7 +142,7 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pVerifier(MutableByteSpan & verifierBuf ReturnErrorOnFailure(SearchForId(FactoryDataId::kVerifierId, &verifierB64[0], sizeof(verifierB64), verifierB64Len)); verifierLen = chip::Base64Decode32((char *) verifierB64, verifierB64Len, reinterpret_cast(verifierB64)); - ReturnErrorCodeIf(verifierLen > verifierBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(verifierLen <= verifierBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(verifierBuf.data(), verifierB64, verifierLen); verifierBuf.reduce_size(verifierLen); @@ -288,7 +288,7 @@ CHIP_ERROR FactoryDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & un { constexpr uint8_t uniqueId[] = CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID; - ReturnErrorCodeIf(sizeof(uniqueId) > uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(sizeof(uniqueId) <= uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(uniqueIdSpan.data(), uniqueId, sizeof(uniqueId)); uniqueIdLen = sizeof(uniqueId); err = CHIP_NO_ERROR; @@ -306,7 +306,7 @@ CHIP_ERROR FactoryDataProvider::GetProductFinish(app::Clusters::BasicInformation uint8_t productFinish; uint16_t length = 0; auto err = SearchForId(FactoryDataId::kProductFinish, &productFinish, sizeof(productFinish), length); - ReturnErrorCodeIf(err != CHIP_NO_ERROR, CHIP_ERROR_NOT_IMPLEMENTED); + VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_ERROR_NOT_IMPLEMENTED); *finish = static_cast(productFinish); @@ -318,7 +318,7 @@ CHIP_ERROR FactoryDataProvider::GetProductPrimaryColor(app::Clusters::BasicInfor uint8_t color; uint16_t length = 0; auto err = SearchForId(FactoryDataId::kProductPrimaryColor, &color, sizeof(color), length); - ReturnErrorCodeIf(err != CHIP_NO_ERROR, CHIP_ERROR_NOT_IMPLEMENTED); + VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_ERROR_NOT_IMPLEMENTED); *primaryColor = static_cast(color); diff --git a/src/platform/nxp/common/factory_data/legacy/FactoryDataDriverImpl.cpp b/src/platform/nxp/common/factory_data/legacy/FactoryDataDriverImpl.cpp index 18ea65cdf1..cb7f7c1109 100644 --- a/src/platform/nxp/common/factory_data/legacy/FactoryDataDriverImpl.cpp +++ b/src/platform/nxp/common/factory_data/legacy/FactoryDataDriverImpl.cpp @@ -70,7 +70,7 @@ CHIP_ERROR FactoryDataDriverImpl::InitRamBackup(void) VerifyOrReturnError(mFactoryDataRamBuff == nullptr, CHIP_ERROR_INTERNAL); mFactoryDataRamBuff = static_cast(chip::Platform::MemoryAlloc(mMaxSize)); - ReturnErrorCodeIf(mFactoryDataRamBuff == nullptr, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(mFactoryDataRamBuff != nullptr, CHIP_ERROR_INTERNAL); memset(mFactoryDataRamBuff, 0, mMaxSize); memcpy(mFactoryDataRamBuff, (void *) &mFactoryData->app_factory_data[0], mSize); @@ -97,7 +97,7 @@ CHIP_ERROR FactoryDataDriverImpl::ReadBackupInRam() if (mFactoryDataRamBuff == nullptr) { mFactoryDataRamBuff = static_cast(chip::Platform::MemoryAlloc(mMaxSize)); - ReturnErrorCodeIf(mFactoryDataRamBuff == nullptr, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(mFactoryDataRamBuff != nullptr, CHIP_ERROR_NO_MEMORY); memset(mFactoryDataRamBuff, 0, mMaxSize); } @@ -111,7 +111,7 @@ CHIP_ERROR FactoryDataDriverImpl::ReadBackupInRam() CHIP_ERROR FactoryDataDriverImpl::BackupFactoryData() { CHIP_ERROR error = CHIP_NO_ERROR; - ReturnErrorCodeIf(mFactoryData == nullptr, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(mFactoryData != nullptr, CHIP_ERROR_INTERNAL); error = KeyValueStoreMgr().Put(FactoryDataDriverImpl::GetFactoryBackupKey().KeyName(), &mFactoryData->app_factory_data[0], mMaxSize); diff --git a/src/platform/nxp/common/factory_data/legacy/FactoryDataProvider.cpp b/src/platform/nxp/common/factory_data/legacy/FactoryDataProvider.cpp index 38998ed3c5..d7cac2e8f1 100644 --- a/src/platform/nxp/common/factory_data/legacy/FactoryDataProvider.cpp +++ b/src/platform/nxp/common/factory_data/legacy/FactoryDataProvider.cpp @@ -129,10 +129,10 @@ CHIP_ERROR FactoryDataProvider::Validate() uint8_t output[Crypto::kSHA256_Hash_Length] = { 0 }; memcpy(&mHeader, (void *) mConfig.start, sizeof(Header)); - ReturnErrorCodeIf(mHeader.hashId != kHashId, CHIP_FACTORY_DATA_HASH_ID); + VerifyOrReturnError(mHeader.hashId == kHashId, CHIP_FACTORY_DATA_HASH_ID); ReturnErrorOnFailure(Crypto::Hash_SHA256((uint8_t *) mConfig.payload, mHeader.size, output)); - ReturnErrorCodeIf(memcmp(output, mHeader.hash, kHashLen) != 0, CHIP_FACTORY_DATA_SHA_CHECK); + VerifyOrReturnError(memcmp(output, mHeader.hash, kHashLen) == 0, CHIP_FACTORY_DATA_SHA_CHECK); return CHIP_NO_ERROR; } @@ -150,7 +150,7 @@ CHIP_ERROR FactoryDataProvider::SearchForId(uint8_t searchedType, uint8_t * pBuf if (searchedType == type) { - ReturnErrorCodeIf(bufLength < length, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufLength >= length, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(pBuf, (void *) (addr + kValueOffset), length); if (offset) @@ -241,7 +241,7 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) ReturnErrorOnFailure(SearchForId(FactoryDataId::kSaltId, (uint8_t *) (&saltB64[0]), sizeof(saltB64), saltB64Len)); size_t saltLen = chip::Base64Decode32(saltB64, saltB64Len, reinterpret_cast(saltB64)); - ReturnErrorCodeIf(saltLen > saltBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(saltLen <= saltBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(saltBuf.data(), saltB64, saltLen); saltBuf.reduce_size(saltLen); @@ -255,7 +255,7 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pVerifier(MutableByteSpan & verifierBuf ReturnErrorOnFailure(SearchForId(FactoryDataId::kVerifierId, (uint8_t *) &verifierB64[0], sizeof(verifierB64), verifierB64Len)); verifierLen = chip::Base64Decode32(verifierB64, verifierB64Len, reinterpret_cast(verifierB64)); - ReturnErrorCodeIf(verifierLen > verifierBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(verifierLen <= verifierBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(verifierBuf.data(), verifierB64, verifierLen); verifierBuf.reduce_size(verifierLen); @@ -401,7 +401,7 @@ CHIP_ERROR FactoryDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & un { constexpr uint8_t uniqueId[] = CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID; - ReturnErrorCodeIf(sizeof(uniqueId) > uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(sizeof(uniqueId) <= uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(uniqueIdSpan.data(), uniqueId, sizeof(uniqueId)); uniqueIdLen = sizeof(uniqueId); err = CHIP_NO_ERROR; @@ -419,7 +419,7 @@ CHIP_ERROR FactoryDataProvider::GetProductFinish(app::Clusters::BasicInformation uint8_t productFinish; uint16_t length = 0; auto err = SearchForId(FactoryDataId::kProductFinish, &productFinish, sizeof(productFinish), length); - ReturnErrorCodeIf(err != CHIP_NO_ERROR, CHIP_ERROR_NOT_IMPLEMENTED); + VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_ERROR_NOT_IMPLEMENTED); *finish = static_cast(productFinish); @@ -431,7 +431,7 @@ CHIP_ERROR FactoryDataProvider::GetProductPrimaryColor(app::Clusters::BasicInfor uint8_t color; uint16_t length = 0; auto err = SearchForId(FactoryDataId::kProductPrimaryColor, &color, sizeof(color), length); - ReturnErrorCodeIf(err != CHIP_NO_ERROR, CHIP_ERROR_NOT_IMPLEMENTED); + VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_ERROR_NOT_IMPLEMENTED); *primaryColor = static_cast(color); diff --git a/src/platform/nxp/common/factory_data/legacy/FactoryDataProviderImpl.cpp b/src/platform/nxp/common/factory_data/legacy/FactoryDataProviderImpl.cpp index abb189685b..1ee2340602 100644 --- a/src/platform/nxp/common/factory_data/legacy/FactoryDataProviderImpl.cpp +++ b/src/platform/nxp/common/factory_data/legacy/FactoryDataProviderImpl.cpp @@ -273,7 +273,7 @@ extern "C" WEAK CHIP_ERROR FactoryDataDefaultRestoreMechanism() CHIP_ERROR error = CHIP_NO_ERROR; FactoryDataDriver * driver = &FactoryDataDrv(); - ReturnErrorCodeIf(driver == nullptr, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(driver != nullptr, CHIP_ERROR_INTERNAL); // Check if key related to factory data backup exists. // If it does, it means an external event (such as a power loss) diff --git a/src/platform/nxp/common/ota/OTAFirmwareProcessor.cpp b/src/platform/nxp/common/ota/OTAFirmwareProcessor.cpp index 15aa5f271c..a9015d8e18 100644 --- a/src/platform/nxp/common/ota/OTAFirmwareProcessor.cpp +++ b/src/platform/nxp/common/ota/OTAFirmwareProcessor.cpp @@ -26,16 +26,16 @@ namespace chip { CHIP_ERROR OTAFirmwareProcessor::Init() { - ReturnErrorCodeIf(mCallbackProcessDescriptor == nullptr, CHIP_ERROR_OTA_PROCESSOR_CB_NOT_REGISTERED); + VerifyOrReturnError(mCallbackProcessDescriptor != nullptr, CHIP_ERROR_OTA_PROCESSOR_CB_NOT_REGISTERED); mAccumulator.Init(sizeof(Descriptor)); - ReturnErrorCodeIf(gOtaSuccess_c != OTA_SelectExternalStoragePartition(), CHIP_ERROR_OTA_PROCESSOR_EXTERNAL_STORAGE); + VerifyOrReturnError(gOtaSuccess_c == OTA_SelectExternalStoragePartition(), CHIP_ERROR_OTA_PROCESSOR_EXTERNAL_STORAGE); otaResult_t ota_status; ota_status = OTA_ServiceInit(&mPostedOperationsStorage[0], NB_PENDING_TRANSACTIONS * TRANSACTION_SZ); - ReturnErrorCodeIf(ota_status != gOtaSuccess_c, CHIP_ERROR_OTA_PROCESSOR_CLIENT_INIT); - ReturnErrorCodeIf(gOtaSuccess_c != OTA_StartImage(mLength - sizeof(Descriptor)), CHIP_ERROR_OTA_PROCESSOR_START_IMAGE); + VerifyOrReturnError(ota_status == gOtaSuccess_c, CHIP_ERROR_OTA_PROCESSOR_CLIENT_INIT); + VerifyOrReturnError(gOtaSuccess_c == OTA_StartImage(mLength - sizeof(Descriptor)), CHIP_ERROR_OTA_PROCESSOR_START_IMAGE); return CHIP_NO_ERROR; } diff --git a/src/platform/nxp/common/ota/OTAImageProcessorImpl.cpp b/src/platform/nxp/common/ota/OTAImageProcessorImpl.cpp index f6f4236732..59af9449b9 100644 --- a/src/platform/nxp/common/ota/OTAImageProcessorImpl.cpp +++ b/src/platform/nxp/common/ota/OTAImageProcessorImpl.cpp @@ -39,7 +39,7 @@ namespace chip { CHIP_ERROR OTAImageProcessorImpl::Init(OTADownloader * downloader) { - ReturnErrorCodeIf(downloader == nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(downloader != nullptr, CHIP_ERROR_INVALID_ARGUMENT); mDownloader = downloader; OtaHookInit(); @@ -297,7 +297,7 @@ CHIP_ERROR OTAImageProcessorImpl::ConfirmCurrentImage() uint32_t targetVersion; OTARequestorInterface * requestor = chip::GetRequestorInstance(); - ReturnErrorCodeIf(requestor == nullptr, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(requestor != nullptr, CHIP_ERROR_INTERNAL); targetVersion = requestor->GetTargetVersion(); ReturnErrorOnFailure(DeviceLayer::ConfigurationMgr().GetSoftwareVersion(currentVersion)); diff --git a/src/platform/nxp/common/ota/OTATlvProcessor.cpp b/src/platform/nxp/common/ota/OTATlvProcessor.cpp index 66a080135b..ad41d0f42e 100644 --- a/src/platform/nxp/common/ota/OTATlvProcessor.cpp +++ b/src/platform/nxp/common/ota/OTATlvProcessor.cpp @@ -40,7 +40,7 @@ CHIP_ERROR OTATlvProcessor::ApplyAction() CHIP_ERROR OTATlvProcessor::Process(ByteSpan & block) { CHIP_ERROR status = CHIP_NO_ERROR; - uint32_t bytes = chip::min(mLength - mProcessedLength, static_cast(block.size())); + uint32_t bytes = std::min(mLength - mProcessedLength, static_cast(block.size())); ByteSpan relevantData = block.SubSpan(0, bytes); status = ProcessInternal(relevantData); @@ -96,7 +96,7 @@ void OTADataAccumulator::Clear() CHIP_ERROR OTADataAccumulator::Accumulate(ByteSpan & block) { - uint32_t numBytes = chip::min(mThreshold - mBufferOffset, static_cast(block.size())); + uint32_t numBytes = std::min(mThreshold - mBufferOffset, static_cast(block.size())); memcpy(&mBuffer[mBufferOffset], block.data(), numBytes); mBufferOffset += numBytes; block = block.SubSpan(numBytes); diff --git a/src/platform/nxp/k32w0/ConfigurationManagerImpl.cpp b/src/platform/nxp/k32w0/ConfigurationManagerImpl.cpp index 7343c75b5d..4e24fa7199 100644 --- a/src/platform/nxp/k32w0/ConfigurationManagerImpl.cpp +++ b/src/platform/nxp/k32w0/ConfigurationManagerImpl.cpp @@ -121,8 +121,8 @@ CHIP_ERROR ConfigurationManagerImpl::GetUniqueId(char * buf, size_t bufSize) ReturnErrorOnFailure(err); - ReturnErrorCodeIf(uniqueIdLen >= bufSize, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(buf[uniqueIdLen] != 0, CHIP_ERROR_INVALID_STRING_LENGTH); + VerifyOrReturnError(uniqueIdLen < bufSize, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(buf[uniqueIdLen] == 0, CHIP_ERROR_INVALID_STRING_LENGTH); return err; } diff --git a/src/platform/nxp/k32w0/FactoryDataProvider.cpp b/src/platform/nxp/k32w0/FactoryDataProvider.cpp index 23f8ffe7c0..28d8c9f388 100644 --- a/src/platform/nxp/k32w0/FactoryDataProvider.cpp +++ b/src/platform/nxp/k32w0/FactoryDataProvider.cpp @@ -55,10 +55,10 @@ CHIP_ERROR FactoryDataProvider::Validate() uint8_t output[Crypto::kSHA256_Hash_Length] = { 0 }; memcpy(&mHeader, (void *) kFactoryDataStart, sizeof(Header)); - ReturnErrorCodeIf(mHeader.hashId != kHashId, CHIP_FACTORY_DATA_HASH_ID); + VerifyOrReturnError(mHeader.hashId == kHashId, CHIP_FACTORY_DATA_HASH_ID); ReturnErrorOnFailure(Crypto::Hash_SHA256((uint8_t *) kFactoryDataPayloadStart, mHeader.size, output)); - ReturnErrorCodeIf(memcmp(output, mHeader.hash, kHashLen) != 0, CHIP_FACTORY_DATA_SHA_CHECK); + VerifyOrReturnError(memcmp(output, mHeader.hash, kHashLen) == 0, CHIP_FACTORY_DATA_SHA_CHECK); return CHIP_NO_ERROR; } @@ -76,7 +76,7 @@ CHIP_ERROR FactoryDataProvider::SearchForId(uint8_t searchedType, uint8_t * pBuf if (searchedType == type) { - ReturnErrorCodeIf(bufLength < length, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufLength >= length, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(pBuf, (void *) (addr + kValueOffset), length); if (offset) @@ -167,7 +167,7 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) ReturnErrorOnFailure(SearchForId(FactoryDataId::kSaltId, (uint8_t *) (&saltB64[0]), sizeof(saltB64), saltB64Len)); size_t saltLen = chip::Base64Decode32(saltB64, saltB64Len, reinterpret_cast(saltB64)); - ReturnErrorCodeIf(saltLen > saltBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(saltLen <= saltBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(saltBuf.data(), saltB64, saltLen); saltBuf.reduce_size(saltLen); @@ -181,7 +181,7 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pVerifier(MutableByteSpan & verifierBuf ReturnErrorOnFailure(SearchForId(FactoryDataId::kVerifierId, (uint8_t *) &verifierB64[0], sizeof(verifierB64), verifierB64Len)); verifierLen = chip::Base64Decode32(verifierB64, verifierB64Len, reinterpret_cast(verifierB64)); - ReturnErrorCodeIf(verifierLen > verifierBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(verifierLen <= verifierBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(verifierBuf.data(), verifierB64, verifierLen); verifierBuf.reduce_size(verifierLen); @@ -327,7 +327,7 @@ CHIP_ERROR FactoryDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & un { constexpr uint8_t uniqueId[] = CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID; - ReturnErrorCodeIf(sizeof(uniqueId) > uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(sizeof(uniqueId) <= uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(uniqueIdSpan.data(), uniqueId, sizeof(uniqueId)); uniqueIdLen = sizeof(uniqueId); err = CHIP_NO_ERROR; @@ -345,7 +345,7 @@ CHIP_ERROR FactoryDataProvider::GetProductFinish(app::Clusters::BasicInformation uint8_t productFinish; uint16_t length = 0; auto err = SearchForId(FactoryDataId::kProductFinish, &productFinish, sizeof(productFinish), length); - ReturnErrorCodeIf(err != CHIP_NO_ERROR, CHIP_ERROR_NOT_IMPLEMENTED); + VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_ERROR_NOT_IMPLEMENTED); *finish = static_cast(productFinish); @@ -357,7 +357,7 @@ CHIP_ERROR FactoryDataProvider::GetProductPrimaryColor(app::Clusters::BasicInfor uint8_t color; uint16_t length = 0; auto err = SearchForId(FactoryDataId::kProductPrimaryColor, &color, sizeof(color), length); - ReturnErrorCodeIf(err != CHIP_NO_ERROR, CHIP_ERROR_NOT_IMPLEMENTED); + VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_ERROR_NOT_IMPLEMENTED); *primaryColor = static_cast(color); diff --git a/src/platform/nxp/k32w0/FactoryDataProviderImpl.cpp b/src/platform/nxp/k32w0/FactoryDataProviderImpl.cpp index 93c09adf5c..e2d5f1db8b 100644 --- a/src/platform/nxp/k32w0/FactoryDataProviderImpl.cpp +++ b/src/platform/nxp/k32w0/FactoryDataProviderImpl.cpp @@ -105,11 +105,11 @@ extern "C" WEAK CHIP_ERROR FactoryDataDefaultRestoreMechanism() { chip::Platform::ScopedMemoryBuffer buffer; buffer.Calloc(FactoryDataProvider::kFactoryDataSize); - ReturnErrorCodeIf(buffer.Get() == nullptr, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(buffer.Get() != nullptr, CHIP_ERROR_NO_MEMORY); auto status = PDM_eReadDataFromRecord(kNvmId_FactoryDataBackup, (void *) buffer.Get(), FactoryDataProvider::kFactoryDataSize, &backupLength); - ReturnErrorCodeIf(PDM_E_STATUS_OK != status, CHIP_FACTORY_DATA_PDM_RESTORE); + VerifyOrReturnError(PDM_E_STATUS_OK == status, CHIP_FACTORY_DATA_PDM_RESTORE); error = FactoryDataProviderImpl::UpdateData(buffer.Get()); if (error == CHIP_NO_ERROR) @@ -157,11 +157,11 @@ CHIP_ERROR FactoryDataProviderImpl::UpdateData(uint8_t * pBuf) NV_Init(); auto status = NV_FlashEraseSector(kFactoryDataStart, kFactoryDataSize); - ReturnErrorCodeIf(status != kStatus_FLASH_Success, CHIP_FACTORY_DATA_FLASH_ERASE); + VerifyOrReturnError(status == kStatus_FLASH_Success, CHIP_FACTORY_DATA_FLASH_ERASE); Header * header = (Header *) pBuf; status = NV_FlashProgramUnaligned(kFactoryDataStart, sizeof(Header) + header->size, pBuf); - ReturnErrorCodeIf(status != kStatus_FLASH_Success, CHIP_FACTORY_DATA_FLASH_PROGRAM); + VerifyOrReturnError(status == kStatus_FLASH_Success, CHIP_FACTORY_DATA_FLASH_PROGRAM); return CHIP_NO_ERROR; } diff --git a/src/platform/nxp/k32w0/KeyValueStoreManagerImpl.cpp b/src/platform/nxp/k32w0/KeyValueStoreManagerImpl.cpp index 50f9005837..34666e491a 100644 --- a/src/platform/nxp/k32w0/KeyValueStoreManagerImpl.cpp +++ b/src/platform/nxp/k32w0/KeyValueStoreManagerImpl.cpp @@ -326,7 +326,7 @@ static CHIP_ERROR MoveKeysAndValues() Platform::ScopedMemoryBuffer buffer; buffer.Calloc(len); - ReturnErrorCodeIf(buffer.Get() == nullptr, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(buffer.Get() != nullptr, CHIP_ERROR_NO_MEMORY); for (uint8_t id = 0; id < kMaxNumberOfKeys; id++) { diff --git a/src/platform/nxp/k32w0/OTAFactoryDataProcessor.cpp b/src/platform/nxp/k32w0/OTAFactoryDataProcessor.cpp index 9114906787..b3ffdd1563 100644 --- a/src/platform/nxp/k32w0/OTAFactoryDataProcessor.cpp +++ b/src/platform/nxp/k32w0/OTAFactoryDataProcessor.cpp @@ -174,7 +174,7 @@ CHIP_ERROR OTAFactoryDataProcessor::Read() memcpy(&header, (void *) FactoryProvider::kFactoryDataStart, sizeof(FactoryProvider::Header)); mFactoryData = static_cast(chip::Platform::MemoryAlloc(FactoryProvider::kFactoryDataSize)); - ReturnErrorCodeIf(mFactoryData == nullptr, CHIP_FACTORY_DATA_NULL); + VerifyOrReturnError(mFactoryData != nullptr, CHIP_FACTORY_DATA_NULL); memset(mFactoryData, 0, FactoryProvider::kFactoryDataSize); memcpy(mFactoryData, (void *) FactoryProvider::kFactoryDataStart, sizeof(FactoryProvider::Header) + header.size); @@ -183,10 +183,10 @@ CHIP_ERROR OTAFactoryDataProcessor::Read() CHIP_ERROR OTAFactoryDataProcessor::Backup() { - ReturnErrorCodeIf(mFactoryData == nullptr, CHIP_FACTORY_DATA_NULL); + VerifyOrReturnError(mFactoryData != nullptr, CHIP_FACTORY_DATA_NULL); auto status = PDM_eSaveRecordData(kNvmId_FactoryDataBackup, (void *) mFactoryData, FactoryProvider::kFactoryDataSize); - ReturnErrorCodeIf(status != PDM_E_STATUS_OK, CHIP_FACTORY_DATA_PDM_SAVE_RECORD); + VerifyOrReturnError(status == PDM_E_STATUS_OK, CHIP_FACTORY_DATA_PDM_SAVE_RECORD); // PDM save will do an encryption in place, so a restore is neeeded in order // to have the decrypted data back in the mFactoryData buffer. ReturnErrorOnFailure(Restore()); @@ -196,13 +196,13 @@ CHIP_ERROR OTAFactoryDataProcessor::Backup() CHIP_ERROR OTAFactoryDataProcessor::Restore() { - ReturnErrorCodeIf(mFactoryData == nullptr, CHIP_FACTORY_DATA_NULL); + VerifyOrReturnError(mFactoryData != nullptr, CHIP_FACTORY_DATA_NULL); uint16_t bytesRead = 0; auto status = PDM_eReadDataFromRecord(kNvmId_FactoryDataBackup, (void *) mFactoryData, FactoryProvider::kFactoryDataSize, &bytesRead); - ReturnErrorCodeIf(status != PDM_E_STATUS_OK, CHIP_FACTORY_DATA_PDM_READ_RECORD); + VerifyOrReturnError(status == PDM_E_STATUS_OK, CHIP_FACTORY_DATA_PDM_READ_RECORD); return CHIP_NO_ERROR; } diff --git a/src/platform/nxp/k32w0/OTAFirmwareProcessor.cpp b/src/platform/nxp/k32w0/OTAFirmwareProcessor.cpp index 3fcb2fd43b..1ea2003131 100644 --- a/src/platform/nxp/k32w0/OTAFirmwareProcessor.cpp +++ b/src/platform/nxp/k32w0/OTAFirmwareProcessor.cpp @@ -28,12 +28,12 @@ namespace chip { CHIP_ERROR OTAFirmwareProcessor::Init() { - ReturnErrorCodeIf(mCallbackProcessDescriptor == nullptr, CHIP_ERROR_OTA_PROCESSOR_CB_NOT_REGISTERED); + VerifyOrReturnError(mCallbackProcessDescriptor != nullptr, CHIP_ERROR_OTA_PROCESSOR_CB_NOT_REGISTERED); mAccumulator.Init(sizeof(Descriptor)); #if OTA_ENCRYPTION_ENABLE mUnalignmentNum = 0; #endif - ReturnErrorCodeIf(gOtaSuccess_c != OTA_ClientInit(), CHIP_ERROR_OTA_PROCESSOR_CLIENT_INIT); + VerifyOrReturnError(gOtaSuccess_c == OTA_ClientInit(), CHIP_ERROR_OTA_PROCESSOR_CLIENT_INIT); auto offset = OTA_GetCurrentEepromAddressOffset(); if (offset != 0) @@ -41,8 +41,8 @@ CHIP_ERROR OTAFirmwareProcessor::Init() offset += 1; } - ReturnErrorCodeIf(OTA_UTILS_IMAGE_INVALID_ADDR == OTA_SetStartEepromOffset(offset), CHIP_ERROR_OTA_PROCESSOR_EEPROM_OFFSET); - ReturnErrorCodeIf(gOtaSuccess_c != OTA_StartImage(mLength - sizeof(Descriptor)), CHIP_ERROR_OTA_PROCESSOR_START_IMAGE); + VerifyOrReturnError(OTA_UTILS_IMAGE_INVALID_ADDR != OTA_SetStartEepromOffset(offset), CHIP_ERROR_OTA_PROCESSOR_EEPROM_OFFSET); + VerifyOrReturnError(gOtaSuccess_c == OTA_StartImage(mLength - sizeof(Descriptor)), CHIP_ERROR_OTA_PROCESSOR_START_IMAGE); return CHIP_NO_ERROR; } diff --git a/src/platform/nxp/mcxw71_k32w1/BUILD.gn b/src/platform/nxp/mcxw71_k32w1/BUILD.gn index 253e21e4ef..6b399a1c1d 100644 --- a/src/platform/nxp/mcxw71_k32w1/BUILD.gn +++ b/src/platform/nxp/mcxw71_k32w1/BUILD.gn @@ -90,10 +90,15 @@ config("nxp_platform_config") { static_library("nxp_platform") { deps = [] - defines = [ "CHIP_DEVICE_K32W1=1" ] + defines = [ + "CHIP_DEVICE_K32W1=1", + "NXP_USE_MML=1", + ] sources = [ "../../SingletonConfigurationManager.cpp", + "../common/DiagnosticDataProviderImpl.cpp", + "../common/DiagnosticDataProviderImpl.h", "../common/ble/BLEManagerCommon.cpp", "../common/ble/BLEManagerCommon.h", "../common/ble/BLEManagerImpl.cpp", @@ -104,8 +109,6 @@ static_library("nxp_platform") { "ConfigurationManagerImpl.h", "ConnectivityManagerImpl.cpp", "ConnectivityManagerImpl.h", - "DiagnosticDataProviderImpl.cpp", - "DiagnosticDataProviderImpl.h", "PlatformManagerImpl.cpp", "PlatformManagerImpl.h", "SystemTimeSupport.cpp", diff --git a/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.cpp b/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.cpp index 3c1e39b041..e0ec11a747 100644 --- a/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.cpp +++ b/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.cpp @@ -48,7 +48,6 @@ #include -extern "C" void HAL_ResetMCU(void); extern "C" void freertos_mbedtls_mutex_init(void); extern uint8_t __data_end__[], m_data0_end[]; @@ -93,14 +92,16 @@ CHIP_ERROR PlatformManagerImpl::ServiceInit(void) return CHIP_NO_ERROR; } -void PlatformManagerImpl::CleanReset() +void PlatformManagerImpl::Reset() { - StopEventLoopTask(); - Shutdown(); #if (CHIP_PLAT_NVM_SUPPORT == 1) NvCompletePendingOperations(); #endif - HAL_ResetMCU(); + // Restart the system. + NVIC_SystemReset(); + while (1) + { + } } void PlatformManagerImpl::ScheduleResetInIdle(void) @@ -200,6 +201,10 @@ void PlatformManagerImpl::_Shutdown() ChipLogError(DeviceLayer, "Failed to get current uptime since the Node’s last reboot"); } + /* Handle the server shutting down & emit the ShutDown event */ + /* Make sure to call this function from Matter Task */ + PlatformMgr().HandleServerShuttingDown(); + /* Shutdown all layers */ Internal::GenericPlatformManagerImpl_FreeRTOS::_Shutdown(); } diff --git a/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.h b/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.h index 588790823c..935efaa555 100644 --- a/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.h +++ b/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.h @@ -51,7 +51,7 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener System::Clock::Timestamp GetStartTime() { return mStartTime; } void HardwareInit(void); CHIP_ERROR ServiceInit(void); - void CleanReset(); + void Reset(); void StopBLEConnectivity() {} void ScheduleResetInIdle(void); bool GetResetInIdleValue(void); diff --git a/src/platform/nxp/mw320/FactoryDataProvider.cpp b/src/platform/nxp/mw320/FactoryDataProvider.cpp index 5b36958f30..5d02bcf9e4 100644 --- a/src/platform/nxp/mw320/FactoryDataProvider.cpp +++ b/src/platform/nxp/mw320/FactoryDataProvider.cpp @@ -234,7 +234,7 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) ReturnErrorOnFailure(SearchForId(kSaltId, (uint8_t *) (&saltB64[0]), sizeof(saltB64), saltB64Len)); size_t saltLen = chip::Base64Decode32(saltB64, saltB64Len, reinterpret_cast(saltB64)); - ReturnErrorCodeIf(saltLen > saltBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(saltLen <= saltBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(saltBuf.data(), saltB64, saltLen); saltBuf.reduce_size(saltLen); @@ -249,7 +249,7 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pVerifier(MutableByteSpan & verifierBuf ReturnErrorOnFailure(SearchForId(kVerifierId, (uint8_t *) &verifierB64[0], sizeof(verifierB64), verifierB64Len)); verifierLen = chip::Base64Decode32(verifierB64, verifierB64Len, reinterpret_cast(verifierB64)); - ReturnErrorCodeIf(verifierLen > verifierBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(verifierLen <= verifierBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(verifierBuf.data(), verifierB64, verifierLen); verifierBuf.reduce_size(verifierLen); diff --git a/src/platform/nxp/mw320/OTAImageProcessorImpl.cpp b/src/platform/nxp/mw320/OTAImageProcessorImpl.cpp index 1fac68beb2..18dc019ba3 100644 --- a/src/platform/nxp/mw320/OTAImageProcessorImpl.cpp +++ b/src/platform/nxp/mw320/OTAImageProcessorImpl.cpp @@ -280,7 +280,7 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & block) CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(block, header); // Needs more data to decode the header - ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); ReturnErrorOnFailure(error); // mParams.totalFileBytes = header.mPayloadSize; diff --git a/src/platform/nxp/rt/rt1060/BUILD.gn b/src/platform/nxp/rt/rt1060/BUILD.gn new file mode 100644 index 0000000000..1e3d8f1e1e --- /dev/null +++ b/src/platform/nxp/rt/rt1060/BUILD.gn @@ -0,0 +1,187 @@ +# Copyright (c) 2021 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/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/nxp_sdk.gni") +import("//build_overrides/openthread.gni") +import("${chip_root}/src/platform/device.gni") + +# If external SDK is used, do not import ${nxp_sdk_name}.gni +if (!nxp_external_sdk) { + import("${nxp_sdk_build_root}/${nxp_sdk_name}/${nxp_sdk_name}.gni") +} + +import("${nxp_sdk_build_root}/nxp_sdk.gni") + +assert(chip_device_platform == "nxp") + +source_set("nxp_factory_data") { +} +source_set("nxp_ota") { +} + +config("nxp_platform_config") { + defines = [ "EXTERNAL_BLEMANAGERIMPL_HEADER=\"platform/nxp/common/ble_zephyr/BLEManagerImpl.h\"" ] + include_dirs = [ + ".", + "../../common", + ] + if (chip_with_factory_data == 1) { + include_dirs += [ + ".", + "../../common/factory_data", + ] + defines += [ "CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA=1" ] + defines += [ "EXTERNAL_FACTORY_DATA_PROVIDER_IMPL_HEADER=\"platform/nxp/rt/rt1060/FactoryDataProviderImpl.h\"" ] + } + + # When OTBR is enabled Thread network commissioning cluster is enabled using chip_enable_secondary_nwk_if + if (chip_enable_wifi && chip_enable_openthread && + !chip_enable_secondary_nwk_if) { + defines += [ "_NO_GENERIC_THREAD_NETWORK_COMMISSIONING_DRIVER_" ] + } +} + +static_library("nxp_platform") { + output_name = "libCHIP_NXP_Port_RT1060" + cflags = [ + "-Wno-conversion", + "-Wno-sign-compare", + ] + deps = [] + defines = [] + sources = [ + "../../../FreeRTOS/SystemTimeSupport.cpp", + "../../../SingletonConfigurationManager.cpp", + "../../common/CHIPDevicePlatformEvent.h", + "../../common/ConfigurationManagerImpl.cpp", + "../../common/ConfigurationManagerImpl.h", + "../../common/ConnectivityManagerImpl.cpp", + "../../common/ConnectivityManagerImpl.h", + "../../common/DiagnosticDataProviderImpl.cpp", + "../../common/DiagnosticDataProviderImpl.h", + "../../common/KeyValueStoreManagerImpl.cpp", + "../../common/KeyValueStoreManagerImpl.h", + "../../common/Logging.cpp", + "../../common/NXPConfig.cpp", + "../../common/NXPConfig.h", + "../../common/NetworkProvisioningServerImpl.h", + "../../common/PlatformManagerImpl.h", + "../../common/SoftwareUpdateManagerImpl.h", + "../../common/ram_storage.c", + "../../common/ram_storage.h", + "CHIPDevicePlatformConfig.h", + "PlatformManagerImpl.cpp", + ] + + if (chip_enable_ble) { + sources += [ + # Adding random file which defines the function sys_csrand_get which is called by BLEManagerImpl from Zephyr + "${nxp_sdk_build_root}/rt_sdk/sdk_hook/zephyr/random/random.cpp", + "../../common/ble_zephyr/BLEAdvertisingArbiter.cpp", + "../../common/ble_zephyr/BLEManagerImpl.cpp", + "../../common/ble_zephyr/BLEManagerImpl.h", + ] + } + + public_deps = [ "${chip_root}/src/platform:platform_base" ] + + deps += [ + "${chip_root}/src/lib/dnssd:constants", + "${chip_root}/src/platform/logging:headers", + ] + + # define CHIP_PLAT_NVM_SUPPORT - See NXPConfig.cpp for definition + if (nxp_nvm_component == "nvm_fwk") { + defines += [ "CHIP_PLAT_NVM_SUPPORT=1" ] + } else if (nxp_nvm_component == "littlefs") { + defines += [ "CHIP_PLAT_NVM_SUPPORT=2" ] + } + + if (chip_enable_wifi) { + sources += [ + "../../common/NetworkCommissioningDriver.h", + "../../common/NetworkCommissioningWiFiDriver.cpp", + ] + } + if (chip_enable_ota_requestor) { + sources += [ + "../../common/OTAImageProcessorImpl.cpp", + "../../common/OTAImageProcessorImpl.h", + ] + } + + if (chip_enable_openthread) { + sources += [ + # Temporary fix, to be revert once PR #34662 is merged, build issue when using GN check argument + "${chip_root}/src/app/clusters/thread-border-router-management-server/thread-br-delegate.h", + "../../../OpenThread/GenericThreadBorderRouterDelegate.cpp", + "../../../OpenThread/GenericThreadBorderRouterDelegate.h", + "../../../OpenThread/OpenThreadUtils.cpp", + "../../common/ThreadStackManagerImpl.cpp", + "../../common/ThreadStackManagerImpl.h", + ] + + deps += [ "${chip_root}/src/app/common:ids" ] + + if (!nxp_build_matter_standalone_lib) { + deps += [ "${chip_root}/third_party/openthread:openthread" ] + public_deps += + [ "${chip_root}/third_party/openthread:openthread-platform" ] + } + + # dep required to include 'lib/spinel/spinel.h' in PlatformManagerImpl.cpp + deps += [ "${openthread_root}:libopenthread-spinel-rcp" ] + + if (chip_mdns == "platform") { + if (chip_enable_wifi) { + sources += [ + "../../../OpenThread/OpenThreadDnssdImpl.cpp", + "../../../OpenThread/OpenThreadDnssdImpl.h", + "../../common/DnssdImpl.cpp", + "../../common/DnssdImplBr.cpp", + "../../common/DnssdImplBr.h", + ] + } else { + sources += [ + "../../../OpenThread/DnssdImpl.cpp", + "../../../OpenThread/OpenThreadDnssdImpl.cpp", + "../../../OpenThread/OpenThreadDnssdImpl.h", + ] + } + deps += [ "${chip_root}/src/lib/dnssd:platform_header" ] + } + } + + if (chip_with_factory_data == 1) { + sources += [ + "../../common/factory_data/FactoryDataProvider.cpp", + "../../common/factory_data/FactoryDataProvider.h", + "FactoryDataProviderImpl.cpp", + "FactoryDataProviderImpl.h", + ] + + deps += [ "${chip_root}/src/credentials:credentials_header" ] + } + + deps += [ "${nxp_sdk_build_root}:nxp_sdk" ] + + public_deps += [ + "${chip_root}/examples/platform/nxp/common/app/support:freertos_memory_utils", + "${chip_root}/src/crypto", + "${chip_root}/src/platform:syscalls_stub", + ] + public_configs = [ ":nxp_platform_config" ] +} diff --git a/src/platform/nxp/rt/rt1060/BlePlatformConfig.h b/src/platform/nxp/rt/rt1060/BlePlatformConfig.h new file mode 100644 index 0000000000..61ad3de197 --- /dev/null +++ b/src/platform/nxp/rt/rt1060/BlePlatformConfig.h @@ -0,0 +1,36 @@ +/* + * + * Copyright (c) 2021-2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Platform-specific configuration overrides for the CHIP BLE + * Layer on RT1060 platforms using the NXP SDK. + * + */ + +#pragma once + +// ==================== Platform Adaptations ==================== + +/* Default NXP Platform adaptations are used */ + +// ========== Platform-specific Configuration Overrides ========= + +/* Default NXP Platform configuration overrides are used */ + +// Include default nxp platform configurations +#include "platform/nxp/common/ble_zephyr/BleNXPPlatformDefaultConfig.h" diff --git a/src/platform/nxp/rt/rt1060/CHIPDevicePlatformConfig.h b/src/platform/nxp/rt/rt1060/CHIPDevicePlatformConfig.h new file mode 100644 index 0000000000..0e45bd4108 --- /dev/null +++ b/src/platform/nxp/rt/rt1060/CHIPDevicePlatformConfig.h @@ -0,0 +1,42 @@ +/* + * + * Copyright (c) 2020-2022 Project CHIP Authors + * Copyright (c) 2020 Google LLC. + * 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 + * Platform-specific configuration overrides for the chip Device Layer + * on NXP platforms using the NXP SDK. + */ + +#pragma once + +// ==================== Platform Adaptations ==================== + +/* Default NXP Platform adaptations are used */ + +// ========== Platform-specific Configuration ========= + +// These are configuration options that are unique to the NXP platform. +// These can be overridden by the application as needed. + +// ========== Platform-specific Configuration Overrides ========= + +/* Default NXP Platform configuration overrides are used */ + +// Include default nxp platform configurations +#include "platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h" diff --git a/src/platform/nxp/rt/rt1060/CHIPPlatformConfig.h b/src/platform/nxp/rt/rt1060/CHIPPlatformConfig.h new file mode 100644 index 0000000000..7b08c5c17f --- /dev/null +++ b/src/platform/nxp/rt/rt1060/CHIPPlatformConfig.h @@ -0,0 +1,54 @@ +/* + * + * Copyright (c) 2020-2022 Project CHIP Authors + * Copyright (c) 2020 Google LLC. + * 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 + * Platform-specific configuration overrides for CHIP on + * NXP RT1060 platforms. + */ + +#pragma once + +#include + +// ==================== General Platform Adaptations ==================== + +/* Default NXP platform adaptations are used */ + +// ==================== Security Adaptations ==================== + +/* Default NXP Platform security adaptations are used */ + +// ==================== General Configuration Overrides ==================== + +/* Default NXP Platform general configuration overrides are used */ + +/* For now on RT1060, due to the current file system implementation only 5 fabrics are supported */ +#define CHIP_CONFIG_MAX_FABRICS 5 + +// ==================== Security Configuration Overrides ==================== + +/* Default NXP Platform security configuration overrides are used */ + +// ==================== WDM Configuration Overrides ==================== + +/* Default NXP Platform WDM Configuration overrides are used */ + +// Include default nxp platform configurations +#include "platform/nxp/common/CHIPNXPPlatformDefaultConfig.h" diff --git a/src/platform/nxp/rt/rt1060/FactoryDataProviderImpl.cpp b/src/platform/nxp/rt/rt1060/FactoryDataProviderImpl.cpp new file mode 100644 index 0000000000..3fac3c7385 --- /dev/null +++ b/src/platform/nxp/rt/rt1060/FactoryDataProviderImpl.cpp @@ -0,0 +1,381 @@ +/* + * + * Copyright (c) 2022-2024 Project CHIP Authors + * Copyright 2023-2024 NXP + * + * 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 "FactoryDataProviderImpl.h" + +#if defined(__cplusplus) +extern "C" { +#endif /* __cplusplus */ + +#include "fsl_dcp.h" +#include "mflash_drv.h" + +#if defined(__cplusplus) +} +#endif /* __cplusplus */ + +#ifndef FACTORY_DATA_PROVIDER_LOG +#define FACTORY_DATA_PROVIDER_LOG 0 +#endif + +#if FACTORY_DATA_PROVIDER_LOG +#include "fsl_debug_console.h" +#define FACTORY_DATA_PROVIDER_PRINTF(...) \ + PRINTF("[%s] ", __FUNCTION__); \ + PRINTF(__VA_ARGS__); \ + PRINTF("\n\r"); +#else +#define FACTORY_DATA_PROVIDER_PRINTF(...) +#endif + +#define BLOCK_SIZE_16_BYTES 16 +#define SHA256_OUTPUT_SIZE 32 +#define HASH_ID 0xCE47BA5E +#define HASH_LEN 4 +#define CBC_INITIAL_VECTOR_SIZE 16 + +/* Grab symbol for the base address from the linker file. */ +extern uint32_t __FACTORY_DATA_START_OFFSET[]; +extern uint32_t __FACTORY_DATA_SIZE[]; + +namespace chip { +namespace DeviceLayer { + +FactoryDataProviderImpl FactoryDataProviderImpl::sInstance; + +CHIP_ERROR FactoryDataProviderImpl::SearchForId(uint8_t searchedType, uint8_t * pBuf, size_t bufLength, uint16_t & length, + uint32_t * contentAddr) +{ + CHIP_ERROR err = CHIP_ERROR_NOT_FOUND; + uint8_t type = 0; + uint32_t index = 0; + uint8_t * addrContent = NULL; + uint8_t * factoryDataAddress = &factoryDataRamBuffer[0]; + uint32_t factoryDataSize = sizeof(factoryDataRamBuffer); + uint16_t currentLen = 0; + + while (index < factoryDataSize) + { + /* Read the type */ + memcpy((uint8_t *) &type, factoryDataAddress + index, sizeof(type)); + index += sizeof(type); + + /* Read the len */ + memcpy((uint8_t *) ¤tLen, factoryDataAddress + index, sizeof(currentLen)); + index += sizeof(currentLen); + + /* Check if the type gotten is the expected one */ + if (searchedType == type) + { + FACTORY_DATA_PROVIDER_PRINTF("type = %d, currentLen = %d, bufLength =%d", type, currentLen, bufLength); + /* If pBuf is null it means that we only want to know if the Type has been found */ + if (pBuf != NULL) + { + /* If the buffer given is too small, fill only the available space */ + if (bufLength < currentLen) + { + currentLen = bufLength; + } + memcpy((uint8_t *) pBuf, factoryDataAddress + index, currentLen); + } + length = currentLen; + if (contentAddr != NULL) + { + *contentAddr = (uint32_t) factoryDataAddress + index; + } + err = CHIP_NO_ERROR; + break; + } + else if (type == 0) + { + /* No more type available , break the loop */ + break; + } + else + { + /* Jump to next data */ + index += currentLen; + } + } + + return err; +} + +CHIP_ERROR FactoryDataProviderImpl::SignWithDacKey(const ByteSpan & digestToSign, MutableByteSpan & outSignBuffer) +{ + Crypto::P256ECDSASignature signature; + Crypto::P256Keypair keypair; + + VerifyOrReturnError(IsSpanUsable(outSignBuffer), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(IsSpanUsable(digestToSign), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(outSignBuffer.size() >= signature.Capacity(), CHIP_ERROR_BUFFER_TOO_SMALL); + + // In a non-exemplary implementation, the public key is not needed here. It is used here merely because + // Crypto::P256Keypair is only (currently) constructable from raw keys if both private/public keys are present. + Crypto::P256PublicKey dacPublicKey; + uint16_t certificateSize = 0; + uint32_t certificateAddr; + ReturnErrorOnFailure(SearchForId(FactoryDataId::kDacCertificateId, NULL, 0, certificateSize, &certificateAddr)); + MutableByteSpan dacCertSpan((uint8_t *) certificateAddr, certificateSize); + + /* Extract Public Key of DAC certificate from itself */ + ReturnErrorOnFailure(Crypto::ExtractPubkeyFromX509Cert(dacCertSpan, dacPublicKey)); + + /* Get private key of DAC certificate from reserved section */ + uint16_t keySize = 0; + uint32_t keyAddr; + ReturnErrorOnFailure(SearchForId(FactoryDataId::kDacPrivateKeyId, NULL, 0, keySize, &keyAddr)); + MutableByteSpan dacPrivateKeySpan((uint8_t *) keyAddr, keySize); + + ReturnErrorOnFailure(LoadKeypairFromRaw(ByteSpan(dacPrivateKeySpan.data(), dacPrivateKeySpan.size()), + ByteSpan(dacPublicKey.Bytes(), dacPublicKey.Length()), keypair)); + + ReturnErrorOnFailure(keypair.ECDSA_sign_msg(digestToSign.data(), digestToSign.size(), signature)); + + return CopySpanToMutableSpan(ByteSpan{ signature.ConstBytes(), signature.Length() }, outSignBuffer); +} + +CHIP_ERROR FactoryDataProviderImpl::LoadKeypairFromRaw(ByteSpan privateKey, ByteSpan publicKey, Crypto::P256Keypair & keypair) +{ + Crypto::P256SerializedKeypair serialized_keypair; + ReturnErrorOnFailure(serialized_keypair.SetLength(privateKey.size() + publicKey.size())); + memcpy(serialized_keypair.Bytes(), publicKey.data(), publicKey.size()); + memcpy(serialized_keypair.Bytes() + publicKey.size(), privateKey.data(), privateKey.size()); + return keypair.Deserialize(serialized_keypair); +} + +CHIP_ERROR FactoryDataProviderImpl::Init(void) +{ + uint16_t len; + status_t status; + uint32_t factoryDataAddress = (uint32_t) __FACTORY_DATA_START_OFFSET; + uint32_t factoryDataSize = (uint32_t) __FACTORY_DATA_SIZE; + uint32_t hashId; + uint8_t currentBlock[BLOCK_SIZE_16_BYTES]; + uint8_t calculatedHash[SHA256_OUTPUT_SIZE]; + size_t outputHashSize = sizeof(calculatedHash); + uint16_t i; + CHIP_ERROR res; + + /* Init mflash */ + status = mflash_drv_init(); + + if (status != kStatus_Success || factoryDataSize > sizeof(factoryDataRamBuffer)) + return CHIP_ERROR_INTERNAL; + + /* Read hash id saved in flash */ + if (mflash_drv_read(factoryDataAddress, (uint32_t *) &mHeader, sizeof(mHeader)) != kStatus_Success) + { + return CHIP_ERROR_INTERNAL; + } + + if (mHeader.hashId != HASH_ID) + { + return CHIP_ERROR_NOT_FOUND; + } + + /* Update address to start after hash id to read size of factory data */ + factoryDataAddress += sizeof(mHeader); + + /* Load the buffer into RAM by reading each 16 bytes blocks */ + for (i = 0; i < (factoryDataSize / BLOCK_SIZE_16_BYTES); i++) + { + if (mflash_drv_read(factoryDataAddress + i * BLOCK_SIZE_16_BYTES, (uint32_t *) ¤tBlock[0], sizeof(currentBlock)) != + kStatus_Success) + { + return CHIP_ERROR_INTERNAL; + } + + /* Decrypt data if an encryptMode is set */ + if (encryptMode != encrypt_none) + { + res = ReadEncryptedData(&factoryDataRamBuffer[i * BLOCK_SIZE_16_BYTES], ¤tBlock[0], sizeof(currentBlock)); + if (res != CHIP_NO_ERROR) + return res; + } + else + { + /* Store the block unencrypted */ + memcpy(&factoryDataRamBuffer[i * BLOCK_SIZE_16_BYTES], ¤tBlock[0], sizeof(currentBlock)); + } + } + + /* Calculate SHA256 value over the factory data and compare with stored value */ + res = Hash256(&factoryDataRamBuffer[0], mHeader.size, &calculatedHash[0], &outputHashSize); + + if (res != CHIP_NO_ERROR) + return res; + + if (memcmp(&calculatedHash[0], &mHeader.hash[0], HASH_LEN) != 0) + { + return CHIP_ERROR_NOT_FOUND; + } + + ReturnErrorOnFailure(SearchForId(FactoryDataId::kVerifierId, NULL, 0, len)); + FACTORY_DATA_PROVIDER_PRINTF("[%d] len = %d", FactoryDataId::kVerifierId, len); + ReturnErrorOnFailure(SearchForId(FactoryDataId::kSaltId, NULL, 0, len)); + FACTORY_DATA_PROVIDER_PRINTF("[%d] len = %d", FactoryDataId::kSaltId, len); + ReturnErrorOnFailure(SearchForId(FactoryDataId::kIcId, NULL, 0, len)); + FACTORY_DATA_PROVIDER_PRINTF("[%d] len = %d", FactoryDataId::kIcId, len); + ReturnErrorOnFailure(SearchForId(FactoryDataId::kDacPrivateKeyId, NULL, 0, len)); + FACTORY_DATA_PROVIDER_PRINTF("[%d] len = %d", FactoryDataId::kDacPrivateKeyId, len); + ReturnErrorOnFailure(SearchForId(FactoryDataId::kDacCertificateId, NULL, 0, len)); + FACTORY_DATA_PROVIDER_PRINTF("[%d] len = %d", FactoryDataId::kDacCertificateId, len); + ReturnErrorOnFailure(SearchForId(FactoryDataId::kPaiCertificateId, NULL, 0, len)); + FACTORY_DATA_PROVIDER_PRINTF("[%d] len = %d", FactoryDataId::kPaiCertificateId, len); + ReturnErrorOnFailure(SearchForId(FactoryDataId::kDiscriminatorId, NULL, 0, len)); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR FactoryDataProviderImpl::SetAes128Key(const uint8_t * keyAes128) +{ + CHIP_ERROR error = CHIP_ERROR_INVALID_ARGUMENT; + if (keyAes128 != nullptr) + { + pAesKey = keyAes128; + error = CHIP_NO_ERROR; + } + return error; +} + +CHIP_ERROR FactoryDataProviderImpl::SetKeySelected(KeySelect key) +{ + CHIP_ERROR error = CHIP_ERROR_INVALID_ARGUMENT; + if (key <= kDCP_OCOTPKeyHigh) + { + selectedKey = key; + error = CHIP_NO_ERROR; + } + return error; +} + +void FactoryDataProviderImpl::SetDCP_OTPKeySelect(void) +{ + switch (selectedKey) + { + case kDCP_OTPMKKeyLow: + IOMUXC_GPR->GPR3 &= ~(1 << IOMUXC_GPR_GPR3_DCP_KEY_SEL_SHIFT); + IOMUXC_GPR->GPR10 &= ~(1 << IOMUXC_GPR_GPR10_DCPKEY_OCOTP_OR_KEYMUX_SHIFT); + break; + case kDCP_OTPMKKeyHigh: + IOMUXC_GPR->GPR3 |= (1 << IOMUXC_GPR_GPR3_DCP_KEY_SEL_SHIFT); + IOMUXC_GPR->GPR10 &= ~(1 << IOMUXC_GPR_GPR10_DCPKEY_OCOTP_OR_KEYMUX_SHIFT); + break; + case kDCP_OCOTPKeyLow: + IOMUXC_GPR->GPR3 &= ~(1 << IOMUXC_GPR_GPR3_DCP_KEY_SEL_SHIFT); + IOMUXC_GPR->GPR10 |= (1 << IOMUXC_GPR_GPR10_DCPKEY_OCOTP_OR_KEYMUX_SHIFT); + break; + case kDCP_OCOTPKeyHigh: + IOMUXC_GPR->GPR3 |= (1 << IOMUXC_GPR_GPR3_DCP_KEY_SEL_SHIFT); + IOMUXC_GPR->GPR10 |= (1 << IOMUXC_GPR_GPR10_DCPKEY_OCOTP_OR_KEYMUX_SHIFT); + break; + default: + break; + } +} + +CHIP_ERROR FactoryDataProviderImpl::SetCbcInitialVector(const uint8_t * iv, uint16_t ivSize) +{ + CHIP_ERROR error = CHIP_ERROR_INVALID_ARGUMENT; + if (ivSize == CBC_INITIAL_VECTOR_SIZE) + { + cbcInitialVector = iv; + error = CHIP_NO_ERROR; + } + return error; +} + +CHIP_ERROR FactoryDataProviderImpl::SetEncryptionMode(EncryptionMode mode) +{ + CHIP_ERROR error = CHIP_ERROR_INVALID_ARGUMENT; + if (mode <= encrypt_cbc) + { + encryptMode = mode; + error = CHIP_NO_ERROR; + } + return error; +} + +CHIP_ERROR FactoryDataProviderImpl::ReadEncryptedData(uint8_t * desBuff, uint8_t * sourceAddr, uint16_t sizeToRead) +{ + status_t status; + dcp_handle_t m_handle; + dcp_config_t dcpConfig; + + /* Check that the length is aligned on 16 bytes */ + if ((sizeToRead % 16) != 0) + return CHIP_ERROR_INVALID_ARGUMENT; + + /* Check that the soft key has been correclty provisioned */ + if (selectedKey == kDCP_UseSoftKey && pAesKey == nullptr) + return CHIP_ERROR_INVALID_ARGUMENT; + + /* Check if the initial vector has been provisioned if CBC mode is chosen */ + if (encryptMode == encrypt_cbc && cbcInitialVector == nullptr) + return CHIP_ERROR_INVALID_ARGUMENT; + + if (!dcpDriverIsInitialized) + { + /* Initialize DCP */ + DCP_GetDefaultConfig(&dcpConfig); + SetDCP_OTPKeySelect(); + /* Reset and initialize DCP */ + DCP_Init(DCP, &dcpConfig); + dcpDriverIsInitialized = true; + } + + m_handle.channel = kDCP_Channel0; + m_handle.swapConfig = kDCP_NoSwap; + + if (selectedKey == kDCP_UseSoftKey) + m_handle.keySlot = kDCP_KeySlot0; + else + m_handle.keySlot = kDCP_OtpKey; + + status = DCP_AES_SetKey(DCP, &m_handle, pAesKey, 16); + if (status != kStatus_Success) + return CHIP_ERROR_INTERNAL; + + if (encryptMode == encrypt_ecb) + DCP_AES_DecryptEcb(DCP, &m_handle, sourceAddr, desBuff, sizeToRead); + else + DCP_AES_DecryptCbc(DCP, &m_handle, sourceAddr, desBuff, sizeToRead, cbcInitialVector); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR FactoryDataProviderImpl::Hash256(const uint8_t * input, size_t inputSize, uint8_t * output, size_t * outputSize) +{ + status_t status; + dcp_handle_t m_handle; + + m_handle.channel = kDCP_Channel0; + m_handle.swapConfig = kDCP_NoSwap; + m_handle.keySlot = kDCP_KeySlot0; + + status = DCP_HASH(DCP, &m_handle, kDCP_Sha256, input, inputSize, output, outputSize); + + if (status != kStatus_Success) + return CHIP_ERROR_INTERNAL; + + return CHIP_NO_ERROR; +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/rt/rt1060/FactoryDataProviderImpl.h b/src/platform/nxp/rt/rt1060/FactoryDataProviderImpl.h new file mode 100644 index 0000000000..6eb65fab72 --- /dev/null +++ b/src/platform/nxp/rt/rt1060/FactoryDataProviderImpl.h @@ -0,0 +1,104 @@ +/* + * + * Copyright (c) 2022-2024 Project CHIP Authors + * Copyright 2023-2024 NXP + * + * 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 + +#define FACTORY_DATA_MAX_SIZE 4096 + +namespace chip { +namespace DeviceLayer { + +/** + * @brief This class provides Commissionable data and Device Attestation Credentials. + * + * This implementation allows to use the DCP RT1060 hardware module to load the Matter factory + * dataset in RAM at the boot. + * + * Depending on how the dataset have been encrypted, specific AES hardware of software keys can be + * used. + * + * Example of calls for loading the dataset using a software key: + * + * FactoryDataPrvdImpl().SetEncryptionMode(FactoryDataProvider::encrypt_ecb); + * FactoryDataPrvdImpl().SetAes128Key(&aes128TestKey[0]); + * FactoryDataPrvdImpl().Init(); + * + * Example of calls for loading the dataset using a OTP key: + * + * FactoryDataPrvdImpl().SetEncryptionMode(FactoryDataProvider::encrypt_ecb); + * FactoryDataPrvdImpl().SetKeySelected(KeySelect::); + * FactoryDataPrvdImpl().Init(); + */ + +class FactoryDataProviderImpl : public FactoryDataProvider +{ +public: + enum KeySelect + { + kDCP_UseSoftKey = 0U, + kDCP_OTPMKKeyLow = 1U, /* Use [127:0] from snvs key as dcp key */ + kDCP_OTPMKKeyHigh = 2U, /* Use [255:128] from snvs key as dcp key */ + kDCP_OCOTPKeyLow = 3U, /* Use [127:0] from ocotp key as dcp key */ + kDCP_OCOTPKeyHigh = 4U /* Use [255:128] from ocotp key as dcp key */ + }; + + static FactoryDataProviderImpl sInstance; + + CHIP_ERROR Init(void); + CHIP_ERROR SearchForId(uint8_t searchedType, uint8_t * pBuf, size_t bufLength, uint16_t & length, + uint32_t * contentAddr = NULL); + CHIP_ERROR SignWithDacKey(const ByteSpan & digestToSign, MutableByteSpan & outSignBuffer); + + CHIP_ERROR SetAes128Key(const uint8_t * keyAes128); + CHIP_ERROR SetKeySelected(KeySelect key); + CHIP_ERROR SetEncryptionMode(EncryptionMode mode); + CHIP_ERROR SetCbcInitialVector(const uint8_t * iv, uint16_t ivSize); + +private: + struct Header + { + uint32_t hashId; + uint32_t size; + uint8_t hash[4]; + }; + uint8_t factoryDataRamBuffer[FACTORY_DATA_MAX_SIZE]; + Header mHeader; + const uint8_t * pAesKey = nullptr; + const uint8_t * cbcInitialVector = nullptr; + EncryptionMode encryptMode = encrypt_none; + KeySelect selectedKey; + bool dcpDriverIsInitialized; + void SetDCP_OTPKeySelect(void); + CHIP_ERROR ReadEncryptedData(uint8_t * desBuff, uint8_t * sourceAddr, uint16_t sizeToRead); + CHIP_ERROR Hash256(const uint8_t * input, size_t inputSize, uint8_t * output, size_t * outputSize); + CHIP_ERROR LoadKeypairFromRaw(ByteSpan privateKey, ByteSpan publicKey, Crypto::P256Keypair & keypair); +}; + +inline FactoryDataProvider & FactoryDataPrvd() +{ + return FactoryDataProviderImpl::sInstance; +} + +inline FactoryDataProviderImpl & FactoryDataPrvdImpl() +{ + return FactoryDataProviderImpl::sInstance; +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/rt/rt1060/InetPlatformConfig.h b/src/platform/nxp/rt/rt1060/InetPlatformConfig.h new file mode 100644 index 0000000000..b9153fd9f1 --- /dev/null +++ b/src/platform/nxp/rt/rt1060/InetPlatformConfig.h @@ -0,0 +1,40 @@ +/* + * + * Copyright (c) 2020-2022 Project CHIP Authors + * Copyright (c) 2020 Google LLC. + * 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 + * Platform-specific configuration overrides for the CHIP Inet + * Layer on RT1060 platforms using the NXP SDK. + * + */ + +#pragma once + +#include + +// ==================== Platform Adaptations ==================== + +/* Default NXP Platform adaptations are used */ + +// ========== Platform-specific Configuration Overrides ========= + +/* Default NXP Platform configuration overrides are used */ + +// Include default nxp platform configurations +#include "platform/nxp/common/InetNXPPlatformDefaultConfig.h" diff --git a/src/platform/nxp/rt/rt1060/PlatformManagerImpl.cpp b/src/platform/nxp/rt/rt1060/PlatformManagerImpl.cpp new file mode 100644 index 0000000000..8ecdf01e9c --- /dev/null +++ b/src/platform/nxp/rt/rt1060/PlatformManagerImpl.cpp @@ -0,0 +1,548 @@ +/* + * + * Copyright (c) 2020-2024 Project CHIP Authors + * Copyright (c) 2020 Nest Labs, Inc. + * Copyright 2023-2024 NXP + * 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 + * Provides an implementation of the PlatformManager object + * for RT1060 platforms using the NXP RT1060 SDK. + */ +/* this file behaves like a config.h, comes first */ +#include + +#include "DiagnosticDataProviderImpl.h" +#include "fsl_adapter_rng.h" +#include "fsl_os_abstraction.h" +#include "fwk_platform_coex.h" +#include "ksdk_mbedtls.h" +#include +#include +#include +#include +#include + +#ifdef WATCHDOG_ALLOWED +#include "fsl_wdog.h" +#endif + +#include + +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR +#include "OtaSupport.h" +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#include "fwk_platform_ot.h" +#include "ot_platform_common.h" +#if CHIP_DEVICE_CONFIG_CHIPOBLE_DISABLE_ADVERTISING_WHEN_PROVISIONED +#include "lib/spinel/spinel.h" +#define OT_NXP_SPINEL_PROP_VENDOR_BLE_STATE SPINEL_PROP_VENDOR__BEGIN +#endif /* CHIP_DEVICE_CONFIG_CHIPOBLE_DISABLE_ADVERTISING_WHEN_PROVISIONED */ +#endif + +#if !CHIP_DEVICE_CONFIG_ENABLE_THREAD && !CHIP_DEVICE_CONFIG_ENABLE_WPA + +#include "board.h" +#include "clock_config.h" +#include "fsl_phy.h" +#include "fsl_silicon_id.h" +#include "pin_mux.h" + +#include "fsl_enet_mdio.h" +#include "fsl_phyksz8081.h" + +#include "enet_ethernetif.h" +#include "fsl_debug_console.h" +#include "lwip/netif.h" +#include "lwip/netifapi.h" +#include "lwip/opt.h" +#include "lwip/tcpip.h" +#include "netif/ethernet.h" + +//----LWIP defines----// + +/* Address of PHY interface. */ +#define EXAMPLE_PHY_ADDRESS BOARD_ENET0_PHY_ADDRESS + +/* MDIO operations. */ +#define EXAMPLE_MDIO_OPS enet_ops + +/* PHY operations. */ +#define EXAMPLE_PHY_OPS phyksz8081_ops + +/* ENET clock frequency. */ +#define EXAMPLE_CLOCK_FREQ CLOCK_GetFreq(kCLOCK_IpgClk) + +#ifndef EXAMPLE_NETIF_INIT_FN +/*! @brief Network interface initialization function. */ +#define EXAMPLE_NETIF_INIT_FN ethernetif0_init +#endif /* EXAMPLE_NETIF_INIT_FN */ + +/*! @brief Stack size of the temporary lwIP initialization thread. */ +#define INIT_THREAD_STACKSIZE 1024 + +/*! @brief Priority of the temporary lwIP initialization thread. */ +#define INIT_THREAD_PRIO DEFAULT_THREAD_PRIO + +static mdio_handle_t mdioHandle = { .ops = &EXAMPLE_MDIO_OPS }; +static phy_handle_t phyHandle = { .phyAddr = EXAMPLE_PHY_ADDRESS, .mdioHandle = &mdioHandle, .ops = &EXAMPLE_PHY_OPS }; + +#endif + +extern "C" void BOARD_InitHardware(void); +extern "C" void otPlatSetResetFunction(void (*fp)(void)); +extern "C" void initiateResetInIdle(void); + +#if CHIP_DEVICE_CONFIG_ENABLE_WPA + +/* +Currently only IW612 and K32W0 support controller initialization in the connectivity framework +* Include should be removed otherwise it will introduce double firmware definition +*/ +#ifndef WIFI_IW612_BOARD_MURATA_2EL_M2 +#include "wlan_bt_fw.h" +#endif + +extern "C" { +#include "wlan.h" +#include "wm_net.h" +} + +#endif /* CHIP_DEVICE_CONFIG_ENABLE_WPA */ + +extern "C" void vApplicationMallocFailedHook(void) +{ + ChipLogError(DeviceLayer, "Malloc Failure"); +} + +#if WIFI_PTA_ENABLED && (CHIP_DEVICE_CONFIG_ENABLE_WPA && CHIP_ENABLE_OPENTHREAD) +#ifdef SD8801 +#define HOSTCMD_RESP_BUFF_SIZE 1024 +/* 8801 command buffer to enable External Coexistence. + * Source: SDK 2.11.1, wifi_cli demo, wlan_tests.c file. */ +const uint8_t ext_coex_8801_cmd_buf[] = { 0xe0, 0, 0x1d, 0, 0x17, 0, 0, 0, 0x01, 0, 0, 0, 0x2f, 0x02, 0x0d, + 0x00, 0x01, 0, 0, 0x03, 0x01, 0x02, 0x01, 0x01, 0x00, 0x28, 0x00, 0x3c, 0x00 }; +#endif + +static CHIP_ERROR EnableWiFiCoexistence(void) +{ + CHIP_ERROR ret = CHIP_NO_ERROR; + +#ifdef SD8801 + int status = WM_FAIL; + uint8_t * rspBuff = NULL; + uint32_t reqd_len = 0; + + rspBuff = (uint8_t *) pvPortMalloc(HOSTCMD_RESP_BUFF_SIZE); + if (rspBuff != NULL) + { + status = wlan_send_hostcmd((void *) ext_coex_8801_cmd_buf, sizeof(ext_coex_8801_cmd_buf) / sizeof(u8_t), rspBuff, + HOSTCMD_RESP_BUFF_SIZE, &reqd_len); + + if (status == WM_SUCCESS) + { + ChipLogProgress(DeviceLayer, "8801 Coexistence enabled"); + } + else + { + ChipLogError(DeviceLayer, "8801 Coexistence enabling failed = %d", status); + ret = CHIP_ERROR_INTERNAL; + } + + vPortFree(rspBuff); + } + else + { + ChipLogError(DeviceLayer, "Failed to allocate memory for Wi-Fi coexistence response buffer"); + } +#else + ChipLogError(DeviceLayer, "This chip does not support Wi-Fi and OpenThread coexistence"); + ret = CHIP_ERROR_INTERNAL; +#endif + + return ret; +} +#endif + +#if !CHIP_DEVICE_CONFIG_ENABLE_WPA +extern "C" void vApplicationIdleHook(void) +{ + chip::DeviceLayer::PlatformManagerImpl::IdleHook(); +} +#endif + +extern "C" void __wrap_exit(int __status) +{ + ChipLogError(DeviceLayer, "======> error exit function !!!"); + assert(0); +} + +namespace chip { +namespace DeviceLayer { + +PlatformManagerImpl PlatformManagerImpl::sInstance; + +void PlatformManagerImpl::HardwareInit(void) +{ + BOARD_InitHardware(); + SysTick_Config(SystemCoreClock / configTICK_RATE_HZ); +} + +CHIP_ERROR PlatformManagerImpl::ServiceInit(void) +{ + status_t status; + CHIP_ERROR chipRes = CHIP_NO_ERROR; + + status = CRYPTO_InitHardware(); + + if (status != 0) + { + chipRes = CHIP_ERROR_INTERNAL; + ChipLogError(DeviceLayer, "Crypto hardware init error"); + } + + return chipRes; +} + +/* For IW612 transceiver firmware initialization is done by PLATFORM_InitControllers */ +#ifndef WIFI_IW612_BOARD_MURATA_2EL_M2 +#if CHIP_DEVICE_CONFIG_ENABLE_WPA +CHIP_ERROR PlatformManagerImpl::WiFiInterfaceInit(void) +{ + CHIP_ERROR result = CHIP_NO_ERROR; + int wifi_status = WM_SUCCESS; + + ChipLogProgress(DeviceLayer, "Initialize WLAN"); + +#if defined(SD8801) && CHIP_ENABLE_OPENTHREAD + /* + * The 88W8801 is quirky with the REQ & PRIO lines + * at boot: they need to be held HIGH while booting. + * So disable the coexistence mechanism on the RCP, + * since internally this puts the lines HIGH. + */ + otPlatRadioSetCoexEnabled(NULL, false); +#endif + + wifi_status = wlan_init(wlan_fw_bin, wlan_fw_bin_len); + if (wifi_status != WM_SUCCESS) + { + ChipLogError(DeviceLayer, "WLAN initialization failed"); + result = CHIP_ERROR_INTERNAL; + } + else + { + ChipLogProgress(DeviceLayer, "WLAN initialized"); + } + +#if WIFI_PTA_ENABLED && (CHIP_ENABLE_OPENTHREAD) + if (result == CHIP_NO_ERROR) + { + /* In case we have both Wi-Fi and OpenThread active, enable coexistence on Wi-Fi side */ + if (EnableWiFiCoexistence() != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Failed to initialize Wi-Fi and OpenThread coexistence"); + } + } +#endif +#if defined(SD8801) && CHIP_ENABLE_OPENTHREAD + /* + * Re-enabling the coexistence is done here because enabling it too fast + * can lead to unexpected hangs of the coexistence mechanism. Up to this point, + * all the 15.4 requests will be 'pass-through' i.e. will always be granted + * access. + */ + otPlatRadioSetCoexEnabled(NULL, true); +#endif + + return result; +} +#endif +#endif + +#if !CHIP_DEVICE_CONFIG_ENABLE_THREAD && !CHIP_DEVICE_CONFIG_ENABLE_WPA +CHIP_ERROR PlatformManagerImpl::EthernetInterfaceInit() +{ + + static struct netif netif; + ethernetif_config_t enet_config = { + .phyHandle = &phyHandle, +#ifdef configMAC_ADDR + .macAddress = configMAC_ADDR, +#endif + }; + + mdioHandle.resource.csrClock_Hz = EXAMPLE_CLOCK_FREQ; + +#ifndef configMAC_ADDR + /* Set special address for each chip. */ + (void) SILICONID_ConvertToMacAddr(&enet_config.macAddress); +#endif + + netifapi_netif_add(&netif, &enet_config, EXAMPLE_NETIF_INIT_FN, tcpip_input); + + netifapi_netif_set_default(&netif); + netifapi_netif_set_up(netif_default); + LOCK_TCPIP_CORE(); + netif_create_ip6_linklocal_address(netif_default, 1); + UNLOCK_TCPIP_CORE(); + + vTaskDelay(pdMS_TO_TICKS(1500)); + + for (uint8_t i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) + { + const char * str_ip = "-"; + if (ip6_addr_isvalid(netif_ip6_addr_state(netif_default, i))) + { + str_ip = ip6addr_ntoa(netif_ip6_addr(netif_default, i)); + } + PRINTF(" IPv6 Address%d : %s\r\n", i, str_ip); + } + PRINTF("************************************************\r\n"); + + if (netif_is_up(&netif)) + { + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_NOT_CONNECTED; +} +#endif + +CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) +{ + CHIP_ERROR err = CHIP_ERROR_INTERNAL; + int osError; + + /* Initialize platform services */ + err = ServiceInit(); + SuccessOrExit(err); + + // Initialize the configuration system. + err = Internal::NXPConfig::Init(); + SuccessOrExit(err); + + SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); + SetDiagnosticDataProvider(&DiagnosticDataProviderImpl::GetDefaultInstance()); + +#if CHIP_DEVICE_CONFIG_ENABLE_WPA + /* Initialize LwIP via Wi-Fi layer. */ + net_ipv4stack_init(); +#else + /* Initialize LwIP directly. */ + tcpip_init(NULL, NULL); +#endif + +/* Currently only IW612 and K32W0 support controller initialization in the connectivity framework */ +#ifdef WIFI_IW612_BOARD_MURATA_2EL_M2 + /* Init the controller by giving as an arg the connectivity supported */ + PLATFORM_InitControllers(connBle_c +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + | conn802_15_4_c +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WPA + | connWlan_c +#endif + ); +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + PLATFORM_InitOt(); + /* + * Initialize the RCP here: the WiFi initialization requires to enable/disable + * coexistence through the Spinel interface; as such, the otPlatRadioInit() call + * will fail if done afterwards + */ + otPlatLogInit(); + otPlatRadioInit(); + otPlatSetResetFunction(initiateResetInIdle); + otPlatRandomInit(); +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_WPA + osError = OSA_SetupIdleFunction(chip::DeviceLayer::PlatformManagerImpl::IdleHook); + if (osError != WM_SUCCESS) + { + ChipLogError(DeviceLayer, "Failed to setup idle function"); + err = CHIP_ERROR_NO_MEMORY; + goto exit; + } + +/* For IW612 transceiver firmware initialization is done by PLATFORM_InitControllers */ +#ifndef WIFI_IW612_BOARD_MURATA_2EL_M2 + err = WiFiInterfaceInit(); +#endif + + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(DeviceLayer, + "Wi-Fi module initialization failed. Make sure the Wi-Fi/BLE module is properly configured and connected " + "with the board and start again!"); + chipDie(); + } + ChipLogProgress(DeviceLayer, "Wi-Fi module initialization done."); +#elif !CHIP_DEVICE_CONFIG_ENABLE_THREAD + err = EthernetInterfaceInit(); + + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(DeviceLayer, + "LWIP interface initialization failed. Make sure there is internet conectivity on the board and reset!"); + chipDie(); + } + ChipLogProgress(DeviceLayer, "LWIP interface initialization done"); +#endif + + // Call _InitChipStack() on the generic implementation base class + // to finish the initialization process. + err = Internal::GenericPlatformManagerImpl_FreeRTOS::_InitChipStack(); + SuccessOrExit(err); + + err = System::Clock::InitClock_RealTime(); + SuccessOrExit(err); + + mStartTime = System::SystemClock().GetMonotonicTimestamp(); + +exit: + return err; +} + +void PlatformManagerImpl::SaveSettings(void) +{ +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + otPlatSaveSettingsIdle(); +#endif +} + +void PlatformManagerImpl::IdleHook(void) +{ + +#ifdef WATCHDOG_ALLOWED + WDOG_Refresh(WDOG1); +#endif + + bool isResetScheduled = PlatformMgrImpl().GetResetInIdleValue(); + if (isResetScheduled) + { + /* + * In case a reset in IDLE has been scheduled + * Disable IRQs so that the idle task won't be preempted until the reset + */ + OSA_InterruptDisable(); + } + + chip::DeviceLayer::Internal::NXPConfig::RunSystemIdleTask(); + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + SaveSettings(); +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR + /* Resume OTA Transactions in Idle task */ + OTA_TransactionResume(); +#endif + + /* + * In case a reset in idle operation has been posted, + * reset the device after having run the idle function + */ + if (isResetScheduled) + { + PlatformMgrImpl().Reset(); + } +} + +void PlatformManagerImpl::Reset(void) +{ + ChipLogProgress(DeviceLayer, "System restarting"); + // Restart the system. + NVIC_SystemReset(); + while (1) + { + } +} + +void PlatformManagerImpl::ScheduleResetInIdle(void) +{ + resetInIdle = true; +} + +bool PlatformManagerImpl::GetResetInIdleValue(void) +{ + return resetInIdle; +} + +extern "C" void initiateResetInIdle(void) +{ + PlatformMgr().Shutdown(); + PlatformMgrImpl().ScheduleResetInIdle(); +} + +extern "C" void scheduleResetInIdle(void) +{ + PlatformMgrImpl().ScheduleResetInIdle(); +} + +extern "C" bool getResetInIdleValue(void) +{ + return PlatformMgrImpl().GetResetInIdleValue(); +} + +void PlatformManagerImpl::StopBLEConnectivity(void) +{ +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + otPlatRadioSendSetPropVendorUint8Cmd(OT_NXP_SPINEL_PROP_VENDOR_BLE_STATE, 0); +#endif /* #if CHIP_DEVICE_CONFIG_ENABLE_THREAD */ +} + +void PlatformManagerImpl::_Shutdown() +{ + uint64_t upTime = 0; + + if (GetDiagnosticDataProvider().GetUpTime(upTime) == CHIP_NO_ERROR) + { + uint32_t totalOperationalHours = 0; + + if (ConfigurationMgr().GetTotalOperationalHours(totalOperationalHours) == CHIP_NO_ERROR) + { + ConfigurationMgr().StoreTotalOperationalHours(totalOperationalHours + static_cast(upTime / 3600)); + } + else + { + ChipLogError(DeviceLayer, "Failed to get total operational hours of the Node"); + } + } + else + { + ChipLogError(DeviceLayer, "Failed to get current uptime since the Node’s last reboot"); + } + + /* Handle the server shutting down & emit the ShutDown event*/ + PlatformMgr().HandleServerShuttingDown(); + /* Shutdown all layers */ + Internal::GenericPlatformManagerImpl_FreeRTOS::_Shutdown(); +} + +} // namespace DeviceLayer +} // namespace chip + +extern "C" void mt_wipe(void) +{ + chip::DeviceLayer::Internal::NXPConfig::FactoryResetConfig(); +} diff --git a/src/platform/nxp/rt/rt1060/SystemPlatformConfig.h b/src/platform/nxp/rt/rt1060/SystemPlatformConfig.h new file mode 100644 index 0000000000..17f3c18dd3 --- /dev/null +++ b/src/platform/nxp/rt/rt1060/SystemPlatformConfig.h @@ -0,0 +1,40 @@ +/* + * + * Copyright (c) 2020-2022 Project CHIP Authors + * Copyright (c) 2020 Google LLC. + * 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 + * Platform-specific configuration overrides for the CHIP System + * Layer on NXP RT1060 Platforms. + * + */ + +#pragma once + +#include + +// ==================== Platform Adaptations ==================== + +/* Default NXP Platform adaptations are used */ + +// ========== Platform-specific Configuration Overrides ========= + +/* Default NXP Platform configuration overrides are used */ + +// Include default nxp platform configurations +#include "platform/nxp/common/SystemNXPPlatformDefaultConfig.h" diff --git a/src/platform/nxp/rt/rt1060/args.gni b/src/platform/nxp/rt/rt1060/args.gni new file mode 100644 index 0000000000..b5fe5340f8 --- /dev/null +++ b/src/platform/nxp/rt/rt1060/args.gni @@ -0,0 +1,57 @@ +# Copyright (c) 2020-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. + +import("//build_overrides/chip.gni") +import("//build_overrides/nxp_sdk.gni") + +rt_platform = "rt1060" +nxp_platform = "rt/${rt_platform}" +nxp_sdk_name = "rt_sdk" +chip_device_platform = "nxp" +lwip_platform = "nxp" + +# ARM architecture flags will be set based on NXP board. +arm_platform_config = "${nxp_sdk_build_root}/${nxp_sdk_name}/nxp_arm.gni" + +chip_device_project_config_include = "" +chip_project_config_include = "" +chip_inet_project_config_include = "" +chip_system_project_config_include = "" +chip_ble_project_config_include = "" + +chip_build_tests = false + +#This enables the EventList global attribute +enable_eventlist_attribute = true + +# TODO : Enable the OTA Requestor by default. +# This requires the mcuboot bootloader to be used, which reserves the first 256 kB of the flash. +# If mcuboot is not used, "no_mcuboot" must be set to true in the gn gen build command +# in order for the application to be linked at the base of the flash. +#chip_enable_ota_requestor = true +declare_args() { + # TODO : set no_mcuboot to false by default when enabling ota requestor by default + no_mcuboot = true + + chip_enable_secondary_nwk_if = false +} + +mbedtls_target = "${nxp_sdk_build_root}:nxp_mbedtls" + +openthread_external_mbedtls = mbedtls_target +openthread_project_core_config_file = "OpenThreadConfig.h" +openthread_core_config_deps = [ "${chip_root}/third_party/openthread/platforms/nxp/${nxp_platform}:openthread_core_config_rt1060" ] +openthread_core_config_platform_check_file = + "openthread-core-rt1060-config-check.h" +openthread_external_platform = "${chip_root}/third_party/openthread/platforms/nxp/${nxp_platform}:libopenthread-rt1060" diff --git a/src/platform/nxp/rt/rt1170/BUILD.gn b/src/platform/nxp/rt/rt1170/BUILD.gn new file mode 100644 index 0000000000..4bfd1034a7 --- /dev/null +++ b/src/platform/nxp/rt/rt1170/BUILD.gn @@ -0,0 +1,190 @@ +# Copyright (c) 2021 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/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/nxp_sdk.gni") +import("//build_overrides/openthread.gni") +import("${chip_root}/src/platform/device.gni") + +# If external SDK is used, do not import ${nxp_sdk_name}.gni +if (!nxp_external_sdk) { + import("${nxp_sdk_build_root}/${nxp_sdk_name}/${nxp_sdk_name}.gni") +} + +import("${nxp_sdk_build_root}/nxp_sdk.gni") + +assert(chip_device_platform == "nxp") + +source_set("nxp_factory_data") { +} +source_set("nxp_ota") { +} + +config("nxp_platform_config") { + defines = [ "EXTERNAL_BLEMANAGERIMPL_HEADER=\"platform/nxp/common/ble_zephyr/BLEManagerImpl.h\"" ] + include_dirs = [ + ".", + "../../common", + ] + if (chip_with_factory_data == 1) { + include_dirs += [ + ".", + "../../common/factory_data", + ] + defines += [ + "CONFIG_CHIP_PLAT_LOAD_REAL_FACTORY_DATA=1", + "CONFIG_CHIP_ENCRYPTED_FACTORY_DATA=1", + ] + defines += [ "EXTERNAL_FACTORY_DATA_PROVIDER_IMPL_HEADER=\"platform/nxp/common/factory_data/FactoryDataProviderFwkImpl.h\"" ] + } + + # When OTBR is enabled Thread network commissioning cluster is enabled using chip_enable_secondary_nwk_if + if (chip_enable_wifi && chip_enable_openthread && + !chip_enable_secondary_nwk_if) { + defines += [ "_NO_GENERIC_THREAD_NETWORK_COMMISSIONING_DRIVER_" ] + } +} + +static_library("nxp_platform") { + output_name = "libCHIP_NXP_Port_RT1170" + cflags = [ + "-Wno-conversion", + "-Wno-sign-compare", + ] + deps = [] + defines = [] + sources = [ + "../../../FreeRTOS/SystemTimeSupport.cpp", + "../../../SingletonConfigurationManager.cpp", + "../../common/CHIPDevicePlatformEvent.h", + "../../common/ConfigurationManagerImpl.cpp", + "../../common/ConfigurationManagerImpl.h", + "../../common/ConnectivityManagerImpl.cpp", + "../../common/ConnectivityManagerImpl.h", + "../../common/DiagnosticDataProviderImpl.cpp", + "../../common/DiagnosticDataProviderImpl.h", + "../../common/KeyValueStoreManagerImpl.cpp", + "../../common/KeyValueStoreManagerImpl.h", + "../../common/Logging.cpp", + "../../common/NXPConfig.cpp", + "../../common/NXPConfig.h", + "../../common/NetworkProvisioningServerImpl.h", + "../../common/PlatformManagerImpl.h", + "../../common/SoftwareUpdateManagerImpl.h", + "../../common/ram_storage.c", + "../../common/ram_storage.h", + "CHIPDevicePlatformConfig.h", + "PlatformManagerImpl.cpp", + ] + + if (chip_enable_ble) { + sources += [ + # Adding random file which defines the function sys_csrand_get which is called by BLEManagerImpl from Zephyr + "${nxp_sdk_build_root}/rt_sdk/sdk_hook/zephyr/random/random.cpp", + "../../common/ble_zephyr/BLEAdvertisingArbiter.cpp", + "../../common/ble_zephyr/BLEManagerImpl.cpp", + "../../common/ble_zephyr/BLEManagerImpl.h", + ] + } + + public_deps = [ "${chip_root}/src/platform:platform_base" ] + + deps += [ + "${chip_root}/src/lib/dnssd:constants", + "${chip_root}/src/platform/logging:headers", + ] + + # define CHIP_PLAT_NVM_SUPPORT - See NXPConfig.cpp for definition + if (nxp_nvm_component == "nvm_fwk") { + defines += [ "CHIP_PLAT_NVM_SUPPORT=1" ] + } else if (nxp_nvm_component == "littlefs") { + defines += [ "CHIP_PLAT_NVM_SUPPORT=2" ] + } + + if (chip_enable_wifi) { + sources += [ + "../../common/NetworkCommissioningDriver.h", + "../../common/NetworkCommissioningWiFiDriver.cpp", + ] + } + if (chip_enable_ota_requestor) { + sources += [ + "../../common/OTAImageProcessorImpl.cpp", + "../../common/OTAImageProcessorImpl.h", + ] + } + + if (chip_enable_openthread) { + sources += [ + # Temporary fix, to be revert once PR #34662 is merged, build issue when using GN check argument + "${chip_root}/src/app/clusters/thread-border-router-management-server/thread-br-delegate.h", + "../../../OpenThread/GenericThreadBorderRouterDelegate.cpp", + "../../../OpenThread/GenericThreadBorderRouterDelegate.h", + "../../../OpenThread/OpenThreadUtils.cpp", + "../../common/ThreadStackManagerImpl.cpp", + "../../common/ThreadStackManagerImpl.h", + ] + + deps += [ "${chip_root}/src/app/common:ids" ] + + if (!nxp_build_matter_standalone_lib) { + deps += [ "${chip_root}/third_party/openthread:openthread" ] + public_deps += + [ "${chip_root}/third_party/openthread:openthread-platform" ] + } + + # dep required to include 'lib/spinel/spinel.h' in PlatformManagerImpl.cpp + deps += [ "${openthread_root}:libopenthread-spinel-rcp" ] + + if (chip_mdns == "platform") { + if (chip_enable_wifi) { + sources += [ + "../../../OpenThread/OpenThreadDnssdImpl.cpp", + "../../../OpenThread/OpenThreadDnssdImpl.h", + "../../common/DnssdImpl.cpp", + "../../common/DnssdImplBr.cpp", + "../../common/DnssdImplBr.h", + ] + } else { + sources += [ + "../../../OpenThread/DnssdImpl.cpp", + "../../../OpenThread/OpenThreadDnssdImpl.cpp", + "../../../OpenThread/OpenThreadDnssdImpl.h", + ] + } + deps += [ "${chip_root}/src/lib/dnssd:platform_header" ] + } + } + + if (chip_with_factory_data == 1) { + sources += [ + "../../common/factory_data/FactoryDataProvider.cpp", + "../../common/factory_data/FactoryDataProvider.h", + "../../common/factory_data/FactoryDataProviderFwkImpl.cpp", + "../../common/factory_data/FactoryDataProviderFwkImpl.h", + ] + + deps += [ "${chip_root}/src/credentials:credentials_header" ] + } + + deps += [ "${nxp_sdk_build_root}:nxp_sdk" ] + + public_deps += [ + "${chip_root}/examples/platform/nxp/common/app/support:freertos_memory_utils", + "${chip_root}/src/crypto", + "${chip_root}/src/platform:syscalls_stub", + ] + public_configs = [ ":nxp_platform_config" ] +} diff --git a/src/platform/nxp/rt/rt1170/BlePlatformConfig.h b/src/platform/nxp/rt/rt1170/BlePlatformConfig.h new file mode 100644 index 0000000000..bd4d80390b --- /dev/null +++ b/src/platform/nxp/rt/rt1170/BlePlatformConfig.h @@ -0,0 +1,36 @@ +/* + * + * Copyright (c) 2021 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 + * Platform-specific configuration overrides for the CHIP BLE + * Layer on RT1170 platforms using the NXP SDK. + * + */ + +#pragma once + +// ==================== Platform Adaptations ==================== + +/* Default NXP Platform adaptations are used */ + +// ========== Platform-specific Configuration Overrides ========= + +/* Default NXP Platform configuration overrides are used */ + +// Include default nxp platform configurations +#include "platform/nxp/common/ble_zephyr/BleNXPPlatformDefaultConfig.h" diff --git a/src/platform/nxp/rt/rt1170/CHIPDevicePlatformConfig.h b/src/platform/nxp/rt/rt1170/CHIPDevicePlatformConfig.h new file mode 100644 index 0000000000..cfb589209e --- /dev/null +++ b/src/platform/nxp/rt/rt1170/CHIPDevicePlatformConfig.h @@ -0,0 +1,42 @@ +/* + * + * Copyright (c) 2020-2022 Project CHIP Authors + * Copyright (c) 2020 Google LLC. + * 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 + * Platform-specific configuration overrides for the chip Device Layer + * on RT1170 platforms using the NXP SDK. + */ + +#pragma once + +// ==================== Platform Adaptations ==================== + +/* Default NXP Platform adaptations are used */ + +// ========== Platform-specific Configuration ========= + +// These are configuration options that are unique to the NXP platform. +// These can be overridden by the application as needed. + +// ========== Platform-specific Configuration Overrides ========= + +/* Default NXP Platform configuration overrides are used */ + +// Include default nxp platform configurations +#include "platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h" diff --git a/src/platform/nxp/rt/rt1170/CHIPPlatformConfig.h b/src/platform/nxp/rt/rt1170/CHIPPlatformConfig.h new file mode 100644 index 0000000000..6485baca53 --- /dev/null +++ b/src/platform/nxp/rt/rt1170/CHIPPlatformConfig.h @@ -0,0 +1,54 @@ +/* + * + * Copyright (c) 2020-2022 Project CHIP Authors + * Copyright (c) 2020 Google LLC. + * 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 + * Platform-specific configuration overrides for CHIP on + * NXP RT1060 platforms. + */ + +#pragma once + +#include + +// ==================== General Platform Adaptations ==================== + +/* Default NXP platform adaptations are used */ + +// ==================== Security Adaptations ==================== + +/* Default NXP Platform security adaptations are used */ + +// ==================== General Configuration Overrides ==================== + +/* Default NXP Platform general configuration overrides are used */ + +/* For now on RT1170, due to the current file system implementation only 5 fabrics are supported */ +#define CHIP_CONFIG_MAX_FABRICS 5 + +// ==================== Security Configuration Overrides ==================== + +/* Default NXP Platform security configuration overrides are used */ + +// ==================== WDM Configuration Overrides ==================== + +/* Default NXP Platform WDM Configuration overrides are used */ + +// Include default nxp platform configurations +#include "platform/nxp/common/CHIPNXPPlatformDefaultConfig.h" diff --git a/src/platform/nxp/rt/rt1170/InetPlatformConfig.h b/src/platform/nxp/rt/rt1170/InetPlatformConfig.h new file mode 100644 index 0000000000..dee850a559 --- /dev/null +++ b/src/platform/nxp/rt/rt1170/InetPlatformConfig.h @@ -0,0 +1,40 @@ +/* + * + * Copyright (c) 2020-2022 Project CHIP Authors + * Copyright (c) 2020 Google LLC. + * 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 + * Platform-specific configuration overrides for the CHIP Inet + * Layer on RT1170 platforms using the NXP SDK. + * + */ + +#pragma once + +#include + +// ==================== Platform Adaptations ==================== + +/* Default NXP Platform adaptations are used */ + +// ========== Platform-specific Configuration Overrides ========= + +/* Default NXP Platform configuration overrides are used */ + +// Include default nxp platform configurations +#include "platform/nxp/common/InetNXPPlatformDefaultConfig.h" diff --git a/src/platform/nxp/rt/rt1170/PlatformManagerImpl.cpp b/src/platform/nxp/rt/rt1170/PlatformManagerImpl.cpp new file mode 100644 index 0000000000..24212cee4c --- /dev/null +++ b/src/platform/nxp/rt/rt1170/PlatformManagerImpl.cpp @@ -0,0 +1,474 @@ +/* + * + * Copyright (c) 2020-2024 Project CHIP Authors + * Copyright (c) 2020 Nest Labs, Inc. + * Copyright 2023-2024 NXP + * 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 + * Provides an implementation of the PlatformManager object + * for RT1170 platforms using the NXP RT1170 SDK. + */ +/* this file behaves like a config.h, comes first */ +#include + +#include "DiagnosticDataProviderImpl.h" +#include "fsl_os_abstraction.h" +#include "fwk_platform_coex.h" +#include "ksdk_mbedtls.h" +#include +#include +#include +#include +#include + +#include + +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR +#include "OtaSupport.h" +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#include "ot_platform_common.h" +#include +#if CHIP_DEVICE_CONFIG_CHIPOBLE_DISABLE_ADVERTISING_WHEN_PROVISIONED +#include "lib/spinel/spinel.h" +#define OT_NXP_SPINEL_PROP_VENDOR_BLE_STATE SPINEL_PROP_VENDOR__BEGIN +#endif /* CHIP_DEVICE_CONFIG_CHIPOBLE_DISABLE_ADVERTISING_WHEN_PROVISIONED */ +#endif + +#if !CHIP_DEVICE_CONFIG_ENABLE_THREAD && !CHIP_DEVICE_CONFIG_ENABLE_WPA + +#include "board.h" +#include "clock_config.h" +#include "fsl_phy.h" +#include "pin_mux.h" + +#include "fsl_enet_mdio.h" +#include "fsl_phyksz8081.h" + +#include "enet_ethernetif.h" +#include "fsl_debug_console.h" +#include "lwip/netif.h" +#include "lwip/netifapi.h" +#include "lwip/opt.h" +#include "lwip/tcpip.h" +#include "netif/ethernet.h" + +//----LWIP defines----// +/* MAC address configuration. */ +#define configMAC_ADDR \ + { \ + 0x02, 0x12, 0x13, 0x10, 0x15, 0x11 \ + } + +/* Address of PHY interface. */ +#define EXAMPLE_PHY_ADDRESS BOARD_ENET0_PHY_ADDRESS + +/* MDIO operations. */ +#define EXAMPLE_MDIO_OPS enet_ops + +/* PHY operations. */ +#define EXAMPLE_PHY_OPS phyksz8081_ops + +/* ENET clock frequency. */ +#define EXAMPLE_CLOCK_FREQ CLOCK_GetFreq(kCLOCK_IpgClk) + +#ifndef EXAMPLE_NETIF_INIT_FN +/*! @brief Network interface initialization function. */ +#define EXAMPLE_NETIF_INIT_FN ethernetif0_init +#endif /* EXAMPLE_NETIF_INIT_FN */ + +/*! @brief Stack size of the temporary lwIP initialization thread. */ +#define INIT_THREAD_STACKSIZE 1024 + +/*! @brief Priority of the temporary lwIP initialization thread. */ +#define INIT_THREAD_PRIO DEFAULT_THREAD_PRIO + +static mdio_handle_t mdioHandle = { .ops = &EXAMPLE_MDIO_OPS }; +static phy_handle_t phyHandle = { .phyAddr = EXAMPLE_PHY_ADDRESS, .mdioHandle = &mdioHandle, .ops = &EXAMPLE_PHY_OPS }; + +#endif + +extern "C" void BOARD_InitHardware(void); +extern "C" void otPlatSetResetFunction(void (*fp)(void)); +extern "C" void initiateResetInIdle(void); + +#include "fwk_platform_ot.h" + +#if CHIP_DEVICE_CONFIG_ENABLE_WPA + +#include "fsl_adapter_gpio.h" +#include "fsl_os_abstraction.h" + +extern "C" { +#include "wlan.h" +#include "wm_net.h" +} + +#endif /* CHIP_DEVICE_CONFIG_ENABLE_WPA */ + +extern "C" void vApplicationMallocFailedHook(void) +{ + ChipLogError(DeviceLayer, "Malloc Failure"); +} + +#if WIFI_PTA_ENABLED && (CHIP_DEVICE_CONFIG_ENABLE_WPA && CHIP_ENABLE_OPENTHREAD) +#ifdef SD8801 +#define HOSTCMD_RESP_BUFF_SIZE 1024 +/* 8801 command buffer to enable External Coexistence. + * Source: SDK 2.11.1, wifi_cli demo, wlan_tests.c file. */ +const uint8_t ext_coex_8801_cmd_buf[] = { 0xe0, 0, 0x1d, 0, 0x17, 0, 0, 0, 0x01, 0, 0, 0, 0x2f, 0x02, 0x0d, + 0x00, 0x01, 0, 0, 0x03, 0x01, 0x02, 0x01, 0x01, 0x00, 0x28, 0x00, 0x3c, 0x00 }; +#endif + +static CHIP_ERROR EnableWiFiCoexistence(void) +{ + CHIP_ERROR ret = CHIP_NO_ERROR; + +#ifdef SD8801 + int status = WM_FAIL; + uint8_t * rspBuff = NULL; + uint32_t reqd_len = 0; + + rspBuff = (uint8_t *) pvPortMalloc(HOSTCMD_RESP_BUFF_SIZE); + if (rspBuff != NULL) + { + status = wlan_send_hostcmd((void *) ext_coex_8801_cmd_buf, sizeof(ext_coex_8801_cmd_buf) / sizeof(u8_t), rspBuff, + HOSTCMD_RESP_BUFF_SIZE, &reqd_len); + + if (status == WM_SUCCESS) + { + ChipLogProgress(DeviceLayer, "8801 Coexistence enabled"); + } + else + { + ChipLogError(DeviceLayer, "8801 Coexistence enabling failed = %d", status); + ret = CHIP_ERROR_INTERNAL; + } + + vPortFree(rspBuff); + } + else + { + ChipLogError(DeviceLayer, "Failed to allocate memory for Wi-Fi coexistence response buffer"); + } +#else + ChipLogError(DeviceLayer, "This chip does not support Wi-Fi and OpenThread coexistence"); + ret = CHIP_ERROR_INTERNAL; +#endif + + return ret; +} +#endif + +#if !CHIP_DEVICE_CONFIG_ENABLE_WPA +extern "C" void vApplicationIdleHook(void) +{ + chip::DeviceLayer::PlatformManagerImpl::IdleHook(); +} +#endif + +extern "C" void __wrap_exit(int __status) +{ + ChipLogError(DeviceLayer, "======> error exit function !!!"); + assert(0); +} + +namespace chip { +namespace DeviceLayer { + +PlatformManagerImpl PlatformManagerImpl::sInstance; + +void PlatformManagerImpl::HardwareInit(void) +{ + BOARD_InitHardware(); + SysTick_Config(SystemCoreClock / configTICK_RATE_HZ); +} + +CHIP_ERROR PlatformManagerImpl::ServiceInit(void) +{ + status_t status; + CHIP_ERROR chipRes = CHIP_NO_ERROR; + + status = CRYPTO_InitHardware(); + + if (status != 0) + { + chipRes = CHIP_ERROR_INTERNAL; + ChipLogError(DeviceLayer, "Crypto hardware init error"); + } + + return chipRes; +} + +#if !CHIP_DEVICE_CONFIG_ENABLE_THREAD && !CHIP_DEVICE_CONFIG_ENABLE_WPA +CHIP_ERROR PlatformManagerImpl::EthernetInterfaceInit() +{ + + static struct netif netif; + ethernetif_config_t enet_config = { + .phyHandle = &phyHandle, + .macAddress = configMAC_ADDR, + }; + + mdioHandle.resource.csrClock_Hz = EXAMPLE_CLOCK_FREQ; + + netifapi_netif_add(&netif, &enet_config, EXAMPLE_NETIF_INIT_FN, tcpip_input); + + netifapi_netif_set_default(&netif); + netifapi_netif_set_up(netif_default); + LOCK_TCPIP_CORE(); + netif_create_ip6_linklocal_address(netif_default, 1); + UNLOCK_TCPIP_CORE(); + + vTaskDelay(pdMS_TO_TICKS(1500)); + + for (uint8_t i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) + { + const char * str_ip = "-"; + if (ip6_addr_isvalid(netif_ip6_addr_state(netif_default, i))) + { + str_ip = ip6addr_ntoa(netif_ip6_addr(netif_default, i)); + } + PRINTF(" IPv6 Address%d : %s\r\n", i, str_ip); + } + PRINTF("************************************************\r\n"); + + if (netif_is_up(&netif)) + { + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_NOT_CONNECTED; +} +#endif + +CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) +{ +#if CHIP_DEVICE_CONFIG_ENABLE_WPA + hal_gpio_status_t status_gpio; + hal_gpio_pin_config_t resetPinConfig = { + .direction = kHAL_GpioDirectionOut, + .level = 0U, + .port = 3, + .pin = 9, + }; + + GPIO_HANDLE_DEFINE(otGpioResetHandle); + +#endif /* CHIP_DEVICE_CONFIG_ENABLE_WPA */ + + CHIP_ERROR err = CHIP_ERROR_INTERNAL; + int osError; + + /* Initialize platform services */ + err = ServiceInit(); + SuccessOrExit(err); + + // Initialize the configuration system. + err = Internal::NXPConfig::Init(); + SuccessOrExit(err); + + SetConfigurationMgr(&ConfigurationManagerImpl::GetDefaultInstance()); + SetDiagnosticDataProvider(&DiagnosticDataProviderImpl::GetDefaultInstance()); + +#if CHIP_DEVICE_CONFIG_ENABLE_WPA + /* Initialize LwIP via Wi-Fi layer. */ + net_ipv4stack_init(); +#else + /* Initialize LwIP directly. */ + tcpip_init(NULL, NULL); +#endif + + /* Init the controller by giving as an arg the connectivity supported */ + PLATFORM_InitControllers(connBle_c +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + | conn802_15_4_c +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WPA + | connWlan_c +#endif + ); +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + PLATFORM_InitOt(); + /* + * Initialize the RCP here: the WiFi initialization requires to enable/disable + * coexistence through the Spinel interface; as such, the otPlatRadioInit() call + * will fail if done afterwards + */ + otPlatLogInit(); + otPlatRadioInit(); + otPlatSetResetFunction(initiateResetInIdle); + otPlatRandomInit(); +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_WPA + + osError = OSA_SetupIdleFunction(chip::DeviceLayer::PlatformManagerImpl::IdleHook); + if (osError != WM_SUCCESS) + { + ChipLogError(DeviceLayer, "Failed to setup idle function"); + err = CHIP_ERROR_NO_MEMORY; + goto exit; + } + + ChipLogProgress(DeviceLayer, "Wi-Fi module initialization done."); +#elif !CHIP_DEVICE_CONFIG_ENABLE_THREAD + err = EthernetInterfaceInit(); + + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(DeviceLayer, + "LWIP interface initialization failed. Make sure there is internet conectivity on the board and reset!"); + chipDie(); + } + ChipLogProgress(DeviceLayer, "LWIP interface initialization done"); +#endif + + // Call _InitChipStack() on the generic implementation base class + // to finish the initialization process. + err = Internal::GenericPlatformManagerImpl_FreeRTOS::_InitChipStack(); + SuccessOrExit(err); + + err = System::Clock::InitClock_RealTime(); + SuccessOrExit(err); + + mStartTime = System::SystemClock().GetMonotonicTimestamp(); + +exit: + return err; +} + +void PlatformManagerImpl::SaveSettings(void) +{ +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + otPlatSaveSettingsIdle(); +#endif +} + +void PlatformManagerImpl::IdleHook(void) +{ + bool isResetScheduled = PlatformMgrImpl().GetResetInIdleValue(); + if (isResetScheduled) + { + /* + * In case a reset in IDLE has been scheduled + * Disable IRQs so that the idle task won't be preempted until the reset + */ + OSA_InterruptDisable(); + } + + chip::DeviceLayer::Internal::NXPConfig::RunSystemIdleTask(); + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + SaveSettings(); +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR + /* Resume OTA Transactions in Idle task */ + OTA_TransactionResume(); +#endif + + /* + * In case a reset in idle operation has been posted, + * reset the device after having run the idle function + */ + if (isResetScheduled) + { + PlatformMgrImpl().Reset(); + } +} + +void PlatformManagerImpl::Reset(void) +{ + ChipLogProgress(DeviceLayer, "System restarting"); + // Restart the system. + NVIC_SystemReset(); + while (1) + { + } +} + +void PlatformManagerImpl::ScheduleResetInIdle(void) +{ + resetInIdle = true; +} + +bool PlatformManagerImpl::GetResetInIdleValue(void) +{ + return resetInIdle; +} + +extern "C" void initiateResetInIdle(void) +{ + PlatformMgr().Shutdown(); + PlatformMgrImpl().ScheduleResetInIdle(); +} + +extern "C" void scheduleResetInIdle(void) +{ + PlatformMgrImpl().ScheduleResetInIdle(); +} + +extern "C" bool getResetInIdleValue(void) +{ + return PlatformMgrImpl().GetResetInIdleValue(); +} + +void PlatformManagerImpl::StopBLEConnectivity(void) +{ +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + otPlatRadioSendSetPropVendorUint8Cmd(OT_NXP_SPINEL_PROP_VENDOR_BLE_STATE, 0); +#endif /* CHIP_DEVICE_CONFIG_ENABLE_THREAD */ +} + +void PlatformManagerImpl::_Shutdown() +{ + uint64_t upTime = 0; + + if (GetDiagnosticDataProvider().GetUpTime(upTime) == CHIP_NO_ERROR) + { + uint32_t totalOperationalHours = 0; + + if (ConfigurationMgr().GetTotalOperationalHours(totalOperationalHours) == CHIP_NO_ERROR) + { + ConfigurationMgr().StoreTotalOperationalHours(totalOperationalHours + static_cast(upTime / 3600)); + } + else + { + ChipLogError(DeviceLayer, "Failed to get total operational hours of the Node"); + } + } + else + { + ChipLogError(DeviceLayer, "Failed to get current uptime since the Node’s last reboot"); + } + + /* Handle the server shutting down & emit the ShutDown event*/ + PlatformMgr().HandleServerShuttingDown(); + /* Shutdown all layers */ + Internal::GenericPlatformManagerImpl_FreeRTOS::_Shutdown(); +} + +} // namespace DeviceLayer +} // namespace chip + +extern "C" void mt_wipe(void) +{ + chip::DeviceLayer::Internal::NXPConfig::FactoryResetConfig(); +} diff --git a/src/platform/nxp/rt/rt1170/SystemPlatformConfig.h b/src/platform/nxp/rt/rt1170/SystemPlatformConfig.h new file mode 100644 index 0000000000..3838fc869b --- /dev/null +++ b/src/platform/nxp/rt/rt1170/SystemPlatformConfig.h @@ -0,0 +1,40 @@ +/* + * + * Copyright (c) 2020-2022 Project CHIP Authors + * Copyright (c) 2020 Google LLC. + * 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 + * Platform-specific configuration overrides for the CHIP System + * Layer on NXP RT1170 Platforms. + * + */ + +#pragma once + +#include + +// ==================== Platform Adaptations ==================== + +/* Default NXP Platform adaptations are used */ + +// ========== Platform-specific Configuration Overrides ========= + +/* Default NXP Platform configuration overrides are used */ + +// Include default nxp platform configurations +#include "platform/nxp/common/SystemNXPPlatformDefaultConfig.h" diff --git a/src/platform/nxp/rt/rt1170/args.gni b/src/platform/nxp/rt/rt1170/args.gni new file mode 100644 index 0000000000..aaadc3081a --- /dev/null +++ b/src/platform/nxp/rt/rt1170/args.gni @@ -0,0 +1,62 @@ +# 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("//build_overrides/nxp_sdk.gni") + +rt_platform = "rt1170" +nxp_platform = "rt/${rt_platform}" +nxp_sdk_name = "rt_sdk" +chip_device_platform = "nxp" +lwip_platform = "nxp" + +# ARM architecture flags will be set based on NXP board. +arm_platform_config = "${nxp_sdk_build_root}/${nxp_sdk_name}/nxp_arm.gni" + +chip_device_project_config_include = "" +chip_project_config_include = "" +chip_inet_project_config_include = "" +chip_system_project_config_include = "" +chip_ble_project_config_include = "" + +chip_build_tests = false + +#This enables the EventList global attribute +enable_eventlist_attribute = true + +# TODO : Enable the OTA Requestor by default. +# This requires the mcuboot bootloader to be used, which reserves the first 256 kB of the flash. +# If mcuboot is not used, "no_mcuboot" must be set to true in the gn gen build command +# in order for the application to be linked at the base of the flash. +#chip_enable_ota_requestor = true +declare_args() { + # TODO : set no_mcuboot to false by default when enabling ota requestor by default + no_mcuboot = true + + chip_enable_secondary_nwk_if = false +} + +# As a temporary workaround, we are disabling the session resumption because currently +# the mbedtls port does not support this. +# If not disabled, reconnecting to the OTA Provider node will fail. +chip_enable_session_resumption = false + +mbedtls_target = "${nxp_sdk_build_root}:nxp_mbedtls" + +openthread_external_mbedtls = mbedtls_target +openthread_project_core_config_file = "OpenThreadConfig.h" +openthread_core_config_deps = [ "${chip_root}/third_party/openthread/platforms/nxp/${nxp_platform}:openthread_core_config_rt1170" ] +openthread_core_config_platform_check_file = + "openthread-core-rt1170-config-check.h" +openthread_external_platform = "${chip_root}/third_party/openthread/platforms/nxp/${nxp_platform}:libopenthread-rt1170" diff --git a/src/platform/nxp/rt/rw61x/BUILD.gn b/src/platform/nxp/rt/rw61x/BUILD.gn index e80dd3cbd8..7ac204e92c 100644 --- a/src/platform/nxp/rt/rw61x/BUILD.gn +++ b/src/platform/nxp/rt/rw61x/BUILD.gn @@ -179,7 +179,6 @@ static_library("nxp_platform") { if (chip_mdns == "platform") { if (chip_enable_wifi) { sources += [ - "../../../OpenThread/DnssdImpl.cpp", "../../../OpenThread/OpenThreadDnssdImpl.cpp", "../../../OpenThread/OpenThreadDnssdImpl.h", "../../common/DnssdImpl.cpp", diff --git a/src/platform/nxp/rt/rw61x/PlatformManagerImpl.cpp b/src/platform/nxp/rt/rw61x/PlatformManagerImpl.cpp index fe8c6b012b..a089a94293 100644 --- a/src/platform/nxp/rt/rw61x/PlatformManagerImpl.cpp +++ b/src/platform/nxp/rt/rw61x/PlatformManagerImpl.cpp @@ -38,7 +38,7 @@ #include -#include MBEDTLS_PORT_INCLUDE +#include "els_pkc_mbedtls.h" #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR #include "OtaSupport.h" diff --git a/src/platform/nxp/zephyr/DeviceInstanceInfoProviderImpl.cpp b/src/platform/nxp/zephyr/DeviceInstanceInfoProviderImpl.cpp index 92029ebd61..52d0fc65ad 100644 --- a/src/platform/nxp/zephyr/DeviceInstanceInfoProviderImpl.cpp +++ b/src/platform/nxp/zephyr/DeviceInstanceInfoProviderImpl.cpp @@ -28,13 +28,13 @@ CHIP_ERROR DeviceInstanceInfoProviderImpl::GetRotatingDeviceIdUniqueId(MutableBy static_assert(ConfigurationManager::kRotatingDeviceIDUniqueIDLength >= ConfigurationManager::kMinRotatingDeviceIDUniqueIDLength, "Length of unique ID for rotating device ID is smaller than minimum."); - ReturnErrorCodeIf(ConfigurationManager::kRotatingDeviceIDUniqueIDLength > uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(ConfigurationManager::kRotatingDeviceIDUniqueIDLength <= uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); size_t bytesLen = chip::Encoding::HexToBytes(CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID, ConfigurationManager::kRotatingDeviceIDUniqueIDLength * 2, uniqueIdSpan.data(), uniqueIdSpan.size()); - ReturnErrorCodeIf(bytesLen != ConfigurationManager::kRotatingDeviceIDUniqueIDLength, CHIP_ERROR_INVALID_STRING_LENGTH); + VerifyOrReturnError(bytesLen == ConfigurationManager::kRotatingDeviceIDUniqueIDLength, CHIP_ERROR_INVALID_STRING_LENGTH); uniqueIdSpan.reduce_size(bytesLen); return CHIP_NO_ERROR; diff --git a/src/platform/nxp/zephyr/DiagnosticDataProviderImplNxp.cpp b/src/platform/nxp/zephyr/DiagnosticDataProviderImplNxp.cpp index 6c3481da23..9c7b3c789a 100644 --- a/src/platform/nxp/zephyr/DiagnosticDataProviderImplNxp.cpp +++ b/src/platform/nxp/zephyr/DiagnosticDataProviderImplNxp.cpp @@ -46,7 +46,7 @@ CHIP_ERROR DiagnosticDataProviderImplNxp::GetWiFiBssId(MutableByteSpan & value) { WiFiManager::WiFiInfo info; ReturnErrorOnFailure(WiFiManager::Instance().GetWiFiInfo(info)); - ReturnErrorCodeIf(sizeof(info.mBssId) >= value.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(sizeof(info.mBssId) < value.size(), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(value.data(), info.mBssId, sizeof(info.mBssId)); value.reduce_size(sizeof(info.mBssId)); diff --git a/src/platform/nxp/zephyr/ota/OTAImageProcessorImpl.cpp b/src/platform/nxp/zephyr/ota/OTAImageProcessorImpl.cpp index 89907c0fff..d86e662ccc 100644 --- a/src/platform/nxp/zephyr/ota/OTAImageProcessorImpl.cpp +++ b/src/platform/nxp/zephyr/ota/OTAImageProcessorImpl.cpp @@ -151,10 +151,10 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessBlock(ByteSpan & aBlock) bool OTAImageProcessorImpl::IsFirstImageRun() { OTARequestorInterface * requestor = GetRequestorInstance(); - ReturnErrorCodeIf(requestor == nullptr, false); + VerifyOrReturnError(requestor != nullptr, false); uint32_t currentVersion; - ReturnErrorCodeIf(ConfigurationMgr().GetSoftwareVersion(currentVersion) != CHIP_NO_ERROR, false); + VerifyOrReturnError(ConfigurationMgr().GetSoftwareVersion(currentVersion) == CHIP_NO_ERROR, false); return requestor->GetCurrentUpdateState() == OTARequestorInterface::OTAUpdateStateEnum::kApplying && requestor->GetTargetVersion() == currentVersion; @@ -173,7 +173,7 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & aBlock) CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(aBlock, header); // Needs more data to decode the header - ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); ReturnErrorOnFailure(error); mParams.totalFileBytes = header.mPayloadSize; diff --git a/src/platform/openiotsdk/OTAImageProcessorImpl.cpp b/src/platform/openiotsdk/OTAImageProcessorImpl.cpp index 81b3973ff2..a92a9b1020 100644 --- a/src/platform/openiotsdk/OTAImageProcessorImpl.cpp +++ b/src/platform/openiotsdk/OTAImageProcessorImpl.cpp @@ -255,7 +255,7 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & block) CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(block, header); // Needs more data to decode the header - ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); ReturnErrorOnFailure(error); mParams.totalFileBytes = header.mPayloadSize; diff --git a/src/platform/qpg/OTAImageProcessorImpl.cpp b/src/platform/qpg/OTAImageProcessorImpl.cpp index 6293f310bf..e0e2cf4a80 100644 --- a/src/platform/qpg/OTAImageProcessorImpl.cpp +++ b/src/platform/qpg/OTAImageProcessorImpl.cpp @@ -77,7 +77,7 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & block) CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(block, header); // Needs more data to decode the header - ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); ReturnErrorOnFailure(error); mParams.totalFileBytes = header.mPayloadSize; diff --git a/src/platform/silabs/BLEManagerImpl.h b/src/platform/silabs/BLEManagerImpl.h index 6d901db16e..9380accce3 100644 --- a/src/platform/silabs/BLEManagerImpl.h +++ b/src/platform/silabs/BLEManagerImpl.h @@ -58,12 +58,12 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla #if (SLI_SI91X_ENABLE_BLE || RSI_BLE_ENABLE) // Used for posting the event in the BLE queue void BlePostEvent(SilabsBleWrapper::BleEvent_t * event); - void HandleConnectEvent(SilabsBleWrapper::sl_wfx_msg_t * evt); - void HandleConnectionCloseEvent(SilabsBleWrapper::sl_wfx_msg_t * evt); - void HandleWriteEvent(SilabsBleWrapper::sl_wfx_msg_t * evt); - void UpdateMtu(SilabsBleWrapper::sl_wfx_msg_t * evt); + void HandleConnectEvent(const SilabsBleWrapper::sl_wfx_msg_t & evt); + void HandleConnectionCloseEvent(const SilabsBleWrapper::sl_wfx_msg_t & evt); + void HandleWriteEvent(const SilabsBleWrapper::sl_wfx_msg_t & evt); + void UpdateMtu(const SilabsBleWrapper::sl_wfx_msg_t & evt); void HandleTxConfirmationEvent(BLE_CONNECTION_OBJECT conId); - void HandleTXCharCCCDWrite(SilabsBleWrapper::sl_wfx_msg_t * evt); + void HandleTXCharCCCDWrite(const SilabsBleWrapper::sl_wfx_msg_t & evt); void HandleSoftTimerEvent(void); int32_t SendBLEAdvertisementCommand(void); #else @@ -194,7 +194,7 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla #endif #if (SLI_SI91X_ENABLE_BLE || RSI_BLE_ENABLE) - void HandleRXCharWrite(SilabsBleWrapper::sl_wfx_msg_t * evt); + void HandleRXCharWrite(const SilabsBleWrapper::sl_wfx_msg_t & evt); #else void HandleRXCharWrite(volatile sl_bt_msg_t * evt); #endif diff --git a/src/platform/silabs/CHIPDevicePlatformConfig.h b/src/platform/silabs/CHIPDevicePlatformConfig.h index d8c58a9368..7e86c64694 100644 --- a/src/platform/silabs/CHIPDevicePlatformConfig.h +++ b/src/platform/silabs/CHIPDevicePlatformConfig.h @@ -23,6 +23,8 @@ */ #pragma once +#include +#include // ==================== Platform Adaptations ==================== @@ -129,6 +131,10 @@ // ========== Platform-specific Configuration Overrides ========= +#ifndef CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY +#define CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY osPriorityHigh +#endif + #ifndef CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE #if SLI_SI91X_MCU_INTERFACE #define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE (7 * 1024) diff --git a/src/platform/silabs/CHIPPlatformConfig.h b/src/platform/silabs/CHIPPlatformConfig.h index c6c855ee9c..c72c7fa20c 100644 --- a/src/platform/silabs/CHIPPlatformConfig.h +++ b/src/platform/silabs/CHIPPlatformConfig.h @@ -129,13 +129,13 @@ #define CHIP_SHELL_MAX_LINE_SIZE 256 #endif // CHIP_SHELL_MAX_LINE_SIZE -// ==================== FreeRTOS Configuration Overrides ==================== -#ifndef CHIP_CONFIG_FREERTOS_USE_STATIC_TASK -#define CHIP_CONFIG_FREERTOS_USE_STATIC_TASK 1 +// ==================== CMSISOS Configuration Overrides ==================== +#ifndef CHIP_CONFIG_CMSISOS_USE_STATIC_TASK +#define CHIP_CONFIG_CMSISOS_USE_STATIC_TASK 1 #endif -#ifndef CHIP_CONFIG_FREERTOS_USE_STATIC_QUEUE -#define CHIP_CONFIG_FREERTOS_USE_STATIC_QUEUE 1 +#ifndef CHIP_CONFIG_CMSISOS_USE_STATIC_QUEUE +#define CHIP_CONFIG_CMSISOS_USE_STATIC_QUEUE 1 #endif #ifndef CHIP_SHELL_MAX_TOKENS diff --git a/src/platform/silabs/ConfigurationManagerImpl.cpp b/src/platform/silabs/ConfigurationManagerImpl.cpp index 122799952a..b4dd5c9c52 100644 --- a/src/platform/silabs/ConfigurationManagerImpl.cpp +++ b/src/platform/silabs/ConfigurationManagerImpl.cpp @@ -22,6 +22,7 @@ * for Silabs platforms using the Silicon Labs SDK. */ /* this file behaves like a config.h, comes first */ +#include #include #include #include @@ -304,7 +305,7 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) // When called from an RPC, the following reset occurs before the RPC can respond, // which breaks tests (because it looks like the RPC hasn't successfully completed). // Block the task for 500 ms before the reset occurs to allow RPC response to be sent - vTaskDelay(pdMS_TO_TICKS(500)); + osDelay(pdMS_TO_TICKS(500)); NVIC_SystemReset(); } diff --git a/src/platform/silabs/DiagnosticDataProviderImpl.cpp b/src/platform/silabs/DiagnosticDataProviderImpl.cpp index 4be7113bb6..0cb4c85d3d 100644 --- a/src/platform/silabs/DiagnosticDataProviderImpl.cpp +++ b/src/platform/silabs/DiagnosticDataProviderImpl.cpp @@ -28,10 +28,11 @@ #if CHIP_DEVICE_CONFIG_ENABLE_THREAD #include #endif -#include "FreeRTOS.h" #include "sl_memory_manager.h" +#include #include #include +#include using namespace ::chip::app::Clusters::GeneralDiagnostics; @@ -82,31 +83,24 @@ CHIP_ERROR DiagnosticDataProviderImpl::ResetWatermarks() CHIP_ERROR DiagnosticDataProviderImpl::GetThreadMetrics(ThreadMetrics ** threadMetricsOut) { - /* Obtain all available task information */ - TaskStatus_t * taskStatusArray; ThreadMetrics * head = nullptr; - uint32_t arraySize, x, dummy; - arraySize = uxTaskGetNumberOfTasks(); + uint32_t threadCount = osThreadGetCount(); + osThreadId_t * threadIdTable = static_cast(chip::Platform::MemoryCalloc(threadCount, sizeof(osThreadId_t))); - taskStatusArray = static_cast(chip::Platform::MemoryCalloc(arraySize, sizeof(TaskStatus_t))); - - if (taskStatusArray != NULL) + if (threadIdTable != nullptr) { - /* Generate raw status information about each task. */ - arraySize = uxTaskGetSystemState(taskStatusArray, arraySize, &dummy); - /* For each populated position in the taskStatusArray array, - format the raw data as human readable ASCII data. */ - - for (x = 0; x < arraySize; x++) + osThreadEnumerate(threadIdTable, threadCount); + for (uint8_t tIdIndex = 0; tIdIndex < threadCount; tIdIndex++) { + osThreadId_t tId = threadIdTable[tIdIndex]; ThreadMetrics * thread = new ThreadMetrics(); if (thread) { - Platform::CopyString(thread->NameBuf, taskStatusArray[x].pcTaskName); + thread->id = tIdIndex; + thread->stackFreeMinimum.Emplace(osThreadGetStackSpace(tId)); + Platform::CopyString(thread->NameBuf, osThreadGetName(tId)); thread->name.Emplace(CharSpan::fromCharString(thread->NameBuf)); - thread->id = taskStatusArray[x].xTaskNumber; - thread->stackFreeMinimum.Emplace(taskStatusArray[x].usStackHighWaterMark); /* Unsupported metrics */ // thread->stackSize @@ -119,7 +113,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetThreadMetrics(ThreadMetrics ** threadM *threadMetricsOut = head; /* The array is no longer needed, free the memory it consumes. */ - chip::Platform::MemoryFree(taskStatusArray); + chip::Platform::MemoryFree(threadIdTable); } return CHIP_NO_ERROR; diff --git a/src/platform/silabs/Logging.cpp b/src/platform/silabs/Logging.cpp index 339bc8ae07..dea8913791 100644 --- a/src/platform/silabs/Logging.cpp +++ b/src/platform/silabs/Logging.cpp @@ -293,13 +293,6 @@ extern "C" void LwIPLog(const char * aFormat, ...) } PrintLog(formattedMsg); - -#if configCHECK_FOR_STACK_OVERFLOW - // Force a stack overflow check. - if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) - taskYIELD(); -#endif - // Let the application know that a log message has been emitted. chip::DeviceLayer::OnLogOutput(); #endif // SILABS_LOG_ENABLED @@ -348,12 +341,6 @@ extern "C" void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const ch } PrintLog(formattedMsg); - -#if configCHECK_FOR_STACK_OVERFLOW - // Force a stack overflow check. - if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) - taskYIELD(); -#endif } // Let the application know that a log message has been emitted. diff --git a/src/platform/silabs/MigrationManager.cpp b/src/platform/silabs/MigrationManager.cpp index f78facc938..d9bba0b249 100644 --- a/src/platform/silabs/MigrationManager.cpp +++ b/src/platform/silabs/MigrationManager.cpp @@ -57,7 +57,7 @@ void MigrationManager::applyMigrations() if (lastMigationGroupDone < migrationTable[i].migrationGroup) { (*migrationTable[i].migrationFunc)(); - completedMigrationGroup = max(migrationTable[i].migrationGroup, completedMigrationGroup); + completedMigrationGroup = std::max(migrationTable[i].migrationGroup, completedMigrationGroup); } } SilabsConfig::WriteConfigValue(SilabsConfig::kConfigKey_MigrationCounter, completedMigrationGroup); diff --git a/src/platform/silabs/PlatformManagerImpl.cpp b/src/platform/silabs/PlatformManagerImpl.cpp index 14dd4f78f2..dccb5db765 100644 --- a/src/platform/silabs/PlatformManagerImpl.cpp +++ b/src/platform/silabs/PlatformManagerImpl.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #if defined(SL_MBEDTLS_USE_TINYCRYPT) @@ -104,7 +104,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) // Call _InitChipStack() on the generic implementation base class // to finish the initialization process. - err = Internal::GenericPlatformManagerImpl_FreeRTOS::_InitChipStack(); + err = Internal::GenericPlatformManagerImpl_CMSISOS::_InitChipStack(); SuccessOrExit(err); // Start timer to increment TotalOperationalHours every hour @@ -129,9 +129,10 @@ void PlatformManagerImpl::UpdateOperationalHours(System::Layer * systemLayer, vo SystemLayer().StartTimer(System::Clock::Seconds32(kSecondsPerHour), UpdateOperationalHours, NULL); } + void PlatformManagerImpl::_Shutdown() { - Internal::GenericPlatformManagerImpl_FreeRTOS::_Shutdown(); + Internal::GenericPlatformManagerImpl_CMSISOS::_Shutdown(); } #if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION diff --git a/src/platform/silabs/PlatformManagerImpl.h b/src/platform/silabs/PlatformManagerImpl.h index 25813afb48..1abbb9f07f 100644 --- a/src/platform/silabs/PlatformManagerImpl.h +++ b/src/platform/silabs/PlatformManagerImpl.h @@ -24,7 +24,7 @@ #pragma once -#include +#include #if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION #include "wfx_host_events.h" #endif @@ -36,7 +36,7 @@ namespace DeviceLayer { /** * Concrete implementation of the PlatformManager singleton object for the SILABS platform. */ -class PlatformManagerImpl final : public PlatformManager, public Internal::GenericPlatformManagerImpl_FreeRTOS +class PlatformManagerImpl final : public PlatformManager, public Internal::GenericPlatformManagerImpl_CMSISOS { // Allow the PlatformManager interface class to delegate method calls to // the implementation methods provided by this class. @@ -57,7 +57,7 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener // Allow the generic implementation base class to call helper methods on // this class. #ifndef DOXYGEN_SHOULD_SKIP_THIS - friend Internal::GenericPlatformManagerImpl_FreeRTOS; + friend Internal::GenericPlatformManagerImpl_CMSISOS; #endif public: @@ -87,8 +87,6 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener System::Clock::Timestamp mStartTime = System::Clock::kZero; static PlatformManagerImpl sInstance; - - using Internal::GenericPlatformManagerImpl_FreeRTOS::PostEventFromISR; }; /** diff --git a/src/platform/silabs/SiWx917/CHIPCryptoPALTinyCrypt.cpp b/src/platform/silabs/SiWx917/CHIPCryptoPALTinyCrypt.cpp index 52f2cb74b9..05fa10c583 100644 --- a/src/platform/silabs/SiWx917/CHIPCryptoPALTinyCrypt.cpp +++ b/src/platform/silabs/SiWx917/CHIPCryptoPALTinyCrypt.cpp @@ -1983,7 +1983,7 @@ CHIP_ERROR ExtractRawDNFromX509Cert(bool extractSubject, const ByteSpan & certif size_t len = 0; mbedtls_x509_crt mbedCertificate; - ReturnErrorCodeIf(certificate.empty(), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(!certificate.empty(), CHIP_ERROR_INVALID_ARGUMENT); mbedtls_x509_crt_init(&mbedCertificate); result = mbedtls_x509_crt_parse(&mbedCertificate, Uint8::to_const_uchar(certificate.data()), certificate.size()); @@ -2039,7 +2039,7 @@ CHIP_ERROR ReplaceCertIfResignedCertFound(const ByteSpan & referenceCertificate, outCertificate = referenceCertificate; - ReturnErrorCodeIf(candidateCertificates == nullptr || candidateCertificatesCount == 0, CHIP_NO_ERROR); + VerifyOrReturnError(candidateCertificates != nullptr && candidateCertificatesCount != 0, CHIP_NO_ERROR); ReturnErrorOnFailure(ExtractSubjectFromX509Cert(referenceCertificate, referenceSubject)); ReturnErrorOnFailure(ExtractSKIDFromX509Cert(referenceCertificate, referenceSKID)); diff --git a/src/platform/silabs/SiWx917/OTAImageProcessorImpl.cpp b/src/platform/silabs/SiWx917/OTAImageProcessorImpl.cpp index d641bfa61f..bccb704ad1 100644 --- a/src/platform/silabs/SiWx917/OTAImageProcessorImpl.cpp +++ b/src/platform/silabs/SiWx917/OTAImageProcessorImpl.cpp @@ -51,7 +51,7 @@ uint8_t OTAImageProcessorImpl::writeBuffer[kAlignmentBytes] __attribute__((align CHIP_ERROR OTAImageProcessorImpl::Init(OTADownloader * downloader) { - ReturnErrorCodeIf(downloader == nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(downloader != nullptr, CHIP_ERROR_INVALID_ARGUMENT); gImageProcessor.SetOTADownloader(downloader); @@ -342,7 +342,7 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & block) CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(block, header); // Needs more data to decode the header - ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); ReturnErrorOnFailure(error); // SL TODO -- store version somewhere diff --git a/src/platform/silabs/efr32/CHIPCryptoPALPsaEfr32.cpp b/src/platform/silabs/efr32/CHIPCryptoPALPsaEfr32.cpp index 6989e3a2c6..8028d84d92 100644 --- a/src/platform/silabs/efr32/CHIPCryptoPALPsaEfr32.cpp +++ b/src/platform/silabs/efr32/CHIPCryptoPALPsaEfr32.cpp @@ -2330,7 +2330,7 @@ CHIP_ERROR ExtractRawDNFromX509Cert(bool extractSubject, const ByteSpan & certif size_t len = 0; mbedtls_x509_crt mbedCertificate; - ReturnErrorCodeIf(certificate.empty(), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(!certificate.empty(), CHIP_ERROR_INVALID_ARGUMENT); mbedtls_x509_crt_init(&mbedCertificate); result = mbedtls_x509_crt_parse(&mbedCertificate, Uint8::to_const_uchar(certificate.data()), certificate.size()); @@ -2386,7 +2386,7 @@ CHIP_ERROR ReplaceCertIfResignedCertFound(const ByteSpan & referenceCertificate, outCertificate = referenceCertificate; - ReturnErrorCodeIf(candidateCertificates == nullptr || candidateCertificatesCount == 0, CHIP_NO_ERROR); + VerifyOrReturnError(candidateCertificates != nullptr && candidateCertificatesCount != 0, CHIP_NO_ERROR); ReturnErrorOnFailure(ExtractSubjectFromX509Cert(referenceCertificate, referenceSubject)); ReturnErrorOnFailure(ExtractSKIDFromX509Cert(referenceCertificate, referenceSKID)); diff --git a/src/platform/silabs/efr32/OTAImageProcessorImpl.cpp b/src/platform/silabs/efr32/OTAImageProcessorImpl.cpp index 846d4f720a..4fc7f8d742 100644 --- a/src/platform/silabs/efr32/OTAImageProcessorImpl.cpp +++ b/src/platform/silabs/efr32/OTAImageProcessorImpl.cpp @@ -45,7 +45,7 @@ uint8_t OTAImageProcessorImpl::writeBuffer[kAlignmentBytes] __attribute__((align CHIP_ERROR OTAImageProcessorImpl::Init(OTADownloader * downloader) { - ReturnErrorCodeIf(downloader == nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(downloader != nullptr, CHIP_ERROR_INVALID_ARGUMENT); gImageProcessor.SetOTADownloader(downloader); @@ -357,7 +357,7 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & block) CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(block, header); // Needs more data to decode the header - ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); ReturnErrorOnFailure(error); // SL TODO -- store version somewhere diff --git a/src/platform/silabs/multi-ota/OTACustomProcessor.cpp b/src/platform/silabs/multi-ota/OTACustomProcessor.cpp index ef761d003e..6b87638adb 100644 --- a/src/platform/silabs/multi-ota/OTACustomProcessor.cpp +++ b/src/platform/silabs/multi-ota/OTACustomProcessor.cpp @@ -43,7 +43,7 @@ uint8_t OTACustomProcessor::writeBuffer[kAlignmentBytes] __attribute__((aligned( CHIP_ERROR OTACustomProcessor::Init() { - ReturnErrorCodeIf(mCallbackProcessDescriptor == nullptr, CHIP_OTA_PROCESSOR_CB_NOT_REGISTERED); + VerifyOrReturnError(mCallbackProcessDescriptor != nullptr, CHIP_OTA_PROCESSOR_CB_NOT_REGISTERED); mAccumulator.Init(sizeof(Descriptor)); return CHIP_NO_ERROR; diff --git a/src/platform/silabs/multi-ota/OTAFirmwareProcessor.cpp b/src/platform/silabs/multi-ota/OTAFirmwareProcessor.cpp index d8545d01f4..07dc974dd7 100644 --- a/src/platform/silabs/multi-ota/OTAFirmwareProcessor.cpp +++ b/src/platform/silabs/multi-ota/OTAFirmwareProcessor.cpp @@ -43,7 +43,7 @@ uint8_t OTAFirmwareProcessor::writeBuffer[kAlignmentBytes] __attribute__((aligne CHIP_ERROR OTAFirmwareProcessor::Init() { - ReturnErrorCodeIf(mCallbackProcessDescriptor == nullptr, CHIP_OTA_PROCESSOR_CB_NOT_REGISTERED); + VerifyOrReturnError(mCallbackProcessDescriptor != nullptr, CHIP_OTA_PROCESSOR_CB_NOT_REGISTERED); mAccumulator.Init(sizeof(Descriptor)); #if OTA_ENCRYPTION_ENABLE mUnalignmentNum = 0; diff --git a/src/platform/silabs/multi-ota/OTAMultiImageProcessorImpl.cpp b/src/platform/silabs/multi-ota/OTAMultiImageProcessorImpl.cpp index a95cb4e1ad..42a9788c28 100644 --- a/src/platform/silabs/multi-ota/OTAMultiImageProcessorImpl.cpp +++ b/src/platform/silabs/multi-ota/OTAMultiImageProcessorImpl.cpp @@ -42,7 +42,7 @@ namespace chip { CHIP_ERROR OTAMultiImageProcessorImpl::Init(OTADownloader * downloader) { - ReturnErrorCodeIf(downloader == nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(downloader != nullptr, CHIP_ERROR_INVALID_ARGUMENT); gImageProcessor.SetOTADownloader(downloader); @@ -297,7 +297,7 @@ CHIP_ERROR OTAMultiImageProcessorImpl::ConfirmCurrentImage() uint32_t targetVersion; OTARequestorInterface * requestor = chip::GetRequestorInstance(); - ReturnErrorCodeIf(requestor == nullptr, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(requestor != nullptr, CHIP_ERROR_INTERNAL); targetVersion = requestor->GetTargetVersion(); ReturnErrorOnFailure(DeviceLayer::ConfigurationMgr().GetSoftwareVersion(currentVersion)); diff --git a/src/platform/silabs/multi-ota/OTATlvProcessor.cpp b/src/platform/silabs/multi-ota/OTATlvProcessor.cpp index 91a748c077..e6601449fa 100644 --- a/src/platform/silabs/multi-ota/OTATlvProcessor.cpp +++ b/src/platform/silabs/multi-ota/OTATlvProcessor.cpp @@ -37,7 +37,7 @@ constexpr uint8_t au8Iv[] = { 0x00, 0x00, 0x00, 0x10, 0x11, 0x12, 0x13, 0x14, 0x CHIP_ERROR OTATlvProcessor::Process(ByteSpan & block) { CHIP_ERROR status = CHIP_NO_ERROR; - uint32_t bytes = chip::min(mLength - mProcessedLength, static_cast(block.size())); + uint32_t bytes = std::min(mLength - mProcessedLength, static_cast(block.size())); ByteSpan relevantData = block.SubSpan(0, bytes); status = ProcessInternal(relevantData); @@ -92,7 +92,7 @@ void OTADataAccumulator::Clear() CHIP_ERROR OTADataAccumulator::Accumulate(ByteSpan & block) { - uint32_t numBytes = chip::min(mThreshold - mBufferOffset, static_cast(block.size())); + uint32_t numBytes = std::min(mThreshold - mBufferOffset, static_cast(block.size())); memcpy(&mBuffer[mBufferOffset], block.data(), numBytes); mBufferOffset += numBytes; block = block.SubSpan(numBytes); diff --git a/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp b/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp index a99ac5ea29..cf60cf5c58 100644 --- a/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp +++ b/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp @@ -36,8 +36,15 @@ extern "C" { #include "sl_event_handler.h" #include "sl_si91x_button.h" #include "sl_si91x_button_pin_config.h" +#if defined(SL_MATTER_RGB_LED_ENABLED) && SL_MATTER_RGB_LED_ENABLED +#include "sl_si91x_rgb_led.h" +#include "sl_si91x_rgb_led_config.h" +#include "sl_si91x_rgb_led_instances.h" +#else #include "sl_si91x_led.h" #include "sl_si91x_led_config.h" +#include "sl_si91x_led_instances.h" +#endif // defined(SL_MATTER_RGB_LED_ENABLED) && SL_MATTER_RGB_LED_ENABLED #if CHIP_CONFIG_ENABLE_ICD_SERVER == 0 void soc_pll_config(void); @@ -51,14 +58,15 @@ void soc_pll_config(void); #if SILABS_LOG_OUT_UART || ENABLE_CHIP_SHELL #include "uart.h" #endif -// TODO Remove this when SI91X-16606 is addressed -#ifdef SI917_DEVKIT -#define SL_LED_COUNT 1 -uint8_t ledPinArray[SL_LED_COUNT] = { SL_LED_LEDB_PIN }; + +#if defined(SL_MATTER_RGB_LED_ENABLED) && SL_MATTER_RGB_LED_ENABLED +#define SL_LED_COUNT SL_SI91X_RGB_LED_COUNT +const sl_rgb_led_t * ledPinArray[SL_LED_COUNT] = { &led_led0 }; +#define SL_RGB_LED_INSTANCE(n) (ledPinArray[n]) #else #define SL_LED_COUNT SL_SI91x_LED_COUNT uint8_t ledPinArray[SL_LED_COUNT] = { SL_LED_LED0_PIN, SL_LED_LED1_PIN }; -#endif +#endif // defined(SL_MATTER_RGB_LED_ENABLED) && SL_MATTER_RGB_LED_ENABLED namespace chip { namespace DeviceLayer { @@ -111,7 +119,11 @@ void SilabsPlatform::InitLed(void) CHIP_ERROR SilabsPlatform::SetLed(bool state, uint8_t led) { VerifyOrReturnError(led < SL_LED_COUNT, CHIP_ERROR_INVALID_ARGUMENT); +#if defined(SL_MATTER_RGB_LED_ENABLED) && SL_MATTER_RGB_LED_ENABLED + (state) ? sl_si91x_simple_rgb_led_on(SL_RGB_LED_INSTANCE(led)) : sl_si91x_simple_rgb_led_off(SL_RGB_LED_INSTANCE(led)); +#else (state) ? sl_si91x_led_set(ledPinArray[led]) : sl_si91x_led_clear(ledPinArray[led]); +#endif // defined(SL_MATTER_RGB_LED_ENABLED) && SL_MATTER_RGB_LED_ENABLED return CHIP_NO_ERROR; } @@ -124,7 +136,11 @@ bool SilabsPlatform::GetLedState(uint8_t led) CHIP_ERROR SilabsPlatform::ToggleLed(uint8_t led) { VerifyOrReturnError(led < SL_LED_COUNT, CHIP_ERROR_INVALID_ARGUMENT); +#if defined(SL_MATTER_RGB_LED_ENABLED) && SL_MATTER_RGB_LED_ENABLED + sl_si91x_simple_rgb_led_toggle(SL_RGB_LED_INSTANCE(led)); +#else sl_si91x_led_toggle(ledPinArray[led]); +#endif // defined(SL_MATTER_RGB_LED_ENABLED) && SL_MATTER_RGB_LED_ENABLED return CHIP_NO_ERROR; } #endif // ENABLE_WSTK_LEDS diff --git a/src/platform/silabs/rs911x/BLEManagerImpl.cpp b/src/platform/silabs/rs911x/BLEManagerImpl.cpp index 44b2a17199..176f396f44 100644 --- a/src/platform/silabs/rs911x/BLEManagerImpl.cpp +++ b/src/platform/silabs/rs911x/BLEManagerImpl.cpp @@ -57,24 +57,7 @@ extern "C" { #define BLE_TIMEOUT_MS 400 #define BLE_SEND_INDICATION_TIMER_PERIOD_MS (5000) -// Used to send the Indication Confirmation -uint8_t dev_address[RSI_DEV_ADDR_LEN]; -uint16_t ble_measurement_hndl; - osSemaphoreId_t sl_rs_ble_init_sem; -osTimerId_t sbleAdvTimeoutTimer; - -static osThreadId_t sBleThread; -constexpr uint32_t kBleTaskSize = 2048; -static uint8_t bleStack[kBleTaskSize]; -static osThread_t sBleTaskControlBlock; -constexpr osThreadAttr_t kBleTaskAttr = { .name = "rsi_ble", - .attr_bits = osThreadDetached, - .cb_mem = &sBleTaskControlBlock, - .cb_size = osThreadCbSize, - .stack_mem = bleStack, - .stack_size = kBleTaskSize, - .priority = osPriorityHigh }; using namespace ::chip; using namespace ::chip::Ble; @@ -111,6 +94,84 @@ const uint8_t UUID_CHIPoBLEService[] = { 0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00 0x00, 0x10, 0x00, 0x00, 0xF6, 0xFF, 0x00, 0x00 }; const uint8_t ShortUUID_CHIPoBLEService[] = { 0xF6, 0xFF }; +// Used to send the Indication Confirmation +uint8_t dev_address[RSI_DEV_ADDR_LEN]; +uint16_t rsi_ble_measurement_hndl; +uint16_t rsi_ble_gatt_server_client_config_hndl; + +osTimerId_t sbleAdvTimeoutTimer; + +osThreadId_t sBleThread; +constexpr uint32_t kBleTaskSize = 2560; +uint8_t bleStack[kBleTaskSize]; +osThread_t sBleTaskControlBlock; +constexpr osThreadAttr_t kBleTaskAttr = { .name = "rsi_ble", + .attr_bits = osThreadDetached, + .cb_mem = &sBleTaskControlBlock, + .cb_size = osThreadCbSize, + .stack_mem = bleStack, + .stack_size = kBleTaskSize, + .priority = osPriorityHigh }; + +void rsi_ble_add_matter_service(void) +{ + constexpr uuid_t custom_service = { .size = RSI_BLE_MATTER_CUSTOM_SERVICE_SIZE, + .val = { .val16 = RSI_BLE_MATTER_CUSTOM_SERVICE_VALUE_16 } }; + uint8_t data[RSI_BLE_MATTER_CUSTOM_SERVICE_DATA_LENGTH] = { RSI_BLE_MATTER_CUSTOM_SERVICE_DATA }; + + constexpr uuid_t custom_characteristic_RX = { .size = RSI_BLE_CUSTOM_CHARACTERISTIC_RX_SIZE, + .reserved = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_RESERVED }, + .val = { .val128 = { + .data1 = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_1 }, + .data2 = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_2 }, + .data3 = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_3 }, + .data4 = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_4 } } } }; + + rsi_ble_resp_add_serv_t new_serv_resp = { 0 }; + rsi_ble_add_service(custom_service, &new_serv_resp); + + // Adding custom characteristic declaration to the custom service + SilabsBleWrapper::rsi_ble_add_char_serv_att( + new_serv_resp.serv_handler, new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_RX_ATTRIBUTE_HANDLE_LOCATION, + RSI_BLE_ATT_PROPERTY_WRITE | RSI_BLE_ATT_PROPERTY_READ, // Set read, write, write without response + new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_RX_VALUE_HANDLE_LOCATION, custom_characteristic_RX); + + // Adding characteristic value attribute to the service + SilabsBleWrapper::rsi_ble_add_char_val_att( + new_serv_resp.serv_handler, new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_RX_VALUE_HANDLE_LOCATION, + custom_characteristic_RX, + RSI_BLE_ATT_PROPERTY_WRITE | RSI_BLE_ATT_PROPERTY_READ, // Set read, write, write without response + data, sizeof(data), ATT_REC_IN_HOST); + + constexpr uuid_t custom_characteristic_TX = { .size = RSI_BLE_CUSTOM_CHARACTERISTIC_TX_SIZE, + .reserved = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_RESERVED }, + .val = { .val128 = { + .data1 = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_1 }, + .data2 = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_2 }, + .data3 = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_3 }, + .data4 = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_4 } } } }; + + // Adding custom characteristic declaration to the custom service + SilabsBleWrapper::rsi_ble_add_char_serv_att( + new_serv_resp.serv_handler, new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_TX_ATTRIBUTE_HANDLE_LOCATION, + RSI_BLE_ATT_PROPERTY_WRITE_NO_RESPONSE | RSI_BLE_ATT_PROPERTY_WRITE | RSI_BLE_ATT_PROPERTY_READ | + RSI_BLE_ATT_PROPERTY_NOTIFY | RSI_BLE_ATT_PROPERTY_INDICATE, // Set read, write, write without response + new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_TX_MEASUREMENT_HANDLE_LOCATION, custom_characteristic_TX); + + // Adding characteristic value attribute to the service + rsi_ble_measurement_hndl = new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_TX_MEASUREMENT_HANDLE_LOCATION; + + // Adding characteristic value attribute to the service + rsi_ble_gatt_server_client_config_hndl = + new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_TX_GATT_SERVER_CLIENT_HANDLE_LOCATION; + + SilabsBleWrapper::rsi_ble_add_char_val_att(new_serv_resp.serv_handler, rsi_ble_measurement_hndl, custom_characteristic_TX, + RSI_BLE_ATT_PROPERTY_WRITE_NO_RESPONSE | RSI_BLE_ATT_PROPERTY_WRITE | + RSI_BLE_ATT_PROPERTY_READ | RSI_BLE_ATT_PROPERTY_NOTIFY | + RSI_BLE_ATT_PROPERTY_INDICATE, // Set read, write, write without response + data, sizeof(data), ATT_REC_MAINTAIN_IN_HOST); +} + } // namespace BLEManagerImpl BLEManagerImpl::sInstance; @@ -120,15 +181,14 @@ void BLEManagerImpl::ProcessEvent(SilabsBleWrapper::BleEvent_t inEvent) switch (inEvent.eventType) { case SilabsBleWrapper::BleEventType::RSI_BLE_CONN_EVENT: { - BLEMgrImpl().HandleConnectEvent((inEvent.eventData)); + BLEMgrImpl().HandleConnectEvent(inEvent.eventData); // Requests the connection parameters change with the remote device - rsi_ble_conn_params_update(inEvent.eventData->resp_enh_conn.dev_addr, BLE_MIN_CONNECTION_INTERVAL_MS, + rsi_ble_conn_params_update(inEvent.eventData.resp_enh_conn.dev_addr, BLE_MIN_CONNECTION_INTERVAL_MS, BLE_MAX_CONNECTION_INTERVAL_MS, BLE_SLAVE_LATENCY_MS, BLE_TIMEOUT_MS); - rsi_ble_set_data_len(inEvent.eventData->resp_enh_conn.dev_addr, RSI_BLE_TX_OCTETS, RSI_BLE_TX_TIME); + rsi_ble_set_data_len(inEvent.eventData.resp_enh_conn.dev_addr, RSI_BLE_TX_OCTETS, RSI_BLE_TX_TIME); // Used to send the Indication confirmation - memcpy(dev_address, inEvent.eventData->resp_enh_conn.dev_addr, RSI_DEV_ADDR_LEN); - ble_measurement_hndl = inEvent.eventData->rsi_ble_measurement_hndl; + memcpy(dev_address, inEvent.eventData.resp_enh_conn.dev_addr, RSI_DEV_ADDR_LEN); } break; case SilabsBleWrapper::BleEventType::RSI_BLE_DISCONN_EVENT: { @@ -143,7 +203,7 @@ void BLEManagerImpl::ProcessEvent(SilabsBleWrapper::BleEvent_t inEvent) break; case SilabsBleWrapper::BleEventType::RSI_BLE_EVENT_GATT_RD: { #if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING - if (inEvent.eventData->rsi_ble_read_req->type == 0) + if (inEvent.eventData.rsi_ble_read_req->type == 0) { BLEMgrImpl().HandleC3ReadRequest(inEvent.eventData); } @@ -220,10 +280,10 @@ void BLEManagerImpl::sl_ble_init() SilabsBleWrapper::rsi_ble_on_event_indication_confirmation, NULL); // Exchange of GATT info with BLE stack - SilabsBleWrapper::rsi_ble_add_matter_service(); + rsi_ble_add_matter_service(); rsi_ble_set_random_address_with_value(randomAddrBLE); - sInstance.sBleEventQueue = osMessageQueueNew(WFX_QUEUE_SIZE, sizeof(WfxEvent_t), NULL); + sInstance.sBleEventQueue = osMessageQueueNew(WFX_QUEUE_SIZE, sizeof(SilabsBleWrapper::BleEvent_t), NULL); VerifyOrDie(sInstance.sBleEventQueue != nullptr); chip::DeviceLayer::Internal::BLEMgrImpl().HandleBootEvent(); @@ -440,7 +500,7 @@ CHIP_ERROR BLEManagerImpl::SendIndication(BLE_CONNECTION_OBJECT conId, const Chi PacketBufferHandle data) { int32_t status = 0; - status = rsi_ble_indicate_value(dev_address, ble_measurement_hndl, data->DataLength(), data->Start()); + status = rsi_ble_indicate_value(dev_address, rsi_ble_measurement_hndl, data->DataLength(), data->Start()); if (status != RSI_SUCCESS) { ChipLogProgress(DeviceLayer, "indication failed with error code %lx ", status); @@ -734,9 +794,9 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising(void) return err; } -void BLEManagerImpl::UpdateMtu(SilabsBleWrapper::sl_wfx_msg_t * evt) +void BLEManagerImpl::UpdateMtu(const SilabsBleWrapper::sl_wfx_msg_t & evt) { - CHIPoBLEConState * bleConnState = GetConnectionState(evt->connectionHandle); + CHIPoBLEConState * bleConnState = GetConnectionState(evt.connectionHandle); if (bleConnState != NULL) { // bleConnState->MTU is a 10-bit field inside a uint16_t. We're @@ -748,10 +808,10 @@ void BLEManagerImpl::UpdateMtu(SilabsBleWrapper::sl_wfx_msg_t * evt) // TODO: https://github.com/project-chip/connectedhomeip/issues/2569 // tracks making this safe with a check or explaining why no check // is needed. - ChipLogProgress(DeviceLayer, "DriveBLEState UpdateMtu %d", evt->rsi_ble_mtu.mtu_size); + ChipLogProgress(DeviceLayer, "DriveBLEState UpdateMtu %d", evt.rsi_ble_mtu.mtu_size); #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" - bleConnState->mtu = evt->rsi_ble_mtu.mtu_size; + bleConnState->mtu = evt.rsi_ble_mtu.mtu_size; #pragma GCC diagnostic pop ; } @@ -763,14 +823,13 @@ void BLEManagerImpl::HandleBootEvent(void) PlatformMgr().ScheduleWork(DriveBLEState, 0); } -void BLEManagerImpl::HandleConnectEvent(SilabsBleWrapper::sl_wfx_msg_t * evt) +void BLEManagerImpl::HandleConnectEvent(const SilabsBleWrapper::sl_wfx_msg_t & evt) { - AddConnection(evt->connectionHandle, evt->bondingHandle); + AddConnection(evt.connectionHandle, evt.bondingHandle); PlatformMgr().ScheduleWork(DriveBLEState, 0); } -// TODO:: Implementation need to be done. -void BLEManagerImpl::HandleConnectionCloseEvent(SilabsBleWrapper::sl_wfx_msg_t * evt) +void BLEManagerImpl::HandleConnectionCloseEvent(const SilabsBleWrapper::sl_wfx_msg_t & evt) { uint8_t connHandle = 1; @@ -780,7 +839,7 @@ void BLEManagerImpl::HandleConnectionCloseEvent(SilabsBleWrapper::sl_wfx_msg_t * event.Type = DeviceEventType::kCHIPoBLEConnectionError; event.CHIPoBLEConnectionError.ConId = connHandle; - switch (evt->reason) + switch (evt.reason) { case RSI_BT_CTRL_REMOTE_USER_TERMINATED: @@ -792,7 +851,7 @@ void BLEManagerImpl::HandleConnectionCloseEvent(SilabsBleWrapper::sl_wfx_msg_t * event.CHIPoBLEConnectionError.Reason = BLE_ERROR_CHIPOBLE_PROTOCOL_ABORT; } - ChipLogProgress(DeviceLayer, "BLE GATT connection closed (con %u, reason %x)", connHandle, evt->reason); + ChipLogProgress(DeviceLayer, "BLE GATT connection closed (con %u, reason %x)", connHandle, evt.reason); PlatformMgr().PostEventOrDie(&event); @@ -804,11 +863,11 @@ void BLEManagerImpl::HandleConnectionCloseEvent(SilabsBleWrapper::sl_wfx_msg_t * } } -void BLEManagerImpl::HandleWriteEvent(SilabsBleWrapper::sl_wfx_msg_t * evt) +void BLEManagerImpl::HandleWriteEvent(const SilabsBleWrapper::sl_wfx_msg_t & evt) { - ChipLogProgress(DeviceLayer, "Char Write Req, packet type %d", evt->rsi_ble_write.pkt_type); + ChipLogProgress(DeviceLayer, "Char Write Req, packet type %d", evt.rsi_ble_write.pkt_type); - if (evt->rsi_ble_write.handle[0] == (uint8_t) evt->rsi_ble_gatt_server_client_config_hndl) // TODO:: compare the handle exactly + if (evt.rsi_ble_write.handle[0] == (uint8_t) rsi_ble_gatt_server_client_config_hndl) // TODO:: compare the handle exactly { HandleTXCharCCCDWrite(evt); } @@ -818,23 +877,22 @@ void BLEManagerImpl::HandleWriteEvent(SilabsBleWrapper::sl_wfx_msg_t * evt) } } -// TODO:: Need to implement this -void BLEManagerImpl::HandleTXCharCCCDWrite(SilabsBleWrapper::sl_wfx_msg_t * evt) +void BLEManagerImpl::HandleTXCharCCCDWrite(const SilabsBleWrapper::sl_wfx_msg_t & evt) { CHIP_ERROR err = CHIP_NO_ERROR; bool isIndicationEnabled = false; ChipDeviceEvent event; CHIPoBLEConState * bleConnState; - bleConnState = GetConnectionState(evt->connectionHandle); + bleConnState = GetConnectionState(evt.connectionHandle); VerifyOrExit(bleConnState != NULL, err = CHIP_ERROR_NO_MEMORY); // Determine if the client is enabling or disabling notification/indication. - if (evt->rsi_ble_write.att_value[0] != 0) + if (evt.rsi_ble_write.att_value[0] != 0) { isIndicationEnabled = true; } - ChipLogProgress(DeviceLayer, "HandleTXcharCCCDWrite - Config Flags value : %d", evt->rsi_ble_write.att_value[0]); + ChipLogProgress(DeviceLayer, "HandleTXcharCCCDWrite - Config Flags value : %d", evt.rsi_ble_write.att_value[0]); ChipLogProgress(DeviceLayer, "CHIPoBLE %s received", isIndicationEnabled ? "subscribe" : "unsubscribe"); if (isIndicationEnabled) @@ -864,13 +922,13 @@ void BLEManagerImpl::HandleTXCharCCCDWrite(SilabsBleWrapper::sl_wfx_msg_t * evt) } } -void BLEManagerImpl::HandleRXCharWrite(SilabsBleWrapper::sl_wfx_msg_t * evt) +void BLEManagerImpl::HandleRXCharWrite(const SilabsBleWrapper::sl_wfx_msg_t & evt) { uint8_t conId = 1; CHIP_ERROR err = CHIP_NO_ERROR; System::PacketBufferHandle buf; - uint16_t writeLen = evt->rsi_ble_write.length; - uint8_t * data = (uint8_t *) evt->rsi_ble_write.att_value; + uint16_t writeLen = evt.rsi_ble_write.length; + uint8_t * data = (uint8_t *) evt.rsi_ble_write.att_value; // Copy the data to a packet buffer. buf = System::PacketBufferHandle::NewWithData(data, writeLen, 0, 0); @@ -997,9 +1055,9 @@ CHIP_ERROR BLEManagerImpl::EncodeAdditionalDataTlv() return err; } -void BLEManagerImpl::HandleC3ReadRequest(SilabsBleWrapper::sl_wfx_msg_t * evt) +void BLEManagerImpl::HandleC3ReadRequest(const SilabsBleWrapper::sl_wfx_msg_t & evt) { - sl_status_t ret = rsi_ble_gatt_read_response(evt->rsi_ble_read_req->dev_addr, GATT_READ_RESP, evt->rsi_ble_read_req->handle, + sl_status_t ret = rsi_ble_gatt_read_response(evt.rsi_ble_read_req->dev_addr, GATT_READ_RESP, evt.rsi_ble_read_req->handle, GATT_READ_ZERO_OFFSET, sInstance.c3AdditionalDataBufferHandle->DataLength(), sInstance.c3AdditionalDataBufferHandle->Start()); if (ret != SL_STATUS_OK) diff --git a/src/platform/silabs/rs911x/rsi_ble_config.h b/src/platform/silabs/rs911x/rsi_ble_config.h index de207a99af..f508c3396f 100644 --- a/src/platform/silabs/rs911x/rsi_ble_config.h +++ b/src/platform/silabs/rs911x/rsi_ble_config.h @@ -232,7 +232,6 @@ //! Scan types #define SCAN_TYPE_ACTIVE (0x01) -#define SCAN_TYPE_PASSIVE (0x00) //! Scan filters #define SCAN_FILTER_TYPE_ALL (0x00) @@ -267,15 +266,22 @@ (SL_SI91X_TCP_IP_FEAT_DHCPV4_CLIENT) //! TCP/IP feature select bitmap for selecting TCP/IP features #define RSI_CUSTOM_FEATURE_BIT_MAP SL_SI91X_CUSTOM_FEAT_EXTENTION_VALID //! To set custom feature select bit map +// Enable front-end internal switch control for ACX module boards +#if (SL_SI91X_ACX_MODULE == 1) +#define FRONT_END_SWITCH_CTRL SL_SI91X_EXT_FEAT_FRONT_END_INTERNAL_SWITCH +#else +#define FRONT_END_SWITCH_CTRL SL_SI91X_EXT_FEAT_FRONT_END_SWITCH_PINS_ULP_GPIO_4_5_0 +#endif + #ifdef SLI_SI917 #if WIFI_ENABLE_SECURITY_WPA3_TRANSITION // Adding Support for WPA3 transition #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP \ (SL_SI91X_EXT_FEAT_LOW_POWER_MODE | SL_SI91X_EXT_FEAT_XTAL_CLK_ENABLE(1) | SL_SI91X_RAM_LEVEL_NWP_BASIC_MCU_ADV | \ - SL_SI91X_EXT_FEAT_FRONT_END_SWITCH_PINS_ULP_GPIO_4_5_0 | SL_SI91X_EXT_FEAT_IEEE_80211W) + FRONT_END_SWITCH_CTRL | SL_SI91X_EXT_FEAT_IEEE_80211W) #else #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP \ (SL_SI91X_EXT_FEAT_LOW_POWER_MODE | SL_SI91X_EXT_FEAT_XTAL_CLK_ENABLE(1) | SL_SI91X_RAM_LEVEL_NWP_BASIC_MCU_ADV | \ - SL_SI91X_EXT_FEAT_FRONT_END_SWITCH_PINS_ULP_GPIO_4_5_0) + FRONT_END_SWITCH_CTRL) #endif /* WIFI_ENABLE_SECURITY_WPA3_TRANSITION */ #else // EXP_BOARD #define RSI_EXT_CUSTOM_FEATURE_BIT_MAP (SL_SI91X_EXT_FEAT_LOW_POWER_MODE | SL_SI91X_EXT_FEAT_XTAL_CLK_ENABLE(2)) diff --git a/src/platform/silabs/rs911x/wfx_sl_ble_init.cpp b/src/platform/silabs/rs911x/wfx_sl_ble_init.cpp index c1af13e2cd..971852592c 100644 --- a/src/platform/silabs/rs911x/wfx_sl_ble_init.cpp +++ b/src/platform/silabs/rs911x/wfx_sl_ble_init.cpp @@ -26,9 +26,6 @@ using namespace chip::DeviceLayer::Internal; -// Global Variables -SilabsBleWrapper::BleEvent_t bleEvent; - /*==============================================*/ /** * @fn rsi_ble_on_mtu_event @@ -40,8 +37,9 @@ SilabsBleWrapper::BleEvent_t bleEvent; */ void SilabsBleWrapper::rsi_ble_on_mtu_event(rsi_ble_event_mtu_t * rsi_ble_mtu) { - bleEvent.eventType = BleEventType::RSI_BLE_MTU_EVENT; - memcpy(&bleEvent.eventData->rsi_ble_mtu, rsi_ble_mtu, sizeof(rsi_ble_event_mtu_t)); + SilabsBleWrapper::BleEvent_t bleEvent = { .eventType = BleEventType::RSI_BLE_MTU_EVENT, + .eventData = { .connectionHandle = 1, .rsi_ble_mtu = *rsi_ble_mtu } }; + BLEMgrImpl().BlePostEvent(&bleEvent); } @@ -57,9 +55,9 @@ void SilabsBleWrapper::rsi_ble_on_mtu_event(rsi_ble_event_mtu_t * rsi_ble_mtu) */ void SilabsBleWrapper::rsi_ble_on_gatt_write_event(uint16_t event_id, rsi_ble_event_write_t * rsi_ble_write) { - bleEvent.eventType = BleEventType::RSI_BLE_GATT_WRITE_EVENT; - bleEvent.eventData->event_id = event_id; - memcpy(&bleEvent.eventData->rsi_ble_write, rsi_ble_write, sizeof(rsi_ble_event_write_t)); + SilabsBleWrapper::BleEvent_t bleEvent = { .eventType = BleEventType::RSI_BLE_GATT_WRITE_EVENT, + .eventData = { + .connectionHandle = 1, .event_id = event_id, .rsi_ble_write = *rsi_ble_write } }; BLEMgrImpl().BlePostEvent(&bleEvent); } @@ -74,10 +72,12 @@ void SilabsBleWrapper::rsi_ble_on_gatt_write_event(uint16_t event_id, rsi_ble_ev */ void SilabsBleWrapper::rsi_ble_on_enhance_conn_status_event(rsi_ble_event_enhance_conn_status_t * resp_enh_conn) { - bleEvent.eventType = BleEventType::RSI_BLE_CONN_EVENT; - bleEvent.eventData->connectionHandle = 1; - bleEvent.eventData->bondingHandle = 255; - memcpy(bleEvent.eventData->resp_enh_conn.dev_addr, resp_enh_conn->dev_addr, RSI_DEV_ADDR_LEN); + SilabsBleWrapper::BleEvent_t bleEvent = { .eventType = BleEventType::RSI_BLE_CONN_EVENT, + .eventData = { + .connectionHandle = 1, + .bondingHandle = 255, + } }; + memcpy(bleEvent.eventData.resp_enh_conn.dev_addr, resp_enh_conn->dev_addr, RSI_DEV_ADDR_LEN); BLEMgrImpl().BlePostEvent(&bleEvent); } @@ -93,8 +93,7 @@ void SilabsBleWrapper::rsi_ble_on_enhance_conn_status_event(rsi_ble_event_enhanc */ void SilabsBleWrapper::rsi_ble_on_disconnect_event(rsi_ble_event_disconnect_t * resp_disconnect, uint16_t reason) { - bleEvent.eventType = BleEventType::RSI_BLE_DISCONN_EVENT; - bleEvent.eventData->reason = reason; + SilabsBleWrapper::BleEvent_t bleEvent = { .eventType = BleEventType::RSI_BLE_DISCONN_EVENT, .eventData = { .reason = reason } }; BLEMgrImpl().BlePostEvent(&bleEvent); } @@ -110,9 +109,9 @@ void SilabsBleWrapper::rsi_ble_on_disconnect_event(rsi_ble_event_disconnect_t * void SilabsBleWrapper::rsi_ble_on_event_indication_confirmation(uint16_t resp_status, rsi_ble_set_att_resp_t * rsi_ble_event_set_att_rsp) { - bleEvent.eventType = BleEventType::RSI_BLE_GATT_INDICATION_CONFIRMATION; - bleEvent.eventData->resp_status = resp_status; - memcpy(&bleEvent.eventData->rsi_ble_event_set_att_rsp, rsi_ble_event_set_att_rsp, sizeof(rsi_ble_set_att_resp_t)); + SilabsBleWrapper::BleEvent_t bleEvent = { .eventType = BleEventType::RSI_BLE_GATT_INDICATION_CONFIRMATION, + .eventData = { .resp_status = resp_status, + .rsi_ble_event_set_att_rsp = *rsi_ble_event_set_att_rsp } }; BLEMgrImpl().BlePostEvent(&bleEvent); } @@ -128,9 +127,8 @@ void SilabsBleWrapper::rsi_ble_on_event_indication_confirmation(uint16_t resp_st */ void SilabsBleWrapper::rsi_ble_on_read_req_event(uint16_t event_id, rsi_ble_read_req_t * rsi_ble_read_req) { - bleEvent.eventType = BleEventType::RSI_BLE_EVENT_GATT_RD; - bleEvent.eventData->event_id = event_id; - memcpy(&bleEvent.eventData->rsi_ble_read_req, rsi_ble_read_req, sizeof(rsi_ble_read_req_t)); + SilabsBleWrapper::BleEvent_t bleEvent = { .eventType = BleEventType::RSI_BLE_EVENT_GATT_RD, + .eventData = { .event_id = event_id, .rsi_ble_read_req = rsi_ble_read_req } }; BLEMgrImpl().BlePostEvent(&bleEvent); } @@ -282,77 +280,3 @@ void SilabsBleWrapper::rsi_ble_add_char_val_att(void * serv_handler, uint16_t ha return; } - -/*==============================================*/ -/** - * @fn rsi_ble_add_matter_service - * @brief this function is used to add service for matter - * @return status (uint32_t) 0 for success. - * @section description - * This function is used at application to create new service. - */ - -uint32_t SilabsBleWrapper::rsi_ble_add_matter_service(void) -{ - uuid_t custom_service = { RSI_BLE_MATTER_CUSTOM_SERVICE_UUID }; - custom_service.size = RSI_BLE_MATTER_CUSTOM_SERVICE_SIZE; - custom_service.val.val16 = RSI_BLE_MATTER_CUSTOM_SERVICE_VALUE_16; - uint8_t data[RSI_BLE_MATTER_CUSTOM_SERVICE_DATA_LENGTH] = { RSI_BLE_MATTER_CUSTOM_SERVICE_DATA }; - - static const uuid_t custom_characteristic_RX = { - .size = RSI_BLE_CUSTOM_CHARACTERISTIC_RX_SIZE, - .reserved = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_RESERVED }, - .val = { .val128 = { .data1 = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_1 }, - .data2 = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_2 }, - .data3 = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_3 }, - .data4 = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_4 } } } - }; - - rsi_ble_resp_add_serv_t new_serv_resp = { 0 }; - rsi_ble_add_service(custom_service, &new_serv_resp); - - // Adding custom characteristic declaration to the custom service - rsi_ble_add_char_serv_att( - new_serv_resp.serv_handler, new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_RX_ATTRIBUTE_HANDLE_LOCATION, - RSI_BLE_ATT_PROPERTY_WRITE | RSI_BLE_ATT_PROPERTY_READ, // Set read, write, write without response - new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_RX_VALUE_HANDLE_LOCATION, custom_characteristic_RX); - - // Adding characteristic value attribute to the service - rsi_ble_add_char_val_att(new_serv_resp.serv_handler, - new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_RX_VALUE_HANDLE_LOCATION, custom_characteristic_RX, - RSI_BLE_ATT_PROPERTY_WRITE | RSI_BLE_ATT_PROPERTY_READ, // Set read, write, write without response - data, sizeof(data), ATT_REC_IN_HOST); - - static const uuid_t custom_characteristic_TX = { - .size = RSI_BLE_CUSTOM_CHARACTERISTIC_TX_SIZE, - .reserved = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_RESERVED }, - .val = { .val128 = { .data1 = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_1 }, - .data2 = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_2 }, - .data3 = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_3 }, - .data4 = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_4 } } } - }; - - // Adding custom characteristic declaration to the custom service - rsi_ble_add_char_serv_att( - new_serv_resp.serv_handler, new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_TX_ATTRIBUTE_HANDLE_LOCATION, - RSI_BLE_ATT_PROPERTY_WRITE_NO_RESPONSE | RSI_BLE_ATT_PROPERTY_WRITE | RSI_BLE_ATT_PROPERTY_READ | - RSI_BLE_ATT_PROPERTY_NOTIFY | RSI_BLE_ATT_PROPERTY_INDICATE, // Set read, write, write without response - new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_TX_MEASUREMENT_HANDLE_LOCATION, custom_characteristic_TX); - - // Adding characteristic value attribute to the service - bleEvent.eventData->rsi_ble_measurement_hndl = - new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_TX_MEASUREMENT_HANDLE_LOCATION; - - // Adding characteristic value attribute to the service - bleEvent.eventData->rsi_ble_gatt_server_client_config_hndl = - new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_TX_GATT_SERVER_CLIENT_HANDLE_LOCATION; - - rsi_ble_add_char_val_att(new_serv_resp.serv_handler, bleEvent.eventData->rsi_ble_measurement_hndl, custom_characteristic_TX, - RSI_BLE_ATT_PROPERTY_WRITE_NO_RESPONSE | RSI_BLE_ATT_PROPERTY_WRITE | RSI_BLE_ATT_PROPERTY_READ | - RSI_BLE_ATT_PROPERTY_NOTIFY | - RSI_BLE_ATT_PROPERTY_INDICATE, // Set read, write, write without response - data, sizeof(data), ATT_REC_MAINTAIN_IN_HOST); - - memset(&data, 0, sizeof(data)); - return 0; -} diff --git a/src/platform/silabs/rs911x/wfx_sl_ble_init.h b/src/platform/silabs/rs911x/wfx_sl_ble_init.h index 1e770de072..54351674ef 100644 --- a/src/platform/silabs/rs911x/wfx_sl_ble_init.h +++ b/src/platform/silabs/rs911x/wfx_sl_ble_init.h @@ -104,15 +104,13 @@ class SilabsBleWrapper rsi_ble_event_disconnect_t * resp_disconnect; rsi_ble_read_req_t * rsi_ble_read_req; rsi_ble_set_att_resp_t rsi_ble_event_set_att_rsp; - uint16_t rsi_ble_measurement_hndl; - uint16_t rsi_ble_gatt_server_client_config_hndl; uint16_t subscribed; }; struct BleEvent_t { BleEventType eventType; - sl_wfx_msg_t * eventData; + sl_wfx_msg_t eventData; }; // ALL Ble functions @@ -129,7 +127,6 @@ class SilabsBleWrapper uuid_t att_val_uuid); static void rsi_ble_add_char_val_att(void * serv_handler, uint16_t handle, uuid_t att_type_uuid, uint8_t val_prop, uint8_t * data, uint8_t data_len, uint8_t auth_read); - static uint32_t rsi_ble_add_matter_service(void); }; } // namespace Internal diff --git a/src/platform/silabs/wifi/wfx_host_events.h b/src/platform/silabs/wifi/wfx_host_events.h index de1759951c..3bd973467b 100644 --- a/src/platform/silabs/wifi/wfx_host_events.h +++ b/src/platform/silabs/wifi/wfx_host_events.h @@ -147,12 +147,13 @@ typedef enum /* Note that these are same as RSI_security */ typedef enum { - WFX_SEC_UNSPECIFIED = 0, - WFX_SEC_NONE = 1, - WFX_SEC_WEP = 2, - WFX_SEC_WPA = 3, - WFX_SEC_WPA2 = 4, - WFX_SEC_WPA3 = 5, + WFX_SEC_UNSPECIFIED = 0, + WFX_SEC_NONE = 1, + WFX_SEC_WEP = 2, + WFX_SEC_WPA = 3, + WFX_SEC_WPA2 = 4, + WFX_SEC_WPA3 = 5, + WFX_SEC_WPA_WPA2_MIXED = 6, } wfx_sec_t; typedef struct diff --git a/src/platform/stm32/FactoryDataProvider.cpp b/src/platform/stm32/FactoryDataProvider.cpp index 8b3d0af05a..c5a82393df 100644 --- a/src/platform/stm32/FactoryDataProvider.cpp +++ b/src/platform/stm32/FactoryDataProvider.cpp @@ -268,7 +268,7 @@ CHIP_ERROR FactoryDataProvider::GetVendorName(char * buf, size_t bufSize) { #if (CONFIG_STM32_FACTORY_DATA_ENABLE == 0) - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME, sizeof(CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME)); #else @@ -287,7 +287,7 @@ CHIP_ERROR FactoryDataProvider::GetProductName(char * buf, size_t bufSize) { #if (CONFIG_STM32_FACTORY_DATA_ENABLE == 0) - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME, sizeof(CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME)); #else FACTORYDATA_StatusTypeDef err; @@ -319,7 +319,7 @@ CHIP_ERROR FactoryDataProvider::GetSerialNumber(char * buf, size_t bufSize) CHIP_ERROR FactoryDataProvider::GetHardwareVersionString(char * buf, size_t bufSize) { - ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(bufSize >= sizeof(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING), CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(buf, CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING, sizeof(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING)); return CHIP_NO_ERROR; diff --git a/src/platform/stm32/OTAImageProcessorImpl.cpp b/src/platform/stm32/OTAImageProcessorImpl.cpp index 76363befeb..30967cd614 100644 --- a/src/platform/stm32/OTAImageProcessorImpl.cpp +++ b/src/platform/stm32/OTAImageProcessorImpl.cpp @@ -96,7 +96,7 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & block) CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(block, header); // Needs more data to decode the header - ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); ReturnErrorOnFailure(error); mParams.totalFileBytes = header.mPayloadSize; diff --git a/src/platform/telink/FactoryDataProvider.cpp b/src/platform/telink/FactoryDataProvider.cpp index ba02131911..b2d58313f6 100644 --- a/src/platform/telink/FactoryDataProvider.cpp +++ b/src/platform/telink/FactoryDataProvider.cpp @@ -40,8 +40,8 @@ CHIP_ERROR LoadKeypairFromRaw(ByteSpan privateKey, ByteSpan publicKey, Crypto::P CHIP_ERROR GetFactoryDataString(const FactoryDataString & str, char * buf, size_t bufSize) { - ReturnErrorCodeIf(bufSize < str.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!str.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(bufSize >= str.len + 1, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(str.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(buf, str.data, str.len); buf[str.len] = 0; @@ -102,8 +102,8 @@ template CHIP_ERROR FactoryDataProvider::GetCertificationDeclaration(MutableByteSpan & outBuffer) { #if CONFIG_CHIP_CERTIFICATION_DECLARATION_STORAGE - ReturnErrorCodeIf(outBuffer.size() < mFactoryData.certificate_declaration.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.certificate_declaration.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(outBuffer.size() >= mFactoryData.certificate_declaration.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.certificate_declaration.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(outBuffer.data(), mFactoryData.certificate_declaration.data, mFactoryData.certificate_declaration.len); @@ -127,8 +127,8 @@ CHIP_ERROR FactoryDataProvider::GetFirmwareInformation(Mutable template CHIP_ERROR FactoryDataProvider::GetDeviceAttestationCert(MutableByteSpan & outBuffer) { - ReturnErrorCodeIf(outBuffer.size() < mFactoryData.dac_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.dac_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(outBuffer.size() >= mFactoryData.dac_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.dac_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(outBuffer.data(), mFactoryData.dac_cert.data, mFactoryData.dac_cert.len); @@ -140,8 +140,8 @@ CHIP_ERROR FactoryDataProvider::GetDeviceAttestationCert(Mutab template CHIP_ERROR FactoryDataProvider::GetProductAttestationIntermediateCert(MutableByteSpan & outBuffer) { - ReturnErrorCodeIf(outBuffer.size() < mFactoryData.pai_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.pai_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(outBuffer.size() >= mFactoryData.pai_cert.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.pai_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(outBuffer.data(), mFactoryData.pai_cert.data, mFactoryData.pai_cert.len); @@ -158,8 +158,8 @@ CHIP_ERROR FactoryDataProvider::SignWithDeviceAttestationKey(c Crypto::P256Keypair keypair; VerifyOrReturnError(outSignBuffer.size() >= signature.Capacity(), CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.dac_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); - ReturnErrorCodeIf(!mFactoryData.dac_priv_key.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(mFactoryData.dac_cert.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(mFactoryData.dac_priv_key.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); // Extract public key from DAC cert. ByteSpan dacCertSpan{ reinterpret_cast(mFactoryData.dac_cert.data), mFactoryData.dac_cert.len }; @@ -191,7 +191,7 @@ CHIP_ERROR FactoryDataProvider::SetSetupDiscriminator(uint16_t template CHIP_ERROR FactoryDataProvider::GetSpake2pIterationCount(uint32_t & iterationCount) { - ReturnErrorCodeIf(mFactoryData.spake2_it == 0, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(mFactoryData.spake2_it != 0, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); iterationCount = mFactoryData.spake2_it; return CHIP_NO_ERROR; } @@ -199,8 +199,8 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pIterationCount(uint3 template CHIP_ERROR FactoryDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) { - ReturnErrorCodeIf(saltBuf.size() < mFactoryData.spake2_salt.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.spake2_salt.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(saltBuf.size() >= mFactoryData.spake2_salt.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.spake2_salt.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(saltBuf.data(), mFactoryData.spake2_salt.data, mFactoryData.spake2_salt.len); @@ -212,8 +212,8 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pSalt(MutableByteSpan template CHIP_ERROR FactoryDataProvider::GetSpake2pVerifier(MutableByteSpan & verifierBuf, size_t & verifierLen) { - ReturnErrorCodeIf(verifierBuf.size() < mFactoryData.spake2_verifier.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.spake2_verifier.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(verifierBuf.size() >= mFactoryData.spake2_verifier.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.spake2_verifier.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(verifierBuf.data(), mFactoryData.spake2_verifier.data, mFactoryData.spake2_verifier.len); @@ -227,7 +227,7 @@ CHIP_ERROR FactoryDataProvider::GetSpake2pVerifier(MutableByte template CHIP_ERROR FactoryDataProvider::GetSetupPasscode(uint32_t & setupPasscode) { - ReturnErrorCodeIf(mFactoryData.passcode == 0, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(mFactoryData.passcode != 0, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); setupPasscode = mFactoryData.passcode; return CHIP_NO_ERROR; } @@ -317,8 +317,8 @@ CHIP_ERROR FactoryDataProvider::GetHardwareVersionString(char template CHIP_ERROR FactoryDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) { - ReturnErrorCodeIf(uniqueIdSpan.size() < mFactoryData.rd_uid.len, CHIP_ERROR_BUFFER_TOO_SMALL); - ReturnErrorCodeIf(!mFactoryData.rd_uid.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(uniqueIdSpan.size() >= mFactoryData.rd_uid.len, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.rd_uid.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); memcpy(uniqueIdSpan.data(), mFactoryData.rd_uid.data, mFactoryData.rd_uid.len); @@ -328,8 +328,8 @@ CHIP_ERROR FactoryDataProvider::GetRotatingDeviceIdUniqueId(Mu template CHIP_ERROR FactoryDataProvider::GetEnableKey(MutableByteSpan & enableKey) { - ReturnErrorCodeIf(!mFactoryData.enable_key.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); - ReturnErrorCodeIf(enableKey.size() < mFactoryData.enable_key.len / 2, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(mFactoryData.enable_key.data, CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND); + VerifyOrReturnError(enableKey.size() >= mFactoryData.enable_key.len / 2, CHIP_ERROR_BUFFER_TOO_SMALL); Encoding::HexToBytes((const char *) mFactoryData.enable_key.data, mFactoryData.enable_key.len, enableKey.data(), enableKey.size()); diff --git a/src/platform/telink/OTAImageProcessorImpl.cpp b/src/platform/telink/OTAImageProcessorImpl.cpp index b1ce54748e..a47a59fadf 100644 --- a/src/platform/telink/OTAImageProcessorImpl.cpp +++ b/src/platform/telink/OTAImageProcessorImpl.cpp @@ -159,10 +159,10 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessBlock(ByteSpan & aBlock) bool OTAImageProcessorImpl::IsFirstImageRun() { OTARequestorInterface * requestor = GetRequestorInstance(); - ReturnErrorCodeIf(requestor == nullptr, false); + VerifyOrReturnError(requestor != nullptr, false); uint32_t currentVersion; - ReturnErrorCodeIf(ConfigurationMgr().GetSoftwareVersion(currentVersion) != CHIP_NO_ERROR, false); + VerifyOrReturnError(ConfigurationMgr().GetSoftwareVersion(currentVersion) == CHIP_NO_ERROR, false); return requestor->GetCurrentUpdateState() == OTARequestorInterface::OTAUpdateStateEnum::kApplying && requestor->GetTargetVersion() == currentVersion; @@ -182,7 +182,7 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessHeader(ByteSpan & aBlock) CHIP_ERROR error = mHeaderParser.AccumulateAndDecode(aBlock, header); // Needs more data to decode the header - ReturnErrorCodeIf(error == CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); + VerifyOrReturnError(error != CHIP_ERROR_BUFFER_TOO_SMALL, CHIP_NO_ERROR); ReturnErrorOnFailure(error); mParams.totalFileBytes = header.mPayloadSize; diff --git a/src/platform/tests/TestKeyValueStoreMgr.cpp b/src/platform/tests/TestKeyValueStoreMgr.cpp index 0429182e0c..c6b87410b7 100644 --- a/src/platform/tests/TestKeyValueStoreMgr.cpp +++ b/src/platform/tests/TestKeyValueStoreMgr.cpp @@ -249,7 +249,7 @@ TEST_F(TestKeyValueStoreMgr, AllCharactersKey) for (size_t charId = 0; charId < sizeof(allChars); charId += kKeyLength) { char testKey[kKeyLength + 1] = {}; - memcpy(testKey, &allChars[charId], chip::min(sizeof(allChars) - charId, kKeyLength)); + memcpy(testKey, &allChars[charId], std::min(sizeof(allChars) - charId, kKeyLength)); CHIP_ERROR err = KeyValueStoreMgr().Put(testKey, kTestValue); EXPECT_EQ(err, CHIP_NO_ERROR); diff --git a/src/platform/webos/ChipDeviceScanner.cpp b/src/platform/webos/ChipDeviceScanner.cpp index 5a312281d6..5808b4bf48 100644 --- a/src/platform/webos/ChipDeviceScanner.cpp +++ b/src/platform/webos/ChipDeviceScanner.cpp @@ -294,7 +294,7 @@ gboolean ChipDeviceScanner::TriggerScan(GMainLoop * mainLoop, gpointer userData) CHIP_ERROR ChipDeviceScanner::StartChipScan(unsigned timeoutMs) { CHIP_ERROR err = CHIP_NO_ERROR; - ReturnErrorCodeIf(mIsScanning, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(!mIsScanning, CHIP_ERROR_INCORRECT_STATE); kScanTimeout = timeoutMs; @@ -327,7 +327,7 @@ bool ChipDeviceScanner::cancelDiscoveryCb(LSHandle * sh, LSMessage * message, vo CHIP_ERROR ChipDeviceScanner::StopChipScan() { int ret = 0; - ReturnErrorCodeIf(!mIsScanning, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mIsScanning, CHIP_ERROR_INCORRECT_STATE); ret = LSCall(mLSHandle, "luna://com.webos.service.bluetooth2/dadapter/cancelDiscovery", "{}", cancelDiscoveryCb, this, NULL, NULL); diff --git a/src/protocols/bdx/BdxTransferSession.cpp b/src/protocols/bdx/BdxTransferSession.cpp index 0a513d7ea7..89851493ba 100644 --- a/src/protocols/bdx/BdxTransferSession.cpp +++ b/src/protocols/bdx/BdxTransferSession.cpp @@ -559,8 +559,8 @@ void TransferSession::HandleTransferInit(MessageType msgType, System::PacketBuff VerifyOrReturn(err == CHIP_NO_ERROR, PrepareStatusReport(StatusCode::kBadMessageContents)); ResolveTransferControlOptions(transferInit.TransferCtlOptions); - mTransferVersion = ::chip::min(kBdxVersion, transferInit.Version); - mTransferMaxBlockSize = ::chip::min(mMaxSupportedBlockSize, transferInit.MaxBlockSize); + mTransferVersion = std::min(kBdxVersion, transferInit.Version); + mTransferMaxBlockSize = std::min(mMaxSupportedBlockSize, transferInit.MaxBlockSize); // Accept for now, they may be changed or rejected by the peer if this is a ReceiveInit mStartOffset = transferInit.StartOffset; diff --git a/src/protocols/secure_channel/CASEServer.cpp b/src/protocols/secure_channel/CASEServer.cpp index fc6b4970ce..95d3a9c771 100644 --- a/src/protocols/secure_channel/CASEServer.cpp +++ b/src/protocols/secure_channel/CASEServer.cpp @@ -61,7 +61,7 @@ CHIP_ERROR CASEServer::ListenForSessionEstablishment(Messaging::ExchangeManager CHIP_ERROR CASEServer::InitCASEHandshake(Messaging::ExchangeContext * ec) { MATTER_TRACE_SCOPE("InitCASEHandshake", "CASEServer"); - ReturnErrorCodeIf(ec == nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(ec != nullptr, CHIP_ERROR_INVALID_ARGUMENT); // Hand over the exchange context to the CASE session. ec->SetDelegate(&GetSession()); diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index e0a0fa744e..007a58659f 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -523,15 +523,15 @@ CHIP_ERROR CASESession::EstablishSession(SessionManager & sessionManager, Fabric CHIP_ERROR err = CHIP_NO_ERROR; // Return early on error here, as we have not initialized any state yet - ReturnErrorCodeWithMetricIf(kMetricDeviceCASESession, exchangeCtxt == nullptr, CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeWithMetricIf(kMetricDeviceCASESession, fabricTable == nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnErrorWithMetric(kMetricDeviceCASESession, exchangeCtxt != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnErrorWithMetric(kMetricDeviceCASESession, fabricTable != nullptr, CHIP_ERROR_INVALID_ARGUMENT); // Use FabricTable directly to avoid situation of dangling index from stale FabricInfo // until we factor-out any FabricInfo direct usage. - ReturnErrorCodeWithMetricIf(kMetricDeviceCASESession, peerScopedNodeId.GetFabricIndex() == kUndefinedFabricIndex, - CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnErrorWithMetric(kMetricDeviceCASESession, peerScopedNodeId.GetFabricIndex() != kUndefinedFabricIndex, + CHIP_ERROR_INVALID_ARGUMENT); const auto * fabricInfo = fabricTable->FindFabricWithIndex(peerScopedNodeId.GetFabricIndex()); - ReturnErrorCodeWithMetricIf(kMetricDeviceCASESession, fabricInfo == nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnErrorWithMetric(kMetricDeviceCASESession, fabricInfo != nullptr, CHIP_ERROR_INVALID_ARGUMENT); err = Init(sessionManager, policy, delegate, peerScopedNodeId); @@ -784,7 +784,7 @@ CHIP_ERROR CASESession::SendSigma1() // Lookup fabric info. const auto * fabricInfo = mFabricsTable->FindFabricWithIndex(mFabricIndex); - ReturnErrorCodeIf(fabricInfo == nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(fabricInfo != nullptr, CHIP_ERROR_INCORRECT_STATE); // Validate that we have a session ID allocated. VerifyOrReturnError(GetLocalSessionId().HasValue(), CHIP_ERROR_INCORRECT_STATE); diff --git a/src/protocols/secure_channel/PASESession.cpp b/src/protocols/secure_channel/PASESession.cpp index 6178348ad5..4bf1aa5521 100644 --- a/src/protocols/secure_channel/PASESession.cpp +++ b/src/protocols/secure_channel/PASESession.cpp @@ -126,7 +126,7 @@ CHIP_ERROR PASESession::Init(SessionManager & sessionManager, uint32_t setupCode VerifyOrReturnError(GetLocalSessionId().HasValue(), CHIP_ERROR_INCORRECT_STATE); ChipLogDetail(SecureChannel, "Assigned local session key ID %u", GetLocalSessionId().Value()); - ReturnErrorCodeIf(setupCode >= (1 << kSetupPINCodeFieldLengthInBits), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(setupCode < (1 << kSetupPINCodeFieldLengthInBits), CHIP_ERROR_INVALID_ARGUMENT); mSetupPINCode = setupCode; return CHIP_NO_ERROR; @@ -139,10 +139,7 @@ CHIP_ERROR PASESession::GeneratePASEVerifier(Spake2pVerifier & verifier, uint32_ if (useRandomPIN) { - ReturnErrorOnFailure(DRBG_get_bytes(reinterpret_cast(&setupPINCode), sizeof(setupPINCode))); - - // Passcodes shall be restricted to the values 00000001 to 99999998 in decimal, see 5.1.1.6 - setupPINCode = (setupPINCode % kSetupPINCodeMaximumValue) + 1; + ReturnErrorOnFailure(SetupPayload::generateRandomSetupPin(setupPINCode)); } return verifier.Generate(pbkdf2IterCount, salt, setupPINCode); @@ -165,10 +162,10 @@ CHIP_ERROR PASESession::WaitForPairing(SessionManager & sessionManager, const Sp SessionEstablishmentDelegate * delegate) { // Return early on error here, as we have not initialized any state yet - ReturnErrorCodeIf(salt.empty(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(salt.data() == nullptr, CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorCodeIf(salt.size() < kSpake2p_Min_PBKDF_Salt_Length || salt.size() > kSpake2p_Max_PBKDF_Salt_Length, - CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(!salt.empty(), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(salt.data() != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(salt.size() >= kSpake2p_Min_PBKDF_Salt_Length && salt.size() <= kSpake2p_Max_PBKDF_Salt_Length, + CHIP_ERROR_INVALID_ARGUMENT); CHIP_ERROR err = Init(sessionManager, kSetupPINCodeUndefinedValue, delegate); // From here onwards, let's go to exit on error, as some state might have already @@ -212,7 +209,7 @@ CHIP_ERROR PASESession::Pair(SessionManager & sessionManager, uint32_t peerSetUp SessionEstablishmentDelegate * delegate) { MATTER_TRACE_SCOPE("Pair", "PASESession"); - ReturnErrorCodeIf(exchangeCtxt == nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(exchangeCtxt != nullptr, CHIP_ERROR_INVALID_ARGUMENT); CHIP_ERROR err = Init(sessionManager, peerSetUpPINCode, delegate); SuccessOrExit(err); @@ -235,7 +232,15 @@ CHIP_ERROR PASESession::Pair(SessionManager & sessionManager, uint32_t peerSetUp exit: if (err != CHIP_NO_ERROR) { + // If a failure happens before we have placed the incoming exchange into `mExchangeCtxt`, we need to make + // sure to close the exchange to fulfill our API contract. + if (!mExchangeCtxt.HasValue()) + { + exchangeCtxt->Close(); + } Clear(); + ChipLogError(SecureChannel, "Failed during PASE session pairing request: %" CHIP_ERROR_FORMAT, err.Format()); + MATTER_TRACE_COUNTER("PASEFail"); } return err; } diff --git a/src/protocols/secure_channel/PASESession.h b/src/protocols/secure_channel/PASESession.h index 2e731283c8..92b4ee3d8b 100644 --- a/src/protocols/secure_channel/PASESession.h +++ b/src/protocols/secure_channel/PASESession.h @@ -99,6 +99,8 @@ class DLL_EXPORT PASESession : public Messaging::UnsolicitedMessageHandler, * ownership of the exchangeCtxt to PASESession object. PASESession * will close the exchange on (successful/failed) handshake completion. * @param delegate Callback object + * The delegate will be notified if and only if Pair() returns success. Errors occurring after Pair() + * returns success will be reported via the delegate. * * @return CHIP_ERROR The result of initialization */ diff --git a/src/protocols/secure_channel/StatusReport.cpp b/src/protocols/secure_channel/StatusReport.cpp index e31c832b46..5ce7656c9e 100644 --- a/src/protocols/secure_channel/StatusReport.cpp +++ b/src/protocols/secure_channel/StatusReport.cpp @@ -50,7 +50,7 @@ CHIP_ERROR StatusReport::Parse(System::PacketBufferHandle buf) { uint16_t tempGeneralCode = 0; - ReturnErrorCodeIf(buf.IsNull(), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(!buf.IsNull(), CHIP_ERROR_INVALID_ARGUMENT); uint8_t * bufStart = buf->Start(); LittleEndian::Reader bufReader(bufStart, buf->DataLength()); diff --git a/src/python_testing/MinimalRepresentation.py b/src/python_testing/MinimalRepresentation.py index c99919a908..93ce543e09 100644 --- a/src/python_testing/MinimalRepresentation.py +++ b/src/python_testing/MinimalRepresentation.py @@ -17,10 +17,10 @@ from dataclasses import dataclass, field +from chip.testing.conformance import ConformanceDecision +from chip.testing.global_attribute_ids import GlobalAttributeIds +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from chip.tlv import uint -from conformance_support import ConformanceDecision -from global_attribute_ids import GlobalAttributeIds -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main from TC_DeviceConformance import DeviceConformanceTests diff --git a/src/python_testing/TCP_Tests.py b/src/python_testing/TCP_Tests.py index 41e5c2c356..10209346a0 100644 --- a/src/python_testing/TCP_Tests.py +++ b/src/python_testing/TCP_Tests.py @@ -26,14 +26,14 @@ # --passcode 20202021 # --trace-to json:${TRACE_TEST_JSON}.json # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto -# factoryreset: true +# factory-reset: true # quiet: true # === END CI TEST ARGUMENTS === # import chip.clusters as Clusters from chip import ChipDeviceCtrl from chip.interaction_model import InteractionModelError -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_ACE_1_2.py b/src/python_testing/TC_ACE_1_2.py index 7d227f5a5c..5a38120561 100644 --- a/src/python_testing/TC_ACE_1_2.py +++ b/src/python_testing/TC_ACE_1_2.py @@ -22,7 +22,7 @@ # test-runner-runs: # run1: # app: ${ALL_CLUSTERS_APP} -# factoryreset: true +# factory-reset: true # quiet: true # app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json # script-args: > @@ -42,7 +42,7 @@ from chip.clusters.Attribute import EventReadResult, SubscriptionTransaction, TypedAttributePath from chip.exceptions import ChipStackError from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_ACE_1_3.py b/src/python_testing/TC_ACE_1_3.py index 9fb5227c69..1672eb65af 100644 --- a/src/python_testing/TC_ACE_1_3.py +++ b/src/python_testing/TC_ACE_1_3.py @@ -22,7 +22,7 @@ # test-runner-runs: # run1: # app: ${ALL_CLUSTERS_APP} -# factoryreset: true +# factory-reset: true # quiet: true # app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json # script-args: > @@ -38,7 +38,7 @@ import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts @@ -54,16 +54,16 @@ async def write_acl(self, acl): asserts.assert_equal(result[0].Status, Status.Success, "ACL write failed") print(result) - async def read_descriptor_expect_success(self, th, endpoint: int): + async def read_descriptor_expect_success(self, th): cluster = Clusters.Objects.Descriptor attribute = Clusters.Descriptor.Attributes.DeviceTypeList - await self.read_single_attribute_check_success(dev_ctrl=th, endpoint=endpoint, cluster=cluster, attribute=attribute) + await self.read_single_attribute_check_success(dev_ctrl=th, endpoint=0, cluster=cluster, attribute=attribute) - async def read_descriptor_expect_unsupported_access(self, th, endpoint: int): + async def read_descriptor_expect_unsupported_access(self, th): cluster = Clusters.Objects.Descriptor attribute = Clusters.Descriptor.Attributes.DeviceTypeList await self.read_single_attribute_expect_error( - dev_ctrl=th, endpoint=endpoint, cluster=cluster, attribute=attribute, error=Status.UnsupportedAccess) + dev_ctrl=th, endpoint=0, cluster=cluster, attribute=attribute, error=Status.UnsupportedAccess) def desc_TC_ACE_1_3(self) -> str: return "[TC-ACE-1.3] Subjects" @@ -144,8 +144,6 @@ async def test_TC_ACE_1_3(self): cat2v3 = cat2_id | 0x0003 logging.info('cat1v1 0x%x', cat1v1) - endpoint = 0 - self.step(1) fabric_admin = self.certificate_authority_manager.activeCaList[0].adminList[0] @@ -165,266 +163,266 @@ async def test_TC_ACE_1_3(self): paaTrustStorePath=str(self.matter_test_config.paa_trust_store_path), catTags=[cat1v1, cat2v2]) - self.step(2, endpoint) + self.step(2) TH0_admin_acl = Clusters.AccessControl.Structs.AccessControlEntryStruct( privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister, authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects=[TH0_nodeid], - targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=endpoint, cluster=0x001f)]) + targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=0, cluster=0x001f)]) all_view = Clusters.AccessControl.Structs.AccessControlEntryStruct( privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects=[], - targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=endpoint)]) + targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=0)]) acl = [TH0_admin_acl, all_view] await self.write_acl(acl) - self.step(3, endpoint) - await self.read_descriptor_expect_success(TH1, endpoint) + self.step(3) + await self.read_descriptor_expect_success(TH1) - self.step(4, endpoint) - await self.read_descriptor_expect_success(TH2, endpoint) + self.step(4) + await self.read_descriptor_expect_success(TH2) - self.step(5, endpoint) - await self.read_descriptor_expect_success(TH3, endpoint) + self.step(5) + await self.read_descriptor_expect_success(TH3) - self.step(6, endpoint) + self.step(6) th1_view = Clusters.AccessControl.Structs.AccessControlEntryStruct( privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects=[TH1_nodeid], - targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=endpoint)]) + targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=0)]) acl = [TH0_admin_acl, th1_view] await self.write_acl(acl) - self.step(7, endpoint) - await self.read_descriptor_expect_success(TH1, endpoint) + self.step(7) + await self.read_descriptor_expect_success(TH1) - self.step(8, endpoint) - await self.read_descriptor_expect_unsupported_access(TH2, endpoint) + self.step(8) + await self.read_descriptor_expect_unsupported_access(TH2) - self.step(9, endpoint) - await self.read_descriptor_expect_unsupported_access(TH3, endpoint) + self.step(9) + await self.read_descriptor_expect_unsupported_access(TH3) - self.step(10, endpoint) + self.step(10) th2_view = Clusters.AccessControl.Structs.AccessControlEntryStruct( privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects=[TH2_nodeid], - targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=endpoint)]) + targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=0)]) acl = [TH0_admin_acl, th2_view] await self.write_acl(acl) - self.step(11, endpoint) - await self.read_descriptor_expect_unsupported_access(TH1, endpoint) + self.step(11) + await self.read_descriptor_expect_unsupported_access(TH1) - self.step(12, endpoint) - await self.read_descriptor_expect_success(TH2, endpoint) + self.step(12) + await self.read_descriptor_expect_success(TH2) - self.step(13, endpoint) - await self.read_descriptor_expect_unsupported_access(TH3, endpoint) + self.step(13) + await self.read_descriptor_expect_unsupported_access(TH3) - self.step(14, endpoint) + self.step(14) th3_view = Clusters.AccessControl.Structs.AccessControlEntryStruct( privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects=[TH3_nodeid], - targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=endpoint)]) + targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=0)]) acl = [TH0_admin_acl, th3_view] await self.write_acl(acl) - self.step(15, endpoint) - await self.read_descriptor_expect_unsupported_access(TH1, endpoint) + self.step(15) + await self.read_descriptor_expect_unsupported_access(TH1) - self.step(16, endpoint) - await self.read_descriptor_expect_unsupported_access(TH2, endpoint) + self.step(16) + await self.read_descriptor_expect_unsupported_access(TH2) - self.step(17, endpoint) - await self.read_descriptor_expect_success(TH3, endpoint) + self.step(17) + await self.read_descriptor_expect_success(TH3) - self.step(18, endpoint) + self.step(18) th12_view = Clusters.AccessControl.Structs.AccessControlEntryStruct( privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects=[TH1_nodeid, TH2_nodeid], - targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=endpoint)]) + targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=0)]) acl = [TH0_admin_acl, th12_view] await self.write_acl(acl) - self.step(19, endpoint) - await self.read_descriptor_expect_success(TH1, endpoint) + self.step(19) + await self.read_descriptor_expect_success(TH1) - self.step(20, endpoint) - await self.read_descriptor_expect_success(TH2, endpoint) + self.step(20) + await self.read_descriptor_expect_success(TH2) - self.step(21, endpoint) - await self.read_descriptor_expect_unsupported_access(TH3, endpoint) + self.step(21) + await self.read_descriptor_expect_unsupported_access(TH3) - self.step(22, endpoint) + self.step(22) th13_view = Clusters.AccessControl.Structs.AccessControlEntryStruct( privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects=[TH1_nodeid, TH3_nodeid], - targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=endpoint)]) + targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=0)]) acl = [TH0_admin_acl, th13_view] await self.write_acl(acl) - self.step(23, endpoint) - await self.read_descriptor_expect_success(TH1, endpoint) + self.step(23) + await self.read_descriptor_expect_success(TH1) - self.step(24, endpoint) - await self.read_descriptor_expect_unsupported_access(TH2, endpoint) + self.step(24) + await self.read_descriptor_expect_unsupported_access(TH2) - self.step(25, endpoint) - await self.read_descriptor_expect_success(TH3, endpoint) + self.step(25) + await self.read_descriptor_expect_success(TH3) - self.step(26, endpoint) + self.step(26) th23_view = Clusters.AccessControl.Structs.AccessControlEntryStruct( privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects=[TH2_nodeid, TH3_nodeid], - targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=endpoint)]) + targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=0)]) acl = [TH0_admin_acl, th23_view] await self.write_acl(acl) - self.step(27, endpoint) - await self.read_descriptor_expect_unsupported_access(TH1, endpoint) + self.step(27) + await self.read_descriptor_expect_unsupported_access(TH1) - self.step(28, endpoint) - await self.read_descriptor_expect_success(TH2, endpoint) + self.step(28) + await self.read_descriptor_expect_success(TH2) - self.step(29, endpoint) - await self.read_descriptor_expect_success(TH3, endpoint) + self.step(29) + await self.read_descriptor_expect_success(TH3) - self.step(30, endpoint) + self.step(30) th123_view = Clusters.AccessControl.Structs.AccessControlEntryStruct( privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects=[TH1_nodeid, TH2_nodeid, TH3_nodeid], - targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=endpoint)]) + targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=0)]) acl = [TH0_admin_acl, th123_view] await self.write_acl(acl) - self.step(31, endpoint) - await self.read_descriptor_expect_success(TH1, endpoint) + self.step(31) + await self.read_descriptor_expect_success(TH1) - self.step(32, endpoint) - await self.read_descriptor_expect_success(TH2, endpoint) + self.step(32) + await self.read_descriptor_expect_success(TH2) - self.step(33, endpoint) - await self.read_descriptor_expect_success(TH3, endpoint) + self.step(33) + await self.read_descriptor_expect_success(TH3) - self.step(34, endpoint) + self.step(34) cat1v1_view = Clusters.AccessControl.Structs.AccessControlEntryStruct( privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects=[acl_subject(cat1v1)], - targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=endpoint)]) + targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=0)]) acl = [TH0_admin_acl, cat1v1_view] await self.write_acl(acl) - self.step(35, endpoint) - await self.read_descriptor_expect_success(TH1, endpoint) + self.step(35) + await self.read_descriptor_expect_success(TH1) - self.step(36, endpoint) - await self.read_descriptor_expect_success(TH2, endpoint) + self.step(36) + await self.read_descriptor_expect_success(TH2) - self.step(37, endpoint) - await self.read_descriptor_expect_success(TH3, endpoint) + self.step(37) + await self.read_descriptor_expect_success(TH3) - self.step(38, endpoint) + self.step(38) cat1v2_view = Clusters.AccessControl.Structs.AccessControlEntryStruct( privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects=[acl_subject(cat1v2)], - targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=endpoint)]) + targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=0)]) acl = [TH0_admin_acl, cat1v2_view] await self.write_acl(acl) - self.step(39, endpoint) - await self.read_descriptor_expect_success(TH1, endpoint) + self.step(39) + await self.read_descriptor_expect_success(TH1) - self.step(40, endpoint) - await self.read_descriptor_expect_success(TH2, endpoint) + self.step(40) + await self.read_descriptor_expect_success(TH2) - self.step(41, endpoint) - await self.read_descriptor_expect_unsupported_access(TH3, endpoint) + self.step(41) + await self.read_descriptor_expect_unsupported_access(TH3) - self.step(42, endpoint) + self.step(42) cat1v3_view = Clusters.AccessControl.Structs.AccessControlEntryStruct( privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects=[acl_subject(cat1v3)], - targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=endpoint)]) + targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=0)]) acl = [TH0_admin_acl, cat1v3_view] await self.write_acl(acl) - self.step(43, endpoint) - await self.read_descriptor_expect_success(TH1, endpoint) + self.step(43) + await self.read_descriptor_expect_success(TH1) - self.step(44, endpoint) - await self.read_descriptor_expect_unsupported_access(TH2, endpoint) + self.step(44) + await self.read_descriptor_expect_unsupported_access(TH2) - self.step(45, endpoint) - await self.read_descriptor_expect_unsupported_access(TH3, endpoint) + self.step(45) + await self.read_descriptor_expect_unsupported_access(TH3) - self.step(46, endpoint) + self.step(46) cat2v1_view = Clusters.AccessControl.Structs.AccessControlEntryStruct( privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects=[acl_subject(cat2v1)], - targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=endpoint)]) + targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=0)]) acl = [TH0_admin_acl, cat2v1_view] await self.write_acl(acl) - self.step(47, endpoint) - await self.read_descriptor_expect_unsupported_access(TH1, endpoint) + self.step(47) + await self.read_descriptor_expect_unsupported_access(TH1) - self.step(48, endpoint) - await self.read_descriptor_expect_success(TH2, endpoint) + self.step(48) + await self.read_descriptor_expect_success(TH2) - self.step(49, endpoint) - await self.read_descriptor_expect_success(TH3, endpoint) + self.step(49) + await self.read_descriptor_expect_success(TH3) - self.step(50, endpoint) + self.step(50) cat2v2_view = Clusters.AccessControl.Structs.AccessControlEntryStruct( privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects=[acl_subject(cat2v2)], - targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=endpoint)]) + targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=0)]) acl = [TH0_admin_acl, cat2v2_view] await self.write_acl(acl) - self.step(51, endpoint) - await self.read_descriptor_expect_unsupported_access(TH1, endpoint) + self.step(51) + await self.read_descriptor_expect_unsupported_access(TH1) - self.step(52, endpoint) - await self.read_descriptor_expect_unsupported_access(TH2, endpoint) + self.step(52) + await self.read_descriptor_expect_unsupported_access(TH2) - self.step(53, endpoint) - await self.read_descriptor_expect_success(TH3, endpoint) + self.step(53) + await self.read_descriptor_expect_success(TH3) - self.step(54, endpoint) + self.step(54) cat2v3_view = Clusters.AccessControl.Structs.AccessControlEntryStruct( privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, authMode=Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects=[acl_subject(cat2v3)], - targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=endpoint)]) + targets=[Clusters.AccessControl.Structs.AccessControlTargetStruct(endpoint=0)]) acl = [TH0_admin_acl, cat2v3_view] await self.write_acl(acl) - self.step(55, endpoint) - await self.read_descriptor_expect_unsupported_access(TH1, endpoint) + self.step(55) + await self.read_descriptor_expect_unsupported_access(TH1) - self.step(56, endpoint) - await self.read_descriptor_expect_unsupported_access(TH2, endpoint) + self.step(56) + await self.read_descriptor_expect_unsupported_access(TH2) - self.step(57, endpoint) - await self.read_descriptor_expect_unsupported_access(TH3, endpoint) + self.step(57) + await self.read_descriptor_expect_unsupported_access(TH3) self.step(58) diff --git a/src/python_testing/TC_ACE_1_4.py b/src/python_testing/TC_ACE_1_4.py index 9344b0bd3e..37577b6270 100644 --- a/src/python_testing/TC_ACE_1_4.py +++ b/src/python_testing/TC_ACE_1_4.py @@ -22,31 +22,33 @@ # test-runner-runs: # run1: # app: ${ALL_CLUSTERS_APP} -# factoryreset: true -# quiet: true # app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json # script-args: > # --storage-path admin_storage.json # --commissioning-method on-network # --discriminator 1234 # --passcode 20202021 -# --int-arg PIXIT.ACE.APPENDPOINT:1 PIXIT.ACE.APPDEVTYPEID:0x0100 -# --string-arg PIXIT.ACE.APPCLUSTER:OnOff PIXIT.ACE.APPATTRIBUTE:OnOff +# --int-arg PIXIT.ACE.APPENDPOINT:1 +# --int-arg PIXIT.ACE.APPDEVTYPEID:0x0100 +# --string-arg PIXIT.ACE.APPCLUSTER:OnOff +# --string-arg PIXIT.ACE.APPATTRIBUTE:OnOff # --trace-to json:${TRACE_TEST_JSON}.json # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import sys import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts # This test requires several additional command line arguments # run with -# --int-arg PIXIT.ACE.ENDPOINT: PIXIT.ACE.APPDEVTYPE: -# --string-arg PIXIT.ACE.APPCLUSTER: PIXIT.ACE.APPATTRIBUTE: +# --int-arg PIXIT.ACE.ENDPOINT: --int-arg PIXIT.ACE.APPDEVTYPE: +# --string-arg PIXIT.ACE.APPCLUSTER: --string-arg PIXIT.ACE.APPATTRIBUTE: def str_to_cluster(str): diff --git a/src/python_testing/TC_ACE_1_5.py b/src/python_testing/TC_ACE_1_5.py index cda418737a..15c7380d23 100644 --- a/src/python_testing/TC_ACE_1_5.py +++ b/src/python_testing/TC_ACE_1_5.py @@ -22,7 +22,7 @@ # test-runner-runs: # run1: # app: ${ALL_CLUSTERS_APP} -# factoryreset: true +# factory-reset: true # quiet: true # app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json # script-args: > @@ -40,7 +40,7 @@ import chip.clusters as Clusters from chip import ChipDeviceCtrl from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_ACL_2_11.py b/src/python_testing/TC_ACL_2_11.py index 88ef1d26ce..0b58a7f317 100644 --- a/src/python_testing/TC_ACL_2_11.py +++ b/src/python_testing/TC_ACL_2_11.py @@ -22,7 +22,7 @@ # test-runner-runs: # run1: # app: ${NETWORK_MANAGEMENT_APP} -# factoryreset: true +# factory-reset: true # quiet: true # app-args: > # --discriminator 1234 --KVS kvs1 @@ -42,13 +42,14 @@ import queue import chip.clusters as Clusters -from basic_composition_support import arls_populated +import matter_testing_infrastructure.chip.testing.global_attribute_ids as global_attribute_ids from chip.clusters.Attribute import EventReadResult, SubscriptionTransaction, ValueDecodeFailure from chip.clusters.ClusterObjects import ALL_ACCEPTED_COMMANDS, ALL_ATTRIBUTES, ALL_CLUSTERS, ClusterEvent from chip.clusters.Objects import AccessControl from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.basic_composition import arls_populated +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts @@ -77,15 +78,6 @@ def WaitForEventReport(q: queue.Queue, expected_event: ClusterEvent): class TC_ACL_2_11(MatterBaseTest): - global_attributes = [ - Clusters.Descriptor.Attributes.GeneratedCommandList.attribute_id, - Clusters.Descriptor.Attributes.AcceptedCommandList.attribute_id, - Clusters.Descriptor.Attributes.AttributeList.attribute_id, - Clusters.Descriptor.Attributes.FeatureMap.attribute_id, - Clusters.Descriptor.Attributes.ClusterRevision.attribute_id, - Clusters.Descriptor.Attributes.EventList.attribute_id - ] - def pics_TC_ACL_2_11(self) -> list[str]: return ['ACL.S.F01'] @@ -154,7 +146,7 @@ async def test_TC_ACL_2_11(self): # if ID1 is null, it means it is a wildcard. We need to read all attributes on the cluster if ID1 is NullValue: for attr_id, attribute in ALL_ATTRIBUTES[C1].items(): - if attr_id not in self.global_attributes: + if global_attribute_ids.attribute_id_type(attr_id) != global_attribute_ids.AttributeIdType.kStandardGlobal: await self.read_single_attribute_expect_error(cluster=cluster, attribute=attribute, error=Status.AccessRestricted, endpoint=E1) else: attribute = ALL_ATTRIBUTES[C1][ID1] @@ -162,7 +154,7 @@ async def test_TC_ACL_2_11(self): elif restriction_type == AccessControl.Enums.AccessRestrictionTypeEnum.kAttributeWriteForbidden: if ID1 is NullValue: for attr_id, attribute in ALL_ATTRIBUTES[C1].items(): - if attr_id not in self.global_attributes: + if global_attribute_ids.attribute_id_type(attr_id) != global_attribute_ids.AttributeIdType.kStandardGlobal: status = await self.write_single_attribute(attribute_value=attribute(), endpoint_id=E1, expect_success=False) if status is not Status.UnsupportedWrite: asserts.assert_equal(status, Status.AccessRestricted, diff --git a/src/python_testing/TC_ACL_2_2.py b/src/python_testing/TC_ACL_2_2.py index b0880b096b..6f5ed4760c 100644 --- a/src/python_testing/TC_ACL_2_2.py +++ b/src/python_testing/TC_ACL_2_2.py @@ -19,7 +19,7 @@ # test-runner-runs: # run1: # app: ${ALL_CLUSTERS_APP} -# factoryreset: true +# factory-reset: true # quiet: true # app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json # script-args: > @@ -32,7 +32,7 @@ # === END CI TEST ARGUMENTS === import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_AccessChecker.py b/src/python_testing/TC_AccessChecker.py index a2429ee354..5f3b3d69ec 100644 --- a/src/python_testing/TC_AccessChecker.py +++ b/src/python_testing/TC_AccessChecker.py @@ -5,7 +5,7 @@ # test-runner-runs: # run1: # app: ${ALL_CLUSTERS_APP} -# factoryreset: true +# factory-reset: true # quiet: true # app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json # script-args: > @@ -23,13 +23,13 @@ from typing import Optional import chip.clusters as Clusters -from basic_composition_support import BasicCompositionTests from chip.interaction_model import Status +from chip.testing.basic_composition import BasicCompositionTests +from chip.testing.global_attribute_ids import GlobalAttributeIds +from chip.testing.matter_testing import (AttributePathLocation, ClusterPathLocation, MatterBaseTest, TestStep, async_test_body, + default_matter_test_main) +from chip.testing.spec_parsing import XmlCluster, build_xml_clusters from chip.tlv import uint -from global_attribute_ids import GlobalAttributeIds -from matter_testing_support import (AttributePathLocation, ClusterPathLocation, MatterBaseTest, TestStep, async_test_body, - default_matter_test_main) -from spec_parsing_support import XmlCluster, build_xml_clusters class AccessTestType(Enum): diff --git a/src/python_testing/TC_BOOLCFG_2_1.py b/src/python_testing/TC_BOOLCFG_2_1.py index 1eae9fc5de..2456457ce2 100644 --- a/src/python_testing/TC_BOOLCFG_2_1.py +++ b/src/python_testing/TC_BOOLCFG_2_1.py @@ -16,12 +16,19 @@ # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import functools @@ -29,7 +36,7 @@ from operator import ior import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts @@ -74,12 +81,12 @@ async def test_TC_BOOLCFG_2_1(self): self.step(1) attributes = Clusters.BooleanStateConfiguration.Attributes - self.step(2, endpoint) + self.step(2) attribute_list = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AttributeList) number_of_supported_levels = 0 - self.step(3, endpoint) + self.step(3) if attributes.SupportedSensitivityLevels.attribute_id in attribute_list: number_of_supported_levels = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.SupportedSensitivityLevels) asserts.assert_less_equal(number_of_supported_levels, 10, "SupportedSensitivityLevels attribute is out of range") @@ -87,7 +94,7 @@ async def test_TC_BOOLCFG_2_1(self): else: logging.info("Test step skipped") - self.step(4, endpoint) + self.step(4) if attributes.CurrentSensitivityLevel.attribute_id in attribute_list: current_sensitivity_level_dut = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentSensitivityLevel) asserts.assert_less_equal(current_sensitivity_level_dut, number_of_supported_levels, @@ -95,7 +102,7 @@ async def test_TC_BOOLCFG_2_1(self): else: logging.info("Test step skipped") - self.step(5, endpoint) + self.step(5) if attributes.DefaultSensitivityLevel.attribute_id in attribute_list: default_sensitivity_level_dut = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.DefaultSensitivityLevel) asserts.assert_less_equal(default_sensitivity_level_dut, number_of_supported_levels, @@ -103,35 +110,35 @@ async def test_TC_BOOLCFG_2_1(self): else: logging.info("Test step skipped") - self.step(6, endpoint) + self.step(6) if attributes.AlarmsActive.attribute_id in attribute_list: alarms_active_dut = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsActive) asserts.assert_equal(alarms_active_dut & ~all_alarm_mode_bitmap_bits, 0, "AlarmsActive is not in valid range") else: logging.info("Test step skipped") - self.step(7, endpoint) + self.step(7) if attributes.AlarmsSuppressed.attribute_id in attribute_list: alarms_suppressed_dut = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsSuppressed) asserts.assert_equal(alarms_suppressed_dut & ~all_alarm_mode_bitmap_bits, 0, "AlarmsSuppressed is not in valid range") else: logging.info("Test step skipped") - self.step(8, endpoint) + self.step(8) if attributes.AlarmsEnabled.attribute_id in attribute_list: alarms_enabled_dut = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsEnabled) asserts.assert_equal(alarms_enabled_dut & ~all_alarm_mode_bitmap_bits, 0, "AlarmsEnabled is not in valid range") else: logging.info("Test step skipped") - self.step(9, endpoint) + self.step(9) if attributes.AlarmsSupported.attribute_id in attribute_list: alarms_supported_dut = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsSupported) asserts.assert_equal(alarms_supported_dut & ~all_alarm_mode_bitmap_bits, 0, "AlarmsSupported is not in valid range") else: logging.info("Test step skipped") - self.step(10, endpoint) + self.step(10) if attributes.SensorFault.attribute_id in attribute_list: sensor_fault_dut = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.SensorFault) asserts.assert_equal(sensor_fault_dut & ~all_sensor_fault_bitmap_bits, 0, "SensorFault is not in valid range") diff --git a/src/python_testing/TC_BOOLCFG_3_1.py b/src/python_testing/TC_BOOLCFG_3_1.py index 7446afd4b4..8ed77f6ba8 100644 --- a/src/python_testing/TC_BOOLCFG_3_1.py +++ b/src/python_testing/TC_BOOLCFG_3_1.py @@ -16,12 +16,19 @@ # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -29,7 +36,7 @@ import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_BOOLCFG_4_1.py b/src/python_testing/TC_BOOLCFG_4_1.py index 3240c27ea2..dfe6aac340 100644 --- a/src/python_testing/TC_BOOLCFG_4_1.py +++ b/src/python_testing/TC_BOOLCFG_4_1.py @@ -16,18 +16,25 @@ # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_BOOLCFG_4_2.py b/src/python_testing/TC_BOOLCFG_4_2.py index b1496c4987..093e389dcf 100644 --- a/src/python_testing/TC_BOOLCFG_4_2.py +++ b/src/python_testing/TC_BOOLCFG_4_2.py @@ -16,19 +16,31 @@ # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --enable-key 000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --enable-key 000102030405060708090a0b0c0d0e0f +# --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts sensorTrigger = 0x0080_0000_0000_0000 diff --git a/src/python_testing/TC_BOOLCFG_4_3.py b/src/python_testing/TC_BOOLCFG_4_3.py index ea7ba2cac5..845d8e9d4a 100644 --- a/src/python_testing/TC_BOOLCFG_4_3.py +++ b/src/python_testing/TC_BOOLCFG_4_3.py @@ -16,19 +16,31 @@ # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --enable-key 000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --enable-key 000102030405060708090a0b0c0d0e0f +# --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts sensorTrigger = 0x0080_0000_0000_0000 diff --git a/src/python_testing/TC_BOOLCFG_4_4.py b/src/python_testing/TC_BOOLCFG_4_4.py index 2ae6dae2c7..c585b14a84 100644 --- a/src/python_testing/TC_BOOLCFG_4_4.py +++ b/src/python_testing/TC_BOOLCFG_4_4.py @@ -16,19 +16,31 @@ # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --enable-key 000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --enable-key 000102030405060708090a0b0c0d0e0f +# --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts sensorTrigger = 0x0080_0000_0000_0000 diff --git a/src/python_testing/TC_BOOLCFG_5_1.py b/src/python_testing/TC_BOOLCFG_5_1.py index f99fb3d8e4..ec31d8341b 100644 --- a/src/python_testing/TC_BOOLCFG_5_1.py +++ b/src/python_testing/TC_BOOLCFG_5_1.py @@ -16,19 +16,31 @@ # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --enable-key 000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --enable-key 000102030405060708090a0b0c0d0e0f +# --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts sensorTrigger = 0x0080_0000_0000_0000 diff --git a/src/python_testing/TC_BOOLCFG_5_2.py b/src/python_testing/TC_BOOLCFG_5_2.py index cd176faf60..fd6b88370d 100644 --- a/src/python_testing/TC_BOOLCFG_5_2.py +++ b/src/python_testing/TC_BOOLCFG_5_2.py @@ -16,19 +16,31 @@ # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --enable-key 000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --enable-key 000102030405060708090a0b0c0d0e0f +# --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts sensorTrigger = 0x0080_0000_0000_0000 diff --git a/src/python_testing/TC_BRBINFO_4_1.py b/src/python_testing/TC_BRBINFO_4_1.py index 32dd541d66..f5eeec3344 100644 --- a/src/python_testing/TC_BRBINFO_4_1.py +++ b/src/python_testing/TC_BRBINFO_4_1.py @@ -15,23 +15,45 @@ # limitations under the License. # +# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments +# for details about the block below. +# +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: +# run1: +# app: examples/fabric-admin/scripts/fabric-sync-app.py +# app-args: --app-admin=${FABRIC_ADMIN_APP} --app-bridge=${FABRIC_BRIDGE_APP} --stdin-pipe=dut-fsa-stdin --discriminator=1234 +# app-ready-pattern: "Successfully opened pairing window on the device" +# script-args: > +# --PICS src/app/tests/suites/certification/ci-pics-values +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --string-arg th_icd_server_app_path:${LIT_ICD_APP} dut_fsa_stdin_pipe:dut-fsa-stdin +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true +# === END CI TEST ARGUMENTS === + # This test requires a TH_ICD_SERVER application. Please specify with --string-arg th_icd_server_app_path: # TH_ICD_SERVER must support following arguments: --secured-device-port --discriminator --passcode --KVS # E.g: python3 src/python_testing/TC_BRBINFO_4_1.py --commissioning-method on-network --qr-code MT:-24J042C00KA0648G00 \ # --string-arg th_icd_server_app_path:out/linux-x64-lit-icd/lit-icd-app +import asyncio import logging import os import queue -import signal -import subprocess -import time -import uuid +import random +import tempfile import chip.clusters as Clusters from chip import ChipDeviceCtrl from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, SimpleEventCallback, TestStep, async_test_body, default_matter_test_main +from chip.testing.apps import IcdAppServerSubprocess +from chip.testing.matter_testing import MatterBaseTest, SimpleEventCallback, TestStep, async_test_body, default_matter_test_main from mobly import asserts logger = logging.getLogger(__name__) @@ -40,13 +62,6 @@ class TC_BRBINFO_4_1(MatterBaseTest): - # - # Class Helper functions - # - - async def _read_attribute_expect_success(self, endpoint, cluster, attribute, node_id): - return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute, node_id=node_id) - # This test has some manual steps and also multiple sleeps >= 30 seconds. Test typically runs under 3 mins, # so 6 minutes is more than enough. @property @@ -58,7 +73,7 @@ def desc_TC_BRBINFO_4_1(self) -> str: return "[TC_BRBINFO_4_1] Verification of KeepActive Command [DUT-Server]" def steps_TC_BRBINFO_4_1(self) -> list[TestStep]: - steps = [ + return [ TestStep("0", "DUT commissioned and preconditions", is_commissioning=True), TestStep("1", "TH reads from the ICD the A_IDLE_MODE_DURATION, A_ACTIVE_MODE_DURATION, and ACTIVE_MODE_THRESHOLD attributes"), TestStep("2", "Setting up subscribe to ActiveChange event"), @@ -77,16 +92,16 @@ def steps_TC_BRBINFO_4_1(self) -> list[TestStep]: TestStep("15", "Send KeepActive command with shortest TimeoutMs value while TH_ICD is prevented from sending check-ins"), TestStep("16", "Wait 15 seconds then send second KeepActive command with double the TimeoutMs value of the previous step"), TestStep("17", "TH allows TH_ICD to resume sending check-ins after timeout from step 15 expired but before second timeout from step 16 still valid"), - TestStep("18", "Wait for TH_ICD to check into TH, then confirm we have received new event from DUT")] - return steps + TestStep("18", "Wait for TH_ICD to check into TH, then confirm we have received new event from DUT"), + ] - def _ask_for_vendor_commissioniong_ux_operation(self, discriminator, setupPinCode, setupManualCode, setupQRCode): + def _ask_for_vendor_commissioning_ux_operation(self, discriminator, setupPinCode, setupManualCode, setupQRCode): self.wait_for_user_input( prompt_msg=f"Using the DUT vendor's provided interface, commission the ICD device using the following parameters:\n" f"- discriminator: {discriminator}\n" f"- setupPinCode: {setupPinCode}\n" f"- setupQRCode: {setupQRCode}\n" - f"- setupManualcode: {setupManualCode}\n" + f"- setupManualCode: {setupManualCode}\n" f"If using FabricSync Admin test app, you may type:\n" f">>> pairing onnetwork 111 {setupPinCode} --icd-registration true") @@ -117,81 +132,88 @@ async def _get_dynamic_endpoint(self) -> int: @async_test_body async def setup_class(self): + super().setup_class() + # These steps are not explicitly, but they help identify the dynamically added endpoint # The second part of this process happens on _get_dynamic_endpoint() - root_part_list = await self.read_single_attribute_check_success(cluster=Clusters.Descriptor, attribute=Clusters.Descriptor.Attributes.PartsList, endpoint=_ROOT_ENDPOINT_ID) + root_part_list = await self.read_single_attribute_check_success( + cluster=Clusters.Descriptor, + attribute=Clusters.Descriptor.Attributes.PartsList, + endpoint=_ROOT_ENDPOINT_ID) self.set_of_dut_endpoints_before_adding_device = set(root_part_list) - super().setup_class() self._active_change_event_subscription = None - self.app_process = None - self.app_process_paused = False - app = self.user_params.get("th_icd_server_app_path", None) - if not app: - asserts.fail('This test requires a TH_ICD_SERVER app. Specify app path with --string-arg th_icd_server_app_path:') - - self.kvs = f'kvs_{str(uuid.uuid4())}' - discriminator = 3850 - passcode = 20202021 - cmd = [app] - cmd.extend(['--secured-device-port', str(5543)]) - cmd.extend(['--discriminator', str(discriminator)]) - cmd.extend(['--passcode', str(passcode)]) - cmd.extend(['--KVS', self.kvs]) + self.th_icd_server = None + self.storage = None - logging.info("Starting ICD Server App") - self.app_process = subprocess.Popen(cmd) - logging.info("ICD started") - time.sleep(3) + th_icd_server_app = self.user_params.get("th_icd_server_app_path", None) + if not th_icd_server_app: + asserts.fail('This test requires a TH_ICD_SERVER app. Specify app path with --string-arg th_icd_server_app_path:') + if not os.path.exists(th_icd_server_app): + asserts.fail(f'The path {th_icd_server_app} does not exist') + + # Create a temporary storage directory for keeping KVS files. + self.storage = tempfile.TemporaryDirectory(prefix=self.__class__.__name__) + logging.info("Temporary storage directory: %s", self.storage.name) + + if self.is_pics_sdk_ci_only: + # Get the named pipe path for the DUT_FSA app input from the user params. + dut_fsa_stdin_pipe = self.user_params.get("dut_fsa_stdin_pipe") + if not dut_fsa_stdin_pipe: + asserts.fail("CI setup requires --string-arg dut_fsa_stdin_pipe:") + self.dut_fsa_stdin = open(dut_fsa_stdin_pipe, "w") + + self.th_icd_server_port = 5543 + self.th_icd_server_discriminator = random.randint(0, 4095) + self.th_icd_server_passcode = 20202021 + + # Start the TH_ICD_SERVER app. + self.th_icd_server = IcdAppServerSubprocess( + th_icd_server_app, + storage_dir=self.storage.name, + port=self.th_icd_server_port, + discriminator=self.th_icd_server_discriminator, + passcode=self.th_icd_server_passcode) + self.th_icd_server.start( + expected_output="Server initialization complete", + timeout=30) logging.info("Commissioning of ICD to fabric one (TH)") self.icd_nodeid = 1111 self.default_controller.EnableICDRegistration(self.default_controller.GenerateICDRegistrationParameters()) - await self.default_controller.CommissionOnNetwork(nodeId=self.icd_nodeid, setupPinCode=passcode, filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, filter=discriminator) + await self.default_controller.CommissionOnNetwork( + nodeId=self.icd_nodeid, + setupPinCode=self.th_icd_server_passcode, + filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, + filter=self.th_icd_server_discriminator) logging.info("Commissioning of ICD to fabric two (DUT)") params = await self.openCommissioningWindow(dev_ctrl=self.default_controller, node_id=self.icd_nodeid) - self._ask_for_vendor_commissioniong_ux_operation(params.randomDiscriminator, params.commissioningParameters.setupPinCode, - params.commissioningParameters.setupManualCode, params.commissioningParameters.setupQRCode) + if not self.is_pics_sdk_ci_only: + self._ask_for_vendor_commissioning_ux_operation( + params.randomDiscriminator, + params.commissioningParameters.setupPinCode, + params.commissioningParameters.setupManualCode, + params.commissioningParameters.setupQRCode) + else: + self.dut_fsa_stdin.write( + f"pairing onnetwork 2 {params.commissioningParameters.setupPinCode} --icd-registration true\n") + self.dut_fsa_stdin.flush() + # Wait for the commissioning to complete. + await asyncio.sleep(5) def teardown_class(self): if self._active_change_event_subscription is not None: self._active_change_event_subscription.Shutdown() self._active_change_event_subscription = None - - # In case the th_icd_server_app_path does not exist, then we failed the test - # and there is nothing to remove - if self.app_process is not None: - self.resume_th_icd_server(check_state=False) - logging.warning("Stopping app with SIGTERM") - self.app_process.send_signal(signal.SIGTERM.value) - self.app_process.wait() - - if os.path.exists(self.kvs): - os.remove(self.kvs) - + if self.th_icd_server is not None: + self.th_icd_server.terminate() + if self.storage is not None: + self.storage.cleanup() super().teardown_class() - def pause_th_icd_server(self, check_state): - if check_state: - asserts.assert_false(self.app_process_paused, "ICD TH Server unexpectedly is already paused") - if self.app_process_paused: - return - # stops (halts) the ICD server process by sending a SIGTOP signal - self.app_process.send_signal(signal.SIGSTOP.value) - self.app_process_paused = True - - def resume_th_icd_server(self, check_state): - if check_state: - asserts.assert_true(self.app_process_paused, "ICD TH Server unexpectedly is already running") - if not self.app_process_paused: - return - # resumes (continues) the ICD server process by sending a SIGCONT signal - self.app_process.send_signal(signal.SIGCONT.value) - self.app_process_paused = False - # # BRBINFO 4.1 Test Body # @@ -210,34 +232,42 @@ async def test_TC_BRBINFO_4_1(self): self.step("0") logging.info("Ensuring DUT is commissioned to TH") - # Confirms commissioning of DUT on TH as it reads its fature map - await self._read_attribute_expect_success( - _ROOT_ENDPOINT_ID, - basic_info_cluster, - basic_info_attributes.FeatureMap, - self.dut_node_id + # Confirms commissioning of DUT on TH as it reads its feature map + await self.read_single_attribute_check_success( + endpoint=_ROOT_ENDPOINT_ID, + cluster=basic_info_cluster, + attribute=basic_info_attributes.FeatureMap, + node_id=self.dut_node_id, ) logging.info("Ensuring ICD is commissioned to TH") self.step("1") - idle_mode_duration_s = await self._read_attribute_expect_success( - _ROOT_ENDPOINT_ID, - icdm_cluster, - icdm_attributes.IdleModeDuration, - self.icd_nodeid + idle_mode_duration_s = await self.read_single_attribute_check_success( + endpoint=_ROOT_ENDPOINT_ID, + cluster=icdm_cluster, + attribute=icdm_attributes.IdleModeDuration, + node_id=self.icd_nodeid, ) logging.info(f"IdleModeDurationS: {idle_mode_duration_s}") - active_mode_duration_ms = await self._read_attribute_expect_success( - _ROOT_ENDPOINT_ID, - icdm_cluster, - icdm_attributes.ActiveModeDuration, - self.icd_nodeid + active_mode_duration_ms = await self.read_single_attribute_check_success( + endpoint=_ROOT_ENDPOINT_ID, + cluster=icdm_cluster, + attribute=icdm_attributes.ActiveModeDuration, + node_id=self.icd_nodeid, ) logging.info(f"ActiveModeDurationMs: {active_mode_duration_ms}") + active_mode_threshold_ms = await self.read_single_attribute_check_success( + endpoint=_ROOT_ENDPOINT_ID, + cluster=icdm_cluster, + attribute=icdm_attributes.ActiveModeThreshold, + node_id=self.icd_nodeid, + ) + logging.info(f"ActiveModeThresholdMs: {active_mode_threshold_ms}") + self.step("2") event = brb_info_cluster.Events.ActiveChanged self.q = queue.Queue() @@ -292,7 +322,7 @@ async def test_TC_BRBINFO_4_1(self): asserts.assert_equal(self.q.qsize(), 0, "Unexpected event received from DUT") self.step("9") - self.pause_th_icd_server(check_state=True) + self.th_icd_server.pause() # sends 3x keep active commands stay_active_duration_ms = 2000 keep_active_timeout_ms = 60000 @@ -304,7 +334,7 @@ async def test_TC_BRBINFO_4_1(self): await self._send_keep_active_command(stay_active_duration_ms, keep_active_timeout_ms, dynamic_endpoint_id) self.step("10") - self.resume_th_icd_server(check_state=True) + self.th_icd_server.resume() await self.default_controller.WaitForActive(self.icd_nodeid, timeoutSeconds=wait_for_icd_checkin_timeout_s, stayActiveDurationMs=5000) promised_active_duration_ms = await self._wait_for_active_changed_event(timeout_s=wait_for_dut_event_subscription_s) asserts.assert_equal(self.q.qsize(), 0, "More than one event received from DUT") @@ -314,14 +344,14 @@ async def test_TC_BRBINFO_4_1(self): asserts.assert_equal(self.q.qsize(), 0, "More than one event received from DUT") self.step("12") - self.pause_th_icd_server(check_state=True) + self.th_icd_server.pause() stay_active_duration_ms = 2000 keep_active_timeout_ms = 30000 await self._send_keep_active_command(stay_active_duration_ms, keep_active_timeout_ms, dynamic_endpoint_id) self.step("13") - time.sleep(30) - self.resume_th_icd_server(check_state=True) + await asyncio.sleep(30) + self.th_icd_server.resume() self.step("14") await self.default_controller.WaitForActive(self.icd_nodeid, timeoutSeconds=wait_for_icd_checkin_timeout_s, stayActiveDurationMs=5000) @@ -329,20 +359,20 @@ async def test_TC_BRBINFO_4_1(self): asserts.assert_equal(self.q.qsize(), 0, "Unexpected event received from DUT") self.step("15") - self.pause_th_icd_server(check_state=True) + self.th_icd_server.pause() stay_active_duration_ms = 2000 keep_active_timeout_ms = 30000 await self._send_keep_active_command(stay_active_duration_ms, keep_active_timeout_ms, dynamic_endpoint_id) self.step("16") - time.sleep(15) + await asyncio.sleep(15) stay_active_duration_ms = 2000 keep_active_timeout_ms = 60000 await self._send_keep_active_command(stay_active_duration_ms, keep_active_timeout_ms, dynamic_endpoint_id) self.step("17") - time.sleep(15) - self.resume_th_icd_server(check_state=True) + await asyncio.sleep(15) + self.th_icd_server.resume() self.step("18") await self.default_controller.WaitForActive(self.icd_nodeid, timeoutSeconds=wait_for_icd_checkin_timeout_s, stayActiveDurationMs=5000) diff --git a/src/python_testing/TC_CADMIN_1_11.py b/src/python_testing/TC_CADMIN_1_11.py new file mode 100644 index 0000000000..cefd8b44a7 --- /dev/null +++ b/src/python_testing/TC_CADMIN_1_11.py @@ -0,0 +1,222 @@ +# +# Copyright (c) 2024 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. +# +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# --PICS src/app/tests/suites/certification/ci-pics-values +# factory-reset: true +# quiet: false +# === END CI TEST ARGUMENTS === + + +import logging +import random +from time import sleep +from typing import Optional + +import chip.clusters as Clusters +from chip import ChipDeviceCtrl +from chip.ChipDeviceCtrl import CommissioningParameters +from chip.exceptions import ChipStackError +from chip.native import PyChipError +from matter_testing_infrastructure.chip.testing.matter_testing import (MatterBaseTest, TestStep, async_test_body, + default_matter_test_main) +from mobly import asserts + + +class TC_CADMIN_1_11(MatterBaseTest): + async def OpenCommissioningWindow(self, th, expectedErrCode) -> CommissioningParameters: + if expectedErrCode is None: + params = await th.OpenCommissioningWindow( + nodeid=self.dut_node_id, timeout=self.timeout, iteration=10000, discriminator=self.discriminator, option=1) + return params + + else: + ctx = asserts.assert_raises(ChipStackError) + with ctx: + await th.OpenCommissioningWindow( + nodeid=self.dut_node_id, timeout=self.timeout, iteration=10000, discriminator=self.discriminator, option=1) + errcode = PyChipError.from_code(ctx.exception.err) + logging.info('Commissioning complete done. Successful? {}, errorcode = {}'.format(errcode.is_success, errcode)) + asserts.assert_false(errcode.is_success, 'Commissioning complete did not error as expected') + asserts.assert_true(errcode.sdk_code == expectedErrCode, + 'Unexpected error code returned from CommissioningComplete') + + async def OpenBasicCommissioningWindow(self, th: ChipDeviceCtrl, expectedErrCode: Optional[Clusters.AdministratorCommissioning.Enums.StatusCode] = None) -> CommissioningParameters: + if not expectedErrCode: + params = await th.OpenBasicCommissioningWindow( + nodeid=self.dut_node_id, timeout=self.timeout) + return params + + else: + ctx = asserts.assert_raises(ChipStackError) + with ctx: + await th.OpenBasicCommissioningWindow( + nodeid=self.dut_node_id, timeout=self.timeout) + errcode = ctx.exception.chip_error + logging.info('Commissioning complete done. Successful? {}, errorcode = {}'.format(errcode.is_success, errcode)) + asserts.assert_false(errcode.is_success, 'Commissioning complete did not error as expected') + asserts.assert_true(errcode.sdk_code == expectedErrCode, + 'Unexpected error code returned from CommissioningComplete') + + async def read_currentfabricindex(self, th: ChipDeviceCtrl) -> int: + cluster = Clusters.OperationalCredentials + attribute = Clusters.OperationalCredentials.Attributes.CurrentFabricIndex + current_fabric_index = await self.read_single_attribute_check_success(dev_ctrl=th, endpoint=0, cluster=cluster, attribute=attribute) + return current_fabric_index + + def steps_TC_CADMIN_1_11(self) -> list[TestStep]: + return [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep( + 2, "TH_CR1 gets the MaxCumulativeFailsafeSeconds value from BasicCommissioningInfo attribute in GeneralCommissioning Cluster", "Should set the MaxCumulativeFailsafeSeconds value from BasicCommissioningInfo attribute to timeout"), + TestStep( + 3, "TH_CR1 opens commissioning window on DUT with duration set to value for MaxCumulativeFailsafeSeconds", "Commissioning window should open with timeout set to MaxCumulativeFailsafeSeconds"), + TestStep(4, "TH_CR2 fully commissions the DUT", "DUT should fully commission"), + TestStep( + 5, "TH_CR1 opens commissioning window on DUT with duration set to value from BasicCommissioningInfo", "New commissioning window should open and be set to timeout"), + TestStep(6, "TH_CR1 sends an OpenCommissioningWindow command to the DUT and attempts to open another commissioning window", + "Commissioning window should fail to be opened due to being busy"), + TestStep(7, "TH_CR2 sends an OpenCommissioningWindow command to the DUT and attempts to open another commissioning window", + "Commissioning window should fail to be opened due to being busy"), + TestStep(8, "TH_CR1 sends an RevokeCommissioning command to the DUT", "Commissioning window should be closed"), + TestStep(9, "TH_CR1 reads the FeatureMap from the Administrator Commissioning Cluster to check to see if BC is supported on DUT", + "FeatureMap should be checked to see if BC enum is available feature, if not then test steps 9a-9d will be skipped"), + TestStep("9a", "TH_CR1 opens commissioning window on DUT with duration set to value from BasicCommissioningInfo", + "Opens basic commissioning window on the DUT for timeout set to value of MaxCumulativeFailsafeSeconds"), + TestStep("9b", "TH_CR1 sends an OpenBasicCommissioningWindow command to the DUT and attempts to open another commissioning window", + "Commissioning window should fail to be opened due to being busy"), + TestStep("9c", "TH_CR2 sends an OpenBasicCommissioningWindow command to the DUT and attempts to open another commissioning window", + "Commissioning window should fail to be opened due to being busy"), + TestStep("9d", "TH_CR1 sends a RevokeCommissioning command to the DUT", "Commissioning window should be closed"), + TestStep(10, "TH_CR2 reads the CurrentFabricIndex attribute from the Operational Credentials cluster and saves as th2_idx", + "th2_idx set to value for CurrentFabricIndex attribute from TH_CR2"), + TestStep(11, "TH_CR1 sends the RemoveFabric command to the DUT with the FabricIndex set to th2_idx", + "TH_CR1 removes TH_CR2 fabric using th2_idx"), + ] + + async def CommissionAttempt( + self, setupPinCode: int): + + logging.info("-----------------Commissioning with TH_CR2-------------------------") + await self.th2.CommissionOnNetwork( + nodeId=self.dut_node_id, setupPinCode=setupPinCode, + filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, filter=self.discriminator) + + def pics_TC_CADMIN_1_11(self) -> list[str]: + return ["CADMIN.S"] + + @async_test_body + async def test_TC_CADMIN_1_11(self): + self.step(1) + + # Establishing TH1 and TH2 controllers + self.th1 = self.default_controller + self.discriminator = random.randint(0, 4095) + th2_certificate_authority = self.certificate_authority_manager.NewCertificateAuthority() + th2_fabric_admin = th2_certificate_authority.NewFabricAdmin(vendorId=0xFFF1, fabricId=self.th1.fabricId + 1) + self.th2 = th2_fabric_admin.NewController(nodeId=2) + + self.step(2) + GC_cluster = Clusters.GeneralCommissioning + attribute = GC_cluster.Attributes.BasicCommissioningInfo + duration = await self.read_single_attribute_check_success(endpoint=0, cluster=GC_cluster, attribute=attribute) + self.timeout = duration.maxCumulativeFailsafeSeconds + + self.step(3) + params = await self.OpenCommissioningWindow(self.th1, None) + setupPinCode = params.setupPinCode + busy_enum = Clusters.AdministratorCommissioning.Enums.StatusCode.kBusy + + self.step(4) + await self.CommissionAttempt(setupPinCode) + + self.step(5) + await self.OpenCommissioningWindow(self.th1, None) + + self.step(6) + await self.OpenCommissioningWindow(self.th1, busy_enum) + + self.step(7) + await self.OpenCommissioningWindow(self.th2, busy_enum) + + self.step(8) + revokeCmd = Clusters.AdministratorCommissioning.Commands.RevokeCommissioning() + await self.th1.SendCommand(nodeid=self.dut_node_id, endpoint=0, payload=revokeCmd, timedRequestTimeoutMs=6000) + # The failsafe cleanup is scheduled after the command completes, so give it a bit of time to do that + sleep(1) + + self.step(9) + + AC_cluster = Clusters.AdministratorCommissioning + fm_attribute = Clusters.AdministratorCommissioning.Attributes + features = await self.read_single_attribute_check_success(cluster=AC_cluster, attribute=fm_attribute.FeatureMap) + + self.supports_bc = bool(features & AC_cluster.Bitmaps.Feature.kBasic) != 0 + + if self.supports_bc: + self.count = 0 + self.step("9a") + obcCmd = Clusters.AdministratorCommissioning.Commands.OpenBasicCommissioningWindow(180) + await self.th1.SendCommand(nodeid=self.dut_node_id, endpoint=0, payload=obcCmd, timedRequestTimeoutMs=6000) + + self.step("9b") + try: + await self.th1.SendCommand(nodeid=self.dut_node_id, endpoint=0, payload=obcCmd, timedRequestTimeoutMs=6000) + except Exception as e: + asserts.assert_true(e.clusterStatus == busy_enum, + 'Unexpected error code returned from CommissioningComplete') + + self.step("9c") + try: + await self.th2.SendCommand(nodeid=self.dut_node_id, endpoint=0, payload=obcCmd, timedRequestTimeoutMs=6000) + except Exception as e: + asserts.assert_true(e.clusterStatus == busy_enum, + 'Unexpected error code returned from CommissioningComplete') + + self.step("9d") + revokeCmd = Clusters.AdministratorCommissioning.Commands.RevokeCommissioning() + await self.th1.SendCommand(nodeid=self.dut_node_id, endpoint=0, payload=revokeCmd, timedRequestTimeoutMs=6000) + # The failsafe cleanup is scheduled after the command completes, so give it a bit of time to do that + sleep(1) + + else: + self.skip_step("9a") + self.skip_step("9b") + self.skip_step("9c") + self.skip_step("9d") + + # Read CurrentFabricIndex attribute from the Operational Credentials cluster + self.step(10) + th2_idx = await self.read_currentfabricindex(self.th2) + + self.step(11) + removeFabricCmd = Clusters.OperationalCredentials.Commands.RemoveFabric(th2_idx) + await self.th1.SendCommand(nodeid=self.dut_node_id, endpoint=0, payload=removeFabricCmd) + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_CADMIN_1_9.py b/src/python_testing/TC_CADMIN_1_9.py index c3d67b9bf6..b3b09afad3 100644 --- a/src/python_testing/TC_CADMIN_1_9.py +++ b/src/python_testing/TC_CADMIN_1_9.py @@ -15,12 +15,20 @@ # limitations under the License. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --PICS src/app/tests/suites/certification/ci-pics-values +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# --PICS src/app/tests/suites/certification/ci-pics-values +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -32,7 +40,7 @@ from chip.ChipDeviceCtrl import CommissioningParameters from chip.exceptions import ChipStackError from chip.native import PyChipError -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_CCTRL_2_1.py b/src/python_testing/TC_CCTRL_2_1.py index a8aedb49ab..b656973f6a 100644 --- a/src/python_testing/TC_CCTRL_2_1.py +++ b/src/python_testing/TC_CCTRL_2_1.py @@ -15,8 +15,30 @@ # limitations under the License. # +# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments +# for details about the block below. +# +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: +# run1: +# app: examples/fabric-admin/scripts/fabric-sync-app.py +# app-args: --app-admin=${FABRIC_ADMIN_APP} --app-bridge=${FABRIC_BRIDGE_APP} --stdin-pipe=dut-fsa-stdin --discriminator=1234 +# app-ready-pattern: "Successfully opened pairing window on the device" +# script-args: > +# --PICS src/app/tests/suites/certification/ci-pics-values +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --endpoint 0 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true +# === END CI TEST ARGUMENTS === + import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, default_matter_test_main, has_cluster, run_if_endpoint_matches +from chip.testing.matter_testing import MatterBaseTest, TestStep, default_matter_test_main, has_cluster, run_if_endpoint_matches from mobly import asserts diff --git a/src/python_testing/TC_CCTRL_2_2.py b/src/python_testing/TC_CCTRL_2_2.py index 20a03e3bd6..1bc403a7e4 100644 --- a/src/python_testing/TC_CCTRL_2_2.py +++ b/src/python_testing/TC_CCTRL_2_2.py @@ -18,23 +18,40 @@ # See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments # for details about the block below. # -# TODO: Skip CI for now, we don't have any way to run this. Needs setup. See test_TC_CCTRL.py +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: +# run1: +# app: examples/fabric-admin/scripts/fabric-sync-app.py +# app-args: --app-admin=${FABRIC_ADMIN_APP} --app-bridge=${FABRIC_BRIDGE_APP} --stdin-pipe=dut-fsa-stdin --discriminator=1234 +# app-ready-pattern: "Successfully opened pairing window on the device" +# script-args: > +# --PICS src/app/tests/suites/certification/ci-pics-values +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --endpoint 0 +# --string-arg th_server_app_path:${ALL_CLUSTERS_APP} +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true +# === END CI TEST ARGUMENTS === # This test requires a TH_SERVER application. Please specify with --string-arg th_server_app_path: import logging import os import random -import signal -import subprocess +import tempfile import time -import uuid import chip.clusters as Clusters from chip import ChipDeviceCtrl from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import (MatterBaseTest, TestStep, async_test_body, default_matter_test_main, has_cluster, - run_if_endpoint_matches) +from chip.testing.apps import AppServerSubprocess +from chip.testing.matter_testing import (MatterBaseTest, TestStep, async_test_body, default_matter_test_main, has_cluster, + run_if_endpoint_matches) from mobly import asserts @@ -43,25 +60,34 @@ class TC_CCTRL_2_2(MatterBaseTest): @async_test_body async def setup_class(self): super().setup_class() - self.app_process = None - app = self.user_params.get("th_server_app_path", None) - if not app: - asserts.fail('This test requires a TH_SERVER app. Specify app path with --string-arg th_server_app_path:') - - self.kvs = f'kvs_{str(uuid.uuid4())}' - self.port = 5543 - discriminator = random.randint(0, 4095) - passcode = 20202021 - cmd = [app] - cmd.extend(['--secured-device-port', str(5543)]) - cmd.extend(['--discriminator', str(discriminator)]) - cmd.extend(['--passcode', str(passcode)]) - cmd.extend(['--KVS', self.kvs]) - # TODO: Determine if we want these logs cooked or pushed to somewhere else - logging.info("Starting TH_SERVER") - self.app_process = subprocess.Popen(cmd) - logging.info("TH_SERVER started") - time.sleep(3) + + self.th_server = None + self.storage = None + + th_server_app = self.user_params.get("th_server_app_path", None) + if not th_server_app: + asserts.fail("This test requires a TH_SERVER app. Specify app path with --string-arg th_server_app_path:") + if not os.path.exists(th_server_app): + asserts.fail(f"The path {th_server_app} does not exist") + + # Create a temporary storage directory for keeping KVS files. + self.storage = tempfile.TemporaryDirectory(prefix=self.__class__.__name__) + logging.info("Temporary storage directory: %s", self.storage.name) + + self.th_server_port = 5543 + self.th_server_discriminator = random.randint(0, 4095) + self.th_server_passcode = 20202021 + + # Start the TH_SERVER app. + self.th_server = AppServerSubprocess( + th_server_app, + storage_dir=self.storage.name, + port=self.th_server_port, + discriminator=self.th_server_discriminator, + passcode=self.th_server_passcode) + self.th_server.start( + expected_output="Server initialization complete", + timeout=30) logging.info("Commissioning from separate fabric") @@ -71,20 +97,18 @@ async def setup_class(self): paa_path = str(self.matter_test_config.paa_trust_store_path) self.TH_server_controller = new_fabric_admin.NewController(nodeId=112233, paaTrustStorePath=paa_path) self.server_nodeid = 1111 - await self.TH_server_controller.CommissionOnNetwork(nodeId=self.server_nodeid, setupPinCode=passcode, filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, filter=discriminator) + await self.TH_server_controller.CommissionOnNetwork( + nodeId=self.server_nodeid, + setupPinCode=self.th_server_passcode, + filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, + filter=self.th_server_discriminator) logging.info("Commissioning TH_SERVER complete") def teardown_class(self): - # In case the th_server_app_path does not exist, then we failed the test - # and there is nothing to remove - if self.app_process is not None: - logging.warning("Stopping app with SIGTERM") - self.app_process.send_signal(signal.SIGTERM.value) - self.app_process.wait() - - if os.path.exists(self.kvs): - os.remove(self.kvs) - + if self.th_server is not None: + self.th_server.terminate() + if self.storage is not None: + self.storage.cleanup() super().teardown_class() def steps_TC_CCTRL_2_2(self) -> list[TestStep]: @@ -114,8 +138,7 @@ def steps_TC_CCTRL_2_2(self) -> list[TestStep]: TestStep(24, "Reading Event CommissioningRequestResult from DUT, confirm one new event"), TestStep(25, "Send CommissionNode command to DUT with CASE session, with valid parameters"), TestStep(26, "Send OpenCommissioningWindow command on Administrator Commissioning Cluster sent to TH_SERVER"), - TestStep(27, "Wait for DUT to successfully commission TH_SERVER, 30 seconds"), - TestStep(28, "Get number of fabrics from TH_SERVER, verify DUT successfully commissioned TH_SERVER")] + TestStep(27, "Get number of fabrics from TH_SERVER, verify DUT successfully commissioned TH_SERVER (up to 30 seconds)")] return steps @@ -170,7 +193,7 @@ async def test_TC_CCTRL_2_2(self): self.step(9) cmd = Clusters.AdministratorCommissioning.Commands.RevokeCommissioning() # If no exception is raised, this is success - await self.send_single_cmd(cmd, timedRequestTimeoutMs=5000) + await self.send_single_cmd(cmd, endpoint=0, timedRequestTimeoutMs=5000) self.step(10) if not events: @@ -293,15 +316,22 @@ async def test_TC_CCTRL_2_2(self): await self.send_single_cmd(cmd, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, timedRequestTimeoutMs=5000) self.step(27) - if not self.is_pics_sdk_ci_only: - time.sleep(30) - - self.step(28) - th_server_fabrics_new = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.Fabrics, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, fabric_filtered=False) - # TODO: this should be mocked too. - if not self.is_pics_sdk_ci_only: - asserts.assert_equal(len(th_server_fabrics) + 1, len(th_server_fabrics_new), - "Unexpected number of fabrics on TH_SERVER") + max_wait_time_sec = 30 + start_time = time.time() + elapsed = 0 + time_remaining = max_wait_time_sec + previous_number_th_server_fabrics = len(th_server_fabrics_new) + + while time_remaining > 0: + time.sleep(2) + th_server_fabrics_new = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.Fabrics, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, fabric_filtered=False) + if previous_number_th_server_fabrics != len(th_server_fabrics_new): + break + elapsed = time.time() - start_time + time_remaining = max_wait_time_sec - elapsed + + asserts.assert_equal(previous_number_th_server_fabrics + 1, len(th_server_fabrics_new), + "Unexpected number of fabrics on TH_SERVER") if __name__ == "__main__": diff --git a/src/python_testing/TC_CCTRL_2_3.py b/src/python_testing/TC_CCTRL_2_3.py index 95bd546c8a..83c25290cf 100644 --- a/src/python_testing/TC_CCTRL_2_3.py +++ b/src/python_testing/TC_CCTRL_2_3.py @@ -18,23 +18,40 @@ # See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments # for details about the block below. # -# TODO: Skip CI for now, we don't have any way to run this. Needs setup. See test_TC_CCTRL.py +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: +# run1: +# app: examples/fabric-admin/scripts/fabric-sync-app.py +# app-args: --app-admin=${FABRIC_ADMIN_APP} --app-bridge=${FABRIC_BRIDGE_APP} --stdin-pipe=dut-fsa-stdin --discriminator=1234 +# app-ready-pattern: "Successfully opened pairing window on the device" +# script-args: > +# --PICS src/app/tests/suites/certification/ci-pics-values +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --endpoint 0 +# --string-arg th_server_app_path:${ALL_CLUSTERS_APP} +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true +# === END CI TEST ARGUMENTS === # This test requires a TH_SERVER application. Please specify with --string-arg th_server_app_path: import logging import os import random -import signal -import subprocess +import tempfile import time -import uuid import chip.clusters as Clusters from chip import ChipDeviceCtrl from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import (MatterBaseTest, TestStep, async_test_body, default_matter_test_main, has_cluster, - run_if_endpoint_matches) +from chip.testing.apps import AppServerSubprocess +from chip.testing.matter_testing import (MatterBaseTest, TestStep, async_test_body, default_matter_test_main, has_cluster, + run_if_endpoint_matches) from mobly import asserts @@ -43,25 +60,34 @@ class TC_CCTRL_2_3(MatterBaseTest): @async_test_body async def setup_class(self): super().setup_class() - self.app_process = None - app = self.user_params.get("th_server_app_path", None) - if not app: - asserts.fail('This test requires a TH_SERVER app. Specify app path with --string-arg th_server_app_path:') - - self.kvs = f'kvs_{str(uuid.uuid4())}' - self.port = 5543 - discriminator = random.randint(0, 4095) - passcode = 20202021 - cmd = [app] - cmd.extend(['--secured-device-port', str(5543)]) - cmd.extend(['--discriminator', str(discriminator)]) - cmd.extend(['--passcode', str(passcode)]) - cmd.extend(['--KVS', self.kvs]) - # TODO: Determine if we want these logs cooked or pushed to somewhere else - logging.info("Starting TH_SERVER") - self.app_process = subprocess.Popen(cmd) - logging.info("TH_SERVER started") - time.sleep(3) + + self.th_server = None + self.storage = None + + th_server_app = self.user_params.get("th_server_app_path", None) + if not th_server_app: + asserts.fail("This test requires a TH_SERVER app. Specify app path with --string-arg th_server_app_path:") + if not os.path.exists(th_server_app): + asserts.fail(f"The path {th_server_app} does not exist") + + # Create a temporary storage directory for keeping KVS files. + self.storage = tempfile.TemporaryDirectory(prefix=self.__class__.__name__) + logging.info("Temporary storage directory: %s", self.storage.name) + + self.th_server_port = 5543 + self.th_server_discriminator = random.randint(0, 4095) + self.th_server_passcode = 20202021 + + # Start the TH_SERVER app. + self.th_server = AppServerSubprocess( + th_server_app, + storage_dir=self.storage.name, + port=self.th_server_port, + discriminator=self.th_server_discriminator, + passcode=self.th_server_passcode) + self.th_server.start( + expected_output="Server initialization complete", + timeout=30) logging.info("Commissioning from separate fabric") @@ -71,20 +97,18 @@ async def setup_class(self): paa_path = str(self.matter_test_config.paa_trust_store_path) self.TH_server_controller = new_fabric_admin.NewController(nodeId=112233, paaTrustStorePath=paa_path) self.server_nodeid = 1111 - await self.TH_server_controller.CommissionOnNetwork(nodeId=self.server_nodeid, setupPinCode=passcode, filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, filter=discriminator) + await self.TH_server_controller.CommissionOnNetwork( + nodeId=self.server_nodeid, + setupPinCode=self.th_server_passcode, + filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, + filter=self.th_server_discriminator) logging.info("Commissioning TH_SERVER complete") def teardown_class(self): - # In case the th_server_app_path does not exist, then we failed the test - # and there is nothing to remove - if self.app_process is not None: - logging.warning("Stopping app with SIGTERM") - self.app_process.send_signal(signal.SIGTERM.value) - self.app_process.wait() - - if os.path.exists(self.kvs): - os.remove(self.kvs) - + if self.th_server is not None: + self.th_server.terminate() + if self.storage is not None: + self.storage.cleanup() super().teardown_class() def steps_TC_CCTRL_2_3(self) -> list[TestStep]: @@ -98,8 +122,7 @@ def steps_TC_CCTRL_2_3(self) -> list[TestStep]: TestStep(8, "Send CommissionNode command to DUT with CASE session, with valid parameters"), TestStep(9, "Send another CommissionNode command to DUT with CASE session, with with same RequestId as the previous one"), TestStep(10, "Send OpenCommissioningWindow command on Administrator Commissioning Cluster sent to TH_SERVER"), - TestStep(11, "Wait for DUT to successfully commission TH_SERVER, 30 seconds"), - TestStep(12, "Get number of fabrics from TH_SERVER, verify DUT successfully commissioned TH_SERVER")] + TestStep(11, "Get number of fabrics from TH_SERVER, verify DUT successfully commissioned TH_SERVER (up to 30 seconds)")] return steps @@ -172,11 +195,23 @@ async def test_TC_CCTRL_2_3(self): await self.send_single_cmd(cmd, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, timedRequestTimeoutMs=5000) self.step(11) - time.sleep(30) - - self.step(12) - th_server_fabrics_new = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.Fabrics, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, fabric_filtered=False) - asserts.assert_equal(len(th_server_fabrics) + 1, len(th_server_fabrics_new), + max_wait_time_sec = 30 + start_time = time.time() + elapsed = 0 + time_remaining = max_wait_time_sec + previous_number_th_server_fabrics = len(th_server_fabrics) + + th_server_fabrics_new = None + while time_remaining > 0: + time.sleep(2) + th_server_fabrics_new = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.Fabrics, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, fabric_filtered=False) + if previous_number_th_server_fabrics != len(th_server_fabrics_new): + break + elapsed = time.time() - start_time + time_remaining = max_wait_time_sec - elapsed + + asserts.assert_not_equal(th_server_fabrics_new, None, "Failed to read Fabrics attribute") + asserts.assert_equal(previous_number_th_server_fabrics + 1, len(th_server_fabrics_new), "Unexpected number of fabrics on TH_SERVER") diff --git a/src/python_testing/TC_CC_10_1.py b/src/python_testing/TC_CC_10_1.py index dee2dfad44..c2c76ecde0 100644 --- a/src/python_testing/TC_CC_10_1.py +++ b/src/python_testing/TC_CC_10_1.py @@ -19,12 +19,21 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --endpoint 1 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --endpoint 1 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import asyncio @@ -32,7 +41,7 @@ import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts kCCAttributeValueIDs = [0x0001, 0x0003, 0x0004, 0x0007, 0x4000, 0x4001, 0x4002, 0x4003, 0x4004] diff --git a/src/python_testing/TC_CC_2_2.py b/src/python_testing/TC_CC_2_2.py index c575ae81f5..09d9af23e8 100644 --- a/src/python_testing/TC_CC_2_2.py +++ b/src/python_testing/TC_CC_2_2.py @@ -19,12 +19,21 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -32,8 +41,8 @@ import chip.clusters as Clusters from chip.clusters import ClusterObjects as ClusterObjects -from matter_testing_support import (ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, default_matter_test_main, - has_cluster, run_if_endpoint_matches) +from chip.testing.matter_testing import (ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, default_matter_test_main, + has_cluster, run_if_endpoint_matches) from mobly import asserts from test_plan_support import commission_if_required, read_attribute, verify_success diff --git a/src/python_testing/TC_CGEN_2_4.py b/src/python_testing/TC_CGEN_2_4.py index 09fbc6d593..7db0ddca28 100644 --- a/src/python_testing/TC_CGEN_2_4.py +++ b/src/python_testing/TC_CGEN_2_4.py @@ -19,12 +19,19 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -39,7 +46,7 @@ from chip.ChipDeviceCtrl import CommissioningParameters from chip.exceptions import ChipStackError from chip.native import PyChipError -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts # Commissioning stage numbers - we should find a better way to match these to the C++ code diff --git a/src/python_testing/TC_CNET_1_4.py b/src/python_testing/TC_CNET_1_4.py index 58f885c9d5..2c69456e86 100644 --- a/src/python_testing/TC_CNET_1_4.py +++ b/src/python_testing/TC_CNET_1_4.py @@ -19,18 +19,26 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts kRootEndpointId = 0 diff --git a/src/python_testing/TC_CNET_4_4.py b/src/python_testing/TC_CNET_4_4.py index 12407e6c5f..223cfdf588 100644 --- a/src/python_testing/TC_CNET_4_4.py +++ b/src/python_testing/TC_CNET_4_4.py @@ -22,7 +22,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches from mobly import asserts diff --git a/src/python_testing/TC_DA_1_2.py b/src/python_testing/TC_DA_1_2.py index a8b9dbf3cd..5c0b6dbf15 100644 --- a/src/python_testing/TC_DA_1_2.py +++ b/src/python_testing/TC_DA_1_2.py @@ -19,21 +19,32 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === +import logging import os import random import re import chip.clusters as Clusters -from basic_composition_support import BasicCompositionTests from chip.interaction_model import InteractionModelError, Status +from chip.testing.basic_composition import BasicCompositionTests +from chip.testing.matter_testing import (MatterBaseTest, TestStep, async_test_body, default_matter_test_main, hex_from_bytes, + type_matches) from chip.tlv import TLVReader from cryptography import x509 from cryptography.exceptions import InvalidSignature @@ -41,7 +52,6 @@ from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import ec, utils from ecdsa.curves import curve_by_name -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, hex_from_bytes, type_matches from mobly import asserts from pyasn1.codec.der.decoder import decode as der_decoder from pyasn1.error import PyAsn1Error @@ -382,7 +392,12 @@ async def test_TC_DA_1_2(self): if '.der' not in filename: continue with open(os.path.join(cd_cert_dir, filename), 'rb') as f: - cert = x509.load_der_x509_certificate(f.read()) + logging.info(f'Parsing CD signing certificate file: {filename}') + try: + cert = x509.load_der_x509_certificate(f.read()) + except ValueError: + logging.info(f'File {filename} is not a valid certificate, skipping') + pass pub = cert.public_key() ski = x509.SubjectKeyIdentifier.from_public_key(pub).digest certs[ski] = pub diff --git a/src/python_testing/TC_DA_1_5.py b/src/python_testing/TC_DA_1_5.py index d37f236a9f..e8e6ce773c 100644 --- a/src/python_testing/TC_DA_1_5.py +++ b/src/python_testing/TC_DA_1_5.py @@ -19,12 +19,20 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import random @@ -32,12 +40,12 @@ import chip.clusters as Clusters from chip import ChipDeviceCtrl from chip.interaction_model import InteractionModelError, Status +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main, hex_from_bytes, type_matches from chip.tlv import TLVReader from cryptography import x509 from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import ec, utils from ecdsa.curves import curve_by_name -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, hex_from_bytes, type_matches from mobly import asserts from pyasn1.codec.der.decoder import decode as der_decoder from pyasn1.error import PyAsn1Error diff --git a/src/python_testing/TC_DA_1_7.py b/src/python_testing/TC_DA_1_7.py index be1e466002..6678080a60 100644 --- a/src/python_testing/TC_DA_1_7.py +++ b/src/python_testing/TC_DA_1_7.py @@ -19,12 +19,20 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --bool-arg allow_sdk_dac:true --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --bool-arg allow_sdk_dac:true +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -33,13 +41,13 @@ from typing import List, Optional import chip.clusters as Clusters +from chip.testing.matter_testing import (MatterBaseTest, TestStep, async_test_body, bytes_from_hex, default_matter_test_main, + hex_from_bytes) from cryptography.exceptions import InvalidSignature from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import ec from cryptography.hazmat.primitives.serialization import Encoding, PublicFormat from cryptography.x509 import AuthorityKeyIdentifier, Certificate, SubjectKeyIdentifier, load_der_x509_certificate -from matter_testing_support import (MatterBaseTest, TestStep, async_test_body, bytes_from_hex, default_matter_test_main, - hex_from_bytes) from mobly import asserts # Those are SDK samples that are known to be non-production. diff --git a/src/python_testing/TC_DEMTestBase.py b/src/python_testing/TC_DEMTestBase.py index da51ba2528..49c8c6a637 100644 --- a/src/python_testing/TC_DEMTestBase.py +++ b/src/python_testing/TC_DEMTestBase.py @@ -19,7 +19,7 @@ import chip.clusters as Clusters from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import utc_time_in_matter_epoch +from chip.testing.matter_testing import utc_time_in_matter_epoch from mobly import asserts logger = logging.getLogger(__name__) diff --git a/src/python_testing/TC_DEM_2_1.py b/src/python_testing/TC_DEM_2_1.py index 1cad8aca0c..851099cb8e 100644 --- a/src/python_testing/TC_DEM_2_1.py +++ b/src/python_testing/TC_DEM_2_1.py @@ -19,12 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7e -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# --featureSet 0x7e +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === """Define Matter test case TC_DEM_2_1.""" @@ -34,7 +49,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_DEMTestBase import DEMTestBase diff --git a/src/python_testing/TC_DEM_2_10.py b/src/python_testing/TC_DEM_2_10.py index fb837adf57..810efdbfa2 100644 --- a/src/python_testing/TC_DEM_2_10.py +++ b/src/python_testing/TC_DEM_2_10.py @@ -19,12 +19,26 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7b -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# --featureSet 0x7b +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === """Define Matter test case TC_DEM_2_10.""" @@ -36,8 +50,8 @@ import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import (ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, async_test_body, - default_matter_test_main) +from chip.testing.matter_testing import (ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, async_test_body, + default_matter_test_main) from mobly import asserts from TC_DEMTestBase import DEMTestBase diff --git a/src/python_testing/TC_DEM_2_2.py b/src/python_testing/TC_DEM_2_2.py index b180da13d2..168417dd98 100644 --- a/src/python_testing/TC_DEM_2_2.py +++ b/src/python_testing/TC_DEM_2_2.py @@ -19,12 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x01 --application evse -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# --featureSet 0x01 +# --application evse +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === """Define Matter test case TC_DEM_2_2.""" @@ -37,7 +52,7 @@ import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_DEMTestBase import DEMTestBase diff --git a/src/python_testing/TC_DEM_2_3.py b/src/python_testing/TC_DEM_2_3.py index 69b44cc730..c5699c0318 100644 --- a/src/python_testing/TC_DEM_2_3.py +++ b/src/python_testing/TC_DEM_2_3.py @@ -18,12 +18,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0xa --application evse -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# --featureSet 0xa +# --application evse +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -31,7 +46,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_DEMTestBase import DEMTestBase diff --git a/src/python_testing/TC_DEM_2_4.py b/src/python_testing/TC_DEM_2_4.py index d611172cb9..1b591cd438 100644 --- a/src/python_testing/TC_DEM_2_4.py +++ b/src/python_testing/TC_DEM_2_4.py @@ -18,12 +18,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x12 --application evse -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# --featureSet 0x12 +# --application evse +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -32,7 +47,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import Status -from matter_testing_support import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_DEMTestBase import DEMTestBase diff --git a/src/python_testing/TC_DEM_2_5.py b/src/python_testing/TC_DEM_2_5.py index 0a5547fd4a..c845ec1997 100644 --- a/src/python_testing/TC_DEM_2_5.py +++ b/src/python_testing/TC_DEM_2_5.py @@ -19,12 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x22 --application evse -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# --featureSet 0x22 +# --application evse +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === """Define Matter test case TC_DEM_2_5.""" @@ -34,7 +49,7 @@ import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_DEMTestBase import DEMTestBase diff --git a/src/python_testing/TC_DEM_2_6.py b/src/python_testing/TC_DEM_2_6.py index 012ff88d26..32dea4af4f 100644 --- a/src/python_testing/TC_DEM_2_6.py +++ b/src/python_testing/TC_DEM_2_6.py @@ -19,12 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7c --application evse -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# --featureSet 0x7c +# --application evse +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === """Define Matter test case TC_DEM_2_6.""" @@ -34,7 +49,7 @@ import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_DEMTestBase import DEMTestBase diff --git a/src/python_testing/TC_DEM_2_7.py b/src/python_testing/TC_DEM_2_7.py index b693f6e646..44c65fbc58 100644 --- a/src/python_testing/TC_DEM_2_7.py +++ b/src/python_testing/TC_DEM_2_7.py @@ -19,12 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7a --application evse -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# --featureSet 0x7a +# --application evse +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === """Define Matter test case TC_DEM_2_7.""" @@ -34,7 +49,7 @@ import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_DEMTestBase import DEMTestBase diff --git a/src/python_testing/TC_DEM_2_8.py b/src/python_testing/TC_DEM_2_8.py index a54baca2e2..016778fdf1 100644 --- a/src/python_testing/TC_DEM_2_8.py +++ b/src/python_testing/TC_DEM_2_8.py @@ -19,12 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7c --application evse -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# --featureSet 0x7c +# --application evse +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === """Define Matter test case TC_DEM_2_8.""" @@ -34,7 +49,7 @@ import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_DEMTestBase import DEMTestBase diff --git a/src/python_testing/TC_DEM_2_9.py b/src/python_testing/TC_DEM_2_9.py index 935a04064d..05111e3b8f 100644 --- a/src/python_testing/TC_DEM_2_9.py +++ b/src/python_testing/TC_DEM_2_9.py @@ -19,12 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7c --application evse -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# --featureSet 0x7c +# --application evse +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === """Define Matter test case TC_DEM_2_9.""" @@ -33,7 +48,7 @@ import logging import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_DEMTestBase import DEMTestBase diff --git a/src/python_testing/TC_DGGEN_2_4.py b/src/python_testing/TC_DGGEN_2_4.py index ee80d927a9..17b068452c 100644 --- a/src/python_testing/TC_DGGEN_2_4.py +++ b/src/python_testing/TC_DGGEN_2_4.py @@ -19,12 +19,19 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import asyncio @@ -33,8 +40,9 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError -from matter_testing_support import (MatterBaseTest, async_test_body, default_matter_test_main, matter_epoch_us_from_utc_datetime, - utc_datetime_from_matter_epoch_us, utc_datetime_from_posix_time_ms) +from chip.testing.matter_testing import (MatterBaseTest, async_test_body, default_matter_test_main, + matter_epoch_us_from_utc_datetime, utc_datetime_from_matter_epoch_us, + utc_datetime_from_posix_time_ms) from mobly import asserts logger = logging.getLogger(__name__) diff --git a/src/python_testing/TC_DGGEN_3_2.py b/src/python_testing/TC_DGGEN_3_2.py index 7e5af6c7a5..58c333e8b4 100644 --- a/src/python_testing/TC_DGGEN_3_2.py +++ b/src/python_testing/TC_DGGEN_3_2.py @@ -16,7 +16,7 @@ # import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_DGSW_2_1.py b/src/python_testing/TC_DGSW_2_1.py index c9411611e0..6338932725 100644 --- a/src/python_testing/TC_DGSW_2_1.py +++ b/src/python_testing/TC_DGSW_2_1.py @@ -19,17 +19,24 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === # import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_DRLK_2_12.py b/src/python_testing/TC_DRLK_2_12.py index 3321ea303b..342fbc64f6 100644 --- a/src/python_testing/TC_DRLK_2_12.py +++ b/src/python_testing/TC_DRLK_2_12.py @@ -19,16 +19,24 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_LOCK_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_LOCK_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from drlk_2_x_common import DRLK_COMMON -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main # Configurable parameters: # - userIndex: userIndex to use when creating a user on the DUT for testing purposes diff --git a/src/python_testing/TC_DRLK_2_13.py b/src/python_testing/TC_DRLK_2_13.py index a26297d5c1..809e278517 100644 --- a/src/python_testing/TC_DRLK_2_13.py +++ b/src/python_testing/TC_DRLK_2_13.py @@ -18,12 +18,21 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_LOCK_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_LOCK_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -34,7 +43,7 @@ from chip.clusters.Attribute import EventPriority from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches from mobly import asserts logger = logging.getLogger(__name__) diff --git a/src/python_testing/TC_DRLK_2_2.py b/src/python_testing/TC_DRLK_2_2.py index 9a04e9d5fd..f9f192f18e 100644 --- a/src/python_testing/TC_DRLK_2_2.py +++ b/src/python_testing/TC_DRLK_2_2.py @@ -19,16 +19,24 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_LOCK_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_LOCK_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from drlk_2_x_common import DRLK_COMMON -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main # Configurable parameters: # - userIndex: userIndex to use when creating a user on the DUT for testing purposes diff --git a/src/python_testing/TC_DRLK_2_3.py b/src/python_testing/TC_DRLK_2_3.py index 3171ed28b4..114f41ab9c 100644 --- a/src/python_testing/TC_DRLK_2_3.py +++ b/src/python_testing/TC_DRLK_2_3.py @@ -19,16 +19,24 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_LOCK_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_LOCK_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from drlk_2_x_common import DRLK_COMMON -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main # Configurable parameters: # - userIndex: userIndex to use when creating a user on the DUT for testing purposes diff --git a/src/python_testing/TC_DRLK_2_5.py b/src/python_testing/TC_DRLK_2_5.py index a43067b05b..84451d2600 100644 --- a/src/python_testing/TC_DRLK_2_5.py +++ b/src/python_testing/TC_DRLK_2_5.py @@ -18,19 +18,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_LOCK_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_LOCK_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches from mobly import asserts logger = logging.getLogger(__name__) diff --git a/src/python_testing/TC_DRLK_2_9.py b/src/python_testing/TC_DRLK_2_9.py index 954ca7dd7b..fb294b724f 100644 --- a/src/python_testing/TC_DRLK_2_9.py +++ b/src/python_testing/TC_DRLK_2_9.py @@ -18,12 +18,20 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_LOCK_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_LOCK_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -33,8 +41,8 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError, Status +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches from drlk_2_x_common import DRLK_COMMON -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches from mobly import asserts logger = logging.getLogger(__name__) diff --git a/src/python_testing/TC_DeviceBasicComposition.py b/src/python_testing/TC_DeviceBasicComposition.py index 31d8bfb76c..0f227c2c67 100644 --- a/src/python_testing/TC_DeviceBasicComposition.py +++ b/src/python_testing/TC_DeviceBasicComposition.py @@ -19,54 +19,73 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 run2 run3 run4 run5 run6 run7 run8 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --manual-code 10054912339 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto -# -# test-runner-run/run2/app: ${CHIP_LOCK_APP} -# test-runner-run/run2/factoryreset: True -# test-runner-run/run2/quiet: True -# test-runner-run/run2/app-args: --discriminator 1234 --KVS kvs1 -# test-runner-run/run2/script-args: --storage-path admin_storage.json --manual-code 10054912339 -# -# test-runner-run/run3/app: ${CHIP_LOCK_APP} -# test-runner-run/run3/factoryreset: True -# test-runner-run/run3/quiet: True -# test-runner-run/run3/app-args: --discriminator 1234 --KVS kvs1 -# test-runner-run/run3/script-args: --storage-path admin_storage.json --qr-code MT:-24J0Q1212-10648G00 -# -# test-runner-run/run4/app: ${CHIP_LOCK_APP} -# test-runner-run/run4/factoryreset: True -# test-runner-run/run4/quiet: True -# test-runner-run/run4/app-args: --discriminator 1234 --KVS kvs1 -# test-runner-run/run4/script-args: --storage-path admin_storage.json --discriminator 1234 --passcode 20202021 -# -# test-runner-run/run5/app: ${CHIP_LOCK_APP} -# test-runner-run/run5/factoryreset: True -# test-runner-run/run5/quiet: True -# test-runner-run/run5/app-args: --discriminator 1234 --KVS kvs1 -# test-runner-run/run5/script-args: --storage-path admin_storage.json --manual-code 10054912339 --commissioning-method on-network -# -# test-runner-run/run6/app: ${CHIP_LOCK_APP} -# test-runner-run/run6/factoryreset: True -# test-runner-run/run6/quiet: True -# test-runner-run/run6/app-args: --discriminator 1234 --KVS kvs1 -# test-runner-run/run6/script-args: --storage-path admin_storage.json --qr-code MT:-24J0Q1212-10648G00 --commissioning-method on-network -# -# test-runner-run/run7/app: ${CHIP_LOCK_APP} -# test-runner-run/run7/factoryreset: True -# test-runner-run/run7/quiet: True -# test-runner-run/run7/app-args: --discriminator 1234 --KVS kvs1 -# test-runner-run/run7/script-args: --storage-path admin_storage.json --discriminator 1234 --passcode 20202021 --commissioning-method on-network -# -# test-runner-run/run8/app: ${CHIP_LOCK_APP} -# test-runner-run/run8/factoryreset: False -# test-runner-run/run8/quiet: True -# test-runner-run/run8/app-args: --discriminator 1234 --KVS kvs1 -# test-runner-run/run8/script-args: --storage-path admin_storage.json +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --manual-code 10054912339 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true +# run2: +# app: ${CHIP_LOCK_APP} +# app-args: --discriminator 1234 --KVS kvs1 +# script-args: --storage-path admin_storage.json --manual-code 10054912339 +# factory-reset: true +# quiet: true +# run3: +# app: ${CHIP_LOCK_APP} +# app-args: --discriminator 1234 --KVS kvs1 +# script-args: --storage-path admin_storage.json --qr-code MT:-24J0Q1212-10648G00 +# factory-reset: true +# quiet: true +# run4: +# app: ${CHIP_LOCK_APP} +# app-args: --discriminator 1234 --KVS kvs1 +# script-args: > +# --storage-path admin_storage.json +# --discriminator 1234 +# --passcode 20202021 +# factory-reset: true +# quiet: true +# run5: +# app: ${CHIP_LOCK_APP} +# app-args: --discriminator 1234 --KVS kvs1 +# script-args: > +# --storage-path admin_storage.json +# --manual-code 10054912339 +# --commissioning-method on-network +# factory-reset: true +# quiet: true +# run6: +# app: ${CHIP_LOCK_APP} +# app-args: --discriminator 1234 --KVS kvs1 +# script-args: > +# --storage-path admin_storage.json +# --qr-code MT:-24J0Q1212-10648G00 +# --commissioning-method on-network +# factory-reset: true +# quiet: true +# run7: +# app: ${CHIP_LOCK_APP} +# app-args: --discriminator 1234 --KVS kvs1 +# script-args: > +# --storage-path admin_storage.json +# --discriminator 1234 +# --passcode 20202021 +# --commissioning-method on-network +# factory-reset: true +# quiet: true +# run8: +# app: ${CHIP_LOCK_APP} +# app-args: --discriminator 1234 --KVS kvs1 +# script-args: --storage-path admin_storage.json +# factory-reset: false +# quiet: true # === END CI TEST ARGUMENTS === # Run 1: runs through all tests @@ -84,19 +103,25 @@ import chip.clusters as Clusters import chip.clusters.ClusterObjects import chip.tlv -from basic_composition_support import BasicCompositionTests from chip import ChipUtility from chip.clusters.Attribute import ValueDecodeFailure from chip.clusters.ClusterObjects import ClusterAttributeDescriptor, ClusterObjectFieldDescriptor from chip.interaction_model import InteractionModelError, Status +from chip.testing.basic_composition import BasicCompositionTests +from chip.testing.global_attribute_ids import (AttributeIdType, ClusterIdType, CommandIdType, GlobalAttributeIds, attribute_id_type, + cluster_id_type, command_id_type) +from chip.testing.matter_testing import (AttributePathLocation, ClusterPathLocation, CommandPathLocation, MatterBaseTest, TestStep, + async_test_body, default_matter_test_main) +from chip.testing.taglist_and_topology_test import (create_device_type_list_for_root, create_device_type_lists, + find_tag_list_problems, find_tree_roots, flat_list_ok, + get_direct_children_of_root, parts_list_cycles, separate_endpoint_types) from chip.tlv import uint -from global_attribute_ids import GlobalAttributeIds -from matter_testing_support import (AttributePathLocation, ClusterPathLocation, CommandPathLocation, MatterBaseTest, TestStep, - async_test_body, default_matter_test_main) from mobly import asserts -from taglist_and_topology_test_support import (create_device_type_list_for_root, create_device_type_lists, find_tag_list_problems, - find_tree_roots, flat_list_ok, get_direct_children_of_root, parts_list_cycles, - separate_endpoint_types) + + +def get_vendor_id(mei: int) -> int: + """Get the vendor ID portion (MEI prefix) of an overall MEI.""" + return (mei >> 16) & 0xffff def check_int_in_range(min_value: int, max_value: int, allow_null: bool = False) -> Callable: @@ -469,15 +494,17 @@ class RequiredMandatoryAttribute: cmd_prefixes = [a & 0xFFFF_0000 for a in cmd_values] bad_attrs = [a for a in attr_prefixes if a >= bad_prefix_min] bad_cmds = [a for a in cmd_prefixes if a >= bad_prefix_min] - for bad in bad_attrs: - location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=bad) + for bad_attrib_id in bad_attrs: + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=bad_attrib_id) + vendor_id = get_vendor_id(bad_attrib_id) self.record_error(self.get_test_name( - ), location=location, problem=f'Attribute with bad prefix {attribute_id} in cluster {cluster_id}', spec_location='Manufacturer Extensible Identifier (MEI)') + ), location=location, problem=f'Attribute 0x{bad_attrib_id:08x} with bad prefix 0x{vendor_id:04x} in cluster 0x{cluster_id:08x}' + (' (Test Vendor)' if attribute_id_type(bad_attrib_id) == AttributeIdType.kTest else ''), spec_location='Manufacturer Extensible Identifier (MEI)') success = False - for bad in bad_cmds: - location = CommandPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, command_id=bad) + for bad_cmd_id in bad_cmds: + location = CommandPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, command_id=bad_cmd_id) + vendor_id = get_vendor_id(bad_cmd_id) self.record_error(self.get_test_name( - ), location=location, problem=f'Command with bad prefix {attribute_id} in cluster {cluster_id}', spec_location='Manufacturer Extensible Identifier (MEI)') + ), location=location, problem=f'Command 0x{bad_cmd_id:08x} with bad prefix 0x{vendor_id:04x} in cluster 0x{cluster_id:08x}' + (' (Test Vendor)' if command_id_type(bad_cmd_id) == CommandIdType.kTest else ''), spec_location='Manufacturer Extensible Identifier (MEI)') success = False self.print_step(7, "Validate that none of the MEI global attribute IDs contain values outside of the allowed suffix range") @@ -520,10 +547,11 @@ class RequiredMandatoryAttribute: for endpoint_id, endpoint in self.endpoints_tlv.items(): cluster_prefixes = [a & 0xFFFF_0000 for a in endpoint.keys()] bad_clusters_ids = [a for a in cluster_prefixes if a >= bad_prefix_min] - for bad in bad_clusters_ids: - location = ClusterPathLocation(endpoint_id=endpoint_id, cluster_id=bad) + for bad_cluster_id in bad_clusters_ids: + location = ClusterPathLocation(endpoint_id=endpoint_id, cluster_id=bad_cluster_id) + vendor_id = get_vendor_id(bad_cluster_id) self.record_error(self.get_test_name(), location=location, - problem=f'Bad cluster id prefix {bad}', spec_location='Manufacturer Extensible Identifier (MEI)') + problem=f'Cluster 0x{bad_cluster_id:08x} with bad prefix 0x{vendor_id:04x}' + (' (Test Vendor)' if cluster_id_type(bad_cluster_id) == ClusterIdType.kTest else ''), spec_location='Manufacturer Extensible Identifier (MEI)') success = False self.print_step(9, "Validate that all clusters in the standard range have a known cluster ID") diff --git a/src/python_testing/TC_DeviceConformance.py b/src/python_testing/TC_DeviceConformance.py index 2d03e8f326..a3e350bdfb 100644 --- a/src/python_testing/TC_DeviceConformance.py +++ b/src/python_testing/TC_DeviceConformance.py @@ -19,28 +19,36 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_LOCK_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --manual-code 10054912339 --bool-arg ignore_in_progress:True allow_provisional:True --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --tests test_TC_IDM_10_2 +# test-runner-runs: +# run1: +# app: ${CHIP_LOCK_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --manual-code 10054912339 +# --bool-arg ignore_in_progress:True allow_provisional:True +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# --tests test_TC_IDM_10_2 +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === # TODO: Enable 10.5 in CI once the door lock OTA requestor problem is sorted. from typing import Callable import chip.clusters as Clusters -from basic_composition_support import BasicCompositionTests +from chip.testing.basic_composition import BasicCompositionTests +from chip.testing.choice_conformance import (evaluate_attribute_choice_conformance, evaluate_command_choice_conformance, + evaluate_feature_choice_conformance) +from chip.testing.conformance import ConformanceDecision, conformance_allowed +from chip.testing.global_attribute_ids import (ClusterIdType, DeviceTypeIdType, GlobalAttributeIds, cluster_id_type, + device_type_id_type, is_valid_device_type_id) +from chip.testing.matter_testing import (AttributePathLocation, ClusterPathLocation, CommandPathLocation, DeviceTypePathLocation, + MatterBaseTest, ProblemNotice, ProblemSeverity, async_test_body, default_matter_test_main) +from chip.testing.spec_parsing import CommandType, build_xml_clusters, build_xml_device_types from chip.tlv import uint -from choice_conformance_support import (evaluate_attribute_choice_conformance, evaluate_command_choice_conformance, - evaluate_feature_choice_conformance) -from conformance_support import ConformanceDecision, conformance_allowed -from global_attribute_ids import (ClusterIdType, DeviceTypeIdType, GlobalAttributeIds, cluster_id_type, device_type_id_type, - is_valid_device_type_id) -from matter_testing_support import (AttributePathLocation, ClusterPathLocation, CommandPathLocation, DeviceTypePathLocation, - MatterBaseTest, ProblemNotice, ProblemSeverity, async_test_body, default_matter_test_main) -from spec_parsing_support import CommandType, build_xml_clusters, build_xml_device_types class DeviceConformanceTests(BasicCompositionTests): diff --git a/src/python_testing/TC_ECOINFO_2_1.py b/src/python_testing/TC_ECOINFO_2_1.py index f3f22bb99c..a0adf75ac4 100644 --- a/src/python_testing/TC_ECOINFO_2_1.py +++ b/src/python_testing/TC_ECOINFO_2_1.py @@ -33,7 +33,7 @@ # --string-arg th_server_app_path:${ALL_CLUSTERS_APP} dut_fsa_stdin_pipe:dut-fsa-stdin # --trace-to json:${TRACE_TEST_JSON}.json # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto -# factoryreset: true +# factory-reset: true # quiet: true # === END CI TEST ARGUMENTS === @@ -46,10 +46,10 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import Status +from chip.testing.apps import AppServerSubprocess +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches from chip.tlv import uint -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches from mobly import asserts -from TC_MCORE_FS_1_1 import AppServer class TC_ECOINFO_2_1(MatterBaseTest): @@ -95,13 +95,15 @@ async def _setup_ci_prerequisites(self): self.th_server_passcode = 20202021 # Start the server app. - self.th_server = AppServer( + self.th_server = AppServerSubprocess( th_server_app, storage_dir=self.storage.name, port=self.th_server_port, discriminator=self.th_server_discriminator, passcode=self.th_server_passcode) - self.th_server.start() + self.th_server.start( + expected_output="Server initialization complete", + timeout=30) # Add some server to the DUT_FSA's Aggregator/Bridge. self.dut_fsa_stdin.write(f"pairing onnetwork 2 {self.th_server_passcode}\n") diff --git a/src/python_testing/TC_ECOINFO_2_2.py b/src/python_testing/TC_ECOINFO_2_2.py index 96fa2cd4d0..6ce1e490d5 100644 --- a/src/python_testing/TC_ECOINFO_2_2.py +++ b/src/python_testing/TC_ECOINFO_2_2.py @@ -33,7 +33,7 @@ # --string-arg th_server_app_path:${ALL_CLUSTERS_APP} dut_fsa_stdin_pipe:dut-fsa-stdin # --trace-to json:${TRACE_TEST_JSON}.json # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto -# factoryreset: true +# factory-reset: true # quiet: true # === END CI TEST ARGUMENTS === @@ -45,11 +45,11 @@ import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.apps import AppServerSubprocess +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts -from TC_MCORE_FS_1_1 import AppServer -_DEVICE_TYPE_AGGREGGATOR = 0x000E +_DEVICE_TYPE_AGGREGATOR = 0x000E class TC_ECOINFO_2_2(MatterBaseTest): @@ -94,13 +94,15 @@ def _setup_ci_prerequisites(self): self.th_server_passcode = 20202021 # Start the server app. - self.th_server = AppServer( + self.th_server = AppServerSubprocess( th_server_app, storage_dir=self.storage.name, port=self.th_server_port, discriminator=self.th_server_discriminator, passcode=self.th_server_passcode) - self.th_server.start() + self.th_server.start( + expected_output="Server initialization complete", + timeout=30) def steps_TC_ECOINFO_2_2(self) -> list[TestStep]: return [ @@ -147,7 +149,7 @@ async def test_TC_ECOINFO_2_2(self): device_type_list_read = await dev_ctrl.ReadAttribute(dut_node_id, [(endpoint, Clusters.Descriptor.Attributes.DeviceTypeList)]) device_type_list = device_type_list_read[endpoint][Clusters.Descriptor][Clusters.Descriptor.Attributes.DeviceTypeList] for device_type in device_type_list: - if device_type.deviceType == _DEVICE_TYPE_AGGREGGATOR: + if device_type.deviceType == _DEVICE_TYPE_AGGREGATOR: list_of_aggregator_endpoints.append(endpoint) asserts.assert_greater_equal(len(list_of_aggregator_endpoints), 1, "Did not find any Aggregator device types") diff --git a/src/python_testing/TC_EEM_2_1.py b/src/python_testing/TC_EEM_2_1.py index d5a2c07511..653bd942a9 100644 --- a/src/python_testing/TC_EEM_2_1.py +++ b/src/python_testing/TC_EEM_2_1.py @@ -18,19 +18,32 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.clusters.Types import NullValue -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_EnergyReporting_Utils import EnergyReportingBaseTestHelper diff --git a/src/python_testing/TC_EEM_2_2.py b/src/python_testing/TC_EEM_2_2.py index fd2d5c828f..408cd85adb 100644 --- a/src/python_testing/TC_EEM_2_2.py +++ b/src/python_testing/TC_EEM_2_2.py @@ -18,17 +18,30 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import time -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_EnergyReporting_Utils import EnergyReportingBaseTestHelper diff --git a/src/python_testing/TC_EEM_2_3.py b/src/python_testing/TC_EEM_2_3.py index 927ec9aea2..69a41b08e0 100644 --- a/src/python_testing/TC_EEM_2_3.py +++ b/src/python_testing/TC_EEM_2_3.py @@ -18,17 +18,30 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import time -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_EnergyReporting_Utils import EnergyReportingBaseTestHelper diff --git a/src/python_testing/TC_EEM_2_4.py b/src/python_testing/TC_EEM_2_4.py index dbc89f1934..0f67fb0405 100644 --- a/src/python_testing/TC_EEM_2_4.py +++ b/src/python_testing/TC_EEM_2_4.py @@ -18,17 +18,30 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import time -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_EnergyReporting_Utils import EnergyReportingBaseTestHelper diff --git a/src/python_testing/TC_EEM_2_5.py b/src/python_testing/TC_EEM_2_5.py index 95f01ebc15..43cb2cddf8 100644 --- a/src/python_testing/TC_EEM_2_5.py +++ b/src/python_testing/TC_EEM_2_5.py @@ -18,17 +18,30 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import time -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_EnergyReporting_Utils import EnergyReportingBaseTestHelper diff --git a/src/python_testing/TC_EEVSE_2_2.py b/src/python_testing/TC_EEVSE_2_2.py index 152f08de26..144bfd82d3 100644 --- a/src/python_testing/TC_EEVSE_2_2.py +++ b/src/python_testing/TC_EEVSE_2_2.py @@ -18,12 +18,26 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --application evse -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# --application evse +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -32,7 +46,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue -from matter_testing_support import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_EEVSE_Utils import EEVSEBaseTestHelper diff --git a/src/python_testing/TC_EEVSE_2_3.py b/src/python_testing/TC_EEVSE_2_3.py index d3c3c46ea2..eb4e43d0b5 100644 --- a/src/python_testing/TC_EEVSE_2_3.py +++ b/src/python_testing/TC_EEVSE_2_3.py @@ -18,12 +18,26 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --application evse -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# --application evse +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -32,7 +46,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import Status -from matter_testing_support import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_EEVSE_Utils import EEVSEBaseTestHelper diff --git a/src/python_testing/TC_EEVSE_2_4.py b/src/python_testing/TC_EEVSE_2_4.py index c7e855bf23..10355debd0 100644 --- a/src/python_testing/TC_EEVSE_2_4.py +++ b/src/python_testing/TC_EEVSE_2_4.py @@ -18,12 +18,26 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --application evse -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# --application evse +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -31,7 +45,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue -from matter_testing_support import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main from TC_EEVSE_Utils import EEVSEBaseTestHelper logger = logging.getLogger(__name__) diff --git a/src/python_testing/TC_EEVSE_2_5.py b/src/python_testing/TC_EEVSE_2_5.py index 5e057f7808..4571cfb363 100644 --- a/src/python_testing/TC_EEVSE_2_5.py +++ b/src/python_testing/TC_EEVSE_2_5.py @@ -18,12 +18,26 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --application evse -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# --application evse +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -31,7 +45,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import Status -from matter_testing_support import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main from TC_EEVSE_Utils import EEVSEBaseTestHelper logger = logging.getLogger(__name__) diff --git a/src/python_testing/TC_EEVSE_2_6.py b/src/python_testing/TC_EEVSE_2_6.py index 575d64cd3c..d66ff60bf6 100644 --- a/src/python_testing/TC_EEVSE_2_6.py +++ b/src/python_testing/TC_EEVSE_2_6.py @@ -18,12 +18,26 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --application evse -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# --application evse +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -31,8 +45,8 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue -from matter_testing_support import (ClusterAttributeChangeAccumulator, EventChangeCallback, MatterBaseTest, TestStep, - async_test_body, default_matter_test_main) +from chip.testing.matter_testing import (ClusterAttributeChangeAccumulator, EventChangeCallback, MatterBaseTest, TestStep, + async_test_body, default_matter_test_main) from mobly import asserts from TC_EEVSE_Utils import EEVSEBaseTestHelper diff --git a/src/python_testing/TC_EPM_2_1.py b/src/python_testing/TC_EPM_2_1.py index 81f0406a18..bee38aa129 100644 --- a/src/python_testing/TC_EPM_2_1.py +++ b/src/python_testing/TC_EPM_2_1.py @@ -18,18 +18,31 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_EnergyReporting_Utils import EnergyReportingBaseTestHelper diff --git a/src/python_testing/TC_EPM_2_2.py b/src/python_testing/TC_EPM_2_2.py index 1ca497f4fa..d817042753 100644 --- a/src/python_testing/TC_EPM_2_2.py +++ b/src/python_testing/TC_EPM_2_2.py @@ -18,18 +18,31 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import time -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_EnergyReporting_Utils import EnergyReportingBaseTestHelper diff --git a/src/python_testing/TC_EWATERHTR_2_1.py b/src/python_testing/TC_EWATERHTR_2_1.py index e9ae195f98..82c9e93dad 100644 --- a/src/python_testing/TC_EWATERHTR_2_1.py +++ b/src/python_testing/TC_EWATERHTR_2_1.py @@ -19,18 +19,33 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x03 --application water-heater -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# --featureSet 0x03 +# --application water-heater +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_EWATERHTRBase import EWATERHTRBase diff --git a/src/python_testing/TC_EWATERHTR_2_2.py b/src/python_testing/TC_EWATERHTR_2_2.py index 49c0fdc2de..1bd7185b1f 100644 --- a/src/python_testing/TC_EWATERHTR_2_2.py +++ b/src/python_testing/TC_EWATERHTR_2_2.py @@ -19,12 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x00 --application water-heater -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# --featureSet 0x00 +# --application water-heater +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === @@ -32,7 +47,7 @@ import time import chip.clusters as Clusters -from matter_testing_support import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_EWATERHTRBase import EWATERHTRBase diff --git a/src/python_testing/TC_EWATERHTR_2_3.py b/src/python_testing/TC_EWATERHTR_2_3.py index f502dfac18..0f1c3deae6 100644 --- a/src/python_testing/TC_EWATERHTR_2_3.py +++ b/src/python_testing/TC_EWATERHTR_2_3.py @@ -18,19 +18,34 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x03 --application water-heater -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# --featureSet 0x03 +# --application water-heater +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters -from matter_testing_support import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_EWATERHTRBase import EWATERHTRBase diff --git a/src/python_testing/TC_FAN_3_1.py b/src/python_testing/TC_FAN_3_1.py index 9e4477e9a2..483be894ba 100644 --- a/src/python_testing/TC_FAN_3_1.py +++ b/src/python_testing/TC_FAN_3_1.py @@ -19,12 +19,19 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -32,7 +39,7 @@ import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts logger = logging.getLogger(__name__) diff --git a/src/python_testing/TC_FAN_3_2.py b/src/python_testing/TC_FAN_3_2.py index e38706313d..799510eeea 100644 --- a/src/python_testing/TC_FAN_3_2.py +++ b/src/python_testing/TC_FAN_3_2.py @@ -19,12 +19,19 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -32,7 +39,7 @@ import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts logger = logging.getLogger(__name__) diff --git a/src/python_testing/TC_FAN_3_3.py b/src/python_testing/TC_FAN_3_3.py index a70c457aed..7a4dde3f6c 100644 --- a/src/python_testing/TC_FAN_3_3.py +++ b/src/python_testing/TC_FAN_3_3.py @@ -19,19 +19,26 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts logger = logging.getLogger(__name__) diff --git a/src/python_testing/TC_FAN_3_4.py b/src/python_testing/TC_FAN_3_4.py index 95a2240c4e..989680ed6b 100644 --- a/src/python_testing/TC_FAN_3_4.py +++ b/src/python_testing/TC_FAN_3_4.py @@ -19,22 +19,29 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts -#import time +# import time logger = logging.getLogger(__name__) diff --git a/src/python_testing/TC_FAN_3_5.py b/src/python_testing/TC_FAN_3_5.py index a80e4b15aa..26dfc3e52f 100644 --- a/src/python_testing/TC_FAN_3_5.py +++ b/src/python_testing/TC_FAN_3_5.py @@ -19,12 +19,19 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -32,7 +39,7 @@ import chip.clusters as Clusters from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts logger = logging.getLogger(__name__) diff --git a/src/python_testing/TC_ICDM_2_1.py b/src/python_testing/TC_ICDM_2_1.py index 25b7897aba..8d7f6d5ed8 100644 --- a/src/python_testing/TC_ICDM_2_1.py +++ b/src/python_testing/TC_ICDM_2_1.py @@ -19,19 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${LIT_ICD_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${LIT_ICD_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import re import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts logger = logging.getLogger(__name__) diff --git a/src/python_testing/TC_ICDM_3_1.py b/src/python_testing/TC_ICDM_3_1.py index f6f094698c..58181a6588 100644 --- a/src/python_testing/TC_ICDM_3_1.py +++ b/src/python_testing/TC_ICDM_3_1.py @@ -20,12 +20,20 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${LIT_ICD_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${LIT_ICD_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -33,7 +41,7 @@ import chip.clusters as Clusters from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts logger = logging.getLogger(__name__) diff --git a/src/python_testing/TC_ICDM_3_2.py b/src/python_testing/TC_ICDM_3_2.py index 5a194420c3..d9800d65b7 100644 --- a/src/python_testing/TC_ICDM_3_2.py +++ b/src/python_testing/TC_ICDM_3_2.py @@ -20,12 +20,20 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${LIT_ICD_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${LIT_ICD_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -34,7 +42,7 @@ import chip.clusters as Clusters from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts logger = logging.getLogger(__name__) diff --git a/src/python_testing/TC_ICDM_3_3.py b/src/python_testing/TC_ICDM_3_3.py index cb8d1bd7bc..d261e53904 100644 --- a/src/python_testing/TC_ICDM_3_3.py +++ b/src/python_testing/TC_ICDM_3_3.py @@ -20,12 +20,20 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${LIT_ICD_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${LIT_ICD_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -33,7 +41,7 @@ import chip.clusters as Clusters from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts logger = logging.getLogger(__name__) diff --git a/src/python_testing/TC_ICDM_3_4.py b/src/python_testing/TC_ICDM_3_4.py index b8d0693acb..8ff2a57037 100644 --- a/src/python_testing/TC_ICDM_3_4.py +++ b/src/python_testing/TC_ICDM_3_4.py @@ -20,20 +20,28 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${LIT_ICD_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${LIT_ICD_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import time import chip.clusters as Clusters -from matter_testing_support import (MatterBaseTest, MatterStackState, MatterTestConfig, TestStep, async_test_body, - default_matter_test_main) +from chip.testing.matter_testing import (MatterBaseTest, MatterStackState, MatterTestConfig, TestStep, async_test_body, + default_matter_test_main) from mobly import asserts logger = logging.getLogger(__name__) diff --git a/src/python_testing/TC_ICDM_5_1.py b/src/python_testing/TC_ICDM_5_1.py index f9c081b6fe..dacfe58c8b 100644 --- a/src/python_testing/TC_ICDM_5_1.py +++ b/src/python_testing/TC_ICDM_5_1.py @@ -19,12 +19,20 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${LIT_ICD_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${LIT_ICD_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -32,7 +40,7 @@ import chip.clusters as Clusters from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mdns_discovery import mdns_discovery from mobly import asserts diff --git a/src/python_testing/TC_ICDManagementCluster.py b/src/python_testing/TC_ICDManagementCluster.py index 9f54e9b7dc..c0437cb809 100644 --- a/src/python_testing/TC_ICDManagementCluster.py +++ b/src/python_testing/TC_ICDManagementCluster.py @@ -18,19 +18,31 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${LIT_ICD_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${LIT_ICD_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import ctypes from enum import IntEnum import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts # Assumes `--enable-key 000102030405060708090a0b0c0d0e0f` on Linux app command line, or a DUT diff --git a/src/python_testing/TC_IDM_1_2.py b/src/python_testing/TC_IDM_1_2.py index d5985c8ae9..a1db9bac83 100644 --- a/src/python_testing/TC_IDM_1_2.py +++ b/src/python_testing/TC_IDM_1_2.py @@ -19,12 +19,19 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import inspect @@ -37,7 +44,7 @@ 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 chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main, type_matches from mobly import asserts diff --git a/src/python_testing/TC_IDM_1_4.py b/src/python_testing/TC_IDM_1_4.py index fcfb5915ed..74194135de 100644 --- a/src/python_testing/TC_IDM_1_4.py +++ b/src/python_testing/TC_IDM_1_4.py @@ -19,12 +19,24 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f -# test-runner-run/run1/script-args: --hex-arg PIXIT.DGGEN.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# script-args: > +# --hex-arg PIXIT.DGGEN.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -32,7 +44,7 @@ import chip.clusters as Clusters from chip.exceptions import ChipStackError from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches from mobly import asserts # If DUT supports `MaxPathsPerInvoke > 1`, additional command line argument diff --git a/src/python_testing/TC_IDM_4_2.py b/src/python_testing/TC_IDM_4_2.py index 8cd84011a4..0f4cd513e3 100644 --- a/src/python_testing/TC_IDM_4_2.py +++ b/src/python_testing/TC_IDM_4_2.py @@ -19,12 +19,19 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import copy @@ -37,7 +44,7 @@ from chip.clusters.Attribute import AttributePath, TypedAttributePath from chip.exceptions import ChipStackError from chip.interaction_model import Status -from matter_testing_support import AttributeChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import AttributeChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts ''' diff --git a/src/python_testing/TC_LVL_2_3.py b/src/python_testing/TC_LVL_2_3.py index dcb2e8d65d..d120bb7169 100644 --- a/src/python_testing/TC_LVL_2_3.py +++ b/src/python_testing/TC_LVL_2_3.py @@ -19,12 +19,21 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_MICROWAVE_OVEN_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_MICROWAVE_OVEN_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -32,8 +41,8 @@ import chip.clusters as Clusters import test_plan_support -from matter_testing_support import (ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, default_matter_test_main, - has_cluster, run_if_endpoint_matches) +from chip.testing.matter_testing import (ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, default_matter_test_main, + has_cluster, run_if_endpoint_matches) from mobly import asserts diff --git a/src/python_testing/TC_MCORE_FS_1_1.py b/src/python_testing/TC_MCORE_FS_1_1.py index 3bdee818de..780089b807 100755 --- a/src/python_testing/TC_MCORE_FS_1_1.py +++ b/src/python_testing/TC_MCORE_FS_1_1.py @@ -35,7 +35,7 @@ # --string-arg th_server_app_path:${ALL_CLUSTERS_APP} # --trace-to json:${TRACE_TEST_JSON}.json # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto -# factoryreset: true +# factory-reset: true # quiet: true # === END CI TEST ARGUMENTS === @@ -47,29 +47,11 @@ import chip.clusters as Clusters from chip import ChipDeviceCtrl -from chip.testing.tasks import Subprocess -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.apps import AppServerSubprocess +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts - -class AppServer(Subprocess): - """Wrapper class for starting an application server in a subprocess.""" - - # Prefix for log messages from the application server. - PREFIX = b"[SERVER]" - - def __init__(self, app: str, storage_dir: str, discriminator: int, passcode: int, port: int = 5540): - storage_kvs_dir = tempfile.mkstemp(dir=storage_dir, prefix="kvs-app-")[1] - # Start the server application with dedicated KVS storage. - super().__init__(app, "--KVS", storage_kvs_dir, - '--secured-device-port', str(port), - "--discriminator", str(discriminator), - "--passcode", str(passcode), - output_cb=lambda line, is_stderr: self.PREFIX + line) - - def start(self): - # Start process and block until it prints the expected output. - super().start(expected_output="Server initialization complete") +_DEVICE_TYPE_AGGREGATOR = 0x000E class TC_MCORE_FS_1_1(MatterBaseTest): @@ -95,14 +77,16 @@ async def setup_class(self): self.th_server_discriminator = random.randint(0, 4095) self.th_server_passcode = 20202021 - # Start the TH_SERVER_NO_UID app. - self.th_server = AppServer( + # Start the TH_SERVER app. + self.th_server = AppServerSubprocess( th_server_app, storage_dir=self.storage.name, port=self.th_server_port, discriminator=self.th_server_discriminator, passcode=self.th_server_passcode) - self.th_server.start() + self.th_server.start( + expected_output="Server initialization complete", + timeout=30) logging.info("Commissioning from separate fabric") # Create a second controller on a new fabric to communicate to the server @@ -142,8 +126,34 @@ def default_timeout(self) -> int: @async_test_body async def test_TC_MCORE_FS_1_1(self): - # TODO this value should either be determined or passed in from command line dut_commissioning_control_endpoint = 0 + + # Get the list of endpoints on the DUT_FSA_BRIDGE before adding the TH_SERVER_NO_UID. + dut_fsa_bridge_endpoints = set(await self.read_single_attribute_check_success( + cluster=Clusters.Descriptor, + attribute=Clusters.Descriptor.Attributes.PartsList, + node_id=self.dut_node_id, + endpoint=0, + )) + + # Iterate through the endpoints on the DUT_FSA_BRIDGE + for endpoint in dut_fsa_bridge_endpoints: + # Read the DeviceTypeList attribute for the current endpoint + device_type_list = await self.read_single_attribute_check_success( + cluster=Clusters.Descriptor, + attribute=Clusters.Descriptor.Attributes.DeviceTypeList, + node_id=self.dut_node_id, + endpoint=endpoint + ) + + # Check if any of the device types is an AGGREGATOR + if any(device_type.deviceType == _DEVICE_TYPE_AGGREGATOR for device_type in device_type_list): + dut_commissioning_control_endpoint = endpoint + logging.info(f"Aggregator endpoint found: {dut_commissioning_control_endpoint}") + break + + asserts.assert_not_equal(dut_commissioning_control_endpoint, 0, "Invalid aggregator endpoint. Cannot proceed with test.") + self.step(1) self.step(2) self.step(3) @@ -189,14 +199,24 @@ async def test_TC_MCORE_FS_1_1(self): await self.send_single_cmd(cmd, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, timedRequestTimeoutMs=5000) self.step("3c") - if not self.is_pics_sdk_ci_only: - time.sleep(30) - - th_fsa_server_fabrics_new = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.Fabrics, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, fabric_filtered=False) - # TODO: this should be mocked too. - if not self.is_pics_sdk_ci_only: - asserts.assert_equal(len(th_fsa_server_fabrics) + 1, len(th_fsa_server_fabrics_new), - "Unexpected number of fabrics on TH_SERVER") + max_wait_time_sec = 30 + start_time = time.time() + elapsed = 0 + time_remaining = max_wait_time_sec + previous_number_th_server_fabrics = len(th_fsa_server_fabrics) + + th_fsa_server_fabrics_new = None + while time_remaining > 0: + time.sleep(2) + th_fsa_server_fabrics_new = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.Fabrics, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, fabric_filtered=False) + if previous_number_th_server_fabrics != len(th_fsa_server_fabrics_new): + break + elapsed = time.time() - start_time + time_remaining = max_wait_time_sec - elapsed + + asserts.assert_not_equal(th_fsa_server_fabrics_new, None, "Failed to read Fabrics attribute") + asserts.assert_equal(previous_number_th_server_fabrics + 1, len(th_fsa_server_fabrics_new), + "Unexpected number of fabrics on TH_SERVER") if __name__ == "__main__": diff --git a/src/python_testing/TC_MCORE_FS_1_2.py b/src/python_testing/TC_MCORE_FS_1_2.py index e1698413fa..f806db4d09 100644 --- a/src/python_testing/TC_MCORE_FS_1_2.py +++ b/src/python_testing/TC_MCORE_FS_1_2.py @@ -33,7 +33,7 @@ # --string-arg th_server_app_path:${ALL_CLUSTERS_APP} dut_fsa_stdin_pipe:dut-fsa-stdin # --trace-to json:${TRACE_TEST_JSON}.json # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto -# factoryreset: true +# factory-reset: true # quiet: true # === END CI TEST ARGUMENTS === @@ -50,10 +50,10 @@ import chip.clusters as Clusters from chip import ChipDeviceCtrl +from chip.testing.apps import AppServerSubprocess +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches from ecdsa.curves import NIST256p -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches from mobly import asserts -from TC_MCORE_FS_1_1 import AppServer from TC_SC_3_6 import AttributeChangeAccumulator # Length of `w0s` and `w1s` elements @@ -97,9 +97,11 @@ async def setup_class(self): self.storage = tempfile.TemporaryDirectory(prefix=self.__class__.__name__) logging.info("Temporary storage directory: %s", self.storage.name) - # Get the named pipe path for the DUT_FSA app input from the user params. - dut_fsa_stdin_pipe = self.user_params.get("dut_fsa_stdin_pipe", None) - if dut_fsa_stdin_pipe is not None: + if self.is_pics_sdk_ci_only: + # Get the named pipe path for the DUT_FSA app input from the user params. + dut_fsa_stdin_pipe = self.user_params.get("dut_fsa_stdin_pipe") + if not dut_fsa_stdin_pipe: + asserts.fail("CI setup requires --string-arg dut_fsa_stdin_pipe:") self.dut_fsa_stdin = open(dut_fsa_stdin_pipe, "w") self.th_server_port = th_server_port @@ -110,14 +112,16 @@ async def setup_class(self): discriminator=3840, passcode=20202021) - # Start the TH_SERVER_NO_UID app. - self.th_server = AppServer( + # Start the TH_SERVER app. + self.th_server = AppServerSubprocess( th_server_app, storage_dir=self.storage.name, port=self.th_server_port, discriminator=self.th_server_setup_params.discriminator, passcode=self.th_server_setup_params.passcode) - self.th_server.start() + self.th_server.start( + expected_output="Server initialization complete", + timeout=30) def teardown_class(self): if self._partslist_subscription is not None: @@ -135,7 +139,7 @@ def _ask_for_vendor_commissioning_ux_operation(self, setup_params: _SetupParamet f"- discriminator: {setup_params.discriminator}\n" f"- setupPinCode: {setup_params.passcode}\n" f"- setupQRCode: {setup_params.setup_qr_code}\n" - f"- setupManualcode: {setup_params.manual_code}\n" + f"- setupManualCode: {setup_params.manual_code}\n" f"If using FabricSync Admin test app, you may type:\n" f">>> pairing onnetwork 111 {setup_params.passcode}") diff --git a/src/python_testing/TC_MCORE_FS_1_3.py b/src/python_testing/TC_MCORE_FS_1_3.py index 49dc89386c..2ac1556199 100644 --- a/src/python_testing/TC_MCORE_FS_1_3.py +++ b/src/python_testing/TC_MCORE_FS_1_3.py @@ -37,7 +37,7 @@ # --string-arg th_server_no_uid_app_path:${LIGHTING_APP_NO_UNIQUE_ID} # --trace-to json:${TRACE_TEST_JSON}.json # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto -# factoryreset: true +# factory-reset: true # quiet: true # === END CI TEST ARGUMENTS === @@ -50,9 +50,11 @@ import chip.clusters as Clusters from chip import ChipDeviceCtrl from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches +from chip.testing.apps import AppServerSubprocess +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches from mobly import asserts -from TC_MCORE_FS_1_1 import AppServer + +_DEVICE_TYPE_AGGREGATOR = 0x000E class TC_MCORE_FS_1_3(MatterBaseTest): @@ -84,13 +86,15 @@ def setup_class(self): self.th_server_passcode = 20202021 # Start the TH_SERVER_NO_UID app. - self.th_server = AppServer( + self.th_server = AppServerSubprocess( th_server_app, storage_dir=self.storage.name, port=self.th_server_port, discriminator=self.th_server_discriminator, passcode=self.th_server_passcode) - self.th_server.start() + self.th_server.start( + expected_output="Server initialization complete", + timeout=30) def teardown_class(self): if self.th_server is not None: @@ -107,7 +111,7 @@ def steps_TC_MCORE_FS_1_3(self) -> list[TestStep]: "TH verifies a value is visible for the UniqueID from the DUT_FSA's Bridged Device Basic Information Cluster."), ] - async def commission_via_commissioner_control(self, controller_node_id: int, device_node_id: int): + async def commission_via_commissioner_control(self, controller_node_id: int, device_node_id: int, endpoint_id: int): """Commission device_node_id to controller_node_id using CommissionerControl cluster.""" request_id = random.randint(0, 0xFFFFFFFFFFFFFFFF) @@ -126,6 +130,7 @@ async def commission_via_commissioner_control(self, controller_node_id: int, dev await self.send_single_cmd( node_id=controller_node_id, + endpoint=endpoint_id, cmd=Clusters.CommissionerControl.Commands.RequestCommissioningApproval( requestID=request_id, vendorID=vendor_id, @@ -138,6 +143,7 @@ async def commission_via_commissioner_control(self, controller_node_id: int, dev resp = await self.send_single_cmd( node_id=controller_node_id, + endpoint=endpoint_id, cmd=Clusters.CommissionerControl.Commands.CommissionNode( requestID=request_id, responseTimeoutSeconds=30, @@ -192,9 +198,30 @@ async def test_TC_MCORE_FS_1_3(self): endpoint=0, )) + aggregator_endpoint = 0 + + # Iterate through the endpoints on the DUT_FSA_BRIDGE + for endpoint in dut_fsa_bridge_endpoints: + # Read the DeviceTypeList attribute for the current endpoint + device_type_list = await self.read_single_attribute_check_success( + cluster=Clusters.Descriptor, + attribute=Clusters.Descriptor.Attributes.DeviceTypeList, + node_id=self.dut_node_id, + endpoint=endpoint + ) + + # Check if any of the device types is an AGGREGATOR + if any(device_type.deviceType == _DEVICE_TYPE_AGGREGATOR for device_type in device_type_list): + aggregator_endpoint = endpoint + logging.info(f"Aggregator endpoint found: {aggregator_endpoint}") + break + + asserts.assert_not_equal(aggregator_endpoint, 0, "Invalid aggregator endpoint. Cannot proceed with commissioning.") + await self.commission_via_commissioner_control( controller_node_id=self.dut_node_id, - device_node_id=th_server_th_node_id) + device_node_id=th_server_th_node_id, + endpoint_id=aggregator_endpoint) # Wait for the device to appear on the DUT_FSA_BRIDGE. await asyncio.sleep(2 if self.is_pics_sdk_ci_only else 30) diff --git a/src/python_testing/TC_MCORE_FS_1_4.py b/src/python_testing/TC_MCORE_FS_1_4.py index c365b4e9b9..c8f3e764d5 100644 --- a/src/python_testing/TC_MCORE_FS_1_4.py +++ b/src/python_testing/TC_MCORE_FS_1_4.py @@ -36,7 +36,7 @@ # --string-arg th_fsa_app_path:examples/fabric-admin/scripts/fabric-sync-app.py th_fsa_admin_path:${FABRIC_ADMIN_APP} th_fsa_bridge_path:${FABRIC_BRIDGE_APP} th_server_no_uid_app_path:${LIGHTING_APP_NO_UNIQUE_ID} dut_fsa_stdin_pipe:dut-fsa-stdin # --trace-to json:${TRACE_TEST_JSON}.json # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto -# factoryreset: true +# factory-reset: true # quiet: true # === END CI TEST ARGUMENTS === @@ -49,10 +49,10 @@ import chip.clusters as Clusters from chip import ChipDeviceCtrl from chip.interaction_model import Status +from chip.testing.apps import AppServerSubprocess +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches from chip.testing.tasks import Subprocess -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches from mobly import asserts -from TC_MCORE_FS_1_1 import AppServer class FabricSyncApp(Subprocess): @@ -94,9 +94,7 @@ def start(self): super().start(expected_output="Successfully opened pairing window on the device") def commission_on_network(self, node_id: int, setup_pin_code: int, filter_type=None, filter=None): - self.send( - f"pairing onnetwork {node_id} {setup_pin_code}", - expected_output=f"Commissioning complete for node ID {node_id:#018x}: success") + self.send(f"pairing onnetwork {node_id} {setup_pin_code}") class TC_MCORE_FS_1_4(MatterBaseTest): @@ -160,9 +158,11 @@ def setup_class(self): vendor_id=0xFFF1) self.th_fsa_controller.start() - # Get the named pipe path for the DUT_FSA app input from the user params. - dut_fsa_stdin_pipe = self.user_params.get("dut_fsa_stdin_pipe", None) - if dut_fsa_stdin_pipe is not None: + if self.is_pics_sdk_ci_only: + # Get the named pipe path for the DUT_FSA app input from the user params. + dut_fsa_stdin_pipe = self.user_params.get("dut_fsa_stdin_pipe") + if not dut_fsa_stdin_pipe: + asserts.fail("CI setup requires --string-arg dut_fsa_stdin_pipe:") self.dut_fsa_stdin = open(dut_fsa_stdin_pipe, "w") self.th_server_port = 5544 @@ -170,13 +170,15 @@ def setup_class(self): self.th_server_passcode = 20202022 # Start the TH_SERVER_NO_UID app. - self.th_server = AppServer( + self.th_server = AppServerSubprocess( th_server_app, storage_dir=self.storage.name, port=self.th_server_port, discriminator=self.th_server_discriminator, passcode=self.th_server_passcode) - self.th_server.start() + self.th_server.start( + expected_output="Server initialization complete", + timeout=30) def teardown_class(self): if self.th_fsa_controller is not None: @@ -262,16 +264,19 @@ async def test_TC_MCORE_FS_1_4(self): filter=discriminator, ) - # Wait some time, so the dynamic endpoint will appear on the TH_FSA_BRIDGE. - await asyncio.sleep(5) - - # Get the list of endpoints on the TH_FSA_BRIDGE after adding the TH_SERVER_NO_UID. - th_fsa_bridge_endpoints_new = set(await self.read_single_attribute_check_success( - cluster=Clusters.Descriptor, - attribute=Clusters.Descriptor.Attributes.PartsList, - node_id=th_fsa_bridge_th_node_id, - endpoint=0, - )) + get_dynamic_endpoint_retries = 60 + th_fsa_bridge_endpoints_new = set(th_fsa_bridge_endpoints) + # Try to get the dynamic endpoint number for the TH_SERVER_NO_UID on the TH_FSA_BRIDGE. + while th_fsa_bridge_endpoints_new == th_fsa_bridge_endpoints and get_dynamic_endpoint_retries > 0: + await asyncio.sleep(0.5) + get_dynamic_endpoint_retries -= 1 + # Get the list of endpoints on the TH_FSA_BRIDGE. + th_fsa_bridge_endpoints_new.update(await self.read_single_attribute_check_success( + cluster=Clusters.Descriptor, + attribute=Clusters.Descriptor.Attributes.PartsList, + node_id=th_fsa_bridge_th_node_id, + endpoint=0, + )) # Get the endpoint number for just added TH_SERVER_NO_UID. logging.info("Endpoints on TH_FSA_BRIDGE: old=%s, new=%s", th_fsa_bridge_endpoints, th_fsa_bridge_endpoints_new) diff --git a/src/python_testing/TC_MCORE_FS_1_5.py b/src/python_testing/TC_MCORE_FS_1_5.py index d13d81ac84..59549fd0bc 100755 --- a/src/python_testing/TC_MCORE_FS_1_5.py +++ b/src/python_testing/TC_MCORE_FS_1_5.py @@ -33,7 +33,7 @@ # --string-arg th_server_app_path:${ALL_CLUSTERS_APP} dut_fsa_stdin_pipe:dut-fsa-stdin # --trace-to json:${TRACE_TEST_JSON}.json # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto -# factoryreset: true +# factory-reset: true # quiet: true # === END CI TEST ARGUMENTS === @@ -50,10 +50,10 @@ import chip.clusters as Clusters from chip import ChipDeviceCtrl +from chip.testing.apps import AppServerSubprocess +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches from ecdsa.curves import NIST256p -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches from mobly import asserts -from TC_MCORE_FS_1_1 import AppServer from TC_SC_3_6 import AttributeChangeAccumulator # Length of `w0s` and `w1s` elements @@ -98,9 +98,11 @@ async def setup_class(self): self.storage = tempfile.TemporaryDirectory(prefix=self.__class__.__name__) logging.info("Temporary storage directory: %s", self.storage.name) - # Get the named pipe path for the DUT_FSA app input from the user params. - dut_fsa_stdin_pipe = self.user_params.get("dut_fsa_stdin_pipe", None) - if dut_fsa_stdin_pipe is not None: + if self.is_pics_sdk_ci_only: + # Get the named pipe path for the DUT_FSA app input from the user params. + dut_fsa_stdin_pipe = self.user_params.get("dut_fsa_stdin_pipe") + if not dut_fsa_stdin_pipe: + asserts.fail("CI setup requires --string-arg dut_fsa_stdin_pipe:") self.dut_fsa_stdin = open(dut_fsa_stdin_pipe, "w") self.th_server_port = th_server_port @@ -111,14 +113,16 @@ async def setup_class(self): discriminator=3840, passcode=20202021) - # Start the TH_SERVER_NO_UID app. - self.th_server = AppServer( + # Start the TH_SERVER app. + self.th_server = AppServerSubprocess( th_server_app, storage_dir=self.storage.name, port=self.th_server_port, discriminator=self.th_server_setup_params.discriminator, passcode=self.th_server_setup_params.passcode) - self.th_server.start() + self.th_server.start( + expected_output="Server initialization complete", + timeout=30) def teardown_class(self): if self._partslist_subscription is not None: @@ -139,7 +143,7 @@ def _ask_for_vendor_commissioning_ux_operation(self, setup_params: _SetupParamet f"- discriminator: {setup_params.discriminator}\n" f"- setupPinCode: {setup_params.passcode}\n" f"- setupQRCode: {setup_params.setup_qr_code}\n" - f"- setupManualcode: {setup_params.manual_code}\n" + f"- setupManualCode: {setup_params.manual_code}\n" f"If using FabricSync Admin test app, you may type:\n" f">>> pairing onnetwork 111 {setup_params.passcode}") diff --git a/src/python_testing/TC_MWOCTRL_2_1.py b/src/python_testing/TC_MWOCTRL_2_1.py index 0de3bee72e..6f913578cb 100644 --- a/src/python_testing/TC_MWOCTRL_2_1.py +++ b/src/python_testing/TC_MWOCTRL_2_1.py @@ -19,17 +19,25 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_MICROWAVE_OVEN_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_MICROWAVE_OVEN_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import chip.clusters as Clusters from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts # This test requires several additional command line arguments diff --git a/src/python_testing/TC_MWOCTRL_2_2.py b/src/python_testing/TC_MWOCTRL_2_2.py index 0edc2ac661..4559689640 100644 --- a/src/python_testing/TC_MWOCTRL_2_2.py +++ b/src/python_testing/TC_MWOCTRL_2_2.py @@ -19,19 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_MICROWAVE_OVEN_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_MICROWAVE_OVEN_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts # This test requires several additional command line arguments diff --git a/src/python_testing/TC_MWOCTRL_2_4.py b/src/python_testing/TC_MWOCTRL_2_4.py index fce17c4175..e05c4a5bd5 100644 --- a/src/python_testing/TC_MWOCTRL_2_4.py +++ b/src/python_testing/TC_MWOCTRL_2_4.py @@ -19,19 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_MICROWAVE_OVEN_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_MICROWAVE_OVEN_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts # This test requires several additional command line arguments diff --git a/src/python_testing/TC_MWOM_1_2.py b/src/python_testing/TC_MWOM_1_2.py index 7d29c3f43e..5cad6ce013 100644 --- a/src/python_testing/TC_MWOM_1_2.py +++ b/src/python_testing/TC_MWOM_1_2.py @@ -19,18 +19,25 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_MICROWAVE_OVEN_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_MICROWAVE_OVEN_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_OCC_2_1.py b/src/python_testing/TC_OCC_2_1.py index 6d135395d4..d831d486d2 100644 --- a/src/python_testing/TC_OCC_2_1.py +++ b/src/python_testing/TC_OCC_2_1.py @@ -23,18 +23,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --endpoint 1 +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# --endpoint 1 +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_OCC_2_2.py b/src/python_testing/TC_OCC_2_2.py index 9914452342..afa2e3cd61 100644 --- a/src/python_testing/TC_OCC_2_2.py +++ b/src/python_testing/TC_OCC_2_2.py @@ -19,16 +19,25 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --endpoint 1 +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# --endpoint 1 +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_OCC_2_3.py b/src/python_testing/TC_OCC_2_3.py index 384f5bf63f..8d4b53f429 100644 --- a/src/python_testing/TC_OCC_2_3.py +++ b/src/python_testing/TC_OCC_2_3.py @@ -15,12 +15,21 @@ # limitations under the License. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --endpoint 1 --bool-arg simulate_occupancy:true +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# --endpoint 1 +# --bool-arg simulate_occupancy:true +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === # There are CI issues to be followed up for the test cases below that implements manually controlling sensor device for # the occupancy state ON/OFF change. @@ -30,7 +39,7 @@ import logging import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_OCC_3_1.py b/src/python_testing/TC_OCC_3_1.py index cfec9a8653..cce0a2f697 100644 --- a/src/python_testing/TC_OCC_3_1.py +++ b/src/python_testing/TC_OCC_3_1.py @@ -1,203 +1,213 @@ -# -# Copyright (c) 2024 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. -# -# === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --endpoint 1 --bool-arg simulate_occupancy:true -# === END CI TEST ARGUMENTS === -# There are CI issues to be followed up for the test cases below that implements manually controlling sensor device for -# the occupancy state ON/OFF change. -# [TC-OCC-3.1] test procedure step 3, 4 -# [TC-OCC-3.2] test precedure step 3a, 3c - -import logging -import time -from typing import Any, Optional - -import chip.clusters as Clusters -from chip.interaction_model import Status -from matter_testing_support import (ClusterAttributeChangeAccumulator, EventChangeCallback, MatterBaseTest, TestStep, - async_test_body, await_sequence_of_reports, default_matter_test_main) -from mobly import asserts - - -class TC_OCC_3_1(MatterBaseTest): - def setup_test(self): - super().setup_test() - self.is_ci = self.matter_test_config.global_test_params.get('simulate_occupancy', False) - - async def read_occ_attribute_expect_success(self, attribute): - cluster = Clusters.Objects.OccupancySensing - endpoint = self.matter_test_config.endpoint - return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) - - async def write_hold_time(self, hold_time: Optional[Any]) -> Status: - dev_ctrl = self.default_controller - node_id = self.dut_node_id - endpoint = self.matter_test_config.endpoint - - cluster = Clusters.OccupancySensing - write_result = await dev_ctrl.WriteAttribute(node_id, [(endpoint, cluster.Attributes.HoldTime(hold_time))]) - return write_result[0].Status - - def desc_TC_OCC_3_1(self) -> str: - return "[TC-OCC-3.1] Primary functionality with server as DUT" - - def steps_TC_OCC_3_1(self) -> list[TestStep]: - steps = [ - TestStep(1, "Commission DUT to TH.", is_commissioning=True), - TestStep(2, "If HoldTime is supported, TH writes HoldTime attribute to 10 sec on DUT."), - TestStep(3, "Prompt operator to await until DUT occupancy changes to unoccupied state."), - TestStep(4, "TH subscribes to Occupancy sensor attributes and events."), - TestStep("5a", "Prompt operator to trigger occupancy change."), - TestStep("5b", "TH reads Occupancy attribute from DUT. Verify occupancy changed to occupied and Occupancy attribute was reported as occupied."), - TestStep("5c", "If supported, verify OccupancyChangedEvent was reported as occupied."), - TestStep(6, "If HoldTime is supported, wait for HoldTime, otherwise prompt operator to wait until no longer occupied."), - TestStep("7a", "TH reads Occupancy attribute from DUT. Verify occupancy changed to unoccupied and Occupancy attribute was reported as unoccupied."), - TestStep("7b", "If supported, verify OccupancyChangedEvent was reported as unoccupied."), - ] - return steps - - def pics_TC_OCC_3_1(self) -> list[str]: - pics = [ - "OCC.S", - ] - return pics - - # Sends and out-of-band command to the all-clusters-app - def write_to_app_pipe(self, command): - # CI app pipe id creation - self.app_pipe = "/tmp/chip_all_clusters_fifo_" - if self.is_ci: - app_pid = self.matter_test_config.app_pid - if app_pid == 0: - asserts.fail("The --app-pid flag must be set when using named pipe") - self.app_pipe = self.app_pipe + str(app_pid) - - with open(self.app_pipe, "w") as app_pipe: - app_pipe.write(command + "\n") - # Delay for pipe command to be processed (otherwise tests are flaky) - time.sleep(0.001) - - @async_test_body - async def test_TC_OCC_3_1(self): - hold_time = 10 if not self.is_ci else 1.0 # 10 seconds for occupancy state hold time - - self.step(1) # Commissioning already done - - self.step(2) - - cluster = Clusters.OccupancySensing - attributes = cluster.Attributes - attribute_list = await self.read_occ_attribute_expect_success(attribute=attributes.AttributeList) - - has_hold_time = attributes.HoldTime.attribute_id in attribute_list - occupancy_event_supported = self.check_pics("OCC.M.OccupancyChange") or self.is_ci - - if has_hold_time: - # write HoldTimeLimits HoldtimeMin to be 10 sec. - await self.write_single_attribute(cluster.Attributes.HoldTime(hold_time)) - holdtime_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTime) - asserts.assert_equal(holdtime_dut, hold_time, "Hold time read-back does not match hold time written") - else: - logging.info("No HoldTime attribute supports. Will test only occupancy attribute triggering functionality only.") - - self.step(3) - - if self.is_ci: - # CI call to trigger unoccupied. - self.write_to_app_pipe('{"Name":"SetOccupancy", "EndpointId": 1, "Occupancy": 0}') - else: - self.wait_for_user_input( - prompt_msg="Type any letter and press ENTER after the sensor occupancy is unoccupied state (occupancy attribute = 0)") - - # check sensor occupancy state is 0 for the next test step - occupancy_dut = await self.read_occ_attribute_expect_success(attribute=attributes.Occupancy) - asserts.assert_equal(occupancy_dut, 0, "Occupancy attribute is not unoccupied.") - - self.step(4) - # Setup Occupancy attribute subscription here - endpoint_id = self.matter_test_config.endpoint - node_id = self.dut_node_id - dev_ctrl = self.default_controller - attrib_listener = ClusterAttributeChangeAccumulator(cluster) - await attrib_listener.start(dev_ctrl, node_id, endpoint=endpoint_id, min_interval_sec=0, max_interval_sec=30) - - if occupancy_event_supported: - event_listener = EventChangeCallback(cluster) - await event_listener.start(dev_ctrl, node_id, endpoint=endpoint_id, min_interval_sec=0, max_interval_sec=30) - - self.step("5a") - # CI call to trigger on - if self.is_ci: - self.write_to_app_pipe('{"Name":"SetOccupancy", "EndpointId": 1, "Occupancy": 1}') - else: - # Trigger occupancy sensor to change Occupancy attribute value to 1 => TESTER ACTION on DUT - self.wait_for_user_input(prompt_msg="Type any letter and press ENTER after a sensor occupancy is triggered.") - - # And then check if Occupancy attribute has changed. - self.step("5b") - occupancy_dut = await self.read_occ_attribute_expect_success(attribute=attributes.Occupancy) - asserts.assert_equal(occupancy_dut, 1, "Occupancy state is not changed to 1") - - # subscription verification - post_prompt_settle_delay_seconds = 1.0 if self.is_ci else 10.0 - await_sequence_of_reports(report_queue=attrib_listener.attribute_queue, endpoint_id=endpoint_id, attribute=cluster.Attributes.Occupancy, sequence=[ - 1], timeout_sec=post_prompt_settle_delay_seconds) - - if occupancy_event_supported: - self.step("5c") - event = event_listener.wait_for_event_report( - cluster.Events.OccupancyChanged, timeout_sec=post_prompt_settle_delay_seconds) - asserts.assert_equal(event.occupancy, 1, "Unexpected occupancy on OccupancyChanged") - else: - self.skip_step("5c") - - self.step(6) - if self.is_ci: - # CI call to trigger unoccupied. - self.write_to_app_pipe('{"Name":"SetOccupancy", "EndpointId": 1, "Occupancy": 0}') - - if has_hold_time: - time.sleep(hold_time + 2.0) # add some extra 2 seconds to ensure hold time has passed. - else: - self.wait_for_user_input( - prompt_msg="Type any letter and press ENTER after the sensor occupancy is back to unoccupied state (occupancy attribute = 0)") - - # Check if Occupancy attribute is back to 0 after HoldTime attribute period - # Tester should not be triggering the sensor for this test step. - self.step("7a") - occupancy_dut = await self.read_occ_attribute_expect_success(attribute=attributes.Occupancy) - asserts.assert_equal(occupancy_dut, 0, "Occupancy state is not back to 0 after HoldTime period") - - await_sequence_of_reports(report_queue=attrib_listener.attribute_queue, endpoint_id=endpoint_id, attribute=cluster.Attributes.Occupancy, sequence=[ - 0], timeout_sec=post_prompt_settle_delay_seconds) - - if occupancy_event_supported: - self.step("7b") - event = event_listener.wait_for_event_report( - cluster.Events.OccupancyChanged, timeout_sec=post_prompt_settle_delay_seconds) - asserts.assert_equal(event.occupancy, 0, "Unexpected occupancy on OccupancyChanged") - else: - self.skip_step("7b") - - -if __name__ == "__main__": - default_matter_test_main() +# +# Copyright (c) 2024 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. +# +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# --endpoint 1 +# --bool-arg simulate_occupancy:true +# factory-reset: true +# quiet: true +# === END CI TEST ARGUMENTS === +# +# There are CI issues to be followed up for the test cases below that implements manually controlling sensor device for +# the occupancy state ON/OFF change. +# [TC-OCC-3.1] test procedure step 3, 4 +# [TC-OCC-3.2] test precedure step 3a, 3c + +import logging +import time +from typing import Any, Optional + +import chip.clusters as Clusters +from chip.interaction_model import Status +from chip.testing.matter_testing import (ClusterAttributeChangeAccumulator, EventChangeCallback, MatterBaseTest, TestStep, + async_test_body, await_sequence_of_reports, default_matter_test_main) +from mobly import asserts + + +class TC_OCC_3_1(MatterBaseTest): + def setup_test(self): + super().setup_test() + self.is_ci = self.matter_test_config.global_test_params.get('simulate_occupancy', False) + + async def read_occ_attribute_expect_success(self, attribute): + cluster = Clusters.Objects.OccupancySensing + endpoint = self.matter_test_config.endpoint + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + async def write_hold_time(self, hold_time: Optional[Any]) -> Status: + dev_ctrl = self.default_controller + node_id = self.dut_node_id + endpoint = self.matter_test_config.endpoint + + cluster = Clusters.OccupancySensing + write_result = await dev_ctrl.WriteAttribute(node_id, [(endpoint, cluster.Attributes.HoldTime(hold_time))]) + return write_result[0].Status + + def desc_TC_OCC_3_1(self) -> str: + return "[TC-OCC-3.1] Primary functionality with server as DUT" + + def steps_TC_OCC_3_1(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commission DUT to TH.", is_commissioning=True), + TestStep(2, "If HoldTime is supported, TH writes HoldTime attribute to 10 sec on DUT."), + TestStep(3, "Prompt operator to await until DUT occupancy changes to unoccupied state."), + TestStep(4, "TH subscribes to Occupancy sensor attributes and events."), + TestStep("5a", "Prompt operator to trigger occupancy change."), + TestStep("5b", "TH reads Occupancy attribute from DUT. Verify occupancy changed to occupied and Occupancy attribute was reported as occupied."), + TestStep("5c", "If supported, verify OccupancyChangedEvent was reported as occupied."), + TestStep(6, "If HoldTime is supported, wait for HoldTime, otherwise prompt operator to wait until no longer occupied."), + TestStep("7a", "TH reads Occupancy attribute from DUT. Verify occupancy changed to unoccupied and Occupancy attribute was reported as unoccupied."), + TestStep("7b", "If supported, verify OccupancyChangedEvent was reported as unoccupied."), + ] + return steps + + def pics_TC_OCC_3_1(self) -> list[str]: + pics = [ + "OCC.S", + ] + return pics + + # Sends and out-of-band command to the all-clusters-app + def write_to_app_pipe(self, command): + # CI app pipe id creation + self.app_pipe = "/tmp/chip_all_clusters_fifo_" + if self.is_ci: + app_pid = self.matter_test_config.app_pid + if app_pid == 0: + asserts.fail("The --app-pid flag must be set when using named pipe") + self.app_pipe = self.app_pipe + str(app_pid) + + with open(self.app_pipe, "w") as app_pipe: + app_pipe.write(command + "\n") + # Delay for pipe command to be processed (otherwise tests are flaky) + time.sleep(0.001) + + @async_test_body + async def test_TC_OCC_3_1(self): + hold_time = 10 if not self.is_ci else 1.0 # 10 seconds for occupancy state hold time + + self.step(1) # Commissioning already done + + self.step(2) + + cluster = Clusters.OccupancySensing + attributes = cluster.Attributes + attribute_list = await self.read_occ_attribute_expect_success(attribute=attributes.AttributeList) + + has_hold_time = attributes.HoldTime.attribute_id in attribute_list + occupancy_event_supported = self.check_pics("OCC.M.OccupancyChange") or self.is_ci + + if has_hold_time: + # write HoldTimeLimits HoldtimeMin to be 10 sec. + await self.write_single_attribute(cluster.Attributes.HoldTime(hold_time)) + holdtime_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTime) + asserts.assert_equal(holdtime_dut, hold_time, "Hold time read-back does not match hold time written") + else: + logging.info("No HoldTime attribute supports. Will test only occupancy attribute triggering functionality only.") + + self.step(3) + + if self.is_ci: + # CI call to trigger unoccupied. + self.write_to_app_pipe('{"Name":"SetOccupancy", "EndpointId": 1, "Occupancy": 0}') + else: + self.wait_for_user_input( + prompt_msg="Type any letter and press ENTER after the sensor occupancy is unoccupied state (occupancy attribute = 0)") + + # check sensor occupancy state is 0 for the next test step + occupancy_dut = await self.read_occ_attribute_expect_success(attribute=attributes.Occupancy) + asserts.assert_equal(occupancy_dut, 0, "Occupancy attribute is not unoccupied.") + + self.step(4) + # Setup Occupancy attribute subscription here + endpoint_id = self.matter_test_config.endpoint + node_id = self.dut_node_id + dev_ctrl = self.default_controller + attrib_listener = ClusterAttributeChangeAccumulator(cluster) + await attrib_listener.start(dev_ctrl, node_id, endpoint=endpoint_id, min_interval_sec=0, max_interval_sec=30) + + if occupancy_event_supported: + event_listener = EventChangeCallback(cluster) + await event_listener.start(dev_ctrl, node_id, endpoint=endpoint_id, min_interval_sec=0, max_interval_sec=30) + + self.step("5a") + # CI call to trigger on + if self.is_ci: + self.write_to_app_pipe('{"Name":"SetOccupancy", "EndpointId": 1, "Occupancy": 1}') + else: + # Trigger occupancy sensor to change Occupancy attribute value to 1 => TESTER ACTION on DUT + self.wait_for_user_input(prompt_msg="Type any letter and press ENTER after a sensor occupancy is triggered.") + + # And then check if Occupancy attribute has changed. + self.step("5b") + occupancy_dut = await self.read_occ_attribute_expect_success(attribute=attributes.Occupancy) + asserts.assert_equal(occupancy_dut, 1, "Occupancy state is not changed to 1") + + # subscription verification + post_prompt_settle_delay_seconds = 1.0 if self.is_ci else 10.0 + await_sequence_of_reports(report_queue=attrib_listener.attribute_queue, endpoint_id=endpoint_id, attribute=cluster.Attributes.Occupancy, sequence=[ + 1], timeout_sec=post_prompt_settle_delay_seconds) + + if occupancy_event_supported: + self.step("5c") + event = event_listener.wait_for_event_report( + cluster.Events.OccupancyChanged, timeout_sec=post_prompt_settle_delay_seconds) + asserts.assert_equal(event.occupancy, 1, "Unexpected occupancy on OccupancyChanged") + else: + self.skip_step("5c") + + self.step(6) + if self.is_ci: + # CI call to trigger unoccupied. + self.write_to_app_pipe('{"Name":"SetOccupancy", "EndpointId": 1, "Occupancy": 0}') + + if has_hold_time: + time.sleep(hold_time + 2.0) # add some extra 2 seconds to ensure hold time has passed. + else: + self.wait_for_user_input( + prompt_msg="Type any letter and press ENTER after the sensor occupancy is back to unoccupied state (occupancy attribute = 0)") + + # Check if Occupancy attribute is back to 0 after HoldTime attribute period + # Tester should not be triggering the sensor for this test step. + self.step("7a") + occupancy_dut = await self.read_occ_attribute_expect_success(attribute=attributes.Occupancy) + asserts.assert_equal(occupancy_dut, 0, "Occupancy state is not back to 0 after HoldTime period") + + await_sequence_of_reports(report_queue=attrib_listener.attribute_queue, endpoint_id=endpoint_id, attribute=cluster.Attributes.Occupancy, sequence=[ + 0], timeout_sec=post_prompt_settle_delay_seconds) + + if occupancy_event_supported: + self.step("7b") + event = event_listener.wait_for_event_report( + cluster.Events.OccupancyChanged, timeout_sec=post_prompt_settle_delay_seconds) + asserts.assert_equal(event.occupancy, 0, "Unexpected occupancy on OccupancyChanged") + else: + self.skip_step("7b") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_OCC_3_2.py b/src/python_testing/TC_OCC_3_2.py index c4049104fe..3a5ca17069 100644 --- a/src/python_testing/TC_OCC_3_2.py +++ b/src/python_testing/TC_OCC_3_2.py @@ -1,198 +1,207 @@ -# -# Copyright (c) 2024 Project CHIP (Matter) 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. -# -# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments -# for details about the block below. -# -# === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --endpoint 1 --bool-arg simulate_occupancy:true -# === END CI TEST ARGUMENTS === - -# There are CI integration for the test cases below that implements manually controlling sensor device for -# the occupancy state ON/OFF change. -# [TC-OCC-3.1] test procedure step 3, 4 -# [TC-OCC-3.2] test precedure step 3a, 3c - -import logging -import time - -import chip.clusters as Clusters -from matter_testing_support import (AttributeValue, ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, async_test_body, - await_sequence_of_reports, default_matter_test_main) -from mobly import asserts - - -class TC_OCC_3_2(MatterBaseTest): - def setup_test(self): - super().setup_test() - self.is_ci = self.matter_test_config.global_test_params.get('simulate_occupancy', False) - - async def read_occ_attribute_expect_success(self, attribute): - cluster = Clusters.Objects.OccupancySensing - endpoint_id = self.matter_test_config.endpoint - return await self.read_single_attribute_check_success(endpoint=endpoint_id, cluster=cluster, attribute=attribute) - - def desc_TC_OCC_3_2(self) -> str: - return "[TC-OCC-3.2] Subscription Report Verification with server as DUT" - - def steps_TC_OCC_3_2(self) -> list[TestStep]: - steps = [ - TestStep(1, "Commission DUT to TH if not already done", is_commissioning=True), - TestStep(2, "TH establishes a wildcard subscription to all attributes on Occupancy Sensing Cluster on the endpoint under test. Subscription min interval = 0 and max interval = 30 seconds."), - TestStep("3a", "Prepare DUT to be unoccupied state."), - TestStep("3b", "TH reads DUT Occupancy attribute."), - TestStep("3c", "Trigger DUT to change the occupancy state."), - TestStep("3d", "TH awaits a ReportDataMessage containing an attribute report for DUT Occupancy attribute."), - TestStep("4a", "Check if DUT supports HoldTime attribute, If not supported, then stop and skip the rest of test cases."), - TestStep("4b", "TH writes HoldTimeMin to HoldTime attribute."), - TestStep("4c", "TH clears its report history and writes HoldTimeMax to HoldTime attribute."), - TestStep("4d", "TH awaits a ReportDataMessage containing an attribute report for DUT HoldTime attribute and all legacy attributes supported."), - ] - return steps - - def pics_TC_OCC_3_2(self) -> list[str]: - pics = [ - "OCC.S", - ] - return pics - - # Sends and out-of-band command to the all-clusters-app - def write_to_app_pipe(self, command): - # CI app pipe id creation - self.app_pipe = "/tmp/chip_all_clusters_fifo_" - if self.is_ci: - app_pid = self.matter_test_config.app_pid - if app_pid == 0: - asserts.fail("The --app-pid flag must be set when using named pipe") - self.app_pipe = self.app_pipe + str(app_pid) - - with open(self.app_pipe, "w") as app_pipe: - app_pipe.write(command + "\n") - # Delay for pipe command to be processed (otherwise tests are flaky) - time.sleep(0.001) - - @async_test_body - async def test_TC_OCC_3_2(self): - endpoint_id = self.matter_test_config.endpoint - node_id = self.dut_node_id - dev_ctrl = self.default_controller - - post_prompt_settle_delay_seconds = 10.0 - cluster = Clusters.Objects.OccupancySensing - attributes = cluster.Attributes - - self.step(1) # Commissioning already done - - self.step(2) - feature_map = await self.read_occ_attribute_expect_success(attribute=attributes.FeatureMap) - has_feature_pir = (feature_map & cluster.Bitmaps.Feature.kPassiveInfrared) != 0 - has_feature_ultrasonic = (feature_map & cluster.Bitmaps.Feature.kUltrasonic) != 0 - has_feature_contact = (feature_map & cluster.Bitmaps.Feature.kPhysicalContact) != 0 - - logging.info( - f"Feature map: 0x{feature_map:x}. PIR: {has_feature_pir}, US:{has_feature_ultrasonic}, PHY:{has_feature_contact}") - - attribute_list = await self.read_occ_attribute_expect_success(attribute=attributes.AttributeList) - has_pir_timing_attrib = attributes.PIROccupiedToUnoccupiedDelay.attribute_id in attribute_list - has_ultrasonic_timing_attrib = attributes.UltrasonicOccupiedToUnoccupiedDelay.attribute_id in attribute_list - has_contact_timing_attrib = attributes.PhysicalContactOccupiedToUnoccupiedDelay.attribute_id in attribute_list - logging.info(f"Attribute list: {attribute_list}") - logging.info(f"--> Has PIROccupiedToUnoccupiedDelay: {has_pir_timing_attrib}") - logging.info(f"--> Has UltrasonicOccupiedToUnoccupiedDelay: {has_ultrasonic_timing_attrib}") - logging.info(f"--> Has PhysicalContactOccupiedToUnoccupiedDelay: {has_contact_timing_attrib}") - - # min interval = 0, and max interval = 30 seconds - attrib_listener = ClusterAttributeChangeAccumulator(Clusters.Objects.OccupancySensing) - await attrib_listener.start(dev_ctrl, node_id, endpoint=endpoint_id, min_interval_sec=0, max_interval_sec=30) - - # add Namepiped to assimilate the manual sensor untrigger here - self.step("3a") - # CI call to trigger off - if self.is_ci: - self.write_to_app_pipe('{"Name":"SetOccupancy", "EndpointId": 1, "Occupancy": 0}') - else: - self.wait_for_user_input(prompt_msg="Type any letter and press ENTER after DUT goes back to unoccupied state.") - - self.step("3b") - initial_dut = await self.read_occ_attribute_expect_success(attribute=attributes.Occupancy) - asserts.assert_equal(initial_dut, 0, "Occupancy attribute is still detected state") - - # add Namepiped to assimilate the manual sensor trigger here - self.step("3c") - attrib_listener.reset() - - # CI call to trigger on - if self.is_ci: - self.write_to_app_pipe('{"Name":"SetOccupancy", "EndpointId": 1, "Occupancy": 1}') - else: - self.wait_for_user_input( - prompt_msg="Type any letter and press ENTER after the sensor occupancy is triggered and its occupancy state changed.") - - self.step("3d") - await_sequence_of_reports(report_queue=attrib_listener.attribute_queue, endpoint_id=endpoint_id, attribute=cluster.Attributes.Occupancy, sequence=[ - 1], timeout_sec=post_prompt_settle_delay_seconds) - - self.step("4a") - if attributes.HoldTime.attribute_id not in attribute_list: - logging.info("No HoldTime attribute supports. Terminate this test case") - self.skip_all_remaining_steps("4b") - - self.step("4b") - hold_time_limits_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTimeLimits) - hold_time_min = hold_time_limits_dut.holdTimeMin - hold_time_max = hold_time_limits_dut.holdTimeMax - await self.write_single_attribute(attributes.HoldTime(hold_time_min)) - hold_time_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTime) - asserts.assert_equal(hold_time_dut, hold_time_min, "HoldTime did not match written HoldTimeMin") - - # HoldTime may already have been HoldTimeMin, or not. Make sure we look only at subsequent reports. - attrib_listener.reset() - - self.step("4c") - await self.write_single_attribute(attributes.HoldTime(hold_time_max)) - hold_time_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTime) - asserts.assert_equal(hold_time_dut, hold_time_max, "HoldTime did not match written HoldTimeMax") - - self.step("4d") - has_no_legacy_features = ((not has_feature_pir) and (not has_feature_ultrasonic) and (not has_feature_contact)) - - expect_legacy_pir_timing = has_pir_timing_attrib and (has_feature_pir or has_no_legacy_features) - expect_legacy_us_timing = has_ultrasonic_timing_attrib and has_feature_ultrasonic - expect_legacy_phy_timing = has_contact_timing_attrib and has_feature_contact - - # Build list of expectations based on attributes present. - all_expected_final_values = [AttributeValue(endpoint_id, attribute=cluster.Attributes.HoldTime, value=hold_time_max)] - if expect_legacy_pir_timing: - all_expected_final_values.append(AttributeValue( - endpoint_id, attribute=cluster.Attributes.PIROccupiedToUnoccupiedDelay, value=hold_time_max)) - if expect_legacy_us_timing: - all_expected_final_values.append(AttributeValue( - endpoint_id, attribute=cluster.Attributes.UltrasonicOccupiedToUnoccupiedDelay, value=hold_time_max)) - if expect_legacy_phy_timing: - all_expected_final_values.append(AttributeValue( - endpoint_id, attribute=cluster.Attributes.PhysicalContactOccupiedToUnoccupiedDelay, value=hold_time_max)) - - # Wait for the reports to come. - attrib_listener.await_all_final_values_reported(all_expected_final_values, timeout_sec=post_prompt_settle_delay_seconds) - - -if __name__ == "__main__": - default_matter_test_main() +# +# Copyright (c) 2024 Project CHIP (Matter) 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. +# +# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments +# for details about the block below. +# +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# --endpoint 1 +# --bool-arg simulate_occupancy:true +# factory-reset: true +# quiet: true +# === END CI TEST ARGUMENTS === + +# There are CI integration for the test cases below that implements manually controlling sensor device for +# the occupancy state ON/OFF change. +# [TC-OCC-3.1] test procedure step 3, 4 +# [TC-OCC-3.2] test precedure step 3a, 3c + +import logging +import time + +import chip.clusters as Clusters +from chip.testing.matter_testing import (AttributeValue, ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, + async_test_body, await_sequence_of_reports, default_matter_test_main) +from mobly import asserts + + +class TC_OCC_3_2(MatterBaseTest): + def setup_test(self): + super().setup_test() + self.is_ci = self.matter_test_config.global_test_params.get('simulate_occupancy', False) + + async def read_occ_attribute_expect_success(self, attribute): + cluster = Clusters.Objects.OccupancySensing + endpoint_id = self.matter_test_config.endpoint + return await self.read_single_attribute_check_success(endpoint=endpoint_id, cluster=cluster, attribute=attribute) + + def desc_TC_OCC_3_2(self) -> str: + return "[TC-OCC-3.2] Subscription Report Verification with server as DUT" + + def steps_TC_OCC_3_2(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commission DUT to TH if not already done", is_commissioning=True), + TestStep(2, "TH establishes a wildcard subscription to all attributes on Occupancy Sensing Cluster on the endpoint under test. Subscription min interval = 0 and max interval = 30 seconds."), + TestStep("3a", "Prepare DUT to be unoccupied state."), + TestStep("3b", "TH reads DUT Occupancy attribute."), + TestStep("3c", "Trigger DUT to change the occupancy state."), + TestStep("3d", "TH awaits a ReportDataMessage containing an attribute report for DUT Occupancy attribute."), + TestStep("4a", "Check if DUT supports HoldTime attribute, If not supported, then stop and skip the rest of test cases."), + TestStep("4b", "TH writes HoldTimeMin to HoldTime attribute."), + TestStep("4c", "TH clears its report history and writes HoldTimeMax to HoldTime attribute."), + TestStep("4d", "TH awaits a ReportDataMessage containing an attribute report for DUT HoldTime attribute and all legacy attributes supported."), + ] + return steps + + def pics_TC_OCC_3_2(self) -> list[str]: + pics = [ + "OCC.S", + ] + return pics + + # Sends and out-of-band command to the all-clusters-app + def write_to_app_pipe(self, command): + # CI app pipe id creation + self.app_pipe = "/tmp/chip_all_clusters_fifo_" + if self.is_ci: + app_pid = self.matter_test_config.app_pid + if app_pid == 0: + asserts.fail("The --app-pid flag must be set when using named pipe") + self.app_pipe = self.app_pipe + str(app_pid) + + with open(self.app_pipe, "w") as app_pipe: + app_pipe.write(command + "\n") + # Delay for pipe command to be processed (otherwise tests are flaky) + time.sleep(0.001) + + @async_test_body + async def test_TC_OCC_3_2(self): + endpoint_id = self.matter_test_config.endpoint + node_id = self.dut_node_id + dev_ctrl = self.default_controller + + post_prompt_settle_delay_seconds = 10.0 + cluster = Clusters.Objects.OccupancySensing + attributes = cluster.Attributes + + self.step(1) # Commissioning already done + + self.step(2) + feature_map = await self.read_occ_attribute_expect_success(attribute=attributes.FeatureMap) + has_feature_pir = (feature_map & cluster.Bitmaps.Feature.kPassiveInfrared) != 0 + has_feature_ultrasonic = (feature_map & cluster.Bitmaps.Feature.kUltrasonic) != 0 + has_feature_contact = (feature_map & cluster.Bitmaps.Feature.kPhysicalContact) != 0 + + logging.info( + f"Feature map: 0x{feature_map:x}. PIR: {has_feature_pir}, US:{has_feature_ultrasonic}, PHY:{has_feature_contact}") + + attribute_list = await self.read_occ_attribute_expect_success(attribute=attributes.AttributeList) + has_pir_timing_attrib = attributes.PIROccupiedToUnoccupiedDelay.attribute_id in attribute_list + has_ultrasonic_timing_attrib = attributes.UltrasonicOccupiedToUnoccupiedDelay.attribute_id in attribute_list + has_contact_timing_attrib = attributes.PhysicalContactOccupiedToUnoccupiedDelay.attribute_id in attribute_list + logging.info(f"Attribute list: {attribute_list}") + logging.info(f"--> Has PIROccupiedToUnoccupiedDelay: {has_pir_timing_attrib}") + logging.info(f"--> Has UltrasonicOccupiedToUnoccupiedDelay: {has_ultrasonic_timing_attrib}") + logging.info(f"--> Has PhysicalContactOccupiedToUnoccupiedDelay: {has_contact_timing_attrib}") + + # min interval = 0, and max interval = 30 seconds + attrib_listener = ClusterAttributeChangeAccumulator(Clusters.Objects.OccupancySensing) + await attrib_listener.start(dev_ctrl, node_id, endpoint=endpoint_id, min_interval_sec=0, max_interval_sec=30) + + # add Namepiped to assimilate the manual sensor untrigger here + self.step("3a") + # CI call to trigger off + if self.is_ci: + self.write_to_app_pipe('{"Name":"SetOccupancy", "EndpointId": 1, "Occupancy": 0}') + else: + self.wait_for_user_input(prompt_msg="Type any letter and press ENTER after DUT goes back to unoccupied state.") + + self.step("3b") + initial_dut = await self.read_occ_attribute_expect_success(attribute=attributes.Occupancy) + asserts.assert_equal(initial_dut, 0, "Occupancy attribute is still detected state") + + # add Namepiped to assimilate the manual sensor trigger here + self.step("3c") + attrib_listener.reset() + + # CI call to trigger on + if self.is_ci: + self.write_to_app_pipe('{"Name":"SetOccupancy", "EndpointId": 1, "Occupancy": 1}') + else: + self.wait_for_user_input( + prompt_msg="Type any letter and press ENTER after the sensor occupancy is triggered and its occupancy state changed.") + + self.step("3d") + await_sequence_of_reports(report_queue=attrib_listener.attribute_queue, endpoint_id=endpoint_id, attribute=cluster.Attributes.Occupancy, sequence=[ + 1], timeout_sec=post_prompt_settle_delay_seconds) + + self.step("4a") + if attributes.HoldTime.attribute_id not in attribute_list: + logging.info("No HoldTime attribute supports. Terminate this test case") + self.skip_all_remaining_steps("4b") + + self.step("4b") + hold_time_limits_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTimeLimits) + hold_time_min = hold_time_limits_dut.holdTimeMin + hold_time_max = hold_time_limits_dut.holdTimeMax + await self.write_single_attribute(attributes.HoldTime(hold_time_min)) + hold_time_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTime) + asserts.assert_equal(hold_time_dut, hold_time_min, "HoldTime did not match written HoldTimeMin") + + # HoldTime may already have been HoldTimeMin, or not. Make sure we look only at subsequent reports. + attrib_listener.reset() + + self.step("4c") + await self.write_single_attribute(attributes.HoldTime(hold_time_max)) + hold_time_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTime) + asserts.assert_equal(hold_time_dut, hold_time_max, "HoldTime did not match written HoldTimeMax") + + self.step("4d") + has_no_legacy_features = ((not has_feature_pir) and (not has_feature_ultrasonic) and (not has_feature_contact)) + + expect_legacy_pir_timing = has_pir_timing_attrib and (has_feature_pir or has_no_legacy_features) + expect_legacy_us_timing = has_ultrasonic_timing_attrib and has_feature_ultrasonic + expect_legacy_phy_timing = has_contact_timing_attrib and has_feature_contact + + # Build list of expectations based on attributes present. + all_expected_final_values = [AttributeValue(endpoint_id, attribute=cluster.Attributes.HoldTime, value=hold_time_max)] + if expect_legacy_pir_timing: + all_expected_final_values.append(AttributeValue( + endpoint_id, attribute=cluster.Attributes.PIROccupiedToUnoccupiedDelay, value=hold_time_max)) + if expect_legacy_us_timing: + all_expected_final_values.append(AttributeValue( + endpoint_id, attribute=cluster.Attributes.UltrasonicOccupiedToUnoccupiedDelay, value=hold_time_max)) + if expect_legacy_phy_timing: + all_expected_final_values.append(AttributeValue( + endpoint_id, attribute=cluster.Attributes.PhysicalContactOccupiedToUnoccupiedDelay, value=hold_time_max)) + + # Wait for the reports to come. + attrib_listener.await_all_final_values_reported(all_expected_final_values, timeout_sec=post_prompt_settle_delay_seconds) + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_OPCREDS_3_1.py b/src/python_testing/TC_OPCREDS_3_1.py index dd92fd7a2f..1506d2a712 100644 --- a/src/python_testing/TC_OPCREDS_3_1.py +++ b/src/python_testing/TC_OPCREDS_3_1.py @@ -18,12 +18,20 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import copy import logging @@ -34,8 +42,8 @@ from chip import ChipDeviceCtrl from chip.exceptions import ChipStackError from chip.interaction_model import InteractionModelError, Status +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from chip.tlv import TLVReader, TLVWriter -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_OPCREDS_3_2.py b/src/python_testing/TC_OPCREDS_3_2.py index 3eab07bc9d..2bfc214665 100644 --- a/src/python_testing/TC_OPCREDS_3_2.py +++ b/src/python_testing/TC_OPCREDS_3_2.py @@ -19,18 +19,26 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import chip.clusters as Clusters +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from chip.tlv import TLVReader from chip.utils import CommissioningBuildingBlocks -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from test_plan_support import (commission_from_existing, commission_if_required, read_attribute, remove_fabric, verify_commissioning_successful, verify_success) diff --git a/src/python_testing/TC_OPSTATE_2_1.py b/src/python_testing/TC_OPSTATE_2_1.py index c3be8a438c..060b71d85e 100644 --- a/src/python_testing/TC_OPSTATE_2_1.py +++ b/src/python_testing/TC_OPSTATE_2_1.py @@ -19,16 +19,25 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --endpoint 1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --endpoint 1 +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from TC_OpstateCommon import TC_OPSTATE_BASE, TestInfo diff --git a/src/python_testing/TC_OPSTATE_2_2.py b/src/python_testing/TC_OPSTATE_2_2.py index 09e4c65918..f0ed8f214d 100644 --- a/src/python_testing/TC_OPSTATE_2_2.py +++ b/src/python_testing/TC_OPSTATE_2_2.py @@ -19,16 +19,26 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --endpoint 1 --int-arg PIXIT.WAITTIME.COUNTDOWN:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --endpoint 1 +# --int-arg PIXIT.WAITTIME.COUNTDOWN:5 +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from TC_OpstateCommon import TC_OPSTATE_BASE, TestInfo diff --git a/src/python_testing/TC_OPSTATE_2_3.py b/src/python_testing/TC_OPSTATE_2_3.py index b9a62b275c..d35aa6e61e 100644 --- a/src/python_testing/TC_OPSTATE_2_3.py +++ b/src/python_testing/TC_OPSTATE_2_3.py @@ -19,17 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --endpoint 1 --int-arg PIXIT.WAITTIME.COUNTDOWN:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --endpoint 1 +# --int-arg PIXIT.WAITTIME.COUNTDOWN:5 +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from TC_OpstateCommon import TC_OPSTATE_BASE, TestInfo diff --git a/src/python_testing/TC_OPSTATE_2_4.py b/src/python_testing/TC_OPSTATE_2_4.py index 512802467f..ec2c7c17da 100644 --- a/src/python_testing/TC_OPSTATE_2_4.py +++ b/src/python_testing/TC_OPSTATE_2_4.py @@ -19,17 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --endpoint 1 --int-arg PIXIT.OPSTATE.ErrorEventGen:1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --endpoint 1 +# --int-arg PIXIT.OPSTATE.ErrorEventGen:1 +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from TC_OpstateCommon import TC_OPSTATE_BASE, TestInfo diff --git a/src/python_testing/TC_OPSTATE_2_5.py b/src/python_testing/TC_OPSTATE_2_5.py index ad79765e88..89a2462a2b 100644 --- a/src/python_testing/TC_OPSTATE_2_5.py +++ b/src/python_testing/TC_OPSTATE_2_5.py @@ -19,17 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --endpoint 1 --int-arg PIXIT.WAITTIME.REBOOT:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --endpoint 1 +# --int-arg PIXIT.WAITTIME.REBOOT:5 +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from TC_OpstateCommon import TC_OPSTATE_BASE, TestInfo diff --git a/src/python_testing/TC_OPSTATE_2_6.py b/src/python_testing/TC_OPSTATE_2_6.py index d13f8a1e7e..0b9e1ec3bb 100644 --- a/src/python_testing/TC_OPSTATE_2_6.py +++ b/src/python_testing/TC_OPSTATE_2_6.py @@ -19,17 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --endpoint 1 --int-arg PIXIT.WAITTIME.REBOOT:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --endpoint 1 +# --int-arg PIXIT.WAITTIME.REBOOT:5 +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from TC_OpstateCommon import TC_OPSTATE_BASE, TestInfo diff --git a/src/python_testing/TC_OVENOPSTATE_2_1.py b/src/python_testing/TC_OVENOPSTATE_2_1.py index 1d1a289080..d830a416c0 100644 --- a/src/python_testing/TC_OVENOPSTATE_2_1.py +++ b/src/python_testing/TC_OVENOPSTATE_2_1.py @@ -19,17 +19,26 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --endpoint 1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --endpoint 1 +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from TC_OpstateCommon import TC_OPSTATE_BASE, TestInfo diff --git a/src/python_testing/TC_OVENOPSTATE_2_2.py b/src/python_testing/TC_OVENOPSTATE_2_2.py index 254464eaa6..55afad11be 100644 --- a/src/python_testing/TC_OVENOPSTATE_2_2.py +++ b/src/python_testing/TC_OVENOPSTATE_2_2.py @@ -19,16 +19,26 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --endpoint 1 --int-arg PIXIT.WAITTIME.COUNTDOWN:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --endpoint 1 +# --int-arg PIXIT.WAITTIME.COUNTDOWN:5 +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from TC_OpstateCommon import TC_OPSTATE_BASE, TestInfo diff --git a/src/python_testing/TC_OVENOPSTATE_2_3.py b/src/python_testing/TC_OVENOPSTATE_2_3.py index 77d4358788..329bceb1fb 100644 --- a/src/python_testing/TC_OVENOPSTATE_2_3.py +++ b/src/python_testing/TC_OVENOPSTATE_2_3.py @@ -19,16 +19,26 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --endpoint 1 --int-arg PIXIT.WAITTIME.COUNTDOWN:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --endpoint 1 +# --int-arg PIXIT.WAITTIME.COUNTDOWN:5 +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from TC_OpstateCommon import TC_OPSTATE_BASE, TestInfo diff --git a/src/python_testing/TC_OVENOPSTATE_2_4.py b/src/python_testing/TC_OVENOPSTATE_2_4.py index 70a3a6f020..ffc639390e 100644 --- a/src/python_testing/TC_OVENOPSTATE_2_4.py +++ b/src/python_testing/TC_OVENOPSTATE_2_4.py @@ -19,16 +19,26 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --endpoint 1 --int-arg PIXIT.OVENOPSTATE.ErrorEventGen:1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --endpoint 1 +# --int-arg PIXIT.OVENOPSTATE.ErrorEventGen:1 +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from TC_OpstateCommon import TC_OPSTATE_BASE, TestInfo diff --git a/src/python_testing/TC_OVENOPSTATE_2_5.py b/src/python_testing/TC_OVENOPSTATE_2_5.py index 39edb670ff..42edca72f3 100644 --- a/src/python_testing/TC_OVENOPSTATE_2_5.py +++ b/src/python_testing/TC_OVENOPSTATE_2_5.py @@ -19,17 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --endpoint 1 --int-arg PIXIT.WAITTIME.REBOOT:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --endpoint 1 +# --int-arg PIXIT.WAITTIME.REBOOT:5 +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from TC_OpstateCommon import TC_OPSTATE_BASE, TestInfo diff --git a/src/python_testing/TC_OVENOPSTATE_2_6.py b/src/python_testing/TC_OVENOPSTATE_2_6.py index 09436f4e76..2770625bb7 100644 --- a/src/python_testing/TC_OVENOPSTATE_2_6.py +++ b/src/python_testing/TC_OVENOPSTATE_2_6.py @@ -19,17 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --endpoint 1 --int-arg PIXIT.WAITTIME.REBOOT:5 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --endpoint 1 +# --int-arg PIXIT.WAITTIME.REBOOT:5 +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from TC_OpstateCommon import TC_OPSTATE_BASE, TestInfo diff --git a/src/python_testing/TC_OpstateCommon.py b/src/python_testing/TC_OpstateCommon.py index c697c7ab5f..557b7606cc 100644 --- a/src/python_testing/TC_OpstateCommon.py +++ b/src/python_testing/TC_OpstateCommon.py @@ -27,7 +27,7 @@ from chip.clusters.Attribute import EventReadResult, SubscriptionTransaction from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import ClusterAttributeChangeAccumulator, EventChangeCallback, TestStep +from chip.testing.matter_testing import ClusterAttributeChangeAccumulator, EventChangeCallback, TestStep from mobly import asserts diff --git a/src/python_testing/TC_PS_2_3.py b/src/python_testing/TC_PS_2_3.py index 72b54877dc..13f4420b0a 100644 --- a/src/python_testing/TC_PS_2_3.py +++ b/src/python_testing/TC_PS_2_3.py @@ -19,20 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import time import chip.clusters as Clusters -from matter_testing_support import (ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, async_test_body, - default_matter_test_main) +from chip.testing.matter_testing import (ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, async_test_body, + default_matter_test_main) from mobly import asserts diff --git a/src/python_testing/TC_PWRTL_2_1.py b/src/python_testing/TC_PWRTL_2_1.py index 579398642a..3de09c6e93 100644 --- a/src/python_testing/TC_PWRTL_2_1.py +++ b/src/python_testing/TC_PWRTL_2_1.py @@ -19,18 +19,25 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_RR_1_1.py b/src/python_testing/TC_RR_1_1.py index 0cb53a4fb4..0cbf0274c5 100644 --- a/src/python_testing/TC_RR_1_1.py +++ b/src/python_testing/TC_RR_1_1.py @@ -19,12 +19,19 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import asyncio @@ -38,8 +45,8 @@ import chip.clusters as Clusters from chip.interaction_model import Status as StatusEnum +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from chip.utils import CommissioningBuildingBlocks -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts from TC_SC_3_6 import AttributeChangeAccumulator, ResubscriptionCatcher diff --git a/src/python_testing/TC_RVCCLEANM_1_2.py b/src/python_testing/TC_RVCCLEANM_1_2.py index d1b3018772..3dfd75f4f4 100644 --- a/src/python_testing/TC_RVCCLEANM_1_2.py +++ b/src/python_testing/TC_RVCCLEANM_1_2.py @@ -19,18 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_RVC_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_RVC_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_RVCCLEANM_2_1.py b/src/python_testing/TC_RVCCLEANM_2_1.py index 8e5013ad4c..5234a74685 100644 --- a/src/python_testing/TC_RVCCLEANM_2_1.py +++ b/src/python_testing/TC_RVCCLEANM_2_1.py @@ -19,23 +19,34 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_RVC_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --int-arg PIXIT.RVCCLEANM.MODE_CHANGE_FAIL:1 PIXIT.RVCCLEANM.MODE_CHANGE_OK:2 +# test-runner-runs: +# run1: +# app: ${CHIP_RVC_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --int-arg PIXIT.RVCCLEANM.MODE_CHANGE_FAIL:1 +# --int-arg PIXIT.RVCCLEANM.MODE_CHANGE_OK:2 +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main, type_matches from mobly import asserts # This test requires several additional command line arguments # run with -# --int-arg PIXIT.RVCCLEANM.MODE_CHANGE_OK: PIXIT.RVCCLEANM.MODE_CHANGE_FAIL: +# --int-arg PIXIT.RVCCLEANM.MODE_CHANGE_OK: --int-arg PIXIT.RVCCLEANM.MODE_CHANGE_FAIL: class TC_RVCCLEANM_2_1(MatterBaseTest): diff --git a/src/python_testing/TC_RVCCLEANM_2_2.py b/src/python_testing/TC_RVCCLEANM_2_2.py index ed63dd09c3..7352d03e24 100644 --- a/src/python_testing/TC_RVCCLEANM_2_2.py +++ b/src/python_testing/TC_RVCCLEANM_2_2.py @@ -19,18 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_RVC_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_RVC_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import enum import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main, type_matches from mobly import asserts diff --git a/src/python_testing/TC_RVCOPSTATE_2_1.py b/src/python_testing/TC_RVCOPSTATE_2_1.py index b15fc92743..48715c3b7a 100644 --- a/src/python_testing/TC_RVCOPSTATE_2_1.py +++ b/src/python_testing/TC_RVCOPSTATE_2_1.py @@ -19,19 +19,28 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_RVC_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_RVC_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.clusters.Types import NullValue -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_RVCOPSTATE_2_3.py b/src/python_testing/TC_RVCOPSTATE_2_3.py index e9dc801cc1..1b522117b9 100644 --- a/src/python_testing/TC_RVCOPSTATE_2_3.py +++ b/src/python_testing/TC_RVCOPSTATE_2_3.py @@ -19,12 +19,21 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_RVC_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_RVC_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -32,7 +41,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main, type_matches from mobly import asserts diff --git a/src/python_testing/TC_RVCOPSTATE_2_4.py b/src/python_testing/TC_RVCOPSTATE_2_4.py index c7186a80ee..ad515dbff1 100644 --- a/src/python_testing/TC_RVCOPSTATE_2_4.py +++ b/src/python_testing/TC_RVCOPSTATE_2_4.py @@ -19,18 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_RVC_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_RVC_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main, type_matches from mobly import asserts diff --git a/src/python_testing/TC_RVCRUNM_1_2.py b/src/python_testing/TC_RVCRUNM_1_2.py index 308e79ab26..90db1601b1 100644 --- a/src/python_testing/TC_RVCRUNM_1_2.py +++ b/src/python_testing/TC_RVCRUNM_1_2.py @@ -19,18 +19,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_RVC_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_RVC_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_RVCRUNM_2_1.py b/src/python_testing/TC_RVCRUNM_2_1.py index 2693cb041a..55c37c7094 100644 --- a/src/python_testing/TC_RVCRUNM_2_1.py +++ b/src/python_testing/TC_RVCRUNM_2_1.py @@ -19,23 +19,34 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_RVC_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --int-arg PIXIT.RVCRUNM.MODE_CHANGE_OK:0 PIXIT.RVCRUNM.MODE_CHANGE_FAIL:2 +# test-runner-runs: +# run1: +# app: ${CHIP_RVC_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --endpoint 1 +# --int-arg PIXIT.RVCRUNM.MODE_CHANGE_OK:0 +# --int-arg PIXIT.RVCRUNM.MODE_CHANGE_FAIL:2 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main, type_matches from mobly import asserts # This test requires several additional command line arguments # run with -# --int-arg PIXIT.RVCRUNM.MODE_CHANGE_OK: PIXIT.RVCRUNM.MODE_CHANGE_FAIL: +# --int-arg PIXIT.RVCRUNM.MODE_CHANGE_OK: --int-arg PIXIT.RVCRUNM.MODE_CHANGE_FAIL: # For running in CI, it is expected that OK=0 and FAIL=2 diff --git a/src/python_testing/TC_RVCRUNM_2_2.py b/src/python_testing/TC_RVCRUNM_2_2.py index 3a2ce23ea2..e78d6d7f42 100644 --- a/src/python_testing/TC_RVCRUNM_2_2.py +++ b/src/python_testing/TC_RVCRUNM_2_2.py @@ -19,23 +19,34 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_RVC_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --int-arg PIXIT.RVCRUNM.MODE_A:1 PIXIT.RVCRUNM.MODE_B:2 +# test-runner-runs: +# run1: +# app: ${CHIP_RVC_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --endpoint 1 +# --int-arg PIXIT.RVCRUNM.MODE_A:1 +# --int-arg PIXIT.RVCRUNM.MODE_B:2 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import enum import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts # This test requires several additional command line arguments. # Run the test with -# --int-arg PIXIT.RVCRUNM.MODE_A: PIXIT.RVCRUNM.MODE_B: +# --int-arg PIXIT.RVCRUNM.MODE_A: --int-arg PIXIT.RVCRUNM.MODE_B: class RvcStatusEnum(enum.IntEnum): diff --git a/src/python_testing/TC_SC_3_6.py b/src/python_testing/TC_SC_3_6.py index 53353ea85f..8cfbee8e46 100644 --- a/src/python_testing/TC_SC_3_6.py +++ b/src/python_testing/TC_SC_3_6.py @@ -19,12 +19,19 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === @@ -38,8 +45,8 @@ import chip.clusters as Clusters from chip.clusters import ClusterObjects as ClustersObjects from chip.clusters.Attribute import SubscriptionTransaction, TypedAttributePath +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from chip.utils import CommissioningBuildingBlocks -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts # TODO: Overall, we need to add validation that session IDs have not changed throughout to be agnostic diff --git a/src/python_testing/TC_SC_7_1.py b/src/python_testing/TC_SC_7_1.py index b702bf438f..42ad785843 100644 --- a/src/python_testing/TC_SC_7_1.py +++ b/src/python_testing/TC_SC_7_1.py @@ -19,12 +19,18 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 2222 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --bool-arg post_cert_test:true --qr-code MT:-24J0KCZ16750648G00 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 2222 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --bool-arg post_cert_test:true +# --qr-code MT:-24J0KCZ16750648G00 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === # Note that in the CI we are using the post-cert test as we can only start one app from the current script. @@ -32,7 +38,7 @@ import logging import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_SEAR_1_2.py b/src/python_testing/TC_SEAR_1_2.py index 1bed2c8d12..41773804e4 100644 --- a/src/python_testing/TC_SEAR_1_2.py +++ b/src/python_testing/TC_SEAR_1_2.py @@ -20,19 +20,28 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_RVC_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_RVC_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.clusters.Types import NullValue -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_SEAR_1_3.py b/src/python_testing/TC_SEAR_1_3.py index df4a1ddb51..2c2b85a13c 100644 --- a/src/python_testing/TC_SEAR_1_3.py +++ b/src/python_testing/TC_SEAR_1_3.py @@ -20,18 +20,28 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_RVC_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --json-arg PIXIT.SEAR.VALID_AREAS:'[7, 1234567]' --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_RVC_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values +# --endpoint 1 +# --json-arg PIXIT.SEAR.VALID_AREAS:'[7, 1234567]' +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_SEAR_1_4.py b/src/python_testing/TC_SEAR_1_4.py index d31dcc2b13..cf53f446f9 100644 --- a/src/python_testing/TC_SEAR_1_4.py +++ b/src/python_testing/TC_SEAR_1_4.py @@ -20,18 +20,27 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_RVC_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_RVC_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_SEAR_1_5.py b/src/python_testing/TC_SEAR_1_5.py index d4704d686a..130ccb8d59 100644 --- a/src/python_testing/TC_SEAR_1_5.py +++ b/src/python_testing/TC_SEAR_1_5.py @@ -20,19 +20,28 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_RVC_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_RVC_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.clusters.Types import NullValue -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_SEAR_1_6.py b/src/python_testing/TC_SEAR_1_6.py index 8e94971c8b..dc6188a14e 100644 --- a/src/python_testing/TC_SEAR_1_6.py +++ b/src/python_testing/TC_SEAR_1_6.py @@ -20,19 +20,28 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${CHIP_RVC_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${CHIP_RVC_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.clusters.Types import NullValue -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_SWTCH.py b/src/python_testing/TC_SWTCH.py index 4609043a3e..fe55013452 100644 --- a/src/python_testing/TC_SWTCH.py +++ b/src/python_testing/TC_SWTCH.py @@ -18,32 +18,63 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 run2 run3 run4 -# -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --endpoint 1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --PICS src/app/tests/suites/certification/ci-pics-values -# -# test-runner-run/run2/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run2/factoryreset: True -# test-runner-run/run2/quiet: True -# test-runner-run/run2/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run2/script-args: --endpoint 2 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --PICS src/app/tests/suites/certification/ci-pics-values -# -# test-runner-run/run3/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run3/factoryreset: True -# test-runner-run/run3/quiet: True -# test-runner-run/run3/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run3/script-args: --endpoint 3 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --PICS src/app/tests/suites/certification/ci-pics-values -# -# test-runner-run/run4/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run4/factoryreset: True -# test-runner-run/run4/quiet: True -# test-runner-run/run4/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run4/script-args: --endpoint 4 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --PICS src/app/tests/suites/certification/ci-pics-values -# +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --endpoint 1 +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# --PICS src/app/tests/suites/certification/ci-pics-values +# factory-reset: true +# quiet: true +# run2: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --endpoint 2 +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# --PICS src/app/tests/suites/certification/ci-pics-values +# factory-reset: true +# quiet: true +# run3: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --endpoint 3 +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# --PICS src/app/tests/suites/certification/ci-pics-values +# factory-reset: true +# quiet: true +# run4: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --endpoint 4 +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# --PICS src/app/tests/suites/certification/ci-pics-values +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === # # These tests run on every endpoint regardless of whether a switch is present because they are set up to auto-select. @@ -59,10 +90,10 @@ import test_plan_support from chip.clusters import ClusterObjects as ClusterObjects from chip.clusters.Attribute import EventReadResult +from chip.testing.matter_testing import (AttributeValue, ClusterAttributeChangeAccumulator, EventChangeCallback, MatterBaseTest, + TestStep, await_sequence_of_reports, default_matter_test_main, has_feature, + run_if_endpoint_matches) from chip.tlv import uint -from matter_testing_support import (AttributeValue, ClusterAttributeChangeAccumulator, EventChangeCallback, MatterBaseTest, - TestStep, await_sequence_of_reports, default_matter_test_main, has_feature, - run_if_endpoint_matches) from mobly import asserts logger = logging.getLogger(__name__) diff --git a/src/python_testing/TC_TIMESYNC_2_1.py b/src/python_testing/TC_TIMESYNC_2_1.py index 0f2fdba4d6..cb2df9d66a 100644 --- a/src/python_testing/TC_TIMESYNC_2_1.py +++ b/src/python_testing/TC_TIMESYNC_2_1.py @@ -19,12 +19,21 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --endpoint 0 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --endpoint 0 +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import ipaddress @@ -32,8 +41,8 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue -from matter_testing_support import (MatterBaseTest, default_matter_test_main, has_attribute, has_cluster, run_if_endpoint_matches, - utc_time_in_matter_epoch) +from chip.testing.matter_testing import (MatterBaseTest, default_matter_test_main, has_attribute, has_cluster, + run_if_endpoint_matches, utc_time_in_matter_epoch) from mobly import asserts diff --git a/src/python_testing/TC_TIMESYNC_2_10.py b/src/python_testing/TC_TIMESYNC_2_10.py index c7eb9860b9..99ca9f3ac0 100644 --- a/src/python_testing/TC_TIMESYNC_2_10.py +++ b/src/python_testing/TC_TIMESYNC_2_10.py @@ -19,12 +19,20 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import queue @@ -35,9 +43,9 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError +from chip.testing.matter_testing import (MatterBaseTest, SimpleEventCallback, async_test_body, default_matter_test_main, + utc_time_in_matter_epoch) from chip.tlv import uint -from matter_testing_support import (MatterBaseTest, SimpleEventCallback, async_test_body, default_matter_test_main, - utc_time_in_matter_epoch) from mobly import asserts diff --git a/src/python_testing/TC_TIMESYNC_2_11.py b/src/python_testing/TC_TIMESYNC_2_11.py index 5815baeaca..0865bc87f4 100644 --- a/src/python_testing/TC_TIMESYNC_2_11.py +++ b/src/python_testing/TC_TIMESYNC_2_11.py @@ -19,12 +19,20 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import queue @@ -35,9 +43,9 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError +from chip.testing.matter_testing import (MatterBaseTest, SimpleEventCallback, async_test_body, default_matter_test_main, + get_wait_seconds_from_set_time, type_matches, utc_time_in_matter_epoch) from chip.tlv import uint -from matter_testing_support import (MatterBaseTest, SimpleEventCallback, async_test_body, default_matter_test_main, - get_wait_seconds_from_set_time, type_matches, utc_time_in_matter_epoch) from mobly import asserts diff --git a/src/python_testing/TC_TIMESYNC_2_12.py b/src/python_testing/TC_TIMESYNC_2_12.py index f530554591..7677dcf184 100644 --- a/src/python_testing/TC_TIMESYNC_2_12.py +++ b/src/python_testing/TC_TIMESYNC_2_12.py @@ -19,12 +19,20 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import queue @@ -35,9 +43,9 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError +from chip.testing.matter_testing import (MatterBaseTest, SimpleEventCallback, async_test_body, default_matter_test_main, + get_wait_seconds_from_set_time, type_matches, utc_time_in_matter_epoch) from chip.tlv import uint -from matter_testing_support import (MatterBaseTest, SimpleEventCallback, async_test_body, default_matter_test_main, - get_wait_seconds_from_set_time, type_matches, utc_time_in_matter_epoch) from mobly import asserts diff --git a/src/python_testing/TC_TIMESYNC_2_13.py b/src/python_testing/TC_TIMESYNC_2_13.py index c667b71eda..8138983030 100644 --- a/src/python_testing/TC_TIMESYNC_2_13.py +++ b/src/python_testing/TC_TIMESYNC_2_13.py @@ -19,12 +19,20 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import queue @@ -33,7 +41,7 @@ import chip.clusters as Clusters from chip import ChipDeviceCtrl from chip.clusters.Types import NullValue -from matter_testing_support import MatterBaseTest, SimpleEventCallback, async_test_body, default_matter_test_main, type_matches +from chip.testing.matter_testing import MatterBaseTest, SimpleEventCallback, async_test_body, default_matter_test_main, type_matches from mobly import asserts diff --git a/src/python_testing/TC_TIMESYNC_2_2.py b/src/python_testing/TC_TIMESYNC_2_2.py index 83c07355d6..74f935aac9 100644 --- a/src/python_testing/TC_TIMESYNC_2_2.py +++ b/src/python_testing/TC_TIMESYNC_2_2.py @@ -19,12 +19,20 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === from datetime import timedelta @@ -32,7 +40,8 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError -from matter_testing_support import MatterBaseTest, async_test_body, compare_time, default_matter_test_main, utc_time_in_matter_epoch +from chip.testing.matter_testing import (MatterBaseTest, async_test_body, compare_time, default_matter_test_main, + utc_time_in_matter_epoch) from mobly import asserts diff --git a/src/python_testing/TC_TIMESYNC_2_4.py b/src/python_testing/TC_TIMESYNC_2_4.py index 21d98fd8ca..76fe9074be 100644 --- a/src/python_testing/TC_TIMESYNC_2_4.py +++ b/src/python_testing/TC_TIMESYNC_2_4.py @@ -19,12 +19,20 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import typing @@ -32,7 +40,8 @@ import chip.clusters as Clusters from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches, utc_time_in_matter_epoch +from chip.testing.matter_testing import (MatterBaseTest, async_test_body, default_matter_test_main, type_matches, + utc_time_in_matter_epoch) from mobly import asserts diff --git a/src/python_testing/TC_TIMESYNC_2_5.py b/src/python_testing/TC_TIMESYNC_2_5.py index 5c19e37229..f363f03ba6 100644 --- a/src/python_testing/TC_TIMESYNC_2_5.py +++ b/src/python_testing/TC_TIMESYNC_2_5.py @@ -19,12 +19,20 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import typing @@ -32,7 +40,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, utc_time_in_matter_epoch +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main, utc_time_in_matter_epoch from mobly import asserts diff --git a/src/python_testing/TC_TIMESYNC_2_6.py b/src/python_testing/TC_TIMESYNC_2_6.py index deae112321..0e9ec9f795 100644 --- a/src/python_testing/TC_TIMESYNC_2_6.py +++ b/src/python_testing/TC_TIMESYNC_2_6.py @@ -19,12 +19,20 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import typing @@ -32,7 +40,7 @@ import chip.clusters as Clusters from chip.clusters.Types import Nullable, NullValue from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_TIMESYNC_2_7.py b/src/python_testing/TC_TIMESYNC_2_7.py index a405aae1f9..1c6cea2023 100644 --- a/src/python_testing/TC_TIMESYNC_2_7.py +++ b/src/python_testing/TC_TIMESYNC_2_7.py @@ -19,12 +19,20 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import time @@ -34,9 +42,9 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError +from chip.testing.matter_testing import (MatterBaseTest, async_test_body, compare_time, default_matter_test_main, type_matches, + utc_time_in_matter_epoch) from chip.tlv import uint -from matter_testing_support import (MatterBaseTest, async_test_body, compare_time, default_matter_test_main, type_matches, - utc_time_in_matter_epoch) from mobly import asserts diff --git a/src/python_testing/TC_TIMESYNC_2_8.py b/src/python_testing/TC_TIMESYNC_2_8.py index 418d6e8e41..82a77c4c88 100644 --- a/src/python_testing/TC_TIMESYNC_2_8.py +++ b/src/python_testing/TC_TIMESYNC_2_8.py @@ -19,12 +19,20 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import time @@ -34,9 +42,9 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError +from chip.testing.matter_testing import (MatterBaseTest, async_test_body, compare_time, default_matter_test_main, type_matches, + utc_time_in_matter_epoch) from chip.tlv import uint -from matter_testing_support import (MatterBaseTest, async_test_body, compare_time, default_matter_test_main, type_matches, - utc_time_in_matter_epoch) from mobly import asserts diff --git a/src/python_testing/TC_TIMESYNC_2_9.py b/src/python_testing/TC_TIMESYNC_2_9.py index 0fd6872d70..4ce83f81dd 100644 --- a/src/python_testing/TC_TIMESYNC_2_9.py +++ b/src/python_testing/TC_TIMESYNC_2_9.py @@ -19,12 +19,20 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --PICS src/app/tests/suites/certification/ci-pics-values +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import typing @@ -33,9 +41,9 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError +from chip.testing.matter_testing import (MatterBaseTest, async_test_body, compare_time, default_matter_test_main, type_matches, + utc_time_in_matter_epoch) from chip.tlv import uint -from matter_testing_support import (MatterBaseTest, async_test_body, compare_time, default_matter_test_main, type_matches, - utc_time_in_matter_epoch) from mobly import asserts diff --git a/src/python_testing/TC_TIMESYNC_3_1.py b/src/python_testing/TC_TIMESYNC_3_1.py index ad972345db..4c7c9d9420 100644 --- a/src/python_testing/TC_TIMESYNC_3_1.py +++ b/src/python_testing/TC_TIMESYNC_3_1.py @@ -19,16 +19,23 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_TMP_2_1.py b/src/python_testing/TC_TMP_2_1.py index f48b96991e..d0ae9cf86a 100644 --- a/src/python_testing/TC_TMP_2_1.py +++ b/src/python_testing/TC_TMP_2_1.py @@ -16,7 +16,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_TSTAT_4_2.py b/src/python_testing/TC_TSTAT_4_2.py index 387aeab6a8..85ff487a9d 100644 --- a/src/python_testing/TC_TSTAT_4_2.py +++ b/src/python_testing/TC_TSTAT_4_2.py @@ -18,24 +18,33 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import copy import logging import random +from collections import namedtuple import chip.clusters as Clusters from chip import ChipDeviceCtrl # Needed before chip.FabricAdmin from chip.clusters import Globals from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts logger = logging.getLogger(__name__) @@ -410,11 +419,6 @@ async def test_TC_TSTAT_4_2(self): logger.info( "Couldn't run test step 4 since there were no built-in presets") - # Send the SetActivePresetRequest command - await self.send_set_active_preset_handle_request_command(value=b'\x03') - - activePresetHandle = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.ActivePresetHandle) - self.step("5") if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): @@ -706,6 +710,28 @@ async def test_TC_TSTAT_4_2(self): self.step("18") if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): + ScenarioHeadroom = namedtuple("ScenarioHeadroom", "presetScenario remaining") + # Generate list of tuples of scenarios and number of remaining presets per scenario allowed + presetScenarioHeadrooms = list(ScenarioHeadroom(presetType.presetScenario, + presetType.numberOfPresets - presetScenarioCounts.get(presetType.presetScenario, 0)) for presetType in presetTypes) + + if presetScenarioHeadrooms: + # Find the preset scenario with the smallest number of remaining allowed presets + presetScenarioHeadrooms = sorted(presetScenarioHeadrooms, key=lambda psh: psh.remaining) + presetScenarioHeadroom = presetScenarioHeadrooms[0] + + # Add one more preset than is allowed by the preset type + test_presets = copy.deepcopy(current_presets) + test_presets.extend([cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=presetScenarioHeadroom.presetScenario, + coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=False)] * (presetScenarioHeadroom.remaining + 1)) + + await self.send_atomic_request_begin_command() + + await self.write_presets(endpoint=endpoint, presets=test_presets, expected_status=Status.ResourceExhausted) + + # Clear state for next test. + await self.send_atomic_request_rollback_command() + # Calculate the length of the Presets list that could be created using the preset scenarios in PresetTypes and numberOfPresets supported for each scenario. totalExpectedPresetsLength = sum(presetType.numberOfPresets for presetType in presetTypes) diff --git a/src/python_testing/TC_TestEventTrigger.py b/src/python_testing/TC_TestEventTrigger.py index 373fabf704..ae4f64a805 100644 --- a/src/python_testing/TC_TestEventTrigger.py +++ b/src/python_testing/TC_TestEventTrigger.py @@ -19,19 +19,31 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f -# test-runner-run/run1/script-args: --storage-path admin_storage.json --bool-arg allow_sdk_dac:true --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# script-args: > +# --storage-path admin_storage.json +# --bool-arg allow_sdk_dac:true +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.interaction_model import InteractionModelError -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts # Assumes `--enable-key 000102030405060708090a0b0c0d0e0f` on Linux app command line, or a DUT diff --git a/src/python_testing/TC_VALCC_2_1.py b/src/python_testing/TC_VALCC_2_1.py index ba9e98e3db..d6f00b00a6 100644 --- a/src/python_testing/TC_VALCC_2_1.py +++ b/src/python_testing/TC_VALCC_2_1.py @@ -16,19 +16,26 @@ # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.clusters.Types import NullValue -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_VALCC_3_1.py b/src/python_testing/TC_VALCC_3_1.py index e24c09db66..4b53ab032c 100644 --- a/src/python_testing/TC_VALCC_3_1.py +++ b/src/python_testing/TC_VALCC_3_1.py @@ -16,12 +16,19 @@ # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import time @@ -29,7 +36,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_VALCC_3_2.py b/src/python_testing/TC_VALCC_3_2.py index 9ef0886d8b..6905e3bde8 100644 --- a/src/python_testing/TC_VALCC_3_2.py +++ b/src/python_testing/TC_VALCC_3_2.py @@ -16,12 +16,19 @@ # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -30,7 +37,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_VALCC_3_3.py b/src/python_testing/TC_VALCC_3_3.py index ddf3ba83d1..a63053cf34 100644 --- a/src/python_testing/TC_VALCC_3_3.py +++ b/src/python_testing/TC_VALCC_3_3.py @@ -16,12 +16,19 @@ # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -30,7 +37,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_VALCC_3_4.py b/src/python_testing/TC_VALCC_3_4.py index 906854011a..30c57dcb3f 100644 --- a/src/python_testing/TC_VALCC_3_4.py +++ b/src/python_testing/TC_VALCC_3_4.py @@ -16,19 +16,26 @@ # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_VALCC_4_1.py b/src/python_testing/TC_VALCC_4_1.py index 183151af61..9af428d103 100644 --- a/src/python_testing/TC_VALCC_4_1.py +++ b/src/python_testing/TC_VALCC_4_1.py @@ -16,12 +16,19 @@ # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import time @@ -29,7 +36,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_VALCC_4_2.py b/src/python_testing/TC_VALCC_4_2.py index 7e331f5f0f..9365e5bc78 100644 --- a/src/python_testing/TC_VALCC_4_2.py +++ b/src/python_testing/TC_VALCC_4_2.py @@ -16,21 +16,27 @@ # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === -import logging import time import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts @@ -55,6 +61,7 @@ def steps_TC_VALCC_4_2(self) -> list[TestStep]: TestStep(8, "Send Close command"), TestStep(9, "Read OpenDuration attribute"), TestStep(10, "Read RemainingDuration attribute"), + TestStep(11, "Write DefaultOpenDuration back to original value") ] return steps @@ -73,16 +80,11 @@ async def test_TC_VALCC_4_2(self): attributes = Clusters.ValveConfigurationAndControl.Attributes self.step("2a") - defaultOpenDuration = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.DefaultOpenDuration) + originalDefaultOpenDuration = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.DefaultOpenDuration) self.step("2b") - if defaultOpenDuration is NullValue: - defaultOpenDuration = 60 - - result = await self.default_controller.WriteAttribute(self.dut_node_id, [(endpoint, attributes.DefaultOpenDuration(defaultOpenDuration))]) - asserts.assert_equal(result[0].Status, Status.Success, "DefaultOpenDuration write failed") - else: - logging.info("Test step skipped") + defaultOpenDuration = 60 + await self.write_single_attribute(attributes.DefaultOpenDuration(defaultOpenDuration), endpoint_id=endpoint) self.step(3) try: @@ -129,6 +131,9 @@ async def test_TC_VALCC_4_2(self): remaining_duration_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.RemainingDuration) asserts.assert_true(remaining_duration_dut is NullValue, "RemainingDuration is not null") + self.step(11) + await self.write_single_attribute(attributes.DefaultOpenDuration(originalDefaultOpenDuration), endpoint_id=endpoint) + if __name__ == "__main__": default_matter_test_main() diff --git a/src/python_testing/TC_VALCC_4_3.py b/src/python_testing/TC_VALCC_4_3.py index cdb8c38ca7..b0762d0d88 100644 --- a/src/python_testing/TC_VALCC_4_3.py +++ b/src/python_testing/TC_VALCC_4_3.py @@ -16,12 +16,19 @@ # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -29,7 +36,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_VALCC_4_4.py b/src/python_testing/TC_VALCC_4_4.py index 4fd1692da3..b85ff9a9f0 100644 --- a/src/python_testing/TC_VALCC_4_4.py +++ b/src/python_testing/TC_VALCC_4_4.py @@ -16,12 +16,19 @@ # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging @@ -29,7 +36,8 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, utc_time_in_matter_epoch +from chip.testing.matter_testing import (MatterBaseTest, TestStep, async_test_body, default_matter_test_main, + utc_time_in_matter_epoch) from mobly import asserts diff --git a/src/python_testing/TC_VALCC_4_5.py b/src/python_testing/TC_VALCC_4_5.py index b07f4281d1..c6b7674c6c 100644 --- a/src/python_testing/TC_VALCC_4_5.py +++ b/src/python_testing/TC_VALCC_4_5.py @@ -16,12 +16,19 @@ # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ALL_CLUSTERS_APP} +# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import time @@ -29,7 +36,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_WHM_1_2.py b/src/python_testing/TC_WHM_1_2.py index b8727671d1..2bbcdd5108 100644 --- a/src/python_testing/TC_WHM_1_2.py +++ b/src/python_testing/TC_WHM_1_2.py @@ -16,18 +16,32 @@ # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --application water-heater -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --enable-key 000102030405060708090a0b0c0d0e0f +# --application water-heater +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TC_WHM_2_1.py b/src/python_testing/TC_WHM_2_1.py index 3ed57876cd..b9dcb0257d 100644 --- a/src/python_testing/TC_WHM_2_1.py +++ b/src/python_testing/TC_WHM_2_1.py @@ -19,19 +19,31 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 -# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} -# test-runner-run/run1/factoryreset: True -# test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --application evse -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-runs: +# run1: +# app: ${ENERGY_MANAGEMENT_APP} +# app-args: > +# --discriminator 1234 +# --KVS kvs1 +# --trace-to json:${TRACE_APP}.json +# --application evse +# script-args: > +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --endpoint 1 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import logging import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches from mobly import asserts diff --git a/src/python_testing/TC_pics_checker.py b/src/python_testing/TC_pics_checker.py index 91e2102b5e..07e8613cc1 100644 --- a/src/python_testing/TC_pics_checker.py +++ b/src/python_testing/TC_pics_checker.py @@ -17,13 +17,13 @@ import math import chip.clusters as Clusters -from basic_composition_support import BasicCompositionTests -from global_attribute_ids import GlobalAttributeIds -from matter_testing_support import (AttributePathLocation, ClusterPathLocation, CommandPathLocation, FeaturePathLocation, - MatterBaseTest, ProblemLocation, TestStep, async_test_body, default_matter_test_main) +from chip.testing.basic_composition import BasicCompositionTests +from chip.testing.global_attribute_ids import GlobalAttributeIds +from chip.testing.matter_testing import (AttributePathLocation, ClusterPathLocation, CommandPathLocation, FeaturePathLocation, + MatterBaseTest, ProblemLocation, TestStep, async_test_body, default_matter_test_main) +from chip.testing.pics import accepted_cmd_pics_str, attribute_pics_str, feature_pics_str, generated_cmd_pics_str +from chip.testing.spec_parsing import build_xml_clusters from mobly import asserts -from pics_support import accepted_cmd_pics_str, attribute_pics_str, feature_pics_str, generated_cmd_pics_str -from spec_parsing_support import build_xml_clusters class TC_PICS_Checker(MatterBaseTest, BasicCompositionTests): diff --git a/src/python_testing/TestBatchInvoke.py b/src/python_testing/TestBatchInvoke.py index cf10fbb227..6465692c95 100644 --- a/src/python_testing/TestBatchInvoke.py +++ b/src/python_testing/TestBatchInvoke.py @@ -30,7 +30,7 @@ # --passcode 20202021 # --trace-to json:${TRACE_TEST_JSON}.json # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto -# factoryreset: true +# factory-reset: true # quiet: true # === END CI TEST ARGUMENTS === @@ -38,7 +38,7 @@ import chip.clusters as Clusters from chip.interaction_model import InteractionModelError -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main, type_matches from mobly import asserts ''' Integration test of batch commands using UnitTesting Cluster diff --git a/src/python_testing/TestChoiceConformanceSupport.py b/src/python_testing/TestChoiceConformanceSupport.py index 8436bc8418..77eca93761 100644 --- a/src/python_testing/TestChoiceConformanceSupport.py +++ b/src/python_testing/TestChoiceConformanceSupport.py @@ -19,11 +19,11 @@ import xml.etree.ElementTree as ElementTree import jinja2 -from choice_conformance_support import (evaluate_attribute_choice_conformance, evaluate_command_choice_conformance, - evaluate_feature_choice_conformance) -from matter_testing_support import MatterBaseTest, ProblemNotice, default_matter_test_main +from chip.testing.choice_conformance import (evaluate_attribute_choice_conformance, evaluate_command_choice_conformance, + evaluate_feature_choice_conformance) +from chip.testing.matter_testing import MatterBaseTest, ProblemNotice, default_matter_test_main +from chip.testing.spec_parsing import XmlCluster, add_cluster_data_from_xml from mobly import asserts -from spec_parsing_support import XmlCluster, add_cluster_data_from_xml FEATURE_TEMPLATE = '''\ diff --git a/src/python_testing/TestCommissioningTimeSync.py b/src/python_testing/TestCommissioningTimeSync.py index dfd03d957d..d4033ea58b 100644 --- a/src/python_testing/TestCommissioningTimeSync.py +++ b/src/python_testing/TestCommissioningTimeSync.py @@ -20,7 +20,7 @@ from chip import ChipDeviceCtrl from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, utc_time_in_matter_epoch +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main, utc_time_in_matter_epoch from mobly import asserts # We don't have a good pipe between the c++ enums in CommissioningDelegate and python diff --git a/src/python_testing/TestConformanceSupport.py b/src/python_testing/TestConformanceSupport.py index 3744b6fe5e..ca41bf088e 100644 --- a/src/python_testing/TestConformanceSupport.py +++ b/src/python_testing/TestConformanceSupport.py @@ -18,11 +18,11 @@ import xml.etree.ElementTree as ElementTree from typing import Callable +from chip.testing.conformance import (Choice, Conformance, ConformanceDecision, ConformanceException, ConformanceParseParameters, + deprecated, disallowed, mandatory, optional, parse_basic_callable_from_xml, + parse_callable_from_xml, parse_device_type_callable_from_xml, provisional, zigbee) +from chip.testing.matter_testing import MatterBaseTest, default_matter_test_main from chip.tlv import uint -from conformance_support import (Choice, Conformance, ConformanceDecision, ConformanceException, ConformanceParseParameters, - deprecated, disallowed, mandatory, optional, parse_basic_callable_from_xml, - parse_callable_from_xml, parse_device_type_callable_from_xml, provisional, zigbee) -from matter_testing_support import MatterBaseTest, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TestConformanceTest.py b/src/python_testing/TestConformanceTest.py index f0ff8032ea..ddf3e421a7 100644 --- a/src/python_testing/TestConformanceTest.py +++ b/src/python_testing/TestConformanceTest.py @@ -18,12 +18,12 @@ from typing import Any import chip.clusters as Clusters -from basic_composition_support import arls_populated -from conformance_support import ConformanceDecision -from global_attribute_ids import GlobalAttributeIds -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.basic_composition import arls_populated +from chip.testing.conformance import ConformanceDecision +from chip.testing.global_attribute_ids import GlobalAttributeIds +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.spec_parsing import build_xml_clusters, build_xml_device_types from mobly import asserts -from spec_parsing_support import build_xml_clusters, build_xml_device_types from TC_DeviceConformance import DeviceConformanceTests diff --git a/src/python_testing/TestGroupTableReports.py b/src/python_testing/TestGroupTableReports.py index 738b2089a1..9d98a050c7 100644 --- a/src/python_testing/TestGroupTableReports.py +++ b/src/python_testing/TestGroupTableReports.py @@ -30,7 +30,7 @@ # --passcode 20202021 # --trace-to json:${TRACE_TEST_JSON}.json # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto -# factoryreset: true +# factory-reset: true # quiet: true # === END CI TEST ARGUMENTS === @@ -42,7 +42,7 @@ from chip.clusters import ClusterObjects as ClusterObjects from chip.clusters.Attribute import SubscriptionTransaction, TypedAttributePath from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/TestIdChecks.py b/src/python_testing/TestIdChecks.py index 8969807d58..c86d4bfe6d 100644 --- a/src/python_testing/TestIdChecks.py +++ b/src/python_testing/TestIdChecks.py @@ -15,9 +15,10 @@ # limitations under the License. # -from global_attribute_ids import (AttributeIdType, ClusterIdType, DeviceTypeIdType, attribute_id_type, cluster_id_type, - device_type_id_type, is_valid_attribute_id, is_valid_cluster_id, is_valid_device_type_id) -from matter_testing_support import MatterBaseTest, default_matter_test_main +from chip.testing.global_attribute_ids import (AttributeIdType, ClusterIdType, CommandIdType, DeviceTypeIdType, attribute_id_type, + cluster_id_type, command_id_type, device_type_id_type, is_valid_attribute_id, + is_valid_cluster_id, is_valid_command_id, is_valid_device_type_id) +from chip.testing.matter_testing import MatterBaseTest, default_matter_test_main from mobly import asserts @@ -209,6 +210,71 @@ def check_all_bad(id): for id in prefix_bad: check_all_bad(id) + def test_command_ids(self): + standard_global_good = [0x0000_00E0, 0x0000_00FF, 0x0000_00E1, 0x0000_00FE] + standard_global_bad = [0x0000_01E0, 0x0000_0FFF, 0x0000_AAE1, 0x0000_BBFE, 0x0000_FFFF] + scoped_non_global_good = [0x0000_0000, 0x0000_00DF, 0x0000_0001] + scoped_non_global_bad = [0x0000_0F00, 0x0000_01DF, 0x0000_0F01] + manufacturer_good = [0x0001_0000, 0x0001_00FF, 0xFFF0_0000, 0xFFF0_00FF, 0x0001_00FE] + manufacturer_bad = [0x0001_0A00, 0x0001_0BFF, 0x0001_FFFF, 0xFFF0_0C00, 0xFFF0_D0FF, 0x0001_F0FE] + test_good = [0xFFF1_0000, 0xFFF1_00E0, 0xFFF1_00FF, 0xFFF4_0000, 0xFFF4_00E0, 0xFFF4_00FF] + test_bad = [0xFFF1_5000, 0xFFF1_F000, 0xFFF1_FFFF, 0xFFF4_5000, 0xFFF4_F000, 0xFFF4_FFFF] + prefix_bad = [0xFFF5_0000, 0xFFF5_4FFF, 0xFFF5_5000, 0xFFF5_F000, 0xFFF5_FFFF] + + def check_standard_global(id): + id_type = command_id_type(id) + msg = f"Incorrect command range assessment, expecting standard global {id:08x}, type = {id_type}" + asserts.assert_equal(id_type, CommandIdType.kStandardGlobal, msg) + asserts.assert_true(is_valid_command_id(id_type, allow_test=True), msg) + asserts.assert_true(is_valid_command_id(id_type, allow_test=False), msg) + + def check_scoped_non_global(id): + id_type = command_id_type(id) + msg = f"Incorrect command range assessment, expecting scoped non-global {id:08x}, type = {id_type}" + asserts.assert_equal(id_type, CommandIdType.kScopedNonGlobal, msg) + asserts.assert_true(is_valid_command_id(id_type, allow_test=True), msg) + asserts.assert_true(is_valid_command_id(id_type, allow_test=False), msg) + + def check_manufacturer(id): + id_type = command_id_type(id) + msg = f"Incorrect command range assessment, expecting manufacturer {id:08x}, type = {id_type}" + asserts.assert_equal(id_type, CommandIdType.kManufacturer, msg) + asserts.assert_true(is_valid_command_id(id_type, allow_test=True), msg) + asserts.assert_true(is_valid_command_id(id_type, allow_test=False), msg) + + def check_test(id): + id_type = command_id_type(id) + msg = f"Incorrect command range assessment, expecting test {id:08x}, type = {id_type}" + asserts.assert_equal(id_type, CommandIdType.kTest, msg) + asserts.assert_true(is_valid_command_id(id_type, allow_test=True), msg) + asserts.assert_false(is_valid_command_id(id_type, allow_test=False), msg) + + def check_all_bad(id): + id_type = command_id_type(id) + msg = f"Incorrect command range assessment, expecting invalid {id:08x}, type = {id_type}" + asserts.assert_equal(id_type, CommandIdType.kInvalid, msg) + asserts.assert_false(is_valid_command_id(id_type, allow_test=True), msg) + asserts.assert_false(is_valid_command_id(id_type, allow_test=False), msg) + + for id in standard_global_good: + check_standard_global(id) + for id in standard_global_bad: + check_all_bad(id) + for id in scoped_non_global_good: + check_scoped_non_global(id) + for id in scoped_non_global_bad: + check_all_bad(id) + for id in manufacturer_good: + check_manufacturer(id) + for id in manufacturer_bad: + check_all_bad(id) + for id in test_good: + check_test(id) + for id in test_bad: + check_all_bad(id) + for id in prefix_bad: + check_all_bad(id) + if __name__ == "__main__": default_matter_test_main() diff --git a/src/python_testing/TestMatterTestingSupport.py b/src/python_testing/TestMatterTestingSupport.py index d2a259f154..d39c869456 100644 --- a/src/python_testing/TestMatterTestingSupport.py +++ b/src/python_testing/TestMatterTestingSupport.py @@ -22,14 +22,15 @@ import chip.clusters as Clusters from chip.clusters.Types import Nullable, NullValue +from chip.testing.matter_testing import (MatterBaseTest, async_test_body, compare_time, default_matter_test_main, + get_wait_seconds_from_set_time, parse_matter_test_args, type_matches, + utc_time_in_matter_epoch) +from chip.testing.pics import parse_pics, parse_pics_xml +from chip.testing.taglist_and_topology_test import (TagProblem, create_device_type_list_for_root, create_device_type_lists, + find_tag_list_problems, find_tree_roots, flat_list_ok, get_all_children, + get_direct_children_of_root, parts_list_cycles, separate_endpoint_types) from chip.tlv import uint -from matter_testing_support import (MatterBaseTest, async_test_body, compare_time, default_matter_test_main, - get_wait_seconds_from_set_time, type_matches, utc_time_in_matter_epoch) from mobly import asserts, signals -from pics_support import parse_pics, parse_pics_xml -from taglist_and_topology_test_support import (TagProblem, create_device_type_list_for_root, create_device_type_lists, - find_tag_list_problems, find_tree_roots, flat_list_ok, get_all_children, - get_direct_children_of_root, parts_list_cycles, separate_endpoint_types) def get_raw_type_list(): @@ -548,6 +549,14 @@ def test_tag_list_problems(self): problems = find_tag_list_problems(roots, device_types, simple) asserts.assert_equal(len(problems), 0, "Unexpected problems found in list") + # Tags with mfg tags + tag_mfg = Clusters.Descriptor.Structs.SemanticTagStruct(mfgCode=0xFFF1, label="test") + tag_label = Clusters.Descriptor.Structs.SemanticTagStruct(tag=1, label="test") + simple[1][Clusters.Descriptor][Clusters.Descriptor.Attributes.TagList] = [tag1, tag_mfg] + simple[2][Clusters.Descriptor][Clusters.Descriptor.Attributes.TagList] = [tag1, tag_label] + problems = find_tag_list_problems(roots, device_types, simple) + asserts.assert_equal(len(problems), 0, "Unexpected problems found in list") + def test_root_node_tag_list_functions(self): # Example topology - see comment above for the layout. # There are 4 direct children of root 0 @@ -629,6 +638,24 @@ def test_xml_pics(self): self.pics_assert('BINFO.S.A0014', False) self.pics_assert('PICSDOESNOTEXIST', False) + def test_parse_matter_test_args(self): + args = [ + # Verify that values are appended to a single argument + "--int-arg", "PIXIT.TEST.DEC:42", + "--int-arg", "PIXIT.TEST.HEX:0x1234", + # Verify that multiple values can be passed for a single argument + "--string-arg", "PIXIT.TEST.STR.MULTI.1:foo", "PIXIT.TEST.STR.MULTI.2:bar", + # Verify JSON parsing + "--json-arg", "PIXIT.TEST.JSON:{\"key\":\"value\"}", + ] + + parsed = parse_matter_test_args(args) + asserts.assert_equal(parsed.global_test_params.get("PIXIT.TEST.DEC"), 42) + asserts.assert_equal(parsed.global_test_params.get("PIXIT.TEST.HEX"), 0x1234) + asserts.assert_equal(parsed.global_test_params.get("PIXIT.TEST.STR.MULTI.1"), "foo") + asserts.assert_equal(parsed.global_test_params.get("PIXIT.TEST.STR.MULTI.2"), "bar") + asserts.assert_equal(parsed.global_test_params.get("PIXIT.TEST.JSON"), {"key": "value"}) + if __name__ == "__main__": default_matter_test_main() diff --git a/src/python_testing/TestSpecParsingDeviceType.py b/src/python_testing/TestSpecParsingDeviceType.py index 7729ccee8a..a9ee14f12b 100644 --- a/src/python_testing/TestSpecParsingDeviceType.py +++ b/src/python_testing/TestSpecParsingDeviceType.py @@ -18,12 +18,12 @@ import chip.clusters as Clusters from chip.clusters import Attribute +from chip.testing.conformance import conformance_allowed +from chip.testing.matter_testing import MatterBaseTest, default_matter_test_main +from chip.testing.spec_parsing import build_xml_clusters, build_xml_device_types, parse_single_device_type from chip.tlv import uint -from conformance_support import conformance_allowed from jinja2 import Template -from matter_testing_support import MatterBaseTest, default_matter_test_main from mobly import asserts -from spec_parsing_support import build_xml_clusters, build_xml_device_types, parse_single_device_type from TC_DeviceConformance import DeviceConformanceTests diff --git a/src/python_testing/TestSpecParsingSupport.py b/src/python_testing/TestSpecParsingSupport.py index 4e0171b077..b4c908c232 100644 --- a/src/python_testing/TestSpecParsingSupport.py +++ b/src/python_testing/TestSpecParsingSupport.py @@ -15,17 +15,16 @@ # limitations under the License. # -import os import xml.etree.ElementTree as ElementTree import chip.clusters as Clusters import jinja2 -from global_attribute_ids import GlobalAttributeIds -from matter_testing_support import MatterBaseTest, ProblemNotice, default_matter_test_main +from chip.testing.global_attribute_ids import GlobalAttributeIds +from chip.testing.matter_testing import MatterBaseTest, ProblemNotice, default_matter_test_main +from chip.testing.spec_parsing import (ClusterParser, DataModelLevel, PrebuiltDataModelDirectory, SpecParsingException, XmlCluster, + add_cluster_data_from_xml, build_xml_clusters, check_clusters_for_unknown_commands, + combine_derived_clusters_with_base, get_data_model_directory) from mobly import asserts -from spec_parsing_support import (ClusterParser, PrebuiltDataModelDirectory, SpecParsingException, XmlCluster, - add_cluster_data_from_xml, build_xml_clusters, check_clusters_for_unknown_commands, - combine_derived_clusters_with_base) # TODO: improve the test coverage here # https://github.com/project-chip/connectedhomeip/issues/30958 @@ -272,10 +271,10 @@ def test_build_xml_override(self): asserts.assert_equal(set(one_four_clusters.keys())-set(tot_xml_clusters.keys()), set(), "There are some 1.4 clusters that are not included in the TOT spec") - str_path = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), - '..', '..', 'data_model', '1.4', 'clusters')) + str_path = get_data_model_directory(PrebuiltDataModelDirectory.k1_4, DataModelLevel.kCluster) string_override_check, problems = build_xml_clusters(str_path) - asserts.assert_equal(string_override_check.keys(), self.spec_xml_clusters.keys(), "Mismatched cluster generation") + + asserts.assert_count_equal(string_override_check.keys(), self.spec_xml_clusters.keys(), "Mismatched cluster generation") with asserts.assert_raises(SpecParsingException): build_xml_clusters("baddir") diff --git a/src/python_testing/TestTimeSyncTrustedTimeSource.py b/src/python_testing/TestTimeSyncTrustedTimeSource.py index 2f4c9a1f55..50bca6f3da 100644 --- a/src/python_testing/TestTimeSyncTrustedTimeSource.py +++ b/src/python_testing/TestTimeSyncTrustedTimeSource.py @@ -18,7 +18,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts # We don't have a good pipe between the c++ enums in CommissioningDelegate and python diff --git a/src/python_testing/TestUnitTestingErrorPath.py b/src/python_testing/TestUnitTestingErrorPath.py index b49e8a656d..872f1fa930 100644 --- a/src/python_testing/TestUnitTestingErrorPath.py +++ b/src/python_testing/TestUnitTestingErrorPath.py @@ -30,7 +30,7 @@ # --passcode 20202021 # --trace-to json:${TRACE_TEST_JSON}.json # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto -# factoryreset: true +# factory-reset: true # quiet: true # === END CI TEST ARGUMENTS === @@ -38,7 +38,7 @@ import chip.clusters as Clusters from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts """ Integration test for error path returns via the UnitTesting cluster. diff --git a/src/python_testing/drlk_2_x_common.py b/src/python_testing/drlk_2_x_common.py index 92c0ab23ce..cdd1382292 100644 --- a/src/python_testing/drlk_2_x_common.py +++ b/src/python_testing/drlk_2_x_common.py @@ -23,7 +23,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import InteractionModelError, Status -from matter_testing_support import type_matches +from chip.testing.matter_testing import type_matches from mobly import asserts diff --git a/src/python_testing/execute_python_tests.py b/src/python_testing/execute_python_tests.py index 57bd117cf1..34a391873b 100644 --- a/src/python_testing/execute_python_tests.py +++ b/src/python_testing/execute_python_tests.py @@ -53,13 +53,10 @@ def main(search_directory, env_file): # Define the base command to run tests base_command = os.path.join(chip_root, "scripts/tests/run_python_test.py") - # Define the files and patterns to exclude + # Define the test python script files and patterns to exclude excluded_patterns = { "MinimalRepresentation.py", # Code/Test not being used or not shared code for any other tests "TC_CNET_4_4.py", # It has no CI execution block, is not executed in CI - "TC_CCTRL_2_1.py", # They rely on example applications that inter-communicate and there is no example app that works right now - "TC_CCTRL_2_2.py", # They rely on example applications that inter-communicate and there is no example app that works right now - "TC_CCTRL_2_3.py", # They rely on example applications that inter-communicate and there is no example app that works right now "TC_DGGEN_3_2.py", # src/python_testing/test_testing/test_TC_DGGEN_3_2.py is the Unit test of this test "TC_EEVSE_Utils.py", # Shared code for TC_EEVSE, not a standalone test "TC_EWATERHTRBase.py", # Shared code for TC_EWATERHTR, not a standalone test @@ -69,7 +66,6 @@ def main(search_directory, env_file): "TC_TMP_2_1.py", # src/python_testing/test_testing/test_TC_TMP_2_1.py is the Unit test of this test "TC_OCC_3_1.py", # There are CI issues for the test cases that implements manually controlling sensor device for the occupancy state ON/OFF change "TC_OCC_3_2.py", # There are CI issues for the test cases that implements manually controlling sensor device for the occupancy state ON/OFF change - "TC_BRBINFO_4_1.py", # This test requires a TH_ICD_SERVER application, hence not ready run with CI "TestCommissioningTimeSync.py", # Code/Test not being used or not shared code for any other tests "TestConformanceSupport.py", # Unit test - does not run against an app "TestChoiceConformanceSupport.py", # Unit test - does not run against an app @@ -88,14 +84,6 @@ def main(search_directory, env_file): "hello_test.py", # Is a template for tests "test_plan_support.py", # Shared code for TC_*, not a standalone test "test_plan_table_generator.py", # Code/Test not being used or not shared code for any other tests - "basic_composition_support.py", # Test support/shared code script, not a standalone test - "choice_conformance_support.py", # Test support/shared code script, not a standalone test - "conformance_support.py", # Test support/shared code script, not a standalone test - "global_attribute_ids.py", # Test support/shared code script, not a standalone test - "matter_testing_support.py", # Test support/shared code script, not a standalone test - "pics_support.py", # Test support/shared code script, not a standalone test - "spec_parsing_support.py", # Test support/shared code script, not a standalone test - "taglist_and_topology_test_support.py" # Test support/shared code script, not a standalone test } # Get all .py files in the directory diff --git a/src/python_testing/hello_external_runner.py b/src/python_testing/hello_external_runner.py index 5f00eeb287..64af55ce07 100755 --- a/src/python_testing/hello_external_runner.py +++ b/src/python_testing/hello_external_runner.py @@ -23,8 +23,8 @@ from multiprocessing import Process from multiprocessing.managers import BaseManager +from chip.testing.matter_testing import MatterTestConfig, get_test_info, run_tests from hello_test import HelloTest -from matter_testing_support import MatterTestConfig, get_test_info, run_tests try: from matter_yamltests.hooks import TestRunnerHooks diff --git a/src/python_testing/hello_test.py b/src/python_testing/hello_test.py index ef6bce8040..2d910b1e52 100644 --- a/src/python_testing/hello_test.py +++ b/src/python_testing/hello_test.py @@ -30,7 +30,7 @@ # --passcode 20202021 # --trace-to json:${TRACE_TEST_JSON}.json # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto -# factoryreset: true +# factory-reset: true # quiet: true # === END CI TEST ARGUMENTS === @@ -38,7 +38,7 @@ import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from chip.testing.matter_testing import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts diff --git a/src/python_testing/matter_testing_infrastructure/BUILD.gn b/src/python_testing/matter_testing_infrastructure/BUILD.gn index c8d54fb008..19c7aee68d 100644 --- a/src/python_testing/matter_testing_infrastructure/BUILD.gn +++ b/src/python_testing/matter_testing_infrastructure/BUILD.gn @@ -18,7 +18,6 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") import("$dir_pw_build/python.gni") -# Python package for CHIP testing support. pw_python_package("chip-testing") { setup = [ "setup.py", @@ -30,7 +29,16 @@ pw_python_package("chip-testing") { sources = [ "chip/testing/__init__.py", + "chip/testing/apps.py", + "chip/testing/basic_composition.py", + "chip/testing/choice_conformance.py", + "chip/testing/conformance.py", + "chip/testing/global_attribute_ids.py", + "chip/testing/matter_testing.py", "chip/testing/metadata.py", + "chip/testing/pics.py", + "chip/testing/spec_parsing.py", + "chip/testing/taglist_and_topology_test.py", "chip/testing/tasks.py", ] diff --git a/src/python_testing/matter_testing_infrastructure/chip/testing/apps.py b/src/python_testing/matter_testing_infrastructure/chip/testing/apps.py new file mode 100644 index 0000000000..3b21a1c050 --- /dev/null +++ b/src/python_testing/matter_testing_infrastructure/chip/testing/apps.py @@ -0,0 +1,69 @@ +# Copyright (c) 2024 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 os +import signal +import tempfile + +from chip.testing.tasks import Subprocess + + +class AppServerSubprocess(Subprocess): + """Wrapper class for starting an application server in a subprocess.""" + + # Prefix for log messages from the application server. + PREFIX = b"[SERVER]" + + def __init__(self, app: str, storage_dir: str, discriminator: int, + passcode: int, port: int = 5540): + self.kvs_fd, kvs_path = tempfile.mkstemp(dir=storage_dir, prefix="kvs-app-") + # Start the server application with dedicated KVS storage. + super().__init__(app, "--KVS", kvs_path, + '--secured-device-port', str(port), + "--discriminator", str(discriminator), + "--passcode", str(passcode), + output_cb=lambda line, is_stderr: self.PREFIX + line) + + def __del__(self): + # Do not leak KVS file descriptor. + os.close(self.kvs_fd) + + +class IcdAppServerSubprocess(AppServerSubprocess): + """Wrapper class for starting an ICD application server in a subprocess.""" + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.paused = False + + def pause(self, check_state: bool = True): + if check_state and self.paused: + raise ValueError("ICD TH Server unexpectedly is already paused") + if not self.paused: + # Stop (halt) the ICD server process by sending a SIGTOP signal. + self.p.send_signal(signal.SIGSTOP) + self.paused = True + + def resume(self, check_state: bool = True): + if check_state and not self.paused: + raise ValueError("ICD TH Server unexpectedly is already running") + if self.paused: + # Resume (continue) the ICD server process by sending a SIGCONT signal. + self.p.send_signal(signal.SIGCONT) + self.paused = False + + def terminate(self): + # Make sure the ICD server process is not paused before terminating it. + self.resume(check_state=False) + super().terminate() diff --git a/src/python_testing/basic_composition_support.py b/src/python_testing/matter_testing_infrastructure/chip/testing/basic_composition.py similarity index 100% rename from src/python_testing/basic_composition_support.py rename to src/python_testing/matter_testing_infrastructure/chip/testing/basic_composition.py diff --git a/src/python_testing/choice_conformance_support.py b/src/python_testing/matter_testing_infrastructure/chip/testing/choice_conformance.py similarity index 93% rename from src/python_testing/choice_conformance_support.py rename to src/python_testing/matter_testing_infrastructure/chip/testing/choice_conformance.py index 58d37bf101..7e7775d555 100644 --- a/src/python_testing/choice_conformance_support.py +++ b/src/python_testing/matter_testing_infrastructure/chip/testing/choice_conformance.py @@ -1,8 +1,8 @@ +from chip.testing.conformance import Choice, ConformanceDecisionWithChoice +from chip.testing.global_attribute_ids import GlobalAttributeIds +from chip.testing.matter_testing import AttributePathLocation, ProblemNotice, ProblemSeverity +from chip.testing.spec_parsing import XmlCluster from chip.tlv import uint -from conformance_support import Choice, ConformanceDecisionWithChoice -from global_attribute_ids import GlobalAttributeIds -from matter_testing_support import AttributePathLocation, ProblemNotice, ProblemSeverity -from spec_parsing_support import XmlCluster class ChoiceConformanceProblemNotice(ProblemNotice): diff --git a/src/python_testing/conformance_support.py b/src/python_testing/matter_testing_infrastructure/chip/testing/conformance.py similarity index 100% rename from src/python_testing/conformance_support.py rename to src/python_testing/matter_testing_infrastructure/chip/testing/conformance.py diff --git a/src/python_testing/global_attribute_ids.py b/src/python_testing/matter_testing_infrastructure/chip/testing/global_attribute_ids.py similarity index 81% rename from src/python_testing/global_attribute_ids.py rename to src/python_testing/matter_testing_infrastructure/chip/testing/global_attribute_ids.py index e692adfdfb..f9fbd2e2ad 100644 --- a/src/python_testing/global_attribute_ids.py +++ b/src/python_testing/matter_testing_infrastructure/chip/testing/global_attribute_ids.py @@ -61,6 +61,15 @@ class AttributeIdType(Enum): kManufacturer = auto(), kTest = auto(), + +class CommandIdType(Enum): + kInvalid = auto() + kStandardGlobal = auto(), + kScopedNonGlobal = auto(), + kManufacturer = auto(), + kTest = auto(), + + # ID helper classes - this allows us to use the values from the prefix and suffix table directly # because the class handles the non-inclusive range. @@ -92,6 +101,9 @@ def __contains__(self, id: int): CLUSTER_ID_MANUFACTURER_RANGE_SUFFIX = SuffixIdRange(0xFC00, 0xFFFE) ATTRIBUTE_ID_GLOBAL_RANGE_SUFFIX = SuffixIdRange(0xF000, 0xFFFE) ATTRIBUTE_ID_NON_GLOBAL_RANGE_SUFFIX = SuffixIdRange(0x0000, 0x4FFF) +COMMAND_ID_GLOBAL_STANDARD_SUFFIX = SuffixIdRange(0x00E0, 0x00FF) +COMMAND_ID_NON_GLOBAL_SCOPED_SUFFIX = SuffixIdRange(0x0000, 0x00DF) +COMMAND_ID_SUFFIX = SuffixIdRange(0x0000, 0x00FF) def device_type_id_type(id: int) -> DeviceTypeIdType: @@ -145,3 +157,22 @@ def is_valid_attribute_id(id_type: AttributeIdType, allow_test: bool = False): if allow_test: valid.append(AttributeIdType.kTest) return id_type in valid + + +def command_id_type(id: int) -> CommandIdType: + if id in STANDARD_PREFIX and id in COMMAND_ID_GLOBAL_STANDARD_SUFFIX: + return CommandIdType.kStandardGlobal + if id in STANDARD_PREFIX and id in COMMAND_ID_NON_GLOBAL_SCOPED_SUFFIX: + return CommandIdType.kScopedNonGlobal + if id in MANUFACTURER_PREFIX and id in COMMAND_ID_SUFFIX: + return CommandIdType.kManufacturer + if id in TEST_PREFIX and id in COMMAND_ID_SUFFIX: + return CommandIdType.kTest + return CommandIdType.kInvalid + + +def is_valid_command_id(id_type: CommandIdType, allow_test: bool = False): + valid = [CommandIdType.kStandardGlobal, CommandIdType.kScopedNonGlobal, CommandIdType.kManufacturer] + if allow_test: + valid.append(CommandIdType.kTest) + return id_type in valid diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py similarity index 97% rename from src/python_testing/matter_testing_support.py rename to src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py index 92cde9edb6..053fa575c6 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py @@ -38,6 +38,7 @@ from datetime import datetime, timedelta, timezone from enum import Enum, IntFlag from functools import partial +from itertools import chain from typing import Any, Iterable, List, Optional, Tuple from chip.tlv import float32, uint @@ -64,12 +65,12 @@ from chip.interaction_model import InteractionModelError, Status from chip.setup_payload import SetupPayload from chip.storage import PersistentStorage +from chip.testing.global_attribute_ids import GlobalAttributeIds +from chip.testing.pics import read_pics_from_file from chip.tracing import TracingContext -from global_attribute_ids import GlobalAttributeIds from mobly import asserts, base_test, signals, utils from mobly.config_parser import ENV_MOBLY_LOGPATH, TestRunConfig from mobly.test_runner import TestRunner -from pics_support import read_pics_from_file try: from matter_yamltests.hooks import TestRunnerHooks @@ -584,9 +585,9 @@ def step_skipped(self, name: str, expression: str): # TODO: Do we really need the expression as a string? We can evaluate this in code very easily logging.info(f'\t\t**** Skipping: {name}') - def step_start(self, name: str, endpoint: int | None = None): - # TODO: The way I'm calling this, the name already includes the step number, but it seems like it might be good to separate these - logging.info(f'\t\t***** Test Step {name} started with endpoint {endpoint} ') + def step_start(self, name: str): + # The way I'm calling this, the name is already includes the step number, but it seems like it might be good to separate these + logging.info(f'\t\t***** Test Step {name}') def step_success(self, logger, logs, duration: int, request): pass @@ -915,10 +916,12 @@ def hex_from_bytes(b: bytes) -> str: class TestStep: test_plan_number: typing.Union[int, str] description: str - endpoint: int | None = None expectation: str = "" is_commissioning: bool = False + def __str__(self): + return f'{self.test_plan_number}: {self.description}\tExpected outcome: {self.expectation}' + @dataclass class TestInfo: @@ -1283,9 +1286,8 @@ async def check_test_event_triggers_enabled(self): test_event_enabled = await self.read_single_attribute_check_success(endpoint=0, cluster=cluster, attribute=full_attr) asserts.assert_equal(test_event_enabled, True, "TestEventTriggersEnabled is False") - def print_step(self, stepnum: typing.Union[int, str], title: str, endpoint: int | None = None) -> None: - endpoint_info = f" with endpoint {endpoint}" if endpoint is not None else "" - logging.info(f'***** Test Step {stepnum} : {title}{endpoint_info}') + def print_step(self, stepnum: typing.Union[int, str], title: str) -> None: + logging.info(f'***** Test Step {stepnum} : {title}') def record_error(self, test_name: str, location: ProblemLocation, problem: str, spec_location: str = ""): self.problems.append(ProblemNotice(test_name, location, ProblemSeverity.ERROR, problem, spec_location)) @@ -1326,7 +1328,7 @@ def extract_error_text() -> tuple[str, str]: if not trace: return no_stack_trace - if isinstance(exception, signals.TestError): + if isinstance(exception, signals.TestError) or isinstance(exception, signals.TestFailure): # Exception gets raised by the mobly framework, so the proximal error is one line back in the stack trace assert_candidates = [idx for idx, line in enumerate(trace) if "asserts" in line and "asserts.py" not in line] if not assert_candidates: @@ -1344,6 +1346,9 @@ def extract_error_text() -> tuple[str, str]: return probable_error.strip(), trace[file_candidates[-1]].strip() probable_error, probable_file = extract_error_text() + test_steps = self.get_defined_test_steps(self.current_test_info.name) + test_step = str(test_steps[self.current_step_index-1] + ) if test_steps is not None else 'UNKNOWN - no test steps provided in test script' logging.error(textwrap.dedent(f""" ****************************************************************** @@ -1354,8 +1359,12 @@ def extract_error_text() -> tuple[str, str]: * {probable_file} * {probable_error} * + * Test step: + * {test_step} + * + * Endpoint: {self.matter_test_config.endpoint} + * ******************************************************************* - """)) def on_pass(self, record): @@ -1428,8 +1437,7 @@ def mark_current_step_skipped(self): # TODO: I very much do not want to have people passing in strings here. Do we really need the expression # as a string? Does it get used by the TH? self.runner_hook.step_skipped(name=str(num), expression="") - else: - logging.info(f'**** Skipping: {num}') + logging.info(f'**** Skipping: {num}') self.step_skipped = True def skip_step(self, step): @@ -1455,7 +1463,7 @@ def skip_all_remaining_steps(self, starting_step_number): for step in remaining: self.skip_step(step.test_plan_number) - def step(self, step: typing.Union[int, str], endpoint: Optional[int] = None): + def step(self, step: typing.Union[int, str]): test_name = self.current_test_info.name steps = self.get_test_steps(test_name) @@ -1464,6 +1472,8 @@ def step(self, step: typing.Union[int, str], endpoint: Optional[int] = None): asserts.fail(f'Unexpected test step: {step} - steps not called in order, or step does not exist') current_step = steps[self.current_step_index] + self.print_step(step, current_step.description) + if self.runner_hook: # If we've reached the next step with no assertion and the step wasn't skipped, it passed if not self.step_skipped and self.current_step_index != 0: @@ -1471,18 +1481,12 @@ def step(self, step: typing.Union[int, str], endpoint: Optional[int] = None): step_duration = (datetime.now(timezone.utc) - self.step_start_time) / timedelta(microseconds=1) self.runner_hook.step_success(logger=None, logs=None, duration=step_duration, request=None) - current_step.endpoint = endpoint - # TODO: it seems like the step start should take a number and a name name = f'{step} : {current_step.description}' - - self.print_step(step, current_step.description, endpoint) - self.runner_hook.step_start(name=name, endpoint=current_step.endpoint) - else: - self.print_step(step, current_step.description) + self.runner_hook.step_start(name=name) self.step_start_time = datetime.now(tz=timezone.utc) - self.current_step_index += 1 + self.current_step_index = self.current_step_index + 1 self.step_skipped = False def get_setup_payload_info(self) -> List[SetupPayloadInfo]: @@ -1842,7 +1846,7 @@ def convert_args_to_matter_config(args: argparse.Namespace) -> MatterTestConfig: all_global_args = [] argsets = [item for item in (args.int_arg, args.float_arg, args.string_arg, args.json_arg, args.hex_arg, args.bool_arg) if item is not None] - for argset in argsets: + for argset in chain.from_iterable(argsets): all_global_args.extend(argset) config.global_test_params = {} @@ -1954,17 +1958,17 @@ def parse_matter_test_args(argv: Optional[List[str]] = None) -> MatterTestConfig help='Path to chip-tool credentials file root') args_group = parser.add_argument_group(title="Config arguments", description="Test configuration global arguments set") - args_group.add_argument('--int-arg', nargs='*', type=int_named_arg, metavar="NAME:VALUE", + args_group.add_argument('--int-arg', nargs='*', action='append', type=int_named_arg, metavar="NAME:VALUE", help="Add a named test argument for an integer as hex or decimal (e.g. -2 or 0xFFFF_1234)") - args_group.add_argument('--bool-arg', nargs='*', type=bool_named_arg, metavar="NAME:VALUE", + args_group.add_argument('--bool-arg', nargs='*', action='append', type=bool_named_arg, metavar="NAME:VALUE", help="Add a named test argument for an boolean value (e.g. true/false or 0/1)") - args_group.add_argument('--float-arg', nargs='*', type=float_named_arg, metavar="NAME:VALUE", + args_group.add_argument('--float-arg', nargs='*', action='append', type=float_named_arg, metavar="NAME:VALUE", help="Add a named test argument for a floating point value (e.g. -2.1 or 6.022e23)") - args_group.add_argument('--string-arg', nargs='*', type=str_named_arg, metavar="NAME:VALUE", + args_group.add_argument('--string-arg', nargs='*', action='append', type=str_named_arg, metavar="NAME:VALUE", help="Add a named test argument for a string value") - args_group.add_argument('--json-arg', nargs='*', type=json_named_arg, metavar="NAME:VALUE", + args_group.add_argument('--json-arg', nargs='*', action='append', type=json_named_arg, metavar="NAME:VALUE", help="Add a named test argument for JSON stored as a list or dict") - args_group.add_argument('--hex-arg', nargs='*', type=bytes_as_hex_named_arg, metavar="NAME:VALUE", + args_group.add_argument('--hex-arg', nargs='*', action='append', type=bytes_as_hex_named_arg, metavar="NAME:VALUE", help="Add a named test argument for an octet string in hex (e.g. 0011cafe or 00:11:CA:FE)") if not argv: @@ -2277,7 +2281,7 @@ def default_matter_test_main(): In this case, only one test class in a test script is allowed. To make your test script executable, add the following to your file: .. code-block:: python - from matter_testing_support.py import default_matter_test_main + from chip.testing.matter_testing.py import default_matter_test_main ... if __name__ == '__main__': default_matter_test_main.main() diff --git a/src/python_testing/matter_testing_infrastructure/chip/testing/metadata.py b/src/python_testing/matter_testing_infrastructure/chip/testing/metadata.py index 2a912d0fe6..2d40d792ac 100644 --- a/src/python_testing/matter_testing_infrastructure/chip/testing/metadata.py +++ b/src/python_testing/matter_testing_infrastructure/chip/testing/metadata.py @@ -13,22 +13,13 @@ # limitations under the License. import logging -import re from dataclasses import dataclass from io import StringIO -from typing import Any, Dict, List, Optional +from typing import Dict, List, Optional import yaml -# TODO #35787: Remove support for non-YAML format -def cast_to_bool(value: Any) -> bool: - """Convert True/true/False/false strings to bool.""" - if isinstance(value, str): - return value.strip().lower() == "true" - return bool(value) - - @dataclass class Metadata: py_script_path: str @@ -40,7 +31,7 @@ class Metadata: factory_reset: bool = False factory_reset_app_only: bool = False script_gdb: bool = False - quiet: bool = True + quiet: bool = False class NamedStringIO(StringIO): @@ -53,52 +44,28 @@ def extract_runs_args(py_script_path: str) -> Dict[str, Dict[str, str]]: """Extract the run arguments from the CI test arguments blocks.""" found_ci_args_section = False - done_ci_args_section = False - - runs_def_ptrn = re.compile(r'^\s*#\s*test-runner-runs:\s*(?P.*)$') - arg_def_ptrn = re.compile( - r'^\s*#\s*test-runner-run/(?P[a-zA-Z0-9_]+)/(?P[a-zA-Z0-9_\-]+):\s*(?P.*)$') - runs_arg_lines: Dict[str, Dict[str, str]] = {} ci_args_section_lines = [] with open(py_script_path, 'r', encoding='utf8') as py_script: for line_idx, line in enumerate(py_script.readlines()): line = line.strip() - line_num = line_idx + 1 # Append empty line to the line capture, so during YAML parsing # line numbers will match the original file. ci_args_section_lines.append("") # Detect the single CI args section, to skip the lines otherwise. - if not done_ci_args_section and line.startswith("# === BEGIN CI TEST ARGUMENTS ==="): + if line.startswith("# === BEGIN CI TEST ARGUMENTS ==="): found_ci_args_section = True continue - elif found_ci_args_section and line.startswith("# === END CI TEST ARGUMENTS ==="): - done_ci_args_section = True - found_ci_args_section = False - continue + if line.startswith("# === END CI TEST ARGUMENTS ==="): + break if found_ci_args_section: # Update the last line in the line capture. ci_args_section_lines[-1] = " " + line.lstrip("#") - runs_match = runs_def_ptrn.match(line) - args_match = arg_def_ptrn.match(line) - - if not found_ci_args_section and (runs_match or args_match): - logging.warning(f"{py_script_path}:{line_num}: Found CI args outside of CI TEST ARGUMENTS block") - continue - - if runs_match: - for run in runs_match.group("run_id").strip().split(): - runs_arg_lines[run] = {} - runs_arg_lines[run]['run'] = run - - elif args_match: - runs_arg_lines[args_match.group("run_id")][args_match.group("arg_name")] = args_match.group("arg_val") - if not runs_arg_lines: try: runs = yaml.safe_load(NamedStringIO("\n".join(ci_args_section_lines), py_script_path)) @@ -182,8 +149,8 @@ def parse_script(self, py_script_path: str) -> List[Metadata]: app_args=attr.get("app-args"), app_ready_pattern=attr.get("app-ready-pattern"), script_args=attr.get("script-args"), - factory_reset=cast_to_bool(attr.get("factoryreset", False)), - quiet=cast_to_bool(attr.get("quiet", True)) + factory_reset=attr.get("factory-reset", False), + quiet=attr.get("quiet", True), )) return runs_metadata diff --git a/src/python_testing/pics_support.py b/src/python_testing/matter_testing_infrastructure/chip/testing/pics.py similarity index 100% rename from src/python_testing/pics_support.py rename to src/python_testing/matter_testing_infrastructure/chip/testing/pics.py diff --git a/src/python_testing/spec_parsing_support.py b/src/python_testing/matter_testing_infrastructure/chip/testing/spec_parsing.py similarity index 95% rename from src/python_testing/spec_parsing_support.py rename to src/python_testing/matter_testing_infrastructure/chip/testing/spec_parsing.py index 75ffea120f..97a13606ea 100644 --- a/src/python_testing/spec_parsing_support.py +++ b/src/python_testing/matter_testing_infrastructure/chip/testing/spec_parsing.py @@ -26,14 +26,14 @@ from typing import Callable, Optional import chip.clusters as Clusters -import conformance_support +import chip.testing.conformance as conformance_support +from chip.testing.conformance import (OPTIONAL_CONFORM, TOP_LEVEL_CONFORMANCE_TAGS, ConformanceDecision, ConformanceException, + ConformanceParseParameters, feature, is_disallowed, mandatory, optional, or_operation, + parse_callable_from_xml, parse_device_type_callable_from_xml) +from chip.testing.global_attribute_ids import GlobalAttributeIds +from chip.testing.matter_testing import (AttributePathLocation, ClusterPathLocation, CommandPathLocation, DeviceTypePathLocation, + EventPathLocation, FeaturePathLocation, ProblemNotice, ProblemSeverity) from chip.tlv import uint -from conformance_support import (OPTIONAL_CONFORM, TOP_LEVEL_CONFORMANCE_TAGS, ConformanceDecision, ConformanceException, - ConformanceParseParameters, feature, is_disallowed, mandatory, optional, or_operation, - parse_callable_from_xml, parse_device_type_callable_from_xml) -from global_attribute_ids import GlobalAttributeIds -from matter_testing_support import (AttributePathLocation, ClusterPathLocation, CommandPathLocation, DeviceTypePathLocation, - EventPathLocation, FeaturePathLocation, ProblemNotice, ProblemSeverity) _PRIVILEGE_STR = { None: "N/A", @@ -518,19 +518,36 @@ class DataModelLevel(str, Enum): kDeviceType = 'device_types' -def _get_data_model_directory(data_model_directory: typing.Union[PrebuiltDataModelDirectory, str], data_model_level: DataModelLevel) -> str: +def _get_data_model_root() -> str: + """Attempts to find ${CHIP_ROOT}/data_model or equivalent.""" + + # Since this class is generally in a module, we have to rely on being bootstrapped or + # we use CWD if we cannot + choices = [os.getcwd()] + + if 'PW_PROJECT_ROOT' in os.environ: + choices.insert(0, os.environ['PW_PROJECT_ROOT']) + + for c in choices: + data_model_path = os.path.join(c, 'data_model') + if os.path.exists(os.path.join(data_model_path, 'master', 'scraper_version')): + return data_model_path + raise FileNotFoundError('Cannot find a CHIP_ROOT/data_model path. Tried %r as prefixes.' % choices) + + +def get_data_model_directory(data_model_directory: typing.Union[PrebuiltDataModelDirectory, str], data_model_level: DataModelLevel) -> str: if data_model_directory == PrebuiltDataModelDirectory.k1_3: - return os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'data_model', '1.3', data_model_level) + return os.path.join(_get_data_model_root(), '1.3', data_model_level) elif data_model_directory == PrebuiltDataModelDirectory.k1_4: - return os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'data_model', '1.4', data_model_level) + return os.path.join(_get_data_model_root(), '1.4', data_model_level) elif data_model_directory == PrebuiltDataModelDirectory.kMaster: - return os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'data_model', 'master', data_model_level) + return os.path.join(_get_data_model_root(), 'master', data_model_level) else: return data_model_directory def build_xml_clusters(data_model_directory: typing.Union[PrebuiltDataModelDirectory, str] = PrebuiltDataModelDirectory.k1_4) -> tuple[dict[uint, XmlCluster], list[ProblemNotice]]: - dir = _get_data_model_directory(data_model_directory, DataModelLevel.kCluster) + dir = get_data_model_directory(data_model_directory, DataModelLevel.kCluster) clusters: dict[int, XmlCluster] = {} pure_base_clusters: dict[str, XmlCluster] = {} @@ -777,7 +794,7 @@ def parse_single_device_type(root: ElementTree.Element) -> tuple[list[ProblemNot def build_xml_device_types(data_model_directory: typing.Union[PrebuiltDataModelDirectory, str] = PrebuiltDataModelDirectory.k1_4) -> tuple[dict[int, XmlDeviceType], list[ProblemNotice]]: - dir = _get_data_model_directory(data_model_directory, DataModelLevel.kDeviceType) + dir = get_data_model_directory(data_model_directory, DataModelLevel.kDeviceType) device_types: dict[int, XmlDeviceType] = {} problems = [] for xml in glob.glob(f"{dir}/*.xml"): diff --git a/src/python_testing/taglist_and_topology_test_support.py b/src/python_testing/matter_testing_infrastructure/chip/testing/taglist_and_topology_test.py similarity index 97% rename from src/python_testing/taglist_and_topology_test_support.py rename to src/python_testing/matter_testing_infrastructure/chip/testing/taglist_and_topology_test.py index bf5c085bf8..eb0ab1289e 100644 --- a/src/python_testing/taglist_and_topology_test_support.py +++ b/src/python_testing/matter_testing_infrastructure/chip/testing/taglist_and_topology_test.py @@ -21,6 +21,7 @@ from typing import Any import chip.clusters as Clusters +from chip.clusters.Types import Nullable @dataclass @@ -143,12 +144,16 @@ def create_device_type_list_for_root(direct_children, endpoint_dict: dict[int, A def cmp_tag_list(a: Clusters.Descriptor.Structs.SemanticTagStruct, b: Clusters.Descriptor.Structs.SemanticTagStruct): + if type(a.mfgCode) != type(b.mfgCode): + return -1 if type(a.mfgCode) is Nullable else 1 if a.mfgCode != b.mfgCode: return -1 if a.mfgCode < b.mfgCode else 1 if a.namespaceID != b.namespaceID: return -1 if a.namespaceID < b.namespaceID else 1 if a.tag != b.tag: return -1 if a.tag < b.tag else 1 + if type(a.label) != type(b.label): + return -1 if type(a.label) is Nullable or a.label is None else 1 if a.label != b.label: return -1 if a.label < b.label else 1 return 0 diff --git a/src/python_testing/matter_testing_infrastructure/chip/testing/test_metadata.py b/src/python_testing/matter_testing_infrastructure/chip/testing/test_metadata.py index 24ed6c62d4..384cd77db3 100644 --- a/src/python_testing/matter_testing_infrastructure/chip/testing/test_metadata.py +++ b/src/python_testing/matter_testing_infrastructure/chip/testing/test_metadata.py @@ -23,19 +23,6 @@ class TestMetadataReader(unittest.TestCase): test_file_content = ''' # === BEGIN CI TEST ARGUMENTS === - # test-runner-runs: run1 - # test-runner-run/run1/app: ${ALL_CLUSTERS_APP} - # test-runner-run/run1/app-args: --discriminator 1234 --trace-to json:${TRACE_APP}.json - # test-runner-run/run1/script-args: --commissioning-method on-network --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto - # test-runner-run/run1/factoryreset: True - # test-runner-run/run1/quiet: True - # === END CI TEST ARGUMENTS === - - # test-runner-run/run1/quiet: False - ''' - - test_file_content_yaml = ''' - # === BEGIN CI TEST ARGUMENTS === # test-runner-runs: # run1: # app: ${ALL_CLUSTERS_APP} @@ -44,7 +31,7 @@ class TestMetadataReader(unittest.TestCase): # --commissioning-method on-network # --trace-to json:${TRACE_TEST_JSON}.json # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto - # factoryreset: true + # factory-reset: true # quiet: true # === END CI TEST ARGUMENTS === ''' @@ -83,15 +70,6 @@ def test_run_arg_generation(self): self.expected_metadata.py_script_path = test_file self.assertEqual(self.expected_metadata, reader.parse_script(test_file)[0]) - def test_run_arg_generation_yaml(self): - with tempfile.TemporaryDirectory() as temp_dir: - test_file = self.generate_temp_file(temp_dir, self.test_file_content_yaml) - env_file = self.generate_temp_file(temp_dir, self.env_file_content) - - reader = MetadataReader(env_file) - self.expected_metadata.py_script_path = test_file - self.assertEqual(self.expected_metadata, reader.parse_script(test_file)[0]) - if __name__ == "__main__": unittest.main() diff --git a/src/python_testing/matter_testing_infrastructure/chip/testing/test_tasks.py b/src/python_testing/matter_testing_infrastructure/chip/testing/test_tasks.py index 5e91a89cf6..051d571d79 100644 --- a/src/python_testing/matter_testing_infrastructure/chip/testing/test_tasks.py +++ b/src/python_testing/matter_testing_infrastructure/chip/testing/test_tasks.py @@ -14,6 +14,10 @@ import unittest +# TODO: Allow to use relative imports or imports from chip.testing package. Then, +# rename "tasks" module to "subprocess", because it would be more descriptive. +# Unfortunately, current way of importing clashes with the subprocess module +# from the Python standard library. from tasks import Subprocess diff --git a/src/python_testing/post_certification_tests/production_device_checks.py b/src/python_testing/post_certification_tests/production_device_checks.py index 6988076e6a..b8e567f76a 100644 --- a/src/python_testing/post_certification_tests/production_device_checks.py +++ b/src/python_testing/post_certification_tests/production_device_checks.py @@ -31,8 +31,8 @@ # files, then add the extra dependencies. From the root: # # . scripts/activate.sh -# ./scripts/build_python.sh -i py -# source py/bin/activate +# ./scripts/build_python.sh -i out/python_env +# source out/python_env/bin/activate # pip install opencv-python requests click_option_group # python src/python_testing/post_certification_tests/production_device_checks.py @@ -59,15 +59,15 @@ os.path.join(os.path.dirname(__file__), '..', '..', '..')) try: - from basic_composition_support import BasicCompositionTests - from matter_testing_support import (MatterBaseTest, MatterStackState, MatterTestConfig, TestStep, async_test_body, - run_tests_no_exit) + from chip.testing.basic_composition import BasicCompositionTests + from chip.testing.matter_testing import (MatterBaseTest, MatterStackState, MatterTestConfig, TestStep, async_test_body, + run_tests_no_exit) except ImportError: sys.path.append(os.path.abspath( os.path.join(os.path.dirname(__file__), '..'))) - from basic_composition_support import BasicCompositionTests - from matter_testing_support import (MatterBaseTest, MatterStackState, MatterTestConfig, TestStep, async_test_body, - run_tests_no_exit) + from chip.testing.basic_composition import BasicCompositionTests + from chip.testing.matter_testing import (MatterBaseTest, MatterStackState, MatterTestConfig, TestStep, async_test_body, + run_tests_no_exit) try: import fetch_paa_certs_from_dcl diff --git a/src/python_testing/test_plan_table_generator.py b/src/python_testing/test_plan_table_generator.py index c972116f34..b38f6f94df 100755 --- a/src/python_testing/test_plan_table_generator.py +++ b/src/python_testing/test_plan_table_generator.py @@ -22,7 +22,7 @@ from pathlib import Path import click -from matter_testing_support import MatterTestConfig, generate_mobly_test_config +from chip.testing.matter_testing import MatterTestConfig, generate_mobly_test_config def indent_multiline(multiline: str, num_spaces: int) -> str: diff --git a/src/python_testing/test_testing/MockTestRunner.py b/src/python_testing/test_testing/MockTestRunner.py index 2d0afb8a5c..6c9bc1c088 100644 --- a/src/python_testing/test_testing/MockTestRunner.py +++ b/src/python_testing/test_testing/MockTestRunner.py @@ -22,13 +22,7 @@ from unittest.mock import MagicMock from chip.clusters import Attribute - -try: - from matter_testing_support import MatterStackState, MatterTestConfig, run_tests_no_exit -except ImportError: - sys.path.append(os.path.abspath( - os.path.join(os.path.dirname(__file__), '..'))) - from matter_testing_support import MatterStackState, MatterTestConfig, run_tests_no_exit +from chip.testing.matter_testing import MatterStackState, MatterTestConfig, run_tests_no_exit class AsyncMock(MagicMock): @@ -56,7 +50,15 @@ def __init__(self, filename: str, classname: str, test: str, endpoint: int = Non def set_test(self, filename: str, classname: str, test: str): self.test = test self.config.tests = [self.test] - module = importlib.import_module(Path(os.path.basename(filename)).stem) + + module_name = Path(os.path.basename(filename)).stem + + try: + module = importlib.import_module(module_name) + except ModuleNotFoundError: + sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) + module = importlib.import_module(module_name) + self.test_class = getattr(module, classname) def set_test_config(self, test_config: MatterTestConfig = MatterTestConfig()): diff --git a/src/python_testing/test_testing/TestDecorators.py b/src/python_testing/test_testing/TestDecorators.py index 82b49eddd8..c4851eaee5 100644 --- a/src/python_testing/test_testing/TestDecorators.py +++ b/src/python_testing/test_testing/TestDecorators.py @@ -25,23 +25,13 @@ # # You will get step_* calls as appropriate in between the test_start and test_stop calls if the test is not skipped. -import os import sys +from typing import Optional import chip.clusters as Clusters from chip.clusters import Attribute - -try: - from matter_testing_support import (MatterBaseTest, MatterTestConfig, async_test_body, has_attribute, has_cluster, has_feature, - run_if_endpoint_matches, run_on_singleton_matching_endpoint, should_run_test_on_endpoint) -except ImportError: - sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) - from matter_testing_support import (MatterBaseTest, MatterTestConfig, async_test_body, has_attribute, - has_cluster, has_feature, run_if_endpoint_matches, run_on_singleton_matching_endpoint, - should_run_test_on_endpoint) - -from typing import Optional - +from chip.testing.matter_testing import (MatterBaseTest, MatterTestConfig, async_test_body, has_attribute, has_cluster, has_feature, + run_if_endpoint_matches, run_on_singleton_matching_endpoint, should_run_test_on_endpoint) from mobly import asserts from MockTestRunner import MockTestRunner @@ -86,7 +76,7 @@ def test_stop(self, exception: Exception, duration: int): def step_skipped(self, name: str, expression: str): pass - def step_start(self, name: str, endpoint: Optional[int] = None): + def step_start(self, name: str): pass def step_success(self, logger, logs, duration: int, request): diff --git a/src/python_testing/test_testing/test_IDM_10_4.py b/src/python_testing/test_testing/test_IDM_10_4.py index 8634e94129..8a30609e94 100644 --- a/src/python_testing/test_testing/test_IDM_10_4.py +++ b/src/python_testing/test_testing/test_IDM_10_4.py @@ -21,13 +21,7 @@ import chip.clusters as Clusters from chip.clusters import Attribute - -try: - from pics_support import parse_pics_xml -except ImportError: - sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) - from pics_support import parse_pics_xml - +from chip.testing.pics import parse_pics_xml from MockTestRunner import MockTestRunner # Reachable attribute is off in the pics file diff --git a/src/python_testing/test_testing/test_TC_CCNTL_2_2.py b/src/python_testing/test_testing/test_TC_CCNTL_2_2.py index bd28023b8e..6a2dc48ba4 100644 --- a/src/python_testing/test_testing/test_TC_CCNTL_2_2.py +++ b/src/python_testing/test_testing/test_TC_CCNTL_2_2.py @@ -30,11 +30,11 @@ from MockTestRunner import AsyncMock, MockTestRunner try: - from matter_testing_support import MatterTestConfig, get_default_paa_trust_store, run_tests_no_exit + from chip.testing.matter_testing import MatterTestConfig, get_default_paa_trust_store, run_tests_no_exit except ImportError: sys.path.append(os.path.abspath( os.path.join(os.path.dirname(__file__), '..'))) - from matter_testing_support import MatterTestConfig, get_default_paa_trust_store, run_tests_no_exit + from chip.testing.matter_testing import MatterTestConfig, get_default_paa_trust_store, run_tests_no_exit invoke_call_count = 0 event_call_count = 0 diff --git a/src/python_testing/test_testing/test_TC_DA_1_2.py b/src/python_testing/test_testing/test_TC_DA_1_2.py index 296508ba2f..290bac613a 100755 --- a/src/python_testing/test_testing/test_TC_DA_1_2.py +++ b/src/python_testing/test_testing/test_TC_DA_1_2.py @@ -30,7 +30,7 @@ def run_single_test(dac_provider: str, product_id: int, factory_reset: bool = Fa reset = "" if factory_reset: - reset = ' --factoryreset' + reset = ' --factory-reset' app = os.path.join( CHIP_ROOT, 'out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app') diff --git a/src/python_testing/test_testing/test_TC_DA_1_5.py b/src/python_testing/test_testing/test_TC_DA_1_5.py index 126814ca61..fbabfbf6cf 100755 --- a/src/python_testing/test_testing/test_TC_DA_1_5.py +++ b/src/python_testing/test_testing/test_TC_DA_1_5.py @@ -27,7 +27,7 @@ def run_single_test(flag: str, factory_reset: bool = False) -> int: reset = "" if factory_reset: - reset = ' --factoryreset' + reset = ' --factory-reset' app = os.path.join(CHIP_ROOT, 'out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app') diff --git a/src/python_testing/test_testing/test_TC_MCORE_FS_1_1.py b/src/python_testing/test_testing/test_TC_MCORE_FS_1_1.py index d79b412530..ed9f1b3531 100644 --- a/src/python_testing/test_testing/test_TC_MCORE_FS_1_1.py +++ b/src/python_testing/test_testing/test_TC_MCORE_FS_1_1.py @@ -30,11 +30,11 @@ from MockTestRunner import AsyncMock, MockTestRunner try: - from matter_testing_support import MatterTestConfig, get_default_paa_trust_store, run_tests_no_exit + from chip.testing.matter_testing import MatterTestConfig, get_default_paa_trust_store, run_tests_no_exit except ImportError: sys.path.append(os.path.abspath( os.path.join(os.path.dirname(__file__), '..'))) - from matter_testing_support import MatterTestConfig, get_default_paa_trust_store, run_tests_no_exit + from chip.testing.matter_testing import MatterTestConfig, get_default_paa_trust_store, run_tests_no_exit invoke_call_count = 0 event_call_count = 0 diff --git a/src/python_testing/test_testing/test_TC_SC_7_1.py b/src/python_testing/test_testing/test_TC_SC_7_1.py index 3b1b6a5b1c..96dced72f9 100644 --- a/src/python_testing/test_testing/test_TC_SC_7_1.py +++ b/src/python_testing/test_testing/test_TC_SC_7_1.py @@ -16,21 +16,14 @@ # limitations under the License. # -import os import sys from random import randbytes import chip.clusters as Clusters from chip.clusters import Attribute +from chip.testing.matter_testing import MatterTestConfig from MockTestRunner import MockTestRunner -try: - from matter_testing_support import MatterTestConfig -except ImportError: - sys.path.append(os.path.abspath( - os.path.join(os.path.dirname(__file__), '..'))) - from matter_testing_support import MatterTestConfig - def read_trusted_root(filled: bool) -> Attribute.AsyncReadTransaction.ReadResponse: opcreds = Clusters.OperationalCredentials diff --git a/src/setup_payload/QRCodeSetupPayloadParser.cpp b/src/setup_payload/QRCodeSetupPayloadParser.cpp index 99bf0e4983..102de4af69 100644 --- a/src/setup_payload/QRCodeSetupPayloadParser.cpp +++ b/src/setup_payload/QRCodeSetupPayloadParser.cpp @@ -267,10 +267,10 @@ CHIP_ERROR QRCodeSetupPayloadParser::populateTLV(SetupPayload & outPayload, cons size_t tlvBytesLength = (bitsLeftToRead + 7) / 8; // ceil(bitsLeftToRead/8) chip::Platform::ScopedMemoryBuffer tlvArray; - ReturnErrorCodeIf(tlvBytesLength == 0, CHIP_NO_ERROR); + VerifyOrReturnError(tlvBytesLength != 0, CHIP_NO_ERROR); tlvArray.Alloc(tlvBytesLength); - ReturnErrorCodeIf(!tlvArray, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(tlvArray, CHIP_ERROR_NO_MEMORY); for (size_t i = 0; i < tlvBytesLength; i++) { diff --git a/src/setup_payload/SetupPayload.cpp b/src/setup_payload/SetupPayload.cpp index 9683da21f8..915f20c4a2 100644 --- a/src/setup_payload/SetupPayload.cpp +++ b/src/setup_payload/SetupPayload.cpp @@ -23,6 +23,7 @@ #include "SetupPayload.h" +#include #include #include #include @@ -207,6 +208,34 @@ CHIP_ERROR SetupPayload::removeSerialNumber() return CHIP_NO_ERROR; } +CHIP_ERROR SetupPayload::generateRandomSetupPin(uint32_t & setupPINCode) +{ + uint8_t retries = 0; + const uint8_t maxRetries = 10; + + do + { + ReturnErrorOnFailure(Crypto::DRBG_get_bytes(reinterpret_cast(&setupPINCode), sizeof(setupPINCode))); + + // Passcodes shall be restricted to the values 00000001 to 99999998 in decimal, see 5.1.1.6 + // TODO: Consider revising this method to ensure uniform distribution of setup PIN codes + setupPINCode = (setupPINCode % kSetupPINCodeMaximumValue) + 1; + + // Make sure that the Generated Setup Pin code is not one of the invalid passcodes/pin codes defined in the + // specification. + if (IsValidSetupPIN(setupPINCode)) + { + return CHIP_NO_ERROR; + } + + retries++; + // We got pretty unlucky with the random number generator, Just try again. + // This shouldn't take many retries assuming DRBG_get_bytes is not broken. + } while (retries < maxRetries); + + return CHIP_ERROR_INTERNAL; +} + CHIP_ERROR SetupPayload::addOptionalVendorData(const OptionalQRCodeInfo & info) { VerifyOrReturnError(IsVendorTag(info.tag), CHIP_ERROR_INVALID_ARGUMENT); diff --git a/src/setup_payload/SetupPayload.h b/src/setup_payload/SetupPayload.h index 3d5d101fbf..829af128bf 100644 --- a/src/setup_payload/SetupPayload.h +++ b/src/setup_payload/SetupPayload.h @@ -259,6 +259,17 @@ class SetupPayload : public PayloadContents **/ static bool IsVendorTag(uint8_t tag) { return !IsCommonTag(tag); } + /** @brief Generate a Random Setup Pin Code (Passcode) + * + * This function generates a random passcode within the defined limits (00000001 to 99999998) + * It also checks that the generated passcode is not equal to any invalid passcode values as defined in 5.1.7.1. + * + * @param[out] setupPINCode The generated random setup PIN code. + * @return Returns a CHIP_ERROR_INTERNAL if unable to generate a valid passcode within a reasonable number of attempts, + * CHIP_NO_ERROR otherwise + **/ + static CHIP_ERROR generateRandomSetupPin(uint32_t & setupPINCode); + private: std::map optionalVendorData; std::map optionalExtensionData; diff --git a/src/system/SystemFaultInjection.cpp b/src/system/SystemFaultInjection.cpp index 1154409674..531395694c 100644 --- a/src/system/SystemFaultInjection.cpp +++ b/src/system/SystemFaultInjection.cpp @@ -25,7 +25,6 @@ /* module header, also carries config, comes first */ #include -#include #include namespace chip { diff --git a/src/system/SystemLayerImplSelect.cpp b/src/system/SystemLayerImplSelect.cpp index 3e8a79f7b6..fe025a5765 100644 --- a/src/system/SystemLayerImplSelect.cpp +++ b/src/system/SystemLayerImplSelect.cpp @@ -427,7 +427,7 @@ CHIP_ERROR LayerImplSelect::RequestCallbackOnPendingRead(SocketWatchToken token) { watch->mRdSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, static_cast(watch->mFD), 0, dispatchQueue); - ReturnErrorCodeIf(watch->mRdSource == nullptr, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(watch->mRdSource != nullptr, CHIP_ERROR_NO_MEMORY); dispatch_source_set_event_handler(watch->mRdSource, ^{ if (watch->mPendingIO.Has(SocketEventFlags::kRead) && watch->mCallback != nullptr) { @@ -487,7 +487,7 @@ CHIP_ERROR LayerImplSelect::RequestCallbackOnPendingWrite(SocketWatchToken token { watch->mWrSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_WRITE, static_cast(watch->mFD), 0, dispatchQueue); - ReturnErrorCodeIf(watch->mWrSource == nullptr, CHIP_ERROR_NO_MEMORY); + VerifyOrReturnError(watch->mWrSource != nullptr, CHIP_ERROR_NO_MEMORY); dispatch_source_set_event_handler(watch->mWrSource, ^{ if (watch->mPendingIO.Has(SocketEventFlags::kWrite) && watch->mCallback != nullptr) { diff --git a/src/system/SystemPacketBuffer.h b/src/system/SystemPacketBuffer.h index 5068822c7f..8fd73b9c35 100644 --- a/src/system/SystemPacketBuffer.h +++ b/src/system/SystemPacketBuffer.h @@ -784,7 +784,7 @@ class PacketBufferWriterBase : public Writer * @param[in] aSize Maximum number of octects to write into the packet buffer. */ PacketBufferWriterBase(System::PacketBufferHandle && aPacket, size_t aSize) : - Writer(aPacket->Start() + aPacket->DataLength(), chip::min(aSize, static_cast(aPacket->AvailableDataLength()))) + Writer(aPacket->Start() + aPacket->DataLength(), std::min(aSize, static_cast(aPacket->AvailableDataLength()))) { mPacket = std::move(aPacket); } diff --git a/src/system/system.gni b/src/system/system.gni index 61efb846d8..61cd52fa32 100644 --- a/src/system/system.gni +++ b/src/system/system.gni @@ -71,6 +71,10 @@ if (chip_system_config_locking == "") { } } +if (target_os == "mac" || target_os == "ios") { + chip_system_config_clock = "gettimeofday" +} + assert( chip_system_config_locking == "posix" || chip_system_config_locking == "freertos" || diff --git a/src/test_driver/efr32/BUILD.gn b/src/test_driver/efr32/BUILD.gn index 0d10cb8d76..1fc16ed47f 100644 --- a/src/test_driver/efr32/BUILD.gn +++ b/src/test_driver/efr32/BUILD.gn @@ -61,6 +61,16 @@ efr32_sdk("sdk") { ] } +config("efr32_ldflags") { + _ldscript = + "${chip_root}/examples/platform/silabs/ldscripts/${silabs_family}.ld" + + ldflags = [ + "-T" + rebase_path(_ldscript, root_build_dir), + "-Wl,--no-warn-rwx-segment", + ] +} + # This is the test runner. `pw_test` will dep this for each `silabs_executable` target. source_set("efr32_test_main") { defines = [ "PW_RPC_ENABLED" ] @@ -103,6 +113,7 @@ source_set("efr32_test_main") { ] include_dirs = [ "${chip_root}/examples/common/pigweed/efr32" ] + public_configs = [ ":efr32_ldflags" ] } # This target is referred to by BuildRoot in scripts/build/builders/efr32.py, as well as the example in README.md. diff --git a/src/test_driver/efr32/args.gni b/src/test_driver/efr32/args.gni index f7f52398a5..35be5dd63e 100644 --- a/src/test_driver/efr32/args.gni +++ b/src/test_driver/efr32/args.gni @@ -15,9 +15,7 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") import("${chip_root}/config/efr32/lib/pw_rpc/pw_rpc.gni") -import("${chip_root}/examples/platform/silabs/args.gni") import("${chip_root}/src/platform/silabs/efr32/args.gni") -import("${chip_root}/third_party/silabs/silabs_board.gni") # silabs_family silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") @@ -46,9 +44,3 @@ pw_unit_test_MAIN = "//:efr32_test_main" # Additional variables needed by silabs_executable that must be passed in to pw_test. test_executable_output_name = "matter-silabs-device_tests-" test_executable_output_name_suffix = ".out" -_ldscript = - "${chip_root}/examples/platform/silabs/ldscripts/${silabs_family}.ld" -test_executable_ldflags = [ - "-T" + rebase_path(_ldscript, root_build_dir), - "-Wl,--no-warn-rwx-segment", -] diff --git a/src/test_driver/efr32/src/main.cpp b/src/test_driver/efr32/src/main.cpp index 088dc4e870..a2a078c469 100644 --- a/src/test_driver/efr32/src/main.cpp +++ b/src/test_driver/efr32/src/main.cpp @@ -19,10 +19,10 @@ #include #include -#include #include #include #include +#include #include #include #include @@ -34,9 +34,9 @@ #include #include #include +#include #include #include -#include using namespace chip; using namespace chip::DeviceLayer; @@ -66,13 +66,17 @@ class NlTest : public pw_rpc::nanopb::NlTest::Service } // namespace chip::rpc namespace { - -#define TEST_TASK_STACK_SIZE 16 * 1024 -#define TEST_TASK_PRIORITY 1 - -static TaskHandle_t sTestTaskHandle; -StaticTask_t sTestTaskBuffer; -StackType_t sTestTaskStack[TEST_TASK_STACK_SIZE]; +osThreadId_t sTestTaskHandle; +osThread_t testTaskControlBlock; +constexpr uint32_t kTestTaskStackSize = 16 * 1024; +uint8_t testTaskStack[kTestTaskStackSize]; +constexpr osThreadAttr_t kTestTaskAttr = { .name = "TestDriver", + .attr_bits = osThreadDetached, + .cb_mem = &testTaskControlBlock, + .cb_size = osThreadCbSize, + .stack_mem = testTaskStack, + .stack_size = kTestTaskStackSize, + .priority = osPriorityNormal }; chip::rpc::NlTest nl_test_service; pw::unit_test::UnitTestService unit_test_service; @@ -105,15 +109,14 @@ int main(void) SetDeviceInstanceInfoProvider(&provision.GetStorage()); SetCommissionableDataProvider(&provision.GetStorage()); - SILABS_LOG("***** CHIP EFR32 device tests *****\r\n"); + ChipLogProgress(AppServer, "***** CHIP EFR32 device tests *****\r\n"); // Start RPC service which runs the tests. - sTestTaskHandle = xTaskCreateStatic(RunRpcService, "RPC_TEST_TASK", ArraySize(sTestTaskStack), nullptr, TEST_TASK_PRIORITY, - sTestTaskStack, &sTestTaskBuffer); - SILABS_LOG("Starting FreeRTOS scheduler"); + sTestTaskHandle = osThreadNew(RunRpcService, nullptr, &kTestTaskAttr); + ChipLogProgress(AppServer, "Starting Kernel"); sl_system_kernel_start(); // Should never get here. - SILABS_LOG("vTaskStartScheduler() failed"); + ChipLogProgress(AppServer, "sl_system_kernel_start() failed"); return -1; } diff --git a/src/test_driver/linux-cirque/MobileDeviceTest.py b/src/test_driver/linux-cirque/MobileDeviceTest.py index a206dc31c2..c8a73baf0c 100755 --- a/src/test_driver/linux-cirque/MobileDeviceTest.py +++ b/src/test_driver/linux-cirque/MobileDeviceTest.py @@ -126,7 +126,7 @@ def run_controller_test(self): "Toggle ep1 on/off from state 0 to 1", "Received command for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0000", "Toggle ep1 on/off from state 1 to 0", - "No command 0x0000_0001 in Cluster 0x0000_0006 on Endpoint 0xe9"]), + "No command 0x0000_0001 in Cluster 0x0000_0006 on Endpoint 233"]), "Datamodel test failed: cannot find matching string from device {}".format(device_id)) diff --git a/src/test_driver/nrfconnect/main/runner.cpp b/src/test_driver/nrfconnect/main/runner.cpp index 44fb5bae2a..bd719fbd4e 100644 --- a/src/test_driver/nrfconnect/main/runner.cpp +++ b/src/test_driver/nrfconnect/main/runner.cpp @@ -29,7 +29,7 @@ using namespace ::chip::DeviceLayer; LOG_MODULE_REGISTER(runner, CONFIG_MATTER_LOG_LEVEL); -extern "C" int main(void) +int main(void) { VerifyOrDie(settings_subsys_init() == 0); diff --git a/src/test_driver/tizen/.gn b/src/test_driver/tizen/.gn index 65992f8720..26cd7015b6 100644 --- a/src/test_driver/tizen/.gn +++ b/src/test_driver/tizen/.gn @@ -14,6 +14,7 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") +import("//build_overrides/googletest.gni") import("//build_overrides/pigweed.gni") # The location of the build configuration file. @@ -29,7 +30,9 @@ default_args = { pw_assert_BACKEND = "$dir_pw_assert_log" pw_log_BACKEND = "$dir_pw_log_basic" - pw_unit_test_BACKEND = "$dir_pw_unit_test:light" + pw_unit_test_BACKEND = "$dir_pw_unit_test:googletest" + pw_unit_test_MAIN = "$dir_pigweed/third_party/googletest:gmock_main" + dir_pw_third_party_googletest = "$dir_googletest" # TODO: Make sure only unit tests link against this pw_build_LINK_DEPS = [ diff --git a/src/tools/PICS-generator/PICSGenerator.py b/src/tools/PICS-generator/PICSGenerator.py index acdeb676ed..6cfb95803a 100644 --- a/src/tools/PICS-generator/PICSGenerator.py +++ b/src/tools/PICS-generator/PICSGenerator.py @@ -25,10 +25,10 @@ from pics_generator_support import map_cluster_name_to_pics_xml, pics_xml_file_list_loader from rich.console import Console -# Add the path to python_testing folder, in order to be able to import from matter_testing_support +# Add the path to python_testing folder, in order to be able to import from chip.testing.matter_testing sys.path.append(os.path.abspath(sys.path[0] + "/../../python_testing")) -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main # noqa: E402 -from spec_parsing_support import build_xml_clusters # noqa: E402 +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main # noqa: E402 +from chip.testing.spec_parsing import build_xml_clusters # noqa: E402 console = None xml_clusters = None diff --git a/src/tools/PICS-generator/XMLPICSValidator.py b/src/tools/PICS-generator/XMLPICSValidator.py index d728a61991..5fd170463d 100644 --- a/src/tools/PICS-generator/XMLPICSValidator.py +++ b/src/tools/PICS-generator/XMLPICSValidator.py @@ -23,7 +23,7 @@ # Add the path to python_testing folder, in order to be able to import from matter_testing_support sys.path.append(os.path.abspath(sys.path[0] + "/../../python_testing")) -from spec_parsing_support import build_xml_clusters # noqa: E402 +from chip.testing.spec_parsing import build_xml_clusters # noqa: E402 parser = argparse.ArgumentParser() parser.add_argument('--pics-template', required=True) diff --git a/src/tools/chip-cert/chip-cert.cpp b/src/tools/chip-cert/chip-cert.cpp index 571a00421f..a06a7341fa 100644 --- a/src/tools/chip-cert/chip-cert.cpp +++ b/src/tools/chip-cert/chip-cert.cpp @@ -85,7 +85,7 @@ bool PrintVersion() } // namespace -extern "C" int main(int argc, char * argv[]) +int main(int argc, char * argv[]) { bool res = false; diff --git a/src/tools/device-graph/matter-device-graph.py b/src/tools/device-graph/matter-device-graph.py index 16a2e6dbb0..597468624d 100644 --- a/src/tools/device-graph/matter-device-graph.py +++ b/src/tools/device-graph/matter-device-graph.py @@ -23,9 +23,9 @@ import graphviz from rich.console import Console -# Add the path to python_testing folder, in order to be able to import from matter_testing_support +# Add the path to python_testing folder, in order to be able to import from chip.testing.matter_testing sys.path.append(os.path.abspath(sys.path[0] + "/../../python_testing")) -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main # noqa: E402 +from chip.testing.matter_testing import MatterBaseTest, async_test_body, default_matter_test_main # noqa: E402 console = None maxClusterNameLength = 30 diff --git a/src/tools/spake2p/spake2p.cpp b/src/tools/spake2p/spake2p.cpp index 45f5cc9d7c..ce1c0f82c6 100644 --- a/src/tools/spake2p/spake2p.cpp +++ b/src/tools/spake2p/spake2p.cpp @@ -62,7 +62,7 @@ bool PrintVersion() } // namespace -extern "C" int main(int argc, char * argv[]) +int main(int argc, char * argv[]) { bool res = false; diff --git a/src/tracing/metric_macros.h b/src/tracing/metric_macros.h index 3d00e7d9d9..1a2596ec2c 100644 --- a/src/tracing/metric_macros.h +++ b/src/tracing/metric_macros.h @@ -241,36 +241,6 @@ } while (false) #endif // CHIP_CONFIG_ERROR_SOURCE -/** - * @def ReturnErrorCodeWithMetricIf(kMetricKey, expr, code) - * - * @brief - * Returns a specified error code if expression evaluates to true - * If the expression evaluates to true, a metric with the specified key is emitted - * with the value set to code. - * - * Example usage: - * - * @code - * ReturnErrorCodeWithMetricIf(kMetricKey, state == kInitialized, CHIP_NO_ERROR); - * ReturnErrorCodeWithMetricIf(kMetricKey, state == kInitialized, CHIP_ERROR_INCORRECT_STATE); - * @endcode - * - * @param[in] kMetricKey Metric key for the metric event to be emitted if the expr evaluates - * to true. Value of the metric is to code. - * @param[in] expr A Boolean expression to be evaluated. - * @param[in] code A value to return if @a expr is false. - */ -#define ReturnErrorCodeWithMetricIf(kMetricKey, expr, code) \ - do \ - { \ - if (expr) \ - { \ - MATTER_LOG_METRIC(kMetricKey, code); \ - return code; \ - } \ - } while (false) - /** * @def SuccessOrExitWithMetric(kMetricKey, error) * @@ -577,14 +547,12 @@ #define VerifyOrReturnWithMetric(kMetricKey, expr, ...) VerifyOrReturn(expr, ##__VA_ARGS__) -#define VerifyOrReturnErrorWithMetric(kMetricKey, expr, code, ...) VerifyOrReturnValue(expr, code, ##__VA_ARGS__) +#define VerifyOrReturnErrorWithMetric(kMetricKey, expr, code, ...) VerifyOrReturnError(expr, code, ##__VA_ARGS__) #define VerifyOrReturnValueWithMetric(kMetricKey, expr, value, ...) VerifyOrReturnValue(expr, value, ##__VA_ARGS__) #define VerifyOrReturnLogErrorWithMetric(kMetricKey, expr, code) VerifyOrReturnLogError(expr, code) -#define ReturnErrorCodeWithMetricIf(kMetricKey, expr, code) ReturnErrorCodeIf(expr, code) - #define SuccessOrExitWithMetric(kMetricKey, aStatus) SuccessOrExit(aStatus) #define VerifyOrExitWithMetric(kMetricKey, aCondition, anAction) VerifyOrExit(aCondition, anAction) diff --git a/src/tracing/tests/TestMetricEvents.cpp b/src/tracing/tests/TestMetricEvents.cpp index 20c6f7788a..d3796477c0 100644 --- a/src/tracing/tests/TestMetricEvents.cpp +++ b/src/tracing/tests/TestMetricEvents.cpp @@ -523,39 +523,6 @@ TEST(TestMetricEvents, TestVerifyOrReturnLogErrorWithMetric) EXPECT_TRUE(std::equal(backend.GetMetricEvents().begin(), backend.GetMetricEvents().end(), expected.begin(), expected.end())); } -template -static return_code_type InvokeReturnErrorCodeWithMetricIf(MetricKey key, bool expr, const return_code_type & code) -{ - ReturnErrorCodeWithMetricIf(key, expr, code); - return return_code_type(); -} - -TEST(TestMetricEvents, TestReturnErrorCodeWithMetricIf) -{ - MetricEventBackend backend; - ScopedRegistration scope(backend); - - auto err = InvokeReturnErrorCodeWithMetricIf("event0", DoubleOf(2) == 4, CHIP_ERROR_DUPLICATE_KEY_ID); - EXPECT_EQ(err, CHIP_ERROR_DUPLICATE_KEY_ID); - - auto retval = InvokeReturnErrorCodeWithMetricIf("event1", DoubleOf(3) == 9, 11); - EXPECT_EQ(retval, 0); - - retval = InvokeReturnErrorCodeWithMetricIf("event2", DoubleOf(4) == 8, 22); - EXPECT_EQ(retval, 22); - - err = InvokeReturnErrorCodeWithMetricIf("event3", DoubleOf(5) == 11, CHIP_ERROR_ACCESS_DENIED); - EXPECT_EQ(err, CHIP_NO_ERROR); - - std::vector expected = { - MetricEvent(MetricEvent::Type::kInstantEvent, "event0", CHIP_ERROR_DUPLICATE_KEY_ID), - MetricEvent(MetricEvent::Type::kInstantEvent, "event2", 22), - }; - - EXPECT_EQ(backend.GetMetricEvents().size(), expected.size()); - EXPECT_TRUE(std::equal(backend.GetMetricEvents().begin(), backend.GetMetricEvents().end(), expected.begin(), expected.end())); -} - TEST(TestMetricEvents, TestExitNowWithMetric) { MetricEventBackend backend; diff --git a/src/transport/SecureMessageCodec.cpp b/src/transport/SecureMessageCodec.cpp index 263b4e5e12..4e8cef59be 100644 --- a/src/transport/SecureMessageCodec.cpp +++ b/src/transport/SecureMessageCodec.cpp @@ -61,7 +61,7 @@ CHIP_ERROR Encrypt(const CryptoContext & context, CryptoContext::ConstNonceView CHIP_ERROR Decrypt(const CryptoContext & context, CryptoContext::ConstNonceView nonce, PayloadHeader & payloadHeader, const PacketHeader & packetHeader, System::PacketBufferHandle & msg) { - ReturnErrorCodeIf(msg.IsNull(), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(!msg.IsNull(), CHIP_ERROR_INVALID_ARGUMENT); uint8_t * data = msg->Start(); size_t len = msg->DataLength(); diff --git a/src/transport/SecureSession.h b/src/transport/SecureSession.h index ba586a3095..574d5f40cc 100644 --- a/src/transport/SecureSession.h +++ b/src/transport/SecureSession.h @@ -158,7 +158,11 @@ class SecureSession : public Session, public ReferenceCountedoversize_left can become wrong value - in tcp_write error path) - - 2017-02-02: Dirk Ziegelmeier - * Fix bug #50206: UDP Netconn bind to IP6_ADDR_ANY fails - - 2017-01-18: Dirk Ziegelmeier - * Fix zero-copy RX, see bug bug #50064. PBUF_REFs were not supported as ARP requests. - - 2017-01-15: Axel Lin, Dirk Ziegelmeier - * minor bug fixes in mqtt - - 2017-01-11: Knut Andre Tidemann - * sockets/netconn: fix broken default ICMPv6 handling of checksums - -(STABLE-2.0.1) - - ++ New features: - - 2016-12-31: Simon Goldschmidt - * tcp.h/.c: added function tcp_listen_with_backlog_and_err() to get the error - reason when listening fails (bug #49861) - - 2016-12-20: Erik Andersen - * Add MQTT client - - 2016-12-14: Jan Breuer: - * opt.h, ndc.h/.c: add support for RDNSS option (as per RFC 6106) - - 2016-12-14: David van Moolenbroek - * opt.h, nd6.c: Added LWIP_HOOK_ND6_GET_GW() - - 2016-12-09: Dirk Ziegelmeier - * ip6_frag.c: Implemented support for LWIP_NETIF_TX_SINGLE_PBUF - - 2016-12-09: Simon Goldschmidt - * dns.c: added one-shot multicast DNS queries - - 2016-11-24: Ambroz Bizjak, David van Moolenbroek - * tcp_out.c: Optimize passing contiguous nocopy buffers to tcp_write (bug #46290) - - 2016-11-16: Dirk Ziegelmeier - * sockets.c: added support for IPv6 mapped IPv4 addresses - - ++ Bugfixes: - - 2016-12-16: Thomas Mueller - * api_lib.c: fixed race condition in return value of netconn_gethostbyname() - (and thus also lwip_gethostbyname/_r() and lwip_getaddrinfo()) - - 2016-12-15: David van Moolenbroek - * opt.h, tcp: added LWIP_HOOK_TCP_ISN() to implement less predictable initial - sequence numbers (see contrib/addons/tcp_isn for an example implementation) - - 2016-12-05: Dirk Ziegelmeier - * fixed compiling with IPv4 disabled (IPv6 only case) - - 2016-11-28: Simon Goldschmidt - * api_lib.c: fixed bug #49725 (send-timeout: netconn_write() can return - ERR_OK without all bytes being written) - - 2016-11-28: Ambroz Bizjak - * tcpi_in.c: fixed bug #49717 (window size in received SYN and SYN-ACK - assumed scaled) - - 2016-11-25: Simon Goldschmidt - * dhcp.c: fixed bug #49676 (Possible endless loop when parsing dhcp options) - - 2016-11-23: Dirk Ziegelmeier - * udp.c: fixed bug #49662: multicast traffic is now only received on a UDP PCB - (and therefore on a UDP socket/netconn) when the PCB is bound to IP_ADDR_ANY - - 2016-11-16: Dirk Ziegelmeier - * *: Fixed dual-stack behaviour, IPv6 mapped IPv4 support in socket API - - 2016-11-14: Joel Cunningham - * tcp_out.c: fixed bug #49533 (start persist timer when unsent seg can't fit - in window) - - 2016-11-16: Roberto Barbieri Carrera - * autoip.c: fixed bug #49610 (sometimes AutoIP fails to reuse the same address) - - 2016-11-11: Dirk Ziegelmeier - * sockets.c: fixed bug #49578 (dropping multicast membership does not work - with LWIP_SOCKET_OFFSET) - -(STABLE-2.0.0) - - ++ New features: - - 2016-07-27: Simon Goldschmidt - * opt.h, timeouts.h/.c: added LWIP_TIMERS_CUSTOM to override the default - implementation of timeouts - - 2016-07-xx: Dirk Ziegelmeier - * Large overhaul of doxygen documentation - - 2016-04-05: Simon Goldschmidt - * timers.h/.c: prepare for overriding current timeout implementation: all - stack-internal caclic timers are avaliable in the lwip_cyclic_timers array - - 2016-03-23: Simon Goldschmidt - * tcp: call accept-callback with ERR_MEM when allocating a pcb fails on - passive open to inform the application about this error - ATTENTION: applications have to handle NULL pcb in accept callback! - - 2016-02-22: Ivan Delamer - * Initial 6LoWPAN support - - 2016-02-XX to 2016-03-XX: Dirk Ziegelmeier - * Cleanup TCPIP thread sync methods in a way that it is possibe to use them - in arbitrary code that needs things to be done in TCPIP thread. Used to - decouple netconn, netif, ppp and 6LoWPAN from LWIP core. - - 2016-02-XX: Dirk Ziegelmeier - * Implement dual-stack support in RAW, UDP and TCP. Add new IP address - type IPADDR_ANY_TYPE for this. Netconn/Socket API: Dual-stack is - automatically supported when an IPv6 netconn/socket is created. - - 2015-12-26: Martin Hentschel and Dirk Ziegelmeier - * Rewrite SNMP agent. SNMPv2c + MIB compiler. - - 2015-11-12: Dirk Ziegelmeier - * Decouple SNMP stack from lwIP core and move stack to apps/ directory. - Breaking change: Users have to call snmp_init() now! - - 2015-11-12: Dirk Ziegelmeier - * Implement possibility to declare private memory pools. This is useful to - decouple some apps from the core (SNMP stack) or make contrib app usage - simpler (httpserver_raw) - - 2015-10-09: Simon Goldschmidt - * started to move "private" header files containing implementation details to - "lwip/priv/" include directory to seperate the API from the implementation. - - 2015-10-07: Simon Goldschmidt - * added sntp client as first "supported" application layer protocol implementation - added 'apps' folder - - 2015-09-30: Dirk Ziegelmeier - * snmp_structs.h, mib_structs.c, mib2.c: snmp: fixed ugly inheritance - implementation by aggregating the "base class" (struct mib_node) in all - derived node classes to get more type-safe code - - 2015-09-23: Simon Goldschmidt - * netif.h/.c, nd6.c: task #13729: Convert netif addresses (IPv4 & IPv6) to - ip_addr_t (so they can be used without conversion/temporary storage) - - 2015-09-08: Dirk Ziegelmeier - * snmp: Separate mib2 counter/table callbacks from snmp agent. This both cleans - up the code and should allow integration of a 3rd party agent/mib2. Simple - counters are kept in MIB2_STATS, tree/table change function prototypes moved to - snmp_mib2.h. - - 2015-09-03: Simon Goldschmidt - * opt.h, dns.h/.c: DNS/IPv6: added support for AAAA records - - 2015-09-01: Simon Goldschmidt - * task #12178: hardware checksum capabilities can be configured per netif - (use NETIF_SET_CHECKSUM_CTRL() in your netif's init function) - - 2015-08-30: Simon Goldschmidt - * PBUF_REF with "custom" pbufs is now supported for RX pbufs (see pcapif in - contrib for an example, LWIP_SUPPORT_CUSTOM_PBUF is required) - - 2015-08-30: Simon Goldschmidt - * support IPv4 source based routing: define LWIP_HOOK_IP4_ROUTE_SRC to point - to a routing function - - 2015-08-05: Simon Goldschmidt - * many files: allow multicast socket options IP_MULTICAST_TTL, IP_MULTICAST_IF - and IP_MULTICAST_LOOP to be used without IGMP - - 2015-04-24: Simon Goldschmidt - * dhcp.h/c, autoip.h/.c: added functions dhcp/autoip_supplied_address() to - check for the source of address assignment (replacement for NETIF_FLAG_DHCP) - - 2015-04-10: Simon Goldschmidt - * many files: task #13480: added LWIP_IPV4 define - IPv4 can be disabled, - leaving an IPv6-only stack - - 2015-04-09: Simon Goldschmidt - * nearly all files: task #12722 (improve IPv4/v6 address handling): renamed - ip_addr_t to ip4_addr_t, renamed ipX_addr_t to ip_addr_t and added IP - version; ip_addr_t is used for all generic IP addresses for the API, - ip(4/6)_addr_t are only used internally or when initializing netifs or when - calling version-related functions - - 2015-03-24: Simon Goldschmidt - * opt.h, ip4_addr.h, ip4.c, ip6.c: loopif is not required for loopback traffic - any more but passed through any netif (ENABLE_LOOPBACK has to be enabled) - - 2015-03-23: Simon Goldschmidt - * opt.h, etharp.c: with ETHARP_TABLE_MATCH_NETIF== 1, duplicate (Auto)-IP - addresses on multiple netifs should now be working correctly (if correctly - addressed by routing, that is) - - 2015-03-23: Simon Goldschmidt - * etharp.c: Stable etharp entries that are about to expire are now refreshed - using unicast to prevent unnecessary broadcast. Only if no answer is received - after 15 seconds, broadcast is used. - - 2015-03-06: Philip Gladstone - * netif.h/.c: patch #8359 (Provide utility function to add an IPv6 address to - an interface) - - 2015-03-05: Simon Goldschmidt - * netif.c, ip4.c, dhcp.c, autoip.c: fixed bug #37068 (netif up/down handling - is unclear): correclty separated administrative status of a netif (up/down) - from 'valid address' status - ATTENTION: netif_set_up() now always has to be called, even when dhcp/autoip - is used! - - 2015-02-26: patch by TabascoEye - * netif.c, udp.h/.c: fixed bug #40753 (re-bind UDP pcbs on change of IP address) - - 2015-02-22: chrysn, Simon Goldschmidt - * *.*: Changed nearly all functions taking 'ip(X)_addr_t' pointer to take - const pointers (changed user callbacks: raw_recv_fn, udp_recv_fn; changed - port callbacks: netif_output_fn, netif_igmp_mac_filter_fn) - - 2015-02-19: Ivan Delamer - * netif.h, dhcp.c: Removed unused netif flag for DHCP. The preferred way to evaluate - if DHCP is active is through netif->dhcp field. - - 2015-02-19: Ivan Delamer - * netif.h, slipif.c, ppp.c: Removed unused netif flag for point to point connections - - 2015-02-18: Simon Goldschmidt - * api_lib.c: fixed bug #37958 "netconn API doesn't handle correctly - connections half-closed by peer" - - 2015-02-18: Simon Goldschmidt - * tcp.c: tcp_alloc() prefers killing CLOSING/LAST_ACK over active connections - (see bug #39565) - - 2015-02-16: Claudius Zingerli, Sergio Caprile - * opt.h, dhcp.h/.c: patch #8361 "Add support for NTP option in DHCP" - - 2015-02-14: Simon Goldschmidt - * opt.h, snmp*: added support for write-access community and dedicated - community for sending traps - - 2015-02-13: Simon Goldschmidt - * opt.h, memp.c: added hook LWIP_HOOK_MEMP_AVAILABLE() to get informed when - a memp pool was empty and an item is now available - - 2015-02-13: Simon Goldschmidt - * opt.h, pbuf.h/.c, etharp.c: Added the option PBUF_LINK_ENCAPSULATION_HLEN to - allocate additional header space for TX on netifs requiring additional headers - - 2015-02-12: chrysn - * timers.h/.c: introduce sys_timeouts_sleeptime (returns the time left before - the next timeout is due, for NO_SYS==1) - - 2015-02-11: Nick van Ijzendoorn - * opt.h, sockets.h/c: patch #7702 "Include ability to increase the socket number - with defined offset" - - 2015-02-11: Frederick Baksik - * opt.h, def.h, others: patch #8423 "arch/perf.h" should be made an optional item - - 2015-02-11: Simon Goldschmidt - * api_msg.c, opt.h: started to implement fullduplex sockets/netconns - (note that this is highly unstable yet!) - - 2015-01-17: Simon Goldschmidt - * api: allow enabling socket API without (public) netconn API - netconn API is - still used by sockets, but keeping it private (static) should allow better - compiler optimizations - - 2015-01-16: Simon Goldschmidt - * tcp_in.c: fixed bug #20506 "Initial congestion window is very small" again - by implementing the calculation formula from RFC3390 - - 2014-12-10: Simon Goldschmidt - * api: added option LWIP_NETCONN_SEM_PER_THREAD to use a semaphore per thread - instead of using one per netconn and per select call - - 2014-12-08: Simon Goldschmidt - * ip6.h: fixed bug #43778: IPv6 header version not set on 16-bit platform - (macro IP6H_VTCFL_SET()) - - 2014-12-08: Simon Goldschmidt - * icmp.c, ip4.c, pbuf.c, udp.c, pbuf.h: task #11472 Support PBUF_REF for RX - (IPv6 and IPv4/v6 reassembly might not work yet) - - 2014-11-06: Simon Goldschmidt - * sockets.c/.h, init.c: lwip_socket_init() is not needed any more - -> compatibility define - - 2014-09-16: Simon Goldschmidt - * dns.c, opt.h: reduced ram usage by parsing DNS responses in place - - 2014-09-16: Simon Goldschmidt - * pbuf.h/.c: added pbuf_take_at() and pbuf_put_at() - - 2014-09-15: Simon Goldschmidt - * dns.c: added source port randomization to make the DNS client more robust - (see bug #43144) - - 2013-09-02: Simon Goldschmidt - * arch.h and many other files: added optional macros PACK_STRUCT_FLD_8() and - PACK_STRUCT_FLD_S() to prevent gcc 4 from warning about struct members that - do not need packing - - 2013-08-19: Simon Goldschmidt - * netif.h: bug #42998: made NETIF_MAX_HWADDR_LEN overridable for some special - networks - - 2013-03-17: Simon Goldschmidt (patch by Ghobad Emadi) - * opt.h, etharp.c: Added LWIP_HOOK_ETHARP_GET_GW to implement IPv4 routing with - multiple gateways - - 2013-04-20: Fatih Asici - * opt.h, etharp.h/.c: patch #7993: Added support for transmitting packets - with VLAN headers via hook function LWIP_HOOK_VLAN_SET and to check them - via hook function LWIP_HOOK_VLAN_CHECK - - 2014-02-20: Simon Goldschmidt (based on patch by Artem Pisarenko) - * patch #7885: modification of api modules to support FreeRTOS-MPU - (don't pass stack-pointers to other threads) - - 2014-02-05: Simon Goldschmidt (patch by "xtian" and "alex_ab") - * patch #6537/#7858: TCP window scaling support - - 2014-01-17: Jiri Engelthaler - * icmp, icmp6, opt.h: patch #8027: Completed HW checksuming for IPv4 and - IPv6 ICMP's - - 2012-08-22: Sylvain Rochet - * New PPP stack for lwIP, developed in ppp-new branch. - Based from pppd 2.4.5, released 2009-11-17, with huge changes to match - code size and memory requirements for embedded devices, including: - - Gluing together the previous low-level PPP code in lwIP to pppd 2.4.5, which - is more or less what pppd sys-* files are, so that we get something working - using the unix port. - - Merged some patchs from lwIP Git repository which add interesting features - or fix bugs. - - Merged some patchs from Debian pppd package which add interesting features - or fix bugs. - - Ported PPP timeout handling to the lwIP timers system - - Disabled all the PPP code using filesystem access, replaced in necessary cases - to configuration variables. - - Disabled all the PPP code forking processes. - - Removed IPX support, lwIP does not support IPX. - - Ported and improved random module from the previous PPP port. - - Removed samba TDB (file-driven database) usage, because it needs a filesystem. - - MS-CHAP required a DES implementation, we added the latest PolarSSL DES - implementation which is under a BSD-ish license. - - Also switched to PolarSSL MD4,MD5,SHA1 implementations, which are meant to be - used in embedded devices with reduced memory footprint. - - Removed PPP configuration file parsing support. - - Added macro definition EAP_SUPPORT to make EAP support optional. - - Added macro definition CHAP_SUPPORT to make CHAP support optional. - - Added macro definition MSCHAP_SUPPORT to make MSCHAP support optional. - - Added macro definition PAP_SUPPORT to make PAP support optional. - - Cleared all Linux syscall calls. - - Disabled demand support using a macro, so that it can be ported later. - - Disabled ECP support using a macro, so that it can be ported later. - - Disabled CCP support using a macro, so that it can be ported later. - - Disabled CBCP support using a macro, so that it can be ported later. - - Disabled LQR support using a macro, so that it can be ported later. - - Print packet debug feature optional, through PRINTPKT_SUPPORT - - Removed POSIX signal usage. - - Fully ported PPPoS code from the previous port. - - Fully ported PPPoE code from the previous port. - - Fully ported VJ compression protocol code from the previous port. - - Removed all malloc()/free() use from PPP, replaced by stack usage or PBUF. - - Disabled PPP server support using a macro, so that it can be ported later. - - Switched all PPP debug to lwIP debug system. - - Created PPP Control Block (PPP PCB), removed PPP unit integer everywhere, - removed all global variables everywhere, did everything necessary for - the PPP stack to support more than one PPP session (pppd only support - one session per process). - - Removed the statically allocated output buffer, now using PBUF. - - Improved structure size of all PPP modules, deep analyze of code to reduce - variables size to the bare minimum. Switched all boolean type (char type in - most architecture) to compiler generated bitfields. - - Added PPP IPv6 support, glued lwIP IPv6 support to PPP. - - Now using a persistent netif interface which can then be used in lwIP - functions requiring a netif. - - Now initializing PPP in lwip_init() function. - - Reworked completely the PPP state machine, so that we don't end up in - anymore in inconsistent state, especially with PPPoE. - - Improved the way we handle PPP reconnection after disconnect, cleaning - everything required so that we start the PPP connection again from a - clean state. - - Added PPP holdoff support, allow the lwIP user to wait a little bit before - reconnecting, prevents connection flood, especially when using PPPoL2TP. - - Added PPPoL2TP LAC support (a.k.a. UDP tunnels), adding a VPN client - feature to lwIP, L2TP being a widely used tunnel protocol. - - Switched all used PPP types to lwIP types (u8t, u16t, u32t, ...) - - Added PPP API "sequential" thread-safe API, based from NETIFAPI. - - 2011-07-21: Simon Goldschmidt - * sockets.c, opt.h: (bug #30185): added LWIP_FIONREAD_LINUXMODE that makes - ioctl/FIONREAD return the size of the next pending datagram. - - 2011-05-25: Simon Goldschmidt - * again nearly the whole stack, renamed ip.c to ip4.c, ip_addr.c to ip4_addr.c, - combined ipv4/ipv6 inet_chksum.c, added ip.h, ip_addr.h: Combined IPv4 - and IPv6 code where possible, added defines to access IPv4/IPv6 in non-IP - code so that the code is more readable. - - 2011-05-17: Patch by Ivan Delamer (only checked in by Simon Goldschmidt) - * nearly the whole stack: Finally, we got decent IPv6 support, big thanks to - Ivan! (this is work in progress: we're just post release anyway :-) - - - ++ Bugfixes: - - 2016-08-23: Simon Goldschmidt - * etharp: removed ETHARP_TRUST_IP_MAC since it is insecure and we don't need - it any more after implementing unicast ARP renewal towards arp entry timeout - - 2016-07-20: Simon Goldschmidt - * memp.h/.c: fixed bug #48442 (memp stats don't work for MEMP_MEM_MALLOC) - - 2016-07-21: Simon Goldschmidt (patch by Ambroz Bizjak) - * tcp_in.c, tcp_out.c: fixed bug #48543 (TCP sent callback may prematurely - report sent data when only part of a segment is acked) and don't include - SYN/FIN in snd_buf counter - - 2016-07-19: Simon Goldschmidt - * etharp.c: fixed bug #48477 (ARP input packet might update static entry) - - 2016-07-11: Simon Goldschmidt - * tcp_in.c: fixed bug #48476 (TCP sent callback called wrongly due to picking - up old pcb->acked - - 2016-06-30: Simon Goldschmidt (original patch by Fabian Koch) - * tcp_in.c: fixed bug #48170 (Vulnerable to TCP RST spoofing) - - 2016-05-20: Dirk Ziegelmeier - * sntp.h/.c: Fix return value of sntp_getserver() call to return a pointer - - 2016-04-05: Simon Goldschmidt (patch by Philip Gladstone) - * udp.c: patch #8358: allow more combinations of listening PCB for IPv6 - - 2016-04-05: Simon Goldschmidt - * netconn/socket API: fixed bug# 43739 (Accept not reporting errors about - aborted connections): netconn_accept() returns ERR_ABRT (sockets: ECONNABORTED) - for aborted connections, ERR_CLSD (sockets: EINVAL) if the listening netconn - is closed, which better seems to follow the standard. - - 2016-03-23: Florent Matignon - * dhcp.c: fixed bug #38203: DHCP options are not recorded in all DHCP ack messages - - 2016-03-22: Simon Goldschmidt - * tcp: changed accept handling to be done internally: the application does not - have to call tcp_accepted() any more. Instead, when delaying accept (e.g. sockets - do), call tcp_backlog_delayed()/tcp_backlog_accepted() (fixes bug #46696) - - 2016-03-22: Simon Goldschmidt - * dns.c: ignore dns response parsing errors, only abort resolving for correct - responses or error responses from correct server (bug #47459) - - 2016-03-17: Simon Goldschmidt - * api_msg.c: fixed bug #47448 (netconn/socket leak if RST is received during close) - - 2016-03-17: Joel Cunningham - * api_msg.c: don't fail closing a socket/netconn when failing to allocate the - FIN segment; blocking the calling thread for a while is better than risking - leaking a netconn/socket (see bug #46701) - - 2016-03-16: Joel Cunningham - * tcp_out.c: reset rto timer on fast retransmission - - 2016-03-16: Deomid Ryabkov - * tcp_out.c: fixed bug #46384 Segment size calculation bug with MSS != TCP_MSS - - 2016-03-05: Simon Goldschmidt - * err.h/.c, sockets.c: ERR_IF is not necessarily a fatal error - - 2015-11-19: fix by Kerem Hadimli - * sockets.c: fixed bug #46471: lwip_accept() leaks socket descriptors if new - netconn was already closed because of peer behavior - - 2015-11-12: fix by Valery Ushakov - * tcp_in.c: fixed bug #46365 tcp_accept_null() should call tcp_abort() - - 2015-10-02: Dirk Ziegelmeier/Simon Goldschmidt - * snmp: cleaned up snmp structs API (fixed race conditions from bug #46089, - reduce ram/rom usage of tables): incompatible change for private MIBs - - 2015-09-30: Simon Goldschmidt - * ip4_addr.c: fixed bug #46072: ip4addr_aton() does not check the number range - of all address parts - - 2015-08-28: Simon Goldschmidt - * tcp.c, tcp_in.c: fixed bug #44023: TCP ssthresh value is unclear: ssthresh - is set to the full send window for active open, too, and is updated once - after SYN to ensure the correct send window is used - - 2015-08-28: Simon Goldschmidt - * tcp: fixed bug #45559: Window scaling casts u32_t to u16_t without checks - - 2015-08-26: Simon Goldschmidt - * ip6_frag.h/.c: fixed bug bug #41009: IPv6 reassembly broken on 64-bit platforms: - define IPV6_FRAG_COPYHEADER==1 on these platforms to copy the IPv6 header - instead of referencing it, which gives more room for struct ip6_reass_helper - - 2015-08-25: Simon Goldschmidt - * sockets.c: fixed bug #45827: recvfrom: TCP window is updated with MSG_PEEK - - 2015-08-20: Manoj Kumar - * snmp_msg.h, msg_in.c: fixed bug #43790: Sending octet string of Length >255 - from SNMP agent - - 2015-08-19: Jens Nielsen - * icmp.c, ip4.c, tcp_in.c, udp.c, raw.c: fixed bug #45120: Broadcast & multiple - interfaces handling - - 2015-08-19: Simon Goldschmidt (patch by "Sandra") - * dns.c: fixed bug #45004: dns response without answer might be discarded - - 2015-08-18: Chrysn - * timers.c: patch #8704 fix sys_timeouts_sleeptime function - - 2015-07-01: Erik Ekman - * puf.c: fixed bug #45454 (pbuf_take_at() skips write and returns OK if offset - is at start of pbuf in chain) - - 2015-05-19: Simon Goldschmidt - * dhcp.h/.c: fixed bugs #45140 and #45141 (dhcp was not stopped correctly after - fixing bug #38204) - - 2015-03-21: Simon Goldschmidt (patch by Homyak) - * tcp_in.c: fixed bug #44766 (LWIP_WND_SCALE: tcphdr->wnd was not scaled in - two places) - - 2015-03-21: Simon Goldschmidt - * tcp_impl.h, tcp.c, tcp_in.c: fixed bug #41318 (Bad memory ref in tcp_input() - after tcp_close()) - - 2015-03-21: Simon Goldschmidt - * tcp_in.c: fixed bug #38468 (tcp_sent() not called on half-open connection for - data ACKed with the same ack as FIN) - - 2015-03-21: Simon Goldschmidt (patch by Christoffer Lind) - * dhcp.h/.c: fixed bug #38204 (DHCP lease time not handled correctly) - - 2015-03-20: Simon Goldschmidt - * dhcp.c: fixed bug #38714 (Missing option and client address in DHCPRELEASE message) - - 2015-03-19: Simon Goldschmidt - * api.h, tcpip.h, api_lib.c, api_msg.c: fixed race conditions in assigning - netconn->last_err (fixed bugs #38121 and #37676) - - 2015-03-09: Simon Goldschmidt - * ip4.c: fixed the IPv4 part of bug #43904 (ip_route() must detect linkup status) - - 2015-03-04: Simon Goldschmidt - * nd6.c: fixed bug #43784 (a host should send at least one Router Solicitation) - - 2015-03-04: Valery Ushakov - * ip6.c: fixed bug #41094 (Byte-order bug in IPv6 fragmentation header test) - - 2015-03-04: Zach Smith - * nd6.c: fixed bug #38153 (nd6_input() byte order issues) - - 2015-02-26: Simon Goldschmidt - * netif.c, tcp.h/.c: fixed bug #44378 (TCP connections are not aborted on netif - remove) - - 2015-02-25: Simon Goldschmidt - * ip4.c, etharp.c: fixed bug #40177 (System hangs when dealing with corrupted - packets), implemented task #12357 (Ensure that malicious packets don't - assert-fail): improved some pbuf_header calls to not assert-fail. - - 2015-02-25: patch by Joel Cunningham - * udp.h/.c, sockets.c: fixed bug #43028 (IP_MULTICAST_TTL affects unicast - datagrams) - - 2015-02-25: patch by Greg Renda - * ip4_frag.c: fixed bug #38210 (ip reassembly while remove oldest datagram) - - 2015-02-25: Simon Goldschmidt - * sockets.c: fixed bug #38165 (socket with mulicast): ensure igmp membership - are dropped when socket (not netconn!) is closed. - - 2015-02-25: Simon Goldschmidt - * ip4.h/.c, udp.c: fixed bug #38061 (wrong multicast routing in IPv4) by - adding an optional default netif for multicast routing - - 2015-02-25: Simon Goldschmidt - * netconn API: fixed that netconn_connect still used message passing for - LWIP_TCPIP_CORE_LOCKING==1 - - 2015-02-22: patch by Jens Nielsen - * icmp.c: fixed bug #38803 (Source address in broadcast ping reply) - - 2015-02-22: Simon Goldschmidt - * udp.h, sockets.c: added proper accessor functions for pcb->multicast_ip - (previously used by get/setsockopt only) - - 2015-02-18: Simon Goldschmidt - * sockets.c: Fixed select not reporting received FIN as 'readable' in certain - rare cases (bug #43779: select(), close(), and TCP retransmission error) - - 2015-02-17: Simon Goldschmidt - * err.h, sockets.c, api_msg.c: fixed bug #38853 "connect() use a wrong errno": - return ERR_ALREADY/EALRADY during connect, ERR_ISCONN/EISCONN when already - connected - - 2015-02-17: Simon Goldschmidt - * tcp_impl.h, tcp_out.c, tcp.c, api_msg.c: fixed bug #37614 "Errors from - ipX_output are not processed". Now tcp_output(_segment) checks for the return - value of ipX_output and does not try to send more on error. A netif driver - can call tcp_txnow() (from tcpip_thread!) to try to send again if TX buffers - are available again. - - 2015-02-14: patches by Freddie Chopin - * snmp*: made community writable, fixed some const pointers - - 2015-02-13: Simon Goldschmidt - * msg_in.c: fixed bug #22070 "MIB_OBJECT_WRITE_ONLY not implemented in SNMP" - - 2015-02-12: Simon Goldschmidt - * ip.h, ip4.c, ip6.c: fixed bug #36403 "ip4_input() and ip6_input() always pass - inp to higher layers": now the accepting netif is passed up, but the input - netif is available through ip_current_input_netif() if required. - - 2015-02-11: patch by hichard - * tcpip.c: fixed bug #43094 "The function tcpip_input() forget to handle IPv6" - - 2015-02-10: Simon Goldschmidt - * netconn API: fixed that netconn_close/netconn_delete still used message passing - for LWIP_TCPIP_CORE_LOCKING==1 - - 2015-02-10: Simon Goldschmidt - * netconn/socket api: fixed bug #44225 "closing TCP socket should time out - eventually", implemented task #6930 "Implement SO_LINGER": closing TCP sockets - times out after 20 seconds or after the configured SND_TIMEOUT or depending - on the linger settings. - - 2015-01-27: Simon Goldschmidt - * api_msg.c: fixed that SHUT_RD followed by SHUT_WR was different to SHUT_RDWR, - fixed return value of lwip_netconn_do_close on unconnected netconns - - 2015-01-17: Simon Goldschmidt - * sockets.c: fixed bug #43361 select() crashes with stale FDs - - 2015-01-17: Simon Goldschmidt - * sockets.c/.h, memp_std.h: fixed bug #40788 "lwip_setsockopt_internal() crashes" - by rewriting set/getsockopt functions to combine checks with the actual code - and add more NULL checks; this also fixes that CORE_LOCKING used message - passing for set/getsockopt. - - 2014-12-19: Simon Goldschmidt - * opt.h, dhcp.h/.c: prevent dhcp from starting when netif link is down (only - when LWIP_DHCP_CHECK_LINK_UP==1, which is disabled by default for - compatibility reasons) - - 2014-12-17: Simon Goldschmidt - * tcp_out.c: fixed bug #43840 Checksum error for TCP_CHECKSUM_ON_COPY==1 for - no-copy data with odd length - - 2014-12-10: Simon Goldschmidt - * sockets.c, tcp.c, others: fixed bug #43797 set/getsockopt: SO_SNDTIMEO/SO_RCVTIMEO - take int as option but should take timeval (LWIP_SO_SNDRCVTIMEO_STANDARD==0 can - be used to revert to the old 'winsock' style behaviour) - Fixed implementation of SO_ACCEPTCONN to just look at the pcb state - - 2014-12-09: Simon Goldschmidt - * ip4.c: fixed bug #43596 IGMP queries from 0.0.0.0 are discarded - - 2014-10-21: Simon Goldschmidt (patch by Joel Cunningham and Albert Huitsing) - * sockts.c: fixed bugs #41495 Possible threading issue in select() and #43278 - event_callback() handle context switch when calling sys_sem_signal() - - 2014-10-21: Simon Goldschmidt - * api_msg.c: fixed bug #38219 Assert on TCP netconn_write with sndtimeout set - - 2014-09-16: Kevin Cernekee - * dns.c: patch #8480 Fix handling of dns_seqno wraparound - - 2014-09-16: Simon Goldschmidt - * tcp_out.c: fixed bug #43192 tcp_enqueue_flags() should not check TCP_SND_QUEUELEN - when sending FIN - - 2014-09-03: Simon Goldschmidt - * msg_in.c: fixed bug #39355 SNMP Memory Leak in case of error - - 2014-09-02: Simon Goldschmidt - * err.h/.c, sockets.c, api_msg.c: fixed bug #43110 call getpeername() before - listen() will cause a error - - 2014-09-02: Simon Goldschmidt - * sockets.c: fixed bug #42117 lwip_fcntl does not set errno - - 2014-09-02: Simon Goldschmidt - * tcp.c: fixed bug #42299 tcp_abort() leaves freed pcb on tcp_bound_pcbs list - - 2014-08-20: Simon Goldschmidt - * dns.c: fixed bug #42987 lwIP is vulnerable to DNS cache poisoning due to - non-randomized TXIDs - - 2014-06-03: Simon Goldschmidt - * tcp_impl.h, tcp_in.c: fixed bug #37969 SYN packet dropped as short packet in - tcp_input function - - 2014-05-20: Simon Goldschmidt - * tcp_out.c: fixed bug #37184 tcp_write problem for pcbs in the SYN_SENT state - - 2014-05-19: Simon Goldschmidt - * *.h: Fixed bug #35874 reserved identifier violation (removed leading underscores - from header include guards) - - 2014-04-08: Simon Goldschmidt - * tcp.c: Fixed bug #36167 tcp server crash when client closes (maximum window) - - 2014-04-06: Simon Goldschmidt - * tcp_in.c: Fixed bug #36210 lwIP does not elicit an empty ACK when received - unacceptable ACK - - 2014-04-06: Simon Goldschmidt - * dhcp.c, ip4.c/.h, ip6.c/.h, udp.c/.h, ip.h: Fixed bug #41787 DHCP Discovery - is invalid when an IP is set to thet netif. - - 2014-03-14: Simon Goldschmidt - * tcp_out.c: Fixed bug #36153 TCP Cheksum error if LWIP_CHECKSUM_ON_COPY=1 - - 2014-03-11: Simon Goldschmidt (patch by Mason) - * opt.h, sockets.c: fixed bug #35928 BSD sockets functions must set errno for - POSIX-compliance - - 2014-02-27: Simon Goldschmidt - * dhcp.c: fixed bug #40303 DHCP xid renewed when sending a DHCPREQUEST - - 2014-02-27: Simon Goldschmidt - * raw.c: fixed bug #41680 raw socket can not receive IPv6 packet when - IP_SOF_BROADCAST_RECV==1 - - 2014-02-27: Simon Goldschmidt - * api_msg.c, sockets.c: fixed bug #38404 getpeeraddr returns success on - unconnected/listening TCP sockets - - 2014-02-27: Simon Goldschmidt - * sockets.c: fixed bug #41729 Some socket functions return Exyz instead of -1 - - 2014-02-25: Simon Goldschmidt - * ip4.c: fixed bug #39514 ip_route() may return an IPv6-only interface - - 2014-02-25: Simon Goldschmidt, patch by Fatih Asici - * pbuf.c: fixed bug #39356 Wrong increment in pbuf_memfind() - - 2014-02-25: Simon Goldschmidt - * netif.c/.h, udp.c: fixed bug #39225 udp.c uses netif_matches_ip6_addr() incorrectly; - renamed function netif_matches_ip6_addr() to netif_get_ip6_addr_match() - - 2014-02-25: Simon Goldschmidt - * igmp.c: fixed bug #39145 IGMP membership report for 224.0.0.1 - - 2014-02-22: Simon Goldschmidt (patch by Amir Shalem) - * etharp.c, opt.h: fixed bug #34681 Limit ARP queue length by ARP_QUEUE_LEN (=3) - - 2014-02-22: Simon Goldschmidt (patch by Amir Shalem) - * etharp.h/.c: fixed bug #34682 Limit ARP request flood for unresolved entry - - 2014-02-20: Simon Goldschmidt - * tcp_out.c: fixed bug #39683 Assertion "seg->tcphdr not aligned" failed with - MEM_ALIGNMENT = 8 - - 2014-02-20: Simon Goldschmidt - * sockets.c: fixed bug #39882 No function shall set errno to 0 - - 2014-02-20: Simon Goldschmidt - * mib_structs.c: fixed bug #40050 SNMP problem with MIB arrays > 255 - - 2014-02-20: Simon Goldschmidt - * api.h, sockets.c: fixed bug #41499 netconn::recv_avail can overflow - - 2014-01-08: Stathis Voukelatos - * memp_std.h: patch #7928 Fixed size calculation in MALLOC memory pool - creation macro - - 2014-01-18: Brian Fahs - * tcp_out.c: patch #8237: tcp_rexmit_rto fails to update pcb->unsent_oversize - when necessary - - 2014-01-17: Grant Erickson, Jay Logue, Simon Goldschmidt - * ipv6.c, netif.c: patch #7913 Enable Support for IPv6 Loopback - - 2014-01-16: Stathis Voukelatos - * netif.c: patch #7902 Fixed netif_poll() operation when LWIP_LOOPBACK_MAX_PBUFS > 0 - - 2014-01-14: "Freddie Chopin" - * snmp.h, mib2.c: fixed constness and spelling of sysdescr - - 2014-01-14: Simon Goldschmidt (patch by Thomas Faber) - * tcpip.c: patch #8241: Fix implicit declaration of ip_input with - LWIP_TCPIP_CORE_LOCKING_INPUT disabled - - 2014-01-14: chrysn - * timers.c: patch #8244 make timeouts usable reliably from outside of the - timeout routine - - 2014-01-10: Simon Goldschmidt - * ip_frag.c, ip6_frag.c: fixed bug #41041 Potential use-after-free in IPv6 reassembly - - 2014-01-10: Simon Goldschmidt - * memp.c: fixed bug #41188 Alignment error in memp_init() when MEMP_SEPARATE_POOLS==1 - - 2014-01-10: Simon Goldschmidt - * tcp.c: fixed bug #39898 tcp_fasttmr() possible lock due to infinte queue process loop - - 2013-06-29: Simon Goldschmidt - * inet.h, sockets.h: partially fixed bug #37585: IPv6 compatibility (in socket structs) - - 2013-06-29: Simon Goldschmidt - * inet6.h: bug #37585/task #12600: fixed struct in6_addr.s6_addr to conform to spec - - 2013-04-24: patch by Liam - * api_msg.c: patch #8008 Fix a potential null pointer dereference in assert - - 2013-04-24: Simon Goldschmidt - * igmp.c: fixed possible division by zero - - 2013-04-24: Simon Goldschmidt - * ip6.h, some ipv6 C files: fixed bug #38526 Coverity: Recursive Header Inclusion in ip6.h - - 2013-04-24: Simon Goldschmidt (patch by Emil Ljungdahl): - * netif.c: fixed bug #38586 netif_loop_output() "deadlocks" - - 2013-01-15: Simon Goldschmidt - * ip4.c: fixed bug #37665 ip_canforward operates on address in wrong byte order - - 2013-01-15: Simon Goldschmidt - * pbuf.h: fixed bug #38097 pbuf_free_ooseq() warning - - 2013-01-14: Simon Goldschmidt - * dns.c: fixed bug #37705 Possible memory corruption in DNS query - - 2013-01-11: Simon Goldschmidt - * raw.c: fixed bug #38066 Raw pcbs can alter packet without eating it - - 2012-08-22: Simon Goldschmidt - * memp.c: fixed bug #37166: memp_sanity check loops itself - - 2012-08-13: Simon Goldschmidt - * dhcp.c: fixed bug #36645: Calling dhcp_release before dhcp_start - dereferences NULL - - 2012-08-13: Simon Goldschmidt - * msg_out.c: fixed bug #36840 snmp_send_trap() NULL de-reference if traps - configured but no interfaces available - - 2012-08-13: Simon Goldschmidt - * dns.c: fixed bug #36899 DNS TTL 0 is cached for a long time - - 2012-05-11: Simon Goldschmidt (patch by Marty) - * memp.c: fixed bug #36412: memp.c does not compile when - MEMP_OVERFLOW_CHECK > zero and MEMP_SEPARATE_POOLS == 1 - - 2012-05-03: Simon Goldschmidt (patch by Sylvain Rochet) - * ppp.c: fixed bug #36283 (PPP struct used on header size computation and - not packed) - - 2012-05-03: Simon Goldschmidt (patch by David Empson) - * ppp.c: fixed bug #36388 (PPP: checksum-only in last pbuf leads to pbuf with - zero length) - - 2012-03-25: Simon Goldschmidt - * api_msg.c: Fixed bug #35817: do_connect() invalidly signals op_completed - for UDP/RAW with LWIP_TCPIP_CORE_LOCKING==1 - - 2012-03-25: Simon Goldschmidt - * api_msg.h, api_lib.c, api_msg.c, netifapi.c: fixed bug #35931: Name space - pollution in api_msg.c and netifapi.c - - 2011-08-24: Simon Goldschmidt - * inet6.h: fixed bug #34124 struct in6_addr does not conform to the standard - - - -(STABLE-1.4.1) - - ++ New features: - - 2012-03-25: Simon Goldschmidt (idea by Mason) - * posix/*: added posix-compatibility include files posix/netdb.h and posix/sys/socket.h - which are a simple wrapper to the correct lwIP include files. - - 2012-01-16: Simon Goldschmidt - * opt.h, icmp.c: Added option CHECKSUM_GEN_ICMP - - 2011-12-17: Simon Goldschmidt - * ip.h: implemented API functions to access so_options of IP pcbs (UDP, TCP, RAW) - (fixes bug #35061) - - 2011-09-27: Simon Goldschmidt - * opt.h, tcp.c, tcp_in.c: Implemented limiting data on ooseq queue (task #9989) - (define TCP_OOSEQ_MAX_BYTES / TCP_OOSEQ_MAX_PBUFS in lwipopts.h) - - 2011-09-21: Simon Goldschmidt - * opt.h, api.h, api_lib.c, api_msg.h/.c, sockets.c: Implemented timeout on - send (TCP only, bug #33820) - - 2011-09-21: Simon Goldschmidt - * init.c: Converted runtime-sanity-checks into compile-time checks that can - be disabled (since runtime checks can often not be seen on embedded targets) - - 2011-09-11: Simon Goldschmidt - * ppp.h, ppp_impl.h: splitted ppp.h to an internal and external header file - to get a clear separation of which functions an application or port may use - (task #11281) - - 2011-09-11: Simon Goldschmidt - * opt.h, tcp_impl.h, tcp.c, udp.h/.c: Added a config option to randomize - initial local TCP/UDP ports (so that different port ranges are used after - a reboot; bug #33818; this one added tcp_init/udp_init functions again) - - 2011-09-03: Simon Goldschmidt - * dhcp.c: DHCP uses LWIP_RAND() for xid's (bug #30302) - - 2011-08-24: Simon Goldschmidt - * opt.h, netif.h/.c: added netif remove callback (bug #32397) - - 2011-07-26: Simon Goldschmidt - * etharp.c: ETHARP_SUPPORT_VLAN: add support for an external VLAN filter - function instead of only checking for one VLAN (define ETHARP_VLAN_CHECK_FN) - - 2011-07-21: Simon Goldschmidt (patch by hanhui) - * ip4.c, etharp.c, pbuf.h: bug #33634 ip_forward() have a faulty behaviour: - Added pbuf flags to mark incoming packets as link-layer broadcast/multicast. - Also added code to allow ip_forward() to forward non-broadcast packets to - the input netif (set IP_FORWARD_ALLOW_TX_ON_RX_NETIF==1). - - 2011-06-26: Simon Goldschmidt (patch by Cameron Gutman) - * tcp.c, tcp_out.c: bug #33604: added some more asserts to check that - pcb->state != LISTEN - - 2011-05-14: Simon Goldschmidt (patch by Stéphane Lesage) - * tcpip.c/.h: patch #7449 allow tcpip callback from interrupt with static - memory message - - - ++ Bugfixes: - - 2012-09-26: Simon Goldschmidt - * api_msg.c: fixed bug #37405 'err_tcp()' uses already freed 'netconn' object - - 2012-09-26: patch by Henrik Persson - * dhcp.c: patch #7843 Fix corner case with dhcp timeouts - - 2012-09-26: patch by Henrik Persson - * dhcp.c: patch #7840 Segfault in dhcp_parse_reply if no end marker in dhcp packet - - 2012-08-22: Simon Goldschmidt - * memp.c: fixed bug #37166: memp_sanity check loops itself - - 2012-05-08: Simon Goldschmidt - * tcp_out.c: fixed bug: #36380 unsent_oversize mismatch in 1.4.1RC1 (this was - a debug-check issue only) - - 2012-03-27: Simon Goldschmidt - * vj.c: fixed bug #35756 header length calculation problem in ppp/vj.c - - 2012-03-27: Simon Goldschmidt (patch by Mason) - * tcp_out.c: fixed bug #35945: SYN packet should provide the recv MSS not the - send MSS - - 2012-03-22: Simon Goldschmidt - * ip4.c: fixed bug #35927: missing refragmentaion in ip_forward - - 2012-03-20: Simon Goldschmidt (patch by Mason) - * netdb.c: fixed bug #35907: lwip_gethostbyname_r returns an invalid h_addr_list - - 2012-03-12: Simon Goldschmidt (patch by Bostjan Meglic) - * ppp.c: fixed bug #35809: PPP GetMask(): Compiler warning on big endian, - possible bug on little endian system - - 2012-02-23: Simon Goldschmidt - * etharp.c: fixed bug #35595: Impossible to send broadcast without a gateway - (introduced when fixing bug# 33551) - - 2012-02-16: Simon Goldschmidt - * ppp.c: fixed pbuf leak when PPP session is aborted through pppSigHUP() - (bug #35541: PPP Memory Leak) - - 2012-02-16: Simon Goldschmidt - * etharp.c: fixed bug #35531: Impossible to send multicast without a gateway - (introduced when fixing bug# 33551) - - 2012-02-16: Simon Goldschmidt (patch by Stéphane Lesage) - * msg_in.c, msg_out.c: fixed bug #35536 SNMP: error too big response is malformed - - 2012-02-15: Simon Goldschmidt - * init.c: fixed bug #35537: MEMP_NUM_* sanity checks should be disabled with - MEMP_MEM_MALLOC==1 - - 2012-02-12: Simon Goldschmidt - * tcp.h, tcp_in.c, tcp_out.c: partly fixed bug #25882: TCP hangs on - MSS > pcb->snd_wnd (by not creating segments bigger than half the window) - - 2012-02-11: Simon Goldschmidt - * tcp.c: fixed bug #35435: No pcb state check before adding it to time-wait - queue while closing - - 2012-01-22: Simon Goldschmidt - * tcp.c, tcp_in.c: fixed bug #35305: pcb may be freed too early on shutdown(WR) - - 2012-01-21: Simon Goldschmidt - * tcp.c: fixed bug #34636: FIN_WAIT_2 - Incorrect shutdown of TCP pcb - - 2012-01-20: Simon Goldschmidt - * dhcp.c: fixed bug #35151: DHCP asserts on incoming option lengths - - 2012-01-20: Simon Goldschmidt - * pbuf.c: fixed bug #35291: NULL pointer in pbuf_copy - - 2011-11-25: Simon Goldschmidt - * tcp.h/.c, tcp_impl.h, tcp_in.c: fixed bug #31177: tcp timers can corrupt - tcp_active_pcbs in some cases - - 2011-11-23: Simon Goldschmidt - * sys.c: fixed bug #34884: sys_msleep() body needs to be surrounded with - '#ifndef sys_msleep' - - 2011-11-22: Simon Goldschmidt - * netif.c, etharp.h/.c: fixed bug #34684: Clear the arp table cache when - netif is brought down - - 2011-10-28: Simon Goldschmidt - * tcp_in.c: fixed bug #34638: Dead code in tcp_receive - pcb->dupacks - - 2011-10-23: Simon Goldschmidt - * mem.c: fixed bug #34429: possible memory corruption with - LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT set to 1 - - 2011-10-18: Simon Goldschmidt - * arch.h, netdb.c: fixed bug #34592: lwip_gethostbyname_r uses nonstandard - error value - - 2011-10-18: Simon Goldschmidt - * opt.h: fixed default values of TCP_SNDLOWAT and TCP_SNDQUEUELOWAT for small - windows (bug #34176 select after non-blocking send times out) - - 2011-10-18: Simon Goldschmidt - * tcp_impl.h, tcp_out.c: fixed bug #34587: TCP_BUILD_MSS_OPTION doesn't - consider netif->mtu, causes slow network - - 2011-10-18: Simon Goldschmidt - * sockets.c: fixed bug #34581 missing parentheses in udplite sockets code - - 2011-10-18: Simon Goldschmidt - * sockets.h: fixed bug #34580 fcntl() is missing in LWIP_COMPAT_SOCKETS - - 2011-10-17: Simon Goldschmidt - * api_msg.c: fixed bug #34569: shutdown(SHUT_WR) crashes netconn/socket api - - 2011-10-13: Simon Goldschmidt - * tcp_in.c, tcp_out.c: fixed bug #34517 (persist timer is started although no - zero window is received) by starting the persist timer when a zero window is - received, not when we have more data queued for sending than fits into the - window - - 2011-10-13: Simon Goldschmidt - * def.h, timers.c: fixed bug #34541: LWIP_U32_DIFF is unnecessarily complex - - 2011-10-13: Simon Goldschmidt - * sockets.c, api_lib.c: fixed bug #34540: compiler error when CORE_LOCKING is - used and not all protocols are enabled - - 2011-10-12: Simon Goldschmidt - * pbuf.c: fixed bug #34534: Error in sending fragmented IP if MEM_ALIGNMENT > 4 - - 2011-10-09: Simon Goldschmidt - * tcp_out.c: fixed bug #34426: tcp_zero_window_probe() transmits incorrect - byte value when pcb->unacked != NULL - - 2011-10-09: Simon Goldschmidt - * ip4.c: fixed bug #34447 LWIP_IP_ACCEPT_UDP_PORT(dst_port) wrong - - 2011-09-27: Simon Goldschmidt - * tcp_in.c, tcp_out.c: Reset pcb->unsent_oversize in 2 more places... - - 2011-09-27: Simon Goldschmidt - * tcp_in.c: fixed bug #28288: Data after FIN in oos queue - - 2011-09-27: Simon Goldschmidt - * dhcp.c: fixed bug #34406 dhcp_option_hostname() can overflow the pbuf - - 2011-09-24: Simon Goldschmidt - * mem.h: fixed bug #34377 MEM_SIZE_F is not defined if MEM_LIBC_MALLOC==1 - - 2011-09-23: Simon Goldschmidt - * pbuf.h, tcp.c, tcp_in.c: fixed bug #33871: rejecting TCP_EVENT_RECV() for - the last packet including FIN can lose data - - 2011-09-22: Simon Goldschmidt - * tcp_impl.h: fixed bug #34355: nagle does not take snd_buf/snd_queuelen into - account - - 2011-09-21: Simon Goldschmidt - * opt.h: fixed default value of TCP_SND_BUF to not violate the sanity checks - in init.c - - 2011-09-20: Simon Goldschmidt - * timers.c: fixed bug #34337 (possible NULL pointer in sys_check_timeouts) - - 2011-09-11: Simon Goldschmidt - * tcp_out.c: use pcb->mss instead of TCP_MSS for preallocate mss-sized pbufs - (bug #34019) - - 2011-09-09: Simon Goldschmidt - * udp.c: fixed bug #34072: UDP broadcast is received from wrong UDP pcb if - udp port matches - - 2011-09-03: Simon Goldschmidt - * tcp_in.c: fixed bug #33952 PUSH flag in incoming packet is lost when packet - is aggregated and sent to application - - 2011-09-01: Simon Goldschmidt - * opt.h: fixed bug #31809 LWIP_EVENT_API in opts.h is inconsistent compared - to other options - - 2011-09-01: Simon Goldschmidt - * tcp_in.c: fixed bug #34111 RST for ACK to listening pcb has wrong seqno - - 2011-08-24: Simon Goldschmidt - * api_msg.c, sockets.c: fixed bug #33956 Wrong error returned when calling - accept() on UDP connections - - 2011-08-24: Simon Goldschmidt - * sockets.h: fixed bug #34057 socklen_t should be a typedef - - 2011-08-24: Simon Goldschmidt - * pbuf.c: fixed bug #34112 Odd check in pbuf_alloced_custom (typo) - - 2011-08-24: Simon Goldschmidt - * dhcp.c: fixed bug #34122 dhcp: hostname can overflow - - 2011-08-24: Simon Goldschmidt - * netif.c: fixed bug #34121 netif_add/netif_set_ipaddr fail on NULL ipaddr - - 2011-08-22: Simon Goldschmidt - * tcp_out.c: fixed bug #33962 TF_FIN not always set after FIN is sent. (This - merely prevents nagle from not transmitting fast after closing.) - - 2011-07-22: Simon Goldschmidt - * api_lib.c, api_msg.c, sockets.c, api.h: fixed bug #31084 (socket API returns - always EMSGSIZE on non-blocking sockets if data size > send buffers) -> now - lwip_send() sends as much as possible for non-blocking sockets - - 2011-07-22: Simon Goldschmidt - * pbuf.c/.h, timers.c: freeing ooseq pbufs when the pbuf pool is empty implemented - for NO_SYS==1: when not using sys_check_timeouts(), call PBUF_CHECK_FREE_OOSEQ() - at regular intervals from main level. - - 2011-07-21: Simon Goldschmidt - * etharp.c: fixed bug #33551 (ARP entries may time out although in use) by - sending an ARP request when an ARP entry is used in the last minute before - it would time out. - - 2011-07-04: Simon Goldschmidt - * sys_arch.txt: Fixed documentation after changing sys arch prototypes for 1.4.0. - - 2011-06-26: Simon Goldschmidt - * tcp.c: fixed bug #31723 (tcp_kill_prio() kills pcbs with the same prio) by - updating its documentation only. - - 2011-06-26: Simon Goldschmidt - * mem.c: fixed bug #33545: With MEM_USE_POOLS==1, mem_malloc can return an - unaligned pointer. - - 2011-06-26: Simon Goldschmidt - * mem.c: fixed bug #33544 "warning in mem.c in lwip 1.4.0 with NO_SYS=1" - - 2011-05-25: Simon Goldschmidt - * tcp.c: fixed bug #33398 (pointless conversion when checking TCP port range) - - - -(STABLE-1.4.0) - - ++ New features: - - 2011-03-27: Simon Goldschmidt - * tcp_impl.h, tcp_in.c, tcp_out.c: Removed 'dataptr' from 'struct tcp_seg' and - calculate it in tcp_zero_window_probe (the only place where it was used). - - 2010-11-21: Simon Goldschmidt - * dhcp.c/.h: Added a function to deallocate the struct dhcp from a netif - (fixes bug #31525). - - 2010-07-12: Simon Goldschmidt (patch by Stephane Lesage) - * ip.c, udp.c/.h, pbuf.h, sockets.c: task #10495: Added support for - IP_MULTICAST_LOOP at socket- and raw-API level. - - 2010-06-16: Simon Goldschmidt - * ip.c: Added an optional define (LWIP_IP_ACCEPT_UDP_PORT) that can allow - link-layer-addressed UDP traffic to be received while a netif is down (just - like DHCP during configuration) - - 2010-05-22: Simon Goldschmidt - * many many files: bug #27352: removed packing from ip_addr_t, the packed - version is now only used in protocol headers. Added global storage for - current src/dest IP address while in input functions. - - 2010-05-16: Simon Goldschmidt - * def.h: task #10391: Add preprocessor-macros for compile-time htonl - calculation (and use them throughout the stack where applicable) - - 2010-05-16: Simon Goldschmidt - * opt.h, memp_std.h, memp.c, ppp_oe.h/.c: PPPoE now uses its own MEMP pool - instead of the heap (moved struct pppoe_softc from ppp_oe.c to ppp_oe.h) - - 2010-05-16: Simon Goldschmidt - * opt.h, memp_std.h, dns.h/.c: DNS_LOCAL_HOSTLIST_IS_DYNAMIC uses its own - MEMP pool instead of the heap - - 2010-05-13: Simon Goldschmidt - * tcp.c, udp.c: task #6995: Implement SO_REUSEADDR (correctly), added - new option SO_REUSE_RXTOALL to pass received UDP broadcast/multicast - packets to more than one pcb. - - 2010-05-02: Simon Goldschmidt - * netbuf.h/.c, sockets.c, api_msg.c: use checksum-on-copy for sending - UDP data for LWIP_NETIF_TX_SINGLE_PBUF==1 - - 2010-04-30: Simon Goldschmidt - * udp.h/.c, pbuf.h/.c: task #6849: added udp_send(_to/_if) functions that - take a precalculated checksum, added pbuf_fill_chksum() to copy data - into a pbuf and at the same time calculating the checksum for that data - - 2010-04-29: Simon Goldschmidt - * ip_addr.h, etharp.h/.c, autoip.c: Create overridable macros for copying - 2-byte-aligned IP addresses and MAC addresses - - 2010-04-28: Patch by Bill Auerbach - * ip.c: Inline generating IP checksum to save a function call - - 2010-04-14: Simon Goldschmidt - * tcpip.h/.c, timers.c: Added an overridable define to get informed when the - tcpip_thread processes messages or timeouts to implement a watchdog. - - 2010-03-28: Simon Goldschmidt - * ip_frag.c: create a new (contiguous) PBUF_RAM for every outgoing - fragment if LWIP_NETIF_TX_SINGLE_PBUF==1 - - 2010-03-27: Simon Goldschmidt - * etharp.c: Speedup TX by moving code from find_entry to etharp_output/ - etharp_query to prevent unnecessary function calls (inspired by - patch #7135). - - 2010-03-20: Simon Goldschmidt - * opt.h, tcpip.c/.h: Added an option to disable tcpip_(un)timeout code - since the linker cannot do this automatically to save space. - - 2010-03-20: Simon Goldschmidt - * opt.h, etharp.c/.h: Added support for static ARP table entries - - 2010-03-14: Simon Goldschmidt - * tcp_impl.h, tcp_out.c, inet_chksum.h/.c: task #6849: Calculate checksum - when creating TCP segments, not when (re-)transmitting them. - - 2010-03-07: Simon Goldschmidt - * sockets.c: bug #28775 (select/event_callback: only check select_cb_list - on change) plus use SYS_LIGHTWEIGHT_PROT to protect the select code. - This should speed up receiving data on sockets as the select code in - event_callback is only executed when select is waiting. - - 2010-03-06: Simon Goldschmidt - * tcp_out.c: task #7013 (Create option to have all packets delivered to - netif->output in one piece): Always copy to try to create single pbufs - in tcp_write. - - 2010-03-06: Simon Goldschmidt - * api.h, api_lib.c, sockets.c: task #10167 (sockets: speed up TCP recv - by not allocating a netbuf): added function netconn_recv_tcp_pbuf() - for tcp netconns to receive pbufs, not netbufs; use that function - for tcp sockets. - - 2010-03-05: Jakob Ole Stoklundsen / Simon Goldschmidt - * opt.h, tcp.h, tcp_impl.h, tcp.c, tcp_in.c, tcp_out.c: task #7040: - Work on tcp_enqueue: Don't waste memory when chaining segments, - added option TCP_OVERSIZE to prevent creating many small pbufs when - calling tcp_write with many small blocks of data. Instead, pbufs are - allocated larger than needed and the space is used for later calls to - tcp_write. - - 2010-02-21: Simon Goldschmidt - * stats.c/.h: Added const char* name to mem- and memp-stats for easier - debugging. - - 2010-02-21: Simon Goldschmidt - * tcp.h (and usages), added tcp_impl.h: Splitted API and internal - implementation of tcp to make API usage cleare to application programmers - - 2010-02-14: Simon Goldschmidt/Stephane Lesage - * ip_addr.h: Improved some defines working on ip addresses, added faster - macro to copy addresses that cannot be NULL - - 2010-02-13: Simon Goldschmidt - * api.h, api_lib.c, api_msg.c, sockets.c: task #7865 (implement non- - blocking send operation) - - 2010-02-12: Simon Goldschmidt - * sockets.c/.h: Added a minimal version of posix fctl() to have a - standardised way to set O_NONBLOCK for nonblocking sockets. - - 2010-02-12: Simon Goldschmidt - * dhcp.c/.h, autoip.c/.h: task #10139 (Prefer statically allocated - memory): added autoip_set_struct() and dhcp_set_struct() to let autoip - and dhcp work with user-allocated structs instead of callin mem_malloc - - 2010-02-12: Simon Goldschmidt/Jeff Barber - * tcp.c/h: patch #6865 (SO_REUSEADDR for TCP): if pcb.so_options has - SOF_REUSEADDR set, allow binding to endpoint in TIME_WAIT - - 2010-02-12: Simon Goldschmidt - * sys layer: task #10139 (Prefer statically allocated memory): converted - mbox and semaphore functions to take pointers to sys_mbox_t/sys_sem_t; - converted sys_mbox_new/sys_sem_new to take pointers and return err_t; - task #7212: Add Mutex concept in sys_arch (define LWIP_COMPAT_MUTEX - to let sys.h use binary semaphores instead of mutexes - as before) - - 2010-02-09: Simon Goldschmidt (Simon Kallweit) - * timers.c/.h: Added function sys_restart_timeouts() from patch #7085 - (Restart system timeout handling) - - 2010-02-09: Simon Goldschmidt - * netif.c/.h, removed loopif.c/.h: task #10153 (Integrate loopif into - netif.c) - loopif does not have to be created by the port any more, - just define LWIP_HAVE_LOOPIF to 1. - - 2010-02-08: Simon Goldschmidt - * inet.h, ip_addr.c/.h: Added reentrant versions of inet_ntoa/ipaddr_ntoa - inet_ntoa_r/ipaddr_ntoa_r - - 2010-02-08: Simon Goldschmidt - * netif.h: Added netif_s/get_igmp_mac_filter() macros - - 2010-02-05: Simon Goldschmidt - * netif.h: Added function-like macros to get/set the hostname on a netif - - 2010-02-04: Simon Goldschmidt - * nearly every file: Replaced struct ip_addr by typedef ip_addr_t to - make changing the actual implementation behind the typedef easier. - - 2010-02-01: Simon Goldschmidt - * opt.h, memp_std.h, dns.h, netdb.c, memp.c: Let netdb use a memp pool - for allocating memory when getaddrinfo() is called. - - 2010-01-31: Simon Goldschmidt - * dhcp.h, dhcp.c: Reworked the code that parses DHCP options: parse - them once instead of parsing for every option. This also removes - the need for mem_malloc from dhcp_recv and makes it possible to - correctly retrieve the BOOTP file. - - 2010-01-30: simon Goldschmidt - * sockets.c: Use SYS_LIGHTWEIGHT_PROT instead of a semaphore to protect - the sockets array. - - 2010-01-29: Simon Goldschmidt (patch by Laura Garrett) - * api.h, api_msg.c, sockets.c: Added except set support in select - (patch #6860) - - 2010-01-29: Simon Goldschmidt (patch by Laura Garrett) - * api.h, sockets.h, err.h, api_lib.c, api_msg.c, sockets.c, err.c: - Add non-blocking support for connect (partly from patch #6860), - plus many cleanups in socket & netconn API. - - 2010-01-27: Simon Goldschmidt - * opt.h, tcp.h, init.c, api_msg.c: Added TCP_SNDQUEUELOWAT corresponding - to TCP_SNDLOWAT and added tcp_sndqueuelen() - this fixes bug #28605 - - 2010-01-26: Simon Goldschmidt - * snmp: Use memp pools for snmp instead of the heap; added 4 new pools. - - 2010-01-14: Simon Goldschmidt - * ppp.c/.h: Fixed bug #27856: PPP: Set netif link- and status-callback - by adding ppp_set_netif_statuscallback()/ppp_set_netif_linkcallback() - - 2010-01-13: Simon Goldschmidt - * mem.c: The heap now may be moved to user-defined memory by defining - LWIP_RAM_HEAP_POINTER as a void pointer to that memory's address - (patch #6966 and bug #26133) - - 2010-01-10: Simon Goldschmidt (Bill Auerbach) - * opt.h, memp.c: patch #6822 (Add option to place memory pools in - separate arrays) - - 2010-01-10: Simon Goldschmidt - * init.c, igmp.c: patch #6463 (IGMP - Adding Random Delay): added define - LWIP_RAND() for lwip-wide randomization (to be defined in cc.h) - - 2009-12-31: Simon Goldschmidt - * tcpip.c, init.c, memp.c, sys.c, memp_std.h, sys.h, tcpip.h - added timers.c/.h: Separated timer implementation from semaphore/mbox - implementation, moved timer implementation to timers.c/.h, timers are - now only called from tcpip_thread or by explicitly checking them. - (TASK#7235) - - 2009-12-27: Simon Goldschmidt - * opt.h, etharp.h/.c, init.c, tcpip.c: Added an additional option - LWIP_ETHERNET to support ethernet without ARP (necessary for pure PPPoE) - - - ++ Bugfixes: - - 2011-04-20: Simon Goldschmidt - * sys_arch.txt: sys_arch_timeouts() is not needed any more. - - 2011-04-13: Simon Goldschmidt - * tcp.c, udp.c: Fixed bug #33048 (Bad range for IP source port numbers) by - using ports in the IANA private/dynamic range (49152 through 65535). - - 2011-03-29: Simon Goldschmidt, patch by Emil Lhungdahl: - * etharp.h/.c: Fixed broken VLAN support. - - 2011-03-27: Simon Goldschmidt - * tcp.c: Fixed bug #32926 (TCP_RMV(&tcp_bound_pcbs) is called on unbound tcp - pcbs) by checking if the pcb was bound (local_port != 0). - - 2011-03-27: Simon Goldschmidt - * ppp.c: Fixed bug #32280 (ppp: a pbuf is freed twice) - - 2011-03-27: Simon Goldschmidt - * sockets.c: Fixed bug #32906: lwip_connect+lwip_send did not work for udp and - raw pcbs with LWIP_TCPIP_CORE_LOCKING==1. - - 2011-03-27: Simon Goldschmidt - * tcp_out.c: Fixed bug #32820 (Outgoing TCP connections created before route - is present never times out) by starting retransmission timer before checking - route. - - 2011-03-22: Simon Goldschmidt - * ppp.c: Fixed bug #32648 (PPP code crashes when terminating a link) by only - calling sio_read_abort() if the file descriptor is valid. - - 2011-03-14: Simon Goldschmidt - * err.h/.c, sockets.c, api_msg.c: fixed bug #31748 (Calling non-blocking connect - more than once can render a socket useless) since it mainly involves changing - "FATAL" classification of error codes: ERR_USE and ERR_ISCONN just aren't fatal. - - 2011-03-13: Simon Goldschmidt - * sockets.c: fixed bug #32769 (ESHUTDOWN is linux-specific) by fixing - err_to_errno_table (ERR_CLSD: ENOTCONN instead of ESHUTDOWN), ERR_ISCONN: - use EALRADY instead of -1 - - 2011-03-13: Simon Goldschmidt - * api_lib.c: netconn_accept: return ERR_ABRT instead of ERR_CLSD if the - connection has been aborted by err_tcp (since this is not a normal closing - procedure). - - 2011-03-13: Simon Goldschmidt - * tcp.c: tcp_bind: return ERR_VAL instead of ERR_ISCONN when trying to bind - with pcb->state != CLOSED - - 2011-02-17: Simon Goldschmidt - * rawapi.txt: Fixed bug #32561 tcp_poll argument definition out-of-order in - documentation - - 2011-02-17: Simon Goldschmidt - * many files: Added missing U/UL modifiers to fix 16-bit-arch portability. - - 2011-01-24: Simon Goldschmidt - * sockets.c: Fixed bug #31741: lwip_select seems to have threading problems - - 2010-12-02: Simon Goldschmidt - * err.h: Fixed ERR_IS_FATAL so that ERR_WOULDBLOCK is not fatal. - - 2010-11-23: Simon Goldschmidt - * api.h, api_lib.c, api_msg.c, sockets.c: netconn.recv_avail is only used for - LWIP_SO_RCVBUF and ioctl/FIONREAD. - - 2010-11-23: Simon Goldschmidt - * etharp.c: Fixed bug #31720: ARP-queueing: RFC 1122 recommends to queue at - least 1 packet -> ARP_QUEUEING==0 now queues the most recent packet. - - 2010-11-23: Simon Goldschmidt - * tcp_in.c: Fixed bug #30577: tcp_input: don't discard ACK-only packets after - refusing 'refused_data' again. - - 2010-11-22: Simon Goldschmidt - * sockets.c: Fixed bug #31590: getsockopt(... SO_ERROR ...) gives EINPROGRESS - after a successful nonblocking connection. - - 2010-11-22: Simon Goldschmidt - * etharp.c: Fixed bug #31722: IP packets sent with an AutoIP source addr - must be sent link-local - - 2010-11-22: Simon Goldschmidt - * timers.c: patch #7329: tcp_timer_needed prototype was ifdef'ed out for - LWIP_TIMERS==0 - - 2010-11-20: Simon Goldschmidt - * sockets.c: Fixed bug #31170: lwip_setsockopt() does not set socket number - - 2010-11-20: Simon Goldschmidt - * sockets.h: Fixed bug #31304: Changed SHUT_RD, SHUT_WR and SHUT_RDWR to - resemble other stacks. - - 2010-11-20: Simon Goldschmidt - * dns.c: Fixed bug #31535: TCP_SND_QUEUELEN must be at least 2 or else - no-copy TCP writes will never succeed. - - 2010-11-20: Simon Goldschmidt - * dns.c: Fixed bug #31701: Error return value from dns_gethostbyname() does - not match documentation: return ERR_ARG instead of ERR_VAL if not - initialized or wrong argument. - - 2010-10-20: Simon Goldschmidt - * sockets.h: Fixed bug #31385: sizeof(struct sockaddr) is 30 but should be 16 - - 2010-10-05: Simon Goldschmidt - * dhcp.c: Once again fixed #30038: DHCP/AutoIP cooperation failed when - replugging the network cable after an AutoIP address was assigned. - - 2010-08-10: Simon Goldschmidt - * tcp.c: Fixed bug #30728: tcp_new_port() did not check listen pcbs - - 2010-08-03: Simon Goldschmidt - * udp.c, raw.c: Don't chain empty pbufs when sending them (fixes bug #30625) - - 2010-08-01: Simon Goldschmidt (patch by Greg Renda) - * ppp.c: Applied patch #7264 (PPP protocols are rejected incorrectly on big - endian architectures) - - 2010-07-28: Simon Goldschmidt - * api_lib.c, api_msg.c, sockets.c, mib2.c: Fixed compilation with TCP or UDP - disabled. - - 2010-07-27: Simon Goldschmidt - * tcp.c: Fixed bug #30565 (tcp_connect() check bound list): that check did no - harm but never did anything - - 2010-07-21: Simon Goldschmidt - * ip.c: Fixed invalid fix for bug #30402 (CHECKSUM_GEN_IP_INLINE does not - add IP options) - - 2010-07-16: Kieran Mansley - * msg_in.c: Fixed SNMP ASN constant defines to not use ! operator - - 2010-07-10: Simon Goldschmidt - * ip.c: Fixed bug #30402: CHECKSUM_GEN_IP_INLINE does not add IP options - - 2010-06-30: Simon Goldschmidt - * api_msg.c: fixed bug #30300 (shutdown parameter was not initialized in - netconn_delete) - - 2010-06-28: Kieran Mansley - * timers.c remove unportable printing of C function pointers - - 2010-06-24: Simon Goldschmidt - * init.c, timers.c/.h, opt.h, memp_std.h: From patch #7221: added flag - NO_SYS_NO_TIMERS to drop timer support for NO_SYS==1 for easier upgrading - - 2010-06-24: Simon Goldschmidt - * api(_lib).c/.h, api_msg.c/.h, sockets.c/.h: Fixed bug #10088: Correctly - implemented shutdown at socket level. - - 2010-06-21: Simon Goldschmidt - * pbuf.c/.h, ip_frag.c/.h, opt.h, memp_std.h: Fixed bug #29361 (ip_frag has - problems with zero-copy DMA MACs) by adding custom pbufs and implementing - custom pbufs that reference other (original) pbufs. Additionally set - IP_FRAG_USES_STATIC_BUF=0 as default to be on the safe side. - - 2010-06-15: Simon Goldschmidt - * dhcp.c: Fixed bug #29970: DHCP endian issue parsing option responses - - 2010-06-14: Simon Goldschmidt - * autoip.c: Fixed bug #30039: AutoIP does not reuse previous addresses - - 2010-06-12: Simon Goldschmidt - * dhcp.c: Fixed bug #30038: dhcp_network_changed doesn't reset AUTOIP coop - state - - 2010-05-17: Simon Goldschmidt - * netdb.c: Correctly NULL-terminate h_addr_list - - 2010-05-16: Simon Goldschmidt - * def.h/.c: changed the semantics of LWIP_PREFIX_BYTEORDER_FUNCS to prevent - "symbol already defined" i.e. when linking to winsock - - 2010-05-05: Simon Goldschmidt - * def.h, timers.c: Fixed bug #29769 (sys_check_timeouts: sys_now() may - overflow) - - 2010-04-21: Simon Goldschmidt - * api_msg.c: Fixed bug #29617 (sometime cause stall on delete listening - connection) - - 2010-03-28: Luca Ceresoli - * ip_addr.c/.h: patch #7143: Add a few missing const qualifiers - - 2010-03-27: Luca Ceresoli - * mib2.c: patch #7130: remove meaningless const qualifiers - - 2010-03-26: Simon Goldschmidt - * tcp_out.c: Make LWIP_NETIF_TX_SINGLE_PBUF work for TCP, too - - 2010-03-26: Simon Goldschmidt - * various files: Fixed compiling with different options disabled (TCP/UDP), - triggered by bug #29345; don't allocate acceptmbox if LWIP_TCP is disabled - - 2010-03-25: Simon Goldschmidt - * sockets.c: Fixed bug #29332: lwip_select() processes readset incorrectly - - 2010-03-25: Simon Goldschmidt - * tcp_in.c, test_tcp_oos.c: Fixed bug #29080: Correctly handle remote side - overrunning our rcv_wnd in ooseq case. - - 2010-03-22: Simon Goldschmidt - * tcp.c: tcp_listen() did not copy the pcb's prio. - - 2010-03-19: Simon Goldschmidt - * snmp_msg.c: Fixed bug #29256: SNMP Trap address was not correctly set - - 2010-03-14: Simon Goldschmidt - * opt.h, etharp.h: Fixed bug #29148 (Incorrect PBUF_POOL_BUFSIZE for ports - where ETH_PAD_SIZE > 0) by moving definition of ETH_PAD_SIZE to opt.h - and basing PBUF_LINK_HLEN on it. - - 2010-03-08: Simon Goldschmidt - * netif.c, ipv4/ip.c: task #10241 (AutoIP: don't break existing connections - when assiging routable address): when checking incoming packets and - aborting existing connection on address change, filter out link-local - addresses. - - 2010-03-06: Simon Goldschmidt - * sockets.c: Fixed LWIP_NETIF_TX_SINGLE_PBUF for LWIP_TCPIP_CORE_LOCKING - - 2010-03-06: Simon Goldschmidt - * ipv4/ip.c: Don't try to forward link-local addresses - - 2010-03-06: Simon Goldschmidt - * etharp.c: Fixed bug #29087: etharp: don't send packets for LinkLocal- - addresses to gw - - 2010-03-05: Simon Goldschmidt - * dhcp.c: Fixed bug #29072: Correctly set ciaddr based on message-type - and state. - - 2010-03-05: Simon Goldschmidt - * api_msg.c: Correctly set TCP_WRITE_FLAG_MORE when netconn_write is split - into multiple calls to tcp_write. - - 2010-02-21: Simon Goldschmidt - * opt.h, mem.h, dns.c: task #10140: Remove DNS_USES_STATIC_BUF (keep - the implementation of DNS_USES_STATIC_BUF==1) - - 2010-02-20: Simon Goldschmidt - * tcp.h, tcp.c, tcp_in.c, tcp_out.c: Task #10088: Correctly implement - close() vs. shutdown(). Now the application does not get any more - recv callbacks after calling tcp_close(). Added tcp_shutdown(). - - 2010-02-19: Simon Goldschmidt - * mem.c/.h, pbuf.c: Renamed mem_realloc() to mem_trim() to prevent - confusion with realloc() - - 2010-02-15: Simon Goldschmidt/Stephane Lesage - * netif.c/.h: Link status does not depend on LWIP_NETIF_LINK_CALLBACK - (fixes bug #28899) - - 2010-02-14: Simon Goldschmidt - * netif.c: Fixed bug #28877 (Duplicate ARP gratuitous packet with - LWIP_NETIF_LINK_CALLBACK set on) by only sending if both link- and - admin-status of a netif are up - - 2010-02-14: Simon Goldschmidt - * opt.h: Disable ETHARP_TRUST_IP_MAC by default since it slows down packet - reception and is not really necessary - - 2010-02-14: Simon Goldschmidt - * etharp.c/.h: Fixed ARP input processing: only add a new entry if a - request was directed as us (RFC 826, Packet Reception), otherwise - only update existing entries; internalized some functions - - 2010-02-14: Simon Goldschmidt - * netif.h, etharp.c, tcpip.c: Fixed bug #28183 (ARP and TCP/IP cannot be - disabled on netif used for PPPoE) by adding a new netif flag - (NETIF_FLAG_ETHERNET) that tells the stack the device is an ethernet - device but prevents usage of ARP (so that ethernet_input can be used - for PPPoE). - - 2010-02-12: Simon Goldschmidt - * netif.c: netif_set_link_up/down: only do something if the link state - actually changes - - 2010-02-12: Simon Goldschmidt/Stephane Lesage - * api_msg.c: Fixed bug #28865 (Cannot close socket/netconn in non-blocking - connect) - - 2010-02-12: Simon Goldschmidt - * mem.h: Fixed bug #28866 (mem_realloc function defined in mem.h) - - 2010-02-09: Simon Goldschmidt - * api_lib.c, api_msg.c, sockets.c, api.h, api_msg.h: Fixed bug #22110 - (recv() makes receive window update for data that wasn't received by - application) - - 2010-02-09: Simon Goldschmidt/Stephane Lesage - * sockets.c: Fixed bug #28853 (lwip_recvfrom() returns 0 on receive time-out - or any netconn_recv() error) - - 2010-02-09: Simon Goldschmidt - * ppp.c: task #10154 (PPP: Update snmp in/out counters for tx/rx packets) - - 2010-02-09: Simon Goldschmidt - * netif.c: For loopback packets, adjust the stats- and snmp-counters - for the loopback netif. - - 2010-02-08: Simon Goldschmidt - * igmp.c/.h, ip.h: Moved most defines from igmp.h to igmp.c for clarity - since they are not used anywhere else. - - 2010-02-08: Simon Goldschmidt (Stéphane Lesage) - * igmp.c, igmp.h, stats.c, stats.h: Improved IGMP stats - (patch from bug #28798) - - 2010-02-08: Simon Goldschmidt (Stéphane Lesage) - * igmp.c: Fixed bug #28798 (Error in "Max Response Time" processing) and - another bug when LWIP_RAND() returns zero. - - 2010-02-04: Simon Goldschmidt - * nearly every file: Use macros defined in ip_addr.h (some of them new) - to work with IP addresses (preparation for bug #27352 - Change ip_addr - from struct to typedef (u32_t) - and better code). - - 2010-01-31: Simon Goldschmidt - * netif.c: Don't call the link-callback from netif_set_up/down() since - this invalidly retriggers DHCP. - - 2010-01-29: Simon Goldschmidt - * ip_addr.h, inet.h, def.h, inet.c, def.c, more: Cleanly separate the - portability file inet.h and its contents from the stack: moved htonX- - functions to def.h (and the new def.c - they are not ipv4 dependent), - let inet.h depend on ip_addr.h and not the other way round. - This fixes bug #28732. - - 2010-01-28: Kieran Mansley - * tcp.c: Ensure ssthresh >= 2*MSS - - 2010-01-27: Simon Goldschmidt - * tcp.h, tcp.c, tcp_in.c: Fixed bug #27871: Calling tcp_abort() in recv - callback can lead to accessing unallocated memory. As a consequence, - ERR_ABRT means the application has called tcp_abort()! - - 2010-01-25: Simon Goldschmidt - * snmp_structs.h, msg_in.c: Partly fixed bug #22070 (MIB_OBJECT_WRITE_ONLY - not implemented in SNMP): write-only or not-accessible are still - returned by getnext (though not by get) - - 2010-01-24: Simon Goldschmidt - * snmp: Renamed the private mib node from 'private' to 'mib_private' to - not use reserved C/C++ keywords - - 2010-01-23: Simon Goldschmidt - * sockets.c: Fixed bug #28716: select() returns 0 after waiting for less - than 1 ms - - 2010-01-21: Simon Goldschmidt - * tcp.c, api_msg.c: Fixed bug #28651 (tcp_connect: no callbacks called - if tcp_enqueue fails) both in raw- and netconn-API - - 2010-01-19: Simon Goldschmidt - * api_msg.c: Fixed bug #27316: netconn: Possible deadlock in err_tcp - - 2010-01-18: Iordan Neshev/Simon Goldschmidt - * src/netif/ppp: reorganised PPP sourcecode to 2.3.11 including some - bugfix backports from 2.4.x. - - 2010-01-18: Simon Goldschmidt - * mem.c: Fixed bug #28679: mem_realloc calculates mem_stats wrong - - 2010-01-17: Simon Goldschmidt - * api_lib.c, api_msg.c, (api_msg.h, api.h, sockets.c, tcpip.c): - task #10102: "netconn: clean up conn->err threading issues" by adding - error return value to struct api_msg_msg - - 2010-01-17: Simon Goldschmidt - * api.h, api_lib.c, sockets.c: Changed netconn_recv() and netconn_accept() - to return err_t (bugs #27709 and #28087) - - 2010-01-14: Simon Goldschmidt - * ...: Use typedef for function prototypes throughout the stack. - - 2010-01-13: Simon Goldschmidt - * api_msg.h/.c, api_lib.c: Fixed bug #26672 (close connection when receive - window = 0) by correctly draining recvmbox/acceptmbox - - 2010-01-11: Simon Goldschmidt - * pap.c: Fixed bug #13315 (PPP PAP authentication can result in - erroneous callbacks) by copying the code from recent pppd - - 2010-01-10: Simon Goldschmidt - * raw.c: Fixed bug #28506 (raw_bind should filter received packets) - - 2010-01-10: Simon Goldschmidt - * tcp.h/.c: bug #28127 (remove call to tcp_output() from tcp_ack(_now)()) - - 2010-01-08: Simon Goldschmidt - * sockets.c: Fixed bug #28519 (lwip_recvfrom bug with len > 65535) - - 2010-01-08: Simon Goldschmidt - * dns.c: Copy hostname for DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1 since string - passed to dns_local_addhost() might be volatile - - 2010-01-07: Simon Goldschmidt - * timers.c, tcp.h: Call tcp_timer_needed() with NO_SYS==1, too - - 2010-01-06: Simon Goldschmidt - * netdb.h: Fixed bug #28496: missing include guards in netdb.h - - 2009-12-31: Simon Goldschmidt - * many ppp files: Reorganised PPP source code from ucip structure to pppd - structure to easily compare our code against the pppd code (around v2.3.1) - - 2009-12-27: Simon Goldschmidt - * tcp_in.c: Another fix for bug #28241 (ooseq processing) and adapted - unit test - - -(STABLE-1.3.2) - - ++ New features: - - 2009-10-27 Simon Goldschmidt/Stephan Lesage - * netifapi.c/.h: Added netifapi_netif_set_addr() - - 2009-10-07 Simon Goldschmidt/Fabian Koch - * api_msg.c, netbuf.c/.h, opt.h: patch #6888: Patch for UDP Netbufs to - support dest-addr and dest-port (optional: LWIP_NETBUF_RECVINFO) - - 2009-08-26 Simon Goldschmidt/Simon Kallweit - * slipif.c/.h: bug #26397: SLIP polling support - - 2009-08-25 Simon Goldschmidt - * opt.h, etharp.h/.c: task #9033: Support IEEE 802.1q tagged frame (VLAN), - New configuration options ETHARP_SUPPORT_VLAN and ETHARP_VLAN_CHECK. - - 2009-08-25 Simon Goldschmidt - * ip_addr.h, netdb.c: patch #6900: added define ip_ntoa(struct ip_addr*) - - 2009-08-24 Jakob Stoklund Olesen - * autoip.c, dhcp.c, netif.c: patch #6725: Teach AutoIP and DHCP to respond - to netif_set_link_up(). - - 2009-08-23 Simon Goldschmidt - * tcp.h/.c: Added function tcp_debug_state_str() to convert a tcp state - to a human-readable string. - - ++ Bugfixes: - - 2009-12-24: Kieran Mansley - * tcp_in.c Apply patches from Oleg Tyshev to improve OOS processing - (BUG#28241) - - 2009-12-06: Simon Goldschmidt - * ppp.h/.c: Fixed bug #27079 (Yet another leak in PPP): outpacket_buf can - be statically allocated (like in ucip) - - 2009-12-04: Simon Goldschmidt (patch by Ioardan Neshev) - * pap.c: patch #6969: PPP: missing PAP authentication UNTIMEOUT - - 2009-12-03: Simon Goldschmidt - * tcp.h, tcp_in.c, tcp_out.c: Fixed bug #28106: dup ack for fast retransmit - could have non-zero length - - 2009-12-02: Simon Goldschmidt - * tcp_in.c: Fixed bug #27904: TCP sends too many ACKs: delay resetting - tcp_input_pcb until after calling the pcb's callbacks - - 2009-11-29: Simon Goldschmidt - * tcp_in.c: Fixed bug #28054: Two segments with FIN flag on the out-of- - sequence queue, also fixed PBUF_POOL leak in the out-of-sequence code - - 2009-11-29: Simon Goldschmidt - * pbuf.c: Fixed bug #28064: pbuf_alloc(PBUF_POOL) is not thread-safe by - queueing a call into tcpip_thread to free ooseq-bufs if the pool is empty - - 2009-11-26: Simon Goldschmidt - * tcp.h: Fixed bug #28098: Nagle can prevent fast retransmit from sending - segment - - 2009-11-26: Simon Goldschmidt - * tcp.h, sockets.c: Fixed bug #28099: API required to disable Nagle - algorithm at PCB level - - 2009-11-22: Simon Goldschmidt - * tcp_out.c: Fixed bug #27905: FIN isn't combined with data on unsent - - 2009-11-22: Simon Goldschmidt (suggested by Bill Auerbach) - * tcp.c: tcp_alloc: prevent increasing stats.err for MEMP_TCP_PCB when - reusing time-wait pcb - - 2009-11-20: Simon Goldschmidt (patch by Albert Bartel) - * sockets.c: Fixed bug #28062: Data received directly after accepting - does not wake up select - - 2009-11-11: Simon Goldschmidt - * netdb.h: Fixed bug #27994: incorrect define for freeaddrinfo(addrinfo) - - 2009-10-30: Simon Goldschmidt - * opt.h: Increased default value for TCP_MSS to 536, updated default - value for TCP_WND to 4*TCP_MSS to keep delayed ACK working. - - 2009-10-28: Kieran Mansley - * tcp_in.c, tcp_out.c, tcp.h: re-work the fast retransmission code - to follow algorithm from TCP/IP Illustrated - - 2009-10-27: Kieran Mansley - * tcp_in.c: fix BUG#27445: grow cwnd with every duplicate ACK - - 2009-10-25: Simon Goldschmidt - * tcp.h: bug-fix in the TCP_EVENT_RECV macro (has to call tcp_recved if - pcb->recv is NULL to keep rcv_wnd correct) - - 2009-10-25: Simon Goldschmidt - * tcp_in.c: Fixed bug #26251: RST process in TIME_WAIT TCP state - - 2009-10-23: Simon Goldschmidt (David Empson) - * tcp.c: Fixed bug #27783: Silly window avoidance for small window sizes - - 2009-10-21: Simon Goldschmidt - * tcp_in.c: Fixed bug #27215: TCP sent() callback gives leading and - trailing 1 byte len (SYN/FIN) - - 2009-10-21: Simon Goldschmidt - * tcp_out.c: Fixed bug #27315: zero window probe and FIN - - 2009-10-19: Simon Goldschmidt - * dhcp.c/.h: Minor code simplification (don't store received pbuf, change - conditional code to assert where applicable), check pbuf length before - testing for valid reply - - 2009-10-19: Simon Goldschmidt - * dhcp.c: Removed most calls to udp_connect since they aren't necessary - when using udp_sendto_if() - always stay connected to IP_ADDR_ANY. - - 2009-10-16: Simon Goldschmidt - * ip.c: Fixed bug #27390: Source IP check in ip_input() causes it to drop - valid DHCP packets -> allow 0.0.0.0 as source address when LWIP_DHCP is - enabled - - 2009-10-15: Simon Goldschmidt (Oleg Tyshev) - * tcp_in.c: Fixed bug #27329: dupacks by unidirectional data transmit - - 2009-10-15: Simon Goldschmidt - * api_lib.c: Fixed bug #27709: conn->err race condition on netconn_recv() - timeout - - 2009-10-15: Simon Goldschmidt - * autoip.c: Fixed bug #27704: autoip starts with wrong address - LWIP_AUTOIP_CREATE_SEED_ADDR() returned address in host byte order instead - of network byte order - - 2009-10-11 Simon Goldschmidt (Jörg Kesten) - * tcp_out.c: Fixed bug #27504: tcp_enqueue wrongly concatenates segments - which are not consecutive when retransmitting unacked segments - - 2009-10-09 Simon Goldschmidt - * opt.h: Fixed default values of some stats to only be enabled if used - Fixes bug #27338: sys_stats is defined when NO_SYS = 1 - - 2009-08-30 Simon Goldschmidt - * ip.c: Fixed bug bug #27345: "ip_frag() does not use the LWIP_NETIF_LOOPBACK - function" by checking for loopback before calling ip_frag - - 2009-08-25 Simon Goldschmidt - * dhcp.c: fixed invalid dependency to etharp_query if DHCP_DOES_ARP_CHECK==0 - - 2009-08-23 Simon Goldschmidt - * ppp.c: bug #27078: Possible memory leak in pppInit() - - 2009-08-23 Simon Goldschmidt - * netdb.c, dns.c: bug #26657: DNS, if host name is "localhost", result - is error. - - 2009-08-23 Simon Goldschmidt - * opt.h, init.c: bug #26649: TCP fails when TCP_MSS > TCP_SND_BUF - Fixed wrong parenthesis, added check in init.c - - 2009-08-23 Simon Goldschmidt - * ppp.c: bug #27266: wait-state debug message in pppMain occurs every ms - - 2009-08-23 Simon Goldschmidt - * many ppp files: bug #27267: Added include to string.h where needed - - 2009-08-23 Simon Goldschmidt - * tcp.h: patch #6843: tcp.h macro optimization patch (for little endian) - - -(STABLE-1.3.1) - - ++ New features: - - 2009-05-10 Simon Goldschmidt - * opt.h, sockets.c, pbuf.c, netbuf.h, pbuf.h: task #7013: Added option - LWIP_NETIF_TX_SINGLE_PBUF to try to create transmit packets from only - one pbuf to help MACs that don't support scatter-gather DMA. - - 2009-05-09 Simon Goldschmidt - * icmp.h, icmp.c: Shrinked ICMP code, added option to NOT check icoming - ECHO pbuf for size (just use it): LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN - - 2009-05-05 Simon Goldschmidt, Jakob Stoklund Olesen - * ip.h, ip.c: Added ip_current_netif() & ip_current_header() to receive - extended info about the currently received packet. - - 2009-04-27 Simon Goldschmidt - * sys.h: Made SYS_LIGHTWEIGHT_PROT and sys_now() work with NO_SYS=1 - - 2009-04-25 Simon Goldschmidt - * mem.c, opt.h: Added option MEM_USE_POOLS_TRY_BIGGER_POOL to try the next - bigger malloc pool if one is empty (only usable with MEM_USE_POOLS). - - 2009-04-21 Simon Goldschmidt - * dns.c, init.c, dns.h, opt.h: task #7507, patch #6786: DNS supports static - hosts table. New configuration options DNS_LOCAL_HOSTLIST and - DNS_LOCAL_HOSTLIST_IS_DYNAMIC. Also, DNS_LOOKUP_LOCAL_EXTERN() can be defined - as an external function for lookup. - - 2009-04-15 Simon Goldschmidt - * dhcp.c: patch #6763: Global DHCP XID can be redefined to something more unique - - 2009-03-31 Kieran Mansley - * tcp.c, tcp_out.c, tcp_in.c, sys.h, tcp.h, opts.h: add support for - TCP timestamp options, off by default. Rework tcp_enqueue() to - take option flags rather than specified option data - - 2009-02-18 Simon Goldschmidt - * cc.h: Added printf formatter for size_t: SZT_F - - 2009-02-16 Simon Goldschmidt (patch by Rishi Khan) - * icmp.c, opt.h: patch #6539: (configurable) response to broadcast- and multicast - pings - - 2009-02-12 Simon Goldschmidt - * init.h: Added LWIP_VERSION to get the current version of the stack - - 2009-02-11 Simon Goldschmidt (suggested by Gottfried Spitaler) - * opt.h, memp.h/.c: added MEMP_MEM_MALLOC to use mem_malloc/mem_free instead - of the pool allocator (can save code size with MEM_LIBC_MALLOC if libc-malloc - is otherwise used) - - 2009-01-28 Jonathan Larmour (suggested by Bill Bauerbach) - * ipv4/inet_chksum.c, ipv4/lwip/inet_chksum.h: inet_chksum_pseudo_partial() - is only used by UDPLITE at present, so conditionalise it. - - 2008-12-03 Simon Goldschmidt (base on patch from Luca Ceresoli) - * autoip.c: checked in (slightly modified) patch #6683: Customizable AUTOIP - "seed" address. This should reduce AUTOIP conflicts if - LWIP_AUTOIP_CREATE_SEED_ADDR is overridden. - - 2008-10-02 Jonathan Larmour and Rishi Khan - * sockets.c (lwip_accept): Return EWOULDBLOCK if would block on non-blocking - socket. - - 2008-06-30 Simon Goldschmidt - * mem.c, opt.h, stats.h: fixed bug #21433: Calling mem_free/pbuf_free from - interrupt context isn't safe: LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT allows - mem_free to run between mem_malloc iterations. Added illegal counter for - mem stats. - - 2008-06-27 Simon Goldschmidt - * stats.h/.c, some other files: patch #6483: stats module improvement: - Added defines to display each module's statistic individually, added stats - defines for MEM, MEMP and SYS modules, removed (unused) rexmit counter. - - 2008-06-17 Simon Goldschmidt - * err.h: patch #6459: Made err_t overridable to use a more efficient type - (define LWIP_ERR_T in cc.h) - - 2008-06-17 Simon Goldschmidt - * slipif.c: patch #6480: Added a configuration option for slipif for symmetry - to loopif - - 2008-06-17 Simon Goldschmidt (patch by Luca Ceresoli) - * netif.c, loopif.c, ip.c, netif.h, loopif.h, opt.h: Checked in slightly - modified version of patch # 6370: Moved loopif code to netif.c so that - loopback traffic is supported on all netifs (all local IPs). - Added option to limit loopback packets for each netifs. - - - ++ Bugfixes: - 2009-08-12 Kieran Mansley - * tcp_in.c, tcp.c: Fix bug #27209: handle trimming of segments when - out of window or out of order properly - - 2009-08-12 Kieran Mansley - * tcp_in.c: Fix bug #27199: use snd_wl2 instead of snd_wl1 - - 2009-07-28 Simon Goldschmidt - * mem.h: Fixed bug #27105: "realloc() cannot replace mem_realloc()"s - - 2009-07-27 Kieran Mansley - * api.h api_msg.h netdb.h sockets.h: add missing #include directives - - 2009-07-09 Kieran Mansley - * api_msg.c, sockets.c, api.h: BUG23240 use signed counters for - recv_avail and don't increment counters until message successfully - sent to mbox - - 2009-06-25 Kieran Mansley - * api_msg.c api.h: BUG26722: initialise netconn write variables - in netconn_alloc - - 2009-06-25 Kieran Mansley - * tcp.h: BUG26879: set ret value in TCP_EVENT macros when function is not set - - 2009-06-25 Kieran Mansley - * tcp.c, tcp_in.c, tcp_out.c, tcp.h: BUG26301 and BUG26267: correct - simultaneous close behaviour, and make snd_nxt have the same meaning - as in the RFCs. - - 2009-05-12 Simon Goldschmidt - * etharp.h, etharp.c, netif.c: fixed bug #26507: "Gratuitous ARP depends on - arp_table / uses etharp_query" by adding etharp_gratuitous() - - 2009-05-12 Simon Goldschmidt - * ip.h, ip.c, igmp.c: bug #26487: Added ip_output_if_opt that can add IP options - to the IP header (used by igmp_ip_output_if) - - 2009-05-06 Simon Goldschmidt - * inet_chksum.c: On little endian architectures, use LWIP_PLATFORM_HTONS (if - defined) for SWAP_BYTES_IN_WORD to speed up checksumming. - - 2009-05-05 Simon Goldschmidt - * sockets.c: bug #26405: Prematurely released semaphore causes lwip_select() - to crash - - 2009-05-04 Simon Goldschmidt - * init.c: snmp was not initialized in lwip_init() - - 2009-05-04 Frédéric Bernon - * dhcp.c, netbios.c: Changes if IP_SOF_BROADCAST is enabled. - - 2009-05-03 Simon Goldschmidt - * tcp.h: bug #26349: Nagle algorithm doesn't send although segment is full - (and unsent->next == NULL) - - 2009-05-02 Simon Goldschmidt - * tcpip.h, tcpip.c: fixed tcpip_untimeout (does not need the time, broken after - 1.3.0 in CVS only) - fixes compilation of ppp_oe.c - - 2009-05-02 Simon Goldschmidt - * msg_in.c: fixed bug #25636: SNMPSET value is ignored for integer fields - - 2009-05-01 Simon Goldschmidt - * pap.c: bug #21680: PPP upap_rauthnak() drops legal NAK packets - - 2009-05-01 Simon Goldschmidt - * ppp.c: bug #24228: Memory corruption with PPP and DHCP - - 2009-04-29 Frédéric Bernon - * raw.c, udp.c, init.c, opt.h, ip.h, sockets.h: bug #26309: Implement the - SO(F)_BROADCAST filter for all API layers. Avoid the unindented reception - of broadcast packets even when this option wasn't set. Port maintainers - which want to enable this filter have to set IP_SOF_BROADCAST=1 in opt.h. - If you want this option also filter broadcast on recv operations, you also - have to set IP_SOF_BROADCAST_RECV=1 in opt.h. - - 2009-04-28 Simon Goldschmidt, Jakob Stoklund Olesen - * dhcp.c: patch #6721, bugs #25575, #25576: Some small fixes to DHCP and - DHCP/AUTOIP cooperation - - 2009-04-25 Simon Goldschmidt, Oleg Tyshev - * tcp_out.c: bug #24212: Deadlocked tcp_retransmit due to exceeded pcb->cwnd - Fixed by sorting the unsent and unacked queues (segments are inserted at the - right place in tcp_output and tcp_rexmit). - - 2009-04-25 Simon Goldschmidt - * memp.c, mem.c, memp.h, mem_std.h: bug #26213 "Problem with memory allocation - when debugging": memp_sizes contained the wrong sizes (including sanity - regions); memp pools for MEM_USE_POOLS were too small - - 2009-04-24 Simon Goldschmidt, Frédéric Bernon - * inet.c: patch #6765: Fix a small problem with the last changes (incorrect - behavior, with with ip address string not ended by a '\0', a space or a - end of line) - - 2009-04-19 Simon Goldschmidt - * rawapi.txt: Fixed bug #26069: Corrected documentation: if tcp_connect fails, - pcb->err is called, not pcb->connected (with an error code). - - 2009-04-19 Simon Goldschmidt - * tcp_out.c: Fixed bug #26236: "TCP options (timestamp) don't work with - no-copy-tcpwrite": deallocate option data, only concat segments with same flags - - 2009-04-19 Simon Goldschmidt - * tcp_out.c: Fixed bug #25094: "Zero-length pbuf" (options are now allocated - in the header pbuf, not the data pbuf) - - 2009-04-18 Simon Goldschmidt - * api_msg.c: fixed bug #25695: Segmentation fault in do_writemore() - - 2009-04-15 Simon Goldschmidt - * sockets.c: tried to fix bug #23559: lwip_recvfrom problem with tcp - - 2009-04-15 Simon Goldschmidt - * dhcp.c: task #9192: mem_free of dhcp->options_in and dhcp->msg_in - - 2009-04-15 Simon Goldschmidt - * ip.c, ip6.c, tcp_out.c, ip.h: patch #6808: Add a utility function - ip_hinted_output() (for smaller code mainly) - - 2009-04-15 Simon Goldschmidt - * inet.c: patch #6765: Supporting new line characters in inet_aton() - - 2009-04-15 Simon Goldschmidt - * dhcp.c: patch #6764: DHCP rebind and renew did not send hostnam option; - Converted constant OPTION_MAX_MSG_SIZE to netif->mtu, check if netif->mtu - is big enough in dhcp_start - - 2009-04-15 Simon Goldschmidt - * netbuf.c: bug #26027: netbuf_chain resulted in pbuf memory leak - - 2009-04-15 Simon Goldschmidt - * sockets.c, ppp.c: bug #25763: corrected 4 occurrences of SMEMCPY to MEMCPY - - 2009-04-15 Simon Goldschmidt - * sockets.c: bug #26121: set_errno can be overridden - - 2009-04-09 Kieran Mansley (patch from Luca Ceresoli ) - * init.c, opt.h: Patch#6774 TCP_QUEUE_OOSEQ breaks compilation when - LWIP_TCP==0 - - 2009-04-09 Kieran Mansley (patch from Roy Lee ) - * tcp.h: Patch#6802 Add do-while-clauses to those function like - macros in tcp.h - - 2009-03-31 Kieran Mansley - * tcp.c, tcp_in.c, tcp_out.c, tcp.h, opt.h: Rework the way window - updates are calculated and sent (BUG20515) - - * tcp_in.c: cope with SYN packets received during established states, - and retransmission of initial SYN. - - * tcp_out.c: set push bit correctly when tcp segments are merged - - 2009-03-27 Kieran Mansley - * tcp_out.c set window correctly on probes (correcting change made - yesterday) - - 2009-03-26 Kieran Mansley - * tcp.c, tcp_in.c, tcp.h: add tcp_abandon() to cope with dropping - connections where no reset required (bug #25622) - - * tcp_out.c: set TCP_ACK flag on keepalive and zero window probes - (bug #20779) - - 2009-02-18 Simon Goldschmidt (Jonathan Larmour and Bill Auerbach) - * ip_frag.c: patch #6528: the buffer used for IP_FRAG_USES_STATIC_BUF could be - too small depending on MEM_ALIGNMENT - - 2009-02-16 Simon Goldschmidt - * sockets.h/.c, api_*.h/.c: fixed arguments of socket functions to match the standard; - converted size argument of netconn_write to 'size_t' - - 2009-02-16 Simon Goldschmidt - * tcp.h, tcp.c: fixed bug #24440: TCP connection close problem on 64-bit host - by moving accept callback function pointer to TCP_PCB_COMMON - - 2009-02-12 Simon Goldschmidt - * dhcp.c: fixed bug #25345 (DHCPDECLINE is sent with "Maximum message size" - option) - - 2009-02-11 Simon Goldschmidt - * dhcp.c: fixed bug #24480 (releasing old udp_pdb and pbuf in dhcp_start) - - 2009-02-11 Simon Goldschmidt - * opt.h, api_msg.c: added configurable default valud for netconn->recv_bufsize: - RECV_BUFSIZE_DEFAULT (fixes bug #23726: pbuf pool exhaustion on slow recv()) - - 2009-02-10 Simon Goldschmidt - * tcp.c: fixed bug #25467: Listen backlog is not reset on timeout in SYN_RCVD: - Accepts_pending is decrease on a corresponding listen pcb when a connection - in state SYN_RCVD is close. - - 2009-01-28 Jonathan Larmour - * pbuf.c: reclaim pbufs from TCP out-of-sequence segments if we run - out of pool pbufs. - - 2008-12-19 Simon Goldschmidt - * many files: patch #6699: fixed some warnings on platform where sizeof(int) == 2 - - 2008-12-10 Tamas Somogyi, Frédéric Bernon - * sockets.c: fixed bug #25051: lwip_recvfrom problem with udp: fromaddr and - port uses deleted netbuf. - - 2008-10-18 Simon Goldschmidt - * tcp_in.c: fixed bug ##24596: Vulnerability on faulty TCP options length - in tcp_parseopt - - 2008-10-15 Simon Goldschmidt - * ip_frag.c: fixed bug #24517: IP reassembly crashes on unaligned IP headers - by packing the struct ip_reass_helper. - - 2008-10-03 David Woodhouse, Jonathan Larmour - * etharp.c (etharp_arp_input): Fix type aliasing problem copying ip address. - - 2008-10-02 Jonathan Larmour - * dns.c: Hard-code structure sizes, to avoid issues on some compilers where - padding is included. - - 2008-09-30 Jonathan Larmour - * sockets.c (lwip_accept): check addr isn't NULL. If it's valid, do an - assertion check that addrlen isn't NULL. - - 2008-09-30 Jonathan Larmour - * tcp.c: Fix bug #24227, wrong error message in tcp_bind. - - 2008-08-26 Simon Goldschmidt - * inet.h, ip_addr.h: fixed bug #24132: Cross-dependency between ip_addr.h and - inet.h -> moved declaration of struct in_addr from ip_addr.h to inet.h - - 2008-08-14 Simon Goldschmidt - * api_msg.c: fixed bug #23847: do_close_internal references freed memory (when - tcp_close returns != ERR_OK) - - 2008-07-08 Frédéric Bernon - * stats.h: Fix some build bugs introduced with patch #6483 (missing some parameters - in macros, mainly if MEM_STATS=0 and MEMP_STATS=0). - - 2008-06-24 Jonathan Larmour - * tcp_in.c: Fix for bug #23693 as suggested by Art R. Ensure cseg is unused - if tcp_seg_copy fails. - - 2008-06-17 Simon Goldschmidt - * inet_chksum.c: Checked in some ideas of patch #6460 (loop optimizations) - and created defines for swapping bytes and folding u32 to u16. - - 2008-05-30 Kieran Mansley - * tcp_in.c Remove redundant "if" statement, and use real rcv_wnd - rather than rcv_ann_wnd when deciding if packets are in-window. - Contributed by - - 2008-05-30 Kieran Mansley - * mem.h: Fix BUG#23254. Change macro definition of mem_* to allow - passing as function pointers when MEM_LIBC_MALLOC is defined. - - 2008-05-09 Jonathan Larmour - * err.h, err.c, sockets.c: Fix bug #23119: Reorder timeout error code to - stop it being treated as a fatal error. - - 2008-04-15 Simon Goldschmidt - * dhcp.c: fixed bug #22804: dhcp_stop doesn't clear NETIF_FLAG_DHCP - (flag now cleared) - - 2008-03-27 Simon Goldschmidt - * mem.c, tcpip.c, tcpip.h, opt.h: fixed bug #21433 (Calling mem_free/pbuf_free - from interrupt context isn't safe): set LWIP_USE_HEAP_FROM_INTERRUPT to 1 - in lwipopts.h or use pbuf_free_callback(p)/mem_free_callback(m) to free pbufs - or heap memory from interrupt context - - 2008-03-26 Simon Goldschmidt - * tcp_in.c, tcp.c: fixed bug #22249: division by zero could occur if a remote - host sent a zero mss as TCP option. - - -(STABLE-1.3.0) - - ++ New features: - - 2008-03-10 Jonathan Larmour - * inet_chksum.c: Allow choice of one of the sample algorithms to be - made from lwipopts.h. Fix comment on how to override LWIP_CHKSUM. - - 2008-01-22 Frédéric Bernon - * tcp.c, tcp_in.c, tcp.h, opt.h: Rename LWIP_CALCULATE_EFF_SEND_MSS in - TCP_CALCULATE_EFF_SEND_MSS to have coherent TCP options names. - - 2008-01-14 Frédéric Bernon - * rawapi.txt, api_msg.c, tcp.c, tcp_in.c, tcp.h: changes for task #7675 "Enable - to refuse data on a TCP_EVENT_RECV call". Important, behavior changes for the - tcp_recv callback (see rawapi.txt). - - 2008-01-14 Frédéric Bernon, Marc Chaland - * ip.c: Integrate patch #6369" ip_input : checking before realloc". - - 2008-01-12 Frédéric Bernon - * tcpip.h, tcpip.c, api.h, api_lib.c, api_msg.c, sockets.c: replace the field - netconn::sem per netconn::op_completed like suggested for the task #7490 - "Add return value to sys_mbox_post". - - 2008-01-12 Frédéric Bernon - * api_msg.c, opt.h: replace DEFAULT_RECVMBOX_SIZE per DEFAULT_TCP_RECVMBOX_SIZE, - DEFAULT_UDP_RECVMBOX_SIZE and DEFAULT_RAW_RECVMBOX_SIZE (to optimize queues - sizes), like suggested for the task #7490 "Add return value to sys_mbox_post". - - 2008-01-10 Frédéric Bernon - * tcpip.h, tcpip.c: add tcpip_callback_with_block function for the task #7490 - "Add return value to sys_mbox_post". tcpip_callback is always defined as - "blocking" ("block" parameter = 1). - - 2008-01-10 Frédéric Bernon - * tcpip.h, tcpip.c, api.h, api_lib.c, api_msg.c, sockets.c: replace the field - netconn::mbox (sys_mbox_t) per netconn::sem (sys_sem_t) for the task #7490 - "Add return value to sys_mbox_post". - - 2008-01-05 Frédéric Bernon - * sys_arch.txt, api.h, api_lib.c, api_msg.h, api_msg.c, tcpip.c, sys.h, opt.h: - Introduce changes for task #7490 "Add return value to sys_mbox_post" with some - modifications in the sys_mbox api: sys_mbox_new take a "size" parameters which - indicate the number of pointers query by the mailbox. There is three defines - in opt.h to indicate sizes for tcpip::mbox, netconn::recvmbox, and for the - netconn::acceptmbox. Port maintainers, you can decide to just add this new - parameter in your implementation, but to ignore it to keep the previous behavior. - The new sys_mbox_trypost function return a value to know if the mailbox is - full or if the message is posted. Take a look to sys_arch.txt for more details. - This new function is used in tcpip_input (so, can be called in an interrupt - context since the function is not blocking), and in recv_udp and recv_raw. - - 2008-01-04 Frédéric Bernon, Simon Goldschmidt, Jonathan Larmour - * rawapi.txt, api.h, api_lib.c, api_msg.h, api_msg.c, sockets.c, tcp.h, tcp.c, - tcp_in.c, init.c, opt.h: rename backlog options with TCP_ prefix, limit the - "backlog" parameter in an u8_t, 0 is interpreted as "smallest queue", add - documentation in the rawapi.txt file. - - 2007-12-31 Kieran Mansley (based on patch from Per-Henrik Lundbolm) - * tcp.c, tcp_in.c, tcp_out.c, tcp.h: Add TCP persist timer - - 2007-12-31 Frédéric Bernon, Luca Ceresoli - * autoip.c, etharp.c: ip_addr.h: Integrate patch #6348: "Broadcast ARP packets - in autoip". The change in etharp_raw could be removed, since all calls to - etharp_raw use ethbroadcast for the "ethdst_addr" parameter. But it could be - wrong in the future. - - 2007-12-30 Frédéric Bernon, Tom Evans - * ip.c: Fix bug #21846 "LwIP doesn't appear to perform any IP Source Address - Filtering" reported by Tom Evans. - - 2007-12-21 Frédéric Bernon, Simon Goldschmidt, Jonathan Larmour - * tcp.h, opt.h, api.h, api_msg.h, tcp.c, tcp_in.c, api_lib.c, api_msg.c, - sockets.c, init.c: task #7252: Implement TCP listen backlog: Warning: raw API - applications have to call 'tcp_accepted(pcb)' in their accept callback to - keep accepting new connections. - - 2007-12-13 Frédéric Bernon - * api_msg.c, err.h, err.c, sockets.c, dns.c, dns.h: replace "enum dns_result" - by err_t type. Add a new err_t code "ERR_INPROGRESS". - - 2007-12-12 Frédéric Bernon - * dns.h, dns.c, opt.h: move DNS options to the "right" place. Most visibles - are the one which have ram usage. - - 2007-12-05 Frédéric Bernon - * netdb.c: add a LWIP_DNS_API_HOSTENT_STORAGE option to decide to use a static - set of variables (=0) or a local one (=1). In this last case, your port should - provide a function "struct hostent* sys_thread_hostent( struct hostent* h)" - which have to do a copy of "h" and return a pointer ont the "per-thread" copy. - - 2007-12-03 Simon Goldschmidt - * ip.c: ip_input: check if a packet is for inp first before checking all other - netifs on netif_list (speeds up packet receiving in most cases) - - 2007-11-30 Simon Goldschmidt - * udp.c, raw.c: task #7497: Sort lists (pcb, netif, ...) for faster access - UDP: move a (connected) pcb selected for input to the front of the list of - pcbs so that it is found faster next time. Same for RAW pcbs that have eaten - a packet. - - 2007-11-28 Simon Goldschmidt - * etharp.c, stats.c, stats.h, opt.h: Introduced ETHARP_STATS - - 2007-11-25 Simon Goldschmidt - * dhcp.c: dhcp_unfold_reply() uses pbuf_copy_partial instead of its own copy - algorithm. - - 2007-11-24 Simon Goldschmidt - * netdb.h, netdb.c, sockets.h/.c: Moved lwip_gethostbyname from sockets.c - to the new file netdb.c; included lwip_getaddrinfo. - - 2007-11-21 Simon Goldschmidt - * tcp.h, opt.h, tcp.c, tcp_in.c: implemented calculating the effective send-mss - based on the MTU of the netif used to send. Enabled by default. Disable by - setting LWIP_CALCULATE_EFF_SEND_MSS to 0. This fixes bug #21492. - - 2007-11-19 Frédéric Bernon - * api_msg.c, dns.h, dns.c: Implement DNS_DOES_NAME_CHECK option (check if name - received match the name query), implement DNS_USES_STATIC_BUF (the place where - copy dns payload to parse the response), return an error if there is no place - for a new query, and fix some minor problems. - - 2007-11-16 Simon Goldschmidt - * new files: ipv4/inet.c, ipv4/inet_chksum.c, ipv6/inet6.c - removed files: core/inet.c, core/inet6.c - Moved inet files into ipv4/ipv6 directory; splitted inet.c/inet.h into - inet and chksum part; changed includes in all lwIP files as appropriate - - 2007-11-16 Simon Goldschmidt - * api.h, api_msg.h, api_lib.c, api_msg.c, socket.h, socket.c: Added sequential - dns resolver function for netconn api (netconn_gethostbyname) and socket api - (gethostbyname/gethostbyname_r). - - 2007-11-15 Jim Pettinato, Frédéric Bernon - * opt.h, init.c, tcpip.c, dhcp.c, dns.h, dns.c: add DNS client for simple name - requests with RAW api interface. Initialization is done in lwip_init() with - build time options. DNS timer is added in tcpip_thread context. DHCP can set - DNS server ip addresses when options are received. You need to set LWIP_DNS=1 - in your lwipopts.h file (LWIP_DNS=0 in opt.h). DNS_DEBUG can be set to get - some traces with LWIP_DEBUGF. Sanity check have been added. There is a "todo" - list with points to improve. - - 2007-11-06 Simon Goldschmidt - * opt.h, mib2.c: Patch #6215: added ifAdminStatus write support (if explicitly - enabled by defining SNMP_SAFE_REQUESTS to 0); added code to check link status - for ifOperStatus if LWIP_NETIF_LINK_CALLBACK is defined. - - 2007-11-06 Simon Goldschmidt - * api.h, api_msg.h and dependent files: Task #7410: Removed the need to include - core header files in api.h (ip/tcp/udp/raw.h) to hide the internal - implementation from netconn api applications. - - 2007-11-03 Frédéric Bernon - * api.h, api_lib.c, api_msg.c, sockets.c, opt.h: add SO_RCVBUF option for UDP & - RAW netconn. You need to set LWIP_SO_RCVBUF=1 in your lwipopts.h (it's disabled - by default). Netconn API users can use the netconn_recv_bufsize macro to access - it. This is a first release which have to be improve for TCP. Note it used the - netconn::recv_avail which need to be more "thread-safe" (note there is already - the problem for FIONREAD with lwip_ioctl/ioctlsocket). - - 2007-11-01 Frédéric Bernon, Marc Chaland - * sockets.h, sockets.c, api.h, api_lib.c, api_msg.h, api_msg.c, tcp.h, tcp_out.c: - Integrate "patch #6250 : MSG_MORE flag for send". MSG_MORE is used at socket api - layer, NETCONN_MORE at netconn api layer, and TCP_WRITE_FLAG_MORE at raw api - layer. This option enable to delayed TCP PUSH flag on multiple "write" calls. - Note that previous "copy" parameter for "write" APIs is now called "apiflags". - - 2007-10-24 Frédéric Bernon - * api.h, api_lib.c, api_msg.c: Add macro API_EVENT in the same spirit than - TCP_EVENT_xxx macros to get a code more readable. It could also help to remove - some code (like we have talk in "patch #5919 : Create compile switch to remove - select code"), but it could be done later. - - 2007-10-08 Simon Goldschmidt - * many files: Changed initialization: many init functions are not needed any - more since we now rely on the compiler initializing global and static - variables to zero! - - 2007-10-06 Simon Goldschmidt - * ip_frag.c, memp.c, mib2.c, ip_frag.h, memp_std.h, opt.h: Changed IP_REASSEMBLY - to enqueue the received pbufs so that multiple packets can be reassembled - simultaneously and no static reassembly buffer is needed. - - 2007-10-05 Simon Goldschmidt - * tcpip.c, etharp.h, etharp.c: moved ethernet_input from tcpip.c to etharp.c so - all netifs (or ports) can use it. - - 2007-10-05 Frédéric Bernon - * netifapi.h, netifapi.c: add function netifapi_netif_set_default. Change the - common function to reduce a little bit the footprint (for all functions using - only the "netif" parameter). - - 2007-10-03 Frédéric Bernon - * netifapi.h, netifapi.c: add functions netifapi_netif_set_up, netifapi_netif_set_down, - netifapi_autoip_start and netifapi_autoip_stop. Use a common function to reduce - a little bit the footprint (for all functions using only the "netif" parameter). - - 2007-09-15 Frédéric Bernon - * udp.h, udp.c, sockets.c: Changes for "#20503 IGMP Improvement". Add IP_MULTICAST_IF - option in socket API, and a new field "multicast_ip" in "struct udp_pcb" (for - netconn and raw API users), only if LWIP_IGMP=1. Add getsockopt processing for - IP_MULTICAST_TTL and IP_MULTICAST_IF. - - 2007-09-10 Frédéric Bernon - * snmp.h, mib2.c: enable to remove SNMP timer (which consumne several cycles - even when it's not necessary). snmp_agent.txt tell to call snmp_inc_sysuptime() - each 10ms (but, it's intrusive if you use sys_timeout feature). Now, you can - decide to call snmp_add_sysuptime(100) each 1000ms (which is bigger "step", but - call to a lower frequency). Or, you can decide to not call snmp_inc_sysuptime() - or snmp_add_sysuptime(), and to define the SNMP_GET_SYSUPTIME(sysuptime) macro. - This one is undefined by default in mib2.c. SNMP_GET_SYSUPTIME is called inside - snmp_get_sysuptime(u32_t *value), and enable to change "sysuptime" value only - when it's queried (any direct call to "sysuptime" is changed by a call to - snmp_get_sysuptime). - - 2007-09-09 Frédéric Bernon, Bill Florac - * igmp.h, igmp.c, netif.h, netif.c, ip.c: To enable to have interfaces with IGMP, - and others without it, there is a new NETIF_FLAG_IGMP flag to set in netif->flags - if you want IGMP on an interface. igmp_stop() is now called inside netif_remove(). - igmp_report_groups() is now called inside netif_set_link_up() (need to have - LWIP_NETIF_LINK_CALLBACK=1) to resend reports once the link is up (avoid to wait - the next query message to receive the matching multicast streams). - - 2007-09-08 Frédéric Bernon - * sockets.c, ip.h, api.h, tcp.h: declare a "struct ip_pcb" which only contains - IP_PCB. Add in the netconn's "pcb" union a "struct ip_pcb *ip;" (no size change). - Use this new field to access to common pcb fields (ttl, tos, so_options, etc...). - Enable to access to these fields with LWIP_TCP=0. - - 2007-09-05 Frédéric Bernon - * udp.c, ipv4/icmp.c, ipv4/ip.c, ipv6/icmp.c, ipv6/ip6.c, ipv4/icmp.h, - ipv6/icmp.h, opt.h: Integrate "task #7272 : LWIP_ICMP option". The new option - LWIP_ICMP enable/disable ICMP module inside the IP stack (enable per default). - Be careful, disabling ICMP make your product non-compliant to RFC1122, but - help to reduce footprint, and to reduce "visibility" on the Internet. - - 2007-09-05 Frédéric Bernon, Bill Florac - * opt.h, sys.h, tcpip.c, slipif.c, ppp.c, sys_arch.txt: Change parameters list - for sys_thread_new (see "task #7252 : Create sys_thread_new_ex()"). Two new - parameters have to be provided: a task name, and a task stack size. For this - one, since it's platform dependant, you could define the best one for you in - your lwipopts.h. For port maintainers, you can just add these new parameters - in your sys_arch.c file, and but it's not mandatory, use them in your OS - specific functions. - - 2007-09-05 Frédéric Bernon - * inet.c, autoip.c, msg_in.c, msg_out.c, init.c: Move some build time checkings - inside init.c for task #7142 "Sanity check user-configurable values". - - 2007-09-04 Frédéric Bernon, Bill Florac - * igmp.h, igmp.c, memp_std.h, memp.c, init.c, opt.h: Replace mem_malloc call by - memp_malloc, and use a new MEMP_NUM_IGMP_GROUP option (see opt.h to define the - value). It will avoid potential fragmentation problems, use a counter to know - how many times a group is used on an netif, and free it when all applications - leave it. MEMP_NUM_IGMP_GROUP got 8 as default value (and init.c got a sanity - check if LWIP_IGMP!=0). - - 2007-09-03 Frédéric Bernon - * igmp.h, igmp.c, sockets.c, api_msg.c: Changes for "#20503 IGMP Improvement". - Initialize igmp_mac_filter to NULL in netif_add (this field should be set in - the netif's "init" function). Use the "imr_interface" field (for socket layer) - and/or the "interface" field (for netconn layer), for join/leave operations. - The igmp_join/leavegroup first parameter change from a netif to an ipaddr. - This field could be a netif's ipaddr, or "any" (same meaning than ip_addr_isany). - - 2007-08-30 Frédéric Bernon - * Add netbuf.h, netbuf.c, Change api.h, api_lib.c: #7249 "Split netbuf functions - from api/api_lib". Now netbuf API is independant of netconn, and can be used - with other API (application based on raw API, or future "socket2" API). Ports - maintainers just have to add src/api/netbuf.c in their makefile/projects. - - 2007-08-30 Frédéric Bernon, Jonathan Larmour - * init.c: Add first version of lwip_sanity_check for task #7142 "Sanity check - user-configurable values". - - 2007-08-29 Frédéric Bernon - * igmp.h, igmp.c, tcpip.c, init.c, netif.c: change igmp_init and add igmp_start. - igmp_start is call inside netif_add. Now, igmp initialization is in the same - spirit than the others modules. Modify some IGMP debug traces. - - 2007-08-29 Frédéric Bernon - * Add init.h, init.c, Change opt.h, tcpip.c: Task #7213 "Add a lwip_init function" - Add lwip_init function to regroup all modules initializations, and to provide - a place to add code for task #7142 "Sanity check user-configurable values". - Ports maintainers should remove direct initializations calls from their code, - and add init.c in their makefiles. Note that lwip_init() function is called - inside tcpip_init, but can also be used by raw api users since all calls are - disabled when matching options are disabled. Also note that their is new options - in opt.h, you should configure in your lwipopts.h (they are enabled per default). - - 2007-08-26 Marc Boucher - * api_msg.c: do_close_internal(): Reset the callbacks and arg (conn) to NULL - since they can under certain circumstances be called with an invalid conn - pointer after the connection has been closed (and conn has been freed). - - 2007-08-25 Frédéric Bernon (Artem Migaev's Patch) - * netif.h, netif.c: Integrate "patch #6163 : Function to check if link layer is up". - Add a netif_is_link_up() function if LWIP_NETIF_LINK_CALLBACK option is set. - - 2007-08-22 Frédéric Bernon - * netif.h, netif.c, opt.h: Rename LWIP_NETIF_CALLBACK in LWIP_NETIF_STATUS_CALLBACK - to be coherent with new LWIP_NETIF_LINK_CALLBACK option before next release. - - 2007-08-22 Frédéric Bernon - * tcpip.h, tcpip.c, ethernetif.c, opt.h: remove options ETHARP_TCPIP_INPUT & - ETHARP_TCPIP_ETHINPUT, now, only "ethinput" code is supported, even if the - name is tcpip_input (we keep the name of 1.2.0 function). - - 2007-08-17 Jared Grubb - * memp_std.h, memp.h, memp.c, mem.c, stats.c: (Task #7136) Centralize mempool - settings into new memp_std.h and optional user file lwippools.h. This adds - more dynamic mempools, and allows the user to create an arbitrary number of - mempools for mem_malloc. - - 2007-08-16 Marc Boucher - * api_msg.c: Initialize newconn->state to NETCONN_NONE in accept_function; - otherwise it was left to NETCONN_CLOSE and sent_tcp() could prematurely - close the connection. - - 2007-08-16 Marc Boucher - * sockets.c: lwip_accept(): check netconn_peer() error return. - - 2007-08-16 Marc Boucher - * mem.c, mem.h: Added mem_calloc(). - - 2007-08-16 Marc Boucher - * tcpip.c, tcpip.h memp.c, memp.h: Added distinct memp (MEMP_TCPIP_MSG_INPKT) - for input packets to prevent floods from consuming all of MEMP_TCPIP_MSG - and starving other message types. - Renamed MEMP_TCPIP_MSG to MEMP_TCPIP_MSG_API - - 2007-08-16 Marc Boucher - * pbuf.c, pbuf.h, etharp.c, tcp_in.c, sockets.c: Split pbuf flags in pbuf - type and flgs (later renamed to flags). - Use enum pbuf_flag as pbuf_type. Renumber PBUF_FLAG_*. - Improved lwip_recvfrom(). TCP push now propagated. - - 2007-08-16 Marc Boucher - * ethernetif.c, contrib/ports/various: ethbroadcast now a shared global - provided by etharp. - - 2007-08-16 Marc Boucher - * ppp_oe.c ppp_oe.h, auth.c chap.c fsm.c lcp.c ppp.c ppp.h, - etharp.c ethernetif.c, etharp.h, opt.h tcpip.h, tcpip.c: - Added PPPoE support and various PPP improvements. - - 2007-07-25 Simon Goldschmidt - * api_lib.c, ip_frag.c, pbuf.c, api.h, pbuf.h: Introduced pbuf_copy_partial, - making netbuf_copy_partial use this function. - - 2007-07-25 Simon Goldschmidt - * tcp_in.c: Fix bug #20506: Slow start / initial congestion window starts with - 2 * mss (instead of 1 * mss previously) to comply with some newer RFCs and - other stacks. - - 2007-07-13 Jared Grubb (integrated by Frédéric Bernon) - * opt.h, netif.h, netif.c, ethernetif.c: Add new configuration option to add - a link callback in the netif struct, and functions to handle it. Be carefull - for port maintainers to add the NETIF_FLAG_LINK_UP flag (like in ethernetif.c) - if you want to be sure to be compatible with future changes... - - 2007-06-30 Frédéric Bernon - * sockets.h, sockets.c: Implement MSG_PEEK flag for recv/recvfrom functions. - - 2007-06-21 Simon Goldschmidt - * etharp.h, etharp.c: Combined etharp_request with etharp_raw for both - LWIP_AUTOIP =0 and =1 to remove redundant code. - - 2007-06-21 Simon Goldschmidt - * mem.c, memp.c, mem.h, memp.h, opt.h: task #6863: Introduced the option - MEM_USE_POOLS to use 4 pools with different sized elements instead of a - heap. This both prevents memory fragmentation and gives a higher speed - at the cost of more memory consumption. Turned off by default. - - 2007-06-21 Simon Goldschmidt - * api_lib.c, api_msg.c, api.h, api_msg.h: Converted the length argument of - netconn_write (and therefore also api_msg_msg.msg.w.len) from u16_t into - int to be able to send a bigger buffer than 64K with one time (mainly - used from lwip_send). - - 2007-06-21 Simon Goldschmidt - * tcp.h, api_msg.c: Moved the nagle algorithm from netconn_write/do_write - into a define (tcp_output_nagle) in tcp.h to provide it to raw api users, too. - - 2007-06-21 Simon Goldschmidt - * api.h, api_lib.c, api_msg.c: Fixed bug #20021: Moved sendbuf-processing in - netconn_write from api_lib.c to api_msg.c to also prevent multiple context- - changes on low memory or empty send-buffer. - - 2007-06-18 Simon Goldschmidt - * etharp.c, etharp.h: Changed etharp to use a defined hardware address length - of 6 to avoid loading netif->hwaddr_len every time (since this file is only - used for ethernet and struct eth_addr already had a defined length of 6). - - 2007-06-17 Simon Goldschmidt - * sockets.c, sockets.h: Implemented socket options SO_NO_CHECK for UDP sockets - to disable UDP checksum generation on transmit. - - 2007-06-13 Frédéric Bernon, Simon Goldschmidt - * debug.h, api_msg.c: change LWIP_ERROR to use it to check errors like invalid - pointers or parameters, and let the possibility to redefined it in cc.h. Use - this macro to check "conn" parameter in api_msg.c functions. - - 2007-06-11 Simon Goldschmidt - * sockets.c, sockets.h: Added UDP lite support for sockets - - 2007-06-10 Simon Goldschmidt - * udp.h, opt.h, api_msg.c, ip.c, udp.c: Included switch LWIP_UDPLITE (enabled - by default) to switch off UDP-Lite support if not needed (reduces udp.c code - size) - - 2007-06-09 Dominik Spies (integrated by Frédéric Bernon) - * autoip.h, autoip.c, dhcp.h, dhcp.c, netif.h, netif.c, etharp.h, etharp.c, opt.h: - AutoIP implementation available for IPv4, with new options LWIP_AUTOIP and - LWIP_DHCP_AUTOIP_COOP if you want to cooperate with DHCP. Some tips to adapt - (see TODO mark in the source code). - - 2007-06-09 Simon Goldschmidt - * etharp.h, etharp.c, ethernetif.c: Modified order of parameters for - etharp_output() to match netif->output so etharp_output() can be used - directly as netif->output to save one function call. - - 2007-06-08 Simon Goldschmidt - * netif.h, ethernetif.c, slipif.c, loopif.c: Added define - NETIF_INIT_SNMP(netif, type, speed) to initialize per-netif snmp variables, - added initialization of those to ethernetif, slipif and loopif. - - 2007-05-18 Simon Goldschmidt - * opt.h, ip_frag.c, ip_frag.h, ip.c: Added option IP_FRAG_USES_STATIC_BUF - (defaulting to off for now) that can be set to 0 to send fragmented - packets by passing PBUF_REFs down the stack. - - 2007-05-23 Frédéric Bernon - * api_lib.c: Implement SO_RCVTIMEO for accept and recv on TCP - connections, such present in patch #5959. - - 2007-05-23 Frédéric Bernon - * api.h, api_lib.c, api_msg.c, sockets.c: group the different NETCONN_UDPxxx - code in only one part... - - 2007-05-18 Simon Goldschmidt - * opt.h, memp.h, memp.c: Added option MEMP_OVERFLOW_CHECK to check for memp - elements to overflow. This is achieved by adding some bytes before and after - each pool element (increasing their size, of course), filling them with a - prominent value and checking them on freeing the element. - Set it to 2 to also check every element in every pool each time memp_malloc() - or memp_free() is called (slower but more helpful). - - 2007-05-10 Simon Goldschmidt - * opt.h, memp.h, memp.c, pbuf.c (see task #6831): use a new memp pool for - PBUF_POOL pbufs instead of the old pool implementation in pbuf.c to reduce - code size. - - 2007-05-11 Frédéric Bernon - * sockets.c, api_lib.c, api_msg.h, api_msg.c, netifapi.h, netifapi.c, tcpip.c: - Include a function pointer instead of a table index in the message to reduce - footprint. Disable some part of lwip_send and lwip_sendto if some options are - not set (LWIP_TCP, LWIP_UDP, LWIP_RAW). - - 2007-05-10 Simon Goldschmidt - * *.h (except netif/ppp/*.h): Included patch #5448: include '#ifdef __cplusplus - \ extern "C" {' in all header files. Now you can write your application using - the lwIP stack in C++ and simply #include the core files. Note I have left - out the netif/ppp/*h header files for now, since I don't know which files are - included by applications and which are for internal use only. - - 2007-05-09 Simon Goldschmidt - * opt.h, *.c/*.h: Included patch #5920: Create define to override C-library - memcpy. 2 Defines are created: MEMCPY() for normal memcpy, SMEMCPY() for - situations where some compilers might inline the copy and save a function - call. Also replaced all calls to memcpy() with calls to (S)MEMCPY(). - - 2007-05-08 Simon Goldschmidt - * mem.h: If MEM_LIBC_MALLOC==1, allow the defines (e.g. mem_malloc() -> malloc()) - to be overriden in case the C-library malloc implementation is not protected - against concurrent access. - - 2007-05-04 Simon Goldschmidt (Atte Kojo) - * etharp.c: Introduced fast one-entry-cache to speed up ARP lookup when sending - multiple packets to the same host. - - 2007-05-04 Frédéric Bernon, Jonathan Larmour - * sockets.c, api.h, api_lib.c, api_msg.h, api_msg.c: Fix bug #19162 "lwip_sento: a possible - to corrupt remote addr/port connection state". Reduce problems "not enought memory" with - netbuf (if we receive lot of datagrams). Improve lwip_sendto (only one exchange between - sockets api and api_msg which run in tcpip_thread context). Add netconn_sento function. - Warning, if you directly access to "fromaddr" & "fromport" field from netbuf struct, - these fields are now renamed "addr" & "port". - - 2007-04-11 Jonathan Larmour - * sys.h, api_lib.c: Provide new sys_mbox_tryfetch function. Require ports to provide new - sys_arch_mbox_tryfetch function to get a message if one is there, otherwise return - with SYS_MBOX_EMPTY. sys_arch_mbox_tryfetch can be implemented as a function-like macro - by the port in sys_arch.h if desired. - - 2007-04-06 Frédéric Bernon, Simon Goldschmidt - * opt.h, tcpip.h, tcpip.c, netifapi.h, netifapi.c: New configuration option LWIP_NETIF_API - allow to use thread-safe functions to add/remove netif in list, and to start/stop dhcp - clients, using new functions from netifapi.h. Disable as default (no port change to do). - - 2007-04-05 Frédéric Bernon - * sockets.c: remplace ENOBUFS errors on alloc_socket by ENFILE to be more BSD compliant. - - 2007-04-04 Simon Goldschmidt - * arch.h, api_msg.c, dhcp.c, msg_in.c, sockets.c: Introduced #define LWIP_UNUSED_ARG(x) - use this for and architecture-independent form to tell the compiler you intentionally - are not using this variable. Can be overriden in cc.h. - - 2007-03-28 Frédéric Bernon - * opt.h, netif.h, dhcp.h, dhcp.c: New configuration option LWIP_NETIF_HOSTNAME allow to - define a hostname in netif struct (this is just a pointer, so, you can use a hardcoded - string, point on one of your's ethernetif field, or alloc a string you will free yourself). - It will be used by DHCP to register a client hostname, but can also be use when you call - snmp_set_sysname. - - 2007-03-28 Frédéric Bernon - * netif.h, netif.c: A new NETIF_FLAG_ETHARP flag is defined in netif.h, to allow to - initialize a network interface's flag with. It tell this interface is an ethernet - device, and we can use ARP with it to do a "gratuitous ARP" (RFC 3220 "IP Mobility - Support for IPv4" section 4.6) when interface is "up" with netif_set_up(). - - 2007-03-26 Frédéric Bernon, Jonathan Larmour - * opt.h, tcpip.c: New configuration option LWIP_ARP allow to disable ARP init at build - time if you only use PPP or SLIP. The default is enable. Note we don't have to call - etharp_init in your port's initilization sequence if you use tcpip.c, because this call - is done in tcpip_init function. - - 2007-03-22 Frédéric Bernon - * stats.h, stats.c, msg_in.c: Stats counters can be change to u32_t if necessary with the - new option LWIP_STATS_LARGE. If you need this option, define LWIP_STATS_LARGE to 1 in - your lwipopts.h. More, unused counters are not defined in the stats structs, and not - display by stats_display(). Note that some options (SYS_STATS and RAW_STATS) are defined - but never used. Fix msg_in.c with the correct #if test for a stat display. - - 2007-03-21 Kieran Mansley - * netif.c, netif.h: Apply patch#4197 with some changes (originator: rireland@hmgsl.com). - Provides callback on netif up/down state change. - - 2007-03-11 Frédéric Bernon, Mace Gael, Steve Reynolds - * sockets.h, sockets.c, api.h, api_lib.c, api_msg.h, api_msg.c, igmp.h, igmp.c, - ip.c, netif.h, tcpip.c, opt.h: - New configuration option LWIP_IGMP to enable IGMP processing. Based on only one - filter per all network interfaces. Declare a new function in netif to enable to - control the MAC filter (to reduce lwIP traffic processing). - - 2007-03-11 Frédéric Bernon - * tcp.h, tcp.c, sockets.c, tcp_out.c, tcp_in.c, opt.h: Keepalive values can - be configured at run time with LWIP_TCP_KEEPALIVE, but don't change this - unless you know what you're doing (default are RFC1122 compliant). Note - that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set in seconds. - - 2007-03-08 Frédéric Bernon - * tcp.h: Keepalive values can be configured at compile time, but don't change - this unless you know what you're doing (default are RFC1122 compliant). - - 2007-03-08 Frédéric Bernon - * sockets.c, api.h, api_lib.c, tcpip.c, sys.h, sys.c, err.c, opt.h: - Implement LWIP_SO_RCVTIMEO configuration option to enable/disable SO_RCVTIMEO - on UDP sockets/netconn. - - 2007-03-08 Simon Goldschmidt - * snmp_msg.h, msg_in.c: SNMP UDP ports can be configured at compile time. - - 2007-03-06 Frédéric Bernon - * api.h, api_lib.c, sockets.h, sockets.c, tcpip.c, sys.h, sys.c, err.h: - Implement SO_RCVTIMEO on UDP sockets/netconn. - - 2007-02-28 Kieran Mansley (based on patch from Simon Goldschmidt) - * api_lib.c, tcpip.c, memp.c, memp.h: make API msg structs allocated - on the stack and remove the API msg type from memp - - 2007-02-26 Jonathan Larmour (based on patch from Simon Goldschmidt) - * sockets.h, sockets.c: Move socket initialization to new - lwip_socket_init() function. - NOTE: this changes the API with ports. Ports will have to be - updated to call lwip_socket_init() now. - - 2007-02-26 Jonathan Larmour (based on patch from Simon Goldschmidt) - * api_lib.c: Use memcpy in netbuf_copy_partial. - - - ++ Bug fixes: - - 2008-03-17 Frédéric Bernon, Ed Kerekes - * igmp.h, igmp.c: Fix bug #22613 "IGMP iphdr problem" (could have - some problems to fill the IP header on some targets, use now the - ip.h macros to do it). - - 2008-03-13 Frédéric Bernon - * sockets.c: Fix bug #22435 "lwip_recvfrom with TCP break;". Using - (lwip_)recvfrom with valid "from" and "fromlen" parameters, on a - TCP connection caused a crash. Note that using (lwip_)recvfrom - like this is a bit slow and that using (lwip)getpeername is the - good lwip way to do it (so, using recv is faster on tcp sockets). - - 2008-03-12 Frédéric Bernon, Jonathan Larmour - * api_msg.c, contrib/apps/ping.c: Fix bug #22530 "api_msg.c's - recv_raw() does not consume data", and the ping sample (with - LWIP_SOCKET=1, the code did the wrong supposition that lwip_recvfrom - returned the IP payload, without the IP header). - - 2008-03-04 Jonathan Larmour - * mem.c, stats.c, mem.h: apply patch #6414 to avoid compiler errors - and/or warnings on some systems where mem_size_t and size_t differ. - * pbuf.c, ppp.c: Fix warnings on some systems with mem_malloc. - - 2008-03-04 Kieran Mansley (contributions by others) - * Numerous small compiler error/warning fixes from contributions to - mailing list after 1.3.0 release candidate made. - - 2008-01-25 Cui hengbin (integrated by Frédéric Bernon) - * dns.c: Fix bug #22108 "DNS problem" caused by unaligned structures. - - 2008-01-15 Kieran Mansley - * tcp_out.c: BUG20511. Modify persist timer to start when we are - prevented from sending by a small send window, not just a zero - send window. - - 2008-01-09 Jonathan Larmour - * opt.h, ip.c: Rename IP_OPTIONS define to IP_OPTIONS_ALLOWED to avoid - conflict with Linux system headers. - - 2008-01-06 Jonathan Larmour - * dhcp.c: fix bug #19927: "DHCP NACK problem" by clearing any existing set IP - address entirely on receiving a DHCPNAK, and restarting discovery. - - 2007-12-21 Simon Goldschmidt - * sys.h, api_lib.c, api_msg.c, sockets.c: fix bug #21698: "netconn->recv_avail - is not protected" by using new macros for interlocked access to modify/test - netconn->recv_avail. - - 2007-12-20 Kieran Mansley (based on patch from Oleg Tyshev) - * tcp_in.c: fix bug# 21535 (nrtx not reset correctly in SYN_SENT state) - - 2007-12-20 Kieran Mansley (based on patch from Per-Henrik Lundbolm) - * tcp.c, tcp_in.c, tcp_out.c, tcp.h: fix bug #20199 (better handling - of silly window avoidance and prevent lwIP from shrinking the window) - - 2007-12-04 Simon Goldschmidt - * tcp.c, tcp_in.c: fix bug #21699 (segment leak in ooseq processing when last - data packet was lost): add assert that all segment lists are empty in - tcp_pcb_remove before setting pcb to CLOSED state; don't directly set CLOSED - state from LAST_ACK in tcp_process - - 2007-12-02 Simon Goldschmidt - * sockets.h: fix bug #21654: exclude definition of struct timeval from #ifndef FD_SET - If including for system-struct timeval, LWIP_TIMEVAL_PRIVATE now - has to be set to 0 in lwipopts.h - - 2007-12-02 Simon Goldschmidt - * api_msg.c, api_lib.c: fix bug #21656 (recvmbox problem in netconn API): always - allocate a recvmbox in netconn_new_with_proto_and_callback. For a tcp-listen - netconn, this recvmbox is later freed and a new mbox is allocated for acceptmbox. - This is a fix for thread-safety and allocates all items needed for a netconn - when the netconn is created. - - 2007-11-30 Simon Goldschmidt - * udp.c: first attempt to fix bug #21655 (DHCP doesn't work reliably with multiple - netifs): if LWIP_DHCP is enabled, UDP packets to DHCP_CLIENT_PORT are passed - to netif->dhcp->pcb only (if that exists) and not to any other pcb for the same - port (only solution to let UDP pcbs 'bind' to a netif instead of an IP address) - - 2007-11-27 Simon Goldschmidt - * ip.c: fixed bug #21643 (udp_send/raw_send don't fail if netif is down) by - letting ip_route only use netifs that are up. - - 2007-11-27 Simon Goldschmidt - * err.h, api_lib.c, api_msg.c, sockets.c: Changed error handling: ERR_MEM, ERR_BUF - and ERR_RTE are seen as non-fatal, all other errors are fatal. netconns and - sockets block most operations once they have seen a fatal error. - - 2007-11-27 Simon Goldschmidt - * udp.h, udp.c, dhcp.c: Implemented new function udp_sendto_if which takes the - netif to send as an argument (to be able to send on netifs that are down). - - 2007-11-26 Simon Goldschmidt - * tcp_in.c: Fixed bug #21582: pcb->acked accounting can be wrong when ACKs - arrive out-of-order - - 2007-11-21 Simon Goldschmidt - * tcp.h, tcp_out.c, api_msg.c: Fixed bug #20287: tcp_output_nagle sends too early - Fixed the nagle algorithm; nagle now also works for all raw API applications - and has to be explicitly disabled with 'tcp_pcb->flags |= TF_NODELAY' - - 2007-11-12 Frédéric Bernon - * sockets.c, api.h, api_lib.c, api_msg.h, api_msg.c: Fixed bug #20900. Now, most - of the netconn_peer and netconn_addr processing is done inside tcpip_thread - context in do_getaddr. - - 2007-11-10 Simon Goldschmidt - * etharp.c: Fixed bug: assert fired when MEMP_ARP_QUEUE was empty (which can - happen any time). Now the packet simply isn't enqueued when out of memory. - - 2007-11-01 Simon Goldschmidt - * tcp.c, tcp_in.c: Fixed bug #21494: The send mss (pcb->mss) is set to 536 (or - TCP_MSS if that is smaller) as long as no MSS option is received from the - remote host. - - 2007-11-01 Simon Goldschmidt - * tcp.h, tcp.c, tcp_in.c: Fixed bug #21491: The MSS option sent (with SYN) - is now based on TCP_MSS instead of pcb->mss (on passive open now effectively - sending our configured TCP_MSS instead of the one received). - - 2007-11-01 Simon Goldschmidt - * tcp_in.c: Fixed bug #21181: On active open, the initial congestion window was - calculated based on the configured TCP_MSS, not on the MSS option received - with SYN+ACK. - - 2007-10-09 Simon Goldschmidt - * udp.c, inet.c, inet.h: Fixed UDPLite: send: Checksum was always generated too - short and also was generated wrong if checksum coverage != tot_len; - receive: checksum was calculated wrong if checksum coverage != tot_len - - 2007-10-08 Simon Goldschmidt - * mem.c: lfree was not updated in mem_realloc! - - 2007-10-07 Frédéric Bernon - * sockets.c, api.h, api_lib.c: First step to fix "bug #20900 : Potential - crash error problem with netconn_peer & netconn_addr". VERY IMPORTANT: - this change cause an API breakage for netconn_addr, since a parameter - type change. Any compiler should cause an error without any changes in - yours netconn_peer calls (so, it can't be a "silent change"). It also - reduce a little bit the footprint for socket layer (lwip_getpeername & - lwip_getsockname use now a common lwip_getaddrname function since - netconn_peer & netconn_addr have the same parameters). - - 2007-09-20 Simon Goldschmidt - * tcp.c: Fixed bug #21080 (tcp_bind without check pcbs in TIME_WAIT state) - by checking tcp_tw_pcbs also - - 2007-09-19 Simon Goldschmidt - * icmp.c: Fixed bug #21107 (didn't reset IP TTL in ICMP echo replies) - - 2007-09-15 Mike Kleshov - * mem.c: Fixed bug #21077 (inaccuracy in calculation of lwip_stat.mem.used) - - 2007-09-06 Frédéric Bernon - * several-files: replace some #include "arch/cc.h" by "lwip/arch.h", or simply remove - it as long as "lwip/opt.h" is included before (this one include "lwip/debug.h" which - already include "lwip/arch.h"). Like that, default defines are provided by "lwip/arch.h" - if they are not defined in cc.h, in the same spirit than "lwip/opt.h" for lwipopts.h. - - 2007-08-30 Frédéric Bernon - * igmp.h, igmp.c: Some changes to remove some redundant code, add some traces, - and fix some coding style. - - 2007-08-28 Frédéric Bernon - * tcpip.c: Fix TCPIP_MSG_INPKT processing: now, tcpip_input can be used for any - kind of packets. These packets are considered like Ethernet packets (payload - pointing to ethhdr) if the netif got the NETIF_FLAG_ETHARP flag. Else, packets - are considered like IP packets (payload pointing to iphdr). - - 2007-08-27 Frédéric Bernon - * api.h, api_lib.c, api_msg.c: First fix for "bug #20900 : Potential crash error - problem with netconn_peer & netconn_addr". Introduce NETCONN_LISTEN netconn_state - and remove obsolete ones (NETCONN_RECV & NETCONN_ACCEPT). - - 2007-08-24 Kieran Mansley - * inet.c Modify (acc >> 16) test to ((acc >> 16) != 0) to help buggy - compiler (Paradigm C++) - - 2007-08-09 Frédéric Bernon, Bill Florac - * stats.h, stats.c, igmp.h, igmp.c, opt.h: Fix for bug #20503 : IGMP Improvement. - Introduce IGMP_STATS to centralize statistics management. - - 2007-08-09 Frédéric Bernon, Bill Florac - * udp.c: Fix for bug #20503 : IGMP Improvement. Enable to receive a multicast - packet on a udp pcb binded on an netif's IP address, and not on "any". - - 2007-08-09 Frédéric Bernon, Bill Florac - * igmp.h, igmp.c, ip.c: Fix minor changes from bug #20503 : IGMP Improvement. - This is mainly on using lookup/lookfor, and some coding styles... - - 2007-07-26 Frédéric Bernon (and "thedoctor") - * igmp.c: Fix bug #20595 to accept IGMPv3 "Query" messages. - - 2007-07-25 Simon Goldschmidt - * api_msg.c, tcp.c: Another fix for bug #20021: by not returning an error if - tcp_output fails in tcp_close, the code in do_close_internal gets simpler - (tcp_output is called again later from tcp timers). - - 2007-07-25 Simon Goldschmidt - * ip_frag.c: Fixed bug #20429: use the new pbuf_copy_partial instead of the old - copy_from_pbuf, which illegally modified the given pbuf. - - 2007-07-25 Simon Goldschmidt - * tcp_out.c: tcp_enqueue: pcb->snd_queuelen didn't work for chaine PBUF_RAMs: - changed snd_queuelen++ to snd_queuelen += pbuf_clen(p). - - 2007-07-24 Simon Goldschmidt - * api_msg.c, tcp.c: Fix bug #20480: Check the pcb passed to tcp_listen() for the - correct state (must be CLOSED). - - 2007-07-13 Thomas Taranowski (commited by Jared Grubb) - * memp.c: Fix bug #20478: memp_malloc returned NULL+MEMP_SIZE on failed - allocation. It now returns NULL. - - 2007-07-13 Frédéric Bernon - * api_msg.c: Fix bug #20318: api_msg "recv" callbacks don't call pbuf_free in - all error cases. - - 2007-07-13 Frédéric Bernon - * api_msg.c: Fix bug #20315: possible memory leak problem if tcp_listen failed, - because current code doesn't follow rawapi.txt documentation. - - 2007-07-13 Kieran Mansley - * src/core/tcp_in.c Apply patch#5741 from Oleg Tyshev to fix bug in - out of sequence processing of received packets - - 2007-07-03 Simon Goldschmidt - * nearly-all-files: Added assertions where PBUF_RAM pbufs are used and an - assumption is made that this pbuf is in one piece (i.e. not chained). These - assumptions clash with the possibility of converting to fully pool-based - pbuf implementations, where PBUF_RAM pbufs might be chained. - - 2007-07-03 Simon Goldschmidt - * api.h, api_lib.c, api_msg.c: Final fix for bug #20021 and some other problems - when closing tcp netconns: removed conn->sem, less context switches when - closing, both netconn_close and netconn_delete should safely close tcp - connections. - - 2007-07-02 Simon Goldschmidt - * ipv4/ip.h, ipv6/ip.h, opt.h, netif.h, etharp.h, ipv4/ip.c, netif.c, raw.c, - tcp_out.c, udp.c, etharp.c: Added option LWIP_NETIF_HWADDRHINT (default=off) - to cache ARP table indices with each pcb instead of single-entry cache for - the complete stack. - - 2007-07-02 Simon Goldschmidt - * tcp.h, tcp.c, tcp_in.c, tcp_out.c: Added some ASSERTS and casts to prevent - warnings when assigning to smaller types. - - 2007-06-28 Simon Goldschmidt - * tcp_out.c: Added check to prevent tcp_pcb->snd_queuelen from overflowing. - - 2007-06-28 Simon Goldschmidt - * tcp.h: Fixed bug #20287: Fixed nagle algorithm (sending was done too early if - a segment contained chained pbufs) - - 2007-06-28 Frédéric Bernon - * autoip.c: replace most of rand() calls by a macro LWIP_AUTOIP_RAND which compute - a "pseudo-random" value based on netif's MAC and some autoip fields. It's always - possible to define this macro in your own lwipopts.h to always use C library's - rand(). Note that autoip_create_rand_addr doesn't use this macro. - - 2007-06-28 Frédéric Bernon - * netifapi.h, netifapi.c, tcpip.h, tcpip.c: Update code to handle the option - LWIP_TCPIP_CORE_LOCKING, and do some changes to be coherent with last modifications - in api_lib/api_msg (use pointers and not type with table, etc...) - - 2007-06-26 Simon Goldschmidt - * udp.h: Fixed bug #20259: struct udp_hdr was lacking the packin defines. - - 2007-06-25 Simon Goldschmidt - * udp.c: Fixed bug #20253: icmp_dest_unreach was called with a wrong p->payload - for udp packets with no matching pcb. - - 2007-06-25 Simon Goldschmidt - * udp.c: Fixed bug #20220: UDP PCB search in udp_input(): a non-local match - could get udp input packets if the remote side matched. - - 2007-06-13 Simon Goldschmidt - * netif.c: Fixed bug #20180 (TCP pcbs listening on IP_ADDR_ANY could get - changed in netif_set_ipaddr if previous netif->ip_addr.addr was 0. - - 2007-06-13 Simon Goldschmidt - * api_msg.c: pcb_new sets conn->err if protocol is not implemented - -> netconn_new_..() does not allocate a new connection for unsupported - protocols. - - 2007-06-13 Frédéric Bernon, Simon Goldschmidt - * api_lib.c: change return expression in netconn_addr and netconn_peer, because - conn->err was reset to ERR_OK without any reasons (and error was lost)... - - 2007-06-13 Frédéric Bernon, Matthias Weisser - * opt.h, mem.h, mem.c, memp.c, pbuf.c, ip_frag.c, vj.c: Fix bug #20162. Rename - MEM_ALIGN in LWIP_MEM_ALIGN and MEM_ALIGN_SIZE in LWIP_MEM_ALIGN_SIZE to avoid - some macro names collision with some OS macros. - - 2007-06-11 Simon Goldschmidt - * udp.c: UDP Lite: corrected the use of chksum_len (based on RFC3828: if it's 0, - create checksum over the complete packet. On RX, if it's < 8 (and not 0), - discard the packet. Also removed the duplicate 'udphdr->chksum = 0' for both - UDP & UDP Lite. - - 2007-06-11 Srinivas Gollakota & Oleg Tyshev - * tcp_out.c: Fix for bug #20075 : "A problem with keep-alive timer and TCP flags" - where TCP flags wasn't initialized in tcp_keepalive. - - 2007-06-03 Simon Goldschmidt - * udp.c: udp_input(): Input pbuf was not freed if pcb had no recv function - registered, p->payload was modified without modifying p->len if sending - icmp_dest_unreach() (had no negative effect but was definitively wrong). - - 2007-06-03 Simon Goldschmidt - * icmp.c: Corrected bug #19937: For responding to an icmp echo request, icmp - re-used the input pbuf even if that didn't have enough space to include the - link headers. Now the space is tested and a new pbuf is allocated for the - echo response packet if the echo request pbuf isn't big enough. - - 2007-06-01 Simon Goldschmidt - * sockets.c: Checked in patch #5914: Moved sockopt processing into tcpip_thread. - - 2007-05-23 Frédéric Bernon - * api_lib.c, sockets.c: Fixed bug #5958 for netconn_listen (acceptmbox only - allocated by do_listen if success) and netconn_accept errors handling. In - most of api_lib functions, we replace some errors checkings like "if (conn==NULL)" - by ASSERT, except for netconn_delete. - - 2007-05-23 Frédéric Bernon - * api_lib.c: Fixed bug #5957 "Safe-thread problem inside netconn_recv" to return - an error code if it's impossible to fetch a pbuf on a TCP connection (and not - directly close the recvmbox). - - 2007-05-22 Simon Goldschmidt - * tcp.c: Fixed bug #1895 (tcp_bind not correct) by introducing a list of - bound but unconnected (and non-listening) tcp_pcbs. - - 2007-05-22 Frédéric Bernon - * sys.h, sys.c, api_lib.c, tcpip.c: remove sys_mbox_fetch_timeout() (was only - used for LWIP_SO_RCVTIMEO option) and use sys_arch_mbox_fetch() instead of - sys_mbox_fetch() in api files. Now, users SHOULD NOT use internal lwIP features - like "sys_timeout" in their application threads. - - 2007-05-22 Frédéric Bernon - * api.h, api_lib.c, api_msg.h, api_msg.c: change the struct api_msg_msg to see - which parameters are used by which do_xxx function, and to avoid "misusing" - parameters (patch #5938). - - 2007-05-22 Simon Goldschmidt - * api_lib.c, api_msg.c, raw.c, api.h, api_msg.h, raw.h: Included patch #5938: - changed raw_pcb.protocol from u16_t to u8_t since for IPv4 and IPv6, proto - is only 8 bits wide. This affects the api, as there, the protocol was - u16_t, too. - - 2007-05-18 Simon Goldschmidt - * memp.c: addition to patch #5913: smaller pointer was returned but - memp_memory was the same size -> did not save memory. - - 2007-05-16 Simon Goldschmidt - * loopif.c, slipif.c: Fix bug #19729: free pbuf if netif->input() returns - != ERR_OK. - - 2007-05-16 Simon Goldschmidt - * api_msg.c, udp.c: If a udp_pcb has a local_ip set, check if it is the same - as the one of the netif used for sending to prevent sending from old - addresses after a netif address gets changed (partly fixes bug #3168). - - 2007-05-16 Frédéric Bernon - * tcpip.c, igmp.h, igmp.c: Fixed bug "#19800 : IGMP: igmp_tick() will not work - with NO_SYS=1". Note that igmp_init is always in tcpip_thread (and not in - tcpip_init) because we have to be sure that network interfaces are already - added (mac filter is updated only in igmp_init for the moment). - - 2007-05-16 Simon Goldschmidt - * mem.c, memp.c: Removed semaphores from memp, changed sys_sem_wait calls - into sys_arch_sem_wait calls to prevent timers from running while waiting - for the heap. This fixes bug #19167. - - 2007-05-13 Simon Goldschmidt - * tcp.h, sockets.h, sockets.c: Fixed bug from patch #5865 by moving the defines - for socket options (lwip_set/-getsockopt) used with level IPPROTO_TCP from - tcp.h to sockets.h. - - 2007-05-07 Simon Goldschmidt - * mem.c: Another attempt to fix bug #17922. - - 2007-05-04 Simon Goldschmidt - * pbuf.c, pbuf.h, etharp.c: Further update to ARP queueing: Changed pbuf_copy() - implementation so that it can be reused (don't allocate the target - pbuf inside pbuf_copy()). - - 2007-05-04 Simon Goldschmidt - * memp.c: checked in patch #5913: in memp_malloc() we can return memp as mem - to save a little RAM (next pointer of memp is not used while not in pool). - - 2007-05-03 "maq" - * sockets.c: Fix ioctl FIONREAD when some data remains from last recv. - (patch #3574). - - 2007-04-23 Simon Goldschmidt - * loopif.c, loopif.h, opt.h, src/netif/FILES: fix bug #2595: "loopif results - in NULL reference for incoming TCP packets". Loopif has to be configured - (using LWIP_LOOPIF_MULTITHREADING) to directly call netif->input() - (multithreading environments, e.g. netif->input() = tcpip_input()) or - putting packets on a list that is fed to the stack by calling loopif_poll() - (single-thread / NO_SYS / polling environment where e.g. - netif->input() = ip_input). - - 2007-04-17 Jonathan Larmour - * pbuf.c: Use s32_t in pbuf_realloc(), as an s16_t can't reliably hold - the difference between two u16_t's. - * sockets.h: FD_SETSIZE needs to match number of sockets, which is - MEMP_NUM_NETCONN in sockets.c right now. - - 2007-04-12 Jonathan Larmour - * icmp.c: Reset IP header TTL in ICMP ECHO responses (bug #19580). - - 2007-04-12 Kieran Mansley - * tcp.c, tcp_in.c, tcp_out.c, tcp.h: Modify way the retransmission - timer is reset to fix bug#19434, with help from Oleg Tyshev. - - 2007-04-11 Simon Goldschmidt - * etharp.c, pbuf.c, pbuf.h: 3rd fix for bug #11400 (arp-queuing): More pbufs than - previously thought need to be copied (everything but PBUF_ROM!). Cleaned up - pbuf.c: removed functions no needed any more (by etharp). - - 2007-04-11 Kieran Mansley - * inet.c, ip_addr.h, sockets.h, sys.h, tcp.h: Apply patch #5745: Fix - "Constant is long" warnings with 16bit compilers. Contributed by - avatar@mmlab.cse.yzu.edu.tw - - 2007-04-05 Frédéric Bernon, Jonathan Larmour - * api_msg.c: Fix bug #16830: "err_tcp() posts to connection mailbox when no pend on - the mailbox is active". Now, the post is only done during a connect, and do_send, - do_write and do_join_leave_group don't do anything if a previous error was signaled. - - 2007-04-03 Frédéric Bernon - * ip.c: Don't set the IP_DF ("Don't fragment") flag in the IP header in IP output - packets. See patch #5834. - - 2007-03-30 Frédéric Bernon - * api_msg.c: add a "pcb_new" helper function to avoid redundant code, and to add - missing pcb allocations checking (in do_bind, and for each raw_new). Fix style. - - 2007-03-30 Frédéric Bernon - * most of files: prefix all debug.h define with "LWIP_" to avoid any conflict with - others environment defines (these were too "generic"). - - 2007-03-28 Frédéric Bernon - * api.h, api_lib.c, sockets.c: netbuf_ref doesn't check its internal pbuf_alloc call - result and can cause a crash. lwip_send now check netbuf_ref result. - - 2007-03-28 Simon Goldschmidt - * sockets.c Remove "#include " from sockets.c to avoid multiple - definition of macros (in errno.h and lwip/arch.h) if LWIP_PROVIDE_ERRNO is - defined. This is the way it should have been already (looking at - doc/sys_arch.txt) - - 2007-03-28 Kieran Mansley - * opt.h Change default PBUF_POOL_BUFSIZE (again) to accomodate default MSS + - IP and TCP headers *and* physical link headers - - 2007-03-26 Frédéric Bernon (based on patch from Dmitry Potapov) - * api_lib.c: patch for netconn_write(), fixes a possible race condition which cause - to send some garbage. It is not a definitive solution, but the patch does solve - the problem for most cases. - - 2007-03-22 Frédéric Bernon - * api_msg.h, api_msg.c: Remove obsolete API_MSG_ACCEPT and do_accept (never used). - - 2007-03-22 Frédéric Bernon - * api_lib.c: somes resources couldn't be freed if there was errors during - netconn_new_with_proto_and_callback. - - 2007-03-22 Frédéric Bernon - * ethernetif.c: update netif->input calls to check return value. In older ports, - it's a good idea to upgrade them, even if before, there could be another problem - (access to an uninitialized mailbox). - - 2007-03-21 Simon Goldschmidt - * sockets.c: fixed bug #5067 (essentialy a signed/unsigned warning fixed - by casting to unsigned). - - 2007-03-21 Frédéric Bernon - * api_lib.c, api_msg.c, tcpip.c: integrate sys_mbox_fetch(conn->mbox, NULL) calls from - api_lib.c to tcpip.c's tcpip_apimsg(). Now, use a local variable and not a - dynamic one from memp to send tcpip_msg to tcpip_thread in a synchrone call. - Free tcpip_msg from tcpip_apimsg is not done in tcpip_thread. This give a - faster and more reliable communication between api_lib and tcpip. - - 2007-03-21 Frédéric Bernon - * opt.h: Add LWIP_NETIF_CALLBACK (to avoid compiler warning) and set it to 0. - - 2007-03-21 Frédéric Bernon - * api_msg.c, igmp.c, igmp.h: Fix C++ style comments - - 2007-03-21 Kieran Mansley - * opt.h Change default PBUF_POOL_BUFSIZE to accomodate default MSS + - IP and TCP headers - - 2007-03-21 Kieran Mansley - * Fix all uses of pbuf_header to check the return value. In some - cases just assert if it fails as I'm not sure how to fix them, but - this is no worse than before when they would carry on regardless - of the failure. - - 2007-03-21 Kieran Mansley - * sockets.c, igmp.c, igmp.h, memp.h: Fix C++ style comments and - comment out missing header include in icmp.c - - 2007-03-20 Frédéric Bernon - * memp.h, stats.c: Fix stats_display function where memp_names table wasn't - synchronized with memp.h. - - 2007-03-20 Frédéric Bernon - * tcpip.c: Initialize tcpip's mbox, and verify if initialized in tcpip_input, - tcpip_ethinput, tcpip_callback, tcpip_apimsg, to fix a init problem with - network interfaces. Also fix a compiler warning. - - 2007-03-20 Kieran Mansley - * udp.c: Only try and use pbuf_header() to make space for headers if - not a ROM or REF pbuf. - - 2007-03-19 Frédéric Bernon - * api_msg.h, api_msg.c, tcpip.h, tcpip.c: Add return types to tcpip_apimsg() - and api_msg_post(). - - 2007-03-19 Frédéric Bernon - * Remove unimplemented "memp_realloc" function from memp.h. - - 2007-03-11 Simon Goldschmidt - * pbuf.c: checked in patch #5796: pbuf_alloc: len field claculation caused - memory corruption. - - 2007-03-11 Simon Goldschmidt (based on patch from Dmitry Potapov) - * api_lib.c, sockets.c, api.h, api_msg.h, sockets.h: Fixed bug #19251 - (missing `const' qualifier in socket functions), to get more compatible to - standard POSIX sockets. - - 2007-03-11 Frédéric Bernon (based on patch from Dmitry Potapov) - * sockets.c: Add asserts inside bind, connect and sendto to check input - parameters. Remove excessive set_errno() calls after get_socket(), because - errno is set inside of get_socket(). Move last sock_set_errno() inside - lwip_close. - - 2007-03-09 Simon Goldschmidt - * memp.c: Fixed bug #11400: New etharp queueing introduced bug: memp_memory - was allocated too small. - - 2007-03-06 Simon Goldschmidt - * tcpip.c: Initialize dhcp timers in tcpip_thread (if LWIP_DHCP) to protect - the stack from concurrent access. - - 2007-03-06 Frédéric Bernon, Dmitry Potapov - * tcpip.c, ip_frag.c, ethernetif.c: Fix some build problems, and a redundancy - call to "lwip_stats.link.recv++;" in low_level_input() & ethernetif_input(). - - 2007-03-06 Simon Goldschmidt - * ip_frag.c, ip_frag.h: Reduce code size: don't include code in those files - if IP_FRAG == 0 and IP_REASSEMBLY == 0 - - 2007-03-06 Frédéric Bernon, Simon Goldschmidt - * opt.h, ip_frag.h, tcpip.h, tcpip.c, ethernetif.c: add new configuration - option named ETHARP_TCPIP_ETHINPUT, which enable the new tcpip_ethinput. - Allow to do ARP processing for incoming packets inside tcpip_thread - (protecting ARP layer against concurrent access). You can also disable - old code using tcp_input with new define ETHARP_TCPIP_INPUT set to 0. - Older ports have to use tcpip_ethinput. - - 2007-03-06 Simon Goldschmidt (based on patch from Dmitry Potapov) - * err.h, err.c: fixed compiler warning "initialization dircards qualifiers - from pointer target type" - - 2007-03-05 Frédéric Bernon - * opt.h, sockets.h: add new configuration options (LWIP_POSIX_SOCKETS_IO_NAMES, - ETHARP_TRUST_IP_MAC, review SO_REUSE) - - 2007-03-04 Frédéric Bernon - * api_msg.c: Remove some compiler warnings : parameter "pcb" was never - referenced. - - 2007-03-04 Frédéric Bernon - * api_lib.c: Fix "[patch #5764] api_lib.c cleanup: after patch #5687" (from - Dmitry Potapov). - The api_msg struct stay on the stack (not moved to netconn struct). - - 2007-03-04 Simon Goldschmidt (based on patch from Dmitry Potapov) - * pbuf.c: Fix BUG#19168 - pbuf_free can cause deadlock (if - SYS_LIGHTWEIGHT_PROT=1 & freeing PBUF_RAM when mem_sem is not available) - Also fixed cast warning in pbuf_alloc() - - 2007-03-04 Simon Goldschmidt - * etharp.c, etharp.h, memp.c, memp.h, opt.h: Fix BUG#11400 - don't corrupt - existing pbuf chain when enqueuing multiple pbufs to a pending ARP request - - 2007-03-03 Frédéric Bernon - * udp.c: remove obsolete line "static struct udp_pcb *pcb_cache = NULL;" - It is static, and never used in udp.c except udp_init(). - - 2007-03-02 Simon Goldschmidt - * tcpip.c: Moved call to ip_init(), udp_init() and tcp_init() from - tcpip_thread() to tcpip_init(). This way, raw API connections can be - initialized before tcpip_thread is running (e.g. before OS is started) - - 2007-03-02 Frédéric Bernon - * rawapi.txt: Fix documentation mismatch with etharp.h about etharp_tmr's call - interval. - - 2007-02-28 Kieran Mansley - * pbuf.c: Fix BUG#17645 - ensure pbuf payload pointer is not moved - outside the region of the pbuf by pbuf_header() - - 2007-02-28 Kieran Mansley - * sockets.c: Fix BUG#19161 - ensure milliseconds timeout is non-zero - when supplied timeout is also non-zero - -(STABLE-1.2.0) - - 2006-12-05 Leon Woestenberg - * CHANGELOG: Mention STABLE-1.2.0 release. - - ++ New features: - - 2006-12-01 Christiaan Simons - * mem.h, opt.h: Added MEM_LIBC_MALLOC option. - Note this is a workaround. Currently I have no other options left. - - 2006-10-26 Christiaan Simons (accepted patch by Jonathan Larmour) - * ipv4/ip_frag.c: rename MAX_MTU to IP_FRAG_MAX_MTU and move define - to include/lwip/opt.h. - * ipv4/lwip/ip_frag.h: Remove unused IP_REASS_INTERVAL. - Move IP_REASS_MAXAGE and IP_REASS_BUFSIZE to include/lwip/opt.h. - * opt.h: Add above new options. - - 2006-08-18 Christiaan Simons - * tcp_{in,out}.c: added SNMP counters. - * ipv4/ip.c: added SNMP counters. - * ipv4/ip_frag.c: added SNMP counters. - - 2006-08-08 Christiaan Simons - * etharp.{c,h}: added etharp_find_addr() to read - (stable) ethernet/IP address pair from ARP table - - 2006-07-14 Christiaan Simons - * mib_structs.c: added - * include/lwip/snmp_structs.h: added - * netif.{c,h}, netif/ethernetif.c: added SNMP statistics to netif struct - - 2006-07-06 Christiaan Simons - * snmp/asn1_{enc,dec}.c added - * snmp/mib2.c added - * snmp/msg_{in,out}.c added - * include/lwip/snmp_asn1.h added - * include/lwip/snmp_msg.h added - * doc/snmp_agent.txt added - - 2006-03-29 Christiaan Simons - * inet.c, inet.h: Added platform byteswap support. - Added LWIP_PLATFORM_BYTESWAP define (defaults to 0) and - optional LWIP_PLATFORM_HTONS(), LWIP_PLATFORM_HTONL() macros. - - ++ Bug fixes: - - 2006-11-30 Christiaan Simons - * dhcp.c: Fixed false triggers of request_timeout. - - 2006-11-28 Christiaan Simons - * netif.c: In netif_add() fixed missing clear of ip_addr, netmask, gw and flags. - - 2006-10-11 Christiaan Simons - * api_lib.c etharp.c, ip.c, memp.c, stats.c, sys.{c,h} tcp.h: - Partially accepted patch #5449 for ANSI C compatibility / build fixes. - * ipv4/lwip/ip.h ipv6/lwip/ip.h: Corrected UDP-Lite protocol - identifier from 170 to 136 (bug #17574). - - 2006-10-10 Christiaan Simons - * api_msg.c: Fixed Nagle algorithm as reported by Bob Grice. - - 2006-08-17 Christiaan Simons - * udp.c: Fixed bug #17200, added check for broadcast - destinations for PCBs bound to a unicast address. - - 2006-08-07 Christiaan Simons - * api_msg.c: Flushing TCP output in do_close() (bug #15926). - - 2006-06-27 Christiaan Simons - * api_msg.c: Applied patch for cold case (bug #11135). - In accept_function() ensure newconn->callback is always initialized. - - 2006-06-15 Christiaan Simons - * mem.h: added MEM_SIZE_F alias to fix an ancient cold case (bug #1748), - facilitate printing of mem_size_t and u16_t statistics. - - 2006-06-14 Christiaan Simons - * api_msg.c: Applied patch #5146 to handle allocation failures - in accept() by Kevin Lawson. - - 2006-05-26 Christiaan Simons - * api_lib.c: Removed conn->sem creation and destruction - from netconn_write() and added sys_sem_new to netconn_new_*. - -(STABLE-1_1_1) - - 2006-03-03 Christiaan Simons - * ipv4/ip_frag.c: Added bound-checking assertions on ip_reassbitmap - access and added pbuf_alloc() return value checks. - - 2006-01-01 Leon Woestenberg - * tcp_{in,out}.c, tcp_out.c: Removed 'even sndbuf' fix in TCP, which is - now handled by the checksum routine properly. - - 2006-02-27 Leon Woestenberg - * pbuf.c: Fix alignment; pbuf_init() would not work unless - pbuf_pool_memory[] was properly aligned. (Patch by Curt McDowell.) - - 2005-12-20 Leon Woestenberg - * tcp.c: Remove PCBs which stay in LAST_ACK state too long. Patch - submitted by Mitrani Hiroshi. - - 2005-12-15 Christiaan Simons - * inet.c: Disabled the added summing routine to preserve code space. - - 2005-12-14 Leon Woestenberg - * tcp_in.c: Duplicate FIN ACK race condition fix by Kelvin Lawson. - Added Curt McDowell's optimized checksumming routine for future - inclusion. Need to create test case for unaliged, aligned, odd, - even length combination of cases on various endianess machines. - - 2005-12-09 Christiaan Simons - * inet.c: Rewrote standard checksum routine in proper portable C. - - 2005-11-25 Christiaan Simons - * udp.c tcp.c: Removed SO_REUSE hack. Should reside in socket code only. - * *.c: introduced cc.h LWIP_DEBUG formatters matching the u16_t, s16_t, - u32_t, s32_t typedefs. This solves most debug word-length assumes. - - 2005-07-17 Leon Woestenberg - * inet.c: Fixed unaligned 16-bit access in the standard checksum - routine by Peter Jolasson. - * slipif.c: Fixed implementation assumption of single-pbuf datagrams. - - 2005-02-04 Leon Woestenberg - * tcp_out.c: Fixed uninitialized 'queue' referenced in memerr branch. - * tcp_{out|in}.c: Applied patch fixing unaligned access. - - 2005-01-04 Leon Woestenberg - * pbuf.c: Fixed missing semicolon after LWIP_DEBUG statement. - - 2005-01-03 Leon Woestenberg - * udp.c: UDP pcb->recv() was called even when it was NULL. - -(STABLE-1_1_0) - - 2004-12-28 Leon Woestenberg - * etharp.*: Disabled multiple packets on the ARP queue. - This clashes with TCP queueing. - - 2004-11-28 Leon Woestenberg - * etharp.*: Fixed race condition from ARP request to ARP timeout. - Halved the ARP period, doubled the period counts. - ETHARP_MAX_PENDING now should be at least 2. This prevents - the counter from reaching 0 right away (which would allow - too little time for ARP responses to be received). - - 2004-11-25 Leon Woestenberg - * dhcp.c: Decline messages were not multicast but unicast. - * etharp.c: ETHARP_CREATE is renamed to ETHARP_TRY_HARD. - Do not try hard to insert arbitrary packet's source address, - etharp_ip_input() now calls etharp_update() without ETHARP_TRY_HARD. - etharp_query() now always DOES call ETHARP_TRY_HARD so that users - querying an address will see it appear in the cache (DHCP could - suffer from this when a server invalidly gave an in-use address.) - * ipv4/ip_addr.h: Renamed ip_addr_maskcmp() to _netcmp() as we are - comparing network addresses (identifiers), not the network masks - themselves. - * ipv4/ip_addr.c: ip_addr_isbroadcast() now checks that the given - IP address actually belongs to the network of the given interface. - - 2004-11-24 Kieran Mansley - * tcp.c: Increment pcb->snd_buf when ACK is received in SYN_SENT state. - -(STABLE-1_1_0-RC1) - - 2004-10-16 Kieran Mansley - * tcp.c: Add code to tcp_recved() to send an ACK (window update) immediately, - even if one is already pending, if the rcv_wnd is above a threshold - (currently TCP_WND/2). This avoids waiting for a timer to expire to send a - delayed ACK in order to open the window if the stack is only receiving data. - - 2004-09-12 Kieran Mansley - * tcp*.*: Retransmit time-out handling improvement by Sam Jansen. - - 2004-08-20 Tony Mountifield - * etharp.c: Make sure the first pbuf queued on an ARP entry - is properly ref counted. - - 2004-07-27 Tony Mountifield - * debug.h: Added (int) cast in LWIP_DEBUGF() to avoid compiler - warnings about comparison. - * pbuf.c: Stopped compiler complaining of empty if statement - when LWIP_DEBUGF() empty. Closed an unclosed comment. - * tcp.c: Stopped compiler complaining of empty if statement - when LWIP_DEBUGF() empty. - * ip.h Corrected IPH_TOS() macro: returns a byte, so doesn't need htons(). - * inet.c: Added a couple of casts to quiet the compiler. - No need to test isascii(c) before isdigit(c) or isxdigit(c). - - 2004-07-22 Tony Mountifield - * inet.c: Made data types consistent in inet_ntoa(). - Added casts for return values of checksum routines, to pacify compiler. - * ip_frag.c, tcp_out.c, sockets.c, pbuf.c - Small corrections to some debugging statements, to pacify compiler. - - 2004-07-21 Tony Mountifield - * etharp.c: Removed spurious semicolon and added missing end-of-comment. - * ethernetif.c Updated low_level_output() to match prototype for - netif->linkoutput and changed low_level_input() similarly for consistency. - * api_msg.c: Changed recv_raw() from int to u8_t, to match prototype - of raw_recv() in raw.h and so avoid compiler error. - * sockets.c: Added trivial (int) cast to keep compiler happier. - * ip.c, netif.c Changed debug statements to use the tidier ip4_addrN() macros. - -(STABLE-1_0_0) - - ++ Changes: - - 2004-07-05 Leon Woestenberg - * sockets.*: Restructured LWIP_PRIVATE_TIMEVAL. Make sure - your cc.h file defines this either 1 or 0. If non-defined, - defaults to 1. - * .c: Added and includes where used. - * etharp.c: Made some array indices unsigned. - - 2004-06-27 Leon Woestenberg - * netif.*: Added netif_set_up()/down(). - * dhcp.c: Changes to restart program flow. - - 2004-05-07 Leon Woestenberg - * etharp.c: In find_entry(), instead of a list traversal per candidate, do a - single-pass lookup for different candidates. Should exploit locality. - - 2004-04-29 Leon Woestenberg - * tcp*.c: Cleaned up source comment documentation for Doxygen processing. - * opt.h: ETHARP_ALWAYS_INSERT option removed to comply with ARP RFC. - * etharp.c: update_arp_entry() only adds new ARP entries when adviced to by - the caller. This deprecates the ETHARP_ALWAYS_INSERT overrule option. - - ++ Bug fixes: - - 2004-04-27 Leon Woestenberg - * etharp.c: Applied patch of bug #8708 by Toni Mountifield with a solution - suggested by Timmy Brolin. Fix for 32-bit processors that cannot access - non-aligned 32-bit words, such as soms 32-bit TCP/IP header fields. Fix - is to prefix the 14-bit Ethernet headers with two padding bytes. - - 2004-04-23 Leon Woestenberg - * ip_addr.c: Fix in the ip_addr_isbroadcast() check. - * etharp.c: Fixed the case where the packet that initiates the ARP request - is not queued, and gets lost. Fixed the case where the packets destination - address is already known; we now always queue the packet and perform an ARP - request. - -(STABLE-0_7_0) - - ++ Bug fixes: - - * Fixed TCP bug for SYN_SENT to ESTABLISHED state transition. - * Fixed TCP bug in dequeueing of FIN from out of order segment queue. - * Fixed two possible NULL references in rare cases. - -(STABLE-0_6_6) - - ++ Bug fixes: - - * Fixed DHCP which did not include the IP address in DECLINE messages. - - ++ Changes: - - * etharp.c has been hauled over a bit. - -(STABLE-0_6_5) - - ++ Bug fixes: - - * Fixed TCP bug induced by bad window resizing with unidirectional TCP traffic. - * Packets sent from ARP queue had invalid source hardware address. - - ++ Changes: - - * Pass-by ARP requests do now update the cache. - - ++ New features: - - * No longer dependent on ctype.h. - * New socket options. - * Raw IP pcb support. - -(STABLE-0_6_4) - - ++ Bug fixes: - - * Some debug formatters and casts fixed. - * Numereous fixes in PPP. - - ++ Changes: - - * DEBUGF now is LWIP_DEBUGF - * pbuf_dechain() has been re-enabled. - * Mentioned the changed use of CVS branches in README. - -(STABLE-0_6_3) - - ++ Bug fixes: - - * Fixed pool pbuf memory leak in pbuf_alloc(). - Occured if not enough PBUF_POOL pbufs for a packet pbuf chain. - Reported by Savin Zlobec. - - * PBUF_POOL chains had their tot_len field not set for non-first - pbufs. Fixed in pbuf_alloc(). - - ++ New features: - - * Added PPP stack contributed by Marc Boucher - - ++ Changes: - - * Now drops short packets for ICMP/UDP/TCP protocols. More robust. - - * ARP queueuing now queues the latest packet instead of the first. - This is the RFC recommended behaviour, but can be overridden in - lwipopts.h. - -(0.6.2) - - ++ Bugfixes: - - * TCP has been fixed to deal with the new use of the pbuf->ref - counter. - - * DHCP dhcp_inform() crash bug fixed. - - ++ Changes: - - * Removed pbuf_pool_free_cache and pbuf_pool_alloc_cache. Also removed - pbuf_refresh(). This has sped up pbuf pool operations considerably. - Implemented by David Haas. - -(0.6.1) - - ++ New features: - - * The packet buffer implementation has been enhanced to support - zero-copy and copy-on-demand for packet buffers which have their - payloads in application-managed memory. - Implemented by David Haas. - - Use PBUF_REF to make a pbuf refer to RAM. lwIP will use zero-copy - if an outgoing packet can be directly sent on the link, or perform - a copy-on-demand when necessary. - - The application can safely assume the packet is sent, and the RAM - is available to the application directly after calling udp_send() - or similar function. - - ++ Bugfixes: - - * ARP_QUEUEING should now correctly work for all cases, including - PBUF_REF. - Implemented by Leon Woestenberg. - - ++ Changes: - - * IP_ADDR_ANY is no longer a NULL pointer. Instead, it is a pointer - to a '0.0.0.0' IP address. - - * The packet buffer implementation is changed. The pbuf->ref counter - meaning has changed, and several pbuf functions have been - adapted accordingly. - - * netif drivers have to be changed to set the hardware address length field - that must be initialized correctly by the driver (hint: 6 for Ethernet MAC). - See the contrib/ports/c16x cs8900 driver as a driver example. - - * netif's have a dhcp field that must be initialized to NULL by the driver. - See the contrib/ports/c16x cs8900 driver as a driver example. - -(0.5.x) This file has been unmaintained up to 0.6.1. All changes are - logged in CVS but have not been explained here. - -(0.5.3) Changes since version 0.5.2 - - ++ Bugfixes: - - * memp_malloc(MEMP_API_MSG) could fail with multiple application - threads because it wasn't protected by semaphores. - - ++ Other changes: - - * struct ip_addr now packed. - - * The name of the time variable in arp.c has been changed to ctime - to avoid conflicts with the time() function. - -(0.5.2) Changes since version 0.5.1 - - ++ New features: - - * A new TCP function, tcp_tmr(), now handles both TCP timers. - - ++ Bugfixes: - - * A bug in tcp_parseopt() could cause the stack to hang because of a - malformed TCP option. - - * The address of new connections in the accept() function in the BSD - socket library was not handled correctly. - - * pbuf_dechain() did not update the ->tot_len field of the tail. - - * Aborted TCP connections were not handled correctly in all - situations. - - ++ Other changes: - - * All protocol header structs are now packed. - - * The ->len field in the tcp_seg structure now counts the actual - amount of data, and does not add one for SYN and FIN segments. - -(0.5.1) Changes since version 0.5.0 - - ++ New features: - - * Possible to run as a user process under Linux. - - * Preliminary support for cross platform packed structs. - - * ARP timer now implemented. - - ++ Bugfixes: - - * TCP output queue length was badly initialized when opening - connections. - - * TCP delayed ACKs were not sent correctly. - - * Explicit initialization of BSS segment variables. - - * read() in BSD socket library could drop data. - - * Problems with memory alignment. - - * Situations when all TCP buffers were used could lead to - starvation. - - * TCP MSS option wasn't parsed correctly. - - * Problems with UDP checksum calculation. - - * IP multicast address tests had endianess problems. - - * ARP requests had wrong destination hardware address. - - ++ Other changes: - - * struct eth_addr changed from u16_t[3] array to u8_t[6]. - - * A ->linkoutput() member was added to struct netif. - - * TCP and UDP ->dest_* struct members where changed to ->remote_*. - - * ntoh* macros are now null definitions for big endian CPUs. - -(0.5.0) Changes since version 0.4.2 - - ++ New features: - - * Redesigned operating system emulation layer to make porting easier. - - * Better control over TCP output buffers. - - * Documenation added. - - ++ Bugfixes: - - * Locking issues in buffer management. - - * Bugfixes in the sequential API. - - * IP forwarding could cause memory leakage. This has been fixed. - - ++ Other changes: - - * Directory structure somewhat changed; the core/ tree has been - collapsed. - -(0.4.2) Changes since version 0.4.1 - - ++ New features: - - * Experimental ARP implementation added. - - * Skeleton Ethernet driver added. - - * Experimental BSD socket API library added. - - ++ Bugfixes: - - * In very intense situations, memory leakage could occur. This has - been fixed. - - ++ Other changes: - - * Variables named "data" and "code" have been renamed in order to - avoid name conflicts in certain compilers. - - * Variable++ have in appliciable cases been translated to ++variable - since some compilers generate better code in the latter case. - -(0.4.1) Changes since version 0.4 - - ++ New features: - - * TCP: Connection attempts time out earlier than data - transmissions. Nagle algorithm implemented. Push flag set on the - last segment in a burst. - - * UDP: experimental support for UDP-Lite extensions. - - ++ Bugfixes: - - * TCP: out of order segments were in some cases handled incorrectly, - and this has now been fixed. Delayed acknowledgements was broken - in 0.4, has now been fixed. Binding to an address that is in use - now results in an error. Reset connections sometimes hung an - application; this has been fixed. - - * Checksum calculation sometimes failed for chained pbufs with odd - lengths. This has been fixed. - - * API: a lot of bug fixes in the API. The UDP API has been improved - and tested. Error reporting and handling has been - improved. Logical flaws and race conditions for incoming TCP - connections has been found and removed. - - * Memory manager: alignment issues. Reallocating memory sometimes - failed, this has been fixed. - - * Generic library: bcopy was flawed and has been fixed. - - ++ Other changes: - - * API: all datatypes has been changed from generic ones such as - ints, to specified ones such as u16_t. Functions that return - errors now have the correct type (err_t). - - * General: A lot of code cleaned up and debugging code removed. Many - portability issues have been fixed. - - * The license was changed; the advertising clause was removed. - - * C64 port added. - - * Thanks: Huge thanks go to Dagan Galarneau, Horst Garnetzke, Petri - Kosunen, Mikael Caleres, and Frits Wilmink for reporting and - fixing bugs! - -(0.4) Changes since version 0.3.1 - - * Memory management has been radically changed; instead of - allocating memory from a shared heap, memory for objects that are - rapidly allocated and deallocated is now kept in pools. Allocation - and deallocation from those memory pools is very fast. The shared - heap is still present but is used less frequently. - - * The memory, memory pool, and packet buffer subsystems now support - 4-, 2-, or 1-byte alignment. - - * "Out of memory" situations are handled in a more robust way. - - * Stack usage has been reduced. - - * Easier configuration of lwIP parameters such as memory usage, - TTLs, statistics gathering, etc. All configuration parameters are - now kept in a single header file "lwipopts.h". - - * The directory structure has been changed slightly so that all - architecture specific files are kept under the src/arch - hierarchy. - - * Error propagation has been improved, both in the protocol modules - and in the API. - - * The code for the RTXC architecture has been implemented, tested - and put to use. - - * Bugs have been found and corrected in the TCP, UDP, IP, API, and - the Internet checksum modules. - - * Bugs related to porting between a 32-bit and a 16-bit architecture - have been found and corrected. - - * The license has been changed slightly to conform more with the - original BSD license, including the advertisement clause. - -(0.3.1) Changes since version 0.3 - - * Fix of a fatal bug in the buffer management. Pbufs with allocated - RAM never returned the RAM when the pbuf was deallocated. - - * TCP congestion control, window updates and retransmissions did not - work correctly. This has now been fixed. - - * Bugfixes in the API. - -(0.3) Changes since version 0.2 - - * New and improved directory structure. All include files are now - kept in a dedicated include/ directory. - - * The API now has proper error handling. A new function, - netconn_err(), now returns an error code for the connection in - case of errors. - - * Improvements in the memory management subsystem. The system now - keeps a pointer to the lowest free memory block. A new function, - mem_malloc2() tries to allocate memory once, and if it fails tries - to free some memory and retry the allocation. - - * Much testing has been done with limited memory - configurations. lwIP now does a better job when overloaded. - - * Some bugfixes and improvements to the buffer (pbuf) subsystem. - - * Many bugfixes in the TCP code: - - - Fixed a bug in tcp_close(). - - - The TCP receive window was incorrectly closed when out of - sequence segments was received. This has been fixed. - - - Connections are now timed-out of the FIN-WAIT-2 state. - - - The initial congestion window could in some cases be too - large. This has been fixed. - - - The retransmission queue could in some cases be screwed up. This - has been fixed. - - - TCP RST flag now handled correctly. - - - Out of sequence data was in some cases never delivered to the - application. This has been fixed. - - - Retransmitted segments now contain the correct acknowledgment - number and advertised window. - - - TCP retransmission timeout backoffs are not correctly computed - (ala BSD). After a number of retransmissions, TCP now gives up - the connection. - - * TCP connections now are kept on three lists, one for active - connections, one for listening connections, and one for - connections that are in TIME-WAIT. This greatly speeds up the fast - timeout processing for sending delayed ACKs. - - * TCP now provides proper feedback to the application when a - connection has been successfully set up. - - * More comments have been added to the code. The code has also been - somewhat cleaned up. - -(0.2) Initial public release. diff --git a/third_party/lwip/repo/lwip/COPYING b/third_party/lwip/repo/lwip/COPYING deleted file mode 100644 index e23898b5e8..0000000000 --- a/third_party/lwip/repo/lwip/COPYING +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2001, 2002 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Adam Dunkels - * - */ - - diff --git a/third_party/lwip/repo/lwip/FILES b/third_party/lwip/repo/lwip/FILES deleted file mode 100644 index e6e09989d9..0000000000 --- a/third_party/lwip/repo/lwip/FILES +++ /dev/null @@ -1,5 +0,0 @@ -src/ - The source code for the lwIP TCP/IP stack. -doc/ - The documentation for lwIP. -test/ - Some code to test whether the sources do what they should. - -See also the FILES file in each subdirectory. diff --git a/third_party/lwip/repo/lwip/README b/third_party/lwip/repo/lwip/README deleted file mode 100644 index 0884d27bea..0000000000 --- a/third_party/lwip/repo/lwip/README +++ /dev/null @@ -1,100 +0,0 @@ -INTRODUCTION - -lwIP is a small independent implementation of the TCP/IP protocol -suite that has been developed by Adam Dunkels at the Computer and -Networks Architectures (CNA) lab at the Swedish Institute of Computer -Science (SICS). - -The focus of the lwIP TCP/IP implementation is to reduce the RAM usage -while still having a full scale TCP. This making lwIP suitable for use -in embedded systems with tens of kilobytes of free RAM and room for -around 40 kilobytes of code ROM. - - -FEATURES - - * IP (Internet Protocol, IPv4 and IPv6) including packet forwarding over - multiple network interfaces - * ICMP (Internet Control Message Protocol) for network maintenance and debugging - * IGMP (Internet Group Management Protocol) for multicast traffic management - * MLD (Multicast listener discovery for IPv6). Aims to be compliant with - RFC 2710. No support for MLDv2 - * ND (Neighbor discovery and stateless address autoconfiguration for IPv6). - Aims to be compliant with RFC 4861 (Neighbor discovery) and RFC 4862 - (Address autoconfiguration) - * UDP (User Datagram Protocol) including experimental UDP-lite extensions - * TCP (Transmission Control Protocol) with congestion control, RTT estimation - and fast recovery/fast retransmit - * raw/native API for enhanced performance - * Optional Berkeley-like socket API - * DNS (Domain names resolver) - - -APPLICATIONS - - * HTTP server with SSI and CGI - * SNMPv2c agent with MIB compiler (Simple Network Management Protocol) - * SNTP (Simple network time protocol) - * NetBIOS name service responder - * MDNS (Multicast DNS) responder - * iPerf server implementation - - -LICENSE - -lwIP is freely available under a BSD license. - - -DEVELOPMENT - -lwIP has grown into an excellent TCP/IP stack for embedded devices, -and developers using the stack often submit bug fixes, improvements, -and additions to the stack to further increase its usefulness. - -Development of lwIP is hosted on Savannah, a central point for -software development, maintenance and distribution. Everyone can -help improve lwIP by use of Savannah's interface, Git and the -mailing list. A core team of developers will commit changes to the -Git source tree. - -The lwIP TCP/IP stack is maintained in the 'lwip' Git module and -contributions (such as platform ports) are in the 'contrib' Git module. - -See doc/savannah.txt for details on Git server access for users and -developers. - -The current Git trees are web-browsable: - http://git.savannah.gnu.org/cgit/lwip.git - http://git.savannah.gnu.org/cgit/lwip/lwip-contrib.git - -Submit patches and bugs via the lwIP project page: - http://savannah.nongnu.org/projects/lwip/ - -Continuous integration builds (GCC, clang): - https://travis-ci.org/yarrick/lwip-merged - - -DOCUMENTATION - -Self documentation of the source code is regularly extracted from the current -Git sources and is available from this web page: - http://www.nongnu.org/lwip/ - -There is now a constantly growing wiki about lwIP at - http://lwip.wikia.com/wiki/LwIP_Wiki - -Also, there are mailing lists you can subscribe at - http://savannah.nongnu.org/mail/?group=lwip -plus searchable archives: - http://lists.nongnu.org/archive/html/lwip-users/ - http://lists.nongnu.org/archive/html/lwip-devel/ - -lwIP was originally written by Adam Dunkels: - http://dunkels.com/adam/ - -Reading Adam's papers, the files in docs/, browsing the source code -documentation and browsing the mailing list archives is a good way to -become familiar with the design of lwIP. - -Adam Dunkels -Leon Woestenberg diff --git a/third_party/lwip/repo/lwip/UPGRADING b/third_party/lwip/repo/lwip/UPGRADING deleted file mode 100644 index 89267aec5f..0000000000 --- a/third_party/lwip/repo/lwip/UPGRADING +++ /dev/null @@ -1,243 +0,0 @@ -This file lists major changes between release versions that require -ports or applications to be changed. Use it to update a port or an -application written for an older version of lwIP to correctly work -with newer versions. - - -(git master) - - * [Enter new changes just after this line - do not remove this line] - -(2.0.2) - - ++ Application changes: - - * slipif: The way to pass serial port number has changed. netif->num is not - supported any more, netif->state is interpreted as an u8_t port number now - (it's not a POINTER to an u8_t any more!) - -(2.0.1) - - ++ Application changes: - - * UDP does NOT receive multicast traffic from ALL netifs on an UDP PCB bound to a specific - netif any more. Users need to bind to IP_ADDR_ANY to receive multicast traffic and compare - ip_current_netif() to the desired netif for every packet. - See bug #49662 for an explanation. - -(2.0.0) - - ++ Application changes: - - * Changed netif "up" flag handling to be an administrative flag (as opposed to the previous meaning of - "ip4-address-valid", a netif will now not be used for transmission if not up) -> even a DHCP netif - has to be set "up" before starting the DHCP client - * Added IPv6 support (dual-stack or IPv4/IPv6 only) - * Changed ip_addr_t to be a union in dual-stack mode (use ip4_addr_t where referring to IPv4 only). - * Major rewrite of SNMP (added MIB parser that creates code stubs for custom MIBs); - supports SNMPv2c (experimental v3 support) - * Moved some core applications from contrib repository to src/apps (and include/lwip/apps) - - +++ Raw API: - * Changed TCP listen backlog: removed tcp_accepted(), added the function pair tcp_backlog_delayed()/ - tcp_backlog_accepted() to explicitly delay backlog handling on a connection pcb - - +++ Socket API: - * Added an implementation for posix sendmsg() - * Added LWIP_FIONREAD_LINUXMODE that makes ioctl/FIONREAD return the size of the next pending datagram - - ++ Port changes - - +++ new files: - * MANY new and moved files! - * Added src/Filelists.mk for use in Makefile projects - * Continued moving stack-internal parts from abc.h to abc_priv.h in sub-folder "priv" - to let abc.h only contain the actual application programmer's API - - +++ sys layer: - * Made LWIP_TCPIP_CORE_LOCKING==1 the default as it usually performs better than - the traditional message passing (although with LWIP_COMPAT_MUTEX you are still - open to priority inversion, so this is not recommended any more) - * Added LWIP_NETCONN_SEM_PER_THREAD to use one "op_completed" semaphore per thread - instead of using one per netconn (these semaphores are used even with core locking - enabled as some longer lasting functions like big writes still need to delay) - * Added generalized abstraction for itoa(), strnicmp(), stricmp() and strnstr() - in def.h (to be overridden in cc.h) instead of config - options for netbiosns, httpd, dns, etc. ... - * New abstraction for hton* and ntoh* functions in def.h. - To override them, use the following in cc.h: - #define lwip_htons(x) - #define lwip_htonl(x) - - +++ new options: - * TODO - - +++ new pools: - * Added LWIP_MEMPOOL_* (declare/init/alloc/free) to declare private memp pools - that share memp.c code but do not have to be made global via lwippools.h - * Added pools for IPv6, MPU_COMPATIBLE, dns-api, netif-api, etc. - * added hook LWIP_HOOK_MEMP_AVAILABLE() to get informed when a memp pool was empty and an item - is now available - - * Signature of LWIP_HOOK_VLAN_SET macro was changed - - * LWIP_DECLARE_MEMORY_ALIGNED() may be used to declare aligned memory buffers (mem/memp) - or to move buffers to dedicated memory using compiler attributes - - * Standard C headers are used to define sized types and printf formatters - (disable by setting LWIP_NO_STDINT_H=1 or LWIP_NO_INTTYPES_H=1 if your compiler - does not support these) - - - ++ Major bugfixes/improvements - - * Added IPv6 support (dual-stack or IPv4/IPv6 only) - * Major rewrite of PPP (incl. keep-up with apache pppd) - see doc/ppp.txt for an upgrading how-to - * Major rewrite of SNMP (incl. MIB parser) - * Fixed timing issues that might have lead to losing a DHCP lease - * Made rx processing path more robust against crafted errors - * TCP window scaling support - * modification of api modules to support FreeRTOS-MPU (don't pass stack-pointers to other threads) - * made DNS client more robust - * support PBUF_REF for RX packets - * LWIP_NETCONN_FULLDUPLEX allows netconn/sockets to be used for reading/writing from separate - threads each (needs LWIP_NETCONN_SEM_PER_THREAD) - * Moved and reordered stats (mainly memp/mib2) - -(1.4.0) - - ++ Application changes: - - * Replaced struct ip_addr by typedef ip_addr_t (struct ip_addr is kept for - compatibility to old applications, but will be removed in the future). - - * Renamed mem_realloc() to mem_trim() to prevent confusion with realloc() - - +++ Raw API: - * Changed the semantics of tcp_close() (since it was rather a - shutdown before): Now the application does *NOT* get any calls to the recv - callback (aside from NULL/closed) after calling tcp_close() - - * When calling tcp_abort() from a raw API TCP callback function, - make sure you return ERR_ABRT to prevent accessing unallocated memory. - (ERR_ABRT now means the applicaiton has called tcp_abort!) - - +++ Netconn API: - * Changed netconn_receive() and netconn_accept() to return - err_t, not a pointer to new data/netconn. - - +++ Socket API: - * LWIP_SO_RCVTIMEO: when accept() or recv() time out, they - now set errno to EWOULDBLOCK/EAGAIN, not ETIMEDOUT. - - * Added a minimal version of posix fctl() to have a - standardised way to set O_NONBLOCK for nonblocking sockets. - - +++ all APIs: - * correctly implemented SO(F)_REUSEADDR - - ++ Port changes - - +++ new files: - - * Added 4 new files: def.c, timers.c, timers.h, tcp_impl.h: - - * Moved stack-internal parts of tcp.h to tcp_impl.h, tcp.h now only contains - the actual application programmer's API - - * Separated timer implementation from sys.h/.c, moved to timers.h/.c; - Added timer implementation for NO_SYS==1, set NO_SYS_NO_TIMERS==1 if you - still want to use your own timer implementation for NO_SYS==0 (as before). - - +++ sys layer: - - * Converted mbox- and semaphore-functions to take pointers to sys_mbox_t/ - sys_sem_t; - - * Converted sys_mbox_new/sys_sem_new to take pointers and return err_t; - - * Added Mutex concept in sys_arch (define LWIP_COMPAT_MUTEX to let sys.h use - binary semaphores instead of mutexes - as before) - - +++ new options: - - * Don't waste memory when chaining segments, added option TCP_OVERSIZE to - prevent creating many small pbufs when calling tcp_write with many small - blocks of data. Instead, pbufs are allocated larger than needed and the - space is used for later calls to tcp_write. - - * Added LWIP_NETIF_TX_SINGLE_PBUF to always copy to try to create single pbufs - in tcp_write/udp_send. - - * Added an additional option LWIP_ETHERNET to support ethernet without ARP - (necessary for pure PPPoE) - - * Add MEMP_SEPARATE_POOLS to place memory pools in separate arrays. This may - be used to place these pools into user-defined memory by using external - declaration. - - * Added TCP_SNDQUEUELOWAT corresponding to TCP_SNDLOWAT - - +++ new pools: - - * Netdb uses a memp pool for allocating memory when getaddrinfo() is called, - so MEMP_NUM_NETDB has to be set accordingly. - - * DNS_LOCAL_HOSTLIST_IS_DYNAMIC uses a memp pool instead of the heap, so - MEMP_NUM_LOCALHOSTLIST has to be set accordingly. - - * Snmp-agent uses a memp pools instead of the heap, so MEMP_NUM_SNMP_* have - to be set accordingly. - - * PPPoE uses a MEMP pool instead of the heap, so MEMP_NUM_PPPOE_INTERFACES - has to be set accordingly - - * Integrated loopif into netif.c - loopif does not have to be created by the - port any more, just define LWIP_HAVE_LOOPIF to 1. - - * Added define LWIP_RAND() for lwip-wide randomization (needs to be defined - in cc.h, e.g. used by igmp) - - * Added printf-formatter X8_F to printf u8_t as hex - - * The heap now may be moved to user-defined memory by defining - LWIP_RAM_HEAP_POINTER as a void pointer to that memory's address - - * added autoip_set_struct() and dhcp_set_struct() to let autoip and dhcp work - with user-allocated structs instead of calling mem_malloc - - * Added const char* name to mem- and memp-stats for easier debugging. - - * Calculate the TCP/UDP checksum while copying to only fetch data once: - Define LWIP_CHKSUM_COPY to a memcpy-like function that returns the checksum - - * Added SO_REUSE_RXTOALL to pass received UDP broadcast/multicast packets to - more than one pcb. - - * Changed the semantics of ARP_QUEUEING==0: ARP_QUEUEING now cannot be turned - off any more, if this is set to 0, only one packet (the most recent one) is - queued (like demanded by RFC 1122). - - - ++ Major bugfixes/improvements - - * Implemented tcp_shutdown() to only shut down one end of a connection - * Implemented shutdown() at socket- and netconn-level - * Added errorset support to select() + improved select speed overhead - * Merged pppd to v2.3.11 (including some backported bugfixes from 2.4.x) - * Added timer implementation for NO_SYS==1 (may be disabled with NO_SYS_NO_TIMERS==1 - * Use macros defined in ip_addr.h to work with IP addresses - * Implemented many nonblocking socket/netconn functions - * Fixed ARP input processing: only add a new entry if a request was directed as us - * mem_realloc() to mem_trim() to prevent confusion with realloc() - * Some improvements for AutoIP (don't route/forward link-local addresses, don't break - existing connections when assigning a routable address) - * Correctly handle remote side overrunning our rcv_wnd in ooseq case - * Removed packing from ip_addr_t, the packed version is now only used in protocol headers - * Corrected PBUF_POOL_BUFSIZE for ports where ETH_PAD_SIZE > 0 - * Added support for static ARP table entries - -(STABLE-1.3.2) - - * initial version of this file diff --git a/third_party/lwip/repo/lwip/doc/FILES b/third_party/lwip/repo/lwip/doc/FILES deleted file mode 100644 index e588575085..0000000000 --- a/third_party/lwip/repo/lwip/doc/FILES +++ /dev/null @@ -1,9 +0,0 @@ -doxygen/ - Configuration files and scripts to create the lwIP doxygen source - documentation (found at http://www.nongnu.org/lwip/) - -savannah.txt - How to obtain the current development source code. -contrib.txt - How to contribute to lwIP as a developer. -rawapi.txt - The documentation for the core API of lwIP. - Also provides an overview about the other APIs and multithreading. -sys_arch.txt - The documentation for a system abstraction layer of lwIP. -ppp.txt - Documentation of the PPP interface for lwIP. diff --git a/third_party/lwip/repo/lwip/doc/NO_SYS_SampleCode.c b/third_party/lwip/repo/lwip/doc/NO_SYS_SampleCode.c deleted file mode 100644 index f0af6600b7..0000000000 --- a/third_party/lwip/repo/lwip/doc/NO_SYS_SampleCode.c +++ /dev/null @@ -1,122 +0,0 @@ -void -eth_mac_irq() -{ - /* Service MAC IRQ here */ - - /* Allocate pbuf from pool (avoid using heap in interrupts) */ - struct pbuf* p = pbuf_alloc(PBUF_RAW, eth_data_count, PBUF_POOL); - - if(p != NULL) { - /* Copy ethernet frame into pbuf */ - pbuf_take(p, eth_data, eth_data_count); - - /* Put in a queue which is processed in main loop */ - if(!queue_try_put(&queue, p)) { - /* queue is full -> packet loss */ - pbuf_free(p); - } - } -} - -static err_t -netif_output(struct netif *netif, struct pbuf *p) -{ - LINK_STATS_INC(link.xmit); - - /* Update SNMP stats (only if you use SNMP) */ - MIB2_STATS_NETIF_ADD(netif, ifoutoctets, p->tot_len); - int unicast = ((p->payload[0] & 0x01) == 0); - if (unicast) { - MIB2_STATS_NETIF_INC(netif, ifoutucastpkts); - } else { - MIB2_STATS_NETIF_INC(netif, ifoutnucastpkts); - } - - lock_interrupts(); - pbuf_copy_partial(p, mac_send_buffer, p->tot_len, 0); - /* Start MAC transmit here */ - unlock_interrupts(); - - return ERR_OK; -} - -static void -netif_status_callback(struct netif *netif) -{ - printf("netif status changed %s\n", ip4addr_ntoa(netif_ip4_addr(netif))); -} - -static err_t -netif_init(struct netif *netif) -{ - netif->linkoutput = netif_output; - netif->output = etharp_output; - netif->output_ip6 = ethip6_output; - netif->mtu = ETHERNET_MTU; - netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET | NETIF_FLAG_IGMP | NETIF_FLAG_MLD6; - MIB2_INIT_NETIF(netif, snmp_ifType_ethernet_csmacd, 100000000); - - SMEMCPY(netif->hwaddr, your_mac_address_goes_here, sizeof(netif->hwaddr)); - netif->hwaddr_len = sizeof(netif->hwaddr); - - return ERR_OK; -} - -void -main(void) -{ - struct netif netif; - - lwip_init(); - - netif_add(&netif, IP4_ADDR_ANY, IP4_ADDR_ANY, IP4_ADDR_ANY, NULL, netif_init, netif_input); - netif.name[0] = 'e'; - netif.name[1] = '0'; - netif_create_ip6_linklocal_address(&netif, 1); - netif.ip6_autoconfig_enabled = 1; - netif_set_status_callback(&netif, netif_status_callback); - netif_set_default(&netif); - netif_set_up(&netif); - - /* Start DHCP and HTTPD */ - dhcp_start(&netif ); - httpd_init(); - - while(1) { - /* Check link state, e.g. via MDIO communication with PHY */ - if(link_state_changed()) { - if(link_is_up()) { - netif_set_link_up(&netif); - } else { - netif_set_link_down(&netif); - } - } - - /* Check for received frames, feed them to lwIP */ - lock_interrupts(); - struct pbuf* p = queue_try_get(&queue); - unlock_interrupts(); - - if(p != NULL) { - LINK_STATS_INC(link.recv); - - /* Update SNMP stats (only if you use SNMP) */ - MIB2_STATS_NETIF_ADD(netif, ifinoctets, p->tot_len); - int unicast = ((p->payload[0] & 0x01) == 0); - if (unicast) { - MIB2_STATS_NETIF_INC(netif, ifinucastpkts); - } else { - MIB2_STATS_NETIF_INC(netif, ifinnucastpkts); - } - - if(netif.input(p, &netif) != ERR_OK) { - pbuf_free(p); - } - } - - /* Cyclic lwIP timers check */ - sys_check_timeouts(); - - /* your application goes here */ - } -} diff --git a/third_party/lwip/repo/lwip/doc/contrib.txt b/third_party/lwip/repo/lwip/doc/contrib.txt deleted file mode 100644 index 6f0d7bc516..0000000000 --- a/third_party/lwip/repo/lwip/doc/contrib.txt +++ /dev/null @@ -1,58 +0,0 @@ -1 Introduction - -This document describes some guidelines for people participating -in lwIP development. - -2 How to contribute to lwIP - -Here is a short list of suggestions to anybody working with lwIP and -trying to contribute bug reports, fixes, enhancements, platform ports etc. -First of all as you may already know lwIP is a volunteer project so feedback -to fixes or questions might often come late. Hopefully the bug and patch tracking -features of Savannah help us not lose users' input. - -2.1 Source code style: - -1. do not use tabs. -2. indentation is two spaces per level (i.e. per tab). -3. end debug messages with a trailing newline (\n). -4. one space between keyword and opening bracket. -5. no space between function and opening bracket. -6. one space and no newline before opening curly braces of a block. -7. closing curly brace on a single line. -8. spaces surrounding assignment and comparisons. -9. don't initialize static and/or global variables to zero, the compiler takes care of that. -10. use current source code style as further reference. - -2.2 Source code documentation style: - -1. JavaDoc compliant and Doxygen compatible. -2. Function documentation above functions in .c files, not .h files. - (This forces you to synchronize documentation and implementation.) -3. Use current documentation style as further reference. - -2.3 Bug reports and patches: - -1. Make sure you are reporting bugs or send patches against the latest - sources. (From the latest release and/or the current Git sources.) -2. If you think you found a bug make sure it's not already filed in the - bugtracker at Savannah. -3. If you have a fix put the patch on Savannah. If it is a patch that affects - both core and arch specific stuff please separate them so that the core can - be applied separately while leaving the other patch 'open'. The preferred way - is to NOT touch archs you can't test and let maintainers take care of them. - This is a good way to see if they are used at all - the same goes for unix - netifs except tapif. -4. Do not file a bug and post a fix to it to the patch area. Either a bug report - or a patch will be enough. - If you correct an existing bug then attach the patch to the bug rather than creating a new entry in the patch area. -5. Patches should be specific to a single change or to related changes. Do not mix bugfixes with spelling and other - trivial fixes unless the bugfix is trivial too. Do not reorganize code and rename identifiers in the same patch you - change behaviour if not necessary. A patch is easier to read and understand if it's to the point and short than - if it's not to the point and long :) so the chances for it to be applied are greater. - -2.4 Platform porters: - -1. If you have ported lwIP to a platform (an OS, a uC/processor or a combination of these) and - you think it could benefit others[1] you might want discuss this on the mailing list. You - can also ask for Git access to submit and maintain your port in the contrib Git module. diff --git a/third_party/lwip/repo/lwip/doc/doxygen/generate.bat b/third_party/lwip/repo/lwip/doc/doxygen/generate.bat deleted file mode 100644 index 99afb124be..0000000000 --- a/third_party/lwip/repo/lwip/doc/doxygen/generate.bat +++ /dev/null @@ -1 +0,0 @@ -doxygen lwip.Doxyfile diff --git a/third_party/lwip/repo/lwip/doc/doxygen/generate.sh b/third_party/lwip/repo/lwip/doc/doxygen/generate.sh deleted file mode 100755 index 89344b0e81..0000000000 --- a/third_party/lwip/repo/lwip/doc/doxygen/generate.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -doxygen lwip.Doxyfile diff --git a/third_party/lwip/repo/lwip/doc/doxygen/lwip.Doxyfile b/third_party/lwip/repo/lwip/doc/doxygen/lwip.Doxyfile deleted file mode 100644 index 95fa363b41..0000000000 --- a/third_party/lwip/repo/lwip/doc/doxygen/lwip.Doxyfile +++ /dev/null @@ -1,2505 +0,0 @@ -# Doxyfile 1.8.11 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = "lwIP" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = "2.0.3" - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = "Lightweight IP stack" - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = output - -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = "The $name class " \ - "The $name widget " \ - "The $name file " \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = ../../ - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new -# page for each member. If set to NO, the documentation of a member will be part -# of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# If one adds a struct or class to a group and this option is enabled, then also -# any nested class or struct is added to the same group. By default this option -# is disabled and one has to add nested compounds explicitly via \ingroup. -# The default value is: NO. - -GROUP_NESTED_COMPOUNDS = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO, -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. If set to YES, local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO, only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = YES - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO, these classes will be included in the various overviews. This option -# has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = YES - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO, these declarations will be -# included in the documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES, upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo -# list. This list is created by putting \todo commands in the documentation. -# The default value is: YES. - -GENERATE_TODOLIST = NO - -# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test -# list. This list is created by putting \test commands in the documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES, the -# list will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when -# a warning is encountered. -# The default value is: NO. - -WARN_AS_ERROR = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text " - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING -# Note: If this tag is empty the current directory is searched. - -INPUT = main_page.h ../../src - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# read by doxygen. -# -# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, -# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, -# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl, -# *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js. - -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.inc \ - *.m \ - *.mm \ - *.dox - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = ../../src/include/netif/ppp/polarssl - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = ../ ../../ - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = main_page.h - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = NO - -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse-libclang=ON option for CMake. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = NO - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to YES can help to show when doxygen was last run and thus if the -# documentation is up to date. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = NO - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = lwip.chm - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler (hhc.exe). If non-empty, -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the master .chm file (NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated -# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = YES - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /